/* ---- platform: accounts, uploads, blind comparison, leaderboard -----------------------------
   Built only from the tokens in style.css: paper and ink, hairlines, serif display type, mono
   figures and the one vermilion accent. Nothing here introduces a new colour. */

/* ---- top bar ---- */
.crumbs a { flex: none; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 2px; margin-right: 6px; }
.site-nav .topbar-link[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.account { position: relative; flex: none; }
.account-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--raised); color: var(--ink-2); font-size: 13.5px;
  transition: border-color 0.2s, color 0.2s;
}
.account-btn:hover, .account-btn[aria-expanded="true"] { border-color: var(--line-2); color: var(--ink); }
.account-btn .i { display: none; width: 18px; height: 18px; }
.account-btn.signed-in { padding-left: 4px; }
.avatar {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--inv); color: var(--inv-ink); font: 600 12px/1 var(--sans);
}
.account-name { max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-btn .dot { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--raised); }

.menu {
  z-index: 60; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--raised); box-shadow: var(--shadow-lg); animation: menu-in 0.18s var(--ease) both;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.account-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 240px; }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-2); font-size: 13.5px; text-align: left; text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--surface-2); color: var(--ink); }
.menu .i { width: 16px; height: 16px; opacity: 0.75; }
.menu .count { margin-left: auto; padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 500 11px/18px var(--mono); }
.menu-nav { display: none; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.menu-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.menu-user > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.menu-user b { font-size: 14px; font-weight: 600; }
.menu-user small { color: var(--muted); font-size: 12px; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 120; max-width: min(520px, calc(100% - 32px));
  padding: 10px 18px; border-radius: 999px; background: var(--inv); color: var(--inv-ink); font-size: 13.5px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity 0.25s, transform 0.3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.has-tray .toast { bottom: 108px; }

/* ---- dialogs ---- */
dialog.sheet {
  width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; overflow: auto;
  border: 1px solid var(--line); border-radius: 16px; background: var(--raised); color: var(--ink); box-shadow: var(--shadow-lg);
}
dialog.sheet[open] { animation: sheet-in 0.28s var(--ease) both; }
dialog.sheet::backdrop { background: rgb(12 12 11 / 42%); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.sheet-in { padding: 22px 24px 24px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-head h2 { font: 600 22px/1.3 var(--serif); letter-spacing: 0.02em; }
.sheet-text { margin: 0 0 20px; color: var(--ink-2); }
.sheet-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 18px; }
.sheet-actions .spacer { flex: 1; }
.btn.full { width: 100%; }
.btn.danger { color: var(--accent); }
.btn.primary.danger { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary.danger:hover { filter: brightness(1.08); }
.btn.ghost.danger:hover { border-color: var(--accent); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; min-width: 0; }
.field-label { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.field-label i { margin-left: 3px; color: var(--accent); font-style: normal; }
.field-label small { margin-left: 8px; color: var(--muted); font-weight: 400; }
.input {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); transition: border-color 0.2s, background-color 0.2s;
}
.input:hover { border-color: var(--ink-2); }
.input:focus { outline: none; border-color: var(--ink); background: var(--raised); }
textarea.input { resize: vertical; min-height: 64px; }
select.input { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(-45deg, transparent 50%, currentColor 50%); background-position: right 17px center, right 13px center; background-size: 4px 4px; background-repeat: no-repeat; }
select.input:disabled { opacity: 0.6; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.field-hint { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.field-hint:empty { display: none; }
.form-error { margin: 0 0 12px; color: var(--accent); font-size: 13px; }
.form-error:empty { display: none; }

dialog.sheet.auth-sheet { width: min(380px, calc(100% - 32px)); }
.auth-reason { margin: 0 0 14px; padding: 10px 12px; border-left: 2px solid var(--accent); background: var(--accent-soft); color: var(--ink-2); font-size: 13px; }
.auth-form .btn.full { margin-top: 4px; min-height: 42px; }
.auth-switch { margin: 14px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.auth-switch button { padding: 0 2px; border: 0; background: none; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---- review status ---- */
.status {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 7px 0 5px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink-2); font: 500 11px/19px var(--sans); white-space: nowrap;
}
.status .i { width: 12px; height: 12px; }
.status-unverified { border-style: dashed; color: var(--muted); }
.status-questioned { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); }

/* ---- reactions ---- */
.reactions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.react, .react-add {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-2); font-size: 12px; line-height: 1; transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}
.react .emoji { font-size: 13px; }
.react .n { font: 500 11px var(--mono); }
.react:hover:not(:disabled), .react-add:hover { border-color: var(--line-2); background: var(--surface-2); }
.react:active:not(:disabled) { transform: scale(0.94); }
.react[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); color: var(--ink); }
.react:disabled { cursor: default; opacity: 0.6; }
.react-add { width: 26px; justify-content: center; padding: 0; color: var(--muted); border-style: dashed; }
.react-add .i { width: 15px; height: 15px; }
.react-picker { position: absolute; display: flex; gap: 2px; padding: 5px; border-radius: 999px; }
.react-picker button { justify-content: center; width: 36px; min-height: 36px; padding: 0; border-radius: 50%; font-size: 18px; }
.react-picker button:hover { transform: scale(1.12); }
.react-picker button[aria-pressed="true"] { background: var(--accent-soft); }

/* ---- page hero for platform pages ---- */
.page-hero { padding-block: 64px 32px; }
.page-hero h1 { font-size: clamp(44px, 5.6vw, 72px); }
.page-hero .hero-foot { margin-top: 28px; padding-top: 24px; }
.stop { color: var(--accent); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.text-link .i { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.text-link:hover .i { transform: translateX(3px); }
.link:disabled { opacity: 0.4; cursor: default; }
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); font-size: 13.5px; }
.notice > .i { width: 18px; height: 18px; color: var(--muted); }
.notice p { flex: 1; min-width: 12em; margin: 0; }

/* ---- home band ---- */
.platform-band { padding-top: 8px; }
.band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.band-item { display: flex; flex-direction: column; gap: 10px; padding: 28px 28px 26px; border-left: 1px solid var(--line); }
.band-item:first-child { padding-left: 0; border-left: 0; }
.band-item:last-child { padding-right: 0; }
.band-item .kicker { margin: 0; }
.band-item h3 { font: 600 22px/1.4 var(--serif); letter-spacing: 0.02em; }
.band-item > p:not(.kicker) { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.band-item .text-link { margin-top: auto; padding-top: 6px; }
.band-leaders { margin: 2px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
.band-leaders li { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.band-leaders .rank { color: var(--muted); font: 12px var(--mono); }
.band-leaders .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band-leaders b { font: 500 14px var(--mono); }

/* ---- task page ---- */
.task-actions { margin-top: 22px; }
.result-group + .result-group { margin-top: 44px; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.group-head h3 { display: flex; align-items: baseline; gap: 8px; font: 600 18px var(--serif); letter-spacing: 0.04em; }
.group-count { color: var(--muted); font: 400 13px var(--mono); }
.group-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.result-group.is-questioned > summary { list-style: none; cursor: pointer; }
.result-group.is-questioned > summary::-webkit-details-marker { display: none; }
.result-group.is-questioned:not([open]) .group-head { margin-bottom: 0; }
.group-toggle { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); font-size: 12.5px; }
.group-toggle .i { width: 15px; height: 15px; transform: rotate(90deg); transition: transform 0.25s var(--ease); }
.result-group[open] .group-toggle .i { transform: rotate(-90deg); }
.result-group[open] .when-closed, .result-group:not([open]) .when-open { display: none; }
.result-group.is-questioned .result-media img { filter: grayscale(1); opacity: 0.72; }
.result-group.is-questioned .result h3 a { color: var(--ink-2); }
.result-model .status { margin-left: 2px; }
.result-by { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.result-reason { display: flex; gap: 6px; margin: 8px 0 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.6; }
.result-reason .i { width: 14px; height: 14px; margin-top: 3px; color: var(--accent); }
.result-foot { flex-wrap: wrap; align-items: center; row-gap: 8px; }
.result-foot .reactions { margin-left: auto; }
.upload-cover { flex-direction: column; gap: 6px; padding: 24px; text-align: center; background: repeating-linear-gradient(135deg, var(--img-bg) 0 14px, var(--surface-2) 14px 15px); }
.upload-cover b { max-width: 16em; color: var(--ink-2); font: 600 20px/1.4 var(--serif); letter-spacing: 0.04em; }
.upload-cover span { color: var(--muted); font-size: 12px; }
.shot-grid .upload-cover b { font-size: 16px; }
.chips a.chip { text-decoration: none; }
.chips .chip[aria-current="page"] { background: var(--inv); border-color: var(--inv); color: var(--inv-ink); }

/* viewer guide */
.guide-state { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--ink-2); font-size: 13px; }
.guide-state .status { margin-top: 2px; }
.guide-reason { margin: 10px 0 0; padding: 8px 12px; border-left: 2px solid var(--accent); background: var(--accent-soft); font-size: 13px; }
.guide-note { margin: 12px 0 0; color: var(--ink-2); font-size: 13px; white-space: pre-wrap; }
.facts { display: grid; gap: 6px; margin: 14px 0 0; font-size: 13px; }
.facts > div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }

/* ---- leaderboard ---- */
.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.board-meta { margin: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.board-wrap { overflow-x: auto; border-top: 1px solid var(--ink); }
table.board { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.board th { padding: 12px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font: 500 11.5px var(--sans); letter-spacing: 0.04em; text-align: right; white-space: nowrap; }
.board td { padding: 14px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); text-align: right; white-space: nowrap; }
.board tbody tr { transition: background-color 0.2s; }
.board tbody tr:hover { background: var(--surface); }
.board .c-rank, .board .c-model { text-align: left; }
.board td.c-rank { width: 3.5em; color: var(--muted); font: 400 15px var(--mono); }
.board tbody tr:nth-child(-n + 3) td.c-rank { color: var(--ink); font: 600 18px var(--serif); }
.board-model { display: flex; align-items: center; gap: 10px; }
.board-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; white-space: normal; }
.board-name b { color: var(--ink); font-size: 14.5px; font-weight: 600; }
.board-name .badge { margin-left: 0; }
.board-name small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.badge.provisional { border-style: dashed; color: var(--muted); }
.board td.c-score b { color: var(--ink); font: 400 20px var(--mono); letter-spacing: -0.02em; }
.board td.c-score small { margin-left: 4px; color: var(--muted); font: 11.5px var(--mono); }
.board .c-range { width: 26%; min-width: 150px; }
.range { position: relative; display: block; height: 18px; }
.range::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.range s { position: absolute; top: 1px; bottom: 1px; width: 0; border-left: 1px dashed var(--line-2); }
.range i { position: absolute; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 28%, transparent); }
.range em { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--ink); }
.is-provisional .range em { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.board td.c-record span { margin: 0 4px; color: var(--line-2); }
.board-unranked { margin: 16px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.board-unranked summary { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); cursor: pointer; list-style: none; }
.board-unranked summary::-webkit-details-marker { display: none; }
.board-unranked summary .i { width: 14px; height: 14px; transform: rotate(90deg); transition: transform 0.25s var(--ease); }
.board-unranked[open] summary .i { transform: rotate(-90deg); }
.board-unranked p { max-width: 60em; margin: 8px 0 0; }
.board-empty { padding: 48px 0 40px; border-top: 1px solid var(--line); text-align: center; }
.board-empty-title { margin: 0 0 6px; font: 600 22px var(--serif); letter-spacing: 0.03em; }
.board-empty p:not(.board-empty-title) { max-width: 34em; margin: 0 auto 20px; color: var(--muted); font-size: 13.5px; }
.board-notes { margin-top: 32px; border-top: 1px solid var(--line); }
.board-notes summary { display: flex; align-items: center; gap: 6px; padding: 16px 0; color: var(--ink-2); font-size: 13.5px; font-weight: 500; list-style: none; cursor: pointer; }
.board-notes summary::-webkit-details-marker { display: none; }
.board-notes summary .i { width: 15px; height: 15px; transform: rotate(90deg); transition: transform 0.25s var(--ease); }
.board-notes[open] summary .i { transform: rotate(-90deg); }
.board-notes dl { display: grid; gap: 10px; max-width: 760px; margin: 0 0 8px; }
.board-notes dl div { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 16px; font-size: 13px; line-height: 1.75; }
.board-notes dt { color: var(--muted); }
.board-notes dd { margin: 0; color: var(--ink-2); }

/* ---- arena lobby ---- */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--line); }
.rules li { padding: 26px 26px 24px; border-left: 1px solid var(--line); }
.rules li:first-child { padding-left: 0; border-left: 0; }
.rules li:last-child { padding-right: 0; }
.rules .num { color: var(--accent); font: 12px var(--mono); }
.rules h3 { margin: 10px 0 8px; font: 600 19px var(--serif); letter-spacing: 0.03em; }
.rules p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.arena-tasks { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.arena-task a {
  display: grid; grid-template-columns: 5em minmax(0, 1fr) auto 7em; align-items: center; gap: 20px;
  padding: 22px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; transition: background-color 0.2s, padding 0.3s var(--ease);
}
.arena-task a[href]:hover { padding-inline: 14px; background: var(--surface); }
.arena-task .num { color: var(--accent); font: 12px var(--mono); }
.arena-task-title { display: flex; flex-direction: column; min-width: 0; }
.arena-task-title b { font: 600 20px/1.4 var(--serif); letter-spacing: 0.02em; }
.arena-task-title small { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.arena-task-meta { color: var(--muted); font: 12px/1.6 var(--mono); text-align: right; }
.arena-task-go { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 13.5px; font-weight: 500; }
.arena-task-go .i { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.arena-task a[href]:hover .arena-task-go .i { transform: translateX(3px); }
.arena-task.is-closed a { cursor: default; opacity: 0.5; }
.arena-login { margin: 18px 0 0; color: var(--muted); font-size: 13px; }

/* ---- arena match ---- */
.arena .vbar { gap: 14px; }
.arena-heading { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.arena-heading b { overflow: hidden; font: 600 15px var(--serif); letter-spacing: 0.03em; text-overflow: ellipsis; white-space: nowrap; }
.arena-heading span { color: var(--muted); font: 11.5px var(--mono); }
.arena-switch { display: none; }
.arena-stage { position: relative; }
.arena-pane { transition: box-shadow 0.3s; }
.arena-head {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px 0 14px;
  background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink);
}
.pane-letter { flex: none; width: 1.1em; font: italic 600 22px/1 var(--serif); }
.arena-who { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; }
.arena-who.revealed { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; color: var(--ink); animation: fade 0.5s ease both; }
.arena-who.revealed b { font-size: 14px; font-weight: 600; }
.arena-who.revealed .badge { margin-left: 0; }
.arena-who.revealed small { flex-basis: 100%; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.arena-state { padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 11px/20px var(--sans); }
.arena-state.is-ready { border-color: var(--line-2); color: var(--ink-2); }
.arena-head .reactions { flex: none; }
.chosen-tag { flex: none; padding: 0 9px; border-radius: 999px; background: var(--accent); color: #fff; font: 500 11px/20px var(--sans); }
.arena-pane.chosen { box-shadow: inset 0 3px 0 var(--accent); }
.arena-pane.chosen .arena-head { box-shadow: inset 0 2px 0 var(--accent); }
.loader.blind::before { display: none; }
.arena-empty { flex: 1; align-self: center; max-width: 560px; margin: 0 auto; padding: 48px 24px; text-align: center; }
.arena-empty h2 { font: 600 28px/1.35 var(--serif); letter-spacing: 0.02em; }
.arena-empty p:not(.kicker) { color: var(--ink-2); }
.arena-empty .kicker { justify-content: center; }
.arena-empty .actions { justify-content: center; margin-top: 24px; }
.arena .stage:has(.arena-empty) { background: var(--bg); }
.arena-prompt-text { margin: 16px 0 0; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); font: 13.5px/1.85 var(--sans); }

.vote-bar { flex: none; border-top: 1px solid var(--line); background: var(--surface); }
.vote-bar:empty { display: none; }
.vote-in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px 20px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.vote-status { margin: 0; color: var(--muted); font-size: 13px; }
.vote-actions { display: flex; align-items: center; gap: 8px; }
.btn.vote { min-width: 132px; min-height: 46px; font-size: 14.5px; }
.btn.vote:not(:disabled):hover { background: var(--inv); border-color: var(--inv); color: var(--inv-ink); }
.btn.vote-tie { min-width: 112px; background: transparent; }
.vote-skip { justify-self: end; color: var(--muted); font-size: 13px; }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--bg); color: var(--ink-2); font: 500 11px/17px var(--mono); text-align: center; }
.btn.vote:not(:disabled):hover kbd { border-color: rgb(255 255 255 / 30%); background: transparent; color: inherit; }
.vote-in.is-result { grid-template-columns: minmax(0, 1fr) auto; }
.vote-verdict { display: flex; flex-direction: column; margin: 0; line-height: 1.5; }
.vote-verdict b { font: 600 18px var(--serif); letter-spacing: 0.03em; }
.vote-verdict span { color: var(--muted); font-size: 13px; }
.vote-in.is-result .btn.primary kbd { border-color: rgb(255 255 255 / 30%); background: transparent; color: inherit; }

/* ---- submit ---- */
.submit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.step { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.step:first-child { border-top-color: var(--ink); }
.step-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 20px; }
.step-head .num { color: var(--accent); font: 13px var(--mono); }
.step-head h2 { font: 600 24px var(--serif); letter-spacing: 0.03em; }
.step-head p { flex-basis: 100%; margin: 0; padding-left: calc(2ch + 14px); color: var(--muted); font-size: 13px; }
.step-head .step-action { margin-left: auto; font-size: 13px; }
.step.is-done .step-head .num::after { content: " ✓"; }
.step.is-locked .step-head { opacity: 0.45; margin-bottom: 8px; }
.step-placeholder { margin: 0; padding-left: calc(2ch + 14px); color: var(--muted); font-size: 13px; }
.step-body > * + * { margin-top: 16px; }
.step-body > .field, .step-body > .field-row .field { margin-bottom: 0; }
.step-body > .field-row { row-gap: 16px; }
.prompt-peek { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.prompt-peek summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--ink-2); font-size: 13px; cursor: pointer; list-style: none; }
.prompt-peek summary::-webkit-details-marker { display: none; }
.prompt-peek summary .i { width: 16px; height: 16px; color: var(--muted); }
.prompt-peek pre { max-height: 320px; margin: 0; padding: 4px 16px 16px; overflow: auto; color: var(--ink-2); font: 13px/1.8 var(--sans); white-space: pre-wrap; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 180px; padding: 28px;
  border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); text-align: center; cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.dropzone > .i { width: 26px; height: 26px; margin-bottom: 4px; color: var(--muted); }
.dropzone b { font-size: 15px; font-weight: 500; }
.dropzone span { color: var(--muted); font-size: 12.5px; }
.dropzone:hover, .dropzone.is-over { border-color: var(--ink-2); background: var(--surface-2); }
.dropzone.is-disabled { cursor: not-allowed; opacity: 0.55; }
.dropzone.is-busy { cursor: progress; }
.progress { display: block; width: min(320px, 80%); height: 3px; margin-bottom: 10px; overflow: hidden; border-radius: 3px; background: var(--line); }
.progress i { display: block; height: 100%; background: var(--ink); transition: width 0.2s; }
.file-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 13.5px; }
.file-line .i { width: 18px; height: 18px; color: var(--muted); }
.file-line span { color: var(--muted); font-size: 12.5px; }
.checks { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.check > .i { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.check span { display: block; min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.check b { display: inline-block; min-width: 5.5em; margin-right: 12px; color: var(--ink); font-weight: 500; }
.check.is-ok > .i { color: var(--ink-2); }
.check.is-warn > .i, .check.is-fail > .i { color: var(--accent); }
.check.is-fail b { color: var(--accent); }
.check.is-info > .i, .check.is-wait > .i { color: var(--muted); }
.check.is-wait span { color: var(--muted); }
.trial { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.trial-bar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-bottom: 1px solid var(--line); }
.trial-bar .seg { padding: 2px; }
.trial-bar .seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; font-size: 12.5px; }
.trial-bar .seg .i { width: 15px; height: 15px; }
.trial-note { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.trial-stage { display: flex; justify-content: center; overflow: hidden; background: #121211; }
.trial-frame { position: relative; flex: none; width: calc(var(--w) * var(--scale, 0.5) * 1px); height: calc(var(--h) * var(--scale, 0.5) * 1px); overflow: hidden; }
.trial-frame iframe { position: absolute; top: 0; left: 0; width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); border: 0; background: #fff; transform: scale(var(--scale, 0.5)); transform-origin: 0 0; }
.confirm { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--raised); font-size: 13.5px; cursor: pointer; }
.confirm input { width: 16px; height: 16px; margin: 3px 0 0; flex: none; accent-color: var(--ink); }
.confirm.is-disabled { cursor: not-allowed; opacity: 0.5; }
.submit-form .confirm { margin: 6px 0 14px; }
.cover-pick { display: flex; align-items: center; gap: 12px; }
.cover-pick img { width: 120px; aspect-ratio: 16 / 10; border-radius: var(--radius-sm); object-fit: cover; opacity: 1; box-shadow: 0 0 0 1px var(--line); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.form-actions .fine { margin: 0; }
.submit-done { padding: 32px 0; border-top: 1px solid var(--ink); }
.submit-done h2 { margin-bottom: 12px; font: 600 30px/1.35 var(--serif); letter-spacing: 0.02em; }
.submit-done p:not(.kicker) { max-width: 36em; color: var(--ink-2); }
.submit-done .actions { margin-top: 24px; }
.submit-aside { position: sticky; top: calc(var(--topbar) + 24px); display: grid; gap: 28px; }
.aside-block h3 { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--muted); font: 500 11.5px var(--mono); letter-spacing: 0.08em; }
.timeline { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.timeline li { position: relative; display: flex; flex-direction: column; padding: 0 0 16px 20px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 20px; bottom: 2px; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li:nth-child(2)::before { background: var(--ink); }
.timeline li:nth-child(3)::before { box-shadow: inset 0 0 0 1.5px var(--accent); }
.timeline b { font-weight: 600; }
.timeline span { color: var(--ink-2); line-height: 1.65; }
.plain { margin: 0; padding-left: 16px; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.plain li + li { margin-top: 6px; }
.plain li::marker { color: var(--line-2); }

/* ---- my works and review ---- */
.work-list { border-top: 1px solid var(--ink); }
.work-row { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.work-thumb { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden; background: var(--img-bg); box-shadow: 0 0 0 1px var(--line); }
.work-thumb img, .work-thumb .img-empty { width: 100%; height: 100%; object-fit: cover; }
.work-thumb .upload-cover { padding: 10px; }
.work-thumb .upload-cover b { font-size: 13px; }
.work-row[data-status="questioned"] .work-thumb img { filter: grayscale(1); opacity: 0.72; }
.review-tabs { display: flex; width: max-content; max-width: 100%; margin-bottom: 22px; }
.review-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 7px; color: var(--ink-2); font-size: 13px; text-decoration: none; }
.review-tabs a:hover { color: var(--ink); }
.review-tabs a[aria-current="page"] { background: var(--raised); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.review-tabs span { color: var(--muted); font: 11px var(--mono); }
.work-main .result-model { margin: 0 0 4px; }
.work-main h3 { font-size: 17px; }
.work-main h3 a { text-decoration: none; }
.work-meta { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.work-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.work-side .actions { flex-wrap: nowrap; align-items: center; }
.reaction-sum { display: flex; gap: 10px; color: var(--ink-2); font-size: 13px; }
.reaction-sum b { margin-left: 3px; font: 500 11.5px var(--mono); }
.audit { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); font-size: 13px; }
.audit li { display: grid; grid-template-columns: 8em 7em 6em minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.audit time { color: var(--muted); font: 12px var(--mono); }
.audit-actor { overflow: hidden; color: var(--ink-2); text-overflow: ellipsis; white-space: nowrap; }
.audit-work { min-width: 0; color: var(--ink-2); }
dialog.review-sheet { width: min(980px, calc(100% - 32px)); }
.review { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; }
.review h4 { margin: 20px 0 8px; color: var(--muted); font: 500 11.5px var(--mono); letter-spacing: 0.08em; }
.review-head { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; }
.review-head h3 { font: 600 19px/1.4 var(--serif); }
.review-head .result-model { gap: 8px; margin: 6px 0 10px; color: var(--muted); }
.review-head .actions { gap: 6px; }
.review-text { margin: 0; color: var(--ink-2); font-size: 13px; white-space: pre-wrap; }
.review-form { padding-left: 32px; border-left: 1px solid var(--line); }
.review-form h4:first-child { margin-top: 0; }
.review-list { display: grid; gap: 6px; margin: 0 0 6px; padding: 0; list-style: none; font-size: 13px; }
.review-list label { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); cursor: pointer; }
.review-list input { margin-top: 4px; accent-color: var(--ink); }
.review-form .fine { margin: 0 0 16px; }
.review-form .sheet-actions { justify-content: flex-start; }

/* ---- responsive ---- */
@media (max-width: 1000px) {
  .has-platform .topbar-github { display: none; }
  .submit-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .submit-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-top: 24px; border-top: 1px solid var(--line); }
  .review { grid-template-columns: 1fr; }
  .review-form { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .site-nav { display: none; }
  .menu-nav { display: block; }
  .account-btn:not(.signed-in) .account-name, .account-btn.signed-in .account-name { display: none; }
  .account-btn:not(.signed-in) { width: 36px; justify-content: center; padding: 0; }
  .account-btn:not(.signed-in) .i { display: block; }
  .account-btn.signed-in { padding: 0 4px; }
  .band { grid-template-columns: 1fr; }
  .band-item { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .band-item:first-child { border-top: 0; }
  .rules { grid-template-columns: 1fr; }
  .rules li { padding: 20px 0; border-left: 0; border-top: 1px solid var(--line); }
  .rules li:first-child { border-top: 0; }
  .arena-task a { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; }
  .arena-task .num { grid-column: 1 / -1; }
  .arena-task-meta { display: none; }
  /* One work at a time; the hidden one keeps running so switching back loses nothing. */
  .arena-switch { display: flex; flex: none; gap: 2px; margin: 8px 12px 0; }
  .arena-switch button { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 8px; }
  .arena-switch i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
  .arena-switch i.is-ready { background: var(--ink); }
  .arena .stage.arena-stage { flex-direction: row; margin-top: 8px; }
  .arena-pane { position: absolute; inset: 0; }
  .arena[data-side="a"] .arena-pane[data-side="b"], .arena[data-side="b"] .arena-pane[data-side="a"] { visibility: hidden; pointer-events: none; }
  .vote-in { grid-template-columns: 1fr; gap: 10px; padding-inline: 12px; }
  .vote-status { text-align: center; }
  .vote-actions { justify-content: center; }
  .btn.vote { flex: 1; min-width: 0; padding: 0 8px; }
  .btn.vote kbd { display: none; }
  .vote-skip { justify-self: center; }
  .vote-in.is-result { grid-template-columns: 1fr; }
  .vote-in.is-result .vote-actions .btn { flex: 1; }
  .arena-head .reactions { display: none; }
  .work-row { grid-template-columns: 120px minmax(0, 1fr); }
  .work-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .audit li { grid-template-columns: 1fr auto; }
  .audit-work { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .sheet-in { padding: 18px 18px 20px; }
  .sheet-head { margin-bottom: 12px; }
  .sheet-head h2 { font-size: 20px; }
  .page-hero { padding-block: 44px 20px; }
  .page-hero h1 { font-size: 44px; }
  .field-row { grid-template-columns: 1fr; }
  .board th, .board td { padding-inline: 6px; }
  .board .c-range, .board .c-record, .board .c-works { display: none; }
  .board td.c-score b { font-size: 17px; }
  .board-model .brand-mark { display: none; }
  .step-head p, .step-placeholder { padding-left: 0; }
  .trial-note { display: none; }
  .trial-bar .seg button { padding: 0 10px; }
  .work-row { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .work-main h3 { font-size: 15.5px; }
  .review-head { grid-template-columns: 1fr; }
  .arena .vtool-text { display: none; }
  .group-head p { flex-basis: 100%; }
}
