/* Indian House Pantry — Korean-cafe kawaii theme ("Pastel Pink", default) + "Borahae Purple".
   Mobile first, iPhone safe areas, light + dark palettes for both themes (WCAG AA checked:
   tools/contrast.py). "--rose*" is the theme's main accent (rose in Pink, purple in Borahae). */
@font-face { font-family: "Jua"; src: url("../fonts/jua-sub.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Baloo Bhai 2"; src: url("../fonts/baloobhai2.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Noto Sans Gujarati"; src: url("../fonts/notosansgujarati.woff2") format("woff2"); font-weight: 400 800; font-display: swap;
  unicode-range: U+0A80-0AFF, U+200C-200D, U+25CC, U+0964-0965; }
:root {
  --bg: #FFF7F2;            /* cream */
  --bg-2: #FFEDE6;
  --card: #FFFDFB;          /* milk */
  --card-2: #FFFFFF;
  --line: #F3D2DC;
  --text: #3A1F2B;
  --muted: #74475A;
  --rose: #B8235A;          /* strong rose for text + buttons */
  --rose-strong: #9E1C4C;
  --rose-soft: #F07FA0;     /* decorative only */
  --rose-tint: #FFE3EC;     /* milk pink */
  --on-rose: #FFFFFF;
  --lav: #6A4BAF;
  --lav-tint: #EEE6FB;
  --berry: #A8202F;
  --berry-tint: #FFE0E3;
  --leaf: #1B6B41;
  --leaf-tint: #DDF3E5;
  --amber: #7E4A00;
  --amber-tint: #FFEFD2;
  --peach: #FFD9C6; --butter: #FFF0B0; --mint: #CDEFDF;
  --dot: rgba(184, 35, 90, .10);
  --tape-a: #FFDCE6; --tape-b: #FFEAF0;
  --sticker: rgba(184, 35, 90, .22);
  --heart-a: #F07FA0; --heart-b: #FFB38A; --heart-c: #B79BEA;
  --m-jar: #FFF6EC; --m-line: #E9B9C6; --m-lid: #F48FB0; --m-ink: #4A2633; --m-blush: #FF9DB5;
  --shadow: 0 6px 18px rgba(184, 35, 90, .09), 0 1px 3px rgba(184, 35, 90, .07);
  --radius: 22px;
  --radius-sm: 14px;
  --tap: 44px;
  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --font: "Noto Sans Gujarati", -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", system-ui, "Gujarati Sangam MN", "Shruti", sans-serif;
  --font-head: "Jua", "Baloo Bhai 2", var(--font);
  color-scheme: light;
}
:root:lang(gu) { --font-head: "Baloo Bhai 2", "Jua", var(--font); }
:root[data-theme="borahae"] {
  --bg: #F8F4FF; --bg-2: #EFE7FF; --card: #FFFEFF; --card-2: #FFFFFF; --line: #DDD0F5;
  --text: #2B1F3D; --muted: #5E4F78;
  --rose: #6B3FA0; --rose-strong: #56308A; --rose-soft: #A27BE0; --rose-tint: #EEE5FF; --on-rose: #FFFFFF;
  --lav: #A4296A; --lav-tint: #FBE3F0;
  --dot: rgba(107, 63, 160, .11);
  --tape-a: #E8DDFF; --tape-b: #F3EDFF;
  --sticker: rgba(107, 63, 160, .24);
  --heart-a: #9B6BE3; --heart-b: #C9A7FF; --heart-c: #F59BC8;
  --m-line: #CDB8F0; --m-lid: #A781E8; --m-blush: #F7A6CE; --m-ink: #33244A;
  --shadow: 0 6px 18px rgba(107, 63, 160, .10), 0 1px 3px rgba(107, 63, 160, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1F1619; --bg-2: #2A1C22; --card: #2F2228; --card-2: #3A2A32; --line: #573845;
    --text: #FCEFF3; --muted: #D9B3C2;
    --rose: #FF8FB1; --rose-strong: #FFB0C8; --rose-soft: #E2557F; --rose-tint: #4D2233; --on-rose: #2A0C18;
    --lav: #C7B5F2; --lav-tint: #3A2D52; --berry: #FF8A96; --berry-tint: #4A1F26; --leaf: #6FD69A; --leaf-tint: #1E3A2A;
    --amber: #FFC970; --amber-tint: #44331A;
    --peach: #5A3428; --butter: #4D4320; --mint: #1F4436;
    --dot: rgba(255, 143, 177, .09);
    --tape-a: #5A2A3D; --tape-b: #46222F;
    --sticker: rgba(255, 143, 177, .28);
    --m-jar: #FCEFE6; --m-line: #C98EA3; --m-lid: #F07FA0; --m-ink: #3A1F2B; --m-blush: #FF9DB5;
    --shadow: 0 6px 18px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
  :root[data-theme="borahae"] {
    --bg: #15111F; --bg-2: #1D1730; --card: #231B36; --card-2: #2C2342; --line: #45365F;
    --text: #F4EFFF; --muted: #C9BBE8;
    --rose: #C9A7FF; --rose-strong: #DDC8FF; --rose-soft: #8E5FD6; --rose-tint: #3A2B5C; --on-rose: #1C0F33;
    --lav: #FF9CCB; --lav-tint: #4A2440;
    --dot: rgba(201, 167, 255, .10);
    --tape-a: #3F2E66; --tape-b: #322552;
    --sticker: rgba(201, 167, 255, .30);
    --heart-a: #B48AF5; --heart-b: #D9C2FF; --heart-c: #FF9CCB;
    --m-jar: #F3ECFF; --m-line: #A58BD6; --m-lid: #A781E8; --m-ink: #2B1F3D; --m-blush: #F7A6CE;
  }
}

*, *::before, *::after { box-sizing: border-box; }
/* App shell (fix for "the bottom panel scrolls up with the list" on iPhone): the document itself never scrolls.
   html/body are pinned to the screen; only .app-main scrolls. With no document scrolling, iOS Safari (toolbar
   collapse/expand, rubber-band overscroll) and Home Screen mode have nothing to drift the tab bar against. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0; position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; font: 16px/1.4 var(--font); color: var(--text); background: var(--bg);
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
  background-image: radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--peach) 70%, transparent), transparent 38%),
    radial-gradient(circle at 100% 28%, color-mix(in srgb, var(--lav-tint) 90%, transparent), transparent 34%),
    radial-gradient(circle at 0% 85%, color-mix(in srgb, var(--mint) 60%, transparent), transparent 30%),
    radial-gradient(var(--dot) 1.1px, transparent 1.6px);
  background-size: auto, auto, auto, 20px 20px;
  background-attachment: fixed;
}
body.has-sheet { overflow: hidden; }
:lang(gu) { line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--rose); }
img { max-width: 100%; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--rose); color: var(--on-rose); padding: 10px 14px; border-radius: 12px; z-index: 999; }
.skip-link:focus { top: calc(8px + var(--safe-t)); }
:focus-visible { outline: 3px solid var(--lav); outline-offset: 2px; border-radius: 10px; }
.small { font-size: .86rem; }
.muted { color: var(--muted); }
.strong { font-weight: 650; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.pad { padding: 12px 16px; }
.pre { white-space: pre-wrap; }
.text-rose { color: var(--rose); } .text-leaf { color: var(--leaf); } .text-berry { color: var(--berry); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- layout ---------- */
.app-main { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(var(--safe-t) + 6px) calc(var(--safe-r) + 14px) calc(var(--tabbar-h) + var(--safe-b) + 24px) calc(var(--safe-l) + 14px); }
.view { max-width: 692px; margin: 0 auto; }
.view:focus { outline: none; }
.boot { display: grid; place-items: center; min-height: 60vh; color: var(--rose); font-weight: 600; }
.boot-jar { font-size: 56px; position: relative; } .boot-jar span { position: absolute; right: -10px; top: -6px; font-size: 22px; animation: bob 1.4s ease-in-out infinite; }

.page-head { display: flex; align-items: center; gap: 8px; padding: 10px 0 12px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--bg) 70%, transparent); margin: 0 -14px; padding-left: 14px; padding-right: 14px; padding-top: calc(var(--safe-t) + 10px); margin-top: calc(-1 * var(--safe-t) - 6px); }
.page-titles { flex: 1; min-width: 0; }
.page-title { margin: 0; font-size: 1.9rem; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.page-head:has(.back) .page-title { font-size: 1.5rem; }
.page-title .deco { color: var(--rose-soft); font-weight: 700; }
.page-sub { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.page-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 18px; border-radius: 999px;
  border: 1.5px solid transparent; font-weight: 650; cursor: pointer; text-decoration: none; transition: transform .12s ease, background .2s; user-select: none; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--rose); color: var(--on-rose); box-shadow: 0 4px 12px rgba(184, 35, 90, .25); }
.btn-primary:hover { background: var(--rose-strong); }
.btn-secondary { background: var(--card-2); color: var(--rose); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--rose); }
.btn-danger { background: var(--berry); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-danger { color: #2A0C10; } }
.btn-danger-ghost { background: transparent; color: var(--berry); border-color: var(--berry-tint); }
.btn-sm { min-height: var(--tap); padding: 6px 14px; font-size: .92rem; }
.btn-lg { min-height: 54px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn .ic { width: 20px; height: 20px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn:focus-within { outline: 3px solid var(--lav); outline-offset: 2px; }
.icon-btn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: transparent; color: var(--rose); cursor: pointer; flex: none; list-style: none; }
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn .ic { width: 22px; height: 22px; }
.icon-btn-soft { background: var(--rose-tint); }
.icon-btn-primary { background: var(--rose); color: var(--on-rose); box-shadow: 0 3px 0 var(--rose-strong), 0 6px 12px var(--sticker); }
.icon-btn[disabled] { opacity: .4; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.ic-muted { color: var(--muted); }
.ic.is-open { transform: rotate(180deg); }
.ic-heart { color: var(--rose-soft); }
.stack { display: grid; gap: 10px; margin: 12px 0; }
.stack-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }

/* ---------- cards, lists ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px; box-shadow: var(--shadow); }
.card-title { margin: 0 0 8px; font-size: 1.02rem; }
.card-hero { background: linear-gradient(135deg, var(--card-2), var(--rose-tint)); }
.list { list-style: none; margin: 0; padding: 0; }
.card-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.card-list > li + li { border-top: 1px solid var(--line); }
.group { margin-bottom: 6px; }
.group-title { font-size: 1rem; font-weight: 750; margin: 18px 4px 8px; display: flex; align-items: center; gap: 6px; }
.group-head { margin: 14px 0 8px; font-size: 1rem; }
.group-toggle { width: 100%; display: flex; align-items: center; gap: 10px; min-height: var(--tap); background: none; border: 0; padding: 4px; cursor: pointer; text-align: left; font-weight: 750; }
.group-name { flex: 1; }
.group-count { font-weight: 600; color: var(--muted); font-size: .88rem; }
.cat-dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 18%, var(--card-2)); font-size: 18px; }

.row, .row-main { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; width: 100%; background: none; border: 0; text-align: left; color: inherit; text-decoration: none; cursor: pointer; }
.row-btn.is-on { background: var(--rose-tint); }
.row-link { padding: 8px 0; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.names { display: flex; flex-direction: column; min-width: 0; }
.name-1 { font-weight: 650; overflow-wrap: anywhere; }
.name-2 { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.is-struck .name-1, .is-struck .name-2 { text-decoration: line-through; text-decoration-color: var(--rose-soft); }
.qty { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.thumb { width: var(--s); height: var(--s); border-radius: calc(var(--s) * .3); overflow: hidden; flex: none; background: var(--card-2); border: 1px solid var(--line); display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { background: color-mix(in srgb, var(--tint, #E75480) 16%, var(--card-2)); font-size: calc(var(--s) * .5); }

.pantry-row { display: flex; align-items: center; padding-right: 8px; }
.pantry-row .row-main { flex: 1; min-width: 0; padding-right: 4px; }
.pantry-row.is-out .thumb { filter: grayscale(.6); opacity: .75; }
.stepper { display: flex; gap: 6px; }
.step { width: var(--tap); height: var(--tap); border-radius: 50%; border: 1.5px solid var(--line); background: var(--card-2); color: var(--rose); display: grid; place-items: center; cursor: pointer; flex: none; }
.step-plus { background: var(--rose-tint); border-color: transparent; }
.step[disabled] { opacity: .35; }
.step:active { transform: scale(.92); }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip-rose { background: var(--rose-tint); color: var(--rose-strong); }
.chip-berry { background: var(--berry-tint); color: var(--berry); }
.chip-amber { background: var(--amber-tint); color: var(--amber); }
.chip-leaf { background: var(--leaf-tint); color: var(--leaf); }
.chip-lav { background: var(--lav-tint); color: var(--lav); }
.chip-soft { background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

/* ---------- toolbar, search, segmented ---------- */
.toolbar { display: grid; gap: 10px; margin-bottom: 6px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card-2); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 14px; min-height: var(--tap); color: var(--muted); }
.search:focus-within { border-color: var(--rose); }
.search input { flex: 1; border: 0; background: transparent; min-height: 42px; outline: none; color: var(--text); font-size: 16px; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.segmented { display: flex; background: var(--bg-2); border-radius: 999px; padding: 4px; gap: 4px; }
.seg { flex: 1; min-height: var(--tap); border: 0; border-radius: 999px; background: transparent; font-weight: 650; color: var(--muted); cursor: pointer; padding: 4px 6px; }
.seg.is-on { background: var(--card-2); color: var(--rose); box-shadow: var(--shadow); }
.seg-n { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 999px; background: var(--rose-tint); color: var(--rose-strong); font-size: .75rem; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
.pill { flex: none; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card-2); font-weight: 650; color: var(--muted); cursor: pointer; }
.pill.is-on { background: var(--rose); border-color: var(--rose); color: var(--on-rose); }

/* ---------- banners & welcome ---------- */
.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius); padding: 12px 8px 12px 14px; margin: 0 0 12px; border: 1px solid var(--line); }
.banner p { margin: 2px 0; }
.banner-rose { background: linear-gradient(135deg, var(--rose-tint), var(--card)); }
.banner-lav { background: linear-gradient(135deg, var(--lav-tint), var(--card)); }
.banner-amber { background: var(--amber-tint); color: var(--amber); padding: 10px 14px; border-color: transparent; display: block; }
.banner-icon { font-size: 24px; line-height: 1; padding-top: 2px; }
.banner-body { flex: 1; min-width: 0; }
.banner-title { margin: 0 0 2px; font-size: 1rem; }
.banner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.welcome { text-align: center; padding: 20px 18px; }
.welcome h2 { margin: 6px 0; color: var(--rose); }
.welcome-art, .empty-art, .scan-art { font-size: 54px; position: relative; display: inline-block; line-height: 1.1; }
.spark { position: absolute; font-size: 18px; color: var(--rose-soft); animation: twinkle 2.4s ease-in-out infinite; }
.spark.s1 { left: -18px; top: 0; } .spark.s2 { right: -16px; top: 8px; color: var(--lav); animation-delay: .6s; } .spark.s3 { right: -4px; bottom: -6px; animation-delay: 1.2s; }
.dedication { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--rose); font-weight: 650; margin: 10px 0; }
.dedication .ic { width: 18px; height: 18px; }
.settings-foot { text-align: center; padding: 10px 0 20px; }

.hero-strip { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 4px 0 8px; box-shadow: var(--shadow); }
.hero-strip p { margin: 0; }
.hero-strip.is-done .hero-icon { background: var(--leaf); color: #fff; }
.hero-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--rose-soft), var(--lav)); color: #fff; font-size: 22px; flex: none; }
.hero-icon .ic { width: 24px; height: 24px; }
.hero-strong { font-weight: 750; font-size: 1.05rem; }
.scan-cta { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; margin: 18px 0 4px; padding: 14px 16px; border-radius: var(--radius); border: 2px dashed var(--rose-soft); background: var(--card); color: var(--text); cursor: pointer; }
.scan-cta .ic { width: 30px; height: 30px; color: var(--rose); }
.scan-cta span { display: flex; flex-direction: column; }

.empty { text-align: center; padding: 34px 18px; }
.empty-title { margin: 10px 0 4px; font-size: 1.15rem; }
.empty-text { color: var(--muted); margin: 0 auto 14px; max-width: 32ch; }
.small-empty { padding: 14px; }

/* ---------- shopping ---------- */
.shop-row { display: flex; align-items: center; }
.tick { width: 52px; height: 56px; display: grid; place-items: center; border: 0; background: none; color: var(--rose); cursor: pointer; flex: none; padding-left: 8px; }
.tick .ic { width: 28px; height: 28px; }
.shop-row.is-bought .tick { color: var(--leaf); }
.shop-row.is-bought .thumb { opacity: .55; }
.shop-row .row-main { padding-left: 2px; }
.suggest { margin-top: 6px; border-top: 1px dashed var(--line); }
.linked { display: flex; align-items: center; gap: 12px; }
.linked .names { flex: 1; }

/* ---------- menu (details) ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--card-2); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; z-index: 20; display: grid; }
.menu-pop button { min-height: var(--tap); text-align: left; padding: 8px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-weight: 600; }
.menu-pop button:hover, .menu-pop button:focus-visible { background: var(--rose-tint); }
.menu-pop button.danger { color: var(--berry); }
.menu-pop button[disabled] { opacity: .4; }

/* ---------- cook ---------- */
.dish-row { display: flex; align-items: center; padding-right: 10px; }
.dish-row .row-main { flex: 1; }
.dish-thumb { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(135deg, var(--rose-tint), var(--lav-tint)); flex: none; }
.dish-thumb-lg { width: 72px; height: 72px; font-size: 40px; border-radius: 22px; }
.dish-hero { display: grid; gap: 4px; }
.success-line { color: var(--leaf); font-weight: 700; }
.ing-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; min-height: 52px; }
.ing-mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.ing-mark.is-have { background: var(--leaf-tint); color: var(--leaf); }
.ing-mark.is-miss { background: var(--berry-tint); color: var(--berry); }
.ing-mark.is-opt { background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.steps { padding-left: 36px; } .steps li { margin: 6px 0; }

/* ---------- trips ---------- */
.trip-list { display: grid; gap: 10px; margin-bottom: 8px; }
.trip-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.trip-plane { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(135deg, var(--lav-tint), var(--rose-tint)); flex: none; }
.progress { display: block; height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin: 6px 0 2px; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--rose-soft), var(--lav)); transition: width .3s; }
.progress.is-near > span { background: #D98A00; } .progress.is-over > span { background: var(--berry); }
.progress-lg { height: 14px; width: 100%; max-width: 320px; margin: 12px auto; }
.bag { padding: 6px 0; }
.bag-top { display: flex; justify-content: space-between; gap: 8px; font-size: .95rem; padding: 4px 0; }
.trip-row { display: flex; align-items: center; padding-right: 8px; }
.trip-row .row-main { flex: 1; min-width: 0; padding-left: 2px; }
.status { width: 44px; height: 44px; margin-left: 8px; border-radius: 50%; border: 2px solid var(--line); background: var(--card-2); font-weight: 800; cursor: pointer; flex: none; display: grid; place-items: center; }
.st-needed { color: var(--muted); } .st-bought { background: var(--amber-tint); border-color: transparent; } .st-packed { background: var(--leaf); color: #fff; border-color: transparent; }
@media (prefers-color-scheme: dark) { .st-packed { color: #0B2416; } }
.trip-summary p { margin: 6px 0 0; }

/* ---------- forms ---------- */
.form { display: block; }
.field { display: grid; gap: 4px; margin: 0 0 12px; }
.field:last-child { margin-bottom: 0; }
.field label, .field-inline label { font-size: .88rem; font-weight: 650; color: var(--muted); }
.field input, .field select, .field textarea, .input-sm { width: 100%; min-height: var(--tap); padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card-2); color: var(--text); font-size: 16px; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input-sm:focus { border-color: var(--rose); outline: 2px solid color-mix(in srgb, var(--rose) 35%, transparent); outline-offset: 0; }
.field-inline { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.field-inline label { flex: 1; }
.input-sm { width: auto; max-width: 110px; padding: 8px 10px; }
select.input-sm { max-width: 130px; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-ctrl input { flex: 1; min-width: 0; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.qty-unit { min-width: 44px; color: var(--muted); font-weight: 600; text-align: center; }
.qty-out { flex: 1; text-align: center; font-weight: 800; font-size: 1.3rem; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 2px 10px; }
.form-error { background: var(--berry-tint); color: var(--berry); border-radius: 12px; padding: 10px 12px; font-weight: 650; }
.toggle { display: flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; margin: 4px 0 10px; font-weight: 600; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui { width: 52px; height: 32px; border-radius: 99px; background: var(--bg-2); border: 1.5px solid var(--line); position: relative; flex: none; transition: background .2s; }
.toggle-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 25px; height: 25px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.toggle input:checked + .toggle-ui { background: var(--rose); border-color: var(--rose); }
.toggle input:checked + .toggle-ui::after { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-ui { outline: 3px solid var(--lav); outline-offset: 2px; }
.editor-hero { display: flex; gap: 14px; align-items: center; margin: 4px 0 14px; }
.kv { margin: 10px 0 0; display: grid; gap: 6px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 650; text-align: right; }
.prose p { margin: 6px 0 10px; }
.credits .credit { display: flex; flex-direction: column; padding: 10px 14px; gap: 2px; }

/* ---------- tab bar ---------- */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 50; /* inside the pinned body, outside the scroller */
  transform: translateZ(0); display: flex; justify-content: space-around; gap: 2px;
  padding: 6px calc(var(--safe-r) + 6px) calc(var(--safe-b) + 6px) calc(var(--safe-l) + 6px);
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line); }
.tab { position: relative; flex: 1; max-width: 120px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 650; border-radius: 14px; }
.tab .ic { width: 26px; height: 26px; }
.tab.is-current { color: var(--rose); }
.tab.is-current::before { content: ""; position: absolute; inset: 2px 10%; border-radius: 14px; background: var(--rose-tint); z-index: -1; }
.tab-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--rose); color: var(--on-rose); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }

/* ---------- sheets ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(58, 31, 43, .38); animation: fade .2s ease; }
.sheet { position: relative; width: 100%; max-width: 720px; max-height: calc(100dvh - var(--safe-t) - 24px); background: var(--bg); border-radius: 26px 26px 0 0;
  padding: 6px calc(var(--safe-r) + 16px) calc(var(--safe-b) + 16px) calc(var(--safe-l) + 16px); display: flex; flex-direction: column; box-shadow: 0 -8px 30px rgba(0,0,0,.18); animation: rise .26s cubic-bezier(.2,.9,.3,1.1); }
.sheet:focus { outline: none; }
.is-full .sheet { height: calc(100dvh - var(--safe-t) - 12px); }
.sheet-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sheet-grabber { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: 4px auto 6px; flex: none; }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 2px 0 10px; }
.sheet-left { justify-self: start; } .sheet-right { justify-self: end; }
.sheet-title { margin: 0; font-size: 1.08rem; text-align: center; font-weight: 750; }
.sheet-msg { text-align: center; color: var(--muted); margin: 0 0 8px; }
.sheet-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: 1; min-height: 0; padding-bottom: 20px; margin: 0 -4px; padding-left: 4px; padding-right: 4px; }
.sheet .search { margin-bottom: 8px; flex: none; }

/* ---------- scan ---------- */
.scan-intro { text-align: center; }
.scan-intro p { max-width: 40ch; margin: 8px auto 12px; }
.scan-intro .toggle { justify-content: center; }
.tips { text-align: left; } .tips ul { margin: 0; padding-left: 20px; } .tips li { margin: 4px 0; }
.reading { text-align: center; padding-top: 10px; }
.reading-photo { max-height: 34vh; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.reading-heart { margin: 10px 0 0; } .reading-heart .fh { width: 48px; height: 48px; color: var(--heart-a); animation: beat 1s ease-in-out infinite; }
.scan-review .segmented { margin: 4px 0 0; }
.scan-row { padding: 10px 12px; display: grid; gap: 8px; }
.scan-row.is-off { opacity: .5; }
.scan-row-top { display: flex; align-items: center; gap: 10px; }
.scan-row-qty { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-left: 46px; }
.scan-row-qty > .grow { flex-basis: 100%; }
.inc { position: relative; width: 36px; height: 44px; display: grid; place-items: center; cursor: pointer; flex: none; }
.inc input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.checkmark { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--rose); display: grid; place-items: center; color: transparent; font-weight: 900; flex: none; }
.inc input:checked + .checkmark, .row-btn.is-on .checkmark { background: var(--rose); color: var(--on-rose); }
.inc input:focus-visible + .checkmark { outline: 3px solid var(--lav); outline-offset: 2px; }
.source { margin: 0; font: .8rem/1.35 ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); background: var(--bg-2); border-radius: 8px; padding: 4px 8px; overflow-wrap: anywhere; }
.photo-peek { margin: 10px 0; } .photo-peek summary, .unknown summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--rose); }
.photo-peek img { border-radius: 14px; border: 1px solid var(--line); }
/* photo scan: "Is it one of these?" picker (top 5 guesses + search) */
.photo-match { background: linear-gradient(160deg, var(--card-2), var(--rose-tint)); margin-top: 12px; }
.match-grid { list-style: none; margin: 10px 0 2px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.match-tile { position: relative; width: 100%; height: 100%; min-height: 150px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 10px;
  border-radius: 20px; border: 2px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; text-align: center; font: inherit; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease; }
.match-tile:active { transform: scale(.97); }
.match-tile.is-on { border-color: var(--rose); background: color-mix(in srgb, var(--rose-tint) 55%, var(--card)); }
.match-tile .match-name { display: grid; gap: 1px; font-size: .9rem; line-height: 1.2; }
.match-tile .conf-chip { margin-top: auto; font-size: .72rem; }
.match-tick { position: absolute; top: 6px; right: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--rose); color: var(--on-rose, #fff); font-weight: 800; font-size: .85rem; }
.match-search { justify-content: center; border-style: dashed; color: var(--rose); background: var(--card-2); }
.match-search .ic { width: 28px; height: 28px; }
.extra-row { gap: 10px; padding: 8px 4px; }
@media (prefers-reduced-motion: reduce) { .match-tile { transition: none; } }
.unknown { margin: 14px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px 10px; }
.unknown-row { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }

/* ---------- toasts, update bar, burst ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); z-index: 300; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 440px; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 18px; font-weight: 650; box-shadow: var(--shadow); animation: rise .25s ease; transition: opacity .4s, transform .4s; }
.toast-success { background: var(--rose); color: var(--on-rose); }
.toast-error { background: var(--berry); color: #fff; }
@media (prefers-color-scheme: dark) { .toast-error { color: #2A0C10; } }
.toast.is-out { opacity: 0; transform: translateY(10px); }
.update-bar { position: fixed; top: calc(var(--safe-t) + 8px); left: 12px; right: 12px; z-index: 400; display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 520px; margin: 0 auto;
  background: var(--card-2); border: 1.5px solid var(--rose-soft); border-radius: 18px; padding: 8px 8px 8px 16px; box-shadow: var(--shadow); font-weight: 650; }
.update-bar[hidden] { display: none; }
.burst-host { position: fixed; inset: 0; pointer-events: none; z-index: 500; display: grid; place-items: center; }
.burst { position: relative; width: 1px; height: 1px; }
.burst-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 64px; color: var(--rose-soft); animation: pop .9s ease forwards; text-shadow: 0 4px 14px rgba(231,84,128,.35); }
.burst-bit { position: absolute; left: 0; top: 0; font-size: 22px; color: var(--rose-soft); animation: fly .9s ease-out forwards; }
.burst-bit.is-lav { color: var(--lav); }
.burst.is-reduced .burst-center { animation: fadeonly .9s ease forwards; }

@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 30% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1); opacity: 0; } }
@keyframes fly { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(calc(var(--dx) - 50%), calc(var(--dy) - 50%)) scale(1); opacity: 0; } }
@keyframes fadeonly { 0% { opacity: 0; transform: translate(-50%, -50%); } 30%, 70% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -50%); } }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.18); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .burst.is-reduced .burst-center { animation: fadeonly 1s linear forwards !important; animation-duration: 1s !important; }
}
@media (min-width: 600px) { .page-title { font-size: 2.1rem; } }
@media (forced-colors: active) { .btn, .seg, .pill, .step, .chip { border: 1px solid ButtonText; } }
.tab.is-current, .row-btn.is-on, .menu-pop button:hover, .menu-pop button:focus-visible { color: var(--rose-strong); }

/* =====================================================================================
   Korean kawaii layer: rounded heading font, stickers, washi tape, mascot, finger heart.
   ===================================================================================== */
.page-title, .sheet-title, .empty-title, .welcome h2, .banner-title, .hero-strong, .group-title, .group-name, .theme-name, .ko {
  font-family: var(--font-head); font-synthesis: none; }
.page-title, .welcome h2, .empty-title, .sheet-title, .group-title, .group-name, .banner-title, .hero-strong { font-weight: 400; letter-spacing: 0; }
:lang(gu) .page-title, :lang(gu) .welcome h2, :lang(gu) .empty-title, :lang(gu) .sheet-title, :lang(gu) .group-title,
:lang(gu) .group-name, :lang(gu) .banner-title, :lang(gu) .hero-strong { font-weight: 700; }
.page-title { font-size: 2rem; }
.page-head:has(.back) .page-title { font-size: 1.55rem; }
.page-title .deco { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.page-title .fh { width: 26px; height: 26px; color: var(--rose-soft); transform: rotate(-8deg); }
.ko { font-weight: 400; color: var(--rose); white-space: nowrap; }
.fh { width: 20px; height: 20px; color: var(--rose); flex: none; --fh-fill: var(--card-2); }

/* sticker chips and badges: rounded pill, thin outline, tiny drop shadow */
.chip { border: 1.5px solid var(--sticker); box-shadow: 0 1.5px 0 var(--sticker); }
.sticker { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 999px; background: var(--butter); color: var(--text);
  border: 1.5px solid var(--sticker); box-shadow: 0 2px 0 var(--sticker); font-size: .85rem; transform: rotate(-3deg); }
.sticker.is-mint { background: var(--mint); } .sticker.is-pink { background: var(--rose-tint); } .sticker.is-lav { background: var(--lav-tint); }
.card { border-width: 1.5px; }
.btn-primary { box-shadow: 0 3px 0 var(--rose-strong), 0 6px 14px var(--sticker); }
.btn-primary:active { box-shadow: 0 1px 0 var(--rose-strong); transform: translateY(2px); }
.btn-secondary { box-shadow: 0 2px 0 var(--sticker); }

/* washi-tape section headers */
.group-title { width: fit-content; max-width: 100%; position: relative; isolation: isolate; padding: 3px 14px; margin-left: 2px; }
.group-title::before { content: ""; position: absolute; inset: 0 -3px; z-index: -1; border-radius: 3px; transform: rotate(-1.4deg);
  background: repeating-linear-gradient(-45deg, var(--tape-a) 0 7px, var(--tape-b) 7px 14px); opacity: .95;
  -webkit-mask: linear-gradient(90deg, transparent 0 2px, #000 2px calc(100% - 2px), transparent calc(100% - 2px)); }
.group-title:nth-of-type(2n)::before { transform: rotate(1.2deg); }
.group-head { position: relative; }

/* mascot */
.mascot { display: block; margin: 0 auto; overflow: visible; }
.m-jar { fill: var(--m-jar); stroke: var(--m-line); stroke-width: 3; }
.m-shine { fill: #fff; opacity: .55; }
.m-lid { fill: var(--m-lid); stroke: var(--m-line); stroke-width: 2.5; }
.m-lidline { stroke: #fff; opacity: .6; }
.m-ink { stroke: var(--m-ink); } .m-inkf { fill: var(--m-ink); }
.m-tongue { stroke: #FF8FA8; }
.m-blush { fill: var(--m-blush); opacity: .75; }
.m-arm { stroke: var(--m-line); }
.m-shadow { fill: var(--rose-soft); opacity: .14; }
.m-heart { fill: var(--heart-a); } .m-spark { fill: var(--heart-b); } .m-star { fill: #F6B73C; stroke: var(--m-ink); stroke-width: 1.2; }
.m-z { fill: var(--muted); font-family: var(--font-head); }
.m-drop { fill: #8FC9F2; }
.m-acc { display: none; } .m-acc-heart { fill: #8E52D9; stroke: #fff; stroke-width: 1.5; }
:root[data-theme="borahae"] .m-acc { display: inline; }
@media (prefers-reduced-motion: no-preference) {
  .mascot-happy, .mascot-excited { animation: buddy 2.8s ease-in-out infinite; transform-origin: 50% 90%; }
  .mascot-sleepy { animation: snooze 3.6s ease-in-out infinite; transform-origin: 50% 90%; }
  .mascot-worried { animation: wobble 2.2s ease-in-out infinite; transform-origin: 50% 90%; }
}
@keyframes buddy { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-2deg); } }
@keyframes snooze { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, .98); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.5deg); } 75% { transform: rotate(2.5deg); } }

/* welcome card / empty states / banners with mascot */
.welcome-art, .empty-art { font-size: inherit; }
.welcome .hello { display: flex; justify-content: center; margin-top: 2px; }
.welcome .hello .sticker { font-size: 1.05rem; }
.empty-art .sticker-emoji { position: absolute; right: -12px; bottom: 6px; font-size: 26px; transform: rotate(10deg); }
.banner .banner-mascot { flex: none; width: 52px; margin-top: -2px; }
.dedication .fh { width: 20px; height: 20px; }
.dedication .ko { margin-left: 2px; }
.ready-sticker { margin-left: 4px; }
.dish-row .yum { font-size: .78rem; }

/* tab bar: soft pill with a tiny heart under the current tab */
.tab.is-current::after { content: "♥"; position: absolute; bottom: -1px; font-size: 9px; color: var(--rose-soft); line-height: 1; }

/* heart burst: finger heart in the middle, mini hearts flying out */
.burst-center { font-size: 0; text-shadow: none; }
.burst-center .fh { width: 84px; height: 84px; color: var(--heart-a); filter: drop-shadow(0 4px 10px var(--sticker)); }
.burst-bit { font-size: 0; }
.burst-bit svg { width: 22px; height: 22px; display: block; }
.burst-bit.c0 { color: var(--heart-a); } .burst-bit.c1 { color: var(--heart-b); } .burst-bit.c2 { color: var(--heart-c); }
.burst-bit.is-small svg { width: 15px; height: 15px; }

/* toasts get a little sticker word */
.toast .ko { color: inherit; margin-left: 6px; opacity: .95; }

/* theme picker */
.theme-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-opt { position: relative; display: grid; gap: 6px; justify-items: center; padding: 12px 8px 10px; min-height: 44px; border-radius: 18px; cursor: pointer;
  border: 2px solid var(--line); background: var(--card-2); text-align: center; }
.theme-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.theme-opt:has(input:checked) { border-color: var(--rose); box-shadow: 0 3px 0 var(--sticker); }
.theme-opt:has(input:focus-visible) { outline: 3px solid var(--lav); outline-offset: 2px; }
.theme-swatch { display: flex; gap: 4px; }
.theme-swatch i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.12); }
.theme-name { font-size: 1.02rem; }
.theme-check { position: absolute; top: 6px; right: 8px; color: var(--rose); font-size: 14px; visibility: hidden; }
.theme-opt:has(input:checked) .theme-check { visibility: visible; }

/* Borahae: purple sparkle / galaxy dots */
:root[data-theme="borahae"] body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, var(--rose-soft), transparent), radial-gradient(1.2px 1.2px at 78% 9%, var(--heart-c), transparent),
    radial-gradient(1.8px 1.8px at 62% 34%, var(--rose-soft), transparent), radial-gradient(1.2px 1.2px at 30% 52%, var(--heart-b), transparent),
    radial-gradient(1.5px 1.5px at 88% 61%, var(--rose-soft), transparent), radial-gradient(1.1px 1.1px at 8% 74%, var(--heart-c), transparent),
    radial-gradient(1.7px 1.7px at 48% 88%, var(--rose-soft), transparent), radial-gradient(1.2px 1.2px at 94% 92%, var(--heart-b), transparent);
  opacity: .8; }
@media (prefers-reduced-motion: no-preference) {
  :root[data-theme="borahae"] body::before { animation: galaxy 6s ease-in-out infinite alternate; }
}
@keyframes galaxy { from { opacity: .45; } to { opacity: .9; } }
.review-hero { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 10px; }
.review-hero .mascot { margin: 0; }
.scan-art { position: relative; display: inline-block; }
.scan-art .sticker-emoji, .empty-art .sticker-emoji { position: absolute; right: -14px; bottom: 4px; font-size: 26px; transform: rotate(10deg); }
.sticker.is-butter { background: var(--butter); }
.group-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.group-title-row .group-title { margin-right: 0; }
.hero-icon.hero-mascot { background: none; width: 52px; height: 52px; }
.sticker .ko { color: var(--text); }
.theme-pink { --m-lid: #F48FB0; --m-line: #E9B9C6; --m-blush: #FF9DB5; }
.theme-borahae { --m-lid: #A781E8; --m-line: #CDB8F0; --m-blush: #F7A6CE; }
.theme-borahae .m-acc { display: inline; }
:root[data-theme="borahae"] .theme-pink .m-acc { display: none; }
.theme-opt .mascot { margin: 0; }

/* ---------- accounts: welcome / sign up / verify / log in / forgot ---------- */
body.is-auth .tabbar { display: none; }
body.is-auth .app-main { padding-bottom: calc(var(--safe-b) + 24px); }
.auth { position: relative; max-width: 440px; margin: 0 auto; padding: 18px 4px 10px; }
.auth-back { position: absolute; left: -6px; top: 4px; }
.auth-art { position: relative; width: 120px; margin: 6px auto 4px; text-align: center; }
.auth-art .mascot { animation: buddy 3.2s ease-in-out infinite; }
.auth-art .spark.s1 { left: -6px; top: 10px; } .auth-art .spark.s2 { right: -4px; top: 0; animation-delay: .8s; }
.auth-fh { position: absolute; right: -2px; bottom: 6px; width: 30px; height: 30px; color: var(--rose); transform: rotate(12deg); }
.auth-title { font-family: var(--font-head); font-size: 1.7rem; line-height: 1.25; text-align: center; color: var(--rose); margin: 4px 0 6px; }
.auth-sub { text-align: center; color: var(--muted); margin: 0 auto 16px; max-width: 34ch; }
.auth-form { margin: 8px 0 4px; }
.auth-lang { text-align: center; margin: 18px 0 0; }
.auth .field input, .inv-form input, .inv-form select, .account-card input { font-size: 16px; }   /* no iOS zoom */
.form-error { background: var(--berry-tint); color: var(--berry); border-radius: 14px; padding: 10px 12px; font-weight: 650; margin: 8px 0 12px; }
.form-note { background: var(--leaf-tint); color: var(--leaf); border-radius: 14px; padding: 10px 12px; font-weight: 600; margin: 8px 0 12px; text-align: center; }
.invite-ok { background: linear-gradient(135deg, var(--rose-tint), var(--card)); border: 1.5px dashed var(--rose-soft); border-radius: 16px; padding: 10px 14px; text-align: center; font-weight: 650; color: var(--rose-strong); margin: 0 0 12px; }
.field-label { display: block; font-size: .88rem; font-weight: 650; color: var(--muted); margin: 0 0 6px; }
.block { display: block; }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; padding-right: 52px; }
.pw-eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 20px; }

.code-boxes { display: flex; justify-content: center; gap: 8px; margin: 10px 0 14px; }
.code-box { width: 48px; height: 58px; text-align: center; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums;
  border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: var(--rose-strong); caret-color: var(--rose); padding: 0; }
.code-box:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-tint); }
.code-boxes .code-box:nth-child(3) { margin-right: 8px; }
@media (max-width: 360px) { .code-box { width: 40px; height: 52px; font-size: 22px; } .code-boxes { gap: 6px; } }

/* ---------- sync indicator ---------- */
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; box-shadow: 0 0 0 2px var(--card); }
.tab .sync-dot { position: absolute; top: 6px; left: calc(50% + 9px); }
.sync-dot[data-s="synced"] { background: var(--leaf); }
.sync-dot[data-s="syncing"] { background: var(--rose-soft); animation: beat 1s ease-in-out infinite; }
.sync-dot[data-s="offline"] { background: var(--amber); }
.sync-dot[data-s="error"], .sync-dot[data-s="signed-out"] { background: var(--berry); }
.sync-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; margin: 6px 0 4px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }

/* ---------- account card ---------- */
.account-head { display: flex; gap: 12px; align-items: center; }
.account-av, .member-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; flex: none;
  background: linear-gradient(135deg, var(--rose-tint), var(--lav-tint)); }
.queen-badge { margin-left: 4px; }
.invite-entry { margin: 4px 0; border-radius: 14px; background: linear-gradient(135deg, var(--rose-tint), transparent); padding: 10px 8px; }

/* ---------- invite family (owner) ---------- */
.queen { display: flex; gap: 14px; align-items: center; }
.queen-art { position: relative; flex: none; }
.queen-art .crown { position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 28px; animation: bob 2.6s ease-in-out infinite; }
.queen-title { font-family: var(--font-head); color: var(--rose); font-size: 1.25rem; margin: 0 0 4px; }
.invite-list, .member-list { padding: 4px 12px; }
.invite-row, .member-row { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.invite-row:last-child, .member-row:last-child { border-bottom: 0; }
.invite-main, .member-row { display: flex; gap: 10px; align-items: center; }
.invite-ic { font-size: 24px; flex: none; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 34px; }
.past-invites summary { cursor: pointer; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
.invite-card { text-align: center; padding: 14px; border-radius: 20px; border: 2px dashed var(--rose-soft); background: linear-gradient(160deg, var(--rose-tint), var(--card)); margin: 4px 0 12px; }
.invite-card-art { position: relative; display: inline-block; }
.invite-card-art .big-fh { position: absolute; right: -22px; top: 4px; width: 30px; height: 30px; color: var(--rose); animation: beat 1.6s ease-in-out infinite; }
.invite-code { font-size: 1.7rem; font-weight: 800; letter-spacing: .08em; color: var(--rose-strong); margin: 6px 0; font-variant-numeric: tabular-nums; user-select: all; }
.invite-link { word-break: break-all; user-select: all; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .auth-art .mascot, .queen-art .crown, .invite-card-art .big-fh, .sync-dot[data-s="syncing"] { animation: none; } }
/* ---------- From India (one simple checklist) ---------- */
.india-row .row-main { flex: 1; min-width: 0; }
.india-qty { display: flex; align-items: center; gap: 4px; padding-right: 8px; flex: none; }
.india-qty .qty { width: 64px; flex: none; text-align: center; font-weight: 700; font-size: .9rem; }
.step.step-sm .ic { width: 18px; height: 18px; }
.india-hero .india-plane { font-size: 20px; white-space: nowrap; letter-spacing: -3px; width: 58px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--lav-tint), var(--rose-tint)); flex: none; }
.india-hero .progress { margin-top: 6px; }
.india-sug { margin-bottom: 10px; }
.pill-add { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; white-space: nowrap; flex: none; }
.pill-add .thumb { border-radius: 8px; }
.pill-add .ic { width: 16px; height: 16px; color: var(--rose); }
.india-hero { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm, none); }
.india-hero .grow { flex: 1; min-width: 0; }
.india-hero.is-done { background: var(--leaf-tint); }
