/* Mazzarosa member area: layout and components. Dark only (A-80). Tokens in tokens.css; wines in
   wines.css; the upgrade view's horizontal chapters in experience.css; the stage 1 scenes (the
   cellar door, log in, the sign-up chapters and the shared fields) in entrance.css; the membership
   selection, the signing steps and the celebration in selection.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--black); color: var(--ink); font: 400 var(--fs-md)/1.55 var(--font-ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold); }
p { margin: 0 0 var(--s-3); }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ivory); color: #1a1a1a; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- Logo (A-78): full wordmark on a small ivory label plate with a fine gold double rule ---------- */
.logo-plate { display: inline-flex; line-height: 0; border-radius: 8px; background: var(--ivory); padding: 6px 12px; box-shadow: inset 0 0 0 1px rgba(184,151,90,.75), inset 0 0 0 3px var(--ivory), inset 0 0 0 4px rgba(184,151,90,.4), 0 8px 24px rgba(0,0,0,.35); }
.logo { height: auto; mix-blend-mode: multiply; }
.logo-sm { padding: 4px 9px; }
.logo-sm .logo { width: 92px; }
.logo-md .logo { width: 124px; }
.brandmark { display: flex; justify-content: center; padding: var(--s-4); }

/* ---------- Language control (the only preference; no theme, A-80) ---------- */
.prefs { display: inline-flex; align-items: center; gap: 6px; }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); overflow: hidden; }
.lang button { min-width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: .08em; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--black); }

/* ---------- Type ---------- */
.h-display { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-3xl); line-height: 1.04; margin: 0 0 var(--s-3); }
.h-card { font-weight: 700; font-size: var(--fs-lg); line-height: 1.25; margin: 0 0 var(--s-2); }
.h-sec { font-weight: 700; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 var(--s-3); }
.h-letter { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-2xl); line-height: 1.1; margin: 0 0 var(--s-4); }
.lede { font-size: var(--fs-lg); line-height: 1.45; color: var(--ink-2); max-width: 36em; }
.dim { color: var(--ink-2); }
.fine { font-size: var(--fs-xs); line-height: 1.5; color: var(--ink-3); margin: var(--s-2) 0 0; }
.kicker { display: block; color: var(--gold); font-size: var(--fs-sm); margin: 0 0 var(--s-1); }
.num { font-family: var(--font-display); font-variant-numeric: lining-nums; }
strong { font-weight: 700; }
.tier-word { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 10vw, 6rem); line-height: .95; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.tier-word-sm { font-size: clamp(2.2rem, 8vw, 4rem); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-3); }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.stack > * + * { margin-top: var(--s-4); }
.pad { padding: var(--s-5) var(--s-4); }
.narrow { max-width: 720px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }

/* ---------- Markers ---------- */
.mk { display: inline-block; vertical-align: .1em; font: 700 10px/1 var(--font-ui); letter-spacing: .06em; padding: 4px 7px; border-radius: var(--r-pill); white-space: nowrap; margin-left: 2px; }
.mk-prov { color: #1a1300; background: #f0b862; }
.mk-tbc { color: #6b4600; background: #fff1d6; border: 1px solid #f0b862; }
.mk-open { color: #001533; background: #9ec3ff; }
.mk-ph { display: inline-block; border: 1px dashed var(--ink-3); color: var(--ink-2); font-size: var(--fs-sm); padding: 6px 10px; border-radius: 6px; margin: var(--s-2) 0; }
.proto-note { border-left: 2px solid var(--open-ink); background: var(--gold-faint); color: var(--ink-2); font-size: var(--fs-sm); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: var(--s-4) 0; }
.sim-band { background: repeating-linear-gradient(135deg, #2b2100 0 10px, #241b00 10px 20px); color: #f0b862; font-size: var(--fs-sm); padding: 10px 16px; border-radius: 10px; margin: 0 0 var(--s-4); }
.open-note { display: block; color: var(--open-ink); font-size: var(--fs-sm); border: 1px dashed var(--open-ink); padding: 8px 12px; border-radius: 8px; margin: var(--s-3) 0; }
.warn-line { color: var(--red-hi); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid var(--red); background: var(--red); color: var(--on-red); font-weight: 600; letter-spacing: .03em; text-decoration: none; cursor: pointer; transition: background .2s, transform .15s var(--ease), box-shadow .2s; }
.btn:hover { background: var(--red-deep); color: var(--on-red); }
.btn:active { transform: scale(.98); }
.btn[aria-disabled="true"] { background: var(--grey-700); border-color: var(--grey-700); color: var(--ink-2); cursor: not-allowed; }
.btn-block { display: flex; width: 100%; margin-top: var(--s-4); }
.btn-ghost { background: transparent; border-color: var(--gold-line); color: var(--ink); }
.btn-ghost:hover { background: var(--gold-faint); color: var(--ink); border-color: var(--gold); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: var(--fs-sm); }
.btn .ico { width: 18px; height: 18px; }
.btn-text, .linkish { background: none; border: 0; padding: 6px 2px; color: var(--gold); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish { font-weight: 400; padding: 0; }
.quiet-link { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-4); color: var(--ink-2); font-size: var(--fs-sm); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); min-height: 40px; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Forms (member area) ---------- */
.form { margin-top: var(--s-4); }
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.input { width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--grey-900); border: 1px solid var(--line-2); border-radius: 10px; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-faint); }
select option, select optgroup { background: var(--grey-850); color: var(--ink); }
.sheet { border: 0; padding: 0; background: transparent; max-width: 560px; width: calc(100% - 24px); color: var(--ink); }
.sheet::backdrop { background: rgba(0,0,0,.6); }
.sheet-body { background: var(--grey-850); border: 1px solid var(--glass-line); border-radius: var(--r-panel); padding: var(--s-5); }

/* ---------- Box confirmed (member area) ---------- */
.done { position: relative; min-height: calc(100dvh - var(--hdr-h) - var(--nav-h)); display: grid; place-items: center; overflow: hidden; padding: var(--s-6) var(--s-4); }
.done-bg { position: absolute; inset: 0; z-index: 0; }
.done::before { content: ""; position: absolute; inset: 0; background: var(--veil); z-index: 1; }
.done-in { position: relative; z-index: 2; max-width: 520px; width: 100%; padding: var(--s-6) var(--s-5); border-radius: var(--r-panel); text-align: center; }
.done-in .case { margin: var(--s-4) auto; }
.glass { background: var(--glass); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); border: 1px solid var(--glass-line); }
.wax { position: relative; width: 96px; height: 96px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #ff4a3d 0%, #d20000 38%, #8f0000 78%, #4d0000 100%); box-shadow: 0 10px 40px rgba(210,0,0,.3), inset 0 -6px 14px rgba(0,0,0,.45), inset 0 6px 10px rgba(255,255,255,.18); }
.wax-ring { position: absolute; inset: 9px; border-radius: 50%; border: 1px solid rgba(255,220,180,.55); }
.wax-roman { position: relative; font-family: var(--font-display); font-size: 2.2rem; color: #fffcf0; }
.wax-roman .ico { width: 40px; height: 40px; stroke-width: 2; }
.wax-sm { width: 60px; height: 60px; margin: 0; }
.wax-sm .wax-ring { inset: 6px; }
.wax-sm .wax-roman { font-size: 1.3rem; }
html.motion .done:not(.is-in) .wax { opacity: 0; transform: scale(1.8) rotate(-18deg); }
html.motion .done.is-in .wax { animation: stamp .8s .1s var(--ease-out) both; }

/* ---------- Seals and cases (shared) ---------- */
.seals { display: flex; flex-wrap: wrap; gap: 8px; }
.seal { display: inline-block; width: 34px; height: 34px; }
.seal svg { width: 100%; height: 100%; display: block; }
.seal-disc { fill: var(--gold-faint); stroke: var(--gold); stroke-width: 1; }
.seal-ticks line { stroke: var(--gold); stroke-width: .9; }
.seal-ring { fill: none; stroke: var(--gold-line); stroke-width: .8; }
.seal-bottle { fill: var(--gold); }
.seal-l { font-family: var(--font-display); font-size: 15px; fill: #fffcf0; }
.seal-library .seal-disc, .seal-used-library .seal-disc { fill: #b0101a; stroke: var(--red-hi); }
.seal-library .seal-ticks line { stroke: #ff8a8a; }
.seal-used .seal-disc { fill: var(--gold); }
.seal-used .seal-ticks line { stroke: rgba(0,0,0,.4); }
.seal-used .seal-bottle { fill: #1a1300; }
.seal-free .seal-disc { fill: transparent; stroke: var(--line-2); }
.seal-free .seal-ticks line { stroke: var(--line-2); }
.seal-free .seal-bottle { fill: var(--line-2); }
.seals-sm { gap: 4px; margin: 6px 0; }
.seals-sm .seal { width: 20px; height: 20px; }
.case { display: inline-grid; gap: 4px; padding: 7px; border-radius: 6px; width: 104px; background: linear-gradient(160deg, #5a4030, #3a291d 55%, #2a1d14); box-shadow: inset 0 0 0 1px rgba(255,220,170,.18), inset 0 0 0 4px rgba(0,0,0,.25), 0 8px 22px rgba(0,0,0,.35); }
.case-6 { grid-template-columns: repeat(3, 1fr); }
.case-12 { grid-template-columns: repeat(4, 1fr); width: 128px; }
.slot { aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #0b0806 55%, #1f1610 100%); box-shadow: inset 0 2px 3px rgba(0,0,0,.8); position: relative; }
.slot.on::after { content: ""; position: absolute; inset: 9%; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.55) 0 8%, transparent 26%), var(--cap, #8E1F25); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18), inset 0 -2px 3px rgba(0,0,0,.45); }
.slot.flag::after { background: repeating-linear-gradient(135deg, #fa4545 0 3px, #3a0000 3px 6px); }

/* ---------- Member-area shell: header with the logo centred, nothing beside it ---------- */
.shell { min-height: 100vh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.hdr { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--hdr-h); padding: 0 var(--s-3); background: var(--hdr-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.hdr-logo { display: block; line-height: 0; border-radius: 8px; }
.hdr-end { justify-self: end; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--nav-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--ink-3); font-size: 11px; font-weight: 700; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--red); }
.nav .ico { width: 24px; height: 24px; }
.badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.badge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 10px; left: calc(50% + 8px); }
.content { display: block; min-width: 0; }

/* ---------- Home ---------- */
.home-hero { position: relative; height: 260px; display: flex; align-items: flex-end; overflow: hidden; }
.home-hero .ph { position: absolute; inset: 0; }
.home-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 10%, var(--veil) 62%, var(--black)); }
.home-hero-in { position: relative; z-index: 1; padding: var(--s-5) var(--s-4); width: 100%; max-width: 1180px; }
.greet { margin: 0; color: var(--ink-2); font-size: var(--fs-lg); }
.home-hero .h-display { font-size: clamp(2.8rem, 11vw, 4.6rem); margin: 0 0 var(--s-2); }
.home-tier { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.tier-chip { display: inline-block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .16em; font-size: var(--fs-sm); color: var(--gold); border: 1px solid var(--gold-line); padding: 3px 12px; border-radius: var(--r-pill); margin-right: 8px; }
.home-grid { display: grid; gap: var(--s-4); padding: 0 var(--s-4) var(--s-6); max-width: 1180px; }
.card { display: block; background: var(--grey-850); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5) var(--s-4); color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--gold-line); color: var(--ink); }
.card-cut { padding: 0; overflow: hidden; border-color: var(--gold-line); }
.card-cut.is-warm { border-color: var(--red-hi); }
.cut-photo { width: 100%; }
.card-cut.is-closed .cut-photo { aspect-ratio: 16 / 7; }
.cut-body { padding: var(--s-5) var(--s-4); }
.cd { display: flex; gap: var(--s-2); margin: var(--s-3) 0; }
.cd-cell { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 10px 4px 8px; border: 1px solid var(--gold-line); border-radius: 12px; }
.cd-n { font-family: var(--font-display); font-size: var(--fs-3xl); line-height: 1; font-variant-numeric: tabular-nums lining-nums; }
.cd-l { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 4px; }
.deadline { margin: var(--s-2) 0; }
.cut-box { display: flex; align-items: center; gap: var(--s-4); margin: var(--s-4) 0 0; }
.cut-box p { margin: 0; }
.card-ship { display: flex; align-items: center; gap: var(--s-3); }
.card-ship > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.ship-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold-line); color: var(--gold); flex: none; }
.go { color: var(--ink-3); }
.quick ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.quick a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: var(--s-4); border-radius: var(--r-card); border: 1px solid var(--line); background: var(--grey-900); text-decoration: none; }
.quick a:hover { border-color: var(--gold-line); }
.quick a .ico { color: var(--gold); }
.quick a > span { display: flex; flex-direction: column; }
.quick .dim { font-size: var(--fs-sm); }
.card-msg { display: flex; gap: var(--s-3); align-items: flex-start; }
.card-msg > span { display: flex; flex-direction: column; min-width: 0; }
.card-msg.is-unread { border-color: var(--red-hi); }
.msg-thumb { width: 64px; height: 64px; border-radius: 10px; flex: none; }
.card-install { display: flex; gap: var(--s-4); align-items: flex-start; }

/* ---------- Page heads ---------- */
.page-head { padding: var(--s-5) var(--s-4) var(--s-2); max-width: 1180px; }
.page-head .h-display { margin-top: var(--s-1); }
.page-head-photo { position: relative; min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end; padding-top: var(--s-7); max-width: none; overflow: hidden; isolation: isolate; }
.page-head-photo > .ph { position: absolute; inset: 0; z-index: -1; }
.page-head-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent, var(--veil) 55%, var(--black)); }

/* ---------- Basket ---------- */
.basket { display: grid; gap: var(--s-4); padding: var(--s-3) var(--s-4) var(--s-6); max-width: 1180px; }
.cur-vis { display: flex; align-items: center; gap: var(--s-4); margin: var(--s-3) 0; }
.big-count { margin: 0; font-size: var(--fs-lg); color: var(--ink-2); }
.big-count .num { font-size: var(--fs-4xl); color: var(--ink); line-height: 1; }
.ways ul { list-style: none; display: grid; gap: var(--s-3); }
.way { display: grid; grid-template-columns: 112px 1fr; min-height: 112px; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: var(--grey-850); text-decoration: none; }
.way:hover { border-color: var(--gold); color: var(--ink); }
.way .ph { min-height: 112px; }
.way-body { display: flex; flex-direction: column; justify-content: center; padding: var(--s-3) var(--s-4); gap: 2px; }
/* Pinyon Script is for wine names only (A-79 item 12), so these labels use Bodoni italic. */
.way-n { font-family: var(--font-display); font-style: italic; color: var(--gold); font-size: var(--fs-lg); line-height: 1.1; }
.way .dim { font-size: var(--fs-sm); }
.yearline { list-style: none; display: grid; margin: var(--s-3) 0; }
.yearline li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.yl-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--gold); }
.yearline .is-now .yl-dot { background: var(--red); border-color: var(--red); }
.empty { text-align: center; padding: var(--s-5) 0; }
.empty .ph { height: 180px; border-radius: var(--r-card); margin-bottom: var(--s-4); }
.ok-line { display: flex; gap: 8px; align-items: center; color: var(--ok); font-size: var(--fs-sm); margin: var(--s-3) 0 0; }
.ok-line .ico { width: 18px; height: 18px; }
.kv { list-style: none; display: grid; gap: 8px; margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.kv li { display: flex; justify-content: space-between; font-size: var(--fs-sm); }
.card-allow-big { text-align: center; }
.card-allow-big .seals { justify-content: center; }
.allow-rows { list-style: none; display: grid; gap: 4px; }
.allow-rows li { display: grid; grid-template-columns: 1fr auto 24px; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.allow-rows .dim { grid-column: 1 / -1; font-size: var(--fs-xs); }
.notice { border: 1px solid var(--line-2); background: var(--grey-900); border-radius: var(--r-card); padding: 14px 16px; font-size: var(--fs-sm); }
.notice p:last-child { margin-bottom: 0; }
.notice .btn { margin-top: var(--s-2); }
.notice-flag { border-color: var(--red-hi); background: var(--flag-bg); }
.notice-ok { border-color: var(--ok); background: var(--ok-bg); }
.notice-off { border-color: var(--open-ink); }
.notice-cap { border-color: var(--gold-line); background: var(--gold-faint); }
.chip { display: inline-block; font-size: var(--fs-xs); font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip-flag, .chip-r1 { border-color: var(--red-hi); color: var(--red-hi); }
.chip-r2, .chip-r3, .chip-r4 { border-color: var(--gold); color: var(--gold); }

/* ---------- Shipments ---------- */
.ship-grid { display: grid; gap: var(--s-5); }
.card-track { position: relative; overflow: hidden; }
.card-track.is-late { border-color: #c98a20; }
.track-photo { height: 140px; margin: calc(var(--s-5) * -1) calc(var(--s-4) * -1) var(--s-4); }
.track { list-style: none; margin: var(--s-4) 0; }
.tk { position: relative; display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; min-height: 44px; }
.tk::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.tk:first-child::before { top: 50%; }
.tk:last-child::before { bottom: 50%; }
.tk-dot { position: relative; z-index: 1; width: 14px; height: 14px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--black); }
.tk-done .tk-dot { background: var(--gold); border-color: var(--gold); }
.tk-done::before { background: var(--gold); }
.tk-now .tk-dot { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 5px rgba(210,0,0,.2); }
.tk-late .tk-dot { background: #c98a20; border-color: #c98a20; }
.tk-l { font-size: var(--fs-sm); }
.tk-todo .tk-l { color: var(--ink-3); }
.tk-now .tk-l, .tk-late .tk-l { font-weight: 700; }
.tk-d { font-size: var(--fs-xs); color: var(--ink-3); }
.past-list { list-style: none; display: grid; gap: var(--s-2); }
.card-pastship { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); }
.card-pastship > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }

/* ---------- Inbox ---------- */
.inbox-count { font-size: var(--fs-sm); margin: var(--s-2) 0; }
.msgs { list-style: none; display: grid; gap: 2px; }
.msg { display: flex; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-card); text-decoration: none; border: 1px solid transparent; }
.msg:hover { background: var(--grey-850); border-color: var(--line); color: var(--ink); }
.msg-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.msg-top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-xs); color: var(--ink-3); }
.msg.is-unread .msg-subj { font-weight: 700; }
.msg.is-unread .msg-from::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; }
.msg-prev { color: var(--ink-2); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.letter { padding-bottom: var(--s-6); }
.letter-head { position: relative; height: 240px; overflow: hidden; }
.letter-head .ph { position: absolute; inset: 0; }
.letter-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.5), transparent 45%); }
.letter-head-in { position: relative; z-index: 1; padding: var(--s-3) var(--s-4); }
.letter-head-in .back { color: #fffcf0; }
.letter-paper { position: relative; margin: -60px var(--s-3) 0; background: var(--paper); color: var(--paper-ink); border-radius: var(--r-panel); padding: var(--s-6) var(--s-5); max-width: 680px; box-shadow: 0 30px 80px rgba(0,0,0,.35), inset 0 0 0 1px rgba(200,169,106,.5), inset 0 0 0 7px var(--paper), inset 0 0 0 8px rgba(200,169,106,.35); }
.letter-paper a, .letter-paper .btn-text { color: #8f0000; }
.letter-paper .btn-ghost { color: var(--paper-ink); border-color: #b9a06a; }
.letter-paper .fine, .letter-paper .mk-ph { color: var(--paper-ink-2); border-color: var(--paper-ink-2); }
.letter-meta { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--paper-ink-2); border-bottom: 1px solid rgba(200,169,106,.6); padding-bottom: var(--s-2); margin-bottom: var(--s-4); }
.letter-foot { margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid rgba(200,169,106,.6); }

/* ---------- Profile and upgrade ---------- */
.pf-hero { position: relative; min-height: 220px; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.pf-hero > .ph { position: absolute; inset: 0; z-index: -1; }
.pf-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent, var(--veil) 60%, var(--black)); }
.pf-hero-in { display: flex; gap: var(--s-4); align-items: center; padding: var(--s-5) var(--s-4); }
.pf-hero-in .h-display { font-size: var(--fs-2xl); margin: 0 0 4px; }
.pf-hero-in p { margin: 0; }
.pf p { margin: 0; }
.pf .form { margin-top: var(--s-3); }
.consents { list-style: none; display: grid; gap: var(--s-2); }
.consents li { display: flex; justify-content: space-between; gap: var(--s-3); align-items: flex-start; padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
.consents li > span:first-child { display: flex; flex-direction: column; }
.consents .dim { font-size: var(--fs-xs); }
.cmp { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.cmp th, .cmp td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 400; }
.cmp tbody th { font-weight: 400; color: var(--ink-2); }
.cmp td.up { font-weight: 700; }
.card-open { border-style: dashed; border-color: var(--open-ink); }
.open-list { list-style: none; display: grid; gap: 8px; }
.open-list strong { color: var(--open-ink); }
.top-photo { height: 240px; border-radius: var(--r-card); margin-bottom: var(--s-4); }
.benefits { list-style: none; display: grid; gap: 10px; }
.benefits li { position: relative; padding-left: 22px; line-height: 1.4; }
.benefits li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border: 1px solid var(--gold); transform: rotate(45deg); }

/* ---------- Photos ---------- */
.ph { position: relative; overflow: hidden; background: linear-gradient(135deg, #1b1611, #0b0907); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-cut-bottom img { height: 150%; inset: 0 0 auto 0; }
.ph-cut-right img { width: 118%; inset: 0 auto 0 0; }
.ph-crop img { object-fit: fill; }

/* ---------- Reviewer controls (not the product) ---------- */
#controls { position: fixed; left: 10px; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif; }
.ctl-toggle { background: #2b2100; color: #f0b862; border: 1px dashed #f0b862; border-radius: var(--r-pill); padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; min-height: 32px; opacity: .85; }
.ctl-panel { order: -1; width: min(360px, calc(100vw - 20px)); max-height: 72vh; overflow: auto; background: #141100; color: #fffcf0; border: 1px dashed #f0b862; border-radius: 14px; padding: 14px 16px; font-size: 13px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.ctl-panel h2 { font-size: 14px; margin: 0 0 4px; color: #f0b862; }
.ctl-panel .warn { color: #f0b862; font-size: 12px; }
.ctl-panel label, .ctl-panel .lbl { display: block; margin: 10px 0 4px; font-weight: 700; font-size: 12px; color: #bdb8ad; }
.ctl-panel select { width: 100%; min-height: 36px; background: #000; color: #fffcf0; border: 1px solid #444; border-radius: 8px; padding: 4px 8px; font: inherit; }
.ctl-panel .chk { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 4px 0; color: #fffcf0; }
.ctl-panel .sold { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.ctl-panel .hint { font-size: 11px; color: #948f86; margin: 4px 0 0; }
.ctl-panel .jump { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.ctl-panel .jump a { color: #fffcf0; }
.ctl-btn { display: block; width: 100%; margin-top: 10px; min-height: 36px; background: #000; color: #fffcf0; border: 1px solid #444; border-radius: 8px; cursor: pointer; font-size: 12px; }
.ctl-btn.danger { border-color: #fa4545; color: #fa4545; }
body:not([data-screen^="app"]):not([data-screen="basket"]):not([data-screen="build"]):not([data-screen="boxTemplate"]):not([data-screen="boxRepeat"]):not([data-screen="review"]):not([data-screen="confirmed"]):not([data-screen="allowance"]):not([data-screen="shipments"]):not([data-screen="shipment"]):not([data-screen="inbox"]):not([data-screen="message"]):not([data-screen="profile"]):not([data-screen="upgrade"]):not([data-screen="upgradeTier"]) #controls { bottom: 10px; }

@keyframes stamp { 0% { opacity: 0; transform: scale(1.8) rotate(-18deg); } 70% { opacity: 1; transform: scale(.95) rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-20px) scale(1.4); } 100% { opacity: 1; transform: none; } }
@keyframes strike { 0% { opacity: 0; transform: scale(1.6) rotate(-25deg); } 100% { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (min-width: 700px) {
  .pad { padding: var(--s-6); }
  .home-grid, .basket { padding-left: var(--s-6); padding-right: var(--s-6); }
  .page-head, .home-hero-in, .pf-hero-in { padding-left: var(--s-6); padding-right: var(--s-6); }
  .ways ul { grid-template-columns: repeat(3, 1fr); }
  .way { grid-template-columns: 1fr; grid-template-rows: 150px auto; }
  .quick ul { grid-template-columns: repeat(4, 1fr); }
  .letter-paper { margin: -80px auto 0; padding: var(--s-7); }
  .ship-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .h-display { font-size: var(--fs-4xl); }
  .logo-md .logo { width: 140px; }
}
@media (min-width: 1000px) {
  .shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-areas: "hdr hdr" "nav main"; padding-bottom: 0; }
  .shell > .hdr { grid-area: hdr; }
  .shell > .content { grid-area: main; }
  .nav { grid-area: nav; position: sticky; top: var(--hdr-h); align-self: start; height: auto; display: flex; flex-direction: column; gap: 2px; padding: var(--s-5) var(--s-3); background: transparent; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 14px; border-radius: 10px; font-size: var(--fs-md); font-weight: 400; color: var(--ink-2); }
  .nav a:hover { background: var(--grey-850); color: var(--ink); }
  .nav a[aria-current="page"] { background: var(--grey-850); color: var(--ink); font-weight: 700; }
  .nav a[aria-current="page"]::before { top: 12px; bottom: 12px; left: 0; right: auto; width: 2px; height: auto; }
  .badge, .badge.dot { position: static; margin-left: auto; }
  .hdr { padding: 0 var(--s-5); }
  .logo-sm .logo { width: 104px; }
  .home-hero { height: 340px; }
  .home-grid { grid-template-columns: 1.25fr 1fr; align-items: start; }
  .home-grid > .notice { grid-column: 1 / -1; }
  .home-grid > .card-cut { grid-row: span 4; }
  .quick ul { grid-template-columns: 1fr 1fr; }
  #controls { bottom: 12px; }
  .basket { grid-template-columns: 1fr 1fr; align-items: start; }
  .basket .ways { grid-column: 1 / -1; grid-row: 1; }
}
/* Reduced motion: everything stops, except elements marked .rmf, which entrance.css and
   selection.css turn into plain crossfades (A-79 item 9: "crossfades only"). */
@media (prefers-reduced-motion: reduce) {
  *:not(.rmf), *::before, *::after { animation: none !important; transition: none !important; }
}
