/* Pelli Planner app styles. All colours come from tokens.css. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* v4 layout: the page itself never scrolls. The app is a fixed frame the height of the visible screen;
   only .scroller moves. The phone browser's address bar therefore stays put and the tab bar can't drift. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
@supports (height: 100dvh) { html, body { height: 100dvh; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
:lang(te) body, body:lang(te) { line-height: 1.65; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--leaf); }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--pasupu); outline-offset: 2px; }

/* ---------- app column ---------- */
#app { height: 100%; }
.app {
  max-width: 480px;
  height: 100%;
  margin: 0 auto;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
@media (min-width: 520px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
.topbar {
  flex: none;
  z-index: 20;
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  padding-bottom: 8px;
  padding-left: max(10px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar.dark { background: var(--hero); border-bottom-color: transparent; color: var(--hero-ink); }
.topbar.dark .wordmark { color: var(--hero-ink); }
.topbar.dark .langbtn, .topbar.dark .menubtn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: var(--hero-ink); }
.menubtn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid transparent; background: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.wordmark { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.2rem; line-height: 1; color: var(--leaf); text-decoration: none; min-width: 0; }
.wordmark .mark { width: 26px; height: 26px; flex: none; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.offline { font-size: var(--fs-xs); font-weight: 700; padding: 4px 8px; border-radius: 999px; background: var(--pasupu-soft); color: var(--warn); white-space: nowrap; }
.langbtn {
  border: 1px solid var(--line); background: var(--raised); border-radius: 999px;
  padding: 6px 12px; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; min-height: 36px;
}
.scroller {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.main {
  display: flex; flex-direction: column; gap: 16px;
  padding-top: 16px;
  padding-bottom: 96px;   /* room for the floating + button */
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.main.no-tabs { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
.main.flush { padding-top: 0; }

/* ---------- bottom tab bar (part of the frame, never position:fixed) ---------- */
.tabbar {
  flex: none; z-index: 25;
  display: flex; justify-content: center;
  background: var(--raised);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.tabbar-in { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tab {
  height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; cursor: pointer; color: var(--ink-soft);
  font-size: var(--fs-xs); font-weight: 600;
}
.tab[aria-current="page"] { color: var(--leaf); }
.tab[aria-current="page"] .ic { stroke-width: 2.2; }
.tab:disabled { opacity: .35; cursor: default; }

/* ---------- banners ---------- */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--pasupu-soft); color: var(--ink); font-size: var(--fs-sm);
}
.banner b { font-weight: 600; }

/* ---------- generic blocks ---------- */
.card {
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-title { margin: 0; font-size: var(--fs-sm); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
:lang(te) .card-title { text-transform: none; letter-spacing: 0; font-size: var(--fs-md); }
.muted { color: var(--ink-soft); }
.small { font-size: var(--fs-sm); }
.h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-xl); line-height: 1.2; margin: 0; text-wrap: balance; }
.lead { margin: 0; color: var(--ink-soft); }
.empty { padding: 20px 8px; text-align: center; color: var(--ink-soft); font-size: var(--fs-sm); }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--leaf); color: var(--on-leaf); }
.btn-wa { background: #1E8E4E; color: #fff; }
.btn-ghost { background: var(--raised); border-color: var(--line); color: var(--ink); }
.btn-danger { background: none; border-color: var(--danger); color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: var(--fs-sm); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--leaf); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* The + button floats inside the frame, just above the tab bar */
.fab-slot { position: relative; flex: none; height: 0; z-index: 24; pointer-events: none; }
.fab {
  position: absolute; pointer-events: auto;
  bottom: 14px;
  right: max(16px, env(safe-area-inset-right, 0px));
  box-shadow: var(--shadow);
}

/* ---------- home hero ---------- */
.hero { position: relative; overflow: hidden; padding: 0; gap: 0; border-color: var(--leaf-soft); }
.thoranam { display: block; width: 100%; height: 34px; color: var(--leaf); }
.thoranam .flower { fill: var(--pasupu); }
.hero-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.couple { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1.1; margin: 0; text-wrap: balance; }
.couple .amp { color: var(--pasupu); }
.hero-meta { color: var(--ink-soft); font-size: var(--fs-sm); }
.countdown { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.countdown .n { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--leaf); font-variant-numeric: tabular-nums; }
.countdown .l { font-weight: 600; color: var(--ink-soft); }

/* ---------- money ---------- */
.figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fig { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fig .k { font-size: var(--fs-xs); color: var(--ink-soft); font-weight: 600; }
.fig .v { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.fig.due .v { color: var(--warn); }
.meter { height: 10px; border-radius: 999px; background: var(--leaf-soft); overflow: hidden; display: flex; }
.meter > span { display: block; height: 100%; }
.meter .paid { background: var(--leaf); }
.meter .booked { background: color-mix(in srgb, var(--leaf) 45%, transparent); }
.meter.over .booked { background: var(--warn); }
.split { display: flex; height: 28px; border-radius: var(--r-sm); overflow: hidden; gap: 2px; }
.split > span { display: flex; align-items: center; padding: 0 8px; color: #fff; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; min-width: 0; overflow: hidden; }
.split .b { background: var(--bride); }
.split .g { background: var(--groom); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.legend > div { display: flex; flex-direction: column; min-width: 0; }
.legend .k { font-size: var(--fs-xs); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.legend .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.b { background: var(--bride); } .dot.g { background: var(--groom); } .dot.s { background: var(--shared); }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.li:first-child { border-top: 0; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 600; overflow-wrap: anywhere; }
.li-sub { font-size: var(--fs-sm); color: var(--ink-soft); }
.li-amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.li-amt .a { font-weight: 700; }
.li-amt .p { font-size: var(--fs-xs); color: var(--ink-soft); }
.li.tap { cursor: pointer; }
.li.tap:active { background: var(--leaf-soft); }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.chip.b { background: var(--bride-soft); color: var(--bride); }
.chip.g { background: var(--groom-soft); color: var(--groom); }
.chip.s { background: var(--leaf-soft); color: var(--leaf); }
.chip.lock { background: var(--pasupu-soft); color: var(--ink); }
.chip .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.chip.warn { background: var(--pasupu-soft); color: var(--warn); }

/* ---------- segmented control ---------- */
.seg { display: flex; background: var(--leaf-soft); border-radius: 999px; padding: 3px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1 0 auto; border: 0; background: none; border-radius: 999px; padding: 8px 12px; min-height: 38px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg button[aria-pressed="true"].b { color: var(--bride); }
.seg button[aria-pressed="true"].g { color: var(--groom); }

/* ---------- budget ---------- */
.cat { display: flex; flex-direction: column; gap: 0; }
.cat-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 4px; }
.cat-h h3 { margin: 0; font-size: var(--fs-md); font-weight: 700; }
.cat-h .t { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: var(--fs-sm); }
.addchips { display: flex; flex-wrap: wrap; gap: 8px; }
.addchip { border: 1px dashed var(--line); background: none; border-radius: 999px; padding: 6px 12px; font-size: var(--fs-sm); cursor: pointer; color: var(--ink-soft); }
.kumar {
  display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink);
  border: 1px solid var(--pasupu); background: var(--pasupu-soft); border-radius: var(--r-md); padding: 12px;
}
.kumar .ic { color: var(--leaf); width: 26px; height: 26px; }
.kumar b { display: block; font-weight: 700; }
.kumar span { font-size: var(--fs-xs); color: var(--ink-soft); }

/* ---------- events ---------- */
.ev { display: flex; gap: 14px; align-items: flex-start; }
.ev-date { width: 52px; flex: none; text-align: center; border-radius: var(--r-md); background: var(--leaf-soft); color: var(--leaf); padding: 6px 0; }
.ev-date .d { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.ev-date .m { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; }
.ev-date.tbd { background: var(--line); color: var(--ink-soft); }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ev-name { font-weight: 700; font-size: var(--fs-md); overflow-wrap: anywhere; }
.ev.muhurtham .ev-date { background: var(--pasupu); color: #3A2A00; }
.progress { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--leaf); }
.checks { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--leaf); flex: none; }
.check.done span { text-decoration: line-through; color: var(--ink-soft); }
.addrow { display: flex; gap: 8px; }
.addrow input { flex: 1; min-width: 0; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: var(--fs-sm); font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--raised); font-size: 16px;
}
.input:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px var(--leaf-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money-in { position: relative; }
.money-in::before { content: "₹"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.money-in .input { padding-left: 26px; font-variant-numeric: tabular-nums; }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.toggle input { width: 22px; height: 22px; margin: 0; accent-color: var(--leaf); flex: none; }
.toggle.disabled { opacity: .5; cursor: default; }
.err { color: var(--danger); font-size: var(--fs-sm); margin: 0; }
.range { width: 100%; accent-color: var(--bride); }

/* ---------- bottom sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 20, 15, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 480px; max-height: 92%; overflow-y: auto;
  background: var(--surface); border-radius: 20px 20px 0 0;
  padding-top: 8px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 14px;
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 4px; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-h h2 { margin: 0; font-size: var(--fs-lg); }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--leaf-soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet-actions .btn { flex: 1; }

/* ---------- start ---------- */
.intro { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.intro .h1 { font-size: 2rem; }
.benefits { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.benefits li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); }
.benefits .ic { width: 18px; height: 18px; color: var(--leaf); margin-top: 2px; stroke-width: 2.4; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice label { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); cursor: pointer; font-size: var(--fs-sm); min-height: 46px; }
.choice input { accent-color: var(--leaf); margin: 0; }
.choice label:has(input:checked) { border-color: var(--leaf); background: var(--leaf-soft); }

/* ---------- family ---------- */
.link-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.link-card:first-of-type { border-top: 0; }
.link-card .row .btn { flex: 1; }
.link-off { opacity: .55; }

/* ---------- elder view ---------- */
.elder { font-size: 1.25rem; gap: 20px; }
.elder .couple { font-size: 2.6rem; }
.elder .big-date { font-family: var(--font-display); font-size: 1.9rem; color: var(--leaf); }
.elder .ev-row { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.elder .ev-row b { font-size: 1.35rem; }
.elder .ev-row span { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- footer, toast ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: var(--fs-xs); color: var(--ink-soft); padding-top: 8px; }
.foot a { color: var(--ink-soft); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 14px; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.toast button { background: none; border: 0; color: var(--pasupu); font-weight: 700; cursor: pointer; padding: 4px 0; }

/* ---------- ☰ drawer ---------- */
.drawer-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(10, 20, 15, .5); display: flex; animation: fade .18s ease-out; }
.drawer {
  width: min(86%, 340px); height: 100%; background: var(--surface); overflow-y: auto;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  padding-left: env(safe-area-inset-left, 0px);
  animation: slide .22s ease-out; box-shadow: var(--shadow);
}
@keyframes slide { from { transform: translateX(-30px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer-head { background: var(--hero); color: var(--hero-ink); padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.acct { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--hero-gold); color: #2A1F00; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex: none; }
.acct .nm { font-weight: 700; }
.acct .em { font-size: var(--fs-sm); opacity: .75; overflow-wrap: anywhere; }
.drawer-head .btn { background: var(--hero-gold); color: #2A1F00; }
.dnav { display: flex; flex-direction: column; padding: 8px 0; }
.dnav .sec { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); padding: 14px 18px 6px; }
:lang(te) .dnav .sec { text-transform: none; letter-spacing: 0; }
.ditem { display: flex; align-items: center; gap: 14px; padding: 12px 18px; min-height: 52px; background: none; border: 0; width: 100%; text-align: left; color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 600; }
.ditem:active, .ditem[aria-current="page"] { background: var(--leaf-soft); }
.ditem .ic { color: var(--leaf); }
.ditem .grow small { display: block; font-weight: 400; color: var(--ink-soft); font-size: var(--fs-xs); }
.ditem .badge { font-size: var(--fs-xs); font-weight: 700; background: var(--pasupu-soft); color: var(--ink); padding: 2px 8px; border-radius: 999px; }

/* ---------- v4 home: dark hero (inspired by premium card apps), white sheet with tools ---------- */
.hero2 { background: var(--hero); color: var(--hero-ink); padding: 8px 16px 44px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.hero2::before { content: ""; position: absolute; width: 260px; height: 260px; left: -70px; top: -90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227,167,27,.32), rgba(227,167,27,0) 65%); pointer-events: none; }
.emblem { width: 64px; height: 64px; position: relative; }
.emblem svg { width: 100%; height: 100%; filter: drop-shadow(0 0 18px rgba(240,190,69,.55)); }
.hero2 .of { font-size: var(--fs-sm); opacity: .7; margin-top: 4px; }
.hero2 .couple { color: var(--hero-ink); font-size: 2rem; }
.hero2 .couple .amp { color: var(--hero-gold); }
.bigcount { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bigcount .n { font-family: var(--font-body); font-weight: 700; font-size: 3.4rem; line-height: 1; color: var(--hero-gold); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.bigcount .u { font-size: 1.15rem; font-weight: 600; color: var(--hero-gold); }
.bigcount .sub { width: 100%; font-size: var(--fs-sm); opacity: .75; }
.hcard { background: var(--hero-card); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; }
.hrow { display: flex; align-items: center; gap: 12px; padding: 16px; color: var(--hero-ink); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; text-decoration: none; }
.hrow + .hrow { border-top: 1px solid rgba(255,255,255,.07); }
.hrow .big { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hrow .big small { font-size: .95rem; font-weight: 600; }
.hrow .lbl { font-size: var(--fs-sm); opacity: .7; }
.hrow .ic { opacity: .6; }
.ring { width: 46px; height: 46px; flex: none; }
.nudge { margin: 0 8px 8px; background: #050A07; border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; color: var(--hero-ink); }
.nudge .ic { color: var(--hero-gold); }
.nudge .t { flex: 1; min-width: 0; font-size: var(--fs-sm); }
.nudge a, .nudge button { background: none; border: 0; color: var(--hero-gold); font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; font-size: var(--fs-md); padding: 6px 0; }
.sheet2 { background: var(--surface); border-radius: 26px 26px 0 0; margin-top: -26px; position: relative; padding-top: 22px; }
.tools-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tools-h h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; }
.pillbtn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--raised); border-radius: 18px; padding: 8px 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--tile); border: 1px solid var(--tile-line); border-radius: 18px; overflow: hidden; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; padding: 18px 6px 14px; min-height: 124px; background: none; border: 0; cursor: pointer; color: var(--ink); text-decoration: none; position: relative; text-align: center; }
.tile + .tile { border-left: 1px solid var(--tile-line); }
.tile:nth-child(3n+1) { border-left: 0; }
.tile:nth-child(n+4) { border-top: 1px solid var(--tile-line); }
.tile .art { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #F6D77A, #D99A12); color: #3A2A00; box-shadow: 0 6px 14px rgba(217,154,18,.28); position: relative; }
.tile .art .ic { width: 26px; height: 26px; stroke-width: 2; }
.tile .art.b { background: linear-gradient(145deg, #F2A9BF, #B3325A); color: #fff; box-shadow: 0 6px 14px rgba(179,50,90,.25); }
.tile .art.g { background: linear-gradient(145deg, #9DC0F2, #2156A0); color: #fff; box-shadow: 0 6px 14px rgba(33,86,160,.25); }
.tile .art.l { background: linear-gradient(145deg, #8FD3B0, #1F5A43); color: #fff; box-shadow: 0 6px 14px rgba(31,90,67,.25); }
.tile .bdg { position: absolute; top: 12px; left: calc(50% + 12px); background: #3A2A00; color: #F6D77A; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 8px; white-space: nowrap; }
.tile .nm { font-weight: 600; font-size: var(--fs-sm); line-height: 1.25; }
.startlist .check { border-top: 1px solid var(--line); padding: 10px 0; align-items: center; }
.startlist .check:first-child { border-top: 0; }
.startlist .go { margin-left: auto; color: var(--leaf); font-weight: 700; font-size: var(--fs-sm); background: none; border: 0; cursor: pointer; }
.savecard { border-color: var(--pasupu); background: var(--pasupu-soft); }
.gbtn { background: var(--raised); color: var(--ink); border: 1px solid var(--line); }
.gbtn svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: var(--fs-sm); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.langpick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.langpick button { min-height: 64px; border-radius: 16px; border: 1px solid var(--line); background: var(--raised); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.langpick button[aria-pressed="true"] { border-color: var(--leaf); background: var(--leaf-soft); color: var(--leaf); }
.plancard { display: flex; align-items: center; gap: 12px; }
.loading { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); padding: 40px; }

@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
  .toast { transition: none; }
}
