/* Hallmark · shape: app screen · genre: modern-minimal · theme: custom (by request: violet gradient wallet pocket, glass surfaces, light and dark)
 * nav: glass pill tab bar split around a detached gradient record button; sidebar on desktop · signature: the stitched wallet pocket whose cards shuffle on swap · states: empty, loading (ocr, voice, endpoint), error, full · palette: lavender paper with a drifting aurora, glass cards, violet to indigo gradient
 * axes: light+dark/sans/violet · posture: committed · contrast: pass · v2.0.0 */
/* Hallmark · waive 12 · overshoot only on the record button, card shuffle and toast · the user asked for lively wallet motion on every control */
/* Note · the violet gradient, brand-coloured cards (GoPay cyan, SeaBank orange) and 3D emoji category art are the user's explicit request; controls keep line icons and text names */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: R, glass over a moving aurora can lose contrast, so glass stays at 62 to 82 percent opacity with a solid ink */
@import url("./tokens.css?v=17");
@import url("./base.css");

:root {
  --shell: 30rem;
  --side: 272px;
  --nav-h: 64px;
  --color-riba: var(--color-error);
  --color-riba-bg: color-mix(in oklab, var(--color-error) 12%, var(--color-surface));
  --color-ok-bg: color-mix(in oklab, var(--color-success) 13%, var(--color-surface));
  --color-sheet: var(--color-surface);
}

html { scroll-padding-top: var(--space-lg); }
body { min-height: 100dvh; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-feature-settings: "tnum"; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 1.625rem; max-width: none; line-height: 1.15; }
h2 { font-size: var(--text-lg); line-height: 1.3; letter-spacing: -0.01em; }
h3 { font-size: var(--text-md); font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }
.noscript { padding: var(--space-lg); }

/* ---------- aurora background (motion graphic) ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(60px); opacity: 1; will-change: transform; }
.aurora i:nth-child(1) { top: -30vmax; left: -20vmax; background: radial-gradient(circle, var(--aurora-1), transparent 65%); animation: drift-a 26s var(--ease-in-out) infinite alternate; }
.aurora i:nth-child(2) { top: 10vmax; right: -35vmax; background: radial-gradient(circle, var(--aurora-2), transparent 65%); animation: drift-b 32s var(--ease-in-out) infinite alternate; }
.aurora i:nth-child(3) { bottom: -40vmax; left: 0; background: radial-gradient(circle, var(--aurora-3), transparent 65%); animation: drift-c 38s var(--ease-in-out) infinite alternate; }
@keyframes drift-a { to { transform: translate(18vmax, 12vmax) scale(1.1); } }
@keyframes drift-b { to { transform: translate(-16vmax, 14vmax) scale(0.92); } }
@keyframes drift-c { to { transform: translate(12vmax, -14vmax) scale(1.08); } }

/* ---------- glass recipe ---------- */
.glass, .ledger, .spec, .note, .empty, .card, .chartwrap, .panel, .tbl, .stat-grid > div, .txc, .qgrid { background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-card); -webkit-backdrop-filter: blur(var(--blur)) saturate(160%); backdrop-filter: blur(var(--blur)) saturate(160%); }

/* ---------- shell ---------- */
.shell { position: relative; max-width: var(--shell); min-height: 100dvh; margin-inline: auto; }
.side { display: none; }
.screen { padding: var(--space-lg) var(--space-md) calc(var(--nav-h) + var(--space-3xl) + env(safe-area-inset-bottom)); outline: none; }
.screen > * { animation: rise-in var(--dur-long) var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 8) * 40ms); }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.ic { width: var(--icon-md); height: var(--icon-md); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: var(--icon-sm); height: var(--icon-sm); }

/* ---------- bottom nav: two glass pills and a detached record button ---------- */
.navbar { position: fixed; z-index: var(--z-sticky-nav); left: 50%; bottom: calc(var(--space-md) + env(safe-area-inset-bottom)); translate: -50% 0; width: min(calc(100% - 2 * var(--space-md)), 26rem); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--space-sm); }
.navpill { height: var(--nav-h); padding: var(--space-xs); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; border-radius: var(--radius-pill); background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow-float); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); }
.navpill a { display: grid; justify-items: center; align-content: center; gap: var(--space-3xs); height: 48px; border-radius: var(--radius-pill); color: var(--color-muted); font-size: 0.6875rem; font-weight: 600; text-decoration: none; transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.navpill a .ic { width: 20px; height: 20px; }
.navpill a:hover { color: var(--color-ink); }
.navpill a:active { transform: scale(0.9); }
.navpill a[aria-current="page"] { color: var(--color-brand); }
.navpill a:focus-visible { outline-offset: -2px; }
.fab { display: grid; place-items: center; width: 64px; height: 64px; border: 0; border-radius: 50%; background: var(--grad-brand); color: var(--on-grad); cursor: pointer; box-shadow: var(--shadow-fab); transition: transform var(--dur-short) var(--ease-spring), box-shadow var(--dur-short) var(--ease-out); }
.fab .ic { width: 28px; height: 28px; stroke-width: 2.2; transition: transform var(--dur-long) var(--ease-spring); }
.fab:hover { transform: translateY(-3px); }
.fab:hover .ic { transform: rotate(90deg); }
.fab:active { transform: scale(0.92); }
.fab:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }

/* ---------- utilities ---------- */
.muted { color: var(--color-muted); }
.small { font-size: var(--text-sm); }
.xs { font-size: var(--text-xs); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fig { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.05; overflow-wrap: anywhere; }
.grad-text { color: var(--color-amount); }
.amt-in { color: var(--color-in); }
.amt-out { color: var(--color-out); }
.amt-riba { color: var(--color-riba); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mt { margin-top: var(--space-md); }
.mb { margin-bottom: var(--space-md); }
.card { border-radius: var(--radius-card); padding: var(--space-md); }

/* ---------- emoji and brand marks ---------- */
.emo { display: inline-grid; place-items: center; flex: none; width: var(--emoji-md); height: var(--emoji-md); }
.emo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 4px var(--fx-1)); }
.emo .fb { font-size: calc(var(--emoji-md) * 0.82); line-height: 1; }
.ci { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 16px; box-shadow: inset 0 1px 0 var(--fx-2); }
.ci .emo { width: 30px; height: 30px; }
.t1 { background: var(--tint-1); } .t2 { background: var(--tint-2); } .t3 { background: var(--tint-3); } .t4 { background: var(--tint-4); } .t5 { background: var(--tint-5); } .t6 { background: var(--tint-6); }
.bm { display: inline-flex; align-items: center; gap: var(--space-3xs); font-weight: 800; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; color: currentColor; }
.bm-visa { font-style: italic; font-size: 1.25rem; letter-spacing: 0.02em; font-weight: 900; }
.bm-mc svg { width: 40px; height: 26px; display: block; }
.bm-paypal { font-style: italic; font-size: 1.05rem; }
.bm-paypal b:first-child { color: var(--pp-light); }
.bm-gopay { font-size: 1.05rem; text-transform: lowercase; }
.bm-dana, .bm-ovo { font-size: 1.1rem; text-transform: uppercase; }
.bm-seabank, .bm-shopeepay, .bm-bank { font-size: 0.95rem; }
.bm-cash .emo { width: 30px; height: 30px; }
.badge-b { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 16px; color: var(--on-grad); overflow: hidden; box-shadow: inset 0 1px 0 var(--fx-3), 0 4px 10px var(--fx-4); }
.badge-b .bm { font-size: 0.625rem; letter-spacing: 0; }
.badge-b .bm-visa { font-size: 0.75rem; }
.badge-b .bm-mc svg { width: 30px; height: 20px; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-lg); min-height: 48px; }
.top h1 { min-width: 0; }
.top-actions { display: flex; gap: var(--space-xs); flex: none; }
.back { display: inline-flex; align-items: center; gap: var(--space-2xs); margin-bottom: var(--space-sm); }
.iconbtn { position: relative; display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid var(--glass-border); border-radius: 50%; background: var(--glass); color: var(--color-ink); cursor: pointer; text-decoration: none; box-shadow: var(--shadow-card); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out), color var(--dur-short) var(--ease-out); }
.iconbtn:hover { background: var(--glass-strong); }
.iconbtn:active { transform: scale(0.9); }
.iconbtn[aria-pressed="true"] { color: var(--color-brand); }
.iconbtn .dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--color-out); box-shadow: 0 0 0 2px var(--color-surface); }

/* ---------- segmented with sliding thumb ---------- */
.seg { position: relative; display: flex; gap: 0; padding: var(--space-2xs); margin-bottom: var(--space-lg); background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-pill); isolation: isolate; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.seg-thumb { position: absolute; z-index: -1; top: var(--space-2xs); bottom: var(--space-2xs); left: 0; width: var(--w, 0); border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: 0 2px 8px var(--color-shadow); transform: translateX(var(--x, 0)); transition: transform var(--dur-long) var(--ease-spring); }
.seg.fill .seg-thumb { background: var(--grad-brand); box-shadow: 0 6px 14px var(--fx-5); }
.seg button, .seg a { flex: 1 1 0; min-width: 0; min-height: 40px; padding: var(--space-2xs) var(--space-xs); border: 0; border-radius: var(--radius-pill); background: none; color: var(--color-muted); font-weight: 600; font-size: var(--text-sm); line-height: 1.2; text-align: center; text-decoration: none; display: grid; place-items: center; cursor: pointer; transition: color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.seg button:hover, .seg a:hover { color: var(--color-ink); }
.seg button:active, .seg a:active { transform: scale(0.95); }
.seg [aria-selected="true"], .seg [aria-current="true"] { color: var(--color-ink); }
.seg.fill [aria-selected="true"] { color: var(--on-grad); }
.seg :focus-visible { outline-offset: -2px; }
.seg:not(.ready) [aria-selected="true"], .seg:not(.ready) [aria-current="true"] { background: var(--color-surface); }

/* ---------- home hero ---------- */
.hero { margin-bottom: var(--space-lg); }
.greet { display: flex; align-items: center; gap: var(--space-sm); }
.avatar { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--grad-brand); color: var(--on-grad); font-weight: 800; font-size: var(--text-md); box-shadow: 0 0 0 3px var(--color-surface), 0 6px 14px var(--fx-5); }
.greet .who { flex: 1; min-width: 0; }
.greet .who p { color: var(--color-muted); font-size: var(--text-sm); }
.greet .who strong { display: block; font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; line-height: 1.25; }
.value { text-align: center; margin: var(--space-md) 0 var(--space-lg); }
.value .lbl { color: var(--color-muted); font-size: var(--text-sm); font-weight: 600; }
.value .fig { font-size: clamp(2.1rem, 10vw, 2.6rem); margin-top: var(--space-2xs); }
.value .flow { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2xs) var(--space-md); margin-top: var(--space-xs); font-size: var(--text-sm); font-weight: 600; }

/* ---------- wallet pocket ---------- */
/* layers, back to front: frame, card deck, stitched panel. Offsets follow the reference: back card 0, front card 12, frame 46, panel 79. */
.pocket { position: relative; padding: 79px 10px 10px; touch-action: pan-y; user-select: none; isolation: isolate; }
.pocket-frame { position: absolute; z-index: 0; inset: 46px 0 0; border-radius: 26px; background: var(--pk-frame); box-shadow: var(--shadow-frame); }
.deck { position: absolute; z-index: 1; top: 0; left: 6%; right: 6%; height: 172px; }
.pcard { position: absolute; inset: 12px 0 auto; height: 160px; padding: 18px 20px; border: 1px solid var(--pk-card-edge); border-radius: 18px; background: var(--g, var(--b-violet)); color: var(--on-grad); text-align: left; display: grid; grid-template-rows: auto auto; align-content: start; gap: 6px; overflow: hidden; cursor: pointer; transform-origin: 50% 0; box-shadow: 0 -2px 10px var(--pk-card-shadow); transition: transform var(--dur-long) var(--ease-spring), opacity var(--dur-short) var(--ease-out), filter var(--dur-short) var(--ease-out); }
.pcard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(110% 120% at 10% 0%, var(--fx-8), transparent 50%), linear-gradient(112deg, transparent 38%, var(--fx-9) 50%, transparent 62%); pointer-events: none; }
.pcard > * { position: relative; }
.cface .r1, .cface .r2 { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); min-width: 0; }
.cface .nm { font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.005em; overflow-wrap: anywhere; line-height: 1.25; min-width: 0; }
.cface .no { display: inline-flex; align-items: center; gap: 7px; font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.06em; opacity: 0.95; white-space: nowrap; }
.cface .no i { font-style: normal; font-size: 0.625rem; letter-spacing: 0.04em; }
.cface .kd { font-size: var(--text-sm); font-weight: 500; opacity: 0.95; white-space: nowrap; }
.pcard.p0 { z-index: 3; transform: translateY(0) scale(1); }
.pcard.p1 { z-index: 2; transform: translateY(-12px) scale(0.88); filter: brightness(0.84) saturate(0.9); }
.pcard.p1 > *, .pcard.p2 > *, .pcard.p3 > * { opacity: 0; transition: opacity var(--dur-short) var(--ease-out); }
.pcard.p2, .pcard.p3 { z-index: 1; transform: translateY(-12px) scale(0.88); opacity: 0; }
.pcard.out { z-index: 4; animation: card-out 520ms var(--ease-in-out) forwards; }
.pcard.out-back { z-index: 4; animation: card-out-back 520ms var(--ease-in-out) forwards; }
.pcard.in-front { animation: card-in 520ms var(--ease-out) both; }
@keyframes card-out { 0% { transform: translateY(0) rotate(0); opacity: 1; } 45% { transform: translateY(-110px) rotate(-6deg) scale(1.02); opacity: 1; } 100% { transform: translateY(-12px) rotate(0) scale(0.88); opacity: 0; } }
@keyframes card-out-back { 0% { transform: translateY(0) rotate(0); opacity: 1; } 45% { transform: translateY(-110px) rotate(6deg) scale(1.02); opacity: 1; } 100% { transform: translateY(-12px) rotate(0) scale(0.88); opacity: 0; } }
@keyframes card-in { 0% { transform: translateY(-120px) rotate(5deg) scale(0.96); opacity: 0; } 55% { opacity: 1; } 100% { transform: translateY(0) rotate(0) scale(1); opacity: 1; } }
.pocket-body { position: relative; z-index: 2; padding: 34px 16px 14px; color: var(--on-grad); }
.pk-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; filter: drop-shadow(0 -3px 5px var(--pk-lip)); }
.pk-shape #pk-g stop:nth-child(1) { stop-color: var(--pk-1); }
.pk-shape #pk-g stop:nth-child(2) { stop-color: var(--pk-2); }
.pk-shape #pk-g stop:nth-child(3) { stop-color: var(--pk-3); }
.pk-shape #pk-r stop:nth-child(1) { stop-color: var(--pk-glow); }
.pk-shape #pk-r stop:nth-child(2) { stop-color: var(--pk-glow); stop-opacity: 0; }
.pk-shape .f1 { fill: url(#pk-g); }
.pk-shape .f2 { fill: url(#pk-r); }
.pk-shape .st { fill: none; stroke: var(--pk-stitch); stroke-width: 1.4; stroke-dasharray: 4 3.5; stroke-linecap: round; }
.pocket-body > :not(.pk-shape) { position: relative; }
.pocket-body .lbl { font-size: var(--text-sm); font-weight: 500; color: var(--on-pk-soft); overflow-wrap: anywhere; }
.pocket-body .bal { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-xs); margin: var(--space-2xs) 0 var(--space-md); font-size: clamp(1.9rem, 9vw, 2.3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pocket-body .bal small { font-size: var(--text-lg); font-weight: 500; color: var(--on-pk-muted); letter-spacing: 0; }
.pocket-body .bal.swap { animation: bal-swap var(--dur-long) var(--ease-out); }
@keyframes bal-swap { 0% { opacity: 0; transform: translateY(8px); filter: blur(4px); } 100% { opacity: 1; transform: none; filter: none; } }
.pocket-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
.pk-rt { display: flex; gap: var(--space-xs); flex: none; }
.gbtn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border: 1px solid var(--on-grad-border); border-radius: var(--radius-pill); background: var(--on-grad-glass); color: var(--on-grad); font-weight: 600; font-size: var(--text-sm); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.gbtn:hover { background: var(--fx-15); }
.gbtn:active { transform: scale(0.94); }
.gbtn.round { width: 44px; padding: 0; flex: none; }
.gbtn.grow { flex: 1; min-width: 0; }
.gbtn.pill { flex: 0 1 auto; min-width: 0; padding: 0 var(--space-lg) 0 var(--space-md); }
.gbtn:focus-visible { outline: 2px solid var(--on-grad); outline-offset: 2px; }
.gbtn .ic { width: 20px; height: 20px; flex: none; }
.gbtn[aria-pressed="true"] { background: var(--fx-17); }
.pool { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-top: var(--space-md); padding: var(--space-sm) var(--space-md); background: var(--color-riba-bg); color: var(--color-ink); text-decoration: none; border-radius: var(--radius-md); transition: transform var(--dur-micro) var(--ease-out); }
.pool:active { transform: scale(0.98); }
.pool strong { color: var(--color-riba); font-weight: 700; }

/* ---------- quick record grid ---------- */
.qgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-md) var(--space-xs); padding: var(--space-md) var(--space-sm); border-radius: var(--radius-card); }
.qbtn { display: grid; justify-items: center; align-content: start; gap: var(--space-2xs); padding: var(--space-2xs) 0; border: 0; border-radius: var(--radius-md); background: none; color: var(--color-ink); font-size: var(--text-xs); font-weight: 600; line-height: 1.25; text-align: center; cursor: pointer; transition: transform var(--dur-micro) var(--ease-out); }
.qbtn .ci { margin-bottom: var(--space-2xs); transition: transform var(--dur-short) var(--ease-spring), box-shadow var(--dur-short) var(--ease-out); }
.qbtn:hover .ci { transform: translateY(-3px); box-shadow: 0 8px 16px var(--color-shadow); }
.qbtn:active { transform: scale(0.92); }
.qbtn .lb { overflow-wrap: anywhere; }
.qbtn .am { color: var(--color-muted); font-size: 0.6875rem; font-weight: 600; }
.qbtn.add .ci { background: var(--grad-brand); color: var(--on-grad); box-shadow: 0 8px 16px var(--fx-18); }

/* ---------- latest transaction cards ---------- */
.txgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); }
.txc { display: grid; gap: var(--space-3xs); justify-items: start; padding: var(--space-md); border-radius: var(--radius-md); color: inherit; text-align: left; cursor: pointer; transition: transform var(--dur-short) var(--ease-spring), box-shadow var(--dur-short) var(--ease-out); }
.txc:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); }
.txc:active { transform: scale(0.97); }
.txc .ci { width: 42px; height: 42px; border-radius: 14px; margin-bottom: var(--space-xs); }
.txc .ci .emo { width: 26px; height: 26px; }
.txc .t { font-weight: 700; font-size: var(--text-sm); overflow-wrap: anywhere; line-height: 1.3; }
.txc .d { font-size: var(--text-xs); color: var(--color-muted); }
.txc .a { margin-top: var(--space-2xs); font-size: var(--text-sm); font-weight: 800; }

/* ---------- sections, ledgers ---------- */
.sec { margin-bottom: var(--space-xl); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.link { font-weight: 700; font-size: var(--text-sm); padding: var(--space-2xs) 0; color: var(--color-brand); text-decoration: none; border: 0; background: none; cursor: pointer; transition: opacity var(--dur-micro) var(--ease-out); }
.link:hover { opacity: 0.72; }
.link:active { opacity: 0.5; }
.sec-head .link { font-size: var(--text-xs); flex: none; }
.ledger { list-style: none; margin: 0; padding: var(--space-2xs) var(--space-md); border-radius: var(--radius-card); }
.ledger > li + li { border-top: var(--rule-hair) solid var(--color-rule); }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); width: 100%; min-height: 68px; padding: var(--space-sm) 0; border: 0; background: none; color: inherit; text-align: left; text-decoration: none; cursor: pointer; border-radius: var(--radius-sm); transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.row.plain { grid-template-columns: minmax(0, 1fr) auto; }
button.row:hover, a.row:hover { background: color-mix(in oklab, var(--color-brand-soft) 45%, transparent); }
button.row:active, a.row:active { transform: scale(0.985); }
.row:focus-visible { outline-offset: -2px; }
.row .t { font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.row .s { font-size: var(--text-xs); color: var(--color-muted); overflow-wrap: anywhere; margin-top: var(--space-3xs); line-height: 1.35; }
.row .r { text-align: right; }
.row .r .num { font-weight: 800; }
.day-head { display: flex; justify-content: space-between; gap: var(--space-sm); padding: var(--space-lg) var(--space-2xs) var(--space-xs); font-size: var(--text-xs); color: var(--color-muted); font-weight: 700; }
.tag { display: inline-block; padding: 0 var(--space-xs); font-size: 0.6875rem; font-weight: 700; line-height: 1.6; border-radius: var(--radius-pill); vertical-align: 1px; margin-left: var(--space-2xs); background: var(--color-surface-2); color: var(--color-muted); white-space: nowrap; }
.tag-riba { background: var(--color-riba-bg); color: var(--color-riba); }
.tag-syubhat { background: color-mix(in oklab, var(--color-warn) 16%, var(--color-surface)); color: var(--color-warn); }

/* ---------- spec ---------- */
.spec { margin: 0; padding: var(--space-2xs) var(--space-md); border-radius: var(--radius-card); }
.spec > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: var(--space-sm) 0; }
.spec > div + div { border-top: var(--rule-hair) solid var(--color-rule); }
.spec dt { color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; min-width: 0; }
.spec dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.spec .total dd { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.02em; color: var(--color-amount); }

/* ---------- bars ---------- */
.bar { height: 8px; border-radius: var(--radius-pill); background: var(--color-surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--color-ink-2); transform-origin: left; animation: grow var(--dur-long) var(--ease-out) both; }
.bar.acc > i { background: var(--grad-brand); }
.bar.over > i { background: var(--color-riba); }
@keyframes grow { from { scale: 0 1; } }
.catrow { padding: var(--space-sm) 0; }
.catrow .line { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-xs); }
.catrow .line > span:first-child { display: flex; align-items: center; gap: var(--space-sm); font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.catrow .ci { width: 38px; height: 38px; border-radius: 12px; }
.catrow .ci .emo { width: 24px; height: 24px; }

/* ---------- notes ---------- */
.note { padding: var(--space-md); border-radius: var(--radius-card); margin-bottom: var(--space-lg); }
.note-riba { background: var(--color-riba-bg); border-color: transparent; }
.note-ok { background: var(--color-ok-bg); border-color: transparent; }
.note-acc { background: var(--grad-brand); color: var(--on-grad); border-color: transparent; box-shadow: var(--shadow-float); }
.note-acc .muted { color: var(--on-grad-muted); }
.note-acc .btn { background: var(--color-surface); color: var(--color-brand); }
.note h3 { margin-bottom: var(--space-2xs); }
.note .actions { margin-top: var(--space-sm); }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border: 0; border-radius: var(--radius-pill); background: var(--grad-brand); color: var(--on-grad); font-weight: 700; font-size: var(--text-sm); text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 8px 18px var(--fx-19), inset 0 1px 0 var(--fx-20); transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), opacity var(--dur-micro) var(--ease-out); }
.btn:hover { box-shadow: 0 12px 24px var(--fx-21), inset 0 1px 0 var(--fx-20); transform: translateY(-1px); }
.btn:active { transform: scale(0.96); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.block { width: 100%; }
.btn-line { background: var(--glass-strong); color: var(--color-ink); border: 1px solid var(--color-rule-ink); box-shadow: none; }
.btn-line:hover { background: var(--color-surface); box-shadow: var(--shadow-card); }
.btn-danger { background: var(--color-riba-bg); color: var(--color-riba); box-shadow: none; }
.btn-danger:hover { box-shadow: none; background: color-mix(in oklab, var(--color-error) 20%, var(--color-surface)); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.actions.stack { flex-direction: column; align-items: stretch; }

/* ---------- forms ---------- */
.field { display: grid; gap: var(--space-xs); margin-bottom: var(--space-md); }
.field label, .lbl { font-size: var(--text-sm); font-weight: 700; color: var(--color-ink-2); }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: var(--space-xs) var(--space-md); border: 1.5px solid var(--color-rule); border-radius: var(--radius-md); background: var(--glass-strong); color: var(--color-ink); font-size: 16px; font-weight: 500; transition: border-color var(--dur-short) var(--ease-out); }
.input:hover { border-color: var(--color-rule-ink); }
.input:focus-visible { outline: none; border-color: var(--color-focus); box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-focus) 20%, transparent); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; padding-top: var(--space-sm); }
.input::placeholder { color: var(--color-muted); opacity: 0.85; }
.input[disabled] { opacity: 0.55; cursor: not-allowed; }
.help { min-height: 1lh; font-size: var(--text-xs); color: var(--color-muted); }
.help.err { color: var(--color-error); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-sm); }
.check { display: flex; align-items: center; gap: var(--space-sm); min-height: 44px; cursor: pointer; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--color-brand); flex: none; }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--color-scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade var(--dur-short) var(--ease-out) both; }
.sheet { position: fixed; z-index: calc(var(--z-modal) + 1); left: 50%; bottom: 0; width: min(100%, var(--shell)); max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; translate: -50% 0; background: var(--color-sheet); border: 1px solid var(--glass-border); border-bottom: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: var(--space-xs) var(--space-md) calc(var(--space-lg) + env(safe-area-inset-bottom)); box-shadow: var(--shadow-float); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%); animation: sheet-up var(--dur-long) var(--ease-out) both; }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto var(--space-xs); border-radius: var(--radius-pill); background: var(--color-rule-ink); }
.closing .sheet, .sheet.closing { animation: sheet-down var(--dur-short) var(--ease-in) both; }
.scrim.closing { animation: fade-out var(--dur-short) var(--ease-in) both; }
.sheet-head { position: sticky; top: calc(var(--space-xs) * -1); z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin: 0 calc(var(--space-md) * -1) var(--space-sm); padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-md); background: var(--color-sheet); border-bottom: 1px solid transparent; }
.sheet-head h2 { font-size: var(--text-lg); min-width: 0; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* ---------- record ---------- */
.amount { display: flex; align-items: baseline; justify-content: center; gap: var(--space-xs); padding: var(--space-md) 0 var(--space-2xs); }
.amount .cur { font-size: var(--text-xl); color: var(--color-muted); font-weight: 700; }
.amount .fig { font-size: clamp(2.4rem, 12vw, 3.1rem); }
.amount .fig.bump { animation: bump var(--dur-short) var(--ease-spring); }
@keyframes bump { 40% { transform: scale(1.05); } }
.amount-help { text-align: center; margin-bottom: var(--space-md); min-height: 1lh; }
.keypad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xs); margin-top: var(--space-sm); }
.keypad button { min-height: 54px; border: 1px solid var(--glass-border); border-radius: var(--radius-md); background: var(--glass); color: var(--color-ink); font-size: var(--text-xl); font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; display: grid; place-items: center; line-height: 1.2; text-align: center; box-shadow: 0 1px 2px var(--color-shadow); transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.keypad button:hover { background: var(--color-surface); }
.keypad button:active { transform: scale(0.92); }
.keypad button:focus-visible { outline-offset: -2px; }
.keypad .k-fn { font-size: var(--text-xs); font-weight: 700; }
.keypad .k-del { background: var(--color-riba-bg); color: var(--color-riba); border-color: transparent; }
.keypad .k-ok { background: var(--grad-brand); color: var(--on-grad); border-color: transparent; box-shadow: 0 8px 16px var(--fx-22); }
.keypad .k-ok[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm) var(--space-xs); margin-bottom: var(--space-xs); }
.cbtn { display: grid; justify-items: center; align-content: start; gap: var(--space-2xs); padding: var(--space-2xs) 0; border: 0; border-radius: var(--radius-md); background: none; color: var(--color-muted); font-size: 0.6875rem; font-weight: 700; text-align: center; line-height: 1.25; cursor: pointer; transition: color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.cbtn > span:last-child { overflow-wrap: anywhere; }
.cbtn .ci { transition: transform var(--dur-short) var(--ease-spring), box-shadow var(--dur-short) var(--ease-out); }
.cbtn:active { transform: scale(0.92); }
.cbtn[aria-pressed="true"] { color: var(--color-ink); }
.cbtn[aria-pressed="true"] .ci { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-brand), 0 8px 16px var(--fx-23); }
.cbtn.more .ci { background: var(--color-surface-2); color: var(--color-muted); }
.inline-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 9.5rem); gap: var(--space-xs); margin-bottom: var(--space-xs); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--glass-strong); color: var(--color-ink); font-size: var(--text-sm); font-weight: 700; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.chip:hover { background: var(--color-surface); }
.chip:active { transform: scale(0.94); }
.chip[aria-pressed="true"] { background: var(--grad-brand); color: var(--on-grad); border-color: transparent; }

/* ---------- preview ---------- */
.preview > li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); align-items: start; padding: var(--space-sm) 0; animation: rise-in var(--dur-short) var(--ease-out) both; }
.preview > li > input[type="checkbox"] { margin-top: var(--space-sm); width: 20px; height: 20px; accent-color: var(--color-brand); }
.preview .input { min-height: 44px; }
.preview .pv-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
.preview .pv-top .num { text-align: left !important; }
.preview .meta { font-size: var(--text-xs); color: var(--color-muted); }
.preview select.input { min-height: 34px; padding: 0 var(--space-xs); font-size: var(--text-xs); width: 100%; border-radius: var(--radius-sm); }

/* ---------- drop zone, mic ---------- */
.drop { display: grid; place-items: center; gap: var(--space-xs); padding: var(--space-2xl) var(--space-md); border: 1.5px dashed var(--color-rule-ink); border-radius: var(--radius-card); background: var(--glass); text-align: center; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.drop .emo { width: var(--emoji-lg); height: var(--emoji-lg); }
.drop:hover { background: var(--glass-strong); border-color: var(--color-brand); }
.drop:active { transform: scale(0.99); }
.drop:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.mic { position: relative; display: grid; place-items: center; width: 108px; height: 108px; margin: var(--space-lg) auto var(--space-md); border: 0; border-radius: 50%; background: var(--grad-brand); color: var(--on-grad); cursor: pointer; box-shadow: var(--shadow-fab); transition: transform var(--dur-micro) var(--ease-out); }
.mic .ic { width: 38px; height: 38px; }
.mic:active { transform: scale(0.94); }
.mic[aria-pressed="true"]::before, .mic[aria-pressed="true"]::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--color-brand); animation: ripple 1.6s var(--ease-out) infinite; }
.mic[aria-pressed="true"]::after { animation-delay: 0.8s; }
@keyframes ripple { from { transform: scale(0.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }

/* ---------- skeleton, empty ---------- */
.skel { height: 64px; margin-bottom: var(--space-xs); border-radius: var(--radius-md); background: linear-gradient(90deg, var(--color-surface-2), var(--color-surface-3), var(--color-surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: var(--space-xl) var(--space-lg); text-align: center; border-radius: var(--radius-card); }
.empty .emo { width: var(--emoji-lg); height: var(--emoji-lg); margin-bottom: var(--space-xs); }
.empty p { margin: var(--space-2xs) auto var(--space-md); color: var(--color-muted); max-width: 32ch; }

/* ---------- chart ---------- */
.chartwrap { border-radius: var(--radius-card); padding: var(--space-md); margin-bottom: var(--space-lg); }
.chart { display: block; width: 100%; height: 150px; overflow: visible; }
.chart rect { fill: var(--color-surface-3); transform-box: fill-box; transform-origin: bottom; animation: rise-bar var(--dur-long) var(--ease-out) both; }
.chart rect.has { fill: color-mix(in oklab, var(--color-brand) 55%, var(--color-surface-3)); }
.chart rect.today { fill: var(--color-brand); }
.chart line { stroke: var(--color-rule-ink); stroke-width: 1; }
.chart text { fill: var(--color-muted); font: 600 10px var(--font-body); }
@keyframes rise-bar { from { transform: scaleY(0); } }

/* ---------- menu ---------- */
.menu .row > .ci { width: 44px; height: 44px; border-radius: 14px; }
.menu .row > .ci .emo { width: 28px; height: 28px; }
.menu .row > .ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--color-brand-soft); color: var(--color-brand); }
.menu .row > .ic { color: var(--color-muted); }

/* ---------- tour ---------- */
.tour-hero { position: relative; overflow: hidden; padding: var(--space-lg); border-radius: var(--radius-xl); background: var(--grad-pocket); color: var(--on-grad); box-shadow: var(--shadow-pocket); margin-bottom: var(--space-lg); }
.tour-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 70% at 85% 0%, var(--fx-24), transparent 60%); pointer-events: none; }
.tour-hero > * { position: relative; }
.tour-hero h1 { font-size: 1.75rem; margin-bottom: var(--space-xs); }
.tour-hero p { color: var(--on-grad-muted); margin-bottom: var(--space-md); }
.tour-hero .emo { width: 56px; height: 56px; margin-bottom: var(--space-sm); }
.tour-hero .btn { background: var(--color-surface); color: var(--color-brand); box-shadow: none; }
.tour-hero .gbtn { min-height: 48px; }
.tour .row { grid-template-columns: auto minmax(0, 1fr) auto; }
.tour .go { flex: none; min-height: 40px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-pill); background: var(--color-brand-soft); color: var(--color-brand); font-weight: 700; font-size: var(--text-xs); cursor: pointer; transition: transform var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.tour .go:hover { background: var(--color-surface-3); }
.tour .go:active { transform: scale(0.94); }
.tour .n { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: var(--space-2xs); border-radius: 50%; background: var(--color-surface-2); color: var(--color-muted); font-size: 0.6875rem; font-weight: 800; vertical-align: 1px; }

/* ---------- streak ---------- */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-xs); margin-top: var(--space-sm); }
.days i { aspect-ratio: 1; border-radius: 50%; background: var(--color-surface-3); display: grid; place-items: center; font-style: normal; font-size: 0.6875rem; font-weight: 700; color: var(--color-muted); }
.days i.on { background: var(--grad-brand); color: var(--on-grad); box-shadow: 0 6px 12px var(--fx-18); }

/* ---------- switch ---------- */
.switch { appearance: none; position: relative; width: 48px; height: 28px; flex: none; border-radius: var(--radius-pill); background: var(--color-surface-3); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--color-surface); box-shadow: 0 1px 3px var(--color-shadow); transition: transform var(--dur-short) var(--ease-out); }
.switch:checked { background: var(--color-brand); }
.switch:checked::after { transform: translateX(20px); }

/* ---------- toast ---------- */
.toast { position: fixed; z-index: var(--z-toast); left: 50%; bottom: calc(var(--nav-h) + var(--space-xl) + env(safe-area-inset-bottom)); translate: -50% 0; width: min(calc(100% - var(--space-xl)), 26rem); display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md); border-radius: var(--radius-md); background: var(--color-ink); color: var(--color-paper); font-size: var(--text-sm); font-weight: 600; box-shadow: var(--shadow-float); animation: toast-in var(--dur-long) var(--ease-spring) both; }
.toast > span { min-width: 0; overflow-wrap: anywhere; }
.toast.out { animation: toast-out var(--dur-short) var(--ease-in) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px); } }
.toast button { flex: none; min-height: 36px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-pill); background: var(--grad-brand); color: var(--on-grad); font-weight: 700; cursor: pointer; transition: transform var(--dur-micro) var(--ease-out); }
.toast button:active { transform: scale(0.94); }
.toast button:focus-visible { outline-color: var(--color-paper); }

/* ---------- onboarding ---------- */
.onb { padding-top: var(--space-xl); }
.onb .emo { width: 64px; height: 64px; margin-bottom: var(--space-md); }
.onb h1 { font-size: 2.3rem; line-height: 1.08; letter-spacing: -0.04em; margin-bottom: var(--space-md); max-width: 13ch; font-weight: 800; }
.onb .lead { color: var(--color-muted); margin-bottom: var(--space-xl); }

/* ---------- table (desktop log) ---------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--radius-card); overflow: hidden; font-size: var(--text-sm); }
.tbl th { text-align: left; font-weight: 700; color: var(--color-muted); font-size: var(--text-xs); padding: var(--space-md); white-space: nowrap; }
.tbl td { padding: var(--space-sm) var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.tbl tbody tr:hover { background: color-mix(in oklab, var(--color-brand-soft) 50%, transparent); }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl .tt { display: flex; align-items: center; gap: var(--space-sm); font-weight: 700; }
.tbl .ci { width: 36px; height: 36px; border-radius: 12px; }
.tbl .ci .emo { width: 22px; height: 22px; }

/* ---------- theme icon ---------- */
.theme-ico .ic { transition: transform var(--dur-long) var(--ease-spring); }
.theme-ico:active .ic { transform: rotate(-40deg) scale(0.9); }

/* ---------- route transitions ---------- */
::view-transition-old(root) { animation: vt-out 180ms var(--ease-in) both; }
::view-transition-new(root) { animation: vt-in 320ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ---------- small phones ---------- */
@media (max-width: 22.5rem) {
  .screen { padding-inline: var(--space-sm); }
  .qgrid { gap: var(--space-sm) var(--space-2xs); padding-inline: var(--space-2xs); }
  .pcard { padding-inline: var(--space-md); }
  .pocket-body { padding-inline: var(--space-sm); }
  .gbtn.pill { padding-inline: var(--space-sm) var(--space-md); }
  .seg button, .seg a { font-size: var(--text-xs); }
}

/* ---------- desktop dashboard ---------- */
.desk-only { display: none; }
@media (min-width: 48rem) {
  :root { --shell: 100%; }
  .desk-only { display: block; }
  .mob-only { display: none !important; }
  .shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: var(--space-lg); max-width: 1480px; padding: var(--space-lg); }
  .navbar { display: none; }
  .side { position: sticky; top: var(--space-lg); height: calc(100dvh - 2 * var(--space-lg)); display: flex; flex-direction: column; gap: var(--space-md); padding: var(--space-lg) var(--space-md); border-radius: var(--radius-xl); overflow-y: auto; scrollbar-width: thin; background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-card); -webkit-backdrop-filter: blur(var(--blur)) saturate(160%); backdrop-filter: blur(var(--blur)) saturate(160%); }
  .side .logo { display: flex; align-items: center; gap: var(--space-sm); padding: 0 var(--space-xs); font-weight: 800; font-size: var(--text-xl); letter-spacing: -0.04em; color: var(--color-ink); text-decoration: none; }
  .side .logo i { width: 36px; height: 36px; border-radius: 12px; background: var(--grad-brand); display: grid; place-items: center; color: var(--on-grad); font-style: normal; font-size: var(--text-md); box-shadow: 0 6px 14px var(--fx-5); }
  .side nav { display: grid; gap: var(--space-3xs); }
  .side nav a { display: flex; align-items: center; gap: var(--space-sm); min-height: 44px; padding: 0 var(--space-sm); border-radius: var(--radius-md); color: var(--color-muted); font-weight: 600; font-size: var(--text-sm); text-decoration: none; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
  .side nav a .ic { width: 20px; height: 20px; }
  .side nav a:hover { background: var(--glass-strong); color: var(--color-ink); }
  .side nav a:active { transform: scale(0.97); }
  .side nav a[aria-current="page"] { background: var(--grad-brand); color: var(--on-grad); box-shadow: 0 8px 18px var(--fx-18); }
  .side nav .grp { margin: var(--space-sm) var(--space-sm) var(--space-2xs); font-size: var(--text-xs); color: var(--color-muted); font-weight: 700; }
  .side .foot { margin-top: auto; display: grid; gap: var(--space-sm); }
  .side .me { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs); border-radius: var(--radius-md); background: var(--glass-strong); min-width: 0; }
  .side .me > div { min-width: 0; }
  .side .me .avatar { width: 40px; height: 40px; font-size: var(--text-sm); box-shadow: none; }
  .side .me strong { display: block; font-size: var(--text-sm); overflow-wrap: anywhere; }
  .side .me span { font-size: var(--text-xs); color: var(--color-muted); }
  .screen { padding: 0 0 var(--space-3xl); max-width: 1180px; width: 100%; }
  .screen.narrow > * { max-width: 46rem; }
  .sheet { bottom: auto; top: 50%; width: min(32rem, calc(100% - 2 * var(--space-lg))); max-height: 88dvh; translate: -50% -50%; border-radius: var(--radius-xl); border-bottom: 1px solid var(--glass-border); animation: modal-in var(--dur-long) var(--ease-spring) both; }
  .sheet::before { display: none; }
  .closing .sheet, .sheet.closing { animation: modal-out var(--dur-short) var(--ease-in) both; }
  .toast { bottom: var(--space-xl); }
  .dash { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 0.95fr); gap: var(--space-lg); align-items: start; }
  .dash > .col { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); min-width: 0; }
  .dash .sec { margin-bottom: 0; }
  .dash .hero { margin-bottom: 0; }
  .dash-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-lg); padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg); border-radius: var(--radius-pill); background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-card); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
  .dash-top h1 { font-size: var(--text-xl); }
  .dash-top .seg { margin: 0; width: 22rem; }
  .panel { border-radius: var(--radius-card); padding: var(--space-lg); }
  .panel .ledger, .panel .spec, .panel .qgrid { background: none; border: 0; box-shadow: none; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.94) translateY(8px); } }
@keyframes modal-out { to { opacity: 0; transform: scale(0.96); } }

@media (prefers-reduced-motion: reduce) {
  .aurora i, .screen > *, .bar > i, .chart rect, .preview > li, .mic[aria-pressed="true"]::before, .mic[aria-pressed="true"]::after, .skel, .pcard.out, .pcard.out-back, .pcard.in-front, .pocket-body .bal.swap { animation: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- brand logos ---------- */
.pcard, .wcard { isolation: isolate; }
.cface .r1 { min-height: 28px; }
.clogo { display: inline-flex; align-items: center; flex: none; min-width: 0; }
.clogo .cl-img { display: block; height: 22px; width: auto; max-width: 128px; }
.clogo.fx-white .cl-img { filter: brightness(0) invert(1); }
.clogo.fx-lift .cl-img { height: 24px; filter: grayscale(1) brightness(0.6) contrast(20); mix-blend-mode: screen; }
.clogo.fx-knock .cl-img { height: 32px; filter: grayscale(1) invert(1) brightness(1.8) contrast(20); mix-blend-mode: screen; }
.clogo.cl-visa .cl-img { height: 16px; }
.clogo.cl-mastercard .cl-img { height: 28px; }
.clogo.cl-paypal .cl-img { height: 20px; }
.clogo.cl-bsi .cl-img { height: 26px; }
.clogo .bm-txt { color: var(--on-grad); font-size: var(--text-md); }
.bm-txt { font-weight: 800; font-size: var(--text-sm); font-style: normal; color: inherit; letter-spacing: 0; }
.badge-b.bicon { background: var(--color-surface-2); padding: 7px; box-shadow: inset 0 0 0 1px var(--color-rule); }
.badge-b.bicon .bi-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.badge-b.bicon.word { padding: 5px; }
.badge-b.bicon .bm-txt { color: var(--color-ink); font-size: 0.625rem; }

/* ---------- dompet: stacked cards ---------- */
.wtop { margin-bottom: var(--space-sm); }
.wsum { margin-bottom: var(--space-lg); }
.wsum .lbl { color: var(--color-muted); font-size: var(--text-sm); font-weight: 600; }
.wtotal { margin-top: var(--space-2xs); color: var(--color-ink); font-size: clamp(2.1rem, 10vw, 2.6rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; }
.wtotal .cur { margin-right: 3px; color: var(--color-muted); font-weight: 600; }
.wsub { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); margin-top: var(--space-xs); color: var(--color-muted); font-size: var(--text-sm); }
.wsub b { color: var(--color-ink); font-weight: 700; }
.wsub b.amt-riba { color: var(--color-riba, var(--color-warn)); }
.wpanel { padding: var(--space-md); border-radius: var(--radius-xl); background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-card); -webkit-backdrop-filter: blur(var(--blur)) saturate(160%); backdrop-filter: blur(var(--blur)) saturate(160%); }
.wpanel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: var(--space-xs) var(--space-sm); margin-bottom: var(--space-md); }
.wcount { flex: 1; display: flex; align-items: center; gap: var(--space-xs); min-width: 0; color: var(--color-muted); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.wcount .ic { width: 18px; height: 18px; flex: none; }
.wstack { position: relative; }
.wcard { position: relative; display: grid; grid-template-rows: auto auto 1fr; gap: 6px; width: 100%; aspect-ratio: 1.586; padding: 18px 20px; border: 1px solid var(--pk-card-edge); border-radius: 18px; background: var(--g, var(--b-violet)); color: var(--on-grad); text-align: left; font: inherit; cursor: pointer; overflow: hidden; box-shadow: 0 -12px 26px -14px var(--wc-shadow), 0 2px 6px var(--fx-4); transition: transform var(--dur-long) var(--ease-spring), box-shadow var(--dur-short) var(--ease-out); }
.wcard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(110% 120% at 10% 0%, var(--fx-8), transparent 50%), linear-gradient(112deg, transparent 38%, var(--fx-9) 50%, transparent 62%); pointer-events: none; }
.wcard > * { position: relative; }
.wcard.lead { z-index: 2; box-shadow: 0 22px 38px -18px var(--wc-shadow-lead), 0 4px 10px var(--fx-4); }
.wcard.lead:active { transform: scale(0.985); }
.wcard.lead + .wcard.stk { margin-top: var(--space-lg); }
.wcard.stk + .wcard.stk { margin-top: calc(86px - 63.05%); }
.wcard.stk:hover, .wcard.stk:focus-visible { transform: translateY(-10px); }
.wcard:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.wc-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-sm); align-self: end; min-width: 0; }
.wc-lbl { display: block; font-size: var(--text-xs); font-weight: 500; opacity: 0.88; }
.wc-bal { display: block; margin-top: 2px; font-size: clamp(1.25rem, 6vw, 1.5rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.wc-foot .nfc { width: 22px; height: 22px; flex: none; opacity: 0.9; }
.whint { margin-top: var(--space-md); text-align: center; }

/* ---------- tab bar: sliding indicator ---------- */
.navpill { position: relative; isolation: isolate; }
.nav-ind { position: absolute; z-index: -1; top: var(--space-xs); bottom: var(--space-xs); left: 0; width: var(--w, 0); border-radius: var(--radius-pill); background: var(--color-brand-soft); box-shadow: inset 0 0 0 1px var(--glass-edge); opacity: 0; transform: translateX(var(--x, 0)) scale(0.6); transition: transform var(--dur-long) var(--ease-spring), opacity var(--dur-short) var(--ease-out); }
.nav-ind.on { opacity: 1; transform: translateX(var(--x, 0)) scale(1); }
.navpill a[aria-current="page"] { background: none; }
.navpill a[aria-current="page"] .ic { animation: nav-pop 620ms var(--ease-spring); }
.navpill a[aria-current="page"] span { animation: nav-label 420ms var(--ease-out); }
@keyframes nav-pop { 0% { transform: none; } 35% { transform: translateY(-4px) scale(1.18); } 100% { transform: none; } }
@keyframes nav-label { 0% { opacity: 0.4; transform: translateY(3px); } 100% { opacity: 1; transform: none; } }

/* ---------- dropdown (template for every select) ---------- */
.dd-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; clip-path: inset(50%); }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); width: 100%; text-align: left; font: inherit; cursor: pointer; }
.dd-btn.input { padding-right: var(--space-sm); font-size: 16px; }
.dd-val { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; }
.dd-val .dd-t { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.dd-val .badge-b, .dd-menu .badge-b { width: 26px; height: 26px; border-radius: 8px; padding: 3px; }
.dd-val .badge-b.sq, .dd-menu .badge-b.sq { padding: 0; }
.dd-val .badge-b .bm, .dd-menu .badge-b .bm { transform: scale(0.6); }
.dd-chev { width: 18px; height: 18px; flex: none; color: var(--color-muted); transition: transform var(--dur-short) var(--ease-out); }
.dd-btn[aria-expanded="true"] .dd-chev { transform: rotate(180deg); }
.dd-btn.input[aria-expanded="true"] { border-color: var(--color-focus); box-shadow: 0 0 0 4px var(--color-brand-soft); }
.dd-btn.chip { flex: none; width: auto; min-height: 36px; padding: 0 var(--space-sm) 0 var(--space-md); border: 1px solid var(--glass-border); border-radius: var(--radius-pill); background: var(--glass-strong); color: var(--color-ink); font-size: var(--text-sm); font-weight: 600; box-shadow: 0 2px 8px var(--color-shadow); transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.dd-btn.chip:hover { background: var(--color-surface); }
.dd-btn.chip:active { transform: scale(0.96); }
.dd-btn.chip .dd-chev { width: 16px; height: 16px; }
.dd-menu { position: fixed; z-index: var(--z-tooltip); margin: 0; padding: var(--space-2xs); list-style: none; overflow-y: auto; overscroll-behavior: contain; border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid var(--color-rule); box-shadow: var(--shadow-float); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); transform-origin: 50% 0; animation: dd-in 240ms var(--ease-out); outline: none; }
.dd-menu[data-up] { transform-origin: 50% 100%; }
.dd-menu.out { animation: dd-out 140ms var(--ease-in) forwards; pointer-events: none; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }
@keyframes dd-out { to { opacity: 0; transform: translateY(-4px) scale(0.97); } }
.dd-menu li { display: flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.dd-menu li .dd-t { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.dd-menu li.act { background: var(--color-brand-soft); }
.dd-menu li[aria-selected="true"] { color: var(--color-brand); font-weight: 700; }
.dd-menu li[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.dd-menu .ck { width: 18px; height: 18px; flex: none; margin-left: auto; opacity: 0; transform: scale(0.5); transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-spring); }
.dd-menu li[aria-selected="true"] .ck { opacity: 1; transform: none; }
.dd-menu:focus-visible li.act { box-shadow: inset 0 0 0 2px var(--color-focus); }
@media (prefers-reduced-motion: reduce) {
  .nav-ind, .wcard, .dd-chev, .dd-menu .ck { transition: none; }
  .navpill a[aria-current="page"] .ic, .navpill a[aria-current="page"] span, .dd-menu, .dd-menu.out { animation: none !important; }
}
@media (min-width: 48rem) {
  .wstack { max-width: 26rem; margin-inline: auto; }
}
.wnote { margin-top: var(--space-lg); }

/* ---------- record: date and time row ---------- */
.when-row { display: flex; gap: var(--space-xs); margin-top: var(--space-sm); }
.when-chip { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border: 1px solid var(--glass-border); border-radius: var(--radius-pill); background: var(--glass-strong); color: var(--color-ink); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px var(--color-shadow); transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.when-chip:first-child { flex-grow: 1.6; }
.when-chip:hover { background: var(--color-surface); }
.when-chip:active { transform: scale(0.96); }
.when-chip .ic { width: 18px; height: 18px; flex: none; color: var(--color-brand); }
.when-chip span { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.keypad .k-ok { grid-row: span 2; }
.when-input { display: flex; align-items: center; gap: var(--space-xs); text-align: left; font: inherit; cursor: pointer; }
.when-input .ic { width: 18px; height: 18px; flex: none; color: var(--color-brand); }

/* ---------- date and time picker ---------- */
.wp-root { position: fixed; inset: 0; z-index: calc(var(--z-toast) + 50); display: grid; align-items: end; justify-items: center; }
.wp-scrim { position: absolute; inset: 0; background: var(--color-scrim); animation: wp-fade 220ms var(--ease-out); }
.wp { position: relative; width: 100%; max-width: 26rem; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: var(--space-xs) var(--space-md) calc(var(--space-md) + env(safe-area-inset-bottom)); border-radius: var(--radius-xl) var(--radius-xl) 0 0; background: var(--color-surface); box-shadow: var(--shadow-float); animation: wp-up 360ms var(--ease-out); }
.wp-root.out .wp { animation: wp-down 200ms var(--ease-in) forwards; }
.wp-root.out .wp-scrim { animation: wp-fade-out 200ms var(--ease-in) forwards; }
@keyframes wp-up { from { transform: translateY(100%); } }
@keyframes wp-down { to { transform: translateY(100%); } }
@keyframes wp-fade { from { opacity: 0; } }
@keyframes wp-fade-out { to { opacity: 0; } }
.wp-grab { display: block; width: 40px; height: 4px; margin: 0 auto var(--space-sm); border-radius: var(--radius-pill); background: var(--color-rule-ink); }
.wp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-md); }
.wp-head h2 { font-size: var(--text-lg); }
.wp-sum { margin-top: 2px; color: var(--color-brand); font-size: var(--text-sm); font-weight: 700; }
.wp-quick { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-md); }
.wp-chip { min-height: 38px; padding: 0 var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-surface-2); color: var(--color-ink); font: inherit; font-size: var(--text-sm); font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.wp-chip:hover { background: var(--color-surface-3); }
.wp-chip:active { transform: scale(0.95); }
.wp-chip[aria-pressed="true"] { background: var(--grad-brand); color: var(--on-grad); border-color: transparent; box-shadow: 0 6px 14px var(--fx-5); }
.wp-cal { margin-bottom: var(--space-md); padding: var(--space-sm); border-radius: var(--radius-md); background: var(--color-surface-2); }
.wp-mhead { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-xs); }
.wp-mhead strong { font-size: var(--text-md); }
.wp-nav { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--color-surface); color: var(--color-ink); cursor: pointer; box-shadow: 0 1px 3px var(--color-shadow); transition: transform var(--dur-micro) var(--ease-out); }
.wp-nav:active { transform: scale(0.9); }
.wp-nav[disabled] { opacity: 0.35; cursor: not-allowed; transform: none; }
.wp-nav .ic { width: 18px; height: 18px; }
.wp-dow, .wp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.wp-dow span { padding: var(--space-2xs) 0; color: var(--color-muted); font-size: var(--text-xs); font-weight: 600; }
.wp-day { aspect-ratio: 1; min-height: 36px; border: 0; border-radius: 12px; background: none; color: var(--color-ink); font: inherit; font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.wp-day:hover { background: var(--color-surface); }
.wp-day:active { transform: scale(0.9); }
.wp-day.today { box-shadow: inset 0 0 0 1.5px var(--color-brand); }
.wp-day.on { background: var(--grad-brand); color: var(--on-grad); box-shadow: 0 6px 14px var(--fx-5); }
.wp-day[disabled] { opacity: 0.35; cursor: not-allowed; transform: none; background: none; }
.wp-time { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-sm); margin-bottom: var(--space-md); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); background: var(--color-surface-2); }
.wp-tlabel { display: flex; align-items: center; gap: var(--space-xs); color: var(--color-muted); font-size: var(--text-sm); font-weight: 600; }
.wp-tlabel .ic { width: 18px; height: 18px; color: var(--color-brand); }
.wp-tbox { display: flex; align-items: center; gap: var(--space-2xs); }
.wp-tcol { display: grid; justify-items: center; gap: 2px; }
.wp-step { display: grid; place-items: center; width: 44px; height: 28px; border: 0; border-radius: 10px; background: none; color: var(--color-muted); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.wp-step:hover { background: var(--color-surface); color: var(--color-ink); }
.wp-step:active { transform: scale(0.9); }
.wp-step .ic { width: 18px; height: 18px; }
.wp-tin { width: 56px; height: 48px; border: 1.5px solid var(--color-rule); border-radius: 12px; background: var(--color-surface); color: var(--color-ink); text-align: center; font: inherit; font-size: var(--text-xl); font-weight: 700; }
.wp-tin:focus-visible { outline: none; border-color: var(--color-focus); box-shadow: 0 0 0 4px var(--color-brand-soft); }
.wp-colon { color: var(--color-muted); font-size: var(--text-xl); font-weight: 700; }
.wp-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-xs); }
.wp-foot .btn { width: 100%; }
@media (min-width: 40rem) {
  .wp-root { align-items: center; }
  .wp { border-radius: var(--radius-xl); padding-bottom: var(--space-md); animation: wp-pop 300ms var(--ease-out); }
  .wp-root.out .wp { animation: wp-fade-out 160ms var(--ease-in) forwards; }
  .wp-grab { display: none; }
  @keyframes wp-pop { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
}

/* ---------- avatar and profile ---------- */
.avatar { overflow: hidden; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar.emo-av { background: var(--color-brand-soft); }
.avatar.emo-av .emo { width: 72%; height: 72%; }
.avatar.lg { width: 56px; height: 56px; font-size: var(--text-lg); }
.avatar.xl { width: 112px; height: 112px; font-size: 2.25rem; box-shadow: 0 0 0 4px var(--color-surface), 0 14px 30px var(--fx-5); }
.avatar-btn { flex: none; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: transform var(--dur-micro) var(--ease-out); }
.avatar-btn:active { transform: scale(0.94); }
.avatar-btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.profile-card { display: flex; align-items: center; gap: var(--space-md); width: 100%; margin-bottom: var(--space-lg); padding: var(--space-md); border: 1px solid var(--glass-border); border-radius: var(--radius-xl); background: var(--glass); color: var(--color-ink); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow-card); -webkit-backdrop-filter: blur(var(--blur)) saturate(160%); backdrop-filter: blur(var(--blur)) saturate(160%); transition: transform var(--dur-micro) var(--ease-out); }
.profile-card:active { transform: scale(0.98); }
.profile-card .pc-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.profile-card strong { font-size: var(--text-lg); overflow-wrap: anywhere; line-height: 1.25; }
.profile-card .pc-txt span { color: var(--color-muted); font-size: var(--text-sm); }
.profile-card > .ic { width: 20px; height: 20px; flex: none; color: var(--color-muted); }
.av-edit { display: grid; justify-items: center; text-align: center; }
.av-big { margin: var(--space-sm) 0 var(--space-xs); }
.av-name { margin-bottom: var(--space-md); font-size: var(--text-lg); font-weight: 700; overflow-wrap: anywhere; }
.av-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs); }
.av-actions .btn { display: inline-flex; align-items: center; gap: var(--space-xs); cursor: pointer; }
.av-actions .btn .ic { width: 18px; height: 18px; }
.av-note { margin-top: var(--space-sm); }
.av-h { justify-self: start; margin: var(--space-lg) 0 var(--space-sm); font-size: var(--text-md); }
.av-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm); width: 100%; }
.av-opt { display: grid; place-items: center; aspect-ratio: 1; border: 1.5px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-surface-2); cursor: pointer; transition: transform var(--dur-micro) var(--ease-out), border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.av-opt .emo { width: 60%; height: 60%; }
.av-opt:hover { border-color: var(--color-rule-ink); }
.av-opt:active { transform: scale(0.92); }
.av-opt[aria-pressed="true"] { border-color: var(--color-brand); background: var(--color-brand-soft); box-shadow: 0 0 0 3px var(--color-brand-soft); }
.lbl-like { display: block; margin-bottom: var(--space-xs); font-size: var(--text-sm); font-weight: 600; }
.st-av-row { display: flex; align-items: center; gap: var(--space-md); }
.lang-btn { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.04em; }
@media (prefers-reduced-motion: reduce) {
  .wp, .wp-scrim, .wp-root.out .wp, .wp-root.out .wp-scrim { animation: none !important; }
}
.dd-val .badge-b.bicon, .dd-menu .badge-b.bicon { padding: 2px; }

/* ---------- brand monograms and icon-only card marks ---------- */
.badge-b.mono { color: var(--on-grad); font-size: 0.625rem; font-weight: 800; letter-spacing: 0.02em; line-height: 1; text-align: center; padding: 2px; overflow-wrap: anywhere; }
.dd-val .badge-b.mono, .dd-menu .badge-b.mono { font-size: 0.5rem; }
.clogo.fx-icon { gap: var(--space-xs); min-width: 0; }
.clogo .cl-ic { width: 26px; height: 26px; flex: none; border-radius: 8px; object-fit: cover; box-shadow: 0 2px 6px var(--fx-4); }
.clogo .cl-name { min-width: 0; font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; overflow-wrap: anywhere; }

/* ---------- light cards: dark text and logos ---------- */
.cface.tone-light { color: var(--logo-ink); border-color: var(--logo-plate-edge); }
.cface.tone-light .clogo.fx-white .cl-img { filter: brightness(0); opacity: 0.86; }
.cface.tone-light .clogo.fx-lift .cl-img { filter: grayscale(1) brightness(0.6) contrast(20) invert(1); mix-blend-mode: multiply; }
.cface.tone-light .clogo.fx-knock .cl-img { filter: grayscale(1) invert(1) brightness(1.8) contrast(20) invert(1); mix-blend-mode: multiply; }

/* ---------- wallet form: live card preview and colour swatches ---------- */
.wf-preview { margin: 0 auto var(--space-lg); max-width: 22rem; }
.wf-preview .wcard { cursor: default; box-shadow: 0 18px 34px -16px var(--wc-shadow-lead), 0 4px 10px var(--fx-4); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: var(--space-xs); margin-bottom: var(--space-xs); }
.sw { position: relative; display: grid; place-items: center; min-height: 44px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--color-ink); cursor: pointer; font: inherit; }
.sw-dot { display: block; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--fx-3), 0 2px 6px var(--color-shadow); transition: transform var(--dur-short) var(--ease-spring), box-shadow var(--dur-short) var(--ease-out); }
.sw:hover .sw-dot { transform: scale(1.08); }
.sw:active .sw-dot { transform: scale(0.92); }
.sw[aria-checked="true"] .sw-dot { box-shadow: 0 0 0 3px var(--color-surface), 0 0 0 5px var(--color-brand), 0 4px 10px var(--color-shadow); }
.sw:focus-visible { outline: none; }
.sw:focus-visible .sw-dot { box-shadow: 0 0 0 3px var(--color-surface), 0 0 0 5px var(--color-focus); }
.sw.auto .sw-txt { position: absolute; color: var(--on-grad); font-size: 0.625rem; font-weight: 800; letter-spacing: 0.02em; pointer-events: none; text-shadow: 0 1px 2px var(--fx-1); }
.sw.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.sw.custom:has(input:focus-visible) .sw-dot { box-shadow: 0 0 0 3px var(--color-surface), 0 0 0 5px var(--color-focus); }

/* ---------- dropdown: search and groups ---------- */
.dd-menu { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.dd-list { flex: 1 1 auto; min-height: 0; margin: 0; padding: var(--space-2xs); list-style: none; overflow-y: auto; overscroll-behavior: contain; outline: none; }
.dd-search { position: relative; flex: none; display: flex; align-items: center; gap: var(--space-xs); margin: var(--space-xs) var(--space-xs) 0; padding: 0 var(--space-sm); border: 1.5px solid var(--color-rule); border-radius: var(--radius-sm); background: var(--color-surface-2); transition: border-color var(--dur-short) var(--ease-out); }
.dd-search:focus-within { border-color: var(--color-focus); box-shadow: 0 0 0 4px var(--color-brand-soft); }
.dd-search .ic { width: 18px; height: 18px; flex: none; color: var(--color-muted); }
.dd-search input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; color: var(--color-ink); font: inherit; font-size: 16px; outline: none; }
.dd-search input::placeholder { color: var(--color-muted); }
.dd-search input::-webkit-search-cancel-button { cursor: pointer; }
.dd-grp { padding: var(--space-sm) var(--space-sm) var(--space-2xs); color: var(--color-muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; cursor: default; }
.dd-grp:first-child { padding-top: var(--space-2xs); }
.dd-list li[hidden] { display: none; }
.dd-empty { padding: var(--space-md); color: var(--color-muted); font-size: var(--text-sm); text-align: center; }
.dd-list:focus-visible li.act, .dd-search:focus-within ~ .dd-list li.act { box-shadow: inset 0 0 0 2px var(--color-focus); }
.dd-menu li.dd-grp { display: block; min-height: 0; cursor: default; background: none; border-radius: 0; }

/* ---------- brand mark (P dengan perut kartu) ---------- */
.pp-mark { display: block; flex: none; width: 36px; height: 36px; border-radius: 28%; background: linear-gradient(135deg, #8a6bff 0%, #6a4cf5 45%, #4d33e0 100%); box-shadow: 0 6px 14px var(--fx-5); }
.pp-mark svg { display: block; width: 100%; height: 100%; }
.pp-word { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--color-ink); }

/* ---------- gate: login, menunggu persetujuan, kode aktivasi ---------- */
.gate { display: none; position: fixed; inset: 0; z-index: calc(var(--z-toast) - 1); overflow-y: auto; overscroll-behavior: contain; }
.gated .gate { display: block; }
.gated .shell { visibility: hidden; }
.gt { position: relative; display: flex; flex-direction: column; min-height: 100dvh; max-width: 30rem; margin-inline: auto; padding: calc(var(--space-lg) + env(safe-area-inset-top)) var(--space-md) calc(var(--space-xl) + env(safe-area-inset-bottom)); }
.gt-brand { display: flex; align-items: center; gap: var(--space-sm); }
.gt-brand .pp-word { font-size: 1.625rem; }
.gt-visual .gt-points, .gt-mbrand { display: none; }
.gt-cards { position: relative; height: 13.5rem; margin: var(--space-lg) 0 var(--space-lg); }
.gt-cards .wcard { position: absolute; left: 50%; top: 0; width: min(17rem, 70%); cursor: default; translate: -50% 0; box-shadow: 0 24px 40px -20px var(--wc-shadow-lead), 0 4px 10px var(--fx-4); }
.gt-cards .gc0 { rotate: -9deg; translate: -70% 14px; }
.gt-cards .gc1 { rotate: 7deg; translate: -28% 0; }
.gt-cards .gc2 { rotate: -2deg; translate: -50% 64px; animation: gt-float 6s var(--ease-in-out) infinite alternate; }
@keyframes gt-float { to { transform: translateY(-8px); } }
.gt-panel h1 { font-size: 2.125rem; line-height: 1.08; letter-spacing: -0.045em; font-weight: 800; max-width: 12ch; margin-bottom: var(--space-sm); }
.gt-lead { color: var(--color-muted); line-height: 1.5; margin-bottom: var(--space-lg); max-width: 40ch; }
.gt-msg { margin: 0 0 var(--space-md); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); background: var(--color-riba-bg); color: var(--color-riba); font-size: var(--text-sm); font-weight: 600; }
.gsign { display: flex; align-items: center; justify-content: center; gap: var(--space-sm); width: 100%; min-height: 54px; padding: 0 var(--space-lg); border: 1px solid #dadce0; border-radius: var(--radius-pill); background: #fff; color: #1f1f1f; font: inherit; font-size: var(--text-md); font-weight: 700; cursor: pointer; box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15), 0 8px 20px -8px var(--fx-4); transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.gsign:hover { box-shadow: 0 1px 3px rgba(60, 64, 67, 0.25), 0 12px 26px -8px var(--fx-7); }
.gsign:active { transform: scale(0.98); }
.gsign:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.gsign[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.gsign .g-logo { width: 22px; height: 22px; flex: none; }
:root[data-theme="dark"] .gsign { background: #131314; border-color: #8e918f; color: #e3e3e3; }
.gt-note { display: flex; gap: var(--space-xs); margin: var(--space-sm) 0; color: var(--color-muted); font-size: var(--text-sm); line-height: 1.45; }
.gt-note .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.gt-note code { font-size: 0.85em; padding: 1px 5px; border-radius: 6px; background: var(--glass-strong); }
.gt-panel > .btn-line { margin-top: var(--space-sm); }
.gt-sep { display: flex; align-items: center; gap: var(--space-sm); margin: var(--space-xl) 0 var(--space-sm); color: var(--color-ink); font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
.gt-sep::before, .gt-sep::after { content: ""; flex: 1; height: 1px; background: var(--color-rule); }
.gt-small { color: var(--color-muted); font-size: var(--text-sm); line-height: 1.5; text-align: center; margin-bottom: var(--space-md); }
.gt-price { text-align: center; font-size: var(--text-sm); color: var(--color-muted); margin-bottom: var(--space-sm); }
.gt-price strong { color: var(--color-ink); }
.gt-buy { width: 100%; }
.gt-legal { margin-top: auto; padding-top: var(--space-xl); color: var(--color-muted); font-size: var(--text-xs); line-height: 1.5; text-align: center; }
.gt-solo { justify-content: center; }
.gt-solo .gt-panel { display: grid; }
.gt-solo .gt-brand { margin-bottom: var(--space-xl); }
.gt-who { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-lg); padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-xs); border-radius: var(--radius-pill); background: var(--glass-strong); border: 1px solid var(--glass-border); width: fit-content; max-width: 100%; }
.gt-who > span:last-child { display: grid; min-width: 0; }
.gt-who strong { font-size: var(--text-sm); overflow-wrap: anywhere; }
.gt-who strong + span { color: var(--color-muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.gt-ava { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: var(--grad-brand); color: var(--on-grad); font-weight: 800; }
.gt-ava img { width: 100%; height: 100%; object-fit: cover; }
.gt-status { display: inline-flex; align-items: center; gap: var(--space-xs); width: fit-content; margin-bottom: var(--space-sm); padding: 4px var(--space-sm) 4px var(--space-xs); border-radius: var(--radius-pill); background: color-mix(in oklab, #d97706 16%, var(--color-surface)); color: color-mix(in oklab, #b45309 85%, var(--color-ink)); font-size: var(--text-xs); font-weight: 700; }
:root[data-theme="dark"] .gt-status { color: #fbbf24; }
.gt-status.bad { background: var(--color-riba-bg); color: var(--color-riba); }
.gt-status .ic { width: 16px; height: 16px; }
.gt-code { display: grid; gap: var(--space-xs); margin-bottom: var(--space-md); }
.gt-code label { font-weight: 700; font-size: var(--text-sm); }
.gt-code-row { display: flex; gap: var(--space-xs); }
.gt-code-row .input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.gt-code-row .btn { flex: none; padding: 0 var(--space-md); }
.gt-code-row .btn .ic { width: 18px; height: 18px; }
.gt-code .gt-msg { margin: 0; }
.gt-switch { justify-self: center; margin-top: var(--space-md); }
.gt-splash { display: grid; place-content: center; justify-items: center; gap: var(--space-sm); min-height: 100dvh; }
.gt-splash .pp-mark { width: 64px; height: 64px; border-radius: 18px; animation: gt-breathe 1.6s var(--ease-in-out) infinite alternate; }
.gt-splash .pp-word { font-size: 1.75rem; }
.gt-dots { display: flex; gap: 6px; margin-top: var(--space-xs); }
.gt-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-brand); opacity: 0.3; animation: gt-dot 1s var(--ease-in-out) infinite; }
.gt-dots i:nth-child(2) { animation-delay: 150ms; }
.gt-dots i:nth-child(3) { animation-delay: 300ms; }
@keyframes gt-breathe { to { transform: scale(1.06); } }
@keyframes gt-dot { 50% { opacity: 1; transform: translateY(-3px); } }

@media (min-width: 48rem) {
  .gt:not(.gt-solo) { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; gap: var(--space-lg); max-width: 72rem; padding: var(--space-lg); }
  .gt-visual { position: relative; display: flex; flex-direction: column; gap: var(--space-lg); padding: var(--space-xl); border-radius: var(--radius-xl); background: var(--grad-brand); color: var(--on-grad); overflow: hidden; box-shadow: var(--shadow-float); isolation: isolate; }
  .gt-visual::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 60% at 85% 10%, var(--fx-9), transparent 60%), radial-gradient(60% 50% at 0% 100%, rgba(20, 8, 90, 0.35), transparent 70%); }
  .gt-visual .gt-brand, .gt-visual .gt-points { display: flex; }
  .gt-visual .pp-word { color: var(--on-grad); }
  .gt-visual .pp-mark { box-shadow: 0 0 0 1px var(--on-grad-border), 0 8px 18px rgba(20, 8, 90, 0.35); }
  .gt-cards { flex: 1; min-height: 17rem; margin: var(--space-md) 0; }
  .gt-cards .wcard { top: 8%; width: min(20rem, 62%); }
  .gt-points { flex-direction: column; gap: var(--space-sm); list-style: none; margin: 0; padding: 0; }
  .gt-points li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--space-sm); align-items: baseline; padding-top: var(--space-sm); border-top: 1px solid var(--on-grad-border); }
  .gt-points b { font-size: var(--text-md); font-weight: 800; letter-spacing: -0.02em; }
  .gt-points span { color: var(--on-grad-muted); font-size: var(--text-sm); line-height: 1.45; }
  .gt-panel { display: flex; flex-direction: column; justify-content: center; padding: var(--space-xl) clamp(var(--space-lg), 4vw, var(--space-3xl)); border-radius: var(--radius-xl); background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-card); -webkit-backdrop-filter: blur(var(--blur)) saturate(160%); backdrop-filter: blur(var(--blur)) saturate(160%); }
  .gt-panel h1 { font-size: clamp(2.25rem, 3.4vw, 3rem); }
  .gt-legal { margin-top: var(--space-xl); padding-top: 0; }
  .gt-solo { max-width: 32rem; }
  .gt-solo .gt-panel { padding: var(--space-xl); }
}
@media (prefers-reduced-motion: reduce) {
  .gt-cards .gc2, .gt-splash .pp-mark, .gt-dots i { animation: none; }
}

/* ---------- tablet: sidebar jadi rel ikon, dasbor dua kolom ---------- */
@media (min-width: 48rem) and (max-width: 63.99rem) {
  :root { --side: 84px; }
  .shell { gap: var(--space-md); padding: var(--space-md); }
  .side { align-items: center; padding: var(--space-md) var(--space-xs); top: var(--space-md); height: calc(100dvh - 2 * var(--space-md)); }
  .side .logo span, .side nav a span, .side .btn span, .side .me > div { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .side .logo { justify-content: center; padding: 0; }
  .side nav { justify-items: center; width: 100%; }
  .side nav a { justify-content: center; width: 52px; padding: 0; }
  .side nav .grp { width: 24px; height: 1px; margin: var(--space-xs) auto; overflow: hidden; color: transparent; background: var(--color-rule); }
  .side .btn { width: 52px; min-height: 52px; padding: 0; }
  .side .foot { justify-items: center; width: 100%; }
  .side .me { padding: 0; background: none; }
  .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
  .dash > .col { gap: var(--space-md); }
  .dash > .col:nth-child(3) { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .dash-top { padding-left: var(--space-md); }
  .dash-top .seg { width: auto; flex: 1; max-width: 20rem; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .tbl { display: block; overflow-x: auto; }
}

/* ---------- pasang aplikasi ---------- */
.install-card { display: flex; align-items: center; gap: var(--space-md); width: 100%; margin: calc(-1 * var(--space-sm)) 0 var(--space-lg); padding: var(--space-sm) var(--space-md); border: 1px dashed var(--color-rule-ink); border-radius: var(--radius-card); background: var(--glass); color: var(--color-ink); text-align: left; font: inherit; cursor: pointer; transition: transform var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.install-card:hover { background: var(--glass-strong); }
.install-card:active { transform: scale(0.98); }
.install-card > span:not(.ci) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.install-card strong { font-size: var(--text-md); }
.install-card strong + span { color: var(--color-muted); font-size: var(--text-sm); }
.install-card > .ic { width: 20px; height: 20px; flex: none; color: var(--color-muted); }
.steps { display: grid; gap: var(--space-sm); padding-left: 1.25rem; line-height: 1.5; }

/* ---------- admin ---------- */
.btn.sm { min-height: 40px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.btn.sm .ic { width: 16px; height: 16px; }
.adm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xs); margin: var(--space-md) 0 var(--space-lg); }
.adm-stats > div { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-card); }
.adm-stats dt { color: var(--color-muted); font-size: var(--text-xs); font-weight: 600; line-height: 1.3; }
.adm-stats dd { margin: 2px 0 0; font-size: var(--text-xl); font-weight: 800; }
.adm-list { padding: var(--space-2xs) var(--space-md); }
.adm-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding: var(--space-sm) 0; }
.adm-row + .adm-row { border-top: 1px solid var(--color-rule); }
.adm-who { display: grid; gap: 2px; min-width: 0; flex: 1 1 14rem; }
.adm-who strong { overflow-wrap: anywhere; }
.adm-who strong + span { color: var(--color-muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.adm-code { letter-spacing: 0.06em; }
.adm-act { display: flex; align-items: center; gap: var(--space-xs); }
.adm-act .iconbtn { width: 40px; height: 40px; }
.adm-act .iconbtn .ic { width: 18px; height: 18px; }
.adm-gen { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem; gap: 0 var(--space-sm); align-items: end; margin-bottom: var(--space-md); padding: var(--space-md); border-radius: var(--radius-card); }
.adm-gen .btn, .adm-gen .help { grid-column: 1 / -1; }
.adm-gen .help { margin-top: var(--space-xs); }
