:root { --bg: #fffaf2; --ink: #1d1a16; --accent: #e4572e; --muted: #7a7064; --line: #d9cfc2; --good: #2a9d5c; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); }
main { max-width: 28rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
h1 { font-size: 2.25rem; margin: 0 0 .5rem; }
h2 { font-size: 1.4rem; margin: 1.5rem 0 .5rem; }
p { font-size: 1.15rem; line-height: 1.5; color: var(--muted); }
input, button { font: inherit; font-size: 1.4rem; padding: .75rem 1rem; border-radius: .75rem; width: 100%; }
input { border: 2px solid var(--line); background: #fff; }
input.code { text-transform: uppercase; letter-spacing: .3em; text-align: center; }
button { border: 0; background: var(--accent); color: #fff; font-weight: 700; margin-top: .75rem; cursor: pointer; }
button.secondary { background: #fff; color: var(--ink); border: 2px solid var(--line); }
button:disabled { opacity: .5; }
.error { color: var(--accent); min-height: 1.5em; font-weight: 600; }
.warn { color: #9a6700; font-weight: 600; }

/* Cards on the player page */
.card { background: #fff; border: 2px solid var(--line); border-radius: 1rem; padding: 1rem; margin: 1rem 0; }
.card h2 { margin: 0 0 .75rem; }
.placeholder { border: 2px dashed var(--line); border-radius: .75rem; height: 6rem; display: grid; place-content: center; color: var(--muted); margin-bottom: .75rem; }
.halves { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.halves label { font-size: .95rem; color: var(--muted); }
.big { font-size: 2rem; font-weight: 800; color: var(--ink); margin: .25rem 0; }
.perfect { background: var(--good); color: #fff; border-radius: 1rem; padding: 1.25rem; text-align: center; font-size: 1.8rem; font-weight: 800; margin: 1rem 0; }

/* TV */
.tv { max-width: none; height: 100vh; display: grid; place-content: center; text-align: center; }
.tv h1 { font-size: 5rem; }

/* Admin */
.wide { max-width: 64rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row > * { width: auto; }
.pill { display: inline-block; padding: .25rem .75rem; border-radius: 99px; background: #fff; border: 2px solid var(--line); font-weight: 700; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 1rem; }
th, td { padding: .5rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { cursor: pointer; user-select: none; }
td button { font-size: .9rem; padding: .35rem .6rem; margin: 0; width: auto; }
tr.noshow td { color: var(--muted); text-decoration: line-through; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-content: center; padding: 1rem; }
.modal > div { background: #fff; border-radius: 1rem; padding: 1.5rem; text-align: center; width: min(90vw, 32rem); }
.modal img { width: 100%; height: auto; image-rendering: pixelated; }
.modal .code-text { color: var(--ink); font-size: 2rem; letter-spacing: .3em; font-weight: 800; }
