/* Joiano — stylesheet. Visual truth: prototyp-v4.html (ported 1:1 here).
   Self-hosted everything, no external URLs (CSP §5.6 style-src 'self',
   font-src 'self'). The prototype's inline <style> and inline style="" are
   converted to classes and [data-theme] selectors; dynamic per-skin colour is
   driven purely by the [data-theme] attribute on <html>/.app-frame. */

/* ===== self-hosted fonts (§5.6, web/vendor/fonts) ===== */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/vendor/fonts/fraunces-v38-latin_latin-ext-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/vendor/fonts/fraunces-v38-latin_latin-ext-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/vendor/fonts/fraunces-v38-latin_latin-ext-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/vendor/fonts/fraunces-v38-latin_latin-ext-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/vendor/fonts/fraunces-v38-latin_latin-ext-500italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/vendor/fonts/hanken-grotesk-v12-latin_latin-ext-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/vendor/fonts/hanken-grotesk-v12-latin_latin-ext-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/vendor/fonts/hanken-grotesk-v12-latin_latin-ext-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/vendor/fonts/hanken-grotesk-v12-latin_latin-ext-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/vendor/fonts/space-mono-v17-latin_latin-ext-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/vendor/fonts/space-mono-v17-latin_latin-ext-700.woff2') format('woff2');
}

/* ===== skin tokens (7 skins, §11.1 — binding). Defaults on :root == gold. ===== */
:root {
  --text: #3D352A; --text-dim: #6E6455; --text-mute: #9C9382;
  --accent: #B8975A; --accent-ink: #2A2419; --accent-2: #C7B48C;
  --hot: #B87D6B; --like: #C2A275; --idk: #9A9490; --no: #7E858C;
  --glass: rgba(255,255,255,.5); --glass2: rgba(255,255,255,.64); --gbrd: rgba(255,255,255,.7); --ghi: rgba(255,255,255,.85);
  --radius: 16px; --card-radius: 24px; --blur: 22px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  color-scheme: light dark;
}
[data-theme="gold"] {
  --text: #3D352A; --text-dim: #6E6455; --text-mute: #9C9382; --accent: #B8975A; --accent-ink: #2A2419; --accent-2: #CBB98F;
  --glass: rgba(255,255,255,.5); --glass2: rgba(255,255,255,.64); --gbrd: rgba(255,255,255,.7); --ghi: rgba(255,255,255,.85); --radius: 18px; --card-radius: 26px;
  background: radial-gradient(135% 95% at 50% -6%, rgba(184,151,90,.15), transparent 60%), radial-gradient(85% 65% at 82% 106%, rgba(206,188,150,.24), transparent 62%), #EFE7D6;
}
[data-theme="rose"] {
  --text: #4A2E38; --text-dim: #7A5A64; --text-mute: #A98E95; --accent: #C97B90; --accent-ink: #fff; --accent-2: #DBAAB6;
  --glass: rgba(255,255,255,.5); --glass2: rgba(255,255,255,.64); --gbrd: rgba(255,255,255,.72); --ghi: rgba(255,255,255,.86); --radius: 18px; --card-radius: 26px;
  background: radial-gradient(135% 95% at 50% -6%, rgba(201,123,144,.14), transparent 60%), radial-gradient(85% 65% at 80% 106%, rgba(226,196,205,.24), transparent 62%), #F4E5E9;
}
[data-theme="silver"] {
  --text: #2A3038; --text-dim: #5A636D; --text-mute: #949BA3; --accent: #6E7A85; --accent-ink: #fff; --accent-2: #A2ABB3;
  --glass: rgba(255,255,255,.5); --glass2: rgba(255,255,255,.64); --gbrd: rgba(255,255,255,.72); --ghi: rgba(255,255,255,.88); --radius: 12px; --card-radius: 18px;
  background: radial-gradient(135% 95% at 50% -6%, rgba(110,122,133,.13), transparent 60%), radial-gradient(85% 65% at 80% 106%, rgba(200,207,213,.26), transparent 62%), #E5E8EB;
}
[data-theme="bordeaux"] {
  --text: #EFDCDD; --text-dim: #C9A6A8; --text-mute: #96727A; --accent: #C0857C; --accent-ink: #2A1015; --accent-2: #9A6E74;
  --glass: rgba(30,12,17,.5); --glass2: rgba(28,10,15,.62); --gbrd: rgba(255,255,255,.11); --ghi: rgba(255,255,255,.16); --radius: 16px; --card-radius: 22px;
  background: radial-gradient(135% 95% at 50% -6%, rgba(150,50,64,.20), transparent 60%), radial-gradient(90% 72% at 50% 110%, rgba(70,20,30,.4), transparent 64%), #210C11;
}
[data-theme="navy"] {
  --text: #DCE4EF; --text-dim: #A6B2C4; --text-mute: #74809A; --accent: #7E9BC4; --accent-ink: #0F1A2E; --accent-2: #9FB2CE;
  --glass: rgba(14,24,42,.52); --glass2: rgba(12,22,38,.64); --gbrd: rgba(255,255,255,.1); --ghi: rgba(255,255,255,.15); --radius: 12px; --card-radius: 18px;
  background: radial-gradient(135% 95% at 50% -6%, rgba(90,120,170,.17), transparent 60%), radial-gradient(90% 72% at 50% 112%, rgba(20,34,60,.5), transparent 66%), #0E1A2C;
}
[data-theme="mono"] {
  --text: #F4F4F5; --text-dim: #B6B6B8; --text-mute: #7E7E80; --accent: #F2F2F2; --accent-ink: #0C0C0D; --accent-2: #C8C8CA;
  --hot: #EDEDED; --like: #C8C8CA; --idk: #9A9A9C; --no: #6E6E70;
  --glass: rgba(255,255,255,.06); --glass2: rgba(18,18,19,.62); --gbrd: rgba(255,255,255,.14); --ghi: rgba(255,255,255,.2); --radius: 8px; --card-radius: 14px;
  background: radial-gradient(135% 95% at 50% -6%, rgba(255,255,255,.05), transparent 58%), radial-gradient(90% 72% at 50% 112%, rgba(0,0,0,.55), transparent 66%), #0C0C0D;
}
[data-theme="paper"] {
  --text: #141414; --text-dim: #4A4A4A; --text-mute: #8A8A8A; --accent: #171717; --accent-ink: #FFFFFF; --accent-2: #5A5A5A;
  --hot: #202020; --like: #4A4A4A; --idk: #8A8A8A; --no: #B4B4B4;
  --glass: rgba(255,255,255,.55); --glass2: rgba(255,255,255,.72); --gbrd: rgba(0,0,0,.12); --ghi: rgba(255,255,255,.9); --radius: 8px; --card-radius: 14px;
  background: radial-gradient(135% 95% at 50% -6%, rgba(0,0,0,.035), transparent 60%), radial-gradient(90% 72% at 50% 112%, rgba(0,0,0,.05), transparent 66%), #FAFAFA;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
html, body { min-height: 100%; }
body {
  /* The skin gradient is painted on <html> (which carries [data-theme]); body
     stays transparent so that gradient shows through and fills the viewport,
     matching the prototype's full-bleed skinned surface. */
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* The [data-theme] background is declared with the skin tokens on <html>; make
   it cover the whole scroll area (no repeat, fixed to the viewport). */
html { background-attachment: fixed; background-repeat: no-repeat; background-size: cover; }
svg { display: block; }

/* ===== fullscreen app shell (production; replaces the prototype .device) ===== */
.app-frame {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.notch { height: 12px; }
#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 428px;
  margin: 0 auto;
  padding: 12px 24px 28px;
  position: relative;
  z-index: 2;
}
.screen { animation: fade .45s ease both; flex: 1; display: flex; flex-direction: column; }
@keyframes fade { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 15px; text-shadow: 0 1px 12px rgba(0,0,0,.15); }
h1.d { font-family: var(--serif); font-weight: 500; font-size: 41px; line-height: 1.03; letter-spacing: -.015em; color: var(--text); }
h2.d { font-family: var(--serif); font-weight: 500; font-size: 31px; line-height: 1.06; letter-spacing: -.01em; color: var(--text); }
.lead { color: var(--text-dim); font-size: 15.5px; line-height: 1.6; margin-top: 14px; }
.small { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }
.mute { color: var(--text-mute); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--sans); font-weight: 600; font-size: 15.5px; padding: 16px 22px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--accent) 70%, #fff 10%); cursor: pointer; width: 100%; color: var(--accent-ink); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent)); box-shadow: 0 10px 24px -16px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.4); transition: transform .12s, filter .2s, box-shadow .2s; }
.btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn.outline { background: var(--glass); color: var(--text); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)) saturate(120%); backdrop-filter: blur(var(--blur)) saturate(120%); }
.btn.outline:hover { border-color: var(--accent); }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; transform: none; box-shadow: none; }
.btnrow { display: flex; gap: 10px; margin-top: 16px; }
.btnrow .btn { width: auto; flex: 1; }
.linkbtn { background: none; border: 0; color: var(--text-dim); font-family: var(--sans); font-size: 13.5px; font-weight: 500; border-bottom: 1px solid var(--gbrd); cursor: pointer; padding: 6px 0; margin: 14px auto 0; display: inline-block; transition: .15s; }
.linkbtn:hover { color: var(--accent); border-color: var(--accent); }
.center { text-align: center; align-items: center; }
.spacer { flex: 1; }

.fieldlabel { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); margin: 0 0 8px 2px; display: block; }
.input { width: 100%; color: var(--text); font-family: var(--sans); font-size: 16px; padding: 15px 16px; outline: none; border-radius: 13px; background: var(--glass2); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)) saturate(120%); backdrop-filter: blur(var(--blur)) saturate(120%); transition: .15s; }
.input::placeholder { color: var(--text-mute); }
.input:focus { border-color: var(--accent); box-shadow: inset 0 1px 0 var(--ghi), 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field { margin-bottom: 16px; }
.note { border-radius: 14px; padding: 14px 16px; font-size: 13.5px; color: var(--text-dim); line-height: 1.55; background: var(--glass); border: 1px solid var(--gbrd); border-left: 3px solid var(--accent-2); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)) saturate(120%); backdrop-filter: blur(var(--blur)) saturate(120%); }
.note.warn { border-left-color: var(--hot); }
.note svg { width: 17px; height: 17px; stroke: var(--accent-2); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -3px; margin-right: 6px; }
.note.warn svg { stroke: var(--hot); }

.stepdots { display: flex; gap: 6px; margin-bottom: 16px; }
.stepdots i { width: 24px; height: 4px; border-radius: 2px; background: var(--gbrd); }
.stepdots i.on { background: var(--accent); }

/* carousel */
.carousel { overflow: hidden; border-radius: 24px; background: var(--glass2); border: 1px solid var(--gbrd); box-shadow: 0 26px 60px -28px rgba(0,0,0,.55), inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(28px) saturate(124%); backdrop-filter: blur(28px) saturate(124%); margin-top: 4px; }
.ctrack { display: flex; transition: transform .45s cubic-bezier(.3,.7,.3,1); }
/* Discrete slide positions (CSP-safe: no inline style / setProperty). The JS
   toggles one .slide-N class instead of writing element.style.transform. */
.ctrack.slide-0 { transform: translateX(0); }
.ctrack.slide-1 { transform: translateX(-100%); }
.ctrack.slide-2 { transform: translateX(-200%); }
.ctrack.slide-3 { transform: translateX(-300%); }
.ctrack.slide-4 { transform: translateX(-400%); }
.ctrack.slide-5 { transform: translateX(-500%); }
.cslide { flex: 0 0 100%; padding: 34px 28px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 352px; }
.cicon { width: 80px; height: 80px; border-radius: 24px; display: flex; align-items: center; justify-content: center; margin-bottom: 22px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 7%, transparent)); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi), 0 10px 24px -18px rgba(0,0,0,.5); }
.cicon svg { width: 36px; height: 36px; stroke: var(--accent); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cslide h3 { font-family: var(--serif); font-weight: 500; font-size: 28px; color: var(--text); line-height: 1.1; }
.cslide p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin-top: 12px; }
.cslide .keyhint { margin-top: 16px; font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .01em; border: 1px dashed var(--accent); border-radius: 10px; padding: 9px 14px; }
.cnav { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.cdots { display: flex; gap: 7px; flex: 1; justify-content: center; }
.cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--gbrd); cursor: pointer; transition: .25s; }
.cdot.on { background: var(--accent); width: 22px; border-radius: 4px; }
.cnavbtn { border-radius: 13px; color: var(--text); width: 44px; height: 40px; font-size: 18px; cursor: pointer; background: var(--glass); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); transition: .15s; }
.cnavbtn:hover:not(:disabled) { border-color: var(--accent); }
.cnavbtn:disabled { opacity: .3; cursor: not-allowed; }

/* pricing */
.tier { border-radius: var(--radius); padding: 17px 19px; margin-bottom: 11px; cursor: pointer; transition: .18s; display: flex; align-items: center; gap: 14px; background: var(--glass); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)) saturate(120%); backdrop-filter: blur(var(--blur)) saturate(120%); }
.tier:hover { border-color: var(--accent); transform: translateY(-1px); }
.tier.sel { border-color: var(--accent); box-shadow: inset 0 1px 0 var(--ghi), 0 0 0 1px var(--accent); }
.tier .term { font-family: var(--serif); font-size: 25px; font-weight: 500; color: var(--text); }
.tier .grow { flex: 1; }
.tier .price { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--accent-2); }
.tier .per { font-size: 11px; color: var(--text-mute); display: block; text-align: right; margin-top: 2px; }
.tier .best { font-size: 10px; font-weight: 600; letter-spacing: .02em; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: 3px 7px; }
.tier .priceside { text-align: right; }

/* credential */
.plate { font-family: var(--mono); font-weight: 700; letter-spacing: .16em; font-size: 26px; text-align: center; color: var(--accent-2); border-radius: 14px; padding: 22px; margin: 4px 0 6px; background: var(--glass2); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
.keycard { border-radius: 18px; padding: 22px; text-align: center; margin-top: 6px; color: #3a2f28; background: linear-gradient(165deg, rgba(255,255,255,.86), rgba(255,255,255,.7)); border: 1px solid rgba(255,255,255,.7); box-shadow: 0 26px 60px -28px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.95); -webkit-backdrop-filter: blur(26px) saturate(118%); backdrop-filter: blur(26px) saturate(118%); }
.keycard .lbl { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; color: #8a7a6c; text-transform: uppercase; }
.qr { margin: 14px auto 8px; display: block; border-radius: 9px; box-shadow: 0 6px 16px -8px rgba(0,0,0,.3); }
.seedstr { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: #6a5a4d; word-break: break-all; margin-top: 6px; }
.saveopts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; margin-top: 15px; }
.saveopt { border-radius: 14px; padding: 14px 6px; cursor: pointer; text-align: center; transition: .15s; display: flex; flex-direction: column; gap: 7px; align-items: center; background: var(--glass); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
.saveopt:hover { border-color: var(--accent); }
.saveopt.done { border-color: var(--accent); box-shadow: inset 0 1px 0 var(--ghi), 0 0 0 1px var(--accent); }
.saveopt svg { width: 22px; height: 22px; stroke: var(--text); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.saveopt.done svg { stroke: var(--accent); }
.saveopt .sl { font-size: 11.5px; font-weight: 600; color: var(--text); }

/* seal orbs */
.sealwrap { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 28px 0; }
.seal { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--accent) 42%, #fff), var(--accent) 62%, color-mix(in srgb, var(--accent) 78%, #000)); box-shadow: 0 14px 30px -18px rgba(0,0,0,.55), inset 0 2px 8px rgba(255,255,255,.35), inset 0 -6px 14px rgba(0,0,0,.18); }
.seal svg { width: 34px; height: 34px; stroke: var(--accent-ink); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.seal.two { background: radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--accent-2) 55%, #fff), var(--accent-2) 55%, color-mix(in srgb, var(--accent-2) 72%, #000)); }
.sealwrap .lk { width: 32px; height: 1.5px; background: var(--gbrd); position: relative; }
.sealwrap .lk::after { content: ""; position: absolute; inset: -3px 0 0 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); }

/* invite link + centred send icon (CSP-safe replacements for prototype inline styles) */
.plate.invite-link { font-size: 14px; letter-spacing: .02em; color: var(--accent); word-break: break-all; }
.cicon.invite-cicon { margin: 0 auto 20px; }

/* templates */
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.tcard { border-radius: 18px; padding: 17px; cursor: pointer; border: 2px solid transparent; transition: .16s; min-height: 108px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; box-shadow: 0 16px 34px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.25); }
.tcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, rgba(255,255,255,.28), transparent 46%); pointer-events: none; }
.tcard:hover { transform: translateY(-2px); }
.tcard.sel { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.2), 0 16px 34px -18px rgba(0,0,0,.6); }
.tcard .tn { font-family: var(--serif); font-size: 21px; font-weight: 600; position: relative; z-index: 1; }
.tcard .td { font-size: 11.5px; opacity: .85; margin-top: 2px; position: relative; z-index: 1; }
.tcard .swatch { display: flex; gap: 5px; margin-top: 12px; position: relative; z-index: 1; }
.tcard .sw { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 1px 2px rgba(255,255,255,.5); }

/* Per-skin picker cards (CSP-safe: no inline style). Each card shows its OWN
   skin regardless of the active [data-theme], so the picker stays legible.
   c1/c2/c3 mirror content.js SKINS. */
.tcard-gold { background: linear-gradient(158deg, color-mix(in srgb,#B8975A 20%,#EFE7D6), #EFE7D6); color: #33262c; }
.tcard-rose { background: linear-gradient(158deg, color-mix(in srgb,#C97B90 20%,#F4E5E9), #F4E5E9); color: #33262c; }
.tcard-silver { background: linear-gradient(158deg, color-mix(in srgb,#6E7A85 20%,#E5E8EB), #E5E8EB); color: #33262c; }
.tcard-bordeaux { background: linear-gradient(158deg, color-mix(in srgb,#8A2E3C 20%,#210C11), #210C11); color: #f1ece5; }
.tcard-navy { background: linear-gradient(158deg, color-mix(in srgb,#1E3A5F 20%,#0E1A2C), #0E1A2C); color: #f1ece5; }
.tcard-mono { background: linear-gradient(158deg, color-mix(in srgb,#FFFFFF 20%,#0C0C0D), #0C0C0D); color: #f1ece5; }
.tcard-paper { background: linear-gradient(158deg, color-mix(in srgb,#111111 20%,#FAFAFA), #FAFAFA); color: #33262c; }
.sw-gold-0{background:#B8975A}.sw-gold-1{background:#CBB98F}.sw-gold-2{background:#EFE7D6}
.sw-rose-0{background:#C97B90}.sw-rose-1{background:#DBAAB6}.sw-rose-2{background:#F4E5E9}
.sw-silver-0{background:#6E7A85}.sw-silver-1{background:#A2ABB3}.sw-silver-2{background:#E5E8EB}
.sw-bordeaux-0{background:#8A2E3C}.sw-bordeaux-1{background:#C0857C}.sw-bordeaux-2{background:#210C11}
.sw-navy-0{background:#1E3A5F}.sw-navy-1{background:#7E9BC4}.sw-navy-2{background:#0E1A2C}
.sw-mono-0{background:#FFFFFF}.sw-mono-1{background:#111111}.sw-mono-2{background:#0C0C0D}
.sw-paper-0{background:#111111}.sw-paper-1{background:#FFFFFF}.sw-paper-2{background:#FAFAFA}

/* tone */
.spectrum { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.tonerow { border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: .15s; background: var(--glass); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
.tonerow:hover { border-color: var(--accent); }
.tonerow.sel { border-color: var(--accent); box-shadow: inset 0 1px 0 var(--ghi), 0 0 0 1px var(--accent); }
.tonerow .th { display: flex; align-items: center; gap: 10px; }
.tonerow .tlabel { font-weight: 600; font-size: 15.5px; color: var(--text); }
.tonerow .tbadge { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-mute); margin-left: auto; }
.tonerow .sample { font-family: var(--serif); font-size: 14.5px; font-style: italic; color: var(--text-dim); line-height: 1.45; margin-top: 9px; }
.heatbar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.heatbar i { flex: 1; background: var(--gbrd); }
/* Lit heat segments per tone rank (CSP-safe classes; palette = content.HEAT_COLS). */
.heatbar i.heat-off { background: var(--gbrd); }
.heatbar i.heat-0 { background: var(--idk); }
.heatbar i.heat-1 { background: var(--like); }
.heatbar i.heat-2 { background: var(--accent-2); }
.heatbar i.heat-3 { background: var(--accent); }

/* survey */
.vbadge { font-size: 10.5px; font-weight: 600; color: var(--text-mute); text-align: center; letter-spacing: .03em; margin-bottom: 4px; }
.progress { font-size: 12px; font-weight: 600; color: var(--text-mute); text-align: center; margin: 2px 0 15px; }
.cardstack { position: relative; height: 380px; margin-bottom: 8px; }
.swcard { position: absolute; inset: 0; border-radius: var(--card-radius); padding: 28px; color: var(--text); display: flex; flex-direction: column; background: var(--glass2); border: 1px solid var(--gbrd); box-shadow: 0 30px 66px -30px rgba(0,0,0,.6), inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(30px) saturate(126%); backdrop-filter: blur(30px) saturate(126%); }
.swcard .cat { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.swcard .ttl { font-family: var(--serif); font-weight: 500; font-size: 33px; line-height: 1.06; margin-top: 16px; }
.swcard .desc { font-size: 14.5px; line-height: 1.5; color: var(--text-dim); margin-top: 12px; }
.swcard .meta { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 10.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text-dim); border: 1px solid var(--gbrd); }
.swback { position: absolute; inset: 0; border-radius: var(--card-radius); background: var(--glass); border: 1px solid var(--gbrd); transform: scale(.94) translateY(14px); opacity: .6; }
.swback2 { position: absolute; inset: 0; border-radius: var(--card-radius); background: var(--glass); border: 1px solid var(--gbrd); transform: scale(.88) translateY(28px); opacity: .3; }
.ratebtns { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.rate { border-radius: 14px; padding: 13px 10px; cursor: pointer; transition: .14s; text-align: center; display: flex; flex-direction: column; gap: 5px; align-items: center; background: var(--glass); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
.rate:hover { transform: translateY(-2px); }
.rate svg { width: 21px; height: 21px; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rate .rl { font-size: 13px; font-weight: 600; color: var(--text); }
.rate .rs { font-size: 10.5px; color: var(--text-mute); }
.rate.hot svg { stroke: var(--hot); } .rate.hot:hover { border-color: var(--hot); }
.rate.like svg { stroke: var(--like); } .rate.like:hover { border-color: var(--like); }
.rate.idk svg { stroke: var(--idk); } .rate.idk:hover { border-color: var(--idk); }
.rate.no svg { stroke: var(--no); } .rate.no:hover { border-color: var(--no); }
.gatebtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
/* No-go confirmation layout (CSP-safe replacements for prototype inline styles) */
.cardstack.confirm-stack { height: 184px; }
.swcard.confirm-card { justify-content: center; }
.ttl.confirm-ttl { font-size: 28px; }
.gatebtns.confirm-gate { margin-top: 16px; }
.progress.confirm-progress { margin-top: 16px; }

/* mystery deck */
.deck { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.mcard { aspect-ratio: 3/4; border-radius: 20px; cursor: pointer; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; transition: transform .4s cubic-bezier(.2,.7,.3,1), opacity .4s, box-shadow .2s; background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 26%, transparent), color-mix(in srgb, var(--accent) 8%, transparent)); border: 1px solid var(--gbrd); box-shadow: 0 18px 40px -26px rgba(0,0,0,.5), inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(20px) saturate(120%); backdrop-filter: blur(20px) saturate(120%); }
.mcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, rgba(255,255,255,.4), transparent 46%); pointer-events: none; }
.mcard .q { font-family: var(--serif); font-size: 48px; font-weight: 500; color: var(--text); position: relative; z-index: 1; text-shadow: 0 2px 14px rgba(0,0,0,.2); }
.mcard:hover { transform: translateY(-3px); }
.mcard.picking { transform: translateY(-30px) scale(1.05); box-shadow: 0 30px 50px -26px rgba(0,0,0,.55); }
.mcard.opened { background: var(--glass2); cursor: default; padding: 16px; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.mcard.opened::after { display: none; }
.mcard.opened .ot { font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--text); line-height: 1.1; position: relative; z-index: 1; }
.mcard.opened .oc { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--accent-2); position: relative; z-index: 1; }
.mcard.opened .oc svg { width: 15px; height: 15px; stroke: var(--accent-2); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* reveal */
.moodrow { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; margin-top: 8px; }
.moodchip { border-radius: 11px; padding: 9px 3px; cursor: pointer; text-align: center; transition: .14s; font-size: 10px; font-weight: 600; color: var(--text-dim); background: var(--glass); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.moodchip svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto 3px; }
.moodchip.on { border-color: var(--accent); color: var(--text); box-shadow: inset 0 1px 0 var(--ghi), 0 0 0 1px var(--accent); }
.phones { display: flex; gap: 12px; margin-top: 12px; }
.phone { flex: 1; border-radius: 18px; padding: 15px; min-height: 238px; display: flex; flex-direction: column; text-align: center; transition: .2s; background: var(--glass2); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi), 0 20px 44px -26px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(24px) saturate(124%); backdrop-filter: blur(24px) saturate(124%); }
.phone.ready { border-color: var(--accent-2); }
.phone .who { font-size: 10px; font-weight: 600; letter-spacing: .06em; color: var(--text-mute); text-transform: uppercase; }
.miniseal { width: 46px; height: 46px; border-radius: 50%; margin: 12px auto; background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--accent) 42%, #fff), var(--accent) 62%, color-mix(in srgb, var(--accent) 78%, #000)); box-shadow: 0 8px 18px -12px rgba(0,0,0,.5), inset 0 1px 6px rgba(255,255,255,.32); display: flex; align-items: center; justify-content: center; transition: transform .5s; }
.miniseal svg { width: 22px; height: 22px; stroke: var(--accent-ink); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.phone.two .miniseal { background: radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--accent-2) 55%, #fff), var(--accent-2) 55%, color-mix(in srgb, var(--accent-2) 72%, #000)); }
.phone.ready .miniseal { transform: rotate(200deg) scale(1.06); }
.revealtxt { font-size: 13px; line-height: 1.55; color: var(--text); text-align: left; animation: fade .5s both; }
.revealtxt .tt { font-family: var(--serif); font-size: 20px; font-weight: 500; display: block; margin-bottom: 8px; line-height: 1.12; }
.cluebox { border-radius: 10px; padding: 9px 11px; font-size: 11px; color: var(--text-dim); margin-top: 10px; line-height: 1.4; text-align: left; background: var(--glass); border: 1px solid var(--gbrd); border-left: 3px solid var(--accent); }
.tinybtn { border-radius: 11px; color: var(--text); font-family: var(--sans); font-size: 13px; font-weight: 600; padding: 10px 14px; cursor: pointer; transition: .15s; background: var(--glass); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); }
.tinybtn:hover { border-color: var(--accent-2); }
.modeswitch { display: flex; gap: 8px; justify-content: center; margin: 8px 0 2px; }
.modeswitch button { font-size: 11.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; color: var(--text-dim); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; background: var(--glass); border: 1px solid var(--gbrd); }
.modeswitch button svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.modeswitch button.on { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 85%, #fff), var(--accent-2)); color: var(--accent-ink); border-color: var(--accent-2); }
.satis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; margin-top: 12px; }

/* Reveal layout helpers (CSP-safe replacements for prototype inline styles) */
.phone.phone-compact { min-height: auto; gap: 2px; }
.moodrow { margin-top: 10px; }
.miniseal.miniseal-lg { width: 60px; height: 60px; margin: 22px auto 6px; }
.reveal-phone { min-height: auto; margin-top: 4px; }
.reveal-seal { margin: 2px auto 16px; }
.revealtxt.reveal-center { text-align: center; }
.reveal-title { font-size: 25px; }
.cluebox b.clue-mood { color: var(--accent); }

.emptybox { text-align: center; color: var(--text-mute); font-size: 14px; padding: 32px 10px; line-height: 1.7; }
.btn.nav-back { margin-top: 20px; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(245,239,231,.92); color: #241820; font-size: 13.5px; font-weight: 600; padding: 13px 20px; border-radius: 14px; opacity: 0; pointer-events: none; transition: .28s; z-index: 50; box-shadow: 0 16px 40px -14px rgba(0,0,0,.6); max-width: 340px; text-align: center; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.noscript-note { position: fixed; inset: 0; display: grid; place-items: center; padding: 32px; text-align: center; color: #f3ece3; background: #14100f; font-family: system-ui, sans-serif; line-height: 1.7; }

/* ===== legal static pages (§25.1) ===== */
.legal-page { width: 100%; max-width: 620px; margin: 0 auto; padding: 24px 24px 60px; position: relative; z-index: 2; }
.legal-page h1.d { font-size: 33px; margin-top: 4px; }
.legal-h { font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--text); margin: 26px 0 6px; }
.legal-page .small { color: var(--text-dim); }
.legal-back { margin-top: 34px; }
.legal-page a { color: var(--accent); text-decoration: underline; }

/* ===== age gate (§25.1) ===== */
.gate-orb { width: 84px; height: 84px; border-radius: 26px; margin: 6px auto 22px; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--accent) 8%, transparent)); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi), 0 12px 26px -18px rgba(0,0,0,.5); }
.gate-orb svg { width: 40px; height: 40px; stroke: var(--accent); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.legal-links { display: flex; gap: 10px; margin-top: 14px; }
.legal-links a { flex: 1; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--text); text-decoration: none; padding: 12px 8px; border-radius: 12px; background: var(--glass); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
.legal-links a:hover { border-color: var(--accent); }

/* ===== checkbox row (§25.8 mandatory acknowledgement) ===== */
.checkrow { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 4px; cursor: pointer; user-select: none; }
.checkrow input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px; background: var(--glass2); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); display: flex; align-items: center; justify-content: center; transition: .15s; margin-top: 1px; }
.checkbox svg { width: 15px; height: 15px; stroke: var(--accent-ink); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: .15s; }
.checkrow input:checked + .checkbox { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent)); border-color: var(--accent); }
.checkrow input:checked + .checkbox svg { opacity: 1; }
.checkrow input:focus-visible + .checkbox { box-shadow: inset 0 1px 0 var(--ghi), 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.checkrow .cktext { font-size: 13.5px; line-height: 1.5; color: var(--text-dim); }

/* ===== gender choice ===== */
.genderrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.genderopt { border-radius: 16px; padding: 22px 14px; cursor: pointer; text-align: center; transition: .16s; display: flex; flex-direction: column; gap: 8px; align-items: center; background: var(--glass); border: 1px solid var(--gbrd); box-shadow: inset 0 1px 0 var(--ghi); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
.genderopt:hover { border-color: var(--accent); transform: translateY(-1px); }
.genderopt.sel { border-color: var(--accent); box-shadow: inset 0 1px 0 var(--ghi), 0 0 0 1px var(--accent); }
.genderopt .gl { font-family: var(--serif); font-size: 21px; font-weight: 500; color: var(--text); }
.genderopt .gs { font-size: 12px; color: var(--text-mute); }

/* ===== QR canvas ===== */
canvas.qr { margin: 14px auto 8px; display: block; border-radius: 9px; box-shadow: 0 6px 16px -8px rgba(0,0,0,.3); max-width: 100%; }

/* ===== inline load / error states ===== */
.loadbox { text-align: center; color: var(--text-mute); font-size: 14px; padding: 40px 10px; line-height: 1.7; }
.spin { width: 30px; height: 30px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--gbrd); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== pairing wait ===== */
.waitdots { display: inline-flex; gap: 5px; margin-left: 4px; }
.waitdots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: waitpulse 1.2s ease-in-out infinite; }
.waitdots i:nth-child(2) { animation-delay: .2s; }
.waitdots i:nth-child(3) { animation-delay: .4s; }
@keyframes waitpulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* ===== strength meter ===== */
.strength { display: flex; gap: 5px; margin-top: 8px; }
.strength i { flex: 1; height: 4px; border-radius: 2px; background: var(--gbrd); transition: .2s; }
.strength i.on1 { background: var(--hot); }
.strength i.on2 { background: var(--like); }
.strength i.on3 { background: var(--accent-2); }
.strength i.on4 { background: var(--accent); }
.strengthlabel { font-size: 11.5px; color: var(--text-mute); margin-top: 5px; }

@media (max-width: 400px) {
  h1.d { font-size: 35px; }
  .saveopts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
