/* Decide pages. Two colours only, both from the tenant theme. State is shown with weight, borders, inversion and words. */
:root { --paper: #ffffff; --ink: #000000; }
* { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.125rem/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
main { max-width: 32rem; margin: 0 auto; padding: 0 16px 48px; }
.brand { margin: 0; padding: 16px 0 8px; font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; }
.bar { position: sticky; top: 0; background: var(--paper); border-bottom: 1px solid var(--ink); padding: 8px 0; display: flex; justify-content: space-between; gap: 16px; font-weight: 700; z-index: 1; }
.bar:empty { display: none; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 24px 0 16px; overflow-wrap: anywhere; }
p { margin: 0 0 16px; overflow-wrap: anywhere; }
.note { border-top: 3px solid var(--ink); padding-top: 12px; font-weight: 700; }
.error { border: 2px solid var(--ink); padding: 12px; margin: 12px 0; font-weight: 700; }
.error:empty { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
label { display: block; font-weight: 700; margin: 24px 0 8px; }
input { display: block; width: 100%; min-height: 52px; padding: 8px 12px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: inherit; -webkit-appearance: none; appearance: none; }
button { display: block; width: 100%; min-height: 52px; margin: 12px 0; padding: 8px 16px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; text-align: center; cursor: pointer; -webkit-appearance: none; appearance: none; }
button[aria-pressed="true"], button.solid { background: var(--ink); color: var(--paper); }
button:disabled { border-style: dashed; cursor: default; font-weight: 400; }
button.solid:disabled { background: var(--paper); color: var(--ink); }
button.plain { width: auto; min-width: 44px; min-height: 44px; margin: 0; border-width: 1px; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
a { color: var(--ink); font-weight: 700; display: inline-block; min-height: 44px; padding-top: 10px; }
.count { text-align: right; font-size: 0.875rem; margin: 4px 0 0; }
ul, ol { list-style: none; margin: 0 0 16px; padding: 0; }
.mine { display: flex; align-items: stretch; gap: 8px; border-top: 1px solid var(--ink); padding: 8px 0; }
.mine span { flex: 1; align-self: center; overflow-wrap: anywhere; }
.card { border: 1px solid var(--ink); margin: 0 0 16px; padding: 12px; }
.card p { margin: 12px 0; }
.card button { margin: 0; }
.file { display: block; width: 100%; max-height: 50vh; object-fit: contain; border: 1px solid var(--ink); background: var(--paper); }
.file.large { max-height: none; height: 100%; border: 0; }
.open { border-width: 1px; padding: 0; min-height: 44px; }
.open .file { border: 0; }
.place { display: inline-block; min-width: 2.25rem; margin-right: 12px; padding: 0 6px; border: 2px solid var(--paper); }
button.pick { text-align: left; font-weight: 400; }
button.pick[aria-pressed="true"] { font-weight: 700; }
.shade { position: fixed; inset: 0; background: var(--paper); display: flex; flex-direction: column; padding: 16px; z-index: 2; }
.shade .stage { flex: 1; min-height: 0; margin-top: 12px; }
.result li { display: flex; gap: 12px; align-items: flex-start; border-top: 1px solid var(--ink); padding: 12px 0; }
.result li.first { border-top: 3px solid var(--ink); font-weight: 700; }
.result .file { width: 64px; height: 64px; flex: none; object-fit: cover; }
.result .rank { min-width: 2rem; font-weight: 700; }
.result .pts { margin-left: auto; white-space: nowrap; }
@media (min-width: 700px) { main { padding-top: 24px; } h1 { font-size: 1.75rem; } }
[hidden] { display: none !important; }
.note:empty { display: none; }
.card.bare { border: 0; padding: 0; } .card.bare .file, .card.bare .open { margin-bottom: 8px; }
.card > p:first-child { margin-top: 0; }

/* Host page. Same two colours; the host is on a laptop, so the column is wider. */
main.wide { max-width: 60rem; }
section.block { border-top: 3px solid var(--ink); margin-top: 24px; padding-top: 12px; }
h2 { font-size: 1.25rem; line-height: 1.25; margin: 0 0 12px; }
textarea { display: block; width: 100%; min-height: 6rem; padding: 8px 12px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: inherit; -webkit-appearance: none; appearance: none; resize: vertical; }
textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
input[type="file"] { min-height: 44px; border-width: 1px; padding: 8px; }
input.short { display: inline-block; width: 6rem; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.tools button { width: auto; margin: 0; }
.tools input { width: auto; flex: 1; min-width: 12rem; }
.tools label { margin: 0; }
.stack { display: flex; flex-direction: column; }
.meta { font-size: 0.875rem; margin: 4px 0; }
.big { font-size: 2rem; font-weight: 700; letter-spacing: 0.1em; margin: 0 0 8px; }
.entry { display: flex; gap: 12px; align-items: flex-start; }
.entry > .body { flex: 1; min-width: 0; }
.thumb .file { width: 96px; height: 96px; max-height: none; object-fit: cover; }
.thumb:empty { display: none; }
.topic { border: 1px solid var(--ink); padding: 12px; margin: 0 0 16px; }
.topic label { margin: 12px 0 4px; }
.topic .times { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.topic .times label { margin: 12px 0 4px; }
.picks li { display: block; border-top: 1px solid var(--ink); padding: 8px 0; }
.hostresult li { display: flex; gap: 12px; border-top: 1px solid var(--ink); padding: 8px 0; align-items: flex-start; }
.hostresult li.first { border-top: 3px solid var(--ink); font-weight: 700; }
.hostresult .file { width: 48px; height: 48px; object-fit: cover; }
.hostresult .pts { margin-left: auto; white-space: nowrap; }

/* Shared screen. Read off a video stream at 1280x720, so nothing is under 28px. Two colours only. */
body.screen { font-size: 32px; line-height: 1.25; overflow: hidden; }
.screen main { max-width: none; height: 100vh; padding: 32px 56px 96px; }
.s-room { font-size: 40px; font-weight: 700; margin: 0 0 24px; }
.s-lobby { display: flex; gap: 64px; align-items: center; justify-content: space-between; }
.s-addr { font-size: 48px; font-weight: 700; margin: 0; }
.s-code { font-size: 160px; line-height: 1; font-weight: 700; letter-spacing: 0.08em; margin: 0 0 24px; }
.s-lobby .qr { width: 340px; flex: none; border: 3px solid var(--ink); background: var(--paper); }
.s-lobby .qr svg { display: block; width: 100%; height: auto; }
.qr rect { fill: var(--paper); }
.qr path { fill: var(--ink); }
.s-names { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
.s-names li { font-size: 40px; font-weight: 700; border: 2px solid var(--ink); padding: 4px 20px; }
.s-count { font-size: 96px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; margin: 0 0 24px; }
.s-prompt { font-size: 64px; line-height: 1.15; font-weight: 700; margin: 0 0 24px; }
.s-line { font-size: 40px; margin: 0 0 16px; }
.s-corner { position: fixed; right: 32px; bottom: 20px; font-size: 28px; font-weight: 700; margin: 0; }
.s-prompt.small { font-size: 48px; margin: 0 0 8px; }
.s-prompt.long { font-size: 40px; }
.s-prompt.small.long { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
.s-foot { display: flex; flex-wrap: wrap; gap: 0 48px; margin: 4px 0 0; }
.s-foot .s-line { font-size: 32px; margin: 0; }
.s-result li { display: flex; gap: 24px; align-items: flex-start; border-top: 1px solid var(--ink); padding: 4px 0; font-size: 32px; line-height: 1.1; }
.s-result li.first { border-top: 3px solid var(--ink); }
.s-result .rank { min-width: 1.5em; font-weight: 700; }
.s-result .file { width: 80px; height: 80px; max-height: none; flex: none; object-fit: cover; }
.s-result .words { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.s-result .clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.s-result .under { display: flex; flex-wrap: wrap; gap: 0 48px; font-size: 28px; line-height: 1.1; }
.s-result .dots { display: block; }
.s-result .tie { font-weight: 700; }
.s-result .dots span { margin-right: 24px; white-space: nowrap; }
.s-result .pts { font-weight: 700; white-space: nowrap; }
.s-result.two { column-count: 2; column-gap: 48px; }
.s-result.two li { break-inside: avoid; font-size: 32px; gap: 16px; }
.s-result.two .file { width: 64px; height: 64px; }
.spot { position: fixed; inset: 0; background: var(--paper); display: flex; flex-direction: column; gap: 24px; padding: 32px 56px; z-index: 3; }
.spot .file { flex: 1; min-height: 0; max-height: none; width: 100%; border: 0; object-fit: contain; }
.spot p { font-size: 56px; line-height: 1.15; font-weight: 700; margin: 0; text-align: center; }

/* The host's run controls stay in view while the entries and editor scroll under them. */
.run { position: sticky; top: 0; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
html:has(main.wide) { scroll-padding-top: 14rem; }
