:root {
  --bg: #fbfbfa;
  --panel: #f4f4f1;
  --panel-2: #efefec;
  --line: #e4e3df;
  --line-strong: #cfcec9;
  --ink: #1c1c1a;
  --ink-2: #4a4a46;
  --muted: #909089;
  --faint: #b6b5ae;
  --sans: "Futura", "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --tile-radius: 14px;
  --page: 78rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --accent: #33403a;
  --error: #853c32;
  --error-bg: #f8eeeb;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: .2em; }
button, input, textarea, select { font: inherit; }
button, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; }
button:disabled { opacity: .55; }
input, textarea, select {
  width: 100%;
  min-width: 0;
  padding: .7rem .8rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font: 400 16px/1.5 var(--sans);
}
input, select { min-height: 44px; }
input::placeholder, textarea::placeholder { color: #6d6d66; opacity: 1; }
textarea { display: block; resize: vertical; min-height: 8rem; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
p { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 1.35rem; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.display {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
}
.eyebrow {
  font: 400 .6875rem/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.35rem;
}
.wordmark { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); }
.wordmark .logo { width: 2.25rem; height: 2.25rem; flex: none; }
.lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 300;
}
.lockup-a { font-size: .9375rem; letter-spacing: .3em; }
.lockup-b { font-size: .5625rem; letter-spacing: .42em; margin-top: .3em; color: var(--ink-2); }
.site-nav { display: flex; gap: clamp(1.25rem, 3vw, 2.75rem); }
.site-nav a {
  font: 400 .75rem/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--faint);
  padding-block: .35rem;
  transition: color .2s;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.rule { display: flex; align-items: center; gap: .7rem; color: var(--faint); }
.rule::before, .rule::after {
  content: "";
  width: clamp(2rem, 6vw, 3.25rem);
  height: 1px;
  background: var(--line-strong);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
  padding-block: .5rem 1.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.75rem;
}
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font: 400 .6875rem/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .55em .9em;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--line-strong); background: var(--panel); }
.search { position: relative; display: flex; align-items: center; }
.search input {
  font: 400 .8125rem/1 var(--sans);
  letter-spacing: .06em;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: .5rem .25rem .5rem 1.5rem;
  width: 11rem;
  outline-offset: 4px;
}
.search input::placeholder { color: var(--faint); letter-spacing: .14em; text-transform: uppercase; font-size: .6875rem; }
.search svg { position: absolute; left: 0; width: 13px; height: 13px; fill: none; stroke: var(--faint); stroke-width: 1.2; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  font: 400 .6875rem/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05em 2.4em;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink);
  background: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: #33403a; border-color: #33403a; color: #f6f6f3; }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .2rem;
  padding-block: clamp(2rem, 5vh, 3rem);
}
.pager:empty { padding-block: 1.5rem; }
.site-foot {
  margin-top: auto;
  padding-block: clamp(2.5rem, 7vh, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  border-top: 1px solid var(--line);
}
.site-foot p {
  margin: 0;
  font: 400 .6875rem/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}

/* Shared adaptations. Existing inbox behavior is preserved. */
.player .eyebrow, .admin .eyebrow,
.player .site-nav a, .site-foot p { color: var(--ink-2); }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.player .btn, .admin .btn { min-height: 44px; line-height: 1.35; }
.player .chip, .admin .chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  line-height: 1.35;
}
.btn:disabled:hover { border-color: var(--line-strong); }
.btn-primary:disabled:hover { background: var(--accent); border-color: var(--accent); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--tile-radius); }
.help, .qualifier, .counter, .received, .version { color: var(--ink-2); }
.help { font-size: .875rem; line-height: 1.6; }
.help:empty, .msg:empty { display: none; }
.field-label { display: block; margin-bottom: .55rem; color: var(--ink-2); font-size: .6875rem; line-height: 1.5; letter-spacing: .16em; text-transform: uppercase; }
.qualifier { margin-left: .4em; font-size: .8125rem; letter-spacing: 0; text-transform: none; }
.counter { margin: 0; font-size: .75rem; font-variant-numeric: tabular-nums; }
.text-button { min-height: 44px; padding: .5rem .2rem; border: 0; border-radius: 3px; background: none; color: var(--ink-2); font: inherit; font-size: .875rem; text-decoration: underline; text-underline-offset: .2em; }
.text-button:hover { color: var(--ink); }
.badge { display: inline-flex; align-items: center; padding: .3rem .6rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .6875rem; line-height: 1.4; letter-spacing: .06em; overflow-wrap: anywhere; }
.project-badge { background: var(--bg); color: var(--ink); }
.category-badge { color: var(--ink-2); border-color: var(--line); }
.status-badge { background: var(--panel-2); color: var(--ink-2); }
[data-status="new"] .status-badge { background: #e7ede8; border-color: #cbd6ce; color: #334b3c; }
[data-status="reviewed"] .status-badge { background: #eeece4; border-color: #d8d2bf; color: #5b5038; }
[data-status="archived"] .status-badge { background: var(--panel-2); border-color: var(--line-strong); color: var(--ink-2); }
.msg { margin: 1rem 0 0; font-size: .875rem; overflow-wrap: anywhere; }
.msg[data-tone="error"], .msg.err, .field-error { color: var(--error); }
.msg[data-tone="success"] { color: var(--accent); }
.field-error { margin: 0; font-size: .875rem; }
.disclosure { border-top: 1px solid var(--line); }
.disclosure summary { min-height: 44px; padding: .85rem 0; cursor: pointer; color: var(--ink-2); font-size: .875rem; }
.disclosure summary:hover { color: var(--ink); }
.disclosure[open] { padding-bottom: 1rem; }
.disclosure[open] > summary { color: var(--ink); }
pre {
  margin: .5rem 0 0;
  padding: 1rem;
  max-width: 100%;
  max-height: 24rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  font: 400 16px/1.6 var(--sans);
  tab-size: 2;
}
.sr-only, .choice-input, .honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link { position: fixed; top: .5rem; left: 1rem; z-index: 100; padding: .65rem 1rem; background: var(--ink); color: var(--bg); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }

/* Correspondence: existing player controls */
.player-main { max-width: calc(34rem + 2 * var(--gutter)); padding-block: 2.5rem 4rem; }
.page-heading { display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; margin-bottom: 1.75rem; }
.page-heading h1 { font-size: clamp(1.4rem, 4vw, 1.8rem); }
.page-heading .rule { gap: 0; margin: .2rem 0; }
.page-heading #subtitle { margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; }
.feedback-form { padding: 1.75rem; }
.field { margin-bottom: 1.6rem; }
.field > .help { margin-bottom: .7rem; }
.field > input + .help { margin: .5rem 0 0; }
.field-bottom { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: .35rem .75rem; margin-top: .5rem; }
.field-bottom .counter { margin-left: auto; }
.radio-chips .chip { border-color: var(--line-strong); padding-inline: 1rem; background: var(--bg); }
.choice-input:checked + .chip { background: var(--accent); border-color: var(--accent); color: #fff; }
.choice-input:focus-visible + .chip { outline: 1px solid var(--ink); outline-offset: 4px; }
.rating-field { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.rating-field legend { padding-right: .5rem; }
.rating-field .help { margin: .5rem 0 .7rem; }
.rating-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .8rem; }
.rating .chip { width: 44px; height: 44px; padding: 0; background: var(--bg); border-color: var(--line-strong); font-size: 1rem; letter-spacing: 0; }
.send-actions { justify-content: flex-end; margin-top: 1rem; }
.done { padding: 2.5rem 1.75rem; text-align: center; }
.done .eyebrow { margin-bottom: 1rem; }
.done h2 { margin-bottom: 1rem; font-size: 1.75rem; }
.done .actions { justify-content: center; margin: 1.5rem 0 .75rem; }
.done p { color: var(--ink-2); }
body[data-state="sending"] #form { cursor: progress; }
body[data-state="sending"] #submit { cursor: progress; }
body[data-state="error"] #msg { color: var(--error); }
.embed-only { display: none; }
html.embed .site-head, html.embed .site-foot, html.embed .standalone-only { display: none; }
html.embed .embed-only { display: block; }
html.embed .player-main { max-width: 36rem; padding: 12px; }
html.embed .page-heading { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; gap: .4rem .75rem; margin-bottom: 1rem; }
html.embed .page-heading .eyebrow, html.embed .page-heading .rule { display: none; }
html.embed .page-heading h1 { font-size: 1rem; letter-spacing: .12em; }
html.embed .page-heading #subtitle { font-size: 1rem; }
html.embed .feedback-form, html.embed .done { border: 0; border-radius: 0; background: none; padding: 0; }
html.embed .done { padding-block: 1.5rem; }

/* Correspondence: studio queue and reading pane — unchanged */
.admin-main { padding-block: 2.5rem 3rem; }
.account { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; min-width: 0; }
.account .help { margin: 0; overflow-wrap: anywhere; }
.inbox-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.inbox-heading .eyebrow { margin-bottom: .8rem; }
.inbox-heading h1 { font-size: clamp(1.35rem, 3vw, 2rem); }
.gate { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; padding: 1.5rem; margin-block: 1.75rem 2rem; }
.gate > div { flex: 1 1 22rem; }
.gate h2 { margin-bottom: .5rem; font-size: 1.125rem; }
.gate .help { max-width: 60ch; margin: 0; }
body[data-auth="denied"] #gate { border-color: var(--error); }
body[data-auth="error"] #gateMsg { color: var(--error); }
body[data-auth="signed-out"] #inbox,
body[data-auth="checking"] #inbox,
body[data-auth="denied"] #inbox,
body[data-auth="error"] #inbox { display: none; }
body[data-auth="ready"] #sampleOnly { display: none; }
.project-strip { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.25rem; margin-block: 1.75rem 1rem; }
.project-count { display: inline-grid; place-items: center; min-width: 1.4rem; min-height: 1.4rem; margin-left: .5rem; background: var(--panel-2); border-radius: 50%; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.filters { align-items: flex-end; gap: 1rem; margin-bottom: 1rem; padding-bottom: 1.5rem; }
.filter-field { flex: 1 1 9rem; min-width: 0; }
.filter-field select { background: var(--bg); }
.filter-field .field-label { margin-bottom: .35rem; }
.starred-filter { flex: 0 0 auto; gap: .5rem; border-color: var(--line-strong); }
.search-field { flex: 2 1 15rem; }
.admin .search input { width: 100%; font: 400 16px/1.5 var(--sans); letter-spacing: 0; border-radius: 0; min-height: 44px; }
.admin .search input::placeholder { color: #6d6d66; font-size: 16px; text-transform: none; letter-spacing: 0; }
.admin .search svg { stroke: var(--ink-2); }
.results-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.results-heading p { margin: 0; }
.workspace { display: grid; grid-template-columns: minmax(16rem, 22.5rem) minmax(0, 1fr); align-items: start; gap: 1.25rem; }
.workspace > *, .detail-pane, .card-head > div { min-width: 0; }
.queue { overflow: hidden; }
.queue-row { position: relative; border-bottom: 1px solid var(--line); }
.queue-select { display: block; width: 100%; padding: 1.15rem 1.1rem; border: 0; border-radius: 0; background: transparent; text-align: left; color: var(--ink); font: inherit; }
.queue-select:hover { background: var(--panel-2); }
.queue-select[aria-current="true"] { background: var(--bg); box-shadow: inset 3px 0 var(--accent); }
.queue-select:focus-visible { outline-offset: -5px; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding-right: 1.75rem; }
.project-name { font-size: .9375rem; font-weight: 600; overflow-wrap: anywhere; }
.excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .7rem; color: var(--ink-2); font-size: .9375rem; line-height: 1.6; overflow-wrap: anywhere; }
.row-bottom { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .75rem; color: var(--ink-2); font-size: .75rem; }
.star-button { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink-2); background: transparent; font-size: 1.5rem; line-height: 1; }
.star-button[aria-pressed="true"] { color: var(--accent); background: #e7ede8; border-color: #cbd6ce; }
.star-button:hover { border-color: var(--ink); }
.row-star { position: absolute; top: .65rem; right: .5rem; width: 44px; height: 44px; border-color: transparent; font-size: 1.25rem; }
.queue-row:has(.row-star) .row-meta { padding-right: 2.25rem; }
.queue .pager { padding: 1.25rem; }
.queue .pager:has(button[hidden]) { display: none; }
.queue-end { padding: 1.5rem 1rem; margin: 0; text-align: center; }
.card { padding: clamp(1.25rem, 2.8vw, 2rem); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.card-title { font-size: 1.35rem; margin: 1rem 0 .8rem; overflow-wrap: anywhere; }
.version { font-size: .8125rem; overflow-wrap: anywhere; }
.received { margin: 1rem 0 1.5rem; font-size: .8125rem; }
.feedback-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; margin-bottom: 1.5rem; }
.player-facts { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 0 0 1.5rem; padding-block: 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.player-facts > div { min-width: 0; }
dt { color: var(--ink-2); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; }
dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.note-editor { margin-bottom: 1.5rem; }
.note-label { display: block; }
.note-editor textarea { min-height: 7rem; }
.note-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-top: .6rem; }
.note-bottom .actions { gap: .5rem; margin: 0; }
.note-bottom .btn { padding-inline: 1rem; }
.card[data-note-state="dirty"] .note-editor textarea { border-color: #8b896f; }
.card[data-note-state="error"] .note-editor textarea { border-color: var(--error); }
.card[data-note-state="error"] [data-field="note-msg"] { color: var(--error); }
.card[aria-busy="true"] { cursor: progress; }
.metadata { display: grid; gap: 1rem; margin: .25rem 0 0; }
.metadata dd { font-size: 16px; white-space: pre-wrap; }
.card-actions { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: .5rem; gap: .6rem; }
.card-actions .btn { padding-inline: 1rem; }
.btn-danger { color: var(--error); }
.btn-danger:hover:not(:disabled) { border-color: var(--error); background: var(--error-bg); }
.card-actions .btn-danger { margin-left: auto; }
.empty { padding: 2.5rem 1.25rem; text-align: center; color: var(--ink-2); }
.empty h2 { font-size: 1.125rem; margin-bottom: .75rem; }
.empty p { margin-bottom: 1rem; }
.empty p:last-child { margin: 0; }
.back-button { display: none; margin-bottom: .75rem; }
.preview-label { font-size: .75rem; color: var(--ink-2); border-left: 2px solid var(--line-strong); padding-left: .75rem; margin-bottom: 1rem; }
.keyboard-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: .5rem; }
#keys { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0; font-size: .8125rem; color: var(--ink-2); }
kbd { font: inherit; padding: .1rem .35rem; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 3px; color: var(--ink); }
.confirm-dialog { width: min(28rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 1.5rem; color: var(--ink); }
.confirm-dialog h2 { margin-bottom: 1rem; }
.confirm-dialog::backdrop { background: rgb(28 28 26 / .35); }

@media (max-width: 60rem) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .back-button { display: inline-flex; align-items: center; }
  #workspace[data-view="list"] > .detail-pane { display: none; }
  #workspace[data-view="detail"] > .queue { display: none; }
  #sampleOnly[data-view="list"] .sample-detail { display: none; }
  #sampleOnly[data-view="detail"] .sample-queue { display: none; }
  #inbox:has(#workspace:not([hidden])[data-view="detail"]) > .filters,
  #inbox:has(#workspace:not([hidden])[data-view="detail"]) > .project-strip,
  #inbox:has(#workspace:not([hidden])[data-view="detail"]) > .results-heading { display: none; }
}

@media (max-width: 40rem) {
  .site-head { position: static; }
  .site-head .wrap { flex-direction: column; align-items: flex-start; gap: .85rem; padding-block: 1rem; }
  .site-nav { gap: 1.25rem; }
  .player-main { padding-block: 1.75rem 2.5rem; }
  .feedback-form { padding: 1rem; }
  .page-heading { margin-bottom: 1.25rem; }
  .radio-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .radio-chips .chip { padding-inline: .5rem; }
  .send-actions .btn { width: 100%; }
  .done { padding: 2rem 1rem; }
  .done .actions .btn { flex: 1 1 100%; }
  .admin-main { padding-block: 1.5rem 2.5rem; }
  .account { justify-content: flex-start; width: 100%; }
  .gate { padding: 1.25rem; }
  .gate .btn { width: 100%; }
  .filters { gap: .75rem; }
  .filter-field { flex-basis: calc(50% - .75rem); }
  .search-field { flex-basis: 100%; }
  .card-actions .btn { flex: 1 1 100%; margin-left: 0; }
  .card { padding: 1rem; }
  .card-title { font-size: 1.2rem; }
  .site-foot { padding-inline: var(--gutter); }
  .site-foot p { line-height: 1.6; }
}

:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
[id], [tabindex="-1"] { scroll-margin-top: 7rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

@media (forced-colors: active) {
  .choice-input:checked + .chip { outline: 2px solid Highlight; outline-offset: -4px; }
  .queue-select[aria-current="true"], .star-button[aria-pressed="true"] { border: 2px solid Highlight; }
}

/* Player flow. All additions below are isolated from the inbox. */
.player {
  --accent-ink: #fff;
  --error: #1c1c1a;
  --error-bg: #efefec;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

.player .brand-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.player .site-head { position: static; }
.player .player-main {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding: 0 0 clamp(2.5rem, 7vh, 4rem);
}

/* One grid: identity and writing share the left edge and column. */
.player .game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: clamp(2rem, 5vw, 5rem);
  row-gap: 1.5rem;
  width: 100%;
  max-width: 88rem;
  margin-inline: auto;
  padding: clamp(2rem, 6vh, 4rem) var(--gutter) 0;
}

.player .hero-text {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  max-width: 38rem;
}
.player .hero-intro { margin-bottom: 1rem; line-height: 1.5; }
.player .game-hero h1 {
  font-size: clamp(1.5rem, .9rem + 2vw, 2.375rem);
  line-height: 1.25;
  letter-spacing: .16em;
  overflow-wrap: anywhere;
}
.player .display .num {
  color: var(--faint);
  letter-spacing: .1em;
  margin-right: .15em;
  white-space: nowrap;
}
.player .title-rule {
  display: block;
  width: 3.5rem;
  height: 1px;
  background: var(--accent);
  margin-top: 1.1rem;
}
.player .hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .85rem;
  margin-top: 1rem;
}
.player .game-hero .kind { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.player .hero-version {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: .2rem .55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .6875rem;
  line-height: 1.4;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.player .game-hero .lede {
  max-width: 42ch;
  margin: .75rem 0 0;
  color: var(--ink-2);
  line-height: 1.8;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.player .hero-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  max-width: 100%;
  margin-top: .35rem;
  color: var(--ink-2);
  font-size: .75rem;
  line-height: 1.5;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.player .hero-link:hover { color: var(--ink); }

.player .hero-plate {
  grid-column: 2;
  grid-row: 1 / 3;
  position: relative;
  min-width: 0;
  height: min(60vh, 36rem);
  margin-top: 7rem;
  isolation: isolate;
  pointer-events: none;
}
.player .hero-plate::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 56%;
  aspect-ratio: 1;
  left: 22%;
  top: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(28 28 26 / .045), transparent 70%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%);
}
.player .plate-parallax,
.player .plate-float {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.player .hero-plate img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(60vh, 36rem);
  object-fit: contain;
  -webkit-mask-image: radial-gradient(115% 105% at 50% 55%, #000 64%, transparent 97%);
  mask-image: radial-gradient(115% 105% at 50% 55%, #000 64%, transparent 97%);
}

/* Missing artwork removes the second column without detaching the form. */
.player .game-hero[data-has-plate="false"]:not([data-hero="general"]),
.player .game-hero[data-hero="unknown"] {
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--page);
}
.player .game-hero[data-has-plate="false"] .hero-plate,
.player .game-hero[data-hero="unknown"] .hero-plate,
.player .game-hero[data-hero="general"] .hero-plate { display: none; }

.player .hero-brand {
  display: none;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  align-items: center;
  flex-direction: column;
  gap: .8rem;
  min-width: 0;
  padding-block: 1rem;
  margin-top: 10rem;
  color: var(--ink);
}
.player .hero-brand .logo {
  width: clamp(3rem, 5vw, 4.5rem);
  height: auto;
  aspect-ratio: 1;
}
.player .lockup-stacked { align-items: center; }
.player .lockup-stacked .lockup-a {
  font-size: clamp(.9375rem, 1.3vw, 1.125rem);
  letter-spacing: .32em;
  margin-left: .32em;
}
.player .lockup-stacked .lockup-b {
  font-size: .5625rem;
  letter-spacing: .5em;
  margin-left: .5em;
  margin-top: .55em;
}
.player .game-hero[data-hero="general"] .hero-brand { display: flex; }
.player .game-hero[data-hero="general"] .num,
.player .game-hero[data-hero="unknown"] .num { display: none; }

.player .feedback-column {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  max-width: 38rem;
  min-width: 0;
  margin: 0;
}
.player .feedback-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.player .feedback-form .field { margin-bottom: 1.5rem; }
.player .feedback-form .note-field { margin-bottom: .35rem; }
.player .note-field .note-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .6rem;
  margin-bottom: .3rem;
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.player .note-field .qualifier { font-size: .6875rem; margin: 0; }
.player .note-field > .help { margin-bottom: .75rem; }
.player .writing-surface {
  position: relative;
  border-bottom: 1px solid var(--line-strong);
}
.player .writing-surface::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
  pointer-events: none;
}
.player .writing-surface:focus-within::after { transform: scaleX(1); }
.player #text {
  min-height: 12.5rem;
  padding: 1rem .25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1.125rem;
  line-height: 1.75;
}
.player textarea[data-autogrow="true"] { resize: none; overflow-y: hidden; }
.player #textCount {
  opacity: 0;
  transition: opacity 180ms ease-out;
}
.player #textCount[data-visible="true"] { opacity: 1; }

.player .sense {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .1rem .65rem;
  margin: 0 0 .75rem;
  color: var(--ink-2);
  font-size: .8125rem;
}
.player .sense .text-button,
.player .followup-head .text-button { font-size: .75rem; }
.player .category-fallback {
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.player .category-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}
.player .category-options label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  font-size: .875rem;
  cursor: pointer;
}
.player .category-options input {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--ink);
}

.player .followups {
  margin: 1rem 0 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.player .followup-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .25rem .75rem;
}
.player .followup-head .eyebrow { line-height: 1.7; }
.player .followup-help { margin: .1rem 0 .75rem; font-size: .8125rem; }
.player .thinking-line {
  display: none;
  height: 1px;
  position: relative;
  overflow: hidden;
  background: var(--line);
  margin: 1rem 0;
}
.player .thinking-line::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 32%;
  background: var(--ink-2);
  animation: player-sweep 1.6s ease-in-out infinite;
}
.player #followups[data-state="thinking"] .thinking-line { display: block; }
.player #followups[data-state="idle"] { display: none; }
.player #followups:not([data-state="ready"]) #followupList { display: none; }
.player .followup + .followup { margin-top: 1.15rem; }
.player .followup label { display: block; }
.player .followup [data-field="q"] {
  display: block;
  margin-bottom: .55rem;
  font-size: .9375rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.player .followup textarea {
  min-height: 5.25rem;
  border-radius: 3px;
  background: transparent;
}
.player #followups[data-state="ready"] .followup {
  animation: player-enter 360ms var(--ease-out) both;
}
.player #followups[data-state="ready"] .followup:nth-child(2) { animation-delay: 90ms; }

.player .rating-field {
  margin-top: 1.5rem;
  border: 0;
  padding-top: 0;
}
.player .rating-field legend { font-size: .9375rem; }
.player .rating-field .help { font-size: .8125rem; }
.player .rating .chip {
  transition: transform 120ms ease-out, background 160ms ease-out,
    border-color 160ms ease-out, color 160ms ease-out;
}
.player .rating .chip:active { transform: scale(.96); }
.player .rating .choice-input:checked + .chip {
  color: #fff;
  background: var(--ink);
  border-color: var(--accent);
  border-width: 2px;
}
.player .rating-caption {
  min-height: 1.5em;
  margin: .35rem 0 0;
  font-size: .75rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.player #email {
  background: transparent;
  border-radius: 3px;
}
.player .send-actions { justify-content: flex-start; margin-top: 1.75rem; }
.player .btn-primary,
.player .btn-primary:hover:not(:disabled),
.player .btn-primary:disabled:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.player .btn-primary:hover:not(:disabled) { box-shadow: inset 0 0 0 1px #fff; }
.player #submit { position: relative; overflow: hidden; }
.player #submit::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 0;
  width: 32%;
  height: 1px;
  background: #fff;
  opacity: 0;
}
.player[data-state="sending"] #submit { opacity: 1; cursor: progress; }
.player[data-state="sending"] #submit::after {
  opacity: .8;
  animation: player-sweep 1.35s ease-in-out infinite;
}
.player .msg[data-tone="success"] { color: var(--ink); }
.player .field-error:not([hidden]) {
  padding-left: .65rem;
  border-left: 2px solid var(--ink);
}
.player input[aria-invalid="true"],
.player textarea[aria-invalid="true"] { border: 2px solid var(--ink); }
.player :focus-visible,
.player .choice-input:focus-visible + .chip {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--accent);
}
.player .choice-input:focus-visible { box-shadow: none; }
.player [id], .player [tabindex="-1"] { scroll-margin-top: 1.5rem; }

.player .done {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  text-align: left;
}
.player .done .actions { justify-content: flex-start; }
.player .done-mark {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 0 1.5rem;
  color: var(--ink);
}
.player .done.is-revealed { animation: player-enter 400ms var(--ease-out) both; }
.player .done.is-revealed .done-mark use {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  animation: player-mark 1.2s ease-out both;
}

/* Nested wrappers keep entrance, float and pointer transforms independent. */
.player .hero-text > * { animation: player-enter 400ms var(--ease-out) both; }
.player .hero-text > :nth-child(2) { animation-delay: 45ms; }
.player .hero-text > :nth-child(3) { animation-delay: 80ms; }
.player .hero-text > :nth-child(4) { animation-delay: 110ms; }
.player .hero-text > :nth-child(5) { animation-delay: 140ms; }
.player .hero-text > :nth-child(6) { animation-delay: 170ms; }
.player .hero-plate,
.player .hero-brand { animation: player-enter 450ms 100ms var(--ease-out) both; }
.player .feedback-column { animation: player-enter 400ms 210ms var(--ease-out) both; }
.player .plate-float { animation: player-float 6s 550ms ease-in-out infinite; }

@keyframes player-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes player-float {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-4px); }
  75% { transform: translateY(4px); }
}
@keyframes player-sweep {
  from { transform: translateX(-110%); }
  to { transform: translateX(420%); }
}
@keyframes player-mark {
  0% { stroke-dashoffset: 1; fill-opacity: 0; stroke-opacity: 1; }
  78% { stroke-dashoffset: 0; fill-opacity: 0; stroke-opacity: 1; }
  100% { stroke-dashoffset: 0; fill-opacity: 1; stroke-opacity: 0; }
}

@media (max-width: 60rem) {
  .player .game-hero,
  .player .game-hero[data-has-plate="false"]:not([data-hero="general"]),
  .player .game-hero[data-hero="unknown"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    padding-block: 1rem 0;
    gap: 1rem;
  }
  .player .hero-plate,
  .player .hero-brand { grid-column: 1; grid-row: 1; margin-top: 0; }
  .player .hero-text { grid-column: 1; grid-row: 2; max-width: none; }
  .player .feedback-column { grid-column: 1; grid-row: 3; max-width: none; }
  .player .hero-plate { height: min(26vh, 14rem); height: min(26svh, 14rem); }
  .player .hero-plate img { max-height: min(26vh, 14rem); max-height: min(26svh, 14rem); }
  .player .hero-brand { padding-block: .5rem; gap: .6rem; }
  .player .hero-brand .logo { width: 3rem; }
  .player .hero-brand .lockup-a { font-size: .9375rem; }
  .player .hero-brand .lockup-b { font-size: .5rem; }
}

@media (max-width: 40rem) {
  .player .site-head .wrap {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .75rem;
    padding-block: .5rem;
  }
  .player .wordmark { gap: .5rem; min-height: 44px; }
  .player .wordmark .logo { width: 1.75rem; height: 1.75rem; }
  .player .wordmark .lockup-a { font-size: .75rem; letter-spacing: .23em; }
  .player .wordmark .lockup-b { font-size: .5rem; }
  .player .site-nav { gap: .85rem; }
  .player .site-nav a { font-size: .625rem; letter-spacing: .12em; }
  .player .game-hero { padding-top: .5rem; gap: .75rem; }
  .player .hero-plate { height: min(23vh, 11.5rem); height: min(23svh, 11.5rem); }
  .player .hero-plate img { max-height: min(23vh, 11.5rem); max-height: min(23svh, 11.5rem); }
  .player .hero-intro { margin-bottom: .5rem; }
  .player .game-hero h1 { font-size: 1.75rem; letter-spacing: .12em; }
  .player .title-rule { margin-top: .7rem; }
  .player .hero-meta { margin-top: .7rem; }
  .player .game-hero .lede { margin-top: .5rem; line-height: 1.65; }
  .player .hero-link { margin-top: 0; }
  .player #text { min-height: 10.5rem; font-size: 1rem; }
  .player .feedback-form .field { margin-bottom: 1.25rem; }
  .player .feedback-form .note-field { margin-bottom: .35rem; }
  .player .site-foot { gap: .8rem; padding-block: 2rem; }
}

/* The hero becomes a strip; its form occupies the next full-width grid row. */
html.embed .player .player-main {
  width: 100%;
  max-width: 36rem;
  padding: 12px;
}
html.embed .player .game-hero,
html.embed .player .game-hero[data-has-plate="false"]:not([data-hero="general"]),
html.embed .player .game-hero[data-hero="unknown"] {
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: .75rem;
  max-width: none;
  padding: .25rem 0 0;
  margin: 0;
}
html.embed .player .game-hero[data-has-plate="false"]:not([data-hero="general"]),
html.embed .player .game-hero[data-hero="unknown"] {
  grid-template-columns: minmax(0, 1fr);
}
html.embed .player .hero-text {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: .3rem .5rem;
  max-width: none;
}
html.embed .player .game-hero[data-has-plate="false"]:not([data-hero="general"]) .hero-text,
html.embed .player .game-hero[data-hero="unknown"] .hero-text { grid-column: 1; }
html.embed .player .game-hero h1 {
  grid-column: 1;
  grid-row: 1;
  max-width: none;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: .06em;
}
html.embed .player .hero-meta { display: contents; }
html.embed .player .game-hero .kind {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: .625rem;
  line-height: 1.5;
  letter-spacing: .12em;
}
html.embed .player .hero-version {
  grid-column: 2;
  grid-row: 1;
  max-width: 8rem;
  font-size: .625rem;
}
html.embed .player .hero-intro,
html.embed .player .game-hero .num,
html.embed .player .title-rule,
html.embed .player .game-hero .lede,
html.embed .player .hero-link { display: none; }

html.embed .player .hero-plate {
  grid-column: 1;
  grid-row: 1;
  width: 56px;
  height: 56px;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--panel);
}
html.embed .player .hero-plate::after { width: 100%; inset: 0; }
html.embed .player .hero-plate img {
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
}
html.embed .player .hero-brand {
  grid-column: 1;
  grid-row: 1;
  width: 56px;
  height: 56px;
  padding: 8px;
  margin: 0;
  border-radius: 50%;
  background: var(--panel);
}
html.embed .player .hero-brand .logo { width: 40px; height: 40px; }
html.embed .player .hero-brand .lockup { display: none; }
html.embed .player .feedback-column {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  max-width: none;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
html.embed .player .feedback-form,
html.embed .player .done {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
html.embed .player .done { padding-block: 1.5rem; }
html.embed .player .plate-float { animation: none; transform: none; }
html.embed .player .plate-parallax { transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  .player *, .player *::before, .player *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .player .plate-parallax, .player .plate-float { transform: none !important; }
  .player .writing-surface:focus-within::after { transform: scaleX(1); }
  .player .rating .chip:active { transform: none; }
  .player .done-mark use { fill-opacity: 1; stroke: none; }
  .player .thinking-line::after { width: 100%; opacity: .4; }
  .player[data-state="sending"] #submit::after { width: 100%; }
}

@media (forced-colors: active) {
  .player .title-rule,
  .player .writing-surface::after,
  .player .thinking-line::after { background: CanvasText; }
  .player .display .num { color: GrayText; }
  .player .rating .choice-input:checked + .chip {
    color: HighlightText;
    background: Highlight;
    border-color: Highlight;
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
  .player .btn-primary,
  .player .btn-primary:hover:not(:disabled),
  .player .btn-primary:disabled:hover {
    color: ButtonText;
    background: ButtonFace;
    border-color: ButtonText;
  }
  .player #submit::after { background: ButtonText; }
  .player :focus-visible,
  .player .choice-input:focus-visible + .chip {
    outline: 2px solid Highlight;
    box-shadow: none;
  }
}
