/* Dastak Mini App — UI v3 «Liquid Glass»
   Same UX as v2 (every id/class/flow untouched); only the skin changed:
   - frosted, refractive glass panels floating over a slow liquid aurora
   - specular highlight that follows the finger/pointer
   - a liquid "drop" that flows between tabs, segmented pills that slide
   - jelly switches, ripples, staggered page entrances, count-up numbers
   Motion is disabled automatically for prefers-reduced-motion. */
:root {
  --bg: #e9eef9;
  --bg-2: #f6f8ff;
  --glass: rgba(255, 255, 255, 0.52);
  --glass-2: rgba(255, 255, 255, 0.34);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --glass-edge: rgba(255, 255, 255, 0.85);
  --glass-edge-2: rgba(255, 255, 255, 0.25);
  --surface: var(--glass);
  --surface-2: rgba(120, 140, 190, 0.12);
  --text: #0e1430;
  --text-2: #4a5373;
  --text-3: #7f88a6;
  --line: rgba(30, 45, 100, 0.09);
  --accent: #1f6fff;
  --accent-2: #00b8d9;
  --accent-text: #ffffff;
  --accent-soft: rgba(31, 111, 255, 0.13);
  --ok: #10a46b;
  --ok-2: #3fd9a0;
  --ok-soft: rgba(16, 164, 107, 0.14);
  --warn: #c77a06;
  --warn-soft: rgba(240, 160, 30, 0.16);
  --danger: #e0344a;
  --danger-soft: rgba(224, 52, 74, 0.12);
  --gold: #c58a0c;
  --gold-2: #f0be3d;
  --blob-1: #6fa8ff;
  --blob-2: #6ee7f2;
  --blob-3: #c4a3ff;
  --blob-4: #ffd27a;
  --radius: 24px;
  --radius-s: 16px;
  --blur: 22px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 -1px 0 rgba(30, 45, 100, 0.04) inset,
            0 10px 30px -12px rgba(30, 50, 120, 0.25), 0 2px 6px -2px rgba(30, 50, 120, 0.08);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 22px 50px -18px rgba(30, 50, 120, 0.4);
  --dur: 260ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --jelly: cubic-bezier(0.68, -0.6, 0.32, 1.6);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #060918;
  --bg-2: #0b1030;
  --glass: rgba(28, 36, 72, 0.42);
  --glass-2: rgba(40, 50, 95, 0.28);
  --glass-strong: rgba(30, 38, 78, 0.78);
  --glass-edge: rgba(170, 190, 255, 0.28);
  --glass-edge-2: rgba(170, 190, 255, 0.06);
  --surface-2: rgba(140, 160, 255, 0.09);
  --text: #eef1ff;
  --text-2: #a9b2d6;
  --text-3: #7480aa;
  --line: rgba(170, 190, 255, 0.09);
  --accent: #5b9bff;
  --accent-2: #36e0f5;
  --accent-text: #061026;
  --accent-soft: rgba(91, 155, 255, 0.17);
  --ok: #3fe0a2;
  --ok-2: #8bffd2;
  --ok-soft: rgba(63, 224, 162, 0.15);
  --warn: #ffc25c;
  --warn-soft: rgba(255, 194, 92, 0.15);
  --danger: #ff7d8e;
  --danger-soft: rgba(255, 125, 142, 0.14);
  --gold: #ffd36b;
  --gold-2: #ffe7a3;
  --blob-1: #2f5bff;
  --blob-2: #00b3d6;
  --blob-3: #8a3dff;
  --blob-4: #ff9f43;
  --shadow: 0 1px 0 rgba(200, 215, 255, 0.14) inset, 0 -1px 0 rgba(0, 0, 0, 0.25) inset,
            0 16px 40px -16px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 1px 0 rgba(200, 215, 255, 0.2) inset, 0 26px 60px -20px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: transparent; color: var(--text);
  font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.7;
  min-height: 100vh;
  padding-bottom: calc(108px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }

/* ================================================== liquid aurora backdrop */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-2), var(--bg) 70%); }
.aurora i {
  position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%;
  filter: blur(60px); opacity: 0.55; mix-blend-mode: normal; will-change: transform;
}
[data-theme="dark"] .aurora i { opacity: 0.42; }
.aurora i:nth-child(1) { background: var(--blob-1); top: -22vmax; right: -18vmax; animation: drift1 22s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: var(--blob-2); top: 30vh; left: -26vmax; width: 52vmax; height: 52vmax; animation: drift2 26s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: var(--blob-3); bottom: -26vmax; right: -10vmax; animation: drift3 30s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { background: var(--blob-4); top: 45vh; right: 10vw; width: 26vmax; height: 26vmax; opacity: 0.32; animation: drift4 18s ease-in-out infinite alternate; }
.aurora::after { /* fine grain so the blur never bands */
  content: ""; position: absolute; inset: -50%; opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes drift1 { to { transform: translate(-14vw, 18vh) scale(1.15) rotate(30deg); } }
@keyframes drift2 { to { transform: translate(22vw, -10vh) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-18vw, -22vh) scale(1.2); } }
@keyframes drift4 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30vw, 10vh) scale(1.4); } 100% { transform: translate(-10vw, -20vh) scale(0.8); } }

/* ===================================================== glass material */
.glass, .card, .list, details.guide, .topbar .icon-btn, .mode-pill, .tabbar, .sheet, .toast, .banner {
  position: relative;
  background: linear-gradient(155deg, var(--glass-strong) -40%, var(--glass) 35%, var(--glass-2) 120%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  box-shadow: var(--shadow);
}
/* luminous rim: a gradient border painted with mask */
.card::before, .list::before, details.guide::before, .tabbar::before, .sheet::before, .icon-btn::before, .mode-pill::before, .banner::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, var(--glass-edge), var(--glass-edge-2) 40%, transparent 60%, var(--glass-edge-2) 85%, var(--glass-edge));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* specular highlight that follows the pointer (JS sets --mx/--my) */
.card::after, .list::after, details.guide::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 85%) var(--my, -10%), rgba(255, 255, 255, 0.38), transparent 60%);
  opacity: var(--spec, 0.55); transition: opacity 400ms var(--ease); mix-blend-mode: soft-light;
}
[data-theme="dark"] .card::after, [data-theme="dark"] .list::after, [data-theme="dark"] details.guide::after {
  background: radial-gradient(260px circle at var(--mx, 85%) var(--my, -10%), rgba(150, 180, 255, 0.22), transparent 60%);
  mix-blend-mode: screen;
}

/* ============================================================ top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px; transition: padding var(--dur) var(--ease);
}
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity var(--dur) var(--ease);
  background: linear-gradient(to bottom, var(--glass-strong), var(--glass-2));
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent);
}
.topbar.scrolled::before { opacity: 1; }
.topbar.scrolled { padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.2px; }
.brand .logo-img { width: 38px; height: 38px; border-radius: 13px; object-fit: cover; box-shadow: 0 8px 20px -6px var(--accent); }
.brand .logo {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center;
  color: #fff; font-size: 1.1rem; overflow: hidden; isolation: isolate;
  background: conic-gradient(from var(--spin, 0deg), var(--accent), var(--accent-2), #8a5bff, var(--accent));
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  box-shadow: 0 8px 20px -6px var(--accent), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  animation: blobMorph 9s ease-in-out infinite, spin 12s linear infinite;
}
.brand .logo::after { content: ""; position: absolute; inset: 2px 6px auto 6px; height: 45%; border-radius: 50%;
  background: linear-gradient(rgba(255, 255, 255, 0.65), transparent); z-index: -1; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
@keyframes blobMorph {
  0%, 100% { border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; }
  33% { border-radius: 58% 42% 40% 60% / 55% 60% 40% 45%; }
  66% { border-radius: 48% 52% 62% 38% / 40% 52% 48% 60%; }
}
.brand small { display: block; font-size: 0.72rem; color: var(--text-3); font-weight: 500; line-height: 1.2; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  border: 0; color: var(--text); overflow: hidden;
  min-width: 42px; height: 42px; border-radius: 999px; cursor: pointer; font-size: 1.05rem; font-family: inherit;
  transition: transform 400ms var(--spring);
}
.icon-btn:active { transform: scale(0.88); }
.icon-btn.spin-once { animation: themeFlip 600ms var(--spring); }
@keyframes themeFlip { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(0.7); } 100% { transform: rotate(360deg) scale(1); } }
.mode-pill {
  border: 0; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 0.8rem; overflow: hidden;
  padding: 9px 14px; border-radius: 999px; color: var(--text-2);
  transition: color var(--dur), transform 400ms var(--spring);
}
.mode-pill:active { transform: scale(0.92); }
.mode-pill[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2), #8a5bff, var(--accent));
  background-size: 300% 100%; animation: flow 6s linear infinite;
  box-shadow: 0 8px 22px -8px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
@keyframes flow { to { background-position: 300% 0; } }

/* ============================================================ layout */
main { padding: 4px 16px 16px; max-width: 640px; margin: 0 auto; }
.page { display: none; }
.page.active { display: block; }
/* Entrances animate the glass panels themselves (never an ancestor: an
   ancestor with opacity/filter would cut the panels off from the aurora). */
.page.active .stagger { animation: rise 680ms var(--spring) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.95); } to { opacity: 1; transform: none; } }

.page-title { font-size: 1.6rem; font-weight: 900; margin: 8px 4px 2px; letter-spacing: -0.5px;
  background: linear-gradient(100deg, var(--text) 30%, var(--accent) 60%, var(--accent-2) 80%, var(--text) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: titleSheen 7s ease-in-out infinite; }
@keyframes titleSheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.page-sub { color: var(--text-2); font-size: 0.88rem; margin: 0 4px 16px; }
.section-label { font-size: 0.78rem; font-weight: 800; color: var(--text-3); margin: 22px 8px 10px; letter-spacing: 0.2px;
  display: flex; align-items: center; gap: 8px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to left, transparent, var(--line)); }

/* ============================================================ cards */
.card { border-radius: var(--radius); padding: 18px; margin-bottom: 14px; overflow: hidden; }
.card > * { position: relative; z-index: 1; }
.card h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; }
.card .desc, .muted { color: var(--text-2); font-size: 0.86rem; }
.tiny { font-size: 0.76rem; color: var(--text-3); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.clickable { cursor: pointer; transition: transform 500ms var(--spring), box-shadow var(--dur); }
.clickable:hover { box-shadow: var(--shadow-lift); }
.clickable:active { transform: scale(0.965); transition-duration: 120ms; }

/* hero status: a living liquid orb */
.hero { padding: 22px; }
.hero .status-ico {
  position: relative; width: 60px; height: 60px; display: grid; place-items: center;
  font-size: 1.7rem; flex-shrink: 0; isolation: isolate;
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  animation: blobMorph 7s ease-in-out infinite, bob 4s ease-in-out infinite;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), transparent 35%), var(--orb, var(--accent-soft));
  box-shadow: inset 0 -6px 14px rgba(0, 0, 0, 0.08), 0 10px 26px -10px var(--orb-glow, var(--accent));
}
.hero .status-ico::before { /* pulse ring */
  content: ""; position: absolute; inset: -6px; border-radius: inherit; z-index: -1;
  border: 2px solid var(--orb-glow, var(--accent)); opacity: 0; animation: ring 2.6s var(--ease) infinite;
}
@keyframes ring { 0% { transform: scale(0.85); opacity: 0.55; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
.hero.ok .status-ico { --orb: linear-gradient(140deg, var(--ok-2), var(--ok)); --orb-glow: var(--ok); }
.hero.down .status-ico { --orb: linear-gradient(140deg, #ffd88a, var(--warn)); --orb-glow: var(--warn); }
.hero.bad .status-ico { --orb: linear-gradient(140deg, #ffa3b0, var(--danger)); --orb-glow: var(--danger); }
.hero.ok { --tint: var(--ok-soft); } .hero.down { --tint: var(--warn-soft); } .hero.bad { --tint: var(--danger-soft); }
.hero { background-image: radial-gradient(120% 140% at 100% 0%, var(--tint, transparent), transparent 60%),
  linear-gradient(155deg, var(--glass-strong) -40%, var(--glass) 35%, var(--glass-2) 120%); }
.hero h2 { margin: 0; font-size: 1.2rem; font-weight: 900; line-height: 1.5; letter-spacing: -0.3px; }
.hero p { margin: 2px 0 0; color: var(--text-2); font-size: 0.88rem; }
.hero-head { display: flex; gap: 16px; align-items: center; }

.stat { padding: 16px 18px; }
.stat .label { font-size: 0.78rem; color: var(--text-3); font-weight: 700; }
.stat .value { font-size: 1.7rem; font-weight: 900; line-height: 1.35; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.stat .value.gold, .gold-text {
  background: linear-gradient(100deg, var(--gold), var(--gold-2) 40%, #fff6d6 50%, var(--gold-2) 60%, var(--gold));
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: goldShine 4.5s ease-in-out infinite;
}
@keyframes goldShine { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.stat .hint { font-size: 0.78rem; color: var(--text-2); }
#statWallet::before { background: linear-gradient(160deg, rgba(240, 190, 61, 0.7), var(--glass-edge-2) 40%, transparent 60%, rgba(240, 190, 61, 0.35)); }

/* checklist (first-run) */
.steps { list-style: none; margin: 8px 0 0; padding: 0; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps .dot {
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 800; flex-shrink: 0;
  background: var(--surface-2); color: var(--text-2); transition: all 400ms var(--spring);
}
.steps li.done .dot { background: linear-gradient(140deg, var(--ok-2), var(--ok)); color: #fff; box-shadow: 0 6px 14px -6px var(--ok); animation: pop 500ms var(--spring); }
.steps li.current .dot { background: linear-gradient(140deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 0 0 0 var(--accent); animation: beacon 2s infinite; }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(31, 111, 255, 0.45); } 70%, 100% { box-shadow: 0 0 0 12px rgba(31, 111, 255, 0); } }
@keyframes pop { 0% { transform: scale(0.4); } 100% { transform: scale(1); } }
.steps li.done .t { color: var(--text-3); text-decoration: line-through; }
.steps .t { flex: 1; font-weight: 600; font-size: 0.92rem; }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12); }
.progress > i { position: relative; display: block; height: 100%; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 900ms var(--spring);
  box-shadow: 0 0 14px var(--accent); }
.progress > i::after { /* liquid waves running inside the bar */
  content: ""; position: absolute; inset: 0; width: 200%;
  background: repeating-linear-gradient(110deg, rgba(255, 255, 255, 0) 0 10px, rgba(255, 255, 255, 0.35) 10px 18px);
  animation: wave 1.4s linear infinite; }
@keyframes wave { to { transform: translateX(-36px); } }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px;
  background: var(--surface-2); font-size: 0.8rem; font-weight: 700; color: var(--text-2);
  border: 1px solid var(--line); animation: chipIn 500ms var(--spring) both;
}
.chip:nth-child(2) { animation-delay: 60ms; } .chip:nth-child(3) { animation-delay: 120ms; } .chip:nth-child(4) { animation-delay: 180ms; } .chip:nth-child(5) { animation-delay: 240ms; }
@keyframes chipIn { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(16, 164, 107, 0.2); }
.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 800; white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.off { background: var(--surface-2); color: var(--text-2); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.tag.pro { background: var(--accent-soft); color: var(--accent); }

/* ============================================================ buttons */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 0.92rem;
  min-height: 46px; padding: 10px 18px; border-radius: 16px;
  background: var(--surface-2); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 0 0 1px var(--line);
  transition: transform 450ms var(--spring), box-shadow var(--dur), opacity var(--dur), filter var(--dur);
}
.btn:active { transform: scale(0.95); transition-duration: 110ms; }
.btn:disabled { opacity: 0.55; cursor: progress; filter: saturate(0.6); }
.btn:disabled::after { /* inline liquid loader */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: sweep 900ms linear infinite;
}
@keyframes sweep { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2) -10%, var(--accent) 55%, #6a4dff 130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 6px rgba(0, 0, 0, 0.12), 0 12px 26px -12px var(--accent);
}
.btn.primary::before { /* glossy top + periodic sheen */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 50%),
              linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  background-size: 100% 100%, 250% 100%; background-repeat: no-repeat;
  animation: sheen 4.2s ease-in-out infinite;
}
@keyframes sheen { 0%, 60% { background-position: 0 0, 160% 0; } 100% { background-position: 0 0, -60% 0; } }
.btn.soft { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(31, 111, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn.danger { background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(224, 52, 74, 0.18); }
.btn.ghost { background: transparent; color: var(--accent); padding-inline: 8px; box-shadow: none; }
.btn.block { width: 100%; margin-top: 14px; }
.btn.sm { min-height: 36px; padding: 6px 14px; font-size: 0.84rem; border-radius: 13px; }
.link-btn {
  border: 0; background: none; color: var(--accent); font-family: inherit; font-weight: 800;
  font-size: 0.85rem; cursor: pointer; padding: 8px 0 0; display: inline-flex; gap: 4px; align-items: center;
}
/* ripple (JS injects .ripple) */
.ripple { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%);
  transform: scale(0); animation: ripple 650ms var(--ease) forwards; }
[data-theme="dark"] .ripple { background: radial-gradient(circle, rgba(160, 190, 255, 0.4), rgba(160, 190, 255, 0) 70%); }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ============================================================ list rows */
.list { border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.list > * { position: relative; z-index: 1; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); min-height: 58px;
  position: relative; overflow: hidden; transition: background var(--dur); }
.item:first-child { border-top: 0; }
.item .ico {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--glass-strong), var(--surface-2)); font-size: 1.1rem; flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 10px -6px rgba(30, 50, 120, 0.35);
  transition: transform 500ms var(--spring);
}
.item .body { flex: 1; min-width: 0; }
.item .name { font-weight: 800; font-size: 0.95rem; }
.item .sub { font-size: 0.8rem; color: var(--text-2); line-height: 1.55; }
.item.nav { cursor: pointer; }
.item.nav:active { background: var(--surface-2); }
.item.nav:active .ico, .item.nav:hover .ico { transform: scale(1.08) rotate(-6deg); }
.item.nav::after { content: "‹"; color: var(--text-3); font-size: 1.4rem; transition: transform 400ms var(--spring); }
.item.nav:hover::after { transform: translateX(-4px); }

/* feature cards */
.feat { padding: 0; overflow: hidden; transition: box-shadow 500ms var(--ease); }
.feat .item { border-top: 0; padding: 18px 16px; }
.feat .item .ico { width: 48px; height: 48px; border-radius: 15px; font-size: 1.35rem; }
.feat.on { box-shadow: var(--shadow), 0 0 0 1px rgba(16, 164, 107, 0.18), 0 18px 40px -22px var(--ok); }
.feat.on .item .ico { background: linear-gradient(145deg, var(--ok-2), var(--ok)); box-shadow: 0 8px 18px -8px var(--ok), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: icoWobble 600ms var(--spring); }
.feat.on::after { --spec: 0.85; }
@keyframes icoWobble { 0% { transform: scale(0.8) rotate(-12deg); } 60% { transform: scale(1.12) rotate(4deg); } 100% { transform: none; } }
.feat .more { border-top: 1px solid var(--line); padding: 0 16px; background: transparent; }
.feat .more > summary {
  list-style: none; cursor: pointer; padding: 12px 0; font-size: 0.85rem; font-weight: 800; color: var(--accent);
  display: flex; align-items: center; justify-content: space-between;
}
.feat .more > summary::-webkit-details-marker { display: none; }
.feat .more > summary::after { content: "▾"; transition: transform 500ms var(--spring); }
.feat .more[open] > summary::after { transform: rotate(180deg); }
.feat .more[open] .panel, details.guide[open] > :not(summary) { animation: unfold 450ms var(--ease) both; }
@keyframes unfold { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { transform: translateY(-10px); } to { transform: none; } }
.feat .more .panel { padding: 0 0 16px; }
.panel .sub-title { font-size: 0.8rem; font-weight: 800; color: var(--text-3); margin: 12px 0 4px; }
.panel .opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; }
.panel .opt span { font-size: 0.9rem; }
.panel .note { font-size: 0.78rem; color: var(--text-3); margin-top: 6px; }
.badge-maint { font-size: 0.75rem; color: var(--warn); font-weight: 800; }

/* ============================================================ jelly switch */
.switch {
  width: 56px; height: 34px; border-radius: 999px; border: 0; cursor: pointer; flex-shrink: 0; position: relative; overflow: hidden;
  background: var(--surface-2);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.14), inset 0 0 0 1px var(--line);
  transition: background 400ms var(--ease), box-shadow 400ms var(--ease);
}
.switch::before { /* liquid fill that floods in */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, var(--ok-2), var(--ok));
  clip-path: circle(0% at 82% 50%); transition: clip-path 520ms var(--ease);
}
[dir="rtl"] .switch::before { clip-path: circle(0% at 82% 50%); }
.switch .knob {
  position: absolute; top: 3px; inset-inline-start: 3px; width: 28px; height: 28px;
  border-radius: 999px; background: #fff; z-index: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22), inset 0 -2px 3px rgba(0, 0, 0, 0.06);
  transition: transform 560ms var(--jelly), width 260ms var(--ease);
}
.switch:active .knob { width: 36px; } /* liquid stretch while pressed */
.switch[aria-checked="true"]:active .knob { transform: translateX(-14px); }
.switch[aria-checked="true"] { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 6px 16px -6px var(--ok); }
.switch[aria-checked="true"]::before { clip-path: circle(120% at 82% 50%); }
.switch[aria-checked="true"] .knob { transform: translateX(-22px); }
.switch:disabled { opacity: 0.4; cursor: not-allowed; }
.switch.splash .knob { animation: knobSquish 520ms var(--spring); }
@keyframes knobSquish { 0% { scale: 1 1; } 30% { scale: 1.3 0.78; } 60% { scale: 0.9 1.1; } 100% { scale: 1 1; } }

/* ============================================================ segmented (liquid pill) */
.seg { position: relative; display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 0 0 1px var(--line); isolation: isolate; }
.seg .seg-pill { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 12px; z-index: -1;
  background: linear-gradient(160deg, var(--glass-strong), var(--glass));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 6px 16px -8px rgba(30, 50, 120, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 0 0 1px var(--glass-edge-2);
  transition: transform 560ms var(--spring), width 560ms var(--spring); }
.seg button {
  position: relative; flex: 1; border: 0; background: transparent; color: var(--text-2); min-height: 40px; overflow: hidden;
  padding: 6px 8px; border-radius: 12px; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 0.86rem;
  transition: color var(--dur);
}
.seg button[aria-pressed="true"] { color: var(--text); }
.seg:not(.has-pill) button[aria-pressed="true"] { background: var(--glass-strong); box-shadow: var(--shadow); }

/* ============================================================ inputs */
.input {
  width: 100%; border: 1.5px solid var(--line); color: var(--text);
  background: linear-gradient(160deg, var(--glass-2), var(--surface-2));
  border-radius: 16px; padding: 12px 14px; font-family: inherit; font-size: 1rem; min-height: 50px;
  margin-top: 10px; transition: border-color var(--dur), box-shadow 400ms var(--ease), transform 400ms var(--spring);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.06);
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), inset 0 2px 5px rgba(0, 0, 0, 0.04); transform: translateY(-1px); }
.input.ltr { direction: ltr; text-align: left; letter-spacing: 0.5px; }
.input.code { text-align: center; font-size: 1.6rem; letter-spacing: 12px; font-weight: 900; }
.input.shake { animation: shake 420ms var(--ease); border-color: var(--danger); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.field-hint { font-size: 0.78rem; color: var(--text-3); margin-top: 6px; }

/* wizard */
.wizard-steps { display: flex; gap: 6px; margin: 4px 0 14px; }
.wizard-steps i { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); position: relative; overflow: hidden; }
.wizard-steps i.on::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent)); transform-origin: right; animation: fillIn 700ms var(--spring) both; }
@keyframes fillIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.safe-note {
  display: flex; gap: 8px; align-items: flex-start; font-size: 0.8rem; color: var(--text-2);
  background: var(--surface-2); padding: 11px 13px; border-radius: 14px; margin-top: 14px; border: 1px solid var(--line);
}

/* banners */
.banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 18px; margin-bottom: 12px; font-size: 0.88rem; font-weight: 700;
  animation: bannerIn 600ms var(--spring) both; overflow: hidden; }
.banner > * { position: relative; z-index: 1; }
.banner.warn { color: var(--warn); background-image: linear-gradient(120deg, var(--warn-soft), transparent); }
.banner.bad { color: var(--danger); background-image: linear-gradient(120deg, var(--danger-soft), transparent); }
.banner.bad::after { content: ""; position: absolute; inset: 0; background: var(--danger-soft); animation: alarm 2.4s ease-in-out infinite; }
@keyframes alarm { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes bannerIn { from { opacity: 0; transform: translateY(-14px) scale(0.95); } to { opacity: 1; transform: none; } }
.banner .btn { margin-inline-start: auto; }

/* packages */
.pkg { position: relative; display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-top: 1px solid var(--line); transition: background var(--dur); }
.pkg:first-child { border-top: 0; }
.pkg:hover { background: var(--surface-2); }
.pkg .amount { font-weight: 900; font-size: 1.08rem; }
.pkg .price { font-size: 0.82rem; color: var(--text-2); }
.pkg .bonus { display: inline-block; color: var(--ok); font-size: 0.75rem; font-weight: 800; animation: bonusPulse 2.2s ease-in-out infinite; }
@keyframes bonusPulse { 0%, 100% { transform: none; } 50% { transform: scale(1.06); } }
.mono { direction: ltr; display: inline-block; font-variant-numeric: tabular-nums; letter-spacing: 1px; }

/* tx */
.tx { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 0.88rem;
  animation: txIn 500ms var(--ease) both; }
.tx:nth-child(2) { animation-delay: 40ms; } .tx:nth-child(3) { animation-delay: 80ms; } .tx:nth-child(4) { animation-delay: 120ms; }
.tx:nth-child(5) { animation-delay: 160ms; } .tx:nth-child(n+6) { animation-delay: 200ms; }
@keyframes txIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.tx:first-child { border-top: 0; }
.tx .when { font-size: 0.74rem; color: var(--text-3); }
.pos { color: var(--ok); font-weight: 900; } .neg { color: var(--danger); font-weight: 900; }

/* skeleton / empty / error */
.skel { border-radius: 12px; min-height: 16px; margin: 8px 0; position: relative; overflow: hidden; background: var(--surface-2); }
.skel::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.5) 50%, transparent 80%);
  animation: skel 1.3s ease-in-out infinite; }
[data-theme="dark"] .skel::after { background: linear-gradient(100deg, transparent 20%, rgba(150, 180, 255, 0.14) 50%, transparent 80%); }
@keyframes skel { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.empty { text-align: center; padding: 24px 16px; color: var(--text-2); font-size: 0.88rem; }
.empty .big { font-size: 2.2rem; display: block; margin-bottom: 4px; animation: floaty 3.2s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-4deg); } }
.error-box { text-align: center; padding: 18px; color: var(--text-2); font-size: 0.88rem; }

/* guide */
details.guide { border-radius: 20px; margin-bottom: 12px; padding: 0 16px; overflow: hidden; }
details.guide > * { position: relative; z-index: 1; }
details.guide summary { cursor: pointer; font-weight: 800; list-style: none; padding: 15px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
details.guide summary::-webkit-details-marker { display: none; }
details.guide summary::after { content: "▾"; color: var(--text-3); transition: transform 500ms var(--spring); }
details.guide[open] summary::after { transform: rotate(180deg); color: var(--accent); }
details.guide[open] { box-shadow: var(--shadow-lift); }
details.guide p, details.guide ol { font-size: 0.88rem; color: var(--text-2); line-height: 1.95; margin: 0 0 12px; }
details.guide code, .card code { direction: ltr; display: inline-block; background: var(--surface-2); padding: 0 7px; border-radius: 7px; border: 1px solid var(--line); }
.glossary dt { font-weight: 800; margin-top: 8px; }
.glossary dd { margin: 0 0 6px; color: var(--text-2); font-size: 0.86rem; }

/* pro-only blocks */
body:not(.pro) .pro-only { display: none !important; }
body.pro .simple-only { display: none !important; }
body.pro .pro-only { animation: slideDown 500ms var(--spring) both; }

/* ============================================================ floating liquid tab bar */
.tabbar {
  position: fixed; z-index: 30; display: flex; justify-content: space-around;
  inset-inline: 14px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto;
  padding: 6px; border-radius: 30px; isolation: isolate;
  box-shadow: var(--shadow-lift);
}
.tabbar .tab-blob {
  position: absolute; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 24px; z-index: -1; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12)), var(--accent-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 2px rgba(0, 0, 0, 0.06), 0 6px 18px -8px var(--accent), inset 0 0 0 1px var(--glass-edge-2);
  transition: transform 620ms var(--spring), width 620ms var(--spring);
}
[data-theme="dark"] .tabbar .tab-blob { background: linear-gradient(160deg, rgba(160, 190, 255, 0.28), rgba(160, 190, 255, 0.05)), var(--accent-soft);
  box-shadow: inset 0 1px 0 rgba(200, 215, 255, 0.35), 0 6px 22px -8px var(--accent); }
.tabbar .tab-blob.moving { animation: goo 620ms var(--ease); }
@keyframes goo { 0% { scale: 1 1; } 35% { scale: 1.25 0.8; } 70% { scale: 0.94 1.06; } 100% { scale: 1 1; } }
.tabbar button {
  position: relative; flex: 1; border: 0; background: transparent; color: var(--text-3); overflow: hidden;
  font-family: inherit; font-size: 0.72rem; font-weight: 800; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 4px; border-radius: 24px; min-height: 54px; transition: color var(--dur);
}
.tabbar button .ico { font-size: 1.32rem; line-height: 1.2; filter: grayscale(1); opacity: 0.6; transition: filter var(--dur), opacity var(--dur), transform 520ms var(--spring); }
.tabbar button[aria-selected="true"] { color: var(--accent); }
.tabbar button[aria-selected="true"] .ico { filter: none; opacity: 1; transform: translateY(-2px) scale(1.14); }
.tabbar button[aria-selected="true"] .ico { animation: tabBounce 600ms var(--spring); }
@keyframes tabBounce { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-6px) scale(1.25); } 100% { transform: translateY(-2px) scale(1.14); } }
.tabbar:not(.has-blob) button[aria-selected="true"] { background: var(--accent-soft); }

/* ============================================================ bottom sheet */
.sheet-back { position: fixed; inset: 0; z-index: 40; display: none;
  background: rgba(8, 12, 30, 0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet-back.open { display: block; animation: fadeIn 300ms var(--ease); }
@keyframes fadeIn { from { opacity: 0; } }
.sheet {
  position: fixed; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 41; display: none;
  border-radius: 30px; padding: 12px 20px 20px;
  max-width: 620px; margin: 0 auto; overflow: hidden;
  background: linear-gradient(160deg, var(--glass-strong), var(--glass));
  -webkit-backdrop-filter: blur(30px) saturate(200%); backdrop-filter: blur(30px) saturate(200%);
  box-shadow: var(--shadow-lift);
}
.sheet > * { position: relative; z-index: 1; }
.sheet::after { content: ""; display: block; position: absolute; top: 10px; left: 50%; translate: -50% 0; width: 42px; height: 5px; border-radius: 999px; background: var(--text-3); opacity: 0.35; }
.sheet h3 { margin: 16px 0 6px; font-size: 1.1rem; font-weight: 900; }
.sheet.open { display: block; animation: sheetUp 560ms var(--spring); }
.sheet p { white-space: pre-line; }
.sheet .row { margin-top: 18px; }
.sheet .row .btn { flex: 1; }
@keyframes sheetUp { from { transform: translateY(110%) scale(0.96); } to { transform: none; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================================ toast: liquid pill */
.toast {
  position: fixed; bottom: calc(96px + env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; z-index: 50;
  width: max-content; max-width: calc(100% - 40px);
  display: none; text-align: center; padding: 12px 20px; border-radius: 999px; font-weight: 800; font-size: 0.9rem;
  color: var(--text); background: linear-gradient(160deg, var(--glass-strong), var(--glass));
  -webkit-backdrop-filter: blur(24px) saturate(200%); backdrop-filter: blur(24px) saturate(200%);
  box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--glass-edge-2);
}
.toast.show { display: block; animation: toastIn 620ms var(--spring); }
@keyframes toastIn { 0% { opacity: 0; transform: translateY(24px) scale(0.6, 0.4); } 55% { transform: translateY(-4px) scale(1.06, 0.95); opacity: 1; } 100% { transform: none; } }

/* ============================================================ celebration bubbles */
.bubble { position: fixed; z-index: 60; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), var(--c, var(--ok-2)) 45%, var(--c, var(--ok)));
  box-shadow: 0 0 10px var(--c, var(--ok)); animation: bubble 900ms var(--ease) forwards; }
@keyframes bubble { 0% { transform: translate(0, 0) scale(0.4); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; } }

/* Chromium-only real refraction for the tab bar & sheet (JS adds html.liquid) */
html.liquid .tabbar, html.liquid .sheet { -webkit-backdrop-filter: url(#liquidGlass) blur(14px) saturate(190%); backdrop-filter: url(#liquidGlass) blur(14px) saturate(190%); }

/* theme switch: circular reveal (View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: reveal 700ms var(--ease); }
@keyframes reveal { from { clip-path: circle(0 at var(--vx, 90%) var(--vy, 4%)); } to { clip-path: circle(150% at var(--vx, 90%) var(--vy, 4%)); } }

@media (min-width: 700px) { .aurora i { filter: blur(90px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================== v3.1: archive, invite, meter, chart, checkout, network */
.tg-main .tg-dup, .tg-main [data-main] { display: none !important; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid3 .stat .value { font-size: 1.35rem; }
.seg-sm button { min-height: 32px; font-size: 0.78rem; }
.arch-tabs { margin-bottom: 12px; }
.arch-tabs .cnt { font-style: normal; font-size: 0.7rem; opacity: 0.7; }
.arch-tools { display: grid; gap: 10px; margin-bottom: 12px; }
.arch-tools .search { position: relative; }
.arch-tools .search span { position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%; margin-top: 5px; z-index: 1; }
.arch-tools .search .input { padding-inline-start: 42px; }
.arch-item { padding: 14px 16px; transition: opacity 350ms var(--ease), transform 350ms var(--ease); }
.arch-item.gone { opacity: 0; transform: translateX(40px) scale(0.95); }
.arch-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.76rem; color: var(--text-3); margin-bottom: 6px; }
.arch-text { margin: 0 0 8px; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.diff { display: grid; gap: 8px; margin-bottom: 8px; }
.diff > div { padding: 10px 12px; border-radius: 14px; white-space: pre-wrap; word-break: break-word; font-size: 0.88rem; }
.diff small { display: block; font-weight: 800; font-size: 0.72rem; margin-bottom: 2px; }
.diff .before { background: var(--danger-soft); } .diff .before small { color: var(--danger); }
.diff .after { background: var(--ok-soft); } .diff .after small { color: var(--ok); }
.arch-actions { display: flex; gap: 8px; justify-content: flex-end; }
.arch-note { text-align: center; margin-top: 10px; }
.invite-promo { display: flex; gap: 14px; align-items: center; background-image: radial-gradient(120% 140% at 0% 0%, rgba(240, 190, 61, 0.22), transparent 60%), linear-gradient(155deg, var(--glass-strong) -40%, var(--glass) 35%, var(--glass-2) 120%); }
.promo-orb, .gift { width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.6rem; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; background: linear-gradient(140deg, #ffe7a3, var(--gold-2)); box-shadow: 0 10px 24px -10px var(--gold); animation: blobMorph 7s ease-in-out infinite, bob 4s ease-in-out infinite; }
.invite-promo h3 { margin: 0; } .invite-promo p { margin: 2px 0 0; }
.invite-hero { text-align: center; }
.invite-hero .gift { margin: 4px auto 10px; width: 72px; height: 72px; font-size: 2.1rem; }
.invite-hero h2 { margin: 0 0 12px; font-size: 1.15rem; }
.link-pill { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px dashed var(--accent); margin-bottom: 12px; overflow-wrap: anywhere; font-size: 0.85rem; }
.meter .clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.meter .clock .cell { text-align: center; padding: 10px 4px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.meter .clock b { display: block; font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.2; }
.meter .clock small { font-size: 0.72rem; color: var(--text-3); }
.meter .clock .cell.flip b { animation: flipIn 420ms var(--spring); }
@keyframes flipIn { from { transform: translateY(-40%) scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }
.meter.live .meter-state { background: var(--ok-soft); color: var(--ok); animation: bonusPulse 2s infinite; }
.meter.trial .meter-state { background: var(--warn-soft); color: var(--warn); }
.meter.idle .meter-state { background: var(--surface-2); color: var(--text-2); }
.drop-row { display: flex; gap: 14px; align-items: center; }
.drop { position: relative; width: 44px; height: 56px; flex-shrink: 0; overflow: hidden; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--surface-2); box-shadow: inset 0 2px 6px rgba(0,0,0,.12); }
.drop i { position: absolute; inset: auto 0 0 0; height: 0; background: linear-gradient(0deg, var(--accent), var(--accent-2)); transition: height 900ms var(--ease); }
.drop i::before { content: ""; position: absolute; top: -6px; left: -50%; width: 200%; height: 12px; border-radius: 40%; background: inherit; animation: wave 2.2s linear infinite; }
.drop-text b { display: block; } .drop-text span { font-size: 0.8rem; color: var(--text-2); }
.rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; text-align: center; }
.rates b { display: block; font-weight: 900; } .rates small { font-size: 0.72rem; color: var(--text-3); }
.chart-box { position: relative; margin-top: 8px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 1.4s var(--ease) forwards; }
.chart .area { opacity: 0; animation: fadeIn 900ms 400ms var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .pt { fill: var(--accent); stroke: var(--bg); stroke-width: 2; transition: r 200ms; }
.chart .pt.on { r: 5.5; }
.chart text { font-size: 9px; fill: var(--text-3); font-family: inherit; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart-tip { position: absolute; top: 0; inset-inline: 0; margin: auto; width: max-content; max-width: 100%; padding: 6px 12px; border-radius: 999px; font-size: 0.78rem; background: var(--glass-strong); box-shadow: var(--shadow); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 0.78rem; color: var(--text-2); }
.chart-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 4px; }
.dot.a { background: var(--accent); } .dot.t { background: var(--warn); } .dot.g { background: var(--gold-2); }
.pkg.best { background: linear-gradient(120deg, rgba(240,190,61,.14), transparent); }
.pkg .ribbon { position: absolute; top: 8px; inset-inline-end: 12px; font-size: 0.68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: linear-gradient(120deg, var(--gold), var(--gold-2)); color: #3a2600; }
.pkg-gem { width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.3rem; border-radius: 14px; background: linear-gradient(145deg, var(--glass-strong), var(--surface-2)); animation: floaty 3.6s ease-in-out infinite; }
.stars-btn { min-width: 84px; }
.celebrate { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; background: rgba(8,12,30,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity 300ms var(--ease); }
.celebrate.show { opacity: 1; }
.cel-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cel-rain i { position: absolute; top: -40px; font-style: normal; animation: rain linear forwards; }
@keyframes rain { to { transform: translateY(110vh) rotate(260deg); opacity: .2; } }
.cel-card { position: relative; width: min(360px, 100%); text-align: center; padding: 26px 22px 20px; border-radius: 30px; background: linear-gradient(160deg, var(--glass-strong), var(--glass)); -webkit-backdrop-filter: blur(30px) saturate(200%); backdrop-filter: blur(30px) saturate(200%); box-shadow: var(--shadow-lift); }
.celebrate.show .cel-card { animation: sheetUp 640ms var(--spring); }
.cel-gem { width: 96px; height: 96px; margin: -70px auto 10px; display: grid; place-items: center; font-size: 3rem; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; background: radial-gradient(circle at 30% 25%, #fff, transparent 35%), linear-gradient(140deg, var(--accent-2), var(--accent)); box-shadow: 0 18px 40px -12px var(--accent); animation: blobMorph 6s ease-in-out infinite; }
.cel-gem span { animation: tabBounce 900ms var(--spring) both; }
.cel-card h2 { margin: 0; font-weight: 900; }
.cel-amount { font-size: 1.1rem; margin: 6px 0; } .cel-amount b { font-size: 2.2rem; font-weight: 900; color: var(--gold); }
.net-pill { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; translate: -50% 0; z-index: 55; display: flex; gap: 8px; align-items: center; padding: 9px 16px; border-radius: 999px; font-size: 0.82rem; font-weight: 800; background: linear-gradient(160deg, var(--glass-strong), var(--glass)); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-lift); animation: toastIn 600ms var(--spring); }
.net-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 0 var(--warn); animation: beacon 1.6s infinite; }
.net-pill.ok .net-dot { background: var(--ok); animation: none; }
.tabbar button { font-size: 0.66rem; }
/* Location Management (F-44 Mini App) */
.loc-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.loc-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 16px; background: linear-gradient(160deg, var(--glass), var(--surface-2)); border: 1px solid var(--line); gap: 12px; }
.loc-info { flex: 1; min-width: 0; }
.loc-name { font-weight: 600; color: var(--text); word-break: break-word; }
.loc-coords { font-size: 0.75rem; color: var(--text-3); margin-top: 2px; }
.loc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.loc-rename, .loc-delete { border: none; background: none; padding: 6px 8px; font-size: 1rem; cursor: pointer; border-radius: 8px; transition: all var(--dur) var(--ease); }
.loc-rename:hover { background: rgba(31, 111, 255, 0.1); }
.loc-delete:hover { background: rgba(224, 52, 74, 0.1); }
.loc-rename:active, .loc-delete:active { transform: scale(0.92); }
#locMap { height: 220px; border-radius: 16px; margin: 10px 0; border: 1px solid var(--line); z-index: 0; background: var(--surface-2); }
#locMap img { max-width: none; }
.loc-edit { margin: 0; padding: 6px 10px; }
