/* Layout: one narrow column on black. White type, museum red, square edges; object photos are the only light surfaces.
   Attitude borrowed from late-2000s profile pages: a red marquee, boxed panels with header bars, hard drop-shadowed titles. */
:root {
  --bg: #000000;
  --ink: #ffffff;
  --muted: #a6a6a2;
  --line: #2e2e2c;
  --mat: #f4f4f1;
  --red: #e32118;
  --red-text: #ff4338;
  --on-red: #ffffff;
  --accent: var(--red-text);
  --on-accent: #ffffff;
  --solid: #ffffff;
  --on-solid: #000000;
  --sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sys: Verdana, Geneva, Tahoma, sans-serif;
  color-scheme: dark;
}

html, body { height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 2px; }
::selection { background: var(--red); color: #fff; }

.shell { display: flex; justify-content: center; align-items: flex-start; gap: 48px; min-height: 100%; }
.app { flex: 0 1 460px; width: 100%; max-width: 460px; min-width: 0; align-self: stretch; display: flex; flex-direction: column; overflow-x: hidden; overflow-x: clip; }
.view { flex: 1; display: flex; flex-direction: column; gap: 20px; padding-block: 20px 28px; min-width: 0; }
.view.fit { height: 100dvh; max-height: 100dvh; overflow: hidden; overflow: clip; }

/* type */
.eyebrow { margin: 0; font-family: var(--sys); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.eyebrow.red { color: var(--red-text); }
.eyebrow.dim { color: var(--muted); }
.display { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(44px, 13vw, 62px); line-height: 0.95; letter-spacing: -0.02em; text-wrap: balance; text-shadow: 3px 3px 0 var(--red); padding-right: 4px; }
.h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; }
.h3 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 22px; line-height: 1.15; text-wrap: balance; }
.lede { margin: 0; font-size: 16px; color: var(--ink); max-width: 38ch; }
.small { margin: 0; font-size: 13px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* marquee */
.marq { background: var(--red); color: var(--on-red); overflow: hidden; white-space: nowrap; font-family: var(--sys); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 0; }
.marq-in { display: inline-block; padding-left: 100%; animation: marq 26s linear infinite; }
@keyframes marq { to { transform: translateX(-100%); } }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.bar .brand { font-family: var(--sys); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.bar-right { display: inline-flex; align-items: center; gap: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 6px 0; }
.back:hover { color: var(--red-text); }
.back svg { width: 14px; height: 14px; }

/* buttons: square, loud */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 0; font-family: var(--sys); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--ink); transition: transform .12s ease, background .12s ease, color .12s ease; }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn.solid:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.btn.wide { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: 0.35; cursor: default; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.link { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); align-self: flex-start; padding: 4px 0; }
.link:hover { color: var(--red-text); }
.reset { display: flex; flex-direction: column; gap: 10px; }

/* home */
.status { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font-family: var(--sys); font-size: 11.5px; }
.status dt { color: var(--red-text); font-weight: 700; }
.status dd { margin: 0; }
.sel-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.sel { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sel:hover .name { color: var(--red-text); }
.sel .thumb { width: 56px; height: 70px; background: var(--mat); overflow: hidden; }
.sel .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sel .name { display: block; font-family: var(--serif); font-size: 21px; line-height: 1.15; }
.sel .meta { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.sel .state { font-family: var(--sys); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; color: var(--red-text); }
.sel .state.done { color: var(--muted); }
.panel { border: 1px solid var(--ink); display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.panel > .eyebrow:first-child { margin: 0 -14px 4px; padding: 6px 14px; background: var(--ink); color: var(--bg); }
.panel > .eyebrow.red:first-child { background: var(--red); color: var(--on-red); }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--ink); background: var(--bg); color: var(--ink); padding: 0 12px; font: inherit; font-size: 15px; letter-spacing: 0.04em; border-radius: 0; }
.code-row .btn { min-height: 44px; padding: 0 18px; }
.err { color: var(--red-text); font-size: 13px; margin: 0; }
.foot { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin: 0; }

/* intro */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.strip div { aspect-ratio: 4 / 5; background: var(--mat); overflow: hidden; }
.strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.steps li span:first-child { color: var(--red-text); font-family: var(--sys); font-weight: 700; font-size: 12px; padding-top: 2px; }
.grow { flex: 1; }

/* card screen */
.progress { height: 3px; background: var(--line); position: relative; }
.progress i { position: absolute; inset: 0 auto 0 0; background: var(--red); transition: width .25s ease; }
.deck { position: relative; flex: 1; min-height: 240px; touch-action: pan-y; }
.card { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--ink); user-select: none; -webkit-user-select: none; will-change: transform; }
.card.under { transform: scale(0.97) translateY(8px); opacity: 0.5; }
.card .photo { flex: 1; min-height: 0; background: var(--mat); position: relative; overflow: hidden; }
.card .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.card .cap { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--ink); }
.card .cap .t { font-family: var(--serif); font-size: 23px; line-height: 1.12; }
.card .cap .s { font-family: var(--sys); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stamp { position: absolute; top: 16px; padding: 7px 12px; font-family: var(--sys); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0; background: #000; color: #fff; }
.stamp.keep { left: 16px; background: var(--red); color: var(--on-red); transform: rotate(-4deg); }
.stamp.pass { right: 16px; transform: rotate(4deg); }
.hint { text-align: center; }

/* sheets */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72); display: flex; align-items: flex-end; justify-content: center; z-index: 20; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sheet { width: 100%; max-width: 460px; max-height: 92dvh; overflow-y: auto; background: var(--bg); color: var(--ink); padding: 22px 20px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--ink); border-top: 4px solid var(--red); animation: rise .22s ease both; }
@keyframes rise { from { transform: translateY(24px); } to { transform: none; } }
.scrim.peek { align-items: center; }
.scrim.peek .sheet { max-height: 88dvh; padding-bottom: 20px; }
.opts { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.opt { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); width: 100%; }
.opt .box { width: 20px; height: 20px; border: 1.5px solid var(--ink); margin-top: 2px; display: block; position: relative; }
.opt[aria-pressed="true"] .box { background: var(--red); border-color: var(--red); }
.opt[aria-pressed="true"] .box::after { content: ""; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.opt[aria-pressed="true"] .on { color: var(--red-text); }
.opt .ot { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.opt .on { font-size: 15px; font-weight: 600; }
.opt .od { font-size: 13px; color: var(--muted); }

/* record */
.rec-photo { background: var(--mat); aspect-ratio: 4 / 3; position: relative; overflow: hidden; }
.rec-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.details { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.details li { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 12px 0 13px; border-bottom: 1px solid var(--line); }
.details li.seen { border-left: 3px solid var(--red); padding-left: 12px; }
.details .dh { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.details .pn { font-size: 12px; color: var(--muted); }
.details .dl { font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.details .dt { font-size: 14px; }
.tag { display: inline-block; padding: 2px 8px; border: 1px solid var(--ink); font-family: var(--sys); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tag.hit { background: var(--red); border-color: var(--red); color: var(--on-red); }
.verdict { display: flex; flex-direction: column; gap: 6px; }
.verdict p { margin: 0; font-size: 14px; }
.peers { border: 1px solid var(--ink); display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.peers > .eyebrow:first-child { margin: 0 -14px 4px; padding: 6px 14px; background: var(--ink); color: var(--bg); }
.peer-lead { margin: 0; font-family: var(--serif); font-size: 24px; line-height: 1.15; }
.peer-lead strong { font-weight: 500; font-style: italic; color: var(--red-text); }
.facts { margin: 0; border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* result */
.kept { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.kept div { aspect-ratio: 4 / 5; background: var(--mat); overflow: hidden; }
.kept img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bars .row { display: grid; grid-template-columns: 96px 1fr 22px; gap: 10px; align-items: center; font-size: 13px; }
.bars .track { height: 8px; background: var(--line); }
.bars .track i { display: block; height: 100%; background: var(--ink); }
.bars .row.top .track i { background: var(--red); }
.bars .row.top span:first-child { color: var(--red-text); }
.peers .bars .row { grid-template-columns: 96px 1fr 40px; }
.peers .bars .row .num { text-align: right; }
.stat-list { margin: 0; border-top: 1px solid var(--ink); }
.stat-list div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.stat-list dt { color: var(--muted); }
.stat-list dd { margin: 0; font-weight: 600; text-align: right; }
.codebox { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px dashed var(--ink); padding: 10px 12px; }
.codebox code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; letter-spacing: 0.06em; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.learn-grid { grid-template-columns: repeat(6, 1fr); }
.learn-tile { aspect-ratio: 4 / 5; background: var(--mat); overflow: hidden; display: block; padding: 0; }
.learn-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* side cabinet: always in view on wide screens, a drawer on narrow ones */
.side { display: flex; flex-direction: column; gap: 12px; background: var(--bg); color: var(--ink); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.side-count { margin: 0; font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.1; }
.side-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.side-list li { display: grid; grid-template-columns: 1fr 28px; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.side-item { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; text-align: left; padding: 8px 0; min-width: 0; }
.side-item:hover .t { color: var(--red-text); }
.side-item .ph { width: 44px; height: 55px; background: var(--mat); overflow: hidden; display: block; }
.side-item .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-item .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.side-item .t { font-size: 13.5px; font-weight: 500; line-height: 1.25; }
.side-item .s { font-size: 12px; color: var(--muted); }
.side-x { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.side-x:hover { color: var(--red-text); }
.side-x svg { width: 12px; height: 12px; }
.side-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72); z-index: 25; }
@media (min-width: 900px) {
  .side { flex: 0 0 300px; position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; padding: 32px 0 28px 28px; border-left: 1px solid var(--line); align-self: stretch; }
  .only-narrow { display: none !important; }
  .shell.wide .side { display: none; }
}
@media (max-width: 899px) {
  .side { position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 340px); z-index: 30; overflow-y: auto; border-left: 1px solid var(--ink);
    padding: calc(20px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) 16px;
    transform: translateX(100%); transition: transform .2s ease; visibility: hidden; }
  .side.open { transform: none; visibility: visible; }
}

/* the cabinet page (the profile side of the platform; restyled in the next step) */
.shell.wide .app { flex-basis: 900px; max-width: 900px; }
.cab { --c-bg: var(--bg); --c-ink: var(--ink); --c-box: var(--bg); --c-line: var(--ink); --c-head: var(--red); --c-head-ink: #ffffff;
  --c-th: #1b1b1a; --c-th-ink: var(--red-text); --c-td: #0d0d0d; --c-link: var(--red-text); --c-accent: var(--red-text); --c-name-font: var(--serif);
  background: var(--c-bg); color: var(--c-ink); border: 1px solid var(--c-line); padding: 14px;
  font-family: var(--sys); font-size: 12px; line-height: 1.45; display: flex; flex-direction: column; gap: 14px; }
.cab p { margin: 0; }
.cab-top { display: flex; flex-direction: column; gap: 4px; }
.cab-name { margin: 0; font-family: var(--c-name-font); font-style: italic; font-weight: 500; font-size: clamp(32px, 8vw, 50px); line-height: 1.05; overflow-wrap: anywhere; text-shadow: 3px 3px 0 var(--red); }
.cab-tag { font-size: 11px; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-accent); }
.cab-grid { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 14px; align-items: start; }
.cab-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 720px) { .cab-grid { grid-template-columns: minmax(0, 1fr); } }
.mod { border: 1px solid var(--c-line); background: var(--c-box); min-width: 0; }
.mod-h { margin: 0; background: var(--c-head); color: var(--c-head-ink); font-size: 11px; font-weight: bold; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 8px; }
.mod-b { padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; }
.cab-id { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: start; }
.cab-pic { width: 120px; aspect-ratio: 4 / 5; background: var(--mat); border: 1px solid var(--c-line); overflow: hidden; display: flex; align-items: center; justify-content: center; color: #666663; font-size: 11px; text-align: center; }
.cab-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cab-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.clink { font-family: inherit; font-size: 12px; color: var(--c-link); text-decoration: underline; text-underline-offset: 2px; text-align: left; padding: 5px 0; min-height: 28px; }
.clink:hover { color: var(--ink); }
.clink.off { text-decoration: none; color: var(--c-ink); opacity: 0.7; display: inline-flex; align-items: center; }
.cab-share { display: flex; flex-direction: column; gap: 6px; }
.cab-share:empty { display: none; }
.cab .codebox code { font-size: 12px; }
.cab .code-row input { height: 32px; font-size: 12px; font-family: inherit; }
.cab-note { color: var(--c-accent); }
.cab-note:empty { display: none; }
.kv { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.kv th { width: 92px; text-align: left; vertical-align: top; background: var(--c-th); color: var(--c-th-ink); padding: 5px 6px; font-weight: bold; }
.kv td { background: var(--c-td); padding: 5px 6px; overflow-wrap: anywhere; }
.type { display: flex; flex-direction: column; }
.type-row { display: grid; grid-template-columns: 58px 1fr auto; grid-template-areas: "p l w" "p b w"; column-gap: 8px; row-gap: 3px; align-items: center; text-align: left; padding: 7px 0; border-bottom: 1px dotted var(--line); font-family: inherit; }
.type-row:last-child { border-bottom: 0; }
.type-row .tp { grid-area: p; font-size: 20px; font-weight: bold; color: var(--c-accent); }
.type-row .tl { grid-area: l; font-size: 13px; font-weight: bold; }
.type-row .tb { grid-area: b; height: 6px; background: var(--line); display: block; }
.type-row .tb i { display: block; height: 100%; background: var(--red); }
.type-row .tw { grid-area: w; color: var(--c-link); text-decoration: underline; font-size: 11px; }
.cab-arch { font-family: var(--c-name-font); font-style: italic; font-size: 24px; line-height: 1.15; color: var(--c-accent); }
.cab-fine { font-size: 11px; opacity: 0.75; }
.top8 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.t8 { display: flex; flex-direction: column; gap: 4px; text-align: center; font-family: inherit; min-width: 0; }
.t8 .ph { aspect-ratio: 4 / 5; background: var(--mat); border: 1px solid var(--c-line); overflow: hidden; display: block; }
.t8 .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t8 .tn { font-size: 11px; color: var(--c-link); text-decoration: underline; overflow-wrap: anywhere; line-height: 1.25; }
.blog { list-style: none; margin: 0; padding: 0; }
.blog li { padding: 2px 0; }
.blog .bd { opacity: 0.7; font-size: 11px; }
.cab-foot { font-size: 11px; opacity: 0.7; text-align: center; }

@media (min-width: 560px) {
  .app { padding-block: 12px; }
  .view.fit { height: calc(100dvh - 24px); max-height: 860px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .marq-in { padding-left: 0; }
}

/* ---------- preview switch and parts that only Version B shows ---------- */
.lookstrip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-family: var(--sys); font-size: 10.5px; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.lk { border: 1px solid var(--line); padding: 4px 8px; color: var(--ink); font-family: var(--sys); font-size: 10.5px; }
.lk.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mynav, .box-h, .t8 .ts { display: none; }

/* ================= Version B: closer to a late-2000s profile page, still black and red ================= */
html[data-look="b"] body { font-family: var(--sys); font-size: 12px; line-height: 1.5;
  background-image: radial-gradient(rgba(255, 67, 56, 0.6) 1px, transparent 1.7px), radial-gradient(rgba(255, 255, 255, 0.55) 0.9px, transparent 1.6px), radial-gradient(rgba(227, 33, 24, 0.7) 1.4px, transparent 2.2px);
  background-size: 61px 61px, 97px 97px, 149px 149px; background-position: 0 0, 31px 47px, 73px 19px; }
html[data-look="b"] .view { gap: 14px; }
html[data-look="b"] .mynav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; background: var(--red); color: #fff; padding: 5px 8px; font-size: 10.5px; font-weight: bold; }
html[data-look="b"] .mynav button { color: #fff; text-decoration: none; padding: 2px 0; }
html[data-look="b"] .mynav button:hover { text-decoration: underline; }
html[data-look="b"] .display, html[data-look="b"] .cab-name { font-family: "Pacifico", "Brush Script MT", cursive; font-style: normal; font-weight: 400; letter-spacing: 0; line-height: 1.25; text-shadow: none;
  /* the shimmer is painted only inside the box, and this script face reaches well above and below its line: give the box room for the tall capitals, the tail of the y and the opening swash, then pull the layout back */
  padding: 0.3em 0.3em 0.4em 0.16em; margin: -0.22em -0.3em -0.22em -0.16em;
  background-image: linear-gradient(100deg, #e32118 0%, #ff8a7d 22%, #ffffff 38%, #ff4338 52%, #e32118 70%, #ffb3ab 86%, #e32118 100%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(227, 33, 24, 0.85)); animation: shimmer 5s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
html[data-look="b"] .cab-tag { font-family: "Pacifico", cursive; font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: #fff; }
html[data-look="b"] .h2 { font-family: var(--sys); font-weight: bold; font-size: 19px; line-height: 1.2; letter-spacing: 0; color: var(--red-text); }
html[data-look="b"] .h3, html[data-look="b"] .cab-arch { font-family: "Pacifico", cursive; font-style: normal; font-weight: 400; font-size: 22px; color: var(--red-text); }
html[data-look="b"] .lede { font-size: 12px; max-width: none; }
html[data-look="b"] .small { font-size: 11px; }
html[data-look="b"] .eyebrow { font-size: 11px; letter-spacing: 0; text-transform: none; }
html[data-look="b"] .eyebrow.red::before, html[data-look="b"] .eyebrow.red::after { content: " \2605 "; }
html[data-look="b"] .back, html[data-look="b"] .link { color: var(--red-text); text-decoration: underline; text-underline-offset: 2px; font-size: 11px; font-weight: normal; }
html[data-look="b"] .bar .brand { font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--red-text); }
/* boxes with dotted red borders and coloured title lines */
html[data-look="b"] .cab, html[data-look="b"] .mod, html[data-look="b"] .panel, html[data-look="b"] .peers, html[data-look="b"] .card, html[data-look="b"] .sheet, html[data-look="b"] .codebox { border: 1px dotted var(--red-text); }
html[data-look="b"] .cab { background-color: rgba(0, 0, 0, 0.88); }
html[data-look="b"] .sheet { border-top: 3px solid var(--red); }
html[data-look="b"] .mod-h, html[data-look="b"] .panel > .eyebrow:first-child, html[data-look="b"] .peers > .eyebrow:first-child, html[data-look="b"] .box-h {
  display: block; margin: 0; background: #140403; color: var(--red-text); font-family: var(--sys); font-size: 12px; font-weight: bold; letter-spacing: 0; text-transform: none; padding: 5px 8px; border-bottom: 1px dotted var(--red-text); }
html[data-look="b"] .panel > .eyebrow:first-child, html[data-look="b"] .peers > .eyebrow:first-child { margin: 0 -14px 4px; }
html[data-look="b"] .box-h { border: 1px dotted var(--red-text); border-bottom: 0; text-align: center; margin-bottom: -14px; }
html[data-look="b"] .mod-h::before { content: "\2605  "; }
html[data-look="b"] .sel-list, html[data-look="b"] .details, html[data-look="b"] .facts, html[data-look="b"] .stat-list, html[data-look="b"] .side-list, html[data-look="b"] .steps, html[data-look="b"] .opts { border-top: 1px dotted var(--red-text); }
html[data-look="b"] .sel, html[data-look="b"] .details li, html[data-look="b"] .facts div, html[data-look="b"] .stat-list div, html[data-look="b"] .side-list li, html[data-look="b"] .steps li, html[data-look="b"] .opt { border-bottom: 1px dotted #5a1410; }
html[data-look="b"] .sel .name, html[data-look="b"] .card .cap .t, html[data-look="b"] .details .dl, html[data-look="b"] .side-count { font-family: var(--sys); font-style: normal; font-weight: bold; font-size: 14px; color: var(--red-text); }
html[data-look="b"] .card .cap { border-top: 1px dotted var(--red-text); padding: 10px 12px 12px; }
html[data-look="b"] .details .dt, html[data-look="b"] .verdict p, html[data-look="b"] .facts div, html[data-look="b"] .stat-list div, html[data-look="b"] .steps li, html[data-look="b"] .opt .on { font-size: 12px; }
html[data-look="b"] .opt .od, html[data-look="b"] .details .pn { font-size: 11px; }
html[data-look="b"] .peer-lead { font-family: var(--sys); font-size: 14px; font-weight: bold; }
html[data-look="b"] .peer-lead strong { font-style: normal; font-size: 22px; }
/* buttons become chunky badges with hearts and crosses */
html[data-look="b"] .btn { min-height: 44px; border: 2px solid var(--red-text); color: var(--red-text); font-size: 12px; letter-spacing: 0.04em; outline: 1px dotted transparent; }
html[data-look="b"] .btn.solid { background: var(--red); border-color: var(--red); color: #fff; box-shadow: inset 0 0 0 2px #000, inset 0 0 0 3px rgba(255, 255, 255, 0.55); }
html[data-look="b"] .btn.ghost:hover, html[data-look="b"] .btn.solid:hover { background: #fff; border-color: #fff; color: #000; }
html[data-look="b"] .btn.keep svg, html[data-look="b"] .btn.pass svg { display: none; }
html[data-look="b"] .btn.keep::before { content: "\2665"; font-size: 16px; }
html[data-look="b"] .btn.pass::before { content: "\2715"; font-size: 13px; }
html[data-look="b"] .stamp.keep::before { content: "\2665  "; }
html[data-look="b"] .t8 .ts { display: block; font-size: 10px; color: var(--muted); }
html[data-look="b"] .side { background-color: rgba(0, 0, 0, 0.9); }
@media (prefers-reduced-motion: reduce) { html[data-look="b"] .display, html[data-look="b"] .cab-name { animation: none; } }
html[data-look="b"] .app { background: #000; box-shadow: 0 0 0 12px #000; }

/* ---------- cabinet profile: extra profile-page furniture ---------- */
.top8.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.t8 .ts { display: block; font-size: 10px; color: var(--muted); }
.now { list-style: none; margin: 0; padding: 0; }
.now li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; padding: 3px 0; }
.now .ph { width: 34px; height: 42px; background: var(--mat); overflow: hidden; display: block; border: 1px solid var(--red-text); }
.now .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge100 { margin: 6px 10px; padding: 12px 8px; text-align: center; background: var(--red); color: #fff; font-family: var(--sys); font-size: 16px; font-weight: bold; letter-spacing: 0.06em; text-transform: uppercase; transform: rotate(-2deg);
  box-shadow: inset 0 0 0 2px #000, inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 14px rgba(227, 33, 24, 0.6); }
.cmts { display: flex; flex-direction: column; }
.cmt { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dotted #5a1410; }
.cmt:last-child { border-bottom: 0; }
.cmt .ph { width: 54px; aspect-ratio: 4 / 5; background: var(--mat); border: 1px solid var(--red-text); overflow: hidden; display: block; padding: 0; }
.cmt .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmt .who { padding: 0; min-height: 0; font-weight: bold; }
.cmt .when { display: block; font-size: 10px; color: var(--muted); }
.cab-banner { text-align: center; border: 1px dotted var(--red-text); padding: 10px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cab-name.bn { font-size: 36px; }

/* ---------- browse: the whole study collection ---------- */
.sp { display: block; width: 100%; height: auto; aspect-ratio: 1; flex: none; background-color: var(--mat); background-repeat: no-repeat; }
.t8 .ph, .side-item .ph, .now .ph, .cmt .ph, .learn-tile, .kept div, .sel .thumb, .strip div { display: flex; align-items: center; }
.sp.none { background-image: repeating-linear-gradient(45deg, #e6e6e2 0 6px, #f4f4f1 6px 12px); }
.rec-photo .sp { position: absolute; top: 0; bottom: 0; left: 50%; width: auto; height: 100%; aspect-ratio: 1; transform: translateX(-50%); }
.rec-photo img { z-index: 1; background: var(--mat); }
.nl { margin: 0; font-size: 13px; color: var(--muted); }
.bctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.bctl input, .bctl select { height: 36px; border: 1px dotted var(--red-text); background: #000; color: #fff; padding: 0 8px; font-family: var(--sys); font-size: 12px; border-radius: 0; min-width: 0; width: 100%; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px 8px; }
.bt { display: flex; flex-direction: column; gap: 3px; text-align: center; font-family: var(--sys); min-width: 0; }
.bt .ph { position: relative; aspect-ratio: 1; display: block; border: 1px solid var(--red-text); overflow: hidden; background: var(--mat); }
.bt.in .ph { outline: 2px solid var(--red); outline-offset: 1px; }
.bt .heart, .bt .star { position: absolute; top: 3px; font-size: 13px; line-height: 1; padding: 2px 4px; }
.bt .heart { right: 3px; background: var(--red); color: #fff; }
.bt .star { left: 3px; background: #000; color: var(--red-text); }
.bt .tn { font-size: 11px; color: var(--red-text); text-decoration: underline; overflow-wrap: anywhere; line-height: 1.25; }
.bt .ts { font-size: 10px; color: var(--muted); }
.bmore:empty { display: none; }

/* a box that folds: the title line is the switch */
.mod.fold .mod-h { padding: 0; display: flex; align-items: stretch; }
.mod.fold .mod-h::before { align-self: center; padding-left: 8px; white-space: pre; }
.fold-btn { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; font: inherit; color: inherit; text-align: left; padding: 5px 8px 5px 0; min-height: 30px; cursor: pointer; background: none; border: 0; }
.fold-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.fold-mark { font-weight: normal; font-size: 11px; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.fold-btn:hover .fold-mark { color: var(--ink); }
.mod.fold .mod-b[hidden] { display: none; }
html[data-look="b"] .mod.fold .mod-h { display: flex; }
html[data-look="b"] .mod.fold .mod-h:has(+ .mod-b[hidden]) { border-bottom: 0; }

/* ================= fits any device: small phones, big phones, tablets, laptops, large monitors ================= */
:root { --z: 1; }                                   /* how much the whole page is enlarged on very large screens */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); overflow-wrap: break-word; }
img { max-width: 100%; }
button, a, input, select { touch-action: manipulation; }

/* large monitors: enlarge everything together instead of leaving a small page in a big empty screen */
@supports (zoom: 1) {
  @media (min-width: 1700px) { :root { --z: 1.15; } }
  @media (min-width: 2100px) { :root { --z: 1.35; } }
  @media (min-width: 2700px) { :root { --z: 1.7; } }
  @media (min-width: 3500px) { :root { --z: 2.2; } }
  body { zoom: var(--z); }
}
/* anything measured against the screen has to allow for that enlargement */
.view.fit { height: calc(100dvh / var(--z)); max-height: calc(100dvh / var(--z)); }
.sheet { max-height: calc(92dvh / var(--z)); }
.scrim.peek .sheet { max-height: calc(88dvh / var(--z)); }
@media (min-width: 560px) { .view.fit { height: calc(100dvh / var(--z) - 24px); max-height: 860px; } }
@media (min-width: 900px) { .side { max-height: calc(100dvh / var(--z)); } }

/* the profile pages (home, browse, cabinet) use the width that is there, up to a comfortable reading width */
.shell.wide .app { flex-basis: min(1180px, 100%); max-width: min(1180px, 100%); }
.app { flex-basis: min(500px, 100%); max-width: min(500px, 100%); }
@media (min-width: 1100px) {
  .cab { padding: 18px; gap: 18px; }
  .cab-grid { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 18px; }
  .cab-col { gap: 18px; }
}
/* boxes lay their contents out by their own width, not the screen's */
.mod-b { container-type: inline-size; }
@container (min-width: 600px) { .top8:not(.three) { grid-template-columns: repeat(6, minmax(0, 1fr)); } .top8.three { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (min-width: 860px) { .top8:not(.three) { grid-template-columns: repeat(8, minmax(0, 1fr)); } .top8.three { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@container (max-width: 270px) { .top8:not(.three) { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cab-id { grid-template-columns: 88px 1fr; } .cab-pic { width: 88px; } }
@container (max-width: 210px) { .contact { grid-template-columns: 1fr; } .top8, .top8.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* phones and touch screens: bigger type, fingers-sized targets, no zoom-on-focus in the fields */
@media (pointer: coarse), (max-width: 640px) {
  html[data-look="b"] body, .cab { font-size: 13px; }
  html[data-look="b"] .lede, html[data-look="b"] .details .dt, html[data-look="b"] .verdict p, html[data-look="b"] .facts div, html[data-look="b"] .stat-list div, html[data-look="b"] .steps li, html[data-look="b"] .opt .on { font-size: 13.5px; }
  html[data-look="b"] .small, html[data-look="b"] .opt .od, html[data-look="b"] .details .pn, .cab-fine, .t8 .tn, .bt .tn { font-size: 12px; }
  html[data-look="b"] .mynav { padding: 2px 6px; font-size: 13px; gap: 0 4px; }
  html[data-look="b"] .mynav button { min-height: 42px; padding: 0 6px; display: inline-flex; align-items: center; }
  .clink { min-height: 42px; display: inline-flex; align-items: center; font-size: 13px; }
  .cmt .who { min-height: 34px; }
  .back, .link, html[data-look="b"] .back, html[data-look="b"] .link { min-height: 42px; display: inline-flex; align-items: center; font-size: 13px; }
  .fold-btn { min-height: 46px; }
  .fold-mark { font-size: 13px; }
  .type-row { padding: 11px 0; }
  .type-row .tw { font-size: 13px; padding: 8px 0 8px 6px; }
  .side-x { width: 42px; height: 42px; }
  .side-list li { grid-template-columns: 1fr 42px; }
  .btn, html[data-look="b"] .btn { min-height: 48px; }
  .bctl input, .bctl select, .code-row input, .cab .code-row input { height: 46px; font-size: 16px; }
  .code-row .btn { min-height: 46px; }
  .opt { padding: 12px 0; }
}

/* the answer button of a sheet stays in reach while the sheet scrolls */
.scrim:not(.peek) .sheet > .btn.solid.wide, .scrim.peek .sheet > .btn:last-child { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 0 0 6px var(--bg), 0 -14px 14px 4px var(--bg); }
.scrim.peek .sheet > .btn:nth-last-child(2) { position: sticky; bottom: 60px; z-index: 2; box-shadow: 0 0 0 6px var(--bg), 0 -14px 14px 4px var(--bg); }
.view { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
.kv th { width: clamp(92px, 32%, 150px); overflow-wrap: anywhere; }      /* long labels wrap instead of being cut */

/* the swipe screen on a short screen held upright (small phones with the browser bars showing): let it scroll instead of cutting the buttons off */
@media (max-height: 620px) and (orientation: portrait) {
  .view.fit { height: auto; max-height: none; overflow: visible; gap: 10px; padding-block: 8px 12px; }
  .view.fit > .hint, .view.fit > .box-h { display: none; }
  .deck { flex: none; height: max(220px, calc(100dvh / var(--z) - 252px)); }
}
/* the swipe screen on a phone held sideways, or any wide and very short window: picture on the left, controls on the right */
@media (max-height: 560px) and (orientation: landscape) {
  .app { flex-basis: min(820px, 100%); max-width: min(820px, 100%); }
  .view.fit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 260px); grid-template-rows: auto auto auto auto minmax(0, 1fr) auto auto; column-gap: 16px; row-gap: 8px; min-height: 300px; padding-block: 8px 10px; }
  .view.fit > * { grid-column: 2; }
  .view.fit > .mynav { grid-column: 1 / -1; grid-row: 1; }
  .view.fit > .bar { grid-row: 2; }
  .view.fit > .progress { grid-row: 3; }
  .view.fit > .box-h { grid-row: 4; margin-bottom: 0; }
  .view.fit > .deck { grid-column: 1; grid-row: 2 / 8; min-height: 0; }
  .view.fit > .hint { grid-row: 6; }
  .view.fit > .btn-row { grid-row: 7; }
  html[data-look="b"] .box-h { border-bottom: 1px dotted var(--red-text); }
}
@media (max-height: 300px) and (orientation: landscape) { .view.fit { height: auto; max-height: none; overflow: visible; } .view.fit > .deck { height: 240px; } }

/* ================= bigger writing (a step up everywhere, not huge) and page titles that match ================= */
html[data-look="b"] body, html[data-look="b"] .cab { font-size: 14px; line-height: 1.55; }
/* the three page titles (MyCabinet, Browse, the cabinet's name) are one size */
html[data-look="b"] .display, html[data-look="b"] .cab-name { font-size: clamp(40px, 11vw, 60px); }
html[data-look="b"] .cab-name.bn { font-size: 38px; }
html[data-look="b"] .cab-tag { font-size: 18px; }
html[data-look="b"] .mynav { font-size: 13px; padding: 7px 10px; }
html[data-look="b"] .marq { font-size: 12px; }
html[data-look="b"] .mod-h, html[data-look="b"] .panel > .eyebrow:first-child, html[data-look="b"] .peers > .eyebrow:first-child, html[data-look="b"] .box-h { font-size: 14px; padding: 6px 9px; }
html[data-look="b"] .h2 { font-size: 22px; }
html[data-look="b"] .h3, html[data-look="b"] .cab-arch { font-size: 25px; }
html[data-look="b"] .lede, html[data-look="b"] .details .dt, html[data-look="b"] .verdict p, html[data-look="b"] .facts div, html[data-look="b"] .stat-list div, html[data-look="b"] .steps li, html[data-look="b"] .opt .on, html[data-look="b"] .nl { font-size: 14px; }
html[data-look="b"] .small, html[data-look="b"] .opt .od, html[data-look="b"] .details .pn, html[data-look="b"] .eyebrow, html[data-look="b"] .cab-fine, html[data-look="b"] .fold-mark, html[data-look="b"] .type-row .tw, html[data-look="b"] .cab-foot, html[data-look="b"] .foot { font-size: 12.5px; }
html[data-look="b"] .back, html[data-look="b"] .link, html[data-look="b"] .bar .brand { font-size: 13px; }
html[data-look="b"] .clink { font-size: 14px; min-height: 32px; }
html[data-look="b"] .t8 .tn, html[data-look="b"] .bt .tn { font-size: 12.5px; }
html[data-look="b"] .t8 .ts, html[data-look="b"] .bt .ts, html[data-look="b"] .blog .bd, html[data-look="b"] .cmt .when { font-size: 11.5px; }
html[data-look="b"] .type-row .tp { font-size: 23px; }
html[data-look="b"] .type-row .tl { font-size: 15px; }
html[data-look="b"] .type-row { grid-template-columns: 66px 1fr auto; }
html[data-look="b"] .sel .name, html[data-look="b"] .card .cap .t, html[data-look="b"] .details .dl, html[data-look="b"] .side-count, html[data-look="b"] .peer-lead { font-size: 16px; }
html[data-look="b"] .card .cap .s { font-size: 11.5px; }
html[data-look="b"] .btn { font-size: 13px; }
html[data-look="b"] .tag { font-size: 11px; }
html[data-look="b"] .side-item .t { font-size: 14px; }
html[data-look="b"] .side-item .s { font-size: 12.5px; }
html[data-look="b"] .bctl input, html[data-look="b"] .bctl select, html[data-look="b"] .cab .code-row input { font-size: 14px; height: 40px; }
html[data-look="b"] .cab .codebox code { font-size: 13px; }
html[data-look="b"] .kv th { width: clamp(104px, 34%, 170px); }
html[data-look="b"] .bars .row { font-size: 14px; grid-template-columns: 110px 1fr 26px; }
html[data-look="b"] .peers .bars .row { grid-template-columns: 110px 1fr 44px; }
html[data-look="b"] .bgrid { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); }
/* phones and touch screens stay a step above that, and keep their finger-sized targets and 16px fields */
@media (pointer: coarse), (max-width: 640px) {
  html[data-look="b"] body, html[data-look="b"] .cab { font-size: 15px; }
  html[data-look="b"] .lede, html[data-look="b"] .details .dt, html[data-look="b"] .verdict p, html[data-look="b"] .facts div, html[data-look="b"] .stat-list div, html[data-look="b"] .steps li, html[data-look="b"] .opt .on, html[data-look="b"] .nl { font-size: 15px; }
  html[data-look="b"] .small, html[data-look="b"] .opt .od, html[data-look="b"] .details .pn, html[data-look="b"] .eyebrow, html[data-look="b"] .cab-fine, html[data-look="b"] .fold-mark, html[data-look="b"] .type-row .tw, html[data-look="b"] .t8 .tn, html[data-look="b"] .bt .tn { font-size: 13.5px; }
  html[data-look="b"] .mynav { font-size: 14px; padding: 2px 6px; }
  html[data-look="b"] .clink, html[data-look="b"] .back, html[data-look="b"] .link { font-size: 15px; min-height: 42px; }
  html[data-look="b"] .mod-h, html[data-look="b"] .panel > .eyebrow:first-child, html[data-look="b"] .peers > .eyebrow:first-child, html[data-look="b"] .box-h { font-size: 15px; }
  html[data-look="b"] .bctl input, html[data-look="b"] .bctl select, html[data-look="b"] .cab .code-row input, .code-row input { font-size: 16px; height: 46px; }
  html[data-look="b"] .cab-tag { font-size: 17px; }
}

/* ================= the record after a keep: the way on sits under the title, in sight without scrolling ================= */
.rec-photo:has(~ .next-up) { max-height: max(150px, calc(100dvh / var(--z) - 285px)); }
@media (max-width: 640px) { .rec-photo:has(~ .next-up) { max-height: max(150px, calc(100dvh / var(--z) - 380px)); } }

/* ================= white ground, the default since 2026-11-22: the same look with black and white swapped, red kept. The black ground stays above and shows when the page address has ?black ================= */
html:not([data-ground="black"]) { --bg: #ffffff; --ink: #000000; --muted: #5c5c58; --line: #d9d9d5; --red-text: #c9150d; --solid: #000000; --on-solid: #ffffff; color-scheme: light; }
html:not([data-ground="black"])[data-look="b"] body {
  background-image: radial-gradient(rgba(227, 33, 24, 0.55) 1px, transparent 1.7px), radial-gradient(rgba(0, 0, 0, 0.5) 0.9px, transparent 1.6px), radial-gradient(rgba(227, 33, 24, 0.65) 1.4px, transparent 2.2px); }
html:not([data-ground="black"]) .cab { --c-th: #f3efed; --c-td: #faf8f7; }
html:not([data-ground="black"])[data-look="b"] .cab { background-color: rgba(255, 255, 255, 0.92); }
html:not([data-ground="black"])[data-look="b"] .side { background-color: rgba(255, 255, 255, 0.94); }
html:not([data-ground="black"])[data-look="b"] .app { background: #fff; box-shadow: 0 0 0 12px #fff; }
html:not([data-ground="black"])[data-look="b"] .display, html:not([data-ground="black"])[data-look="b"] .cab-name {
  background-image: linear-gradient(100deg, #e32118 0%, #ff6a5c 22%, #7a0d08 38%, #ff4338 52%, #e32118 70%, #b3140d 86%, #e32118 100%); filter: drop-shadow(0 0 5px rgba(227, 33, 24, 0.45)); }
html:not([data-ground="black"])[data-look="b"] .cab-tag { color: #000; }
html:not([data-ground="black"])[data-look="b"] .mod-h, html:not([data-ground="black"])[data-look="b"] .panel > .eyebrow:first-child, html:not([data-ground="black"])[data-look="b"] .peers > .eyebrow:first-child, html:not([data-ground="black"])[data-look="b"] .box-h { background: #fff0ee; }
html:not([data-ground="black"])[data-look="b"] .sel, html:not([data-ground="black"])[data-look="b"] .details li, html:not([data-ground="black"])[data-look="b"] .facts div, html:not([data-ground="black"])[data-look="b"] .stat-list div, html:not([data-ground="black"])[data-look="b"] .side-list li, html:not([data-ground="black"])[data-look="b"] .steps li, html:not([data-ground="black"])[data-look="b"] .opt, html:not([data-ground="black"]) .cmt { border-bottom-color: #efb3ad; }
html:not([data-ground="black"])[data-look="b"] .btn.solid { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px rgba(227, 33, 24, 0.6); }
html:not([data-ground="black"])[data-look="b"] .btn.ghost:hover, html:not([data-ground="black"])[data-look="b"] .btn.solid:hover { background: #000; border-color: #000; color: #fff; box-shadow: none; }
html:not([data-ground="black"]) .bctl input, html:not([data-ground="black"]) .bctl select { background: #fff; color: #000; }
html:not([data-ground="black"]) .bt .star { background: #fff; }
html:not([data-ground="black"]) .scrim, html:not([data-ground="black"]) .side-scrim { background: rgba(0, 0, 0, 0.5); }
html:not([data-ground="black"]) .rec-photo, html:not([data-ground="black"]) .cab-pic, html:not([data-ground="black"]) .t8 .ph { outline: 1px solid var(--line); outline-offset: -1px; }

/* ================= the friend list ================= */
.fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.fr { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding: 8px; min-width: 0; font-family: inherit; border: 1px dotted var(--red-text); background: var(--c-td); }
.fr:hover { border-style: solid; }
.fr .ph { display: block; aspect-ratio: 4 / 5; background: var(--mat); border: 1px solid var(--line); overflow: hidden; }
.fr .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fr-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fr-n { font-weight: bold; color: var(--c-link); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.fr-c { font-size: 12.5px; opacity: 0.75; }
.fr-on { font-size: 12px; font-weight: bold; color: var(--red-text); }

/* ================= the fitting room: a 3D figure on a stage, sections on one side, controls on the other ================= */
.scrim.fit-scrim { padding: 0; align-items: stretch; background: var(--bg); }
.fit { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: var(--sys); font-size: 14px; }
.fit-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--red); color: #fff; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) 6px max(14px, env(safe-area-inset-left, 0px)); }
.fit-x { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #000; border: 1px solid #000; font-size: 14px; }
.fit-x:hover { background: #000; color: #fff; }
.fit-body { flex: 1; min-height: 0; width: min(1400px, 100%); margin: 0 auto; display: grid; grid-template-columns: 136px minmax(260px, 1.35fr) minmax(280px, 0.8fr); gap: 12px;
  padding: 14px max(14px, env(safe-area-inset-right, 0px)) 12px max(14px, env(safe-area-inset-left, 0px)); }
.fit-rail { display: flex; flex-direction: column; gap: 5px; min-height: 0; overflow-y: auto; padding: 2px; }
.fit-tab { flex: none; font-family: var(--sys); font-size: 14px; font-weight: bold; text-align: left; padding: 8px 10px; min-height: 38px; border: 1px dotted var(--red-text); color: var(--red-text); background: var(--bg); }
.fit-tab:hover { border-style: solid; }
.fit-tab.on { background: var(--red); color: #fff; border: 1px solid var(--red); }
.fit-tab.on::before { content: "\2605  "; }
.fit-stage { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.fit-figwrap { position: relative; flex: 1; min-height: 0; border: 2px solid var(--red); overflow: hidden; background: linear-gradient(#f4f4f6 0%, #e9eaee 58%, #f7f7f9 82%, #ffffff 100%); }
.fit-fig { position: absolute; inset: 0; }
.fit-wait { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: #333; }
.fit-card { position: absolute; left: 8px; bottom: 8px; width: min(260px, calc(100% - 16px)); display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; align-items: start; padding: 6px; background: rgba(255, 255, 255, 0.94); color: #000; border: 1px solid var(--red); font-size: 12px; line-height: 1.3; }
.fit-card[hidden] { display: none; }
.fit-card .ph { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--mat); border: 1px solid #d9d9d5; position: relative; }
.fit-card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fit-card-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: break-word; word-break: normal; }
.fit-card-as { color: #444; }
.fit-card .clink { min-height: 24px; padding: 2px 0; font-size: 12px; }
.fit-tools { flex: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.fit-tool { font-family: var(--sys); font-size: 13px; font-weight: bold; padding: 6px 10px; min-height: 34px; color: var(--ink); background: var(--bg); border: 1px solid var(--ink); }
.fit-tool:hover { background: var(--ink); color: var(--bg); }
.fit-panel { min-width: 0; min-height: 0; overflow-y: auto; border: 1px solid var(--red); background: var(--bg); }
.fit-panel-in { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 14px; }
.fit-h { position: sticky; top: 0; z-index: 1; margin: 0 -12px; padding: 7px 12px; background: var(--red); color: #fff; font-size: 14px; font-weight: bold; letter-spacing: 0.08em; text-transform: uppercase; }
.fit-h::before { content: "\2605  "; }
.fit-note { margin: 0; font-size: 13px; border-left: 3px solid var(--red); padding-left: 8px; }
.fit-sub { margin: 6px 0 0; font-weight: bold; color: var(--red-text); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.fit-sliders { display: flex; flex-direction: column; gap: 2px; }
.fit-slider { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 34px; }
.fit-sl-name { font-size: 13px; font-weight: bold; }
.fit-slider input { width: 100%; height: 26px; margin: 0; accent-color: var(--red); }
.fit-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.fit-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--bg); outline: 1px solid #8a8a8a; }
.fit-dot.on { outline: 3px solid var(--red); }
.fit-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fit-chip { font-family: var(--sys); font-size: 13px; padding: 6px 10px; min-height: 34px; border: 1px solid var(--ink); background: var(--bg); color: var(--ink); }
.fit-chip.on { background: var(--red); border-color: var(--red); color: #fff; font-weight: bold; }
.fit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.fit-opt { display: flex; flex-direction: column; gap: 3px; text-align: center; padding: 3px 3px 5px; border: 1px solid var(--line); background: var(--bg); font-family: var(--sys); min-width: 0; color: var(--ink); }
.fit-opt .ph { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--mat); position: relative; }
.fit-opt .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fit-opt:hover { border-color: var(--red); }
.fit-opt.on { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.fit-opt.off { opacity: 0.55; }
.fit-name { font-size: 12px; line-height: 1.2; overflow-wrap: break-word; }
.fit-as { font-size: 11.5px; font-weight: bold; color: var(--red-text); }
.fit-foot { flex: none; display: flex; align-items: center; gap: 10px; justify-content: flex-end; border-top: 1px dotted var(--red-text); background: var(--bg);
  padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); }
.fit-foot-note { margin-right: auto; min-width: 0; font-size: 12.5px; color: var(--muted); }
.fit-foot .btn { flex: none; white-space: nowrap; }
@media (max-width: 700px) {
  .fit-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 54%) minmax(0, 1fr); gap: 8px; padding: 8px max(8px, env(safe-area-inset-right, 0px)) 8px max(8px, env(safe-area-inset-left, 0px)); }
  .fit-rail { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; }
  .fit-tab { min-height: 42px; padding: 8px 12px; font-size: 15px; white-space: nowrap; }
  .fit-tools { gap: 4px; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; } .fit-tool { min-height: 38px; padding: 4px 8px; font-size: 12.5px; white-space: nowrap; flex: none; }
  .fit-panel-in { padding: 0 8px 12px; } .fit-h { margin: 0 -8px; padding: 7px 8px; }
  .fit-slider { grid-template-columns: 104px minmax(0, 1fr); min-height: 40px; } .fit-slider input { height: 34px; }
  .fit-dot { width: 36px; height: 36px; } .fit-chip { min-height: 40px; }
  .fit-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .fit-foot-note { display: none; } .fit-foot .btn { flex: 1; padding: 0 10px; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .fit-body { grid-template-columns: 112px minmax(0, 0.8fr) minmax(0, 1fr); grid-template-rows: none; gap: 8px; padding-top: 6px; padding-bottom: 6px; }
  .fit-rail { flex-direction: column; overflow-x: hidden; overflow-y: auto; }
  .fit-tab { min-height: 34px; padding: 5px 8px; font-size: 13px; }
  .fit-tools { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; } .fit-tool { min-height: 30px; font-size: 11.5px; white-space: nowrap; padding: 2px 6px; }
  .fit-foot { padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)); } html[data-look="b"] .fit-foot .btn, .fit-foot .btn { min-height: 36px; flex: none; }
  .fit-foot-note { display: block; }
}

.fit-fine { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ================= personal twists: visitors' reinterpretations, kept apart from the archive ================= */
.btabs { display: flex; flex-wrap: wrap; gap: 8px; }
.btab { font-family: var(--sys); font-size: 14px; font-weight: bold; padding: 8px 12px; min-height: 40px; border: 1px dotted var(--red-text); color: var(--red-text); background: var(--bg); }
.btab:hover { border-style: solid; }
.btab.on { background: var(--red); border: 1px solid var(--red); color: #fff; }
.tw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tw-card { display: flex; flex-direction: column; gap: 3px; text-align: center; font-family: inherit; min-width: 0; padding: 6px; border: 1px dotted var(--red-text); background: var(--bg); color: var(--ink); }
.tw-card:hover { border-style: solid; }
.tw-card .ph, .tw-mini .ph, .tw-of .ph { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #fff; border: 1px solid var(--line); position: relative; }
.tw-card .ph img, .tw-mini .ph img, .tw-of .ph img, .tw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tw-card .tn { font-weight: bold; color: var(--red-text); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: break-word; }
.tw-card .ts { font-size: 12.5px; color: var(--muted); }
.tw-tag { align-self: center; font-size: 11.5px; font-weight: bold; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: var(--red); padding: 2px 6px; }
.tw-photo { background: #fff; border: 1px solid var(--line); aspect-ratio: 4 / 5; max-height: min(60dvh, 520px); overflow: hidden; display: flex; justify-content: center; }
.tw-photo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; }
.tw-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.tw-thumb { width: 56px; aspect-ratio: 4 / 5; border: 1px solid var(--line); overflow: hidden; background: #fff; padding: 0; }
.tw-thumb:hover, .tw-thumb:focus-visible { border-color: var(--red); }
.tw-of { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border: 1px dotted var(--red-text); background: var(--bg); color: var(--ink); font-family: inherit; text-align: left; width: 100%; }
.tw-of:hover { border-style: solid; }
.tw-of-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tw-of-n { font-weight: bold; font-size: 15px; }
.tw-of-go { color: var(--red-text); text-decoration: underline; text-underline-offset: 2px; font-weight: bold; }
.tw-links { display: flex; flex-direction: column; gap: 6px; }
.tw-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tw-mini { display: flex; flex-direction: column; gap: 3px; width: 92px; text-align: center; font-family: inherit; color: var(--ink); }
.tw-mini .tn { font-size: 12px; color: var(--red-text); text-decoration: underline; overflow-wrap: break-word; }
@media (max-width: 640px) { .tw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .btab { flex: 1; min-height: 44px; font-size: 15px; } }

/* everything in a sheet keeps its own height (the sheet scrolls): without this the garment photo was squeezed to nothing on long records */
.sheet > * { flex-shrink: 0; }

.tw-grid.looks { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tw-card.look .ph { aspect-ratio: 2 / 3; }
.tw-photo.look { aspect-ratio: 2 / 3; max-height: min(74dvh, 760px); }
@media (max-width: 640px) { .tw-grid.looks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tw-thumb.turn { width: auto; aspect-ratio: auto; padding: 0 10px; font-family: var(--sys); font-size: 12.5px; font-weight: bold; color: var(--red-text); background: var(--bg); border: 1px dotted var(--red-text); }
.tw-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

/* renders carry their own label and sit apart from the wearable 3D pieces */
.tw-clo { display: inline-block; font-family: var(--sys); font-size: 11px; font-weight: bold; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; background: #000; padding: 2px 6px; }
.tw-card .ph .tw-clo { position: absolute; left: 0; bottom: 0; font-size: 10px; padding: 2px 5px; }
.tw-cap { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ================= the longer story some pieces have ================= */
.more { display: flex; flex-direction: column; gap: 8px; border: 1px dotted var(--red-text); padding: 12px; background: var(--bg); }
.more p { margin: 0; }
.more-lead { font-weight: bold; font-size: 15px; }
.more-h { margin: 6px 0 0; font-family: var(--sys); font-size: 13px; font-weight: bold; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red-text); }
.more-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }

/* the fold-out map window inside a record */
.more-map { display: flex; flex-direction: column; border: 2px solid var(--red); background: #000; }
.more-map[hidden] { display: none; }
.more-map-view { position: relative; height: min(68dvh, 620px); min-height: 360px; background: #000; }
.more-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.more-map-wait { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.more-map-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; background: var(--bg); color: var(--ink); }
.more-map-bar .small { margin: 0 auto 0 0; }
.more-map-btn { font-family: var(--sys); font-size: 12.5px; font-weight: bold; padding: 4px 9px; min-height: 30px; display: inline-flex; align-items: center; border: 1px solid var(--ink); background: var(--bg); color: var(--ink); text-decoration: none; }
.more-map-btn:hover { background: var(--ink); color: var(--bg); }
.more-map.big { position: fixed; inset: 0; z-index: 60; border-width: 0; }
.more-map.big .more-map-view { flex: 1; height: auto; min-height: 0; }
.more-map.big .more-map-bar { padding: 8px max(10px, env(safe-area-inset-right, 0px)) 8px max(10px, env(safe-area-inset-left, 0px)); border-bottom: 2px solid var(--red); }
/* while the map is open the record gets wider and its buttons stop floating over it */
.sheet:has(.more-map:not([hidden])) { max-width: min(920px, 100%); }
.scrim .sheet:has(.more-map:not([hidden])) > .btn, .scrim.peek .sheet:has(.more-map:not([hidden])) > .btn:last-child, .scrim.peek .sheet:has(.more-map:not([hidden])) > .btn:nth-last-child(2) { position: static; box-shadow: none; }
.sheet:has(.more-map.big) { animation: none; transform: none; }
@media (max-width: 700px) { .more-map-btn { min-height: 40px; padding: 4px 12px; } .more-map-bar .small { flex-basis: 100%; } }

.more-top { display: flex; flex-direction: column; gap: 6px; }
html[data-look="b"] .more-top .btn.ghost, .more-top .btn.ghost { border-color: var(--red); background: var(--red); color: #fff; }
html[data-look="b"] .more-top .btn.ghost:hover, .more-top .btn.ghost:hover { background: #000; border-color: #000; color: #fff; }

/* seeing the figure well: a full-window view without the options, and a compact layout on short windows */
.fit.big .fit-rail, .fit.big .fit-panel { display: none; }
.fit.big .fit-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); width: 100%; }
.fit-bigbtn { border-color: var(--red); color: var(--red-text); }
@media (max-height: 640px) and (min-width: 701px) {
  .fit-bar { padding-top: 3px; padding-bottom: 3px; font-size: 12px; } .fit-x { width: 28px; height: 28px; }
  .fit-body { padding-top: 8px; padding-bottom: 6px; gap: 8px; }
  .fit-tab { min-height: 32px; padding: 5px 8px; font-size: 13px; }
  .fit-tools { gap: 4px; } .fit-tool { min-height: 28px; padding: 2px 7px; font-size: 12px; }
  .fit-foot { padding-top: 4px; padding-bottom: 4px; } html[data-look="b"] .fit-foot .btn, .fit-foot .btn { min-height: 34px; }
  .fit-foot-note { font-size: 11.5px; }
}

/* the portrait: a profile picture made from the avatar */
.pp-show { align-self: center; width: min(280px, 80%); aspect-ratio: 4 / 5; border: 1px solid var(--line); overflow: hidden; }
.pp-show img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) { .fit-foot { flex-wrap: wrap; } }
