/* ============ Sheikh Rehmatullah Scrap Store — Khata ============
   Colours come from the shop logo: safety yellow #FFC107 / #FFE23A / #D98E04,
   black #111, steel #F2F2F2 → #9A9A9A → #4A4A4A.
   Green / red are reserved ONLY for got / gave. */
:root {
  --got: #10A36B; --got-bg: #E3F6EE; --gave: #E4532B; --gave-bg: #FDEBE5; --amber: #E59A00;
  --radius: 16px; --navh: 62px; --maxw: 560px;
  --side: max(0px, calc(50% - var(--maxw) / 2));
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', Arial, sans-serif;
}
/* 1. Logo Classic (default) */
:root, [data-theme="classic"] {
  --bg: #F5F3EC; --surface: #FFFFFF; --surface2: #F8F6EF; --ink: #151515; --muted: #77756F; --line: #E8E4D8;
  --primary: #FFC107; --primary-ink: #111; --primary-2: #FFE23A; --primary-3: #D98E04;
  --bar: linear-gradient(180deg, #FFE23A, #FFC107 60%, #F2B000); --bar-ink: #111; --bar-solid: #FFC107;
  --card-shadow: 0 2px 10px rgba(40, 30, 0, .07), 0 1px 2px rgba(0, 0, 0, .05); --glass: rgba(255, 255, 255, .72);
  --metal: linear-gradient(135deg, #F2F2F2, #9A9A9A 55%, #4A4A4A);
}
/* 2. Logo Dark */
[data-theme="dark"] {
  --bg: #0D0D0F; --surface: #18181B; --surface2: #202024; --ink: #F4F4F5; --muted: #A1A1AA; --line: #2B2B30;
  --primary: #FFC107; --primary-ink: #111; --bar: linear-gradient(180deg, #1B1B1F, #121214); --bar-ink: #FFD54A; --bar-solid: #121214;
  --card-shadow: 0 0 0 1px #26262b, 0 6px 18px rgba(0, 0, 0, .45); --glass: rgba(30, 30, 34, .7);
  --got: #26C485; --got-bg: #0F2A1F; --gave: #FF6B45; --gave-bg: #2E1610;
}
/* 3. Logo Gold / Metallic */
[data-theme="gold"] {
  --bg: linear-gradient(160deg, #EDEDED, #D5D5D5); --surface: #FAFAFA; --surface2: #F0EFEA; --ink: #1A1A1A; --muted: #6B6B6B; --line: #D9D6CC;
  --primary: #E0A800; --primary-ink: #111; --bar: linear-gradient(135deg, #3A3A3A, #9A9A9A 35%, #F2F2F2 50%, #8A8A8A 65%, #2E2E2E); --bar-ink: #FFE23A; --bar-solid: #4A4A4A;
  --card-shadow: 0 2px 0 #fff inset, 0 8px 20px rgba(0, 0, 0, .12); --glass: rgba(255, 255, 255, .6);
}
/* 4. Logo Soft */
[data-theme="soft"] {
  --bg: #FFFBEF; --surface: #FFFFFF; --surface2: #FFF6DC; --ink: #2B2A27; --muted: #8A857A; --line: #F1E8CF;
  --primary: #FFD45C; --primary-ink: #3A2E00; --bar: linear-gradient(180deg, #FFF3C9, #FFE7A0); --bar-ink: #3A2E00; --bar-solid: #FFE7A0;
  --card-shadow: 0 4px 14px rgba(160, 120, 0, .08); --got: #2E9E72; --gave: #E06A4A;
}
/* 5. High Contrast (sunlight) */
[data-theme="contrast"] {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface2: #FFFFFF; --ink: #000; --muted: #222; --line: #000;
  --primary: #FFC400; --primary-ink: #000; --bar: #000; --bar-ink: #FFD000; --bar-solid: #000;
  --card-shadow: 0 0 0 2px #000; --got: #006B3C; --gave: #C21800; --got-bg: #D5F5E3; --gave-bg: #FFE0D9;
}
[data-theme="contrast"] body { font-weight: 600; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); background-attachment: fixed; color: var(--ink); font-size: 1rem; overscroll-behavior: none; }
html[lang="ur"] body, .ur { font-family: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', 'Jameel Noori Nastaleeq', var(--font); }
html[lang="ur"] body { line-height: 1.9; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
.ic { width: 22px; height: 22px; flex: none; }
.ic.big { width: 30px; height: 30px; } .ic.tiny, .ic.wa.tiny { width: 15px; height: 15px; vertical-align: -3px; }
.amt, .big-num, .led-col, .tbl td, .cnt { font-variant-numeric: tabular-nums; }
.amt { white-space: nowrap; }
.pos { color: var(--got); } .neg { color: var(--gave); } .zero { color: var(--muted); }
.got { color: var(--got); } .gave { color: var(--gave); }
.muted { color: var(--muted); } .small { font-size: .84rem; } .tiny { font-size: .72rem; }
.flex1 { flex: 1; } .flex2 { flex: 2; } .min0 { min-width: 0; } .w100 { width: 100%; }
.row { display: flex; } .gap { gap: 10px; } .gap-s { gap: 4px; } .center-y { align-items: center; } .between { justify-content: space-between; align-items: center; }
.center { text-align: center; } .right { text-align: right; } .left { text-align: left; }
.pad { padding: 16px; } .pad-x { padding: 0 16px; } .mt { margin-top: 14px; } .mt-s { margin-top: 8px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.link { color: var(--primary-3, #B57A00); font-weight: 600; } [data-theme="dark"] .link { color: var(--primary); }
.warn { color: #9A5B00; background: #FFF4D6; border-radius: 10px; padding: 8px 10px; } [data-theme="dark"] .warn { background: #2D2410; color: #FFD27A; }
.ok-text { color: var(--got); } .danger-text { color: var(--gave) !important; } .amber-text { color: var(--amber); }
.tag { font-size: .68rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--surface2); color: var(--muted); vertical-align: 2px; border: 1px solid var(--line); }
.tag.red { background: var(--gave-bg); color: var(--gave); border-color: transparent; } .tag.amber { background: #FFF1CC; color: #9A6500; border-color: transparent; }
html.privacy .amt { letter-spacing: 2px; }

/* ---------- page stack ---------- */
#pages { position: relative; }
.page { position: fixed; top: 0; bottom: 0; left: var(--side); right: var(--side); overflow-y: auto; overflow-x: hidden; background: var(--bg); -webkit-overflow-scrolling: touch; padding-bottom: 20px; }
body.has-nav .page { bottom: var(--navh); }
.page.enter { transform: translateX(40px) scale(.98); opacity: 0; }
[data-anim="full"] .page.enter { transform: perspective(900px) rotateY(-14deg) translateX(60px); transform-origin: left center; }
.page { transition: transform .26s cubic-bezier(.2, .8, .2, 1), opacity .22s; }
.page.leave { transform: translateX(50px); opacity: 0; }
.page.under { visibility: hidden; transition: visibility 0s .26s; }
[data-anim="off"] .page, [data-anim="off"] * { transition: none !important; animation: none !important; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; padding: 10px 8px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--bar); color: var(--bar-ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.topbar .title { font-weight: 800; font-size: 1.12rem; letter-spacing: .2px; }
.topbar .title.plain { text-align: left; }
.topbar.dir-out { background: linear-gradient(180deg, #F0643C, var(--gave)); color: #fff; } .topbar.dir-in { background: linear-gradient(180deg, #1FBF80, var(--got)); color: #fff; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; flex: none; position: relative; }
.icon-btn:active { background: rgba(0, 0, 0, .08); transform: scale(.94); }
.icon-btn:disabled { opacity: .3; }
.icon-btn.boxed { background: var(--surface); box-shadow: var(--card-shadow); color: var(--ink); }
.icon-btn.dot::after { content: ''; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--gave); }
.icon-btn.accent { color: inherit; }

/* ---------- home ---------- */
.sum-cards { display: flex; gap: 12px; padding: 14px 16px 8px; }
.sum-card { flex: 1; display: flex; align-items: center; gap: 8px; padding: 12px 10px; text-align: start !important; border-radius: var(--radius); background: var(--surface); box-shadow: var(--card-shadow); text-align: left; min-width: 0; transition: transform .15s; }
.sum-card:active { transform: scale(.97); }
.sum-card small { display: block; color: var(--muted); font-size: .78rem; } .sum-card > span:last-child { min-width: 0; } .sum-card b { display: block; font-size: clamp(.86rem, 4.1vw, 1.12rem); white-space: nowrap; }
.sum-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.sum-card.get .sum-ic { background: var(--got); } .sum-card.give .sum-ic { background: var(--gave); }
.sum-card.get b { color: var(--got); } .sum-card.give b { color: var(--gave); }
.sum-card.get.on { background: var(--got); } .sum-card.give.on { background: var(--gave); }
.sum-card.on small, .sum-card.on b { color: #fff; } .sum-card.on .sum-ic { background: rgba(255, 255, 255, .25); }
.tabs { display: flex; margin-top: 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tab { flex: 1; padding: 13px 4px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; }
.tab.on { color: var(--ink); border-color: var(--primary); } .tab small { font-weight: 500; }
.searchbar { display: flex; gap: 8px; padding: 12px 16px 6px; align-items: center; }
.search { min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 24px; padding: 0 14px; height: 46px; box-shadow: var(--card-shadow); color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: none; height: 100%; color: var(--ink); min-width: 0; }
.party-list { padding: 4px 0; }
.party-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.party-row:active { background: var(--surface2); }
.avatar { border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; flex: none; object-fit: cover; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.pname { unicode-bidi: plaintext; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.psub { font-size: .76rem; color: var(--muted); margin-top: 2px; }
.pbal { text-align: right; } .big-num { font-weight: 800; font-size: 1.08rem; }
.remind { color: var(--muted); background: var(--surface2); border-radius: 50%; width: 38px; height: 38px; }
.remind.on { color: #fff; background: var(--primary); color: var(--primary-ink); }

/* floating actions (vCredit style) */
.fab-space { height: 90px; }
.fab-row { position: fixed; left: var(--side); right: var(--side); bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 12px; padding: 0 16px; z-index: 15; pointer-events: none; }
body.has-nav .fab-row { bottom: calc(var(--navh) + 10px); }
.fab { pointer-events: auto; flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border-radius: 30px; color: #fff; font-weight: 800; font-size: 1rem; line-height: 1.1;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .18), 0 10px 20px rgba(0, 0, 0, .18); transition: transform .1s, box-shadow .1s; }
.fab:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .18), 0 4px 10px rgba(0, 0, 0, .15); }
.fab.got { background: linear-gradient(180deg, #22C487, var(--got)); } .fab.gave { background: linear-gradient(180deg, #F46B44, var(--gave)); }
.fab .ic { background: rgba(255, 255, 255, .25); border-radius: 50%; padding: 4px; width: 30px; height: 30px; }

/* bottom nav */
#nav { position: fixed; bottom: 0; left: var(--side); right: var(--side); height: calc(var(--navh) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: flex; background: var(--surface); border-top: 1px solid var(--line); z-index: 30; box-shadow: 0 -4px 14px rgba(0, 0, 0, .06); }
#nav.hide { display: none; }
#nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .72rem; font-weight: 700; color: var(--muted); position: relative; }
#nav button.on { color: var(--ink); } #nav button.on .ic { background: var(--primary); color: var(--primary-ink); border-radius: 12px; padding: 3px 14px; width: 52px; height: 30px; }

/* ---------- ledger ---------- */
.led-card { margin: 12px 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 14px; }
.bal-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.bal-ic.pos { background: var(--got); } .bal-ic.neg { background: var(--gave); } .bal-ic.zero { background: var(--muted); }
.led-bal { font-size: 1.7rem; font-weight: 900; line-height: 1.15; }
.led-actions { display: flex; justify-content: space-between; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.led-actions button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .72rem; color: var(--muted); flex: 1; padding: 4px 0; border-radius: 10px; }
.led-actions button:active { background: var(--surface2); } .led-actions button:disabled { opacity: .35; }
.led-actions .ic { color: var(--ink); }
.due-line { margin-top: 10px; width: 100%; text-align: left; font-size: .85rem; color: var(--muted); display: flex; gap: 6px; align-items: center; background: var(--surface2); padding: 8px 10px; border-radius: 10px; }
.due-line .ic { width: 18px; height: 18px; }
.led-head { display: flex; padding: 8px 16px; font-size: .8rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--line); background: var(--surface); }
.led-head .led-col.gave { border-bottom: 3px solid var(--gave); color: var(--gave); } .led-head .led-col.got { border-bottom: 3px solid var(--got); color: var(--got); }
.led-col { width: 92px; text-align: end; font-weight: 800; flex: none; font-size: .98rem; }
.led-col small { display: block; font-size: .64rem; color: var(--muted); font-weight: 500; }
.led-row { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.led-row:active { background: var(--surface2); }
.led-row.opening { background: var(--surface2); cursor: default; }
.led-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.led-ic .ic { width: 18px; height: 18px; }
.led-ic.gave { background: var(--gave-bg); color: var(--gave); } .led-ic.got { background: var(--got-bg); color: var(--got); }
.led-type { font-weight: 650; font-size: .95rem; } .led-note { font-size: .8rem; color: var(--ink); opacity: .75; } .led-sub { font-size: .72rem; color: var(--muted); margin-top: 1px; }
.date-sep { padding: 6px 16px; font-size: .74rem; font-weight: 800; color: var(--muted); background: var(--bg); text-transform: uppercase; letter-spacing: .4px; }
.led-summary { padding: 10px 16px; text-align: center; }

/* ---------- forms ---------- */
.form .fld, .fld { display: block; margin-top: 12px; } .fld > span, .label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.inp { width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 12px; outline: none; transition: border-color .15s; }
textarea.inp { height: auto; padding: 10px 12px; resize: vertical; }
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.inp.sm { height: 40px; width: auto; min-width: 0; font-size: .9rem; }
.btn { height: 46px; padding: 0 16px; border-radius: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); box-shadow: var(--card-shadow), 0 3px 0 rgba(0, 0, 0, .08); transition: transform .08s, box-shadow .08s; cursor: pointer; }
.btn:active { transform: translateY(2px); box-shadow: var(--card-shadow); }
.btn.primary { background: linear-gradient(180deg, var(--primary-2, var(--primary)), var(--primary)); color: var(--primary-ink); box-shadow: 0 3px 0 var(--primary-3, rgba(0, 0, 0, .25)), 0 6px 14px rgba(0, 0, 0, .12); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { background: var(--gave); color: #fff; } .btn.gave { background: linear-gradient(180deg, #F46B44, var(--gave)); color: #fff; } .btn.got { background: linear-gradient(180deg, #22C487, var(--got)); color: #fff; }
.btn.wa { background: #25D366; color: #fff; } .btn.big { height: 56px; font-size: 1.05rem; border-radius: 16px; } .btn.sm { height: 34px; padding: 0 10px; font-size: .82rem; }
.btn:disabled { opacity: .6; }
.btn.rec { background: var(--gave); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.seg { display: flex; background: var(--surface2); border-radius: 12px; padding: 4px; gap: 4px; border: 1px solid var(--line); }
.seg button { flex: 1; height: 40px; border-radius: 9px; font-weight: 700; color: var(--muted); font-size: .9rem; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg.sm button { height: 32px; font-size: .78rem; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--card-shadow); }
.seg.dir button.on.gave { background: var(--gave); color: #fff; } .seg.dir button.on.got { background: var(--got); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; } .chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { padding: 8px 12px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); font-size: .84rem; font-weight: 600; white-space: nowrap; }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip button { margin-left: 4px; opacity: .7; }
.switch { appearance: none; width: 48px; height: 28px; border-radius: 20px; background: var(--line); position: relative; transition: .2s; flex: none; cursor: pointer; }
.switch::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch:checked { background: var(--got); } .switch:checked::after { left: 23px; }
.sticky-bottom { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; margin-top: 10px; }
.photo-pick { width: 92px; height: 92px; border-radius: 50%; background: var(--surface2); display: inline-grid; place-items: center; position: relative; overflow: visible; cursor: pointer; box-shadow: var(--card-shadow); color: var(--muted); }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.logo-pick, .logo-pick img { border-radius: 18px; width: 140px; height: 112px; object-fit: contain; background: #fff; }
.photo-pick .cam { position: absolute; right: -2px; bottom: -2px; background: var(--primary); color: var(--primary-ink); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.photo-pick .cam .ic { width: 16px; height: 16px; }

/* ---------- entry ---------- */
.entry { padding-top: 12px; }
.party-chip { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: var(--card-shadow); margin-top: 12px; text-transform: capitalize; }
.suggest { background: var(--surface); border-radius: 12px; box-shadow: var(--card-shadow); overflow: hidden; margin-top: 6px; }
.suggest:empty { display: none; }
.sug { display: flex; align-items: center; gap: 10px; padding: 10px 12px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); text-transform: capitalize; }
.sug.add { color: var(--primary-3, #B57A00); font-weight: 600; text-transform: none; } [data-theme="dark"] .sug.add { color: var(--primary); }
.suggest .small { padding: 10px 12px; }
.amt-box { margin-top: 14px; background: var(--surface); border-radius: 18px; padding: 12px 16px; box-shadow: var(--card-shadow); border: 2px solid transparent; cursor: text; }
.amt-box.bad { border-color: var(--gave); }
.amt-label { font-size: .76rem; color: var(--muted); font-weight: 700; }
.amt-expr { font-size: 1rem; color: var(--muted); min-height: 1.3em; word-break: break-all; }
.amt-res { font-size: 2.1rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 10px; transition: max-height .25s, opacity .2s; max-height: 340px; overflow: hidden; }
.keypad.min { max-height: 0; opacity: 0; margin: 0; }
.keypad button { height: 50px; border-radius: 12px; background: var(--surface); font-size: 1.3rem; font-weight: 700; box-shadow: 0 3px 0 var(--line); }
.keypad button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.keypad .op { background: var(--surface2); color: var(--primary-3, #B57A00); } [data-theme="dark"] .keypad .op { color: var(--primary); }
.keypad .ok { background: var(--primary); color: var(--primary-ink); } .keypad .clr { color: var(--gave); }
.save-bar { position: fixed; left: var(--side); right: var(--side); bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); z-index: 15; }
.card-in { background: var(--surface); border-radius: 14px; padding: 12px; box-shadow: var(--card-shadow); margin-top: 12px; }
.item-row { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 10px; }
.mini span { display: block; font-size: .7rem; color: var(--muted); margin-bottom: 2px; } .mini .inp { height: 42px; }
.att-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att-row img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }
.att-row audio { height: 40px; max-width: 100%; }
.thumb { position: relative; } .thumb-x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--gave); color: #fff; display: grid; place-items: center; }
.thumb-x .ic { width: 14px; height: 14px; }
.att-btns .btn { height: 42px; font-size: .88rem; }

/* ---------- sheets ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s; }
.sheet { position: absolute; left: var(--side); right: var(--side); bottom: 0; background: var(--surface); border-radius: 22px 22px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.sheet-wrap.open .sheet-bg { opacity: 1; } .sheet-wrap.open .sheet { transform: none; }
.sheet-handle { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet-title { font-weight: 800; font-size: 1.1rem; margin-bottom: 12px; text-align: center; }
.dlg-msg { font-size: 1.05rem; font-weight: 600; }
.list { display: flex; flex-direction: column; } .list-item { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.share-row { display: flex; justify-content: space-around; margin-top: 16px; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; padding: 6px 14px; border-radius: 14px; }
.share-btn:active { background: var(--surface2); }
.share-btn .ic.big { width: 46px; height: 46px; } .sms-ic { color: #fff; background: #1BA39C; border-radius: 12px; padding: 8px; } .share-btn .ic.more { color: #2F80ED; }
.saved-pill { background: #2B2B2B; color: #fff; border-radius: 10px; padding: 8px 12px; text-align: center; font-size: .88rem; margin-bottom: 10px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.saved-pill .ic { width: 16px; height: 16px; color: #4ADE80; }
.tpl-pick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.msg-preview { font-size: .9rem; line-height: 1.45; margin-top: 8px; }
.pin-dots { display: flex; gap: 16px; justify-content: center; margin: 10px 0 18px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); }
.pin-dots i.on { background: var(--ink); } .pin-dots.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.pin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 300px; margin: 0 auto; }
.pin-key { height: 64px; border-radius: 50%; font-size: 1.6rem; font-weight: 700; background: var(--surface2); box-shadow: 0 3px 0 var(--line); display: grid; place-items: center; }
.pin-key:active { transform: translateY(2px); } .pin-key:disabled { visibility: hidden; }
.det-amt { font-size: 2rem; font-weight: 900; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; }
.det-grid { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; margin-top: 14px; font-size: .92rem; }
.det-grid > span { color: var(--muted); } .det-grid > b { text-align: right; word-break: break-word; }
.det-actions { display: flex; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.det-actions button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; padding: 6px; border-radius: 10px; }
.det-actions button:active { background: var(--surface2); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; } .progress div { height: 100%; background: var(--got); transition: width .3s; }
.big-check { width: 70px; height: 70px; border-radius: 50%; background: var(--got); color: #fff; display: grid; place-items: center; margin: 0 auto; }
.big-check .ic { width: 40px; height: 40px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 110px; transform: translate(-50%, 20px); background: #232323; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 300; max-width: 88vw; text-align: center; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.err { background: var(--gave); } .toast.ok { background: #1D1D1D; border-left: 4px solid var(--got); }

/* ---------- drawer ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 90; }
.drawer-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: .25s; }
.drawer { position: absolute; top: 0; bottom: 0; left: var(--side); width: min(82vw, 330px); background: var(--surface); transform: translateX(-105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; overflow-y: auto; }
.drawer-wrap.open .drawer { transform: none; } .drawer-wrap.open .drawer-bg { opacity: 1; }
.drawer-head { background: var(--bar); color: var(--bar-ink); padding: 22px 16px 16px; padding-top: calc(22px + env(safe-area-inset-top)); display: flex; gap: 12px; align-items: center; }
.drawer-head small { display: block; opacity: .85; font-size: .78rem; } .drawer-head b { font-size: 1.02rem; }
.drawer-logo { width: 64px; height: 52px; object-fit: contain; background: #fff; border-radius: 12px; padding: 3px; flex: none; }
.phone-line { display: flex !important; align-items: center; gap: 4px; }
.drawer-item { display: flex; gap: 14px; align-items: center; padding: 14px 18px; width: 100%; text-align: left; font-weight: 600; }
.drawer-item:active { background: var(--surface2); } .drawer-foot { padding: 14px 18px; margin-top: auto; }

/* ---------- cash book ---------- */
.date-nav { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 0; }
.date-pick { position: relative; display: flex; gap: 6px; align-items: center; background: var(--surface); padding: 9px 14px; border-radius: 12px; box-shadow: var(--card-shadow); font-size: .95rem; }
.date-pick input { position: absolute; inset: 0; opacity: 0; width: 100%; }
.cb-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px; }
.cb-card { background: var(--surface); border-radius: 14px; padding: 12px; box-shadow: var(--card-shadow); }
.cb-card small { display: block; color: var(--muted); font-size: .74rem; font-weight: 600; } .cb-card b { font-size: 1.15rem; }
.cb-card.got b { color: var(--got); } .cb-card.gave b { color: var(--gave); }
.cb-card.main { background: linear-gradient(135deg, #1b1b1b, #3a3a3a); color: #fff; } .cb-card.main small { color: #FFE082; } .cb-card.main b { color: var(--primary); }
.table-wrap { overflow-x: auto; margin: 8px 12px; border-radius: 14px; box-shadow: var(--card-shadow); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tbl th { text-align: left; padding: 10px 8px; background: var(--surface2); font-size: .74rem; color: var(--muted); position: sticky; top: 0; white-space: nowrap; }
.tbl td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr[data-day], .tbl tr[data-id], .tbl tr[data-tx] { cursor: pointer; }
.tbl tr.total td { font-weight: 800; background: var(--surface2); }
.tbl th.got, .tbl td.got { color: var(--got); text-align: right; } .tbl th.gave, .tbl td.gave { color: var(--gave); text-align: right; }

/* ---------- dashboard (3D) ---------- */
.dash { position: relative; padding-bottom: 20px; }
.emblem-bg { position: absolute; top: 20px; left: 50%; width: 300px; height: 240px; margin-left: -150px; opacity: .07; pointer-events: none; perspective: 600px; z-index: 0; }
.emblem-bg img { width: 100%; height: 100%; object-fit: contain; animation: emblem 18s linear infinite; }
@keyframes emblem { to { transform: rotateY(360deg); } }
.d3-stage { position: relative; z-index: 1; }
.d3-stage.ring { height: 210px; perspective: 1000px; margin-top: 18px; touch-action: pan-y; --r: 250px; }
.d3-ring { position: absolute; left: 50%; top: 14px; width: 200px; height: 150px; margin-left: -100px; transform-style: preserve-3d; }
.d3-stage.ring .d3-card { position: absolute; inset: 0; transform: rotateY(calc(360deg / var(--n) * var(--i))) translateZ(var(--r)); backface-visibility: hidden; }
.d3-stage.flat .d3-ring { position: static; margin: 14px 0 0; width: auto; height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; transform: none !important; }
.d3-card { border-radius: 20px; padding: 16px; color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 120px; cursor: pointer; user-select: none;
  background: linear-gradient(145deg, #2a2a2a, #111); box-shadow: 0 14px 30px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .25); border: 1px solid rgba(255, 255, 255, .12); }
.d3-card.got { background: linear-gradient(145deg, #2FD496, #0B8A57); } .d3-card.gave { background: linear-gradient(145deg, #FF8A5C, #C63D17); }
.d3-card.gold { background: linear-gradient(145deg, #FFE23A, #FFC107 45%, #D98E04); color: #111; }
.d3-card small { font-weight: 700; opacity: .9; font-size: .8rem; } .d3-card b { font-size: clamp(1rem, 5.4vw, 1.55rem); font-weight: 900; line-height: 1.1; white-space: nowrap; }
.d3-stage.flat .d3-card b { font-size: clamp(.95rem, 4.6vw, 1.4rem); } .d3-card em { font-style: normal; font-size: .72rem; opacity: .8; }
.d3-ic { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; }
.d3-shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 45%, transparent 60%); transform: translateX(-100%); animation: shine 5s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 60%, 100% { transform: translateX(120%); } }
[data-anim="light"] .d3-shine { display: none; }
.d3-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; position: relative; z-index: 1; }
.d3-dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--line); transition: .3s; cursor: pointer; } .d3-dots i.on { width: 20px; background: var(--primary); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px; position: relative; z-index: 1; }
.q { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--surface); font-size: .74rem; font-weight: 700; box-shadow: 0 5px 0 var(--line), var(--card-shadow); transition: transform .08s, box-shadow .08s; }
.q:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.q .ic { width: 38px; height: 38px; padding: 8px; border-radius: 12px; color: #fff; }
.q.gave .ic { background: var(--gave); } .q.got .ic { background: var(--got); }
.panel { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin: 10px 16px; border-radius: var(--radius); padding: 14px; box-shadow: var(--card-shadow); position: relative; z-index: 1; }
.panel.m { margin: 10px 12px; }
.panel-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: .92rem; }
.panel-h b { display: flex; align-items: center; gap: 6px; } .panel-h .ic { width: 18px; height: 18px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; text-transform: capitalize; }
.bars3d { display: flex; align-items: flex-end; height: 140px; gap: 6px; padding: 6px 0; perspective: 400px; }
.bar-day { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-pair { flex: 1; display: flex; align-items: flex-end; gap: 3px; width: 100%; justify-content: center; transform: rotateX(8deg); transform-style: preserve-3d; }
.bar-pair .b { width: 40%; max-width: 16px; height: var(--h); min-height: 2px; border-radius: 4px 4px 0 0; position: relative; animation: rise .9s cubic-bezier(.2, .9, .3, 1.2) both; transform-origin: bottom; }
.bar-pair .b.got { background: linear-gradient(90deg, #0E8D5C, #2FD496 60%, #19A86F); } .bar-pair .b.gave { background: linear-gradient(90deg, #B8381A, #FF8A5C 60%, #DE5530); }
.bar-pair .b::after { content: ''; position: absolute; top: -4px; left: 0; right: 0; height: 4px; border-radius: 4px 4px 0 0; background: rgba(255, 255, 255, .5); transform: skewX(-30deg); }
@keyframes rise { from { transform: scaleY(0); } }
.bar-day small { font-size: .66rem; color: var(--muted); margin-top: 4px; }
.legend { display: flex; gap: 14px; justify-content: center; } .spark { width: 100%; height: 80px; }

/* calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; padding: 10px 12px; }
.cal-h { text-align: center; font-size: .72rem; color: var(--muted); font-weight: 700; }
.cal-cell { aspect-ratio: 1; border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .9rem; box-shadow: var(--card-shadow); }
.cal-cell.empty { background: none; box-shadow: none; } .cal-cell.today { outline: 2px solid var(--primary); }
.cal-cell.has { background: #FFF3CC; } .cal-cell.over { background: var(--gave-bg); color: var(--gave); }
.cal-cell small { font-size: .62rem; background: var(--ink); color: var(--surface); border-radius: 8px; padding: 0 5px; }

/* ---------- reports ---------- */
.rep-list { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.rep-item { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface); border-radius: 14px; box-shadow: var(--card-shadow); text-align: left; }
.rep-item small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.rep-item.total { background: var(--surface2); }
.rep-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; flex: none; }
.chev { color: var(--muted); }
.range { padding: 10px 16px 0; }
.stmt-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px; }
.stmt-sum div { background: var(--surface); border-radius: 12px; padding: 8px; text-align: center; box-shadow: var(--card-shadow); min-width: 0; }
.stmt-sum small { display: block; font-size: .66rem; color: var(--muted); } .stmt-sum b { font-size: .86rem; word-break: break-all; }
.stmt-sum .got b { color: var(--got); } .stmt-sum .gave b { color: var(--gave); }
.exp-row { margin-bottom: 12px; } .exp-bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; margin-top: 4px; } .exp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--gave)); border-radius: 5px; }
.total-line { border-top: 2px solid var(--line); padding-top: 10px; margin-top: 10px; }
.profit-card { background: var(--surface); border-radius: 16px; padding: 16px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 10px; }
.big-line { border-top: 2px dashed var(--line); padding-top: 10px; font-size: 1.25rem; }

/* ---------- settings ---------- */
.set-list { padding-bottom: 30px; }
.set-h { font-size: .74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 18px 16px 6px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: var(--surface); border-bottom: 1px solid var(--line); width: 100%; text-align: left; cursor: pointer; }
.set-row small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.set-row .inp.sm { max-width: 55%; }
.set-card { background: var(--surface); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mode-row { padding: 6px 0; border-bottom: 1px dashed var(--line); } .mode-row:last-of-type { border: 0; }
.lang-tag { font-size: .7rem; font-weight: 800; background: var(--surface2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; min-width: 36px; text-align: center; }
.msg-bubble { background: #DCF8C6; color: #111; border-radius: 12px 12px 12px 2px; padding: 10px 12px; white-space: pre-wrap; font-size: .9rem; box-shadow: var(--card-shadow); }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.theme-card { border-radius: 14px; padding: 12px; text-align: left; border: 2px solid var(--line); background: var(--surface); }
.theme-card.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent); }
.theme-card b { display: block; font-size: .86rem; margin-top: 6px; } .theme-card small { color: var(--muted); font-size: .7rem; }
.theme-card .sw { display: flex; gap: 4px; } .theme-card .sw i { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .15); }
.th-classic .sw i:nth-child(1) { background: #FFC107; } .th-classic .sw i:nth-child(2) { background: #111; } .th-classic .sw i:nth-child(3) { background: #F5F3EC; }
.th-dark .sw i:nth-child(1) { background: #111; } .th-dark .sw i:nth-child(2) { background: #FFC107; box-shadow: 0 0 8px #FFC107; } .th-dark .sw i:nth-child(3) { background: #27272A; }
.th-gold .sw i:nth-child(1) { background: linear-gradient(135deg, #FFE23A, #D98E04); } .th-gold .sw i:nth-child(2) { background: linear-gradient(135deg, #F2F2F2, #4A4A4A); } .th-gold .sw i:nth-child(3) { background: #333; }
.th-soft .sw i:nth-child(1) { background: #FFE7A0; } .th-soft .sw i:nth-child(2) { background: #FFFBEF; } .th-soft .sw i:nth-child(3) { background: #F1E8CF; }
.th-contrast .sw i:nth-child(1) { background: #000; } .th-contrast .sw i:nth-child(2) { background: #FFD000; } .th-contrast .sw i:nth-child(3) { background: #fff; }
.order-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.grip { color: var(--muted); cursor: grab; padding: 0 6px; font-weight: 900; touch-action: none; }
.verify-badge { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; margin: 10px auto; color: #fff; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.verify-badge .ic { width: 54px; height: 54px; } .verify-badge.ok { background: var(--got); box-shadow: 0 0 0 10px var(--got-bg); } .verify-badge.bad { background: var(--gave); box-shadow: 0 0 0 10px var(--gave-bg); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.problems { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.log-row { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.log-act { font-size: .66rem; font-weight: 800; text-transform: uppercase; padding: 3px 6px; border-radius: 6px; background: var(--surface2); height: fit-content; min-width: 52px; text-align: center; }
.log-act.create, .log-act.restore { background: var(--got-bg); color: var(--got); } .log-act.delete, .log-act.purge { background: var(--gave-bg); color: var(--gave); } .log-act.edit { background: #FFF1CC; color: #8A5A00; }
.bin-row { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.bk-status { display: flex; gap: 12px; align-items: center; margin: 14px 16px 0; padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--card-shadow); }
.bk-status small { display: block; color: var(--muted); }
.bk-banner { position: fixed; left: calc(var(--side) + 10px); right: calc(var(--side) + 10px); top: calc(70px + env(safe-area-inset-top)); z-index: 60; background: #1d1d1d; color: #fff; border-radius: 14px; padding: 10px 10px 10px 14px; display: flex; align-items: center; gap: 10px; font-size: .84rem; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); animation: drop .4s; }
.bk-banner .ic { color: var(--primary); } @keyframes drop { from { transform: translateY(-30px); opacity: 0; } }
.ob-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 58px; gap: 6px; margin-top: 6px; } .ob-row .inp { height: 42px; padding: 0 8px; font-size: .88rem; }
.dirbtn { border-radius: 10px; font-weight: 800; font-size: .78rem; color: #fff; } .dirbtn.get { background: var(--got); } .dirbtn.give { background: var(--gave); }
.qr-row { display: flex; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); } .qr-row .inp { width: 84px; }
.hist { max-height: 160px; overflow-y: auto; background: var(--surface2); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.help details { background: var(--surface); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--card-shadow); }
.help summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; } .help p { margin: 8px 0 0; line-height: 1.5; }
.about-logo { width: 220px; max-width: 70%; border-radius: 18px; background: #fff; padding: 8px; box-shadow: var(--card-shadow); cursor: pointer; user-select: none; }
.phones { display: flex; flex-direction: column; gap: 8px; align-items: center; margin-top: 10px; }
.phone-pill { display: flex; gap: 10px; align-items: center; background: var(--surface); border-radius: 30px; padding: 6px 8px 6px 14px; box-shadow: var(--card-shadow); }
.phone-pill a { color: inherit; text-decoration: none; font-weight: 700; display: flex; } .phone-pill .ic.wa { width: 30px; height: 30px; }
.dev-credit { margin-top: 40px; font-size: .7rem; color: var(--muted); opacity: .75; }

/* empty state 3D cube */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-3d { height: 80px; perspective: 400px; display: grid; place-items: center; margin-bottom: 10px; }
.cube { width: 46px; height: 46px; position: relative; transform-style: preserve-3d; animation: cube 6s linear infinite; }
.cube i { position: absolute; inset: 0; border: 2px solid #111; background: linear-gradient(135deg, #FFE23A, #FFC107); opacity: .9; }
.cube i:nth-child(1) { transform: translateZ(23px); } .cube i:nth-child(2) { transform: rotateY(180deg) translateZ(23px); } .cube i:nth-child(3) { transform: rotateY(90deg) translateZ(23px); background: #bbb; }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(23px); background: #bbb; } .cube i:nth-child(5) { transform: rotateX(90deg) translateZ(23px); background: #777; } .cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(23px); }
@keyframes cube { to { transform: rotateX(360deg) rotateY(720deg); } }

/* coin fly after save */
.coin-fly { position: fixed; left: 50%; bottom: 120px; z-index: 400; width: 54px; height: 54px; margin-left: -27px; perspective: 300px; pointer-events: none; animation: coinUp 1.05s cubic-bezier(.3, .7, .3, 1) forwards; }
.coin-fly i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; font-style: normal; font-weight: 900; font-size: 1.3rem; color: #6b4a00; background: radial-gradient(circle at 35% 30%, #FFF2A8, #FFC107 55%, #C98300); border: 3px solid #A86E00; animation: coinSpin .5s linear infinite; }
.coin-fly.gave i { filter: hue-rotate(-25deg) saturate(1.4); }
@keyframes coinUp { 0% { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: 1; transform: translateY(-40px) scale(1.1); } 100% { transform: translateY(-60vh) scale(.4); opacity: 0; } }
@keyframes coinSpin { to { transform: rotateY(360deg); } }

/* lock screen */
.lock-screen { position: fixed; inset: 0; z-index: 500; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; transition: opacity .3s, transform .3s; }
.lock-screen.out { opacity: 0; transform: scale(1.08); }
.lock-screen h3 { margin: 10px 0 0; } .lock-logo { width: 150px; background: #fff; border-radius: 16px; padding: 6px; box-shadow: var(--card-shadow); }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 1000; background: radial-gradient(ellipse at 50% 35%, #3A3A3A, #151515 55%, #050505); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; transition: opacity .6s, transform .6s; }
.splash.zoom { opacity: 0; transform: scale(2.2); }
.splash canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sp-center { position: relative; width: 230px; height: 230px; display: grid; place-items: center; perspective: 900px; }
.sp-coin { width: 170px; height: 170px; position: relative; transform-style: preserve-3d; animation: coinIn 2.2s cubic-bezier(.3, .8, .25, 1) both; }
@keyframes coinIn { 0% { transform: rotateY(-540deg) scale(.2); } 70% { transform: rotateY(-20deg) scale(1.04); } 100% { transform: rotateY(0) scale(1); } }
.sp-face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #FFFFFF, #E6E6E6 40%, #A8A8A8 75%, #5A5A5A); border: 6px solid #FFC107; box-shadow: inset 0 0 0 3px #111, inset 0 -10px 20px rgba(0, 0, 0, .35), 0 0 40px rgba(255, 193, 7, .35); }
.sp-face img { width: 86%; transform: translateY(2%); }
.sp-face.front { transform: translateZ(7px); } .sp-face.back { transform: rotateY(180deg) translateZ(7px); background: radial-gradient(circle at 35% 30%, #FFE23A, #FFC107 50%, #B57A00); }
.sp-face.back b { font-family: Impact, 'Arial Black', sans-serif; font-size: 3rem; color: #111; letter-spacing: 3px; }
.sp-edge { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(90deg, #8a6100, #FFC107, #8a6100); }
.sp-edge:nth-child(2) { transform: translateZ(5px); } .sp-edge:nth-child(3) { transform: translateZ(3px); } .sp-edge:nth-child(4) { transform: translateZ(1px); } .sp-edge:nth-child(5) { transform: translateZ(-1px); }
.sp-edge:nth-child(6) { transform: translateZ(-3px); } .sp-edge:nth-child(7) { transform: translateZ(-5px); } .sp-edge:nth-child(8) { transform: translateZ(-6px); } .sp-edge:nth-child(9) { transform: translateZ(4px); }
.sp-sweep { position: absolute; inset: -20%; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .85) 48%, transparent 60%); animation: sweep 1.6s .9s ease-in-out 2 both; }
@keyframes sweep { from { transform: translateX(-90%); } to { transform: translateX(90%); } }
.sp-gear-ring { position: absolute; inset: 0; animation: spin 6s linear infinite; }
.sp-gear-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sp-gear-ring .track { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 6; }
.sp-gear-ring .prog { fill: none; stroke: #FFC107; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 578; stroke-dashoffset: 578; animation: prog 2.6s ease-out forwards; filter: drop-shadow(0 0 6px #FFC107); }
.sp-teeth { position: absolute; inset: -8px; border-radius: 50%; background: repeating-conic-gradient(#FFC107 0 4deg, transparent 4deg 15deg); -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%, #000 71%, transparent 72%); mask: radial-gradient(circle, transparent 66%, #000 67%, #000 71%, transparent 72%); opacity: .7; }
@keyframes prog { to { stroke-dashoffset: 0; } } @keyframes spin { to { transform: rotate(360deg); } }
.sp-name { position: relative; margin: 26px 12px 4px; font-size: 1.45rem; font-weight: 900; text-align: center; perspective: 500px; line-height: 1.3; color: #FFE23A; text-shadow: 0 2px 0 #7a5200, 0 4px 10px rgba(0, 0, 0, .6); font-family: Impact, 'Arial Black', var(--font); letter-spacing: 1px; }
.sp-name .w { display: inline-block; white-space: nowrap; animation: none; }
.sp-name .w span { display: inline-block; animation: flipIn .5s calc(.5s + var(--d)) both; transform-origin: bottom; }
@keyframes flipIn { from { transform: rotateX(-95deg); opacity: 0; } }
.sp-addr { position: relative; margin: 0; opacity: 0; animation: fade .6s 1.5s forwards; color: #ddd; }
.sp-phones { position: relative; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; font-size: .85rem; opacity: 0; animation: fade .6s 1.8s forwards; color: #eee; }
.sp-phones span { display: flex; align-items: center; gap: 4px; }
.sp-skip { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom)); opacity: .45; font-size: .75rem; }
@keyframes fade { to { opacity: 1; } }
[data-anim="light"] .sp-gear-ring { animation: none; }

/* developer easter egg */
.dev-overlay { position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, .75); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; perspective: 1000px; opacity: 0; transition: opacity .35s; }
.dev-overlay.show { opacity: 1; }
.dev-card3d { width: 290px; height: 190px; position: relative; transform-style: preserve-3d; animation: devIn 1.4s cubic-bezier(.2, .9, .3, 1.1) both, devFloat 5s 1.4s ease-in-out infinite; }
@keyframes devIn { from { transform: rotateY(-200deg) rotateX(30deg) scale(.3); } }
@keyframes devFloat { 50% { transform: rotateY(12deg) rotateX(-6deg) translateY(-6px); } }
.dev-face { position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px; overflow: hidden;
  background: linear-gradient(135deg, #1c1c1c, #3a3a3a 50%, #111); color: #fff; border: 2px solid #FFC107; box-shadow: 0 25px 50px rgba(0, 0, 0, .6), 0 0 40px rgba(255, 193, 7, .3); }
.dev-face img { width: 90px; background: #fff; border-radius: 10px; padding: 3px; margin-bottom: 8px; }
.dev-face small { opacity: .7; font-size: .72rem; } .dev-face b { color: #FFE23A; font-size: 1.08rem; } .dev-face em { font-size: .7rem; opacity: .6; margin-top: 6px; }
.dev-face.back { transform: rotateY(180deg); background: linear-gradient(135deg, #FFE23A, #D98E04); color: #111; } .dev-face.back b { font-family: Impact, sans-serif; font-size: 3rem; color: #111; }
.dev-gear { position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 193, 7, .25) 0 10deg, transparent 10deg 20deg); animation: spin 8s linear infinite; }

@media (min-width: 700px) { body { background: #2a2a2a; } [data-theme="contrast"] body { background: #fff; } }
@media (prefers-reduced-motion: reduce) { .emblem-bg img, .cube, .d3-shine { animation: none; } }
