:root {
  /* v1.4: Tally-style — dark blue bar, light blue screen, yellow strip on the selected / active item */
  --bg: #e3eefa; --card: #f7fbff; --ink: #14243a; --muted: #4f6787; --line: #c7d9ee;
  --pri: #2563a8; --pri2: #2f74c0; --pri-d: #1b4f8a; --pri-ink: #fff; --acc: #f9c22e; --soft: #d6e6f7;
  --hi: #fbc531; --hi-ink: #1a1a1a; --sec: #5b8cc4;
  --ok: #1d7a46; --amber: #9a5d00; --amber-bg: #fff3d6; --red: #c0392b; --red-bg: #fde7e4;
  --wa: #1fa855; --shadow: 0 1px 2px rgba(20,50,90,.06), 0 3px 10px rgba(20,50,90,.07);
  --r: 14px; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; -webkit-tap-highlight-color: transparent; }
body.noscroll { overflow: hidden; }
body.locked #app, body.locked .pill, body.locked .toasts { visibility: hidden; }
#app { max-width: 680px; margin: 0 auto; min-height: 100vh; padding-bottom: 110px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 22px 16px 8px; display: flex; gap: 8px; align-items: center; }
h2 small { background: var(--soft); border-radius: 99px; padding: 1px 8px; font-weight: 600; letter-spacing: 0; }
h2 a { margin-left: auto; color: var(--pri); text-transform: none; letter-spacing: 0; font-size: 14px; }
h3 { margin: 0 0 12px; font-size: 18px; display: flex; gap: 8px; align-items: center; }
.boot { height: 80vh; display: grid; place-items: center; gap: 14px; align-content: center; }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; padding: 10px 10px calc(10px) ; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--pri); color: var(--pri-ink); }
.top h1 { font-size: 18px; margin: 0 4px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { display: flex; gap: 4px; align-items: center; }
.top .count { font-size: 13px; opacity: .85; padding-right: 6px; }
.hero { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 18px; padding-top: max(14px, env(safe-area-inset-top));
  background: var(--pri); color: #fff; border-radius: 0 0 22px 22px; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand img { border-radius: 11px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.brand h1 { margin: 0; font-size: 21px; }
.brand small { opacity: .82; font-size: 12.5px; }
.ib { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; }
.ib:active { background: rgba(127,127,127,.18); }
.ib.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
.ib:disabled { opacity: .3; }
.ib .dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--acc); color: #3a2200; font: 700 11px/18px var(--font); font-style: normal; }

/* search */
.search { display: flex; align-items: center; gap: 8px; margin: -14px 14px 6px; background: var(--card); border-radius: 14px; padding: 4px 12px; box-shadow: var(--shadow); border: 1px solid var(--line); position: relative; z-index: 2; }
.search.sm { margin: 10px 14px 4px; }
.search span { color: var(--muted); display: grid; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; padding: 10px 0; color: var(--ink); min-width: 0; }
.banner { display: flex; align-items: center; gap: 10px; margin: 12px 14px 0; padding: 12px 14px; border-radius: 12px; background: var(--amber-bg); color: var(--amber); border: 0; width: calc(100% - 28px); text-align: left; cursor: pointer; }
.banner span { flex: 1; }
.banner.soft { background: var(--soft); color: var(--ink); }

/* lists */
.list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.list.pad { margin: 14px 0; }
.row-item, .doc-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 0; width: 100%; text-align: left; cursor: pointer; }
.row-item .grow, .doc-item .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-item small, .doc-item small { color: var(--muted); font-size: 13px; }
.row-item > svg:last-child { color: var(--muted); flex: none; }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--pri); display: grid; place-items: center; font-weight: 700; flex: none; }
.av.sq { border-radius: 12px; }
.doc-item { align-items: flex-start; }
.doc-item .th { width: 52px; height: 66px; object-fit: cover; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); flex: none; }
.doc-item.draft { background: linear-gradient(90deg, var(--amber-bg) 0, var(--card) 6px); }
.dl1 { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl1 b { color: var(--ink); }
.sno { display: inline-block; background: var(--pri); color: #fff; border-radius: 6px; padding: 0 6px; font-weight: 700; font-size: 12.5px; }
.dparty { color: var(--pri); font-weight: 600; font-size: 14px; }
.dsub { font-size: 15px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dtags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.tag { background: var(--soft); border-radius: 6px; padding: 1px 7px; font-size: 12px; color: var(--muted); }
.badge { display: inline-block; background: var(--soft); color: var(--muted); border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.pgc { text-align: center; font-weight: 700; font-size: 17px; color: var(--muted); flex: none; line-height: 1; }
.pgc small { display: block; font-size: 11px; font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 34px 24px; margin: 0; background: var(--card); }
.hint { color: var(--muted); font-size: 13.5px; margin: 6px 0; line-height: 1.45; }
.hint.pad { margin: 12px 16px 4px; }
.hint.ok { color: var(--ok); display: flex; gap: 6px; align-items: center; }
.err { color: var(--red); }
.pinfo { padding: 10px 16px 0; color: var(--muted); font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pad { padding: 12px 14px; }
.row { display: flex; } .col { display: flex; flex-direction: column; } .gap { gap: 10px; } .wrap { flex-wrap: wrap; }
.center { justify-content: center; align-items: center; } .end { justify-content: flex-end; } .grow { flex: 1; }
.filters { display: flex; gap: 8px; padding: 8px 14px; overflow-x: auto; }
.filters select { flex: 1 1 0; min-width: 0; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; color: var(--ink); }
.reg-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 6px 16px; text-transform: uppercase; letter-spacing: .04em; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; font-size: 15px; text-align: center; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--pri); color: #fff; border-color: var(--pri); }
.btn.danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn.danger-o { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn.sm { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn.big { padding: 15px 18px; font-size: 16px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .45; }
.fab { position: fixed; right: max(18px, calc(50vw - 322px)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 8px;
  background: var(--pri); color: #fff; padding: 16px 22px; border-radius: 20px; font-weight: 700; box-shadow: 0 8px 24px rgba(21,63,68,.35); }
.fab svg { width: 24px; height: 24px; }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 12px 14px max(12px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.bottombar > * { max-width: 652px; margin: 0 auto; }

/* scan sources */
.srcgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 14px; }
.src { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; font-weight: 600; font-size: 14px; }
.src svg { width: 26px; height: 26px; color: var(--pri); }
.src.main { grid-column: span 3; flex-direction: row; justify-content: center; background: var(--pri); color: #fff; border-color: var(--pri); padding: 20px; font-size: 18px; }
.src.main svg { color: #fff; width: 30px; height: 30px; }
.grid.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 4px 14px 14px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.pimg { position: relative; border: 0; padding: 0; background: var(--soft); aspect-ratio: 3/4; cursor: pointer; }
.pimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pn { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.pact { display: flex; justify-content: space-between; padding: 2px; }
.pcard.add { align-items: center; justify-content: center; gap: 6px; min-height: 160px; border-style: dashed; color: var(--pri); font-weight: 600; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px; }
.strip img { height: 90px; border-radius: 6px; border: 1px solid var(--line); }

/* doc head */
.dhead { padding: 14px 16px 4px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.dhead.draft { background: var(--amber-bg); margin: 12px 14px 0; border-radius: 14px; padding: 14px; align-items: stretch; }
.dhead.draft .badge { align-self: flex-start; background: var(--card); }
.dtitle { font-size: 21px; font-weight: 700; }
.dmeta { color: var(--muted); font-size: 14px; }
.remarks { margin: 4px 0 0; color: var(--muted); white-space: pre-wrap; }
.share4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sbtn svg { width: 24px; height: 24px; }
.sbtn.wa svg { color: var(--wa); } .sbtn.ml svg { color: #c5221f; }
.sbtn:disabled { opacity: .4; }

/* forms */
.form { padding: 8px 14px 30px; display: flex; flex-direction: column; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.inp { width: 100%; padding: 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 16px; color: var(--ink); }
.inp:focus { outline: 2px solid color-mix(in srgb, var(--pri) 45%, transparent); border-color: transparent; }
textarea.inp { resize: vertical; }
.ta { min-height: 40vh; font-size: 14px; }
.lbl { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button.on { background: var(--card); color: var(--pri); box-shadow: var(--shadow); }
.seg.col2 { flex-direction: column; } .seg.col2 button { text-align: left; padding: 10px 12px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; padding: 6px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--pri); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 12px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--pri); color: #fff; border-color: var(--pri); }
.card { background: var(--card); margin: 12px 14px; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.sigrow { display: flex; align-items: center; gap: 12px; }
.sigbox { flex: 1; height: 70px; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; background: #fff; color: #999; font-size: 13px; }
.sigbox img { max-height: 62px; max-width: 100%; }
.rem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); }
.rem .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rem small { color: var(--muted); font-size: 13px; }
.rem .days { font-weight: 800; font-size: 20px; text-align: center; line-height: 1; } .rem .days small { display: block; font-size: 11px; font-weight: 500; }
.rem.amber .days { color: var(--amber); } .rem.red .days { color: var(--red); font-size: 14px; }

/* modal / sheets */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(8,20,22,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal.center { align-items: center; padding: 20px; }
.modal .sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 16px max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; animation: up .2s; }
.modal.center .sheet { border-radius: 18px; }
.modal .msg { font-size: 16px; line-height: 1.5; margin: 4px 0 8px; }
.modal.full { background: #000; align-items: stretch; }
.modal.full .sheet { max-width: none; max-height: none; height: 100%; border-radius: 0; padding: 0; background: #000; }
.modal.lock { background: var(--bg); align-items: center; }
.modal.lock .sheet { background: transparent; }
@keyframes up { from { transform: translateY(30px); opacity: .4; } } @keyframes fade { from { opacity: 0; } }
.ready { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; font-size: 14px; min-height: 24px; }
.viewer { display: flex; flex-direction: column; height: 100%; }
.viewer img { flex: 1; min-height: 0; object-fit: contain; width: 100%; background: #111; }
.vbar { display: flex; align-items: center; gap: 8px; padding: 10px; color: #fff; justify-content: center; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.vbar .ib { color: #fff; font-size: 26px; } .vbar .btn { background: #222; color: #fff; border-color: #333; }
.sigpad { width: 100%; aspect-ratio: 2.5; background: #fff; border-radius: 12px; border: 1px solid var(--line); touch-action: none; }

/* pin */
.pin { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 10px 0; }
.plogo img { border-radius: 14px; }
.dots { display: flex; gap: 12px; } .dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--pri); }
.dots i.on { background: var(--pri); }
.perr { color: var(--red); min-height: 20px; margin: 0; font-size: 14px; }
.keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; }
.keys button { height: 64px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 24px; font-weight: 600; cursor: pointer; display: grid; place-items: center; }
.keys span { display: block; }

/* loading, toast, pill */
.loading { position: fixed; inset: 0; z-index: 90; background: rgba(8,20,22,.45); display: grid; place-items: center; }
.loading > div { background: var(--card); padding: 22px 28px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 200px; }
.loading p { margin: 0; font-weight: 600; }
.spinner { width: 30px; height: 30px; border: 3px solid color-mix(in srgb, var(--pri) 25%, transparent); border-top-color: var(--pri); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toasts { position: fixed; left: 0; right: 0; bottom: 96px; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: #1d2f31; color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14.5px; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: .3s; max-width: 520px; text-align: center; }
.toast.out { opacity: 0; transform: translateY(10px); }
.pill { position: fixed; left: max(14px, calc(50vw - 326px)); bottom: max(26px, calc(env(safe-area-inset-bottom) + 14px)); z-index: 40; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 7px 14px; border-radius: 99px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.pill[data-p]::after { content: attr(data-p); color: var(--muted); }

/* editor */
.ed { position: fixed; inset: 0; z-index: 70; background: #0b1213; color: #fff; display: flex; flex-direction: column; }
.ed-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
.ed-top .ib { color: #fff; }
.ed-title { flex: 1; font-weight: 600; }
.ed-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; touch-action: none; }
.ed-spin { position: absolute; inset: 0; display: none; place-items: center; align-items: center; justify-content: center; background: rgba(0,0,0,.35); z-index: 5; }
.ed-img { object-fit: contain; background: #222; }
.ed-opts { padding: 8px 12px; min-height: 64px; }
.ed-opts .hint { color: #b9c9ca; text-align: center; margin: 0 0 8px; }
.ed-opts .btn { background: #18272a; color: #fff; border-color: #2c4245; }
.ed-opts .btn.danger-o { color: #ff8a7d; }
.ed-opts .check { color: #fff; justify-content: center; }
.ed-tabs { display: flex; justify-content: space-around; border-top: 1px solid #22353a; padding: 6px 4px max(6px, env(safe-area-inset-bottom)); }
.ed-tabs button { border: 0; background: transparent; color: #9fb3b5; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; padding: 6px 4px; border-radius: 10px; cursor: pointer; min-width: 52px; }
.ed-tabs button.on { color: var(--acc); background: #16292c; }
.crop-wrap { position: relative; touch-action: none; }
.crop-wrap canvas { display: block; touch-action: none; }
.crop-wrap .loupe { position: absolute; width: 110px; height: 110px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 16px rgba(0,0,0,.5); display: none; pointer-events: none; }
.layer-box { position: relative; }
.layer { position: absolute; left: 0; top: 0; display: block; }
.layer.draw { touch-action: none; cursor: crosshair; }
.stamp { position: absolute; transform: translate(-50%, -50%); touch-action: none; cursor: move; outline: 1px dashed transparent; }
.stamp.sel { outline-color: var(--acc); }
.filt { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.fchip { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px solid transparent; background: transparent; color: #ddd; border-radius: 10px; padding: 3px; font-size: 11.5px; cursor: pointer; }
.fchip canvas { width: 58px; height: 72px; border-radius: 6px; }
.fchip.on { border-color: var(--acc); color: var(--acc); }
.slider { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #ddd; }
.slider input { width: 110px; accent-color: var(--acc); }

/* ---------- DocLedger Online ---------- */
.login { max-width: 440px; margin: 0 auto; padding: max(40px, env(safe-area-inset-top)) 22px 40px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.login img { border-radius: 20px; box-shadow: 0 6px 20px rgba(21,63,68,.25); }
.login h1 { margin: 6px 0 0; font-size: 28px; color: var(--pri); }
.login h3 { margin-top: 16px; justify-content: center; }
.login .form { width: 100%; padding: 0; text-align: left; }
.login .btn { width: 100%; }
.login .center, .center { text-align: center; }
.gbtn { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.lang-s { width: 100%; margin-top: 18px; }
.adminclaim { margin: 0; width: 100%; border-color: var(--acc); background: var(--amber-bg); }
.banner.admin { background: var(--pri); color: #fff; }
.banner.admin small { display: block; opacity: .85; font-size: 12.5px; }
.cnt { min-width: 22px; height: 22px; border-radius: 11px; background: var(--acc); color: #3a2200; font: 700 12px/22px var(--font); font-style: normal; text-align: center; padding: 0 6px; display: inline-block; }
.banner.admin .cnt { background: #fff; color: var(--pri); }

/* party shell */
body[data-mode="party"] #app { padding-bottom: 150px; }
.ptop { background: var(--pri); }
.pnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px max(6px, env(safe-area-inset-bottom)); }
.pnav a { position: relative; flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 2px; border-radius: 12px; text-align: center; }
.pnav a.on { color: var(--pri); background: var(--soft); }
.pnav .nb, .ib .nb { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--acc); color: #3a2200; font: 700 11px/18px var(--font); font-style: normal; text-align: center; padding: 0 4px; }
.above-nav { bottom: calc(62px + env(safe-area-inset-bottom)) !important; }
.catchips { flex-wrap: nowrap; overflow-x: auto; padding-top: 6px; padding-bottom: 6px; }
.catchips .chip { flex: none; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 8px 14px 14px; }
.prod { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.pimgw { display: block; aspect-ratio: 1; background: var(--soft); }
.pph, .pimgw .noimg { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; color: var(--muted); }
.pinfo2 { padding: 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pinfo2 b { font-size: 14.5px; line-height: 1.3; }
.pinfo2 small { color: var(--muted); font-size: 12.5px; }
.pinfo2 .btn { margin-top: auto; }
.pprice { font-weight: 800; color: var(--pri); font-size: 17px; }
.pprice small { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 2px; }
.pprice.big { font-size: 24px; margin: 6px 0; }
.ptitle { text-transform: none; letter-spacing: 0; font-size: 21px; color: var(--ink); margin: 0 0 4px; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: var(--soft); }
.gallery img, .gallery .noimg { flex: none; width: 100%; aspect-ratio: 1; max-height: 60vh; object-fit: contain; scroll-snap-align: center; background: #fff; }
.noimg.big { display: grid; place-items: center; color: var(--muted); }
.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec th, .spec td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--muted); font-weight: 600; width: 42%; }
.pre { white-space: pre-wrap; margin: 0; line-height: 1.5; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.stepper button { border: 0; background: var(--soft); width: 44px; font-size: 22px; font-weight: 700; cursor: pointer; color: var(--pri); }
.stepper input { width: 70px; border: 0; text-align: center; font: inherit; font-size: 17px; font-weight: 700; background: transparent; color: var(--ink); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper.sm button { width: 34px; font-size: 18px; } .stepper.sm input { width: 56px; font-size: 15px; padding: 6px 0; }
.ohead { display: flex; flex-direction: column; gap: 2px; } .ohead small { color: var(--muted); }
.oitem { display: flex; gap: 10px; padding: 12px 14px; background: var(--card); align-items: flex-start; }
.oitem .grow { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.oitem small { color: var(--muted); font-size: 12.5px; }
.oth { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--soft); display: grid; place-items: center; color: var(--muted); }
.center-v { align-items: center; }
.amt { margin-left: auto; font-weight: 700; }
.ototal { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font-size: 16px; background: var(--soft); }
.ototal b { font-size: 20px; color: var(--pri); }
.okbig { width: 72px; height: 72px; border-radius: 50%; background: #e3f4ea; color: var(--ok); display: grid; place-items: center; margin: 6px auto 0; }
.okbig svg { width: 40px; height: 40px; }
.wa-btn { color: var(--wa); border-color: color-mix(in srgb, var(--wa) 40%, transparent); }
.st { display: inline-block; border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; flex: none; }
.st-new { background: var(--amber-bg); color: var(--amber); }
.st-confirmed { background: #e3edfc; color: #1f5fbf; }
.st-dispatched { background: #efe5fb; color: #6b35b5; }
.st-completed { background: #e3f4ea; color: var(--ok); }
.st-cancelled { background: var(--soft); color: var(--muted); text-decoration: line-through; }
.anote { background: var(--amber-bg); color: var(--ink); padding: 10px 12px; border-radius: 10px; font-size: 14px; width: 100%; }
.otable { width: calc(100% - 28px); margin: 10px 14px; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; font-size: 14px; }
.otable th, .otable td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.otable th { background: var(--soft); font-size: 12px; color: var(--muted); text-transform: uppercase; }
.otable td small { display: block; color: var(--muted); font-size: 12px; }
.otable .r { text-align: right; white-space: nowrap; }
.otable tfoot td { font-weight: 800; font-size: 15px; border: 0; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; } .avatar.sm { width: 40px; height: 40px; }

/* chat */
.lock-note { display: flex; gap: 6px; align-items: center; color: var(--ok); }
.thread { display: flex; flex-direction: column; gap: 8px; padding: 6px 12px 170px; }
.msg { max-width: 84%; padding: 9px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); align-self: flex-start; display: flex; flex-direction: column; gap: 6px; }
.msg.me { align-self: flex-end; background: #fff4cf; border-color: #f0d98a; }
.mtext { white-space: pre-wrap; word-break: break-word; line-height: 1.4; }
.mtime { font-size: 11px; color: var(--muted); align-self: flex-end; }
.tick { margin-left: 4px; color: var(--ok); font-weight: 600; }
.fcard { display: flex; gap: 10px; align-items: center; background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; flex-wrap: wrap; }
.fcard > svg { color: var(--pri); flex: none; }
.fcard .grow { display: flex; flex-direction: column; min-width: 120px; } .fcard small { color: var(--muted); font-size: 12px; }
.fcard b { word-break: break-all; font-size: 14px; }
.fbtns { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 8px 12px max(10px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.composer > * { max-width: 656px; width: 100%; margin: 0 auto; }
.composer textarea { resize: none; min-height: 46px; flex: 1; }

/* admin */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.tile b { font-size: 28px; color: var(--muted); }
.tile span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tile.hot { border-color: var(--acc); background: var(--amber-bg); } .tile.hot b { color: var(--pri); }
.pad0 { margin: 0; }
.th.noimg { display: grid; place-items: center; color: var(--muted); }
.osum { display: flex; justify-content: space-between; padding: 8px 16px; font-size: 14.5px; }
.filters.wrap { flex-wrap: wrap; }
.dlab { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex: 1; }
.dlab input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 7px 8px; font: inherit; font-size: 14px; color: var(--ink); }
.seg.wrap { flex-wrap: wrap; } .seg.wrap button { flex: 1 1 30%; }
.phedit { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.phx { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.phx img { width: 100%; height: 100%; object-fit: cover; }
.phx .ib { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.55); color: #fff; width: 28px; height: 28px; }
.phx .ib.l { left: 4px; right: auto; font-size: 14px; }
.phx.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-style: dashed; color: var(--pri); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.bizline { margin-top: 10px; margin-bottom: 0; }
.row-item.owner { background: var(--soft); }
.row-item.owner small { display: block; }
.codecard { gap: 6px; }
.codecard .code { font-size: 22px; letter-spacing: .04em; color: var(--pri); }
.codecard small { word-break: break-all; }
.codecard .btn { align-self: flex-start; }
.card.joined { flex-direction: row; gap: 12px; align-items: flex-start; margin: 0; width: 100%; text-align: left; }
.card.joined > svg { color: var(--ok); flex: none; width: 28px; height: 28px; }
.login .btn.sm { width: auto; }
.row-item .grow { min-width: 0; }
.row-item .grow b, .row-item .grow small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item > .btn { flex: none; }

/* v1.2.1: placeholders look clearly different from typed text; empty required box turns red */
.inp::placeholder, input::placeholder, textarea::placeholder { color: var(--muted); opacity: .55; font-style: italic; font-weight: 400; }
.inp.bad { border-color: #d93025 !important; box-shadow: 0 0 0 3px rgba(217,48,37,.18); }
.scanbar { display: flex; gap: 10px; flex-wrap: wrap; }
.scanbar .btn { min-width: 140px; justify-content: center; }

/* ---------- v1.3.0: selection, menus, share screen, invite ---------- */
.thw { position: relative; flex: none; display: block; }
.ck { position: absolute; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.28); box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; }
.thw .ck { left: -6px; top: -6px; }
.pcard { position: relative; }
.pcard .ck { right: 6px; top: 6px; z-index: 2; }
.sel .ck, .pcard.sel .ck { background: var(--pri2); border-color: #fff; }
.sel .ck::after, .pcard.sel .ck::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.doc-item { -webkit-touch-callout: none; user-select: none; }
.doc-item.sel { background: color-mix(in srgb, var(--pri2) 14%, var(--card)); outline: 2px solid var(--pri2); outline-offset: -2px; }
.pcard.sel img { outline: 3px solid var(--pri2); outline-offset: -3px; }
.more { flex: none; display: grid; place-items: center; width: 34px; height: 40px; margin-right: -6px; color: var(--muted); border-radius: 10px; }
.more:active { background: var(--soft); }
.more svg { width: 22px; height: 22px; }
body.selmode .more { visibility: hidden; }
body.selmode .fab { display: none; }
.selbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.12); padding: 8px 10px max(10px, env(safe-area-inset-bottom)); max-width: 680px; margin: 0 auto; animation: up .18s; }
.selhead { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.selhead b { flex: 1; }
.selacts { display: flex; gap: 4px; overflow-x: auto; }
.selacts button { flex: 1; min-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: var(--soft); color: var(--ink); border-radius: 12px; padding: 8px 4px; font: 600 11.5px var(--font); }
.selacts button svg { width: 22px; height: 22px; color: var(--pri); }
.selacts button.danger svg, .selacts button.danger { color: var(--red); }
.selacts button:disabled { opacity: .4; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.menu .row-item { width: 100%; text-align: left; border: 0; background: transparent; font: inherit; color: inherit; }
.menu .row-item svg { color: var(--pri); }
.menu .row-item.danger, .menu .row-item.danger svg { color: var(--red); }
.psel { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.psel b { flex: 1; }
.tagpick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip.add { border-style: dashed; color: var(--pri); }
.chip.add svg { width: 14px; height: 14px; vertical-align: -2px; }
.hint.autofill { margin: 10px 14px 0; padding: 8px 12px; border-radius: 10px; background: var(--soft); display: flex; gap: 8px; align-items: center; }
.hint.autofill.ok { background: color-mix(in srgb, var(--ok) 12%, var(--card)); color: var(--ink); }
.hint.autofill svg { width: 18px; height: 18px; color: var(--ok); flex: none; }
.seg.sizes button { display: flex; flex-direction: column; align-items: center; line-height: 1.2; padding-top: 7px; padding-bottom: 7px; }
.seg.sizes small { font-size: 11px; font-weight: 500; opacity: .8; min-height: 13px; }
.optrow { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.pwbox { display: flex; gap: 6px; align-items: center; }
.pwbox .inp { flex: 1; }
.share4.five { grid-template-columns: repeat(5, 1fr); }
.sbtn.pa svg { color: var(--pri); }
.qrbox { width: 210px; height: 210px; margin: 6px auto; display: grid; place-items: center; background: #fff; border-radius: 14px; padding: 8px; }
.qrbox svg { width: 100%; height: 100%; }
.linkbox { font-size: 13px; text-align: center; margin: 6px 0 10px; }
.center { text-align: center; }
.badge.sent { background: color-mix(in srgb, var(--pri2) 14%, var(--card)); color: var(--pri); }
.badge.sent svg { width: 12px; height: 12px; vertical-align: -1px; }
.list.pick { max-height: 40vh; overflow-y: auto; margin: 6px 0; }
.list.pick .row-item { width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.list.pick .row-item.on { background: color-mix(in srgb, var(--pri2) 12%, var(--card)); }
.printframe { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; }
.fbtns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- v1.4 Tally look ---------- */
.top { background: var(--pri); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.top .ib, .top h1 { color: #fff; }
.hero { border-radius: 0 0 14px 14px; }
h2 { color: var(--sec); font-weight: 600; font-size: 12.5px; letter-spacing: .08em; }
h2 small { background: transparent; color: var(--sec); padding: 0; }
.list { background: var(--line); border-block: 1px solid var(--line); }
.row-item, .doc-item { background: var(--card); transition: background .08s; }
/* the yellow strip: the line you touch / the one that is selected */
.row-item:active, .doc-item:active, .row-item:focus-visible, .doc-item:focus-visible { background: var(--hi); color: var(--hi-ink); outline: none; }
.row-item:active small, .doc-item:active small, .doc-item:active .dsub { color: #3b3b3b; }
.doc-item.sel { background: var(--hi); outline: none; color: var(--hi-ink); }
.doc-item.sel .dsub, .doc-item.sel small { color: #3b3b3b; }
.sel .ck, .pcard.sel .ck { background: var(--pri); }
.pcard.sel img { outline-color: var(--hi); }
.seg { background: var(--soft); }
.seg button { color: var(--ink); }
.seg button.on { background: var(--hi); color: var(--hi-ink); box-shadow: none; }
.chip.on { background: var(--hi); color: var(--hi-ink); border-color: #e0aa12; }
.list.pick .row-item.on, .menu .row-item:active { background: var(--hi); color: var(--hi-ink); }
.ed-tabs button.on { color: var(--hi); }
.selacts button { background: var(--soft); }
.selacts button:active { background: var(--hi); }
.tile.hot { background: #fff4cf; border-color: var(--hi); } .tile.hot b { color: var(--pri); }
.doc-item.draft { background: linear-gradient(90deg, var(--hi) 0, var(--hi) 4px, var(--card) 4px); }
.doc-item.draft.sel { background: var(--hi); }
.card { background: var(--card); }
.inp { background: #fff; }
.inp:focus { outline: 2px solid var(--hi); border-color: #e0aa12; }
.modal .sheet .row-item { background: var(--card); }
.sno { background: var(--pri); }
.banner.admin { background: var(--pri-d); }
.badge.sent { background: #dbe9fb; color: var(--pri); }
.toast { background: #1b3557; }
.hint.autofill.ok { background: #e2f3e8; }
/* ---------- v1.5.0: buying DocLedger / app sales ---------- */
.buycard { display: flex; flex-direction: row; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); border: 2px solid var(--hi); background: #fff8dc; }
.buycard svg { flex: none; color: var(--pri); }
.buycard p { margin: 4px 0 0; }
.planrow { display: flex; align-items: center; gap: 12px; }
.planrow > div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.planrow small { color: var(--muted); }
.price { font-size: 22px; font-weight: 800; color: var(--pri); white-space: nowrap; }
.payapps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.payapps .btn { text-decoration: none; }
.payapps [data-app=phonepe] { background: #5f259f; border-color: #5f259f; color: #fff; }
.upiid { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--soft); border-radius: 10px; padding: 8px 10px; font-size: 14px; word-break: break-all; }
.qrphoto img { display: block; max-width: 240px; width: 100%; margin: 0 auto; border-radius: 12px; background: #fff; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.kv span { color: var(--muted); }
.kv b { word-break: break-all; }
.paystatus { align-items: center; text-align: center; }
.paystatus > svg { width: 42px; height: 42px; color: var(--ok); }
.paystatus .kv { text-align: left; width: 100%; }
.card.pur { gap: 10px; }
/* messages never cover buttons: when a sheet / editor is open they appear at the top */
body:has(.modal) .toasts, body:has(.ed) .toasts { top: max(12px, env(safe-area-inset-top)); bottom: auto; }
body:has(.modal) .pill, body:has(.ed) .pill { display: none; }
/* v1.5.1 product form: typeable dropdowns + list sheet */
.combo { position: relative; display: flex; }
.combo .inp { padding-right: 46px; min-width: 0; }
.cbtn { position: absolute; right: 3px; top: 3px; bottom: 3px; width: 42px; border: 0; border-radius: 9px; background: var(--hi, #fbc531); color: #1d2a3a; font-size: 18px; font-weight: 700; cursor: pointer; }
.cbtn:active { filter: brightness(.92); }
select.inp { appearance: auto; height: 47px; padding-top: 0; padding-bottom: 0; }
.lsheet { max-height: 52vh; overflow-y: auto; margin: 6px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.lrow { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); padding-right: 4px; }
.lrow:last-child { border-bottom: 0; }
.lpick { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 14px; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); text-align: left; cursor: pointer; }
.lpick small { color: var(--muted); font-size: 12px; background: #eef3fa; border-radius: 10px; padding: 1px 8px; }
.lpick.on { background: var(--hi, #fbc531); font-weight: 700; }
.lpick i { color: var(--muted); }
.pprice .tx { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.otable tfoot tr.sub td { font-weight: 500; color: var(--muted); }
/* v1.5.2 zoom viewer */
.zv .zstage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; background: #111; }
.zv .zstage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: center; user-select: none; -webkit-user-drag: none; background: transparent; }
.zv .vtop { color: #fff; padding: 12px 16px; font-weight: 700; background: #000; }
.phedit .phx img { cursor: zoom-in; }
.gallery img { cursor: zoom-in; }
.aorder { margin: 6px 0 0; display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--hi, #fbc531); }
.aorder h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.ctable tr.cp td { border-top: 1px solid var(--line); }
.ctable tr.cpp td { font-size: 13px; color: var(--muted); padding-top: 2px; padding-bottom: 2px; }
.ctable tr.cpp td small { display: inline; }
.ctable td small { display: block; color: var(--muted); font-weight: 400; }
/* v1.5.2 Clear Scan-style document set */
.grid.pages.cs { grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 8px 14px 110px; }
.grid.pages.cs .pcard { border-radius: 4px; box-shadow: 0 2px 6px rgba(20,40,70,.18); border: 0; }
.grid.pages.cs .pimg { aspect-ratio: 1 / 1.12; background: #fff; }
.grid.pages.cs .pimg img { object-fit: cover; object-position: top; }
.pov { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(28,62,104,.82); color: #fff; text-align: left; }
.pnb { flex: none; border: 2px solid #fff; padding: 2px 6px; font: 700 17px/1.1 var(--font); min-width: 34px; text-align: center; }
.pinf { font-size: 13px; line-height: 1.25; font-weight: 600; }
.grid.pages.cs .pcard.add { min-height: 0; aspect-ratio: 1 / 1.12; }
.top .pdfb { font: 800 12px/1 var(--font); color: #fff; border: 2px solid #fff; border-radius: 6px; width: auto; height: 30px; padding: 0 6px; margin: 0 4px; }
.dbar { padding: 6px 8px max(6px, env(safe-area-inset-bottom)); background: #1d4e89; border-top: 0; }
.dbar .row { justify-content: flex-end; gap: 4px; }
.dbb { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 72px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: #fff; font: 600 12px var(--font); cursor: pointer; }
.dbb svg { width: 26px; height: 26px; }
.dbb:active { background: rgba(255,255,255,.15); }
#dbGal, #dbCam { background: rgba(255,255,255,.14); }
.dsz:not(:empty) { display: inline-block; margin-right: 8px; padding: 0 6px; border-radius: 6px; background: #e3eefa; color: #1d4e89; font-size: 12px; font-weight: 700; }
body:has(.dbar) .pill { bottom: calc(86px + env(safe-area-inset-bottom)); }
.psel { flex-wrap: wrap; row-gap: 6px; }
.psel b { flex: 1 0 100%; }
.grid.pages.cs .pimg { display: block; width: 100%; overflow: hidden; }
.grid.pages.cs .pimg img { position: absolute; inset: 0; width: 100%; height: 100%; }
body:has(.dbar) .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
.cropbar { flex-wrap: wrap; }
.cropbar .ib2 { min-width: 44px; padding: 0 10px; }
.rotbadge { display: inline-block; margin-left: 6px; color: #22d35e; font-weight: 800; }
.holdtip { margin: 4px 14px 0; }
/* v1.5.4 Sync to Cloud */
.sync-hero { text-align: center; padding: 28px 22px 8px; }
.sync-hero h2 { margin: 14px 0 6px; font-size: 24px; }
.sync-hero p { color: var(--muted); font-size: 16px; line-height: 1.45; margin: 0; }
.sync-ic { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: linear-gradient(160deg, #4cc76a, #2a9d4a); color: #fff; box-shadow: 0 6px 18px rgba(42,157,74,.35); }
.sync-ic svg { width: 44px; height: 44px; }
.sync-ic.sm { width: 46px; height: 46px; } .sync-ic.sm svg { width: 26px; height: 26px; }
.sync-on small { display: block; }
.sybar { height: 8px; border-radius: 4px; background: #e3eefa; overflow: hidden; margin: 6px 0 10px; }
.sybar i { display: block; height: 100%; width: 0; background: #2a9d4a; transition: width .2s; }
.btn.link { background: none; border: 0; text-decoration: underline; color: var(--ink); font-size: 16px; }
.hr { height: 1px; background: var(--line); margin: 8px 0; }
.syncCard { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.syncCard small { display: block; color: var(--muted); }
.syncCard svg:first-child { color: #2a9d4a; }
.sync-info h3 { margin: 12px 0 4px; } .sync-info p { margin: 0; line-height: 1.5; }
.check span small { display: block; font-weight: 400; }
.sync-hero h2 { text-transform: none; letter-spacing: 0; color: var(--ink); }
/* v1.5.5 keys */
.keybox { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }
.keyinp { text-transform: uppercase; letter-spacing: 1px; font-weight: 700; text-align: center; font-size: 18px; }
.orline { display: flex; align-items: center; gap: 10px; color: var(--muted); width: 100%; margin: 4px 0; }
.orline::before, .orline::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.keyshow { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; border: 2px dashed var(--pri, #2563a8); border-radius: 14px; background: #fff; }
.keyshow b { font-size: 24px; letter-spacing: 2px; color: #1d4e89; }
.keyshow small { color: var(--muted); }
.keyrow small { display: block; } .mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .5px; }
.row-item.hot { border-left: 4px solid var(--hi, #fbc531); }
.row-item small { display: block; color: var(--muted); font-weight: 400; }
/* v1.5.6 parties */
.modal.tall .sheet { height: 88vh; }
.psearch { margin: 0 0 6px; }
.plist { overflow-y: auto; flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.plist .row-item { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; font: inherit; }
.plh { position: sticky; top: 0; z-index: 1; padding: 4px 14px; background: #e3eefa; color: #1d4e89; font-size: 12px; font-weight: 800; letter-spacing: .5px; }
.plh.az { font-size: 14px; }
.row-item.addp { color: #1d4e89; background: #fff8e1 !important; }
.h2r { margin-left: auto; display: inline-flex; gap: 14px; align-items: center; }
section > h2 { display: flex; align-items: center; gap: 6px; }
.lnk { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--pri, #2563a8); cursor: pointer; padding: 0; text-transform: none; letter-spacing: 0; }
.prow { gap: 4px; } .prow .prl { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.more.del { color: #c0392b; }
.ib.xs { width: 26px; height: 26px; border-radius: 8px; vertical-align: middle; margin-left: 6px; color: #c0392b; } .ib.xs svg { width: 16px; height: 16px; }
.prow .prl { flex: 1 1 auto; flex-direction: row; }
.menu .row-item b, .menu .row-item small { white-space: normal; overflow: visible; text-overflow: clip; }
/* v1.5.7 Scans grid view (Clear Scan style) */
.lnk.ic { display: inline-grid; place-items: center; padding: 2px; }
.lnk.ic svg { width: 20px; height: 20px; }
.list.gv { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; background: transparent; border: 0; padding: 10px 12px; }
.list.gv .doc-item, .list.gv .doc-item.draft { position: relative; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.list.gv .doc-item.sel { background: var(--hi); }
.list.gv .thw { width: 100%; }
.list.gv .doc-item .th { width: 100%; height: auto; aspect-ratio: 3 / 4; display: block; }
.list.gv .thw .ck { left: 4px; top: 4px; }
.list.gv .grow { padding-right: 22px; }
.list.gv .dtags { display: none; }
.list.gv .dl1 { font-size: 13px; }
.list.gv .dsub { font-size: 11px; color: var(--muted); }
.list.gv .pgc { position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,.6); color: #fff; border-radius: 7px; padding: 3px 6px; font-size: 12px; }
.list.gv .pgc small { display: inline; font-size: 10px; margin-left: 2px; }
.list.gv .more { position: absolute; right: 0; bottom: 2px; width: 28px; height: 32px; margin: 0; }
.list.gv .more.del { display: none; }
.menu .row-item.on { color: var(--pri); font-weight: 700; }
/* v1.5.7 live camera */
body.lcam-on { overflow: hidden; }
.lcam { position: fixed; inset: 0; z-index: 95; background: #000; color: #fff; display: flex; flex-direction: column; }
.lc-view { position: relative; flex: 1; min-height: 0; }
.lc-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.lc-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lc-ov polygon { fill: rgba(46, 204, 113, .16); stroke: #2ecc71; stroke-width: 3; stroke-linejoin: round; transition: all .12s linear; }
.lc-ov polygon.seek { fill: rgba(255, 255, 255, .08); stroke: #f1c40f; stroke-dasharray: 8 6; }
.lc-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.lc-flash.go { animation: lcf .35s ease-out; }
@keyframes lcf { 0% { opacity: .85; } 100% { opacity: 0; } }
.lc-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 10px 10px; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.lc-msg { flex: 1; text-align: center; font-weight: 700; font-size: 15px; text-shadow: 0 1px 3px #000; }
.lc-b { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 22px; min-width: 44px; height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font: inherit; font-size: 13px; font-weight: 700; }
.lc-b svg { width: 22px; height: 22px; }
.lc-b.on, .lc-auto.on { background: #2ecc71; color: #08210f; }
.lc-bot { display: flex; align-items: center; justify-content: space-around; padding: 14px 10px max(18px, env(safe-area-inset-bottom)); background: #000; }
.lc-bot .lc-b { flex-direction: column; height: 60px; width: 76px; border-radius: 14px; }
.lc-bot .lc-b small { font-size: 11px; font-weight: 600; }
.lc-done .lc-n { font-size: 20px; font-weight: 800; line-height: 1; }
.lc-done.has { background: #2563eb; }
.lc-shut { position: relative; width: 78px; height: 78px; border-radius: 50%; border: 0; background: transparent; padding: 0; }
.lc-shut svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.lc-shut circle { fill: none; stroke: #2ecc71; stroke-width: 5; transition: stroke-dashoffset .15s linear; }
.lc-shut i { position: absolute; inset: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.lc-shut:active i { transform: scale(.92); }
#pushBtn small { white-space: normal; overflow: visible; text-overflow: clip; }
#pushRow.list.pad { margin: 0 0 12px; }
/* v1.5.8 party-wise rates */
.rrow { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--card); }
.rrow[hidden] { display: none; }
.rrow .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rrow small { color: var(--muted); font-size: 12px; }
.rrow .rin { width: 96px; text-align: right; padding: 8px; }
.rrow .rin:disabled { background: var(--soft); }
.chip.ask { flex: none; }
.chip.ask.on { background: var(--hi); color: var(--hi-ink); border-color: transparent; font-weight: 700; }
.rtools { display: flex; gap: 8px; flex-wrap: wrap; }
.row-item select.inp.sm { width: auto; max-width: 48%; padding: 8px; }
/* v1.6.1 editor: ✓ Done at the bottom (one-hand use, like Clear Scan) */
.ed-tabs { padding-bottom: 6px; }
.ed-act { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px max(12px, env(safe-area-inset-bottom)); }
.ed-cancel { border: 0; background: transparent; color: #9fb3b5; display: flex; align-items: center; gap: 6px; font: inherit; font-size: 15px; padding: 10px 6px; }
.ed-cancel svg { width: 22px; height: 22px; }
.ed-done { border: 0; background: #2ecc71; color: #06210f; display: flex; align-items: center; gap: 8px; font: inherit; font-size: 17px; font-weight: 800; height: 58px; padding: 0 26px; border-radius: 30px; box-shadow: 0 4px 14px rgba(46,204,113,.35); }
.ed-done svg { width: 28px; height: 28px; stroke-width: 3; }
.ed-done:active { transform: scale(.96); }
.ed.simple .ed-opts, .ed.simple .ed-tabs { display: none; }
.ed-tools { display: none; border: 1px solid #2b4448; background: #13262a; color: #e6f2f3; align-items: center; gap: 6px; font: inherit; font-size: 15px; padding: 10px 16px; border-radius: 22px; }
.ed-tools svg { width: 20px; height: 20px; }
.ed.simple .ed-tools { display: inline-flex; }
.crop-wrap { transition: transform .2s ease; }
.ed-rot { display: none; border: 0; background: transparent; color: #e6f2f3; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 12px; padding: 4px 8px; }
.ed-rot svg { width: 26px; height: 26px; }
.ed.simple .ed-rot { display: inline-flex; }
.ed-cancel { flex-direction: row; }
.ed.simple .ed-tools { padding: 10px 12px; }
.ed.simple .ed-act { gap: 6px; padding-left: 10px; padding-right: 12px; }

/* ---------- v1.6.3: plans, trial, reports, promotions, moving ---------- */
.banner.red { background: var(--red-bg); color: var(--red); }
.banner.plan .btn { flex: none; }
.banner.move { flex-wrap: wrap; }
.banner.move small { display: block; opacity: .8; word-break: break-all; }
.banner.move .btn { flex: none; }
.offer { margin: 12px 14px 0; padding: 10px 14px; border-radius: 12px; background: #e6f6ec; color: var(--ok); font-size: 15px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 14px 0; }
.plancard { margin: 0; padding: 12px 10px; text-align: left; cursor: pointer; align-items: flex-start; gap: 4px; min-width: 0; }
.plancard b { font-size: 16px; }
.plancard small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.plancard .pp { margin-top: 4px; font-size: 17px; }
.plancard .pp s { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.plancard.on { border: 2px solid var(--pri); background: color-mix(in srgb, var(--pri) 7%, var(--card)); box-shadow: var(--shadow); }
@media (max-width: 380px) { .plans { grid-template-columns: 1fr; } .plancard { flex-direction: row; flex-wrap: wrap; align-items: baseline; } .plancard .pp { margin-left: auto; } }
.trialcard { border-style: dashed; }
.trialcard .hint { margin: 0; }
.limitline { margin: 10px 16px 0; }
.planedit .fld { min-width: 0; }
.card.rep { gap: 6px; }
.rep .rbody { margin: 4px 0; white-space: pre-wrap; word-break: break-word; }
.rep .reply { background: var(--soft); border-radius: 10px; padding: 8px 10px; font-size: 14.5px; white-space: pre-wrap; }
.rep .btn.danger-o { align-self: flex-start; }
.adcard { flex-direction: row; align-items: center; gap: 12px; background: linear-gradient(135deg, #13295a, #1f3f7a); color: #fff; border: 0; }
.adcard img { border-radius: 10px; flex: none; }
.adcard small { display: block; margin-top: 4px; opacity: .9; }
.adcard a { color: #7fd8ff; text-decoration: underline; }
.popupad { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.popupad img { border-radius: 14px; }
.popupad p { margin: 0; font-size: 16px; white-space: pre-wrap; }
.card.promo { gap: 6px; }
.check.big b { font-size: 16px; }
.warn { color: var(--amber); }
a.card.row-item { flex-direction: row; align-items: center; }

/* ---------- v1.6.4: photo editor, From WhatsApp, about page, selections ---------- */
.pe { position: fixed; inset: 0; z-index: 60; background: #0c1420; color: #fff; display: flex; flex-direction: column; }
.pe-top { padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); font-weight: 600; }
.pe-stage { position: relative; flex: 1; display: grid; place-items: center; overflow: hidden; touch-action: none; }
.pe-stage canvas { max-width: 100%; max-height: 100%; display: block; }
.pe-box { position: absolute; border: 2px solid #4fd1ff; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move; touch-action: none; }
.pe-box i { position: absolute; width: 26px; height: 26px; background: #4fd1ff; border-radius: 50%; border: 3px solid #fff; }
.pe-box i[data-h=tl] { left: -14px; top: -14px; } .pe-box i[data-h=tr] { right: -14px; top: -14px; }
.pe-box i[data-h=bl] { left: -14px; bottom: -14px; } .pe-box i[data-h=br] { right: -14px; bottom: -14px; }
.pe-opts { padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; background: #14202f; }
.pe-opts .seg { background: #22324a; } .pe-opts .seg button { color: #dbe8ff; } .pe-opts .seg button.on { color: var(--pri); }
.pe-opts .check { color: #e6eefc; }
.pe-act { background: #0c1420; }
.pe-act button { color: #fff; }
.banner.wa { background: #e5f7ec; color: #11683a; }
.banner.pinask { flex-wrap: nowrap; }
.banner.pinask small { display: block; }
.warow .wth { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--soft); display: grid; place-items: center; flex: none; color: var(--pri); font-size: 12px; }
.warow .wth img { width: 100%; height: 100%; object-fit: cover; }
.warow small { display: block; }
.waprev { margin: 12px 14px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; place-items: center; max-height: 46vh; }
.waprev img { max-width: 100%; max-height: 46vh; object-fit: contain; display: block; }
.watext { white-space: pre-wrap; word-break: break-word; margin: 0; padding: 14px; font: inherit; font-size: 15px; width: 100%; }
.wahow ol { margin: 4px 0 0 18px; padding: 0; } .wahow li { margin: 3px 0; }
.bookph { margin: 12px 14px 0; text-align: center; }
.bookph img { max-width: 100%; max-height: 34vh; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; }
.bkrow .qty { width: 78px; text-align: right; flex: none; }
.selbar { position: sticky; top: 58px; z-index: 15; display: flex; gap: 8px; align-items: center; margin: 8px 14px 0; padding: 8px 10px; border-radius: 12px; background: var(--amber-bg); }
.row-item.selmode .ck2 { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--pri); display: grid; place-items: center; flex: none; color: #fff; }
.row-item.picked { background: color-mix(in srgb, var(--pri) 9%, var(--card)); } .row-item.picked .ck2 { background: var(--pri); }
.seg .segl { flex: 1; display: grid; place-items: center; padding: 8px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
.nb { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-style: normal; }
.abhero { text-align: center; padding: 22px 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.abhero img { border-radius: 16px; box-shadow: var(--shadow); }
.abhero h2 { margin: 8px 0 0; font-size: 24px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.abhero p { margin: 0; color: var(--pri); font-weight: 600; } .abhero small { color: var(--muted); max-width: 420px; }
.abgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 14px 0; }
.abgrid .abf { margin: 0; gap: 4px; padding: 12px; }
.abf .abic { color: var(--pri); } .abf small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.abf .ablock { margin-top: auto; font-size: 11.5px; color: var(--amber); display: flex; gap: 4px; align-items: center; }
.abf .ablock svg { width: 13px; height: 13px; }
.absteps { margin: 0 0 0 18px; padding: 0; } .absteps li { margin: 6px 0; }
.lnk.forgot { margin-top: 10px; background: none; border: 0; color: var(--pri); text-decoration: underline; font-size: 14px; cursor: pointer; }
.banner.notice { background: #e8f1ff; color: var(--pri-d); align-items: flex-start; }
.banner.notice small { display: block; opacity: .75; margin-top: 2px; }
.pe-act .ed-rot, .pe-act .pe-skip { display: inline-flex; border: 0; background: transparent; color: #e6f2f3; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 12px; padding: 4px 8px; }
.pe-act .ed-rot svg, .pe-act .pe-skip svg { width: 26px; height: 26px; }
.rrv { margin: 4px 0 10px; padding: 10px 12px; gap: 8px; }
.rrv summary { cursor: pointer; list-style: revert; } .rrv summary small { color: var(--muted); font-weight: 400; }

/* v1.6.4 spacing polish */
.bookph img { display: block; margin: 0 auto; }
.bookph .hint { display: block; margin-top: 6px; }
.selbar #ocnt { white-space: nowrap; font-weight: 600; text-align: center; }
.selbar .btn.sm { padding: 7px 10px; white-space: nowrap; }
.rrv summary small { display: block; margin: 2px 0 0 18px; }

/* v1.6.5 invite many parties */
.invtabs button { display: inline-flex; gap: 5px; align-items: center; justify-content: center; font-size: 13.5px; }
.invtabs button i { font-style: normal; font-size: 11.5px; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: rgba(0,0,0,.08); }
.invsel { position: static; margin: 0 14px 10px; }
.invtabs button { white-space: nowrap; padding-left: 4px; padding-right: 4px; }
.invrow { gap: 10px; align-items: center; }
.invrow .ck2 { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--pri); display: grid; place-items: center; flex: none; color: #fff; background: transparent; padding: 0; }
.invrow.picked .ck2 { background: var(--pri); }
.invrow .ck2 svg { width: 16px; height: 16px; }
.invph { margin-top: 4px; max-width: 200px; padding: 7px 10px; font-size: 14px; }
.invrow .ib.wa { color: #1aa053; }
.invtabs { margin: 4px 14px 8px; padding: 4px; }
.invfoot { position: sticky; bottom: 0; z-index: 20; padding: 10px 14px max(12px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
#ivl { padding-bottom: 8px; }

/* v1.6.5 party balance */
.entryf .vts { flex-wrap: wrap; }
.entryf .vts button { flex: 1 1 auto; font-size: 13.5px; padding: 8px 6px; }
.entryf .amtf { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.entryf .amtf[hidden] { display: none; }
.badge.vt-sale, .badge.vt-paid { background: #e7f0ff; color: #1d4e89; }
.badge.vt-recd, .badge.vt-purchase { background: #e6f6ec; color: #17693a; }
.balbar { display: flex; align-items: center; gap: 10px; margin: 8px 14px 0; padding: 12px 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.balbar small { display: block; color: var(--muted); font-size: 12.5px; } .balbar b { font-size: 19px; }
.balbar.dr b { color: #1d4e89; } .balbar.cr b { color: #17693a; }
.balbar .lg { display: inline-flex; align-items: center; gap: 4px; color: var(--pri); font-weight: 600; font-size: 14px; } .balbar .lg svg { width: 17px; height: 17px; }
.balcard { margin: 12px 14px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px; }
.balcard small { color: var(--muted); } .balcard b { font-size: 26px; } .balcard span { font-weight: 600; color: var(--muted); }
.balcard.dr b, .balcard.dr span { color: #1d4e89; } .balcard.cr b, .balcard.cr span { color: #17693a; }
.filters.dates { display: flex; gap: 8px; align-items: flex-end; }
.filters.dates label { flex: 1; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); }
.filters.dates input { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; font-size: 14px; color: var(--ink); }
.lgtable { margin: 8px 14px 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.lgr { display: grid; grid-template-columns: 76px 1fr 92px 100px; gap: 6px; padding: 9px 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink); text-decoration: none; align-items: center; }
.lgr span { min-width: 0; overflow-wrap: anywhere; } .lgr small { display: block; color: var(--muted); font-size: 11.5px; }
.lgr .n { text-align: right; font-variant-numeric: tabular-nums; }
.lgh { border-top: 0; background: var(--pri); color: #fff; font-weight: 700; font-size: 12px; }
.lgo, .lgt { background: var(--soft); font-weight: 700; }
@media (max-width: 380px) { .lgr { grid-template-columns: 68px 1fr 84px 92px; font-size: 12px; padding: 8px 7px; gap: 4px; } }
.baltot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 14px 0; }
.baltot button { border: 2px solid transparent; background: var(--card); border-radius: var(--r); padding: 12px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.baltot button small { display: block; color: var(--muted); font-size: 12.5px; } .baltot button b { font-size: 19px; }
.baltot button.on { border-color: var(--pri); }
.baltot button[data-t=dr] b { color: #1d4e89; } .baltot button[data-t=cr] b { color: #17693a; }
.balrow { gap: 10px; align-items: center; } .balrow a { color: inherit; text-decoration: none; min-width: 0; }
.balrow .amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; } .balrow .amt.dr { color: #1d4e89; } .balrow .amt.cr { color: #17693a; }
.balrow .ib.wa, .row-item .ib.wa { color: #1aa053; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin: 10px 14px 2px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--pri-d); text-decoration: none; font-size: 12.5px; font-weight: 600; text-align: center; min-width: 0; }
.tile svg { width: 22px; height: 22px; } .tile small { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tile .rs { font-size: 20px; line-height: 22px; font-weight: 700; }

/* v1.6.5 gallery partner */
.banner.partner { background: #e6f6ec; color: #17693a; width: calc(100% - 28px); border: 0; text-align: left; font: inherit; cursor: pointer; }
.banner.partner small { display: block; opacity: .8; }
.prod .shb { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92); box-shadow: 0 2px 6px rgba(0,0,0,.15); color: var(--pri); }
.prod { position: relative; }
.shprev { text-align: left; white-space: pre-wrap; word-break: break-word; background: var(--soft); border-radius: 12px; padding: 12px; font: inherit; font-size: 14px; max-height: 38vh; overflow: auto; margin: 8px 0; }
.btn.fr { float: right; margin-left: 8px; }
.row-item small.via { color: #17693a; font-weight: 600; }
.check.sw { display: flex; gap: 10px; align-items: center; font-size: 16px; }
.check.sw input { width: 22px; height: 22px; }

/* v1.6.5 features */
.featrow { gap: 12px; align-items: center; }
.featrow .fic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--pri); flex: none; }
.featrow .fic svg { width: 20px; height: 20px; }
.featrow.locked { opacity: .78; } .featrow.locked .fic { color: var(--muted); }
.featrow small.lk { color: #9a6a00; font-weight: 600; display: flex; align-items: center; gap: 4px; } .featrow small.lk svg { width: 13px; height: 13px; }
.tgl { position: relative; width: 46px; height: 26px; flex: none; cursor: pointer; }
.tgl input { opacity: 0; width: 0; height: 0; position: absolute; }
.tgl i { position: absolute; inset: 0; border-radius: 13px; background: #b8c6d8; transition: .2s; }
.tgl i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.tgl input:checked + i { background: var(--pri); } .tgl input:checked + i::after { left: 23px; }
.featlink { margin: 12px 14px 0; gap: 10px; align-items: center; }
.banner.unlock { align-items: center; }
.featrow small, .invrow small, .balrow small { white-space: normal; overflow: visible; text-overflow: clip; }
.banner > span > b + small, .banner span small { display: block; }

/* v1.6.5 day summary */
.daypick { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 12px 14px 4px; }
.daypick input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; color: var(--ink); }
.daypick .flip svg { transform: rotate(180deg); }
.sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 14px 0; }
.stile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stile small { display: block; color: var(--muted); font-size: 12.5px; } .stile b { font-size: 20px; display: block; } .stile b small { font-size: 12.5px; font-weight: 600; }
.stile.vt-sale b, .stile.vt-paid b, .stile.dr b { color: #1d4e89; } .stile.vt-recd b, .stile.vt-purchase b, .stile.cr b { color: #17693a; }
.sw-xl { display: none; }

.search .mic { margin-left: auto; color: var(--pri); flex: none; }
.search .mic.on { background: #e8524a; color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,82,74,.5); } 50% { box-shadow: 0 0 0 8px rgba(232,82,74,0); } }

.banner.scheme { background: linear-gradient(90deg, #fff4d6, #ffe9b3); color: #6b4a00; font-weight: 600; align-items: center; }
.banner.scheme small { display: block; font-weight: 500; opacity: .8; }
.banner.scheme.prev { margin: 8px 0; width: auto; }

/* v1.6.5 rotating pages (Promotions) */
.mixrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .mixrow .fld { font-size: 12px; }
.rotmsgs { margin-top: 10px; } .rotmsgs summary { cursor: pointer; padding: 6px 0; } .rotmsgs summary small { color: var(--muted); font-weight: 400; }
.rotmsgs h4 { margin: 12px 0 4px; color: var(--pri); }
.msgck { align-items: flex-start; gap: 8px; margin: 6px 0; } .msgck small { display: block; color: var(--muted); }

/* v1.6.5 About video */
.abvid { position: relative; margin: 12px 14px 0; border-radius: 16px; overflow: hidden; background: #0d1b36; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.abvid img, .abvid video, .abvid .abvbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.abvid .abvbg { background: radial-gradient(circle at 30% 30%, #2f74c0, #0d1b36); }
.abvid video { object-fit: contain; background: #000; }
.abplay { position: relative; width: 78px; height: 78px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--pri); display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.35); cursor: pointer; }
.abvid small { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; color: #fff; text-shadow: 0 1px 3px #000; font-size: 13px; }

.lgr i { font-style: normal; font-size: 10.5px; font-weight: 700; } .lgr i.dr { color: #1d4e89; } .lgr i.cr { color: #17693a; }
.featrow .grow b, .featrow .grow small, .invrow .grow small, .balrow .grow small, .featlink small { white-space: normal; overflow: visible; text-overflow: clip; }
