@font-face { font-family: 'Poppins'; font-weight: 300; font-style: normal; font-display: swap; src: url('./assets/fonts/poppins-300.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 400; font-style: normal; font-display: swap; src: url('./assets/fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-style: normal; font-display: swap; src: url('./assets/fonts/poppins-500.woff2') format('woff2'); }

:root {
  --bg: #1c1c1e;
  --panel: #2a2a2d;
  --panel-strong: #242427;
  --field: #333336;
  --soft: #ffffff14;
  --line: #ffffff24;
  --line-strong: #ffffff66;
  --ink: #ffffff;
  --muted: #c4c4c7;
  --faint: #8e8e93;
  --cream: #ffffff;
  --cream-ink: #1c1c1e;
  --stop: #d98d80;
  --stop-bg: #7c392f33;
  --caution: #e3c690;
  --caution-bg: #8a6a2f2e;
  --r-panel: 1.25rem;
  --r-ctrl: .8125rem;
  --sans: 'Poppins', 'Century Gothic', CenturyGothic, Helvetica, Arial, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  --tabbar: 4.25rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--ink); background: var(--bg);
  font: 300 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision;
}
.backdrop {
  position: fixed; inset: -20px; z-index: -1; pointer-events: none; filter: blur(18px);
  background:
    radial-gradient(at 16% 12%, #b9b9b92e, #0000 41%),
    radial-gradient(at 88% 76%, #66666630, #0000 48%),
    linear-gradient(135deg, #2a2a2d, #1c1c1e 54%, #262628);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
main:focus, main:focus-visible { outline: none; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--cream); color: var(--cream-ink); padding: .5rem 1rem; border-radius: 99px; z-index: 99; }
.skip:focus { left: .5rem; }
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem;
  padding: calc(.5rem + env(safe-area-inset-top, 0px)) clamp(1rem, 4vw, 2.5rem) .5rem;
  background: #1c1c1ee6; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .75rem; background: none; border: 0; padding: 0; min-height: 44px; }
.brand img { width: 5.5rem; height: auto; display: block; }
.brand-label { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.brand-label b { font-weight: 500; color: var(--ink); }
.top-nav { display: none; margin-left: auto; gap: .25rem; }
.top-nav button {
  background: none; border: 0; min-height: 44px; padding: 0 1rem; font-size: .75rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid transparent;
}
.top-nav button[aria-current="page"] { color: var(--ink); border-bottom-color: var(--cream); }
.install {
  margin-left: auto; min-height: 40px; padding: 0 1rem; border-radius: 99px; border: 1px solid var(--line-strong);
  background: none; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
}

/* ---------- bottom tab bar (phones) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: .25rem .5rem calc(.25rem + var(--safe-b)); background: #0d0d0de6; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  display: grid; justify-items: center; gap: .1rem; min-height: 3.5rem; padding: .35rem 0; background: none; border: 0;
  color: var(--faint); font-size: .72rem; font-weight: 400; letter-spacing: .02em;
}
.tabbar svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-current="page"] { color: var(--ink); }
.tabbar button[aria-current="page"] svg { stroke: var(--cream); }

main { max-width: 60rem; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2.5rem) calc(var(--tabbar) + var(--safe-b) + 2rem); outline: none; }

@media (min-width: 860px) {
  .top-nav { display: flex; }
  .install { margin-left: 1rem; }
  .tabbar { display: none; }
  main { padding-bottom: 4rem; }
  .brand img { width: 6.5rem; }
}

/* ---------- type helpers ---------- */
.eyebrow { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.serif { font-family: var(--serif); letter-spacing: -.02em; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

/* ---------- home ---------- */
.hero { padding: clamp(1.5rem, 6vw, 4rem) 0 2rem; display: grid; gap: 1rem; }
.hero h1 { font-family: var(--serif); font-size: clamp(2.4rem, 8vw, 4.4rem); line-height: .98; letter-spacing: -.035em; }
.hero p { max-width: 34rem; color: var(--muted); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.home-grid { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 720px) { .home-grid { grid-template-columns: 1.3fr 1fr; } }

/* ---------- panels & controls ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: clamp(1rem, 3vw, 1.5rem); backdrop-filter: blur(20px) saturate(1.1); -webkit-backdrop-filter: blur(20px) saturate(1.1);
}
.panel h2 { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; margin-bottom: .75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: 0 1.4rem;
  border-radius: 99px; border: 1px solid var(--cream); background: var(--cream); color: var(--cream-ink);
  font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
}
.btn.ghost { background: none; color: var(--ink); border-color: var(--line-strong); }
.btn.small { min-height: 40px; padding: 0 1rem; font-size: .7rem; }
.btn:disabled { opacity: .4; cursor: default; }
.btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.field { display: grid; gap: .5rem; margin-bottom: 1.4rem; }
.field > label, .field > .label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.field .hint { font-size: .78rem; color: var(--faint); }
.input {
  width: 100%; min-height: 48px; padding: 0 1rem; border-radius: var(--r-ctrl); border: 1px solid var(--line);
  background: var(--field); font-size: 1rem;
}
.input::placeholder { color: var(--faint); }

.seg { display: flex; flex-wrap: wrap; gap: .45rem; }
.seg button {
  min-height: 44px; padding: .35rem 1rem; border-radius: 99px; border: 1px solid var(--line); background: var(--soft);
  font-size: .85rem; line-height: 1.2; text-align: left;
}
.seg button small { display: block; font-size: .7rem; color: var(--faint); }
.seg button[aria-pressed="true"] { background: var(--cream); color: var(--cream-ink); border-color: var(--cream); }
.seg button[aria-pressed="true"] small { color: #1b1e20b3; }

.levels { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .3rem; }
.levels button {
  position: relative; aspect-ratio: 1 / 1.35; min-height: 44px; border-radius: .6rem; border: 1px solid var(--line);
  padding: 0; display: grid; place-items: end center; padding-bottom: .3rem; font-size: .8rem; font-weight: 500;
}
.levels button[aria-pressed="true"] { outline: 2px solid var(--cream); outline-offset: 2px; }
.levels .lv-light { color: #1b1e20; }
.level-name { font-size: .82rem; color: var(--muted); min-height: 1.3em; }

.tones { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .45rem; }
.tones button {
  display: flex; align-items: center; gap: .55rem; min-height: 48px; padding: .4rem .7rem; border-radius: var(--r-ctrl);
  border: 1px solid var(--line); background: var(--soft); text-align: left; font-size: .82rem; line-height: 1.15;
}
.tones button i { flex: none; width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 1px solid #fff3; }
.tones button b { font-weight: 500; display: block; }
.tones button[aria-pressed="true"] { border-color: var(--cream); background: #ffffff24; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding: .5rem 0; border-top: 1px solid var(--line); }
.toggle:last-child { border-bottom: 1px solid var(--line); }
.toggle span small { display: block; color: var(--faint); font-size: .76rem; }
.switch { position: relative; flex: none; width: 3.1rem; height: 1.8rem; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--field); }
.switch::after { content: ''; position: absolute; top: .2rem; left: .2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--muted); transition: transform .18s; }
.switch[aria-checked="true"] { background: var(--cream); border-color: var(--cream); }
.switch[aria-checked="true"]::after { transform: translateX(1.3rem); background: var(--cream-ink); }

/* ---------- wizard ---------- */
.wiz-head { display: grid; gap: .6rem; margin-bottom: 1.25rem; }
.wiz-head h1 { font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 2.4rem); letter-spacing: -.03em; line-height: 1.05; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.progress span { height: 3px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--cream); }
.wiz-foot {
  position: sticky; bottom: calc(var(--tabbar) + var(--safe-b) + .5rem); display: flex; gap: .6rem; justify-content: space-between;
  margin-top: 1rem; padding: .6rem; border-radius: 99px; background: #141414e6; border: 1px solid var(--line); backdrop-filter: blur(12px);
}
@media (min-width: 860px) { .wiz-foot { bottom: 1rem; } }
.wiz-foot .btn { flex: 1; }
.wiz-foot .btn.ghost { flex: 0 0 auto; }

.journey { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: .4rem; }
.journey .stop { display: grid; gap: .35rem; justify-items: center; text-align: center; font-size: .75rem; color: var(--muted); }
.journey .chip { width: 100%; max-width: 5.5rem; aspect-ratio: 1.2; border-radius: .8rem; border: 1px solid #fff2; display: grid; place-items: center; font-weight: 500; font-size: 1rem; }
.journey .arrow { color: var(--faint); font-size: .9rem; }
.pigment { display: flex; gap: .8rem; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .85rem; }
.pigment i { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid #fff3; }
.pigment i + i { margin-left: -.9rem; }

/* ---------- result ---------- */
.result-head { display: grid; gap: .6rem; margin-bottom: 1.25rem; }
.result-head h1 { font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.03em; line-height: 1.05; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); }
.badge.adv { border-color: var(--caution); color: var(--caution); }
.stack { display: grid; gap: 1rem; }
.flags { display: grid; gap: .5rem; }
.flag { display: grid; grid-template-columns: auto 1fr; gap: .7rem; padding: .85rem 1rem; border-radius: var(--r-ctrl); font-size: .86rem; border: 1px solid var(--line); background: var(--soft); }
.flag b { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; padding-top: .15rem; }
.flag.stop { background: var(--stop-bg); border-color: #d98d8066; }
.flag.stop b { color: var(--stop); }
.flag.caution { background: var(--caution-bg); border-color: #e3c69055; }
.flag.caution b { color: var(--caution); }
.flag.info b { color: var(--muted); }

.step { display: grid; gap: .85rem; }
.step-top { display: flex; gap: .9rem; align-items: baseline; }
.step-num { font-family: var(--serif); font-size: 1.6rem; color: var(--cream); line-height: 1; }
.step-title { font-size: 1rem; font-weight: 500; }
.step-sub { font-size: .76rem; color: var(--muted); letter-spacing: .04em; }
.formula { font-family: var(--serif); font-size: clamp(1.35rem, 4vw, 1.7rem); letter-spacing: -.01em; line-height: 1.2; }
.mix { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .5rem; }
.mix div { padding: .6rem .8rem; border-radius: var(--r-ctrl); background: var(--field); border: 1px solid var(--line); }
.mix dt { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.mix dd { margin: .15rem 0 0; font-size: .9rem; font-weight: 400; }
.step p.how { font-size: .88rem; color: var(--muted); }
ul.notes { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; font-size: .88rem; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.disclaimer { font-size: .76rem; color: var(--faint); margin-top: 1.5rem; }

/* ---------- saved ---------- */
.list { display: grid; gap: .6rem; }
.card-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem; width: 100%; padding: .85rem 1rem;
  border-radius: var(--r-ctrl); border: 1px solid var(--line); background: var(--panel); text-align: left;
}
.card-row .sw { width: 2.4rem; height: 2.4rem; border-radius: .6rem; border: 1px solid #fff2; display: grid; place-items: center; font-size: .78rem; font-weight: 500; }
.card-row b { display: block; font-weight: 500; }
.card-row small { color: var(--faint); font-size: .76rem; }
.card-row .chev { color: var(--faint); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); display: grid; gap: .8rem; justify-items: center; }
.empty h2 { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); text-transform: none; letter-spacing: -.02em; font-weight: 400; }

/* ---------- cheat sheets ---------- */
details.sheet { border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); margin-bottom: .7rem; overflow: hidden; }
details.sheet summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 56px; padding: .8rem 1.2rem; cursor: pointer; }
details.sheet summary::-webkit-details-marker { display: none; }
details.sheet summary b { font-weight: 500; }
details.sheet summary small { display: block; color: var(--faint); font-size: .76rem; }
details.sheet summary::after { content: '+'; font-size: 1.3rem; color: var(--muted); }
details.sheet[open] summary::after { content: '–'; }
.sheet-body { padding: 0 1.2rem 1.2rem; font-size: .88rem; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th, td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 400; }
td .dot { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; vertical-align: -3px; margin-right: .4rem; border: 1px solid #fff3; }
.sheet-body p + p, .sheet-body p + table, .sheet-body table + p { margin-top: .75rem; }

/* ---------- dialog & toast ---------- */
.dialog { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: #000a; }
.dialog-card { width: min(26rem, 100%); padding: 1.4rem; border-radius: var(--r-panel); background: #1d2022; border: 1px solid var(--line-strong); display: grid; gap: .8rem; }
.dialog-card h2 { font-family: var(--serif); font-size: 1.4rem; }
.dialog-card p { color: var(--muted); font-size: .9rem; }
.dialog-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + var(--safe-b) + 1rem); z-index: 70; transform: translate(-50%, 1rem);
  padding: .7rem 1.2rem; border-radius: 99px; background: var(--cream); color: var(--cream-ink); font-size: .85rem; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 860px) { .toast { bottom: 2rem; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media print {
  .top, .tabbar, .backdrop, .result-actions, .wiz-foot { display: none !important; }
  body { background: #fff; color: #111; }
  .panel, .flag, .mix div { background: none; border-color: #ccc; backdrop-filter: none; }
  .muted, .step p.how, ul.notes, .step-sub { color: #444; }
}

/* ---------- Expansion: tones, reds, placement, application ---------- */
.tones button small, .presets button span { display: block; color: var(--faint); font-size: .72rem; margin-top: .1rem; }
.tones button[aria-pressed="true"] small { color: var(--muted); }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .45rem; }
.presets button { display: flex; align-items: center; gap: .55rem; min-height: 48px; padding: .45rem .7rem; border-radius: var(--r-ctrl); border: 1px solid var(--line); background: var(--soft); text-align: left; font-size: .8rem; line-height: 1.15; color: var(--ink); }
.presets button i { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1px solid #fff3; }
.presets button b { display: block; font-weight: 500; color: var(--ink); font-size: .82rem; }
.presets button[aria-pressed="true"] { border-color: var(--cream); background: #ffffff24; }
.goldbox { display: grid; gap: .7rem; border-color: #ffffff55; }
.goldbox h2, .place-detail h2 { margin: 0; }
.tone-info p { margin: .25rem 0; font-size: .9rem; }
.tone-info .eyebrow { margin-bottom: .4rem; }

.placements { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem; }
.placements button { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; min-height: 4.25rem; border-radius: var(--r-ctrl); border: 1px solid var(--line); background: var(--soft); text-align: left; color: var(--ink); font-size: .82rem; line-height: 1.15; }
.placements button b { display: block; font-weight: 500; }
.placements button small { display: block; color: var(--faint); font-size: .72rem; margin-top: .15rem; }
.placements button[aria-pressed="true"] { border-color: var(--cream); background: #ffffff24; }
.head { display: block; flex: none; }
.head.mini { width: 2.6rem; height: auto; }
.head.big { width: min(11rem, 40vw); height: auto; }
.place-detail { display: flex; gap: 1.25rem; align-items: flex-start; }
.place-detail p { margin: .45rem 0 0; font-size: .9rem; }
@media (max-width: 560px) { .place-detail { flex-direction: column; align-items: center; } .place-detail > div { width: 100%; } }
.place-row { display: flex; gap: .8rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); }
.place-row:first-child { border-top: 0; }
.place-row p { margin: 0; }

.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; counter-reset: ph; }
.phases > li { counter-increment: ph; padding-left: 2.3rem; position: relative; }
.phases > li::before { content: counter(ph); position: absolute; left: 0; top: .05rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: .75rem; color: var(--cream); }
.phase-h { margin: 0 0 .25rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cream); font-weight: 500; }
.phases ul.notes { margin: 0; }

.tgroup { display: block; margin: 1.1rem 0 .45rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tchips { display: flex; flex-wrap: wrap; gap: .4rem; }
.tchips button { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .7rem; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); font-weight: 500; font-size: .82rem; }
.tchips button small { color: var(--faint); font-weight: 300; font-size: .72rem; }
.tchips button i { width: .95rem; height: .95rem; border-radius: 50%; border: 1px solid #fff3; }
.tchips button[aria-pressed="true"] { border-color: var(--cream); background: #ffffff24; }
.wiz-head .seg { margin-top: .4rem; }
main > .panel, main > .list, main > .lv-rows { margin-top: 1rem; }
.lv-rows { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.lv-row { display: flex; align-items: center; gap: .8rem; padding: .5rem .7rem; border-radius: var(--r-ctrl); background: var(--panel); border: 1px solid var(--line); }
.lv-row .chip { flex: none; width: 3.3rem; height: 2.4rem; border-radius: .6rem; display: grid; place-items: center; font-weight: 500; font-size: .85rem; border: 1px solid #fff2; }
.lv-row > span:nth-child(2) { flex: 1; min-width: 0; }
.lv-row b { display: block; font-weight: 500; font-size: .9rem; }
.lv-row small { display: block; color: var(--faint); font-size: .74rem; }

/* ---------- Owner Studio look: deep teal clouds, teal gradient bars, white controls ---------- */
:root {
  --bg: #173c40;
  --panel: #ffffff0f;
  --panel-strong: #0000001f;
  --field: #00000024;
  --soft: #ffffff0d;
  --line: #ffffff26;
  --line-strong: #ffffff73;
  --ink: #ffffff;
  --muted: #ffffffcc;
  --faint: #ffffff99;
  --cream: #ffffff;
  --cream-ink: #07545d;
  --serif: 'Poppins', 'Century Gothic', CenturyGothic, Helvetica, Arial, sans-serif;
  --r-panel: 1.1rem;
}
.backdrop {
  filter: none; inset: 0;
  background:
    radial-gradient(ellipse at 10% 9%, rgba(47,112,115,.48), transparent 43%),
    radial-gradient(ellipse at 92% 24%, rgba(38,88,101,.45), transparent 45%),
    radial-gradient(ellipse at 38% 47%, rgba(12,31,35,.45), transparent 40%),
    radial-gradient(ellipse at 4% 78%, rgba(45,105,104,.5), transparent 42%),
    radial-gradient(ellipse at 94% 94%, rgba(42,96,103,.44), transparent 45%),
    #173c40;
}
.top {
  background: linear-gradient(105deg, #032f36, #075661 54%, #11808a);
  border-bottom: 1px solid #ffffff40; box-shadow: inset 0 1px 0 #ffffff24;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.brand-label { color: #ffffffe6; }
.tabbar {
  background: linear-gradient(105deg, #032f36, #075661 54%, #0d6c76);
  border-top: 1px solid #ffffff33; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.tabbar button { position: relative; color: #fff; opacity: .72; font-size: .68rem; }
.tabbar button[aria-current="page"] { opacity: 1; }
.tabbar button[aria-current="page"]::before { content: ''; position: absolute; top: -.25rem; left: 28%; right: 28%; height: 2px; border-radius: 2px; background: #fff; }
.tabbar button[aria-current="page"] svg { stroke: #fff; filter: drop-shadow(0 0 1.2px rgba(128,236,239,.92)); }

/* Desktop tabs styled like the Owner Studio tab row */
.top-nav button small { display: none; }
@media (min-width: 860px) {
  .top { padding-top: calc(.6rem + env(safe-area-inset-top, 0px)); padding-bottom: 0; align-items: flex-end; }
  .brand { padding-bottom: .5rem; }
  .top-nav { gap: .35rem; align-self: flex-end; }
  .top-nav button {
    min-height: 3.1rem; padding: .45rem 1.4rem .5rem; display: grid; place-content: center; gap: .1rem;
    border: 1px solid #ffffff38; border-bottom: 0; border-radius: .7rem .7rem 0 0;
    background: linear-gradient(180deg, #ffffff14, #ffffff05); color: #ffffffd9; font-size: .7rem; letter-spacing: .16em;
  }
  .top-nav button small { display: block; font-size: .58rem; letter-spacing: .02em; text-transform: none; color: #ffffffa6; font-weight: 300; }
  .top-nav button:hover { background: #ffffff1f; color: #fff; }
  .top-nav button[aria-current="page"] {
    color: #fff; border-color: #ffffff66;
    background: linear-gradient(180deg, #1a96a0, #0f7a84);
    box-shadow: inset 0 1px 0 #ffffff40;
  }
  .install { align-self: center; margin-bottom: .5rem; }
}

/* Headings in light Poppins, like Owner Studio */
.hero h1, .wiz-head h1, .result-head h1, .empty h2, .dialog-card h2, .formula, .step-num { font-weight: 200; letter-spacing: -.01em; }
.hero h1 { line-height: 1.02; }

/* White pill controls that invert to teal on hover */
.btn { background: #fff; border-color: #fff; color: #07545d; }
.btn:is(:hover, :focus-visible) { background: #e9f7f7; }
.btn.ghost { background: #ffffff14; border-color: #ffffff73; color: #fff; }
.btn.ghost:is(:hover, :focus-visible) { background: #fff; color: #07545d; }
.install { background: #ffffff14; border-color: #ffffff73; color: #fff; }
.input { background: #00000024; border-color: #ffffff4d; }
.seg button[aria-pressed="true"] small { color: #07545db3; }
.panel, details.sheet, .card-row, .lv-row { background: #ffffff0f; border-color: #ffffff33; box-shadow: inset 0 1px 0 #ffffff14; }
.wiz-foot { background: #0a3d44e6; border-color: #ffffff33; }
.dialog-card { background: #0f4a51; border-color: #ffffff4d; }
.dialog { background: #021c20b3; }
.toast { background: #fff; color: #07545d; }
.flag.info, .flag { background: #ffffff0d; }

.progress { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.nt { text-transform: none; letter-spacing: .08em; }
.xgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.xgrid .field { margin-bottom: .9rem; }
.xout { padding: .8rem 1rem; border-radius: var(--r-ctrl); background: #00000024; border: 1px solid var(--line); display: grid; gap: .3rem; margin-bottom: .6rem; }
.xtimers { display: grid; gap: .5rem; margin: .9rem 0 .6rem; }
.xtimer { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: .5rem; padding: .55rem .8rem; border-radius: var(--r-ctrl); border: 1px solid var(--line); background: #ffffff0d; }
.xtimer small { display: block; font-size: .72rem; color: var(--faint); }
.xclock { font-size: 1.5rem; font-weight: 200; font-variant-numeric: tabular-nums; min-width: 4.2rem; text-align: right; }
.xtimer.done { border-color: #fff; background: #ffffff24; }
.xlist { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; }
@media (max-width: 520px) { .xtimer { grid-template-columns: 1fr auto; } .xtimer .btn { width: 100%; } }

/* ---------- buyer unlock ---------- */
html.locked body > *:not(.gate) { visibility: hidden; }
.gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.25rem;
  background: radial-gradient(120% 80% at 20% 0%, #11808a 0%, #075661 40%, #032f36 100%); }
.gate-card { width: min(26rem, 100%); background: #ffffff12; border: 1px solid #ffffff2e; border-radius: 1.25rem;
  padding: 2rem 1.5rem; backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: .6rem; color: #fff; }
.gate-sig { width: 9rem; opacity: .95; margin-bottom: .25rem; }
.gate-eyebrow { margin: 0; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: #ffffffb3; }
.gate-eyebrow .nt { text-transform: none; }
.gate h1 { margin: 0; font-weight: 200; font-size: 1.9rem; letter-spacing: .01em; }
.gate-sub { margin: 0 0 .5rem; color: #ffffffcc; font-size: .92rem; }
.gate label { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #ffffffb3; }
.gate input { font: inherit; font-size: .9rem; padding: .8rem .9rem; border-radius: .8rem; border: 1px solid #ffffff40; background: #00000033; color: #fff; }
.gate-msg { min-height: 1.2em; margin: 0; font-size: .85rem; color: #ffd9cf; }
.gate-btn { font: inherit; font-weight: 500; padding: .85rem; border: 0; border-radius: 99px; background: #fff; color: #07545d; cursor: pointer; }
.gate-btn:disabled { opacity: .6; }
.gate-buy { text-align: center; color: #fff; font-size: .85rem; margin-top: .25rem; }
