/* Zoombad design layer: brand font, icons, depth, tiles, welcome & setup screens. Loaded last. */

@font-face {
  font-family: "Nunito Variable";
  font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(/fonts/nunito-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito Variable";
  font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(/fonts/nunito-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --brand-font: "Nunito Variable", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  font-family: "Nunito Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px -8px rgba(0, 0, 0, .12);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .05), 0 24px 48px -16px rgba(0, 0, 0, .22);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--surface));
  --leaf-soft: color-mix(in srgb, var(--leaf) 14%, var(--surface));
}
@media (prefers-color-scheme: dark) {
  :root { --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -8px rgba(0,0,0,.5); --shadow-lg: 0 24px 48px -16px rgba(0,0,0,.6); }
}
body { -webkit-font-smoothing: antialiased; font-feature-settings: "ss01"; }
h1, h2, h3, .brand, .btn, .tile-name, .scard-title { font-family: var(--brand-font); }
h1 { font-weight: 850; letter-spacing: -.02em; }
.btn { font-weight: 800; letter-spacing: .005em; transition: transform .12s, box-shadow .12s, filter .12s; }
.btn:not(:disabled):hover { filter: brightness(1.05); box-shadow: var(--shadow); }
.btn:not(:disabled):active { transform: scale(.98); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }

/* ---------- icons (Lucide, tinted with the text colour) ---------- */
.i {
  display: inline-block; width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em;
  background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.menu-item .mi-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.menu-item .mi-icon .i { width: 20px; height: 20px; }
.menu-item.danger .mi-icon { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }

/* ---------- tab bar ---------- */
.tabbar a span.i { filter: none; opacity: 1; width: 24px; height: 24px; }
.tabbar a { color: var(--muted); }
.tabbar a.on { color: var(--accent); }

.home-head { margin-bottom: 22px; }
.home-head h1 { font-size: 32px; }
.avatar { box-shadow: var(--shadow-sm); }

/* ---------- welcome / landing ---------- */
.landing { max-width: 1080px; margin: 0 auto; padding: 20px 16px 120px; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 18px; }
.landing-nav .brand img { width: 34px; height: 34px; }
.landing-nav .brand { font-size: 20px; }
.hero { display: grid; gap: 28px; align-items: center; padding: 8px 0 28px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.15fr .85fr; gap: 48px; padding: 32px 0 48px; } }
.hero h1 { font-size: clamp(36px, 7vw, 60px); line-height: 1.02; margin: 10px 0 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); line-height: 1.5; margin: 0 0 18px; max-width: 34em; }
.kicker { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--leaf); background: var(--leaf-soft); padding: 6px 12px; border-radius: 999px; }
.promise { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.promise li { display: inline-flex; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 14px; font-weight: 700; }
.promise li .i { color: var(--leaf); }
.login-card { background: var(--surface); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-lg); position: relative; }
.login-card h2 { margin: 0 0 2px; font-size: 22px; }
.login-card .login { margin-top: 12px; }
.mascot-wrap { position: relative; display: grid; place-items: center; }
.mascot { width: min(64vw, 340px); filter: drop-shadow(0 24px 30px rgba(224, 106, 0, .25)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .mascot { animation: none; } }
.bubble-say {
  position: absolute; top: 6%; left: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 18px 18px 18px 4px;
  padding: 10px 14px; font-weight: 700; font-size: 14px; max-width: 220px;
}
/* phones: the mascot greets you at the top, the speech bubble beside it */
@media (max-width: 859px) {
  .mascot-wrap { order: -1; display: flex; align-items: center; justify-content: center; gap: 4px; margin: -4px 0 -10px; }
  .mascot { width: 128px; }
  .bubble-say { position: static; max-width: 190px; font-size: 13px; border-radius: 18px 18px 18px 4px; }
}
.section { padding: 40px 0 8px; }
.section h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 6px; letter-spacing: -.02em; }
.section > p.muted { margin: 0 0 22px; font-size: 16px; }
.steps3 { display: grid; gap: 14px; }
@media (min-width: 760px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.step3 { background: var(--surface); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); }
.step3 .num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.step3 .num .i { width: 22px; height: 22px; }
.step3 h3 { margin: 0 0 4px; font-size: 18px; }
.step3 p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.step3 .say { margin-top: 10px; font-size: 14px; background: var(--bg); border-radius: 12px; padding: 8px 10px; }
.landing .cards { grid-auto-columns: minmax(200px, 44%); }
@media (min-width: 760px) { .landing .cards { grid-auto-columns: minmax(200px, 23.5%); } }
.compare-wrap { overflow-x: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); }
.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.compare th, .compare td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { font-size: 13px; color: var(--muted); font-weight: 800; }
.compare th.us, .compare td.us { background: var(--accent-soft); font-weight: 800; }
.compare thead th.us { color: var(--accent); }
.compare tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 700; color: var(--muted); }
@media (max-width: 600px) {
  .compare { min-width: 520px; font-size: 13.5px; }
  .compare th, .compare td { padding: 10px; }
}
.compare .yes { color: var(--leaf); }
.cta-band {
  margin-top: 40px; border-radius: 28px; padding: 28px 22px; text-align: center; color: #fff;
  background: radial-gradient(120% 140% at 10% 0%, #ff8a4c 0%, #ff4d01 45%, #d03a00 100%); box-shadow: var(--shadow-lg);
}
.cta-band h2 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 34px); }
.cta-band p { margin: 0 0 16px; opacity: .95; }
.cta-band .btn { background: #fff; color: #c25400; }
.landing-foot { text-align: center; margin-top: 30px; color: var(--muted); font-size: 13px; }
.landing-foot a { color: var(--muted); }

/* ---------- guided setup ---------- */
.setup { max-width: 560px; margin: 0 auto; padding: 24px 16px 60px; }
.setup .progress { display: flex; gap: 6px; margin: 0 0 22px; }
.setup .progress i { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.setup .progress i.on { background: var(--accent); }
.setup h1 { font-size: 28px; margin: 6px 0 6px; }
.setup .lead { color: var(--muted); margin: 0 0 18px; }
.ai-choices { display: grid; gap: 10px; }
.ai-choice {
  display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; background: var(--surface); border: 2px solid transparent;
  border-radius: 18px; padding: 16px; box-shadow: var(--shadow);
}
.ai-choice:hover { border-color: var(--accent-soft); }
.ai-choice .logo-box { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 900; font-size: 20px; }
.ai-choice b { display: block; font-size: 17px; font-family: var(--brand-font); }
.ai-choice span.muted { font-size: 14px; }
.ai-choice > .i { margin-left: auto; color: var(--muted); }  /* only the arrow on the right */
.howto { counter-reset: s; list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.howto li { counter-increment: s; display: flex; gap: 12px; background: var(--surface); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); line-height: 1.45; }
.howto li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 900; font-size: 14px; }
.waiting { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; margin: 14px 0; }
.dot-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .4; } }
.success { text-align: center; }
.success .mascot { width: 180px; }
.skip { display: block; margin: 18px auto 0; border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 14px; }
pre.config { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 12.5px; overflow-x: auto; white-space: pre; }

/* ---------- empty state ---------- */
.empty .empty-mascot { width: 140px; margin: 0 auto 6px; display: block; }

/* ---------- desktop: sheets become centred dialogs ---------- */
@media (min-width: 760px) {
  .sheet-panel { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); max-height: 86dvh; margin: 0; border-radius: 24px; box-shadow: var(--shadow-lg); }
  .sheet-grab { display: none; }
  #home { max-width: 980px; }
}

/* ---------- app icons: Lucide glyph on a gradient squircle ---------- */
.app-icon {
  --s: 52px; position: relative; flex: none; display: grid; place-items: center;
  width: var(--s); height: var(--s); border-radius: calc(var(--s) * .23); color: #fff;
  background: linear-gradient(160deg, var(--a, #ffad5c) 0%, var(--z, #ec6a0c) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .12), 0 4px 12px -4px color-mix(in srgb, var(--z, #ec6a0c) 55%, transparent);
}
.app-icon > .i { width: 52%; height: 52%; }
.app-icon.emoji { background: linear-gradient(160deg, color-mix(in srgb, var(--a) 30%, var(--surface)), color-mix(in srgb, var(--z) 26%, var(--surface))); }
.app-icon .emo { font-size: calc(var(--s) * .56); line-height: 1; }
.app-icon.xs { --s: 28px; box-shadow: none; }
.app-icon.sm { --s: 40px; }
.app-icon.md { --s: 52px; }
.app-icon.lg { --s: 64px; }
.app-icon.xl { --s: 104px; }
.src-badge {
  position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--leaf); color: #fff; border: 2.5px solid var(--surface);
}
.src-badge.users-round { background: #2f6ee6; }
.src-badge .i { width: 13px; height: 13px; }

/* ---------- home tiles: the icon is the hero ---------- */
.grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.tile {
  border: 0; box-shadow: var(--shadow); padding: 20px 12px 16px; gap: 10px; min-height: 0;
  align-items: center; text-align: center; border-radius: 22px;
}
.tile:hover { box-shadow: var(--shadow-lg); }
.tile-name {
  font-size: 16px; font-weight: 800; line-height: 1.25; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile-meta { margin-top: 0; font-size: 13px; color: var(--muted); }
.tile-meta.update { color: var(--accent-text); font-weight: 800; display: inline-flex; gap: 4px; align-items: center; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); } }

/* ---------- runner bar ---------- */
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); }
.icon-btn .i { width: 24px; height: 24px; }
.run-title { font-family: var(--brand-font); font-weight: 800; }
#runIcon { display: contents; }

/* ---------- Store ---------- */
.scard { border: 0; gap: 8px; border-radius: 20px; }
.scard .app-icon { margin-bottom: 4px; }
.scard-title { font-size: 16px; font-weight: 800; }
.price { color: var(--accent-text); }
.stars .star { width: 13px; height: 13px; fill: currentColor; }
.stars .off { color: color-mix(in srgb, var(--muted) 35%, transparent); }
.srow { border: 0; box-shadow: var(--shadow-sm); }
.search-wrap { position: relative; }
.search-wrap > .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-wrap .search { padding-left: 44px; min-height: 48px; }
.cards::-webkit-scrollbar { display: none; }
.lp-head { gap: 18px; }
.lp-head h1 { font-size: 28px; line-height: 1.15; }
.lp-actions .btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.facts { list-style: none; padding: 16px 0; margin: 8px 0 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-block: 1px solid var(--line); }
.facts li { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.facts li + li { border-left: 1px solid var(--line); }
.facts .i { width: 22px; height: 22px; color: var(--leaf); }
.star-pick button { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; color: var(--line); }
.star-pick .star { width: 30px; height: 30px; fill: currentColor; }
.back-link { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; color: var(--accent-text); }
.sell .go { color: var(--accent-text); display: inline-flex; gap: 4px; align-items: center; }
.lp-links .link-btn { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--muted); font-weight: 700; }
.lp-links .link-btn .i { width: 18px; height: 18px; }
.join-card { gap: 16px; }

/* ---------- small text in brand orange stays readable ---------- */
.link, .badge, .eyebrow, .try-note { color: var(--accent-text); }
.tabbar a.on { color: var(--accent-text); }

/* ---------- tap targets: 44px minimum (Apple HIG) ---------- */
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.small { min-height: 36px; padding: 8px 14px; font-size: 14px; position: relative; }
.btn.small::after, .prompt button::after { content: ""; position: absolute; inset: -4px; }
.btn.wide { display: flex; min-height: 50px; }
.chip { min-height: 40px; }
.link-btn { min-height: 44px; }
.install-x { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
.prompt button { position: relative; min-height: 34px; padding: 6px 14px; display: inline-flex; gap: 4px; align-items: center; }
.copied { background: var(--leaf) !important; color: #fff !important; }
.kbd { display: inline-grid; place-items: center; vertical-align: -4px; padding: 1px 5px; }
.kbd .i { width: 15px; height: 15px; }

/* ---------- landing ---------- */
.promise { gap: 6px 16px; }
.promise li { background: none; border: 0; padding: 0; font-size: 14.5px; color: var(--muted); }
.hero-cta { display: none; }
@media (max-width: 859px) { .hero-cta { display: flex; width: 100%; min-height: 52px; font-size: 17px; margin: 0 0 16px; } }
.cta-band .btn { min-height: 52px; padding: 12px 28px; font-size: 17px; }
.login .chip { margin-left: 4px; color: var(--ink); }

/* ---------- desktop: wider layouts, buttons don't stretch ---------- */
@media (min-width: 760px) {
  .lp-actions .btn.wide { width: auto; min-width: 180px; max-width: 280px; flex: 0 1 auto; }
  .lp-actions { justify-content: flex-start; }
}
.wallet { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; min-height: 44px; }
.cards.all { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); overflow: visible; }

/* ---------- second-review fixes ---------- */
a.btn { text-decoration: none; }
@media (prefers-color-scheme: dark) {
  .sell { background: linear-gradient(135deg, #2e1a08, #1c1c1e); border-color: transparent; }
}
.review-form .btn { justify-self: start; }
@media (min-width: 760px) {
  .store .btn.wide, .setup .btn.wide, #join .btn.wide { width: auto; max-width: 280px; min-width: 200px; }
}

/* ---------- runner: bar matches the app, splash while it loads ---------- */
.run-bar { background: var(--run-bg, var(--surface)); color: var(--run-ink, var(--ink)); border-bottom-color: color-mix(in srgb, var(--run-ink, var(--ink)) 10%, transparent); transition: background .2s; }
.run-bar .icon-btn { color: inherit; }
.run-bar .icon-btn:hover { background: color-mix(in srgb, var(--run-ink, var(--ink)) 8%, transparent); }
.run-stage { flex: 1; position: relative; display: flex; min-height: 0; }
.run-stage #frame { flex: 1; height: 100%; }
.run-splash { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg); transition: opacity .18s ease-out; }
.run-splash .app-icon { animation: splash-in .2s ease-out; }
.run-splash.out { opacity: 0; }
@keyframes splash-in { from { transform: scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .run-splash .app-icon { animation: none; } .run-splash { transition: none; } }

/* ---------- landing, setup and join: plain white (black in dark mode); ma (generous space) on the landing page ---------- */
html:has(#welcome:not([hidden])), body:has(#welcome:not([hidden])) { background: var(--kinari); }
.landing .section { padding-top: 64px; }
@media (min-width: 860px) { .landing .section { padding-top: 96px; } .cta-band { margin-top: 96px; } }
body:has(#setup:not([hidden])), body:has(#join:not([hidden])) { background: var(--kinari); }

/* ---------- landing v2: make / buy / control, and "not another app store" ---------- */
.hero h1 em { white-space: nowrap; }
.hero .lead { margin-bottom: 22px; }
.pillars { display: grid; gap: 14px; }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.pillar { background: var(--surface); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.pillar-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent); color: #fff; margin-bottom: 14px; }
.pillar-icon .i { width: 24px; height: 24px; }
.pillar h3 { margin: 0 0 6px; font-size: 22px; }
.pillar p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.versus { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.versus li { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.versus span { padding: 16px 18px; font-size: 15.5px; line-height: 1.4; }
.versus .them { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.versus .us { font-weight: 800; background: var(--accent-soft); }
@media (max-width: 520px) { .versus li { grid-template-columns: 1fr; } .versus span { padding: 12px 16px; } }

/* Language list (You → Settings → Language) */
.lang-list { display: grid; gap: 2px; }
.lang-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px; border: 0; border-radius: 14px; background: none; font: inherit; font-size: 17px; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.lang-row:active { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.lang-row.on { color: var(--accent, #ff5a1f); }
.lang-row .i { width: 20px; height: 20px; }
