/* Arch & Flo store — visual language
   Warm paper, soft ink, arched doorways. Each product brings its own colour. */

@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/instrument-sans.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --paper: #F5ECDC; --paper-2: #EDE0CB; --card: #FBF6EC;
  --ink: #241A14; --ink-2: #6A584B; --line: rgba(36, 26, 20, .13);
  --accent: #D4502B; --accent-ink: #FFF8EE;
  --shadow: 0 1px 2px rgba(60, 34, 14, .08), 0 14px 34px -14px rgba(60, 34, 14, .28);
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(18px, 4.6vw, 44px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1A1411; --paper-2: #231A16; --card: #281E19;
    --ink: #F6EBDD; --ink-2: #B9A797; --line: rgba(246, 235, 221, .15);
    --accent: #F2794F; --accent-ink: #1A1411;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 36px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1A1411; --paper-2: #231A16; --card: #281E19;
  --ink: #F6EBDD; --ink-2: #B9A797; --line: rgba(246, 235, 221, .15);
  --accent: #F2794F; --accent-ink: #1A1411;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 36px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html.sheet-open { overflow: hidden; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.5 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  padding-bottom: calc(108px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
#view:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 12px; z-index: 50; }
.skip:focus { top: 12px; }
.noscript { padding: 40px var(--gutter); }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 6px max(var(--gutter), env(safe-area-inset-left));
  max-width: 1240px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.brand .mark { width: 34px; height: 34px; color: var(--accent); }
.brand-name { font: 560 21px/1 var(--display); font-variation-settings: 'SOFT' 100, 'WONK' 1; letter-spacing: -.01em; }
.brand-name i { font-style: italic; color: var(--accent); font-weight: 400; padding: 0 1px; }
.top-actions { display: flex; gap: 8px; }
.chip-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--line); font-weight: 560; font-size: 15px;
  transition: background .2s, transform .2s var(--ease);
}
.chip-btn:active { transform: scale(.96); }
@media (hover: hover) { .chip-btn:hover { background: var(--paper-2); } }

/* ---------- type ---------- */
.eyebrow { display: block; font-size: 12.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.lede { font-size: clamp(18px, 2.3vw, 22px); color: var(--ink-2); max-width: 30ch; text-wrap: balance; }
h1, h2, h3 { font-family: var(--display); font-variation-settings: 'SOFT' 100, 'WONK' 1; font-weight: 520; letter-spacing: -.022em; text-wrap: balance; }
h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.08; }

/* ---------- layout ---------- */
#view { max-width: 1240px; margin: 0 auto; }
#view > * { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(22px, 5vw, 56px); padding-bottom: clamp(20px, 4vw, 40px); }
.hero-mark { color: var(--accent); width: clamp(56px, min(9vw, 9vh), 88px); margin-bottom: clamp(10px, 2vw, 18px); margin-left: -6px; }
.hero h1 { font-size: clamp(50px, min(12.4vw, 12.5vh), 132px); line-height: .92; font-weight: 480; letter-spacing: -.04em; max-width: 9ch; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 420; }
.hero .lede { margin-top: clamp(16px, 2.6vw, 28px); max-width: 26ch; }

.mark-draw .mark-arch { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 1.1s .15s var(--ease) forwards; }
.mark-draw .mark-flo { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 1s .7s var(--ease) forwards; }
.mark-draw { animation: pulse 4.5s 2s ease-in-out infinite; transform-origin: 50% 70%; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }

.page-head { padding-top: clamp(18px, 4vw, 44px); padding-bottom: clamp(18px, 3vw, 30px); }
.page-head h1 { font-size: clamp(46px, 9.5vw, 96px); line-height: .96; letter-spacing: -.035em; margin: 8px 0 12px; }
.page-head .lede { max-width: 34ch; }

/* ---------- doors ---------- */
.shelf-head { display: grid; gap: 4px; margin-bottom: 16px; }
.arcade-wrap { padding-left: 0 !important; padding-right: 0 !important; padding-top: 8px; }
.arcade-wrap .shelf-head { padding: 0 max(var(--gutter), env(safe-area-inset-left)); }
.arcade {
  display: flex; gap: clamp(14px, 2.2vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 10px max(var(--gutter), env(safe-area-inset-right)) 34px max(var(--gutter), env(safe-area-inset-left));
  scroll-padding-left: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.arcade::-webkit-scrollbar { display: none; }
.arcade .door { flex: 0 0 clamp(210px, 62vw, 290px); scroll-snap-align: start; }
.arcade .door:nth-child(even) { margin-top: 26px; }

.doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(16px, 2.6vw, 28px); padding-bottom: 20px; }
@media (max-width: 520px) { .doors { grid-template-columns: 1fr 1fr; gap: 14px; } }
@media (max-width: 340px) { .doors { grid-template-columns: 1fr; } }

.door {
  position: relative; aspect-ratio: 3 / 4.3; background: var(--p-bg); color: var(--p-ink);
  border-radius: 50% 50% 26px 26px / 34.9% 34.9% 26px 26px;
  overflow: hidden; isolation: isolate; box-shadow: var(--shadow);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
.door-link { position: absolute; inset: 0; display: block; }
.door-art { position: absolute; inset: 0; transition: transform .8s var(--ease); }
.scene { width: 100%; height: 100%; }
.door-foot {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 54px 16px 18px 18px;
  background: linear-gradient(to top, var(--p-bg) 46%, color-mix(in srgb, var(--p-bg) 0%, transparent));
  display: grid; gap: 3px;
}
.door-foot h3 { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.05; padding-right: 50px; }
.door-foot p { font-size: 14.5px; line-height: 1.3; opacity: .86; padding-right: 50px; }
.status {
  justify-self: start; display: inline-flex; align-items: center; gap: 7px; margin-bottom: 6px;
  font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  padding: 5px 10px 5px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--p-ink) 14%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--p-accent); animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .35; transform: scale(.8); } }
.status-quiet { font-style: normal; font-size: 12.5px; color: var(--ink-2); font-weight: 560; }

@media (hover: hover) {
  .door:hover { transform: translateY(-6px); }
  .door:hover .door-art { transform: scale(1.06); }
}
.door:active { transform: scale(.985); }

/* ---------- save ---------- */
.save {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--card); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  transition: transform .25s var(--ease), background .2s, color .2s;
}
.save svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.save[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.save:active { transform: scale(.88); }
.save.pop { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.22); } }
.door .save { position: absolute; right: 12px; bottom: 14px; z-index: 2; }
.save-wide { width: auto; height: 54px; padding: 0 24px 0 20px; border-radius: 999px; font-weight: 620; font-size: 16.5px; background: var(--ink); color: var(--paper); box-shadow: none; }
.save-wide[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- shelves + tiles ---------- */
.shelf { padding-top: clamp(26px, 5vw, 52px); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.tile {
  position: relative; display: flex; align-items: center; gap: 8px; background: var(--card);
  border-radius: 24px; padding: 12px 12px 12px 12px; border: 1px solid var(--line);
  transition: transform .3s var(--ease);
}
.tile:active { transform: scale(.985); }
.tile-link { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.tile-text { display: grid; min-width: 0; line-height: 1.25; }
.tile-text strong { font: 560 18.5px/1.15 var(--display); font-variation-settings: 'SOFT' 100, 'WONK' 1; letter-spacing: -.01em; }
.tile-text > span { font-size: 14.5px; color: var(--ink-2); margin: 2px 0 3px; }
.tile .save { flex: none; box-shadow: none; background: var(--paper-2); }
.tile .save[aria-pressed="true"] { background: var(--accent); }

.app-icon { flex: none; width: 60px; height: 60px; border-radius: 28% 28% 24% 24% / 44% 44% 24% 24%; overflow: hidden; display: block; box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 6px 14px -6px rgba(0, 0, 0, .3); background: var(--p-bg, var(--paper-2)); }
.app-icon .icon-svg { width: 100%; height: 100%; }
.app-icon-lg { width: 68px; height: 68px; }
.app-icon-xl { width: clamp(72px, 17vw, 92px); height: clamp(72px, 17vw, 92px); }

/* ---------- install band ---------- */
.band {
  margin: clamp(34px, 6vw, 64px) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  padding: clamp(22px, 4vw, 36px) !important; border-radius: 34px; background: var(--ink); color: var(--paper);
  display: grid; gap: 16px; align-items: center;
}
.band-mark { width: 54px; color: var(--accent); }
.band h2 { color: inherit; margin-bottom: 6px; }
.band p { opacity: .78; max-width: 40ch; }
.band .btn { background: var(--paper); color: var(--ink); justify-self: start; }
@media (min-width: 720px) { .band { grid-template-columns: auto 1fr auto; gap: 24px; } .band .btn { justify-self: end; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 26px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 640; font-size: 16.5px;
  transition: transform .25s var(--ease), filter .2s;
}
.btn:active { transform: scale(.96); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
@media (hover: hover) { .btn:not([disabled]):hover { filter: brightness(1.06); } }

/* ---------- footer ---------- */
.foot { padding-top: clamp(34px, 6vw, 60px); padding-bottom: 10px; display: grid; gap: 12px; color: var(--ink-2); font-size: 15px; }
.foot-support { max-width: 62ch; }
.foot-support strong { color: var(--ink); font-family: var(--display); font-weight: 560; font-size: 17px; font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.foot a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.foot-small { font-size: 13.5px; }

/* ---------- product ---------- */
.product { padding-top: 6px; display: grid; gap: clamp(18px, 3vw, 40px); }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; color: var(--ink-2); justify-self: start; margin-left: -6px; }
.back svg, .slot-tools svg, .sheet-close svg, .add-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.product-stage {
  background: color-mix(in srgb, var(--p-bg) 22%, var(--paper)); border-radius: 36px;
  padding: clamp(20px, 4vw, 40px) clamp(20px, 4vw, 40px) 0; display: grid; justify-items: center; overflow: hidden;
}
.product-arch {
  width: min(100%, 360px); aspect-ratio: 3 / 3.7; background: var(--p-bg);
  border-radius: 50% 50% 0 0 / 40.5% 40.5% 0 0; overflow: hidden; box-shadow: var(--shadow);
  animation: rise .8s var(--ease) both;
}
.product-body { display: grid; gap: 14px; align-content: start; }
.product-id { display: flex; align-items: center; gap: 14px; }
.product-id h1 { font-size: clamp(32px, 5.4vw, 54px); line-height: 1; letter-spacing: -.03em; margin-top: 4px; }
.product-tag { font: italic 420 clamp(22px, 3vw, 28px)/1.2 var(--display); color: var(--ink); }
.product-desc { color: var(--ink-2); font-size: 18px; max-width: 46ch; }
.product-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.soon { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); max-width: 46ch; }
.soon strong { display: block; font-weight: 660; }
.soon span { color: var(--ink-2); font-size: 15.5px; }
.soon-dot { flex: none; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; background: var(--accent); animation: glow 2.6s ease-in-out infinite; }
.hint { font-size: 14px; color: var(--ink-2); max-width: 52ch; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 16px; margin-top: 6px; border-top: 1px solid var(--line); }
.facts dt { font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.facts dd { font-weight: 560; }
@media (min-width: 820px) {
  .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .back { grid-column: 1 / -1; }
}

/* ---------- collection ---------- */
.launcher-bar { display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); font-weight: 560; margin-bottom: 16px; }
.launcher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 22px 10px; padding: clamp(20px, 4vw, 34px) clamp(10px, 3vw, 28px); background: var(--card); border: 1px solid var(--line); border-radius: 36px; }
.slot { display: grid; justify-items: center; gap: 8px; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.slot-link { display: grid; justify-items: center; gap: 8px; text-align: center; }
.slot-link strong { font-weight: 620; font-size: 14.5px; line-height: 1.2; max-width: 12ch; }
.slot-link .status-quiet { font-size: 12px; margin-top: -5px; }
.slot .app-icon { transition: transform .3s var(--ease); }
.slot-link:active .app-icon { transform: scale(.92); }
.add-icon { display: grid; place-items: center; background: transparent; border: 2px dashed var(--line); box-shadow: none; color: var(--ink-2); }
.is-editing .slot:not(.slot-add) .app-icon { animation: wiggle .9s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
.slot-tools { display: flex; gap: 4px; }
.slot-tools button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); }
.slot-tools button[disabled] { opacity: .3; }
.slot-tools svg { width: 18px; height: 18px; }

.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding-top: 30px; padding-bottom: 20px; }
.empty p { color: var(--ink-2); max-width: 34ch; }
.empty .btn { margin-top: 10px; }
.empty-arches { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.empty-arches i { display: block; width: 62px; height: 88px; border: 2.5px dashed var(--line); border-bottom-style: solid; border-radius: 50% 50% 8px 8px / 35% 35% 8px 8px; animation: breathe 4s ease-in-out infinite; }
.empty-arches i:nth-child(2) { width: 78px; height: 112px; border-color: var(--accent); animation-delay: .4s; }
.empty-arches i:nth-child(3) { animation-delay: .8s; }
@keyframes breathe { 50% { transform: translateY(-5px); } }

/* ---------- about ---------- */
.prose { display: grid; gap: 14px; font-size: clamp(18px, 2.2vw, 21px); max-width: 60ch; }
.future { margin-top: clamp(30px, 5vw, 56px); padding-top: clamp(26px, 4vw, 44px) !important; padding-bottom: clamp(26px, 4vw, 44px) !important; background: var(--paper-2); border-radius: 36px; margin-left: max(var(--gutter), env(safe-area-inset-left)); margin-right: max(var(--gutter), env(safe-area-inset-right)); padding-left: clamp(22px, 4vw, 40px) !important; padding-right: clamp(22px, 4vw, 40px) !important; display: grid; gap: 12px; }
.future p { color: var(--ink-2); max-width: 56ch; }
.future-art { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 10px; }
.future-art i { display: block; border: 3px solid var(--ink); border-radius: 50% 50% 6px 6px / 30% 30% 6px 6px; }
.future-art i:nth-child(1) { width: 26px; height: 46px; }
.future-art i:nth-child(2) { width: 46px; height: 62px; border-color: var(--accent); }
.future-art i:nth-child(3) { width: 78px; height: 56px; border-radius: 40px 40px 6px 6px; }
.future-art i:nth-child(4) { width: 40px; height: 40px; border-style: dashed; opacity: .5; }
.card { margin: 14px max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); padding: clamp(22px, 4vw, 34px) !important; background: var(--card); border: 1px solid var(--line); border-radius: 30px; display: grid; gap: 10px; }
.future + .card { margin-top: clamp(30px, 5vw, 56px); }
.card h2 { font-size: clamp(24px, 3vw, 30px); }
.card p { color: var(--ink-2); max-width: 60ch; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.support { display: grid; gap: 8px; margin-top: 8px; }
.support label { font-weight: 600; font-size: 15px; }
.support-row { display: flex; flex-wrap: wrap; gap: 10px; }
.money { display: inline-flex; align-items: center; gap: 6px; min-height: 54px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); flex: 1 1 170px; max-width: 260px; }
.money b { font-family: var(--display); font-size: 20px; }
.money input { font: inherit; color: inherit; background: none; border: 0; outline: 0; width: 100%; min-width: 0; }
.money:focus-within { border-color: var(--accent); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper-2); justify-self: start; }
.seg button { min-height: 42px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- tabs ---------- */
.tabs {
  position: fixed; z-index: 20; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 6px; border-radius: 999px; width: max-content; max-width: calc(100vw - 20px);
  background: color-mix(in srgb, var(--card) 86%, transparent); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow);
}
.tabs a {
  position: relative; display: grid; justify-items: center; gap: 2px; min-width: 74px; padding: 8px 12px 7px;
  border-radius: 999px; font-size: 11.5px; font-weight: 620; color: var(--ink-2); white-space: nowrap;
  transition: background .3s var(--ease), color .3s;
}
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.is-on { background: var(--ink); color: var(--paper); }
.tabs a:active { transform: scale(.95); }
.count { position: absolute; top: 3px; right: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
@media (max-width: 380px) { .tabs a { min-width: 0; padding: 8px 9px 7px; font-size: 11px; } .count { right: 8px; } }
@media (min-width: 720px) { .tabs a { grid-auto-flow: column; align-items: center; gap: 8px; padding: 10px 18px; font-size: 14.5px; } .count { position: static; } }

/* ---------- sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: grid; align-items: end; justify-items: center; }
.sheet-wrap[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(20, 12, 8, .5); opacity: 0; transition: opacity .25s; }
.sheet {
  position: relative; width: min(100%, 520px); max-height: 92dvh; overflow: auto; background: var(--paper);
  border-radius: 34px 34px 0 0; padding: 30px clamp(22px, 5vw, 34px) calc(30px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .32s var(--ease); display: grid; gap: 12px;
}
.sheet-wrap.is-on .sheet-scrim { opacity: 1; }
.sheet-wrap.is-on .sheet { transform: none; }
@media (min-width: 620px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 34px; } }
#sheet-body { display: grid; gap: 12px; }
.sheet h2 { font-size: 30px; padding-right: 40px; }
.sheet-lede { color: var(--ink-2); }
.sheet-mark { width: 52px; color: var(--accent); }
.sheet-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); z-index: 2; }
.steps { display: grid; gap: 10px; margin-top: 6px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.steps li > span { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.steps small { display: block; color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.inline-glyph { display: inline-block; vertical-align: -5px; width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qr { justify-self: center; width: min(100%, 264px); padding: 12px; background: #fff; border-radius: 24px; }
.qr svg { width: 100%; height: auto; }
.share-url { text-align: center; font-weight: 640; font-size: 18px; overflow-wrap: anywhere; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 45; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px);
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .35s var(--ease); max-width: calc(100vw - 32px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- artwork motion ---------- */
.a-sun { transform-box: fill-box; transform-origin: center; animation: pulse 5s ease-in-out infinite; }
.a-drift { animation: drift 16s ease-in-out infinite alternate; }
.a-slow { animation-duration: 24s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateX(-14px); } to { transform: translateX(22px); } }
.a-twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle 3.2s ease-in-out infinite; }
.a-late { animation-delay: 1.3s; }
@keyframes twinkle { 50% { transform: scale(.55) rotate(20deg); opacity: .5; } }
.a-flow { animation: sway 7s ease-in-out infinite alternate; }
.a-flow2 { animation-duration: 9s; animation-direction: alternate-reverse; }
.a-flow3 { animation-duration: 11s; }
@keyframes sway { from { transform: translate(-12px, -5px); } to { transform: translate(12px, 7px); } }
.a-shine { animation: shine 5.5s ease-in-out infinite; }
@keyframes shine { 0%, 35% { transform: translateX(0); } 75%, 100% { transform: translateX(420px); } }
.a-ball { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-9px); } }
.a-flood { animation: flood 6s ease-in-out infinite; }
@keyframes flood { 0%, 100% { opacity: .85; } 50% { opacity: 1; } 52% { opacity: .7; } 54% { opacity: 1; } }
.a-tilt { transform-box: fill-box; transform-origin: center; animation: tilt 8s ease-in-out infinite alternate; }
@keyframes tilt { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
.a-smoke { animation: smoke 5s ease-in-out infinite; }
@keyframes smoke { 0% { opacity: 0; transform: translateY(8px); } 40% { opacity: .6; } 100% { opacity: 0; transform: translateY(-12px); } }
.a-lamp { animation: lamp 4s ease-in-out infinite; }
@keyframes lamp { 50% { fill: #FFDFA1; } }

::view-transition-old(root) { animation: vt-out .18s ease both; }
::view-transition-new(root) { animation: vt-in .3s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mark-draw .mark-arch, .mark-draw .mark-flo { stroke-dashoffset: 0; }
}

/* Two-up doors on phones: let the status pill wrap rather than clip. */
@media (max-width: 520px) {
  .doors .status { white-space: normal; border-radius: 14px; font-size: 10.5px; line-height: 1.25; align-items: flex-start; }
  .doors .status::before { margin-top: 3px; flex: none; }
  .doors .door-foot { padding: 44px 12px 14px 14px; }
  .doors .door-foot h3 { padding-right: 0; font-size: 19px; }
  .doors .door-foot p { padding-right: 46px; font-size: 13.5px; }
  .doors .door .save { right: 10px; bottom: 10px; width: 42px; height: 42px; }
}
