@font-face { font-family: Archivo; src: url(/fonts/archivo-latin-standard-normal.woff2) format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: Archivo; src: url(/fonts/archivo-latin-ext-standard-normal.woff2) format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; unicode-range: U+0100-02BA, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --card: #f7f8f5; --shelf: #e3e6e0; --rule: #c3c8bf; --ink: #14130f; --soft: #565a52;
  --red: #c92f13; --gold: #f3b01c; --blue: #1c3fc4; --shell: #23252a;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font: 400 1rem/1.45 Archivo, system-ui, sans-serif; color: var(--ink); background: var(--shelf); min-height: 100dvh; }
h1, h2, h3, .wordmark { line-height: 1.05; font-weight: 800; text-wrap: balance; }
h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { text-wrap: pretty; }
ul, ol { list-style: none; padding: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: left; touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
#picker-body:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.noscript { padding: 2rem; }
.wordmark { font-size: 1.35rem; font-stretch: 125%; font-weight: 900; text-decoration: none; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; }
.stack { display: grid; gap: 1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .5rem 1.2rem; border: 2px solid var(--ink); border-radius: 4px; background: var(--card); font-weight: 700; text-align: center; text-decoration: none; box-shadow: 0 3px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.btn.primary { background: var(--gold); }
.btn.small { min-height: 44px; padding: .25rem .8rem; font-size: .9rem; white-space: nowrap; }
.btn:disabled { color: var(--soft); background: var(--shelf); border-color: var(--rule); box-shadow: none; }
@media (hover: hover) { .btn:hover:not(:disabled) { background: #fff; } .btn.primary:hover:not(:disabled) { background: #ffc645; } }
.link { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--gold); min-height: 44px; }
.icon-btn { width: 44px; height: 44px; font-size: 1.5rem; text-align: center; flex: none; }

label { display: grid; gap: .35rem; font-weight: 700; font-size: .95rem; }
input:not([type=checkbox]) { width: 100%; min-height: 48px; padding: .4rem 0; font-size: 1.1rem; font-weight: 400; background: transparent; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; }
input:not([type=checkbox]):focus { outline: none; border-color: var(--blue); box-shadow: 0 2px 0 var(--blue); }
::placeholder { color: var(--soft); opacity: 1; }
.form-error { color: var(--red); font-weight: 600; }
.form-error:empty { display: none; }

/* cassette */
.cassette { --fill: .3; position: relative; width: 100%; aspect-ratio: 1.58; background: var(--shell); border-radius: 4% / 6%; padding: 5.5% 6% 0; container-type: inline-size; color: var(--ink); box-shadow: 0 1.2em 2em -1.2em rgb(20 19 15 / .5), inset 0 0 0 1px #3d4047; }
.screw { position: absolute; width: 2.6%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(45deg, #8b8f97 44%, #33363c 45% 55%, #8b8f97 56%); }
.screw:nth-child(1) { top: 2%; left: 1.5%; } .screw:nth-child(2) { top: 2%; right: 1.5%; }
.screw:nth-child(3) { bottom: 2%; left: 1.5%; } .screw:nth-child(4) { bottom: 2%; right: 1.5%; }
.cassette-label { height: 73%; background: var(--card); border-radius: 2cqw; overflow: hidden; display: flex; flex-direction: column; }
.cassette-write { display: flex; align-items: center; gap: 2.5cqw; flex: 0 0 34%; margin: 0 4cqw; min-width: 0; }
.cassette-write b { font-size: 6.5cqw; font-weight: 900; line-height: 1; background: var(--ink); color: var(--card); padding: .12em .3em; border-radius: .6cqw; }
.cassette-write span { font-size: 7cqw; font-weight: 700; font-stretch: 85%; line-height: 1.15; border-bottom: 1px solid var(--rule); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cassette-stripes { flex: 1; position: relative; background: linear-gradient(var(--gold) 0 56%, var(--red) 56% 78%, var(--blue) 78%); display: grid; place-items: center; }
.cassette-window { width: 58%; height: 66%; background: var(--shell); border-radius: 99px; display: flex; justify-content: space-between; align-items: center; padding: 0 5cqw; position: relative; }
.cassette-window::before { content: ''; position: absolute; left: 35%; right: 35%; top: 22%; bottom: 22%; background:
  linear-gradient(90deg, #6b3f22 calc((1 - var(--fill)) * 70% + 12%), transparent 0 calc(100% - (var(--fill) * 70% + 4%)), #6b3f22 0); background-color: #4a4d54; border-radius: .6cqw; transition: background .4s; }
.reel { width: 10.5cqw; aspect-ratio: 1; border-radius: 50%; background: var(--card); position: relative; }
.reel svg { display: block; width: 100%; height: 100%; }
.reel path { stroke: var(--shell); stroke-width: 3.4; fill: none; }
.cassette.spin .reel { animation: spin 2.4s var(--ease); }
@keyframes spin { to { transform: rotate(-540deg); } }
.cassette-len { position: absolute; right: 3.5cqw; top: 8%; font-size: 6cqw; font-weight: 900; font-stretch: 62%; line-height: 1; }
.cassette-foot { position: absolute; bottom: 0; left: 17%; right: 17%; height: 15%; background: #2d3036; clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%); display: flex; justify-content: space-between; align-items: center; padding: 0 12%; }
.cassette-foot i { width: 2cqw; aspect-ratio: 1; border-radius: 50%; background: var(--shelf); }

/* landing */
.landing { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1.25rem 4rem; display: grid; gap: 2rem; }
.landing h1 { font-size: clamp(2.8rem, 9.5vw, 5.6rem); font-stretch: 75%; font-weight: 900; line-height: .95; letter-spacing: -.02em; margin: 1.5rem 0 1rem; }
.lede { font-size: 1.15rem; max-width: 34rem; }
.landing-forms { display: grid; gap: 1.25rem; align-content: start; }
.card { background: var(--card); padding: 1.5rem; display: grid; gap: 1rem; border-radius: 4px; border-top: 10px solid var(--gold); }
.card.quiet { border-top-color: var(--blue); }
.card.plain { border-top: 10px solid var(--gold); border-radius: 0; }
.recent ul { margin-top: .75rem; border-top: 2px solid var(--ink); }
.recent a { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.recent strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent a:hover strong { text-decoration: underline; }
.missing { max-width: 34rem; margin: 0 auto; padding: 1.25rem; display: grid; gap: 1.25rem; justify-items: start; }
.missing h1 { font-size: 2.6rem; font-stretch: 75%; margin-top: 12vh; }

/* room */
.room { max-width: 76rem; margin: 0 auto; padding: 0 1rem 7rem; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .9rem 0; }
.sync { margin-left: auto; font-size: .9rem; color: var(--soft); text-align: right; }
.deck { display: grid; gap: .9rem; }
.deck h1 { font-size: 2.2rem; font-stretch: 75%; font-weight: 900; }
.title-btn { font-weight: inherit; line-height: 1.05; overflow-wrap: anywhere; min-height: 44px; }
.title-btn:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.stats { font-weight: 600; margin-top: -.6rem; }
.members { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.member { color: var(--soft); font-weight: 600; display: flex; align-items: center; gap: .4rem; overflow-wrap: anywhere; }
.member::before { content: ''; flex: none; width: .8rem; height: .8rem; border-radius: 50%; border: 3px solid var(--pen); }
.member.here { color: var(--ink); } .member.here::before { background: var(--pen); }
.pen-0 { --pen: #c92f13; } .pen-1 { --pen: #1c3fc4; } .pen-2 { --pen: #0b7a4b; } .pen-3 { --pen: #8a2a91; }
.pen-4 { --pen: #9a5b00; } .pen-5 { --pen: #007286; } .pen-6 { --pen: #b3175f; } .pen-7 { --pen: #4b5563; }
.deck-actions { position: fixed; z-index: 2; inset: auto 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; padding: .75rem 1rem calc(1rem + env(safe-area-inset-bottom)); background: var(--shelf); border-top: 2px solid var(--ink); }
.arrange { display: flex; align-items: center; flex-wrap: wrap; column-gap: 1.1rem; margin-top: 1.25rem; font-size: .95rem; }
.arrange span { color: var(--soft); }
.side { background: var(--card); border-radius: 4px; margin-top: 1rem; overflow: clip; }
.side-head { display: flex; justify-content: space-between; align-items: baseline; padding: .7rem 1rem; background: var(--gold); font-stretch: 125%; font-weight: 900; }
.side + .side .side-head { background: var(--blue); color: #fff; }
.side-head small { font-size: .95rem; font-weight: 600; font-stretch: 100%; }
.track { display: grid; grid-template-columns: 44px 44px minmax(0, 1fr) 44px 40px; align-items: center; column-gap: .4rem; padding: .3rem .25rem .3rem 0; border-bottom: 1px solid var(--rule); position: relative; }
.track:last-child { border-bottom: 0; }
.handle { align-self: stretch; min-height: 48px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--pen); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.handle:active { cursor: grabbing; }
.dragging { opacity: .4; }
.drop-before::before, .drop-after::after { content: ''; position: absolute; inset: -2px 0 auto; height: 4px; background: var(--red); z-index: 1; }
.drop-after::after { inset: auto 0 -2px; }
.cover { width: 44px; height: 44px; border-radius: 2px; object-fit: cover; background: var(--shelf); display: block; flex: none; }
.track-text { display: grid; min-width: 0; padding-left: .3rem; line-height: 1.25; }
.track-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-text strong { font-weight: 650; } .track-text span { color: var(--soft); font-size: .92rem; }
.by-inline { color: var(--pen); font-weight: 650; margin-right: .5em; }
.by { display: none; color: var(--pen); font-size: .88rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time { color: var(--soft); font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.track .time { display: none; }
.love, .remove { height: 44px; text-align: center; }
.love { display: flex; align-items: center; justify-content: center; gap: .15rem; font-size: 1.2rem; }
.love[aria-pressed=true] span { color: var(--red); }
.love small { font-size: .85rem; font-weight: 700; }
.remove { font-size: 1.3rem; color: var(--soft); } .remove:hover { color: var(--red); }
.empty { border: 2px dashed var(--rule); border-radius: 4px; padding: 2.5rem 1.5rem; margin-top: 1.5rem; display: grid; gap: .75rem; }
.empty h2 { font-size: 1.7rem; font-stretch: 75%; } .empty p { max-width: 30rem; }

/* dialogs */
.sheet { border: 0; padding: 0; background: var(--card); color: inherit; width: 100%; max-width: none; height: 92dvh; max-height: none; margin: auto 0 0; border-radius: 10px 10px 0 0; overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; animation: rise .22s var(--ease); }
.sheet.narrow { height: auto; max-height: 92dvh; }
.sheet::backdrop { background: rgb(20 19 15 / .6); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .6rem .6rem 1.25rem; background: var(--gold); flex: none; }
.sheet-head h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.sheet-head #picker-back { margin-left: -.9rem; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; flex: 1; padding: 0 1.25rem 1.5rem; }
.sheet-body.pad { padding-top: 1.5rem; display: grid; gap: 1.25rem; align-content: start; }
.sheet-foot { padding: .75rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); border-top: 2px solid var(--ink); flex: none; }
.sheet-foot .btn { width: 100%; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 2px solid var(--ink); flex: none; }
.tabs button { min-height: 50px; text-align: center; font-weight: 700; color: var(--soft); }
.tabs button[aria-pressed=true] { color: var(--ink); box-shadow: inset 0 -5px 0 var(--blue); }
.tabs :focus-visible { outline-offset: -3px; }
.picker-tools { display: flex; gap: 1rem; align-items: center; padding: .5rem 1.25rem; flex: none; }
.picker-tools .link { white-space: nowrap; }
.group { margin-top: 1.5rem; padding-bottom: .5rem; border-bottom: 2px solid var(--ink); }
.list { display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid var(--rule); padding: .4rem 0; }
.list-open { display: flex; flex: 1; min-width: 0; align-items: center; gap: .4rem; min-height: 52px; }
.list-open:hover:not(:disabled) strong { text-decoration: underline; }
.list.locked .cover { opacity: .5; } .list.locked strong { color: var(--soft); font-weight: 500; }
.list.locked .track-text span { white-space: normal; }
.note { color: var(--soft); margin-top: .9rem; max-width: 36rem; }
.pick { display: grid; grid-template-columns: 28px 44px minmax(0, 1fr) auto; gap: .5rem; align-items: center; font-weight: 400; padding: .35rem 0; min-height: 54px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.pick input { width: 22px; height: 22px; accent-color: var(--blue); }
.pick.taken { cursor: default; } .pick.taken .track-text strong { color: var(--soft); }
.message { padding: 2rem 0; display: grid; gap: 1rem; justify-items: start; max-width: 32rem; }
.pad .message { padding: 0; }
.loading p::after { content: '…'; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
progress { width: 100%; height: 14px; appearance: none; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; background: var(--shelf); }
progress::-webkit-progress-bar { background: var(--shelf); } progress::-webkit-progress-value { background: var(--blue); } progress::-moz-progress-bar { background: var(--blue); }
summary { cursor: pointer; font-weight: 700; padding: .5rem 0; }
.missing-list { max-height: 30dvh; overflow: auto; } .missing-list li { padding: .3rem 0; border-bottom: 1px solid var(--rule); }

.toasts { position: fixed; inset: auto 0 calc(6rem + env(safe-area-inset-bottom)); margin: 0 auto; width: min(28rem, calc(100% - 2rem)); border: 0; padding: 0; background: none; overflow: visible; color: #fff; }
.toasts:not(:popover-open) { display: none; }
.toasts:popover-open { display: grid; gap: .5rem; }
.toast { background: var(--ink); color: #fff; border-radius: 4px; padding: .5rem 1rem; min-height: 48px; display: flex; gap: 1rem; align-items: center; justify-content: space-between; overflow-wrap: anywhere; }

@media (min-width: 46rem) {
  .sheet { width: min(44rem, 92vw); height: min(46rem, 88dvh); margin: auto; border-radius: 6px; }
  .sheet.narrow { width: min(28rem, 92vw); }
  .sheet-foot .btn { width: auto; min-width: 14rem; }
  .track { grid-template-columns: 48px 44px minmax(0, 1fr) minmax(0, 8rem) 3rem 52px 44px; column-gap: .7rem; padding-right: .5rem; }
  .track .time { display: block; } .by { display: block; } .by-inline { display: none; }
}
@media (min-width: 60rem) {
  .landing { grid-template-columns: 1fr 25rem; grid-template-areas: 'copy forms' 'tape forms' 'recent forms'; column-gap: 4rem; padding-top: 2rem; align-items: start; }
  .landing-copy { grid-area: copy; } .landing-tape { grid-area: tape; max-width: 30rem; } .landing-forms { grid-area: forms; padding-top: 3.2rem; } .recent { grid-area: recent; }
  .room { display: grid; grid-template-columns: 21rem minmax(0, 1fr); column-gap: 3rem; padding: 0 2rem 4rem; align-items: start; }
  .topbar { grid-column: 1 / -1; padding: 1.25rem 0; }
  .deck { position: sticky; top: 1.5rem; }
  .deck-actions { position: static; padding: 0; border: 0; grid-template-columns: 1fr; margin-top: .5rem; }
  .arrange, .side:first-child, .empty { margin-top: 0; }
  .toasts { bottom: 2rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
