:root {
  color-scheme: light;
  --paper: #f7edda;
  --paper-deep: #ead8bc;
  --ink: #17233e;
  --ink-soft: #4e5b70;
  --vermilion: #d94d32;
  --cobalt: #2455a5;
  --teal: #16857f;
  --mango: #f2b544;
  --line: rgba(23, 35, 62, .2);
  --white: #fffaf0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--paper); }
body::before { position: fixed; inset: 0; z-index: -1; pointer-events: none; content: ""; opacity: .23; background-image: linear-gradient(45deg, transparent 46%, rgba(36,85,165,.26) 47%, rgba(36,85,165,.26) 52%, transparent 53%), linear-gradient(-45deg, transparent 46%, rgba(217,77,50,.18) 47%, rgba(217,77,50,.18) 52%, transparent 53%); background-size: 34px 34px; mask-image: linear-gradient(to bottom, #000 0%, transparent 72%); }
body::after { position: fixed; inset: 0; z-index: -1; pointer-events: none; content: ""; background: radial-gradient(circle at 78% 8%, rgba(242,181,68,.28), transparent 27rem); }
button, input { font: inherit; }
button { cursor: pointer; border: 0; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
a { color: inherit; }
.shell { position: relative; max-width: 1220px; margin: 0 auto; padding: 24px 28px 48px; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; width: 43px; height: 43px; place-items: center; color: var(--paper); background: var(--vermilion); border: 2px solid var(--ink); border-radius: 50% 50% 50% 8px; font-family: Georgia, serif; font-size: 23px; font-weight: 900; transform: rotate(-8deg); }
.brand-name { display: block; font-family: Georgia, serif; font-size: 22px; letter-spacing: -.04em; }
.eyebrow { margin: 0 0 6px; color: var(--cobalt); font-size: 11px; font-weight: 900; letter-spacing: .16em; line-height: 1.1; text-transform: uppercase; }
.eyebrow-vermilion { color: var(--vermilion); }
.eyebrow-teal { color: var(--teal); }
.eyebrow-cobalt { color: var(--cobalt); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.055em; }
h1 { max-width: 650px; margin: 0 0 18px; font-size: clamp(48px, 7vw, 92px); font-weight: 700; line-height: .91; }
h2 { margin-bottom: 12px; font-size: clamp(28px, 4vw, 42px); line-height: 1; }
.headline-dot { color: var(--vermilion); }
.muted, .section-note, .hero-note { color: var(--ink-soft); }
.small { font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.status::before { width: 8px; height: 8px; content: ""; background: var(--vermilion); border: 1px solid var(--ink); border-radius: 50%; }
.status.online::before, .status.playing::before { background: var(--teal); }
.status.playing { color: var(--teal); }
.guest-deck { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr); gap: 1px; margin-top: 20px; border: 1px solid var(--ink); background: var(--ink); }
.guest-deck-item { min-width: 0; padding: 13px 16px; background: rgba(255,250,240,.86); }
.guest-deck-item .eyebrow { margin-bottom: 5px; }
.guest-deck-item strong, .guest-deck-item span, .guest-deck-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-deck-item strong { font-family: Georgia, serif; font-size: 22px; letter-spacing: -.035em; }
.guest-deck-item span { margin-top: 3px; color: var(--ink-soft); font-size: 12px; }
.guest-deck-item small { margin-top: 7px; color: var(--cobalt); font-size: 11px; font-weight: 800; }
.guest-deck-next { background: var(--teal); color: var(--paper); }
.guest-deck-next .eyebrow, .guest-deck-next span, .guest-deck-next small { color: var(--paper); }
.guest-hero { display: grid; grid-template-columns: minmax(0, .91fr) minmax(360px, 1.09fr); gap: clamp(26px, 6vw, 82px); align-items: center; padding: 48px 0 42px; border-bottom: 2px solid var(--ink); }
.hero-copy { max-width: 610px; }
.hero-intro { max-width: 535px; margin-bottom: 24px; color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); line-height: 1.48; }
.hero-cta { display: inline-flex; align-items: center; justify-content: space-between; min-width: 178px; padding: 13px 16px 13px 18px; color: var(--paper); background: var(--ink); border: 2px solid var(--ink); font-weight: 800; text-decoration: none; }
.hero-cta span { color: var(--mango); font-size: 20px; }
.hero-cta:hover { color: var(--ink); background: var(--mango); }
.hero-rule { display: flex; align-items: center; gap: 7px; width: 184px; margin: 32px 0 13px; }
.hero-rule span { display: block; height: 7px; flex: 1; background: var(--vermilion); transform: skewX(-22deg); }
.hero-rule span:nth-child(2) { background: var(--mango); }
.hero-rule span:nth-child(3) { background: var(--teal); }
.hero-note { margin: 0; font-size: 12px; }
.hero-art-column { min-width: 0; }
.courtyard-stage { position: relative; min-height: 370px; overflow: hidden; isolation: isolate; background: #e7d3b2; border: 2px solid var(--ink); border-radius: 47% 47% 18px 18px; box-shadow: 11px 11px 0 var(--cobalt); touch-action: pan-y; }
.courtyard-stage::before { position: absolute; inset: 12px; z-index: -1; content: ""; border: 1px solid rgba(23,35,62,.3); border-radius: 45% 45% 12px 12px; }
.courtyard-stage::after { position: absolute; right: 12%; bottom: 13%; left: 12%; z-index: -1; height: 2px; content: ""; background: var(--ink); opacity: .32; }
.courtyard-fallback, .courtyard-poster, #courtyard-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.courtyard-poster { z-index: 1; object-fit: cover; opacity: 0; transition: opacity .25s ease; }
.courtyard-poster.is-ready { opacity: 1; }
#courtyard-canvas { z-index: 2; pointer-events: auto; opacity: 0; transition: opacity .25s ease; }
#courtyard-canvas.is-ready { opacity: 1; }
.courtyard-fallback { z-index: 0; overflow: hidden; background: linear-gradient(160deg, #f9db91 0 23%, #e98258 23% 25%, #18877f 25% 26%, #e7d3b2 26% 100%); transition: opacity .25s ease; }
.courtyard-fallback.is-hidden { opacity: 0; }
.fallback-sun { position: absolute; top: 11%; right: 18%; width: 88px; height: 88px; background: var(--mango); border: 2px solid var(--ink); border-radius: 50%; }
.fallback-stage { position: absolute; right: 8%; bottom: 8%; left: 8%; height: 34%; background: repeating-conic-gradient(from 4deg, var(--cobalt) 0 11deg, var(--paper) 11deg 22deg, var(--vermilion) 22deg 33deg, var(--paper) 33deg 44deg); border: 2px solid var(--ink); border-radius: 50%; transform: perspective(240px) rotateX(56deg); }
.fallback-pot { position: absolute; bottom: 30%; left: 46%; width: 55px; height: 60px; background: var(--vermilion); border: 2px solid var(--ink); border-radius: 18px 18px 28px 28px; box-shadow: 0 -35px 0 -15px var(--mango); }
.fallback-dancer { position: absolute; bottom: 37%; width: 24px; height: 74px; background: var(--cobalt); border: 2px solid var(--ink); border-radius: 45% 45% 10px 10px; transform-origin: bottom; }
.fallback-dancer::before { position: absolute; top: -15px; left: 5px; width: 11px; height: 11px; content: ""; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.dancer-one { left: 19%; background: var(--teal); transform: rotate(-19deg); }
.dancer-two { right: 22%; background: var(--vermilion); transform: rotate(21deg); }
.dancer-three { top: 34%; left: 33%; height: 54px; background: var(--mango); transform: rotate(-36deg); }
.art-stamp { position: absolute; right: 20px; bottom: 18px; z-index: 3; color: var(--ink); font-family: Georgia, serif; font-size: 23px; font-weight: 700; line-height: .8; text-align: right; transform: rotate(-7deg); }
.art-stamp span { color: var(--vermilion); font-family: inherit; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.art-controls { display: flex; align-items: center; gap: 14px; min-height: 42px; padding-top: 12px; }
.text-button { padding: 0; color: var(--cobalt); background: none; font-weight: 850; }
.text-button { white-space: nowrap; }
.text-button:hover { color: var(--vermilion); }
.motion-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.motion-toggle input { width: 16px; min-height: 16px; accent-color: var(--teal); }
.scene-status { overflow: hidden; margin-left: auto; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.courtyard-stage.vote-flourish { animation: vote-flourish .55s ease both; }
@keyframes vote-flourish { 20% { box-shadow: 15px 15px 0 var(--vermilion); } 100% { box-shadow: 11px 11px 0 var(--cobalt); } }
.now-playing-strip { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(230px, .55fr); gap: 22px; align-items: center; padding: 19px 0; border-bottom: 1px solid var(--line); }
.strip-label { display: flex; align-items: center; gap: 10px; }
.strip-line { display: block; width: 22px; height: 2px; background: var(--vermilion); }
.now-playing-content h2 { margin: 0 0 4px; font-size: clamp(22px, 3vw, 34px); }
.now-playing-content p { margin-bottom: 0; color: var(--ink-soft); font-size: 13px; }
.notice { margin: 0; padding: 10px 12px; color: var(--ink-soft); background: rgba(255,250,240,.68); border-left: 3px solid var(--mango); font-size: 12px; line-height: 1.45; }
.guest-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 44px; padding: 50px 0 44px; }
.song-section, .queue-section { min-width: 0; }
.queue-section { padding-left: 28px; border-left: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.section-heading h2 { margin-bottom: 4px; }
.section-note { max-width: 640px; margin: 0 0 20px; font-size: 13px; line-height: 1.5; }
.searchline, .requestline, .authline { display: flex; gap: 9px; align-items: center; margin-bottom: 16px; }
.search-field { display: flex; flex: 1; align-items: center; gap: 9px; min-height: 46px; padding: 0 13px; color: var(--cobalt); background: rgba(255,250,240,.8); border: 1px solid var(--line); }
.search-field input { min-height: 40px; padding: 0; border: 0; background: transparent; }
input { width: 100%; min-height: 44px; padding: 0 12px; color: var(--ink); background: rgba(255,250,240,.8); border: 1px solid var(--line); border-radius: 0; outline: 0; }
input::placeholder { color: #7b8491; }
input:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(36,85,165,.12); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.filter { min-height: 32px; padding: 0 12px; color: var(--ink-soft); background: transparent; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; }
.filter.active { color: var(--paper); background: var(--cobalt); border-color: var(--cobalt); }
.track-row { display: flex; min-width: 0; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.track-row:last-child { border-bottom: 0; }
.thumb { flex: 0 0 58px; width: 58px; height: 42px; object-fit: cover; background: var(--paper-deep); border: 1px solid var(--line); }
.track-meta { min-width: 0; flex: 1; }
.track-title { overflow: hidden; margin: 0; color: var(--ink); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.track-artist { overflow: hidden; margin: 3px 0 0; color: var(--ink-soft); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.score { min-width: 34px; color: var(--vermilion); font-family: Georgia, serif; font-size: 21px; font-weight: 800; text-align: center; }
.vote-actions { display: flex; gap: 5px; }
.icon-button, .control-button, .primary-button, .secondary-button { min-height: 43px; border-radius: 0; transition: transform .15s ease, background .15s ease, color .15s ease; }
.icon-button { width: 44px; min-height: 44px; color: var(--ink); background: transparent; border: 1px solid var(--line); font-size: 17px; }
.icon-button.active, .icon-button:hover { color: var(--paper); background: var(--vermilion); border-color: var(--vermilion); }
.primary-button { padding: 0 18px; color: var(--paper); background: var(--vermilion); border: 1px solid var(--vermilion); font-weight: 850; }
.secondary-button, .control-button { padding: 0 15px; color: var(--ink); background: transparent; border: 1px solid var(--line); }
.secondary-button:hover, .control-button:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.control-button.danger { color: var(--vermilion); border-color: rgba(217,77,50,.5); }
button:hover { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .46; transform: none; }
.show-more { width: 100%; margin-top: 13px; }
.empty-state { padding: 28px 8px; color: var(--ink-soft); text-align: center; }
.request-section { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); gap: 28px; align-items: end; padding: 28px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.request-section h2 { margin-bottom: 6px; }
.requestline { margin: 0; }
.requestline label { flex: 1; }
.guest-footer { display: flex; justify-content: space-between; gap: 16px; padding-top: 18px; color: var(--ink-soft); font-size: 11px; letter-spacing: .04em; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 5; max-width: min(360px, calc(100vw - 36px)); padding: 13px 15px; color: var(--paper); background: var(--ink); border-left: 4px solid var(--mango); box-shadow: 8px 8px 0 var(--vermilion); font-size: 13px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Host keeps the same printed-poster language without a second WebGL scene. */
body[data-page="host"] .shell { max-width: 1180px; }
body[data-page="host"] .masthead h1 { max-width: none; margin-bottom: 0; font-size: clamp(36px, 4vw, 48px); line-height: 1; }
body[data-page="host"] .grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 18px; padding-top: 28px; }
body[data-page="host"] .panel { min-width: 0; padding: 20px; background: rgba(255,250,240,.8); border: 1px solid var(--line); }
body[data-page="host"] .panel.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
body[data-page="host"] .panel.current.span-2, body[data-page="host"] .qr-panel { grid-column: span 2; }
body[data-page="host"] .panel.current .eyebrow, body[data-page="host"] .panel.current .muted { color: var(--paper-deep); }
body[data-page="host"] .panel.current h2, body[data-page="host"] .panel.current .track-title { color: var(--paper); }
body[data-page="host"] .panel.current .controls { display: flex; flex-wrap: wrap; gap: 8px; }
body[data-page="host"] .panel.current .control-button { color: var(--paper); background: rgba(255,250,240,.08); border-color: rgba(255,250,240,.58); }
body[data-page="host"] .panel.current .control-button.danger { color: #ffb39f; border-color: #ff8d78; }
body[data-page="host"] .panel.current .control-button:hover { color: var(--ink); background: var(--mango); border-color: var(--mango); }
body[data-page="host"] .panel.current .control-button:focus-visible { outline-color: var(--mango); }
body[data-page="host"] .deck-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: 12px; margin: 10px 0 18px; }
body[data-page="host"] .deck-card { min-width: 0; padding: 16px; background: rgba(255,250,240,.08); border: 1px solid rgba(255,250,240,.28); }
body[data-page="host"] .deck-card h2 { overflow: hidden; margin: 0 0 5px; color: var(--paper); font-size: clamp(26px, 3.3vw, 42px); text-overflow: ellipsis; white-space: nowrap; }
body[data-page="host"] .deck-card .eyebrow { margin-bottom: 8px; color: var(--mango); }
body[data-page="host"] .deck-mode, body[data-page="host"] .deck-time, body[data-page="host"] .deck-score, body[data-page="host"] .deck-reason { margin: 8px 0 0; color: var(--paper-deep); font-size: 12px; }
body[data-page="host"] .deck-score { color: var(--mango); font-family: Georgia, serif; font-size: 24px; font-weight: 800; }
body[data-page="host"] .deck-reason { line-height: 1.4; }
body[data-page="host"] #deck-progress { display: block; width: 100%; height: 8px; margin-top: 15px; accent-color: var(--mango); }
body[data-page="host"] .party-controls { color: var(--paper); }
body[data-page="host"] .party-controls select { min-height: 34px; margin-left: 5px; padding: 0 8px; color: var(--ink); background: var(--paper); border: 1px solid var(--paper-deep); }
body[data-page="host"] .party-control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
body[data-page="host"] .party-control-row + p { margin-bottom: 0; }
body[data-page="host"] .span-2 { grid-column: span 2; }
body[data-page="host"] .player-frame { aspect-ratio: 16/9; margin: 12px 0 16px; overflow: hidden; background: #07101d; border: 1px solid rgba(247,237,218,.2); }
body[data-page="host"] #player { width: 100%; height: 100%; }
body[data-page="host"] .panel.current .notice { color: var(--paper-deep); background: rgba(255,255,255,.08); }
body[data-page="host"] .qr-box { display: flex; align-items: center; gap: 16px; padding: 14px; margin-top: 14px; background: var(--paper-deep); }
body[data-page="host"] .qr-code { flex: 0 0 96px; width: 96px; height: 96px; padding: 5px; background: var(--white); }
body[data-page="host"] .qr-code svg { display: block; width: 100%; height: 100%; }
body[data-page="host"] .curation-row, body[data-page="host"] .request-card { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
body[data-page="host"] .curation-toggle, body[data-page="host"] .offset-field { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
body[data-page="host"] .curation-toggle input { width: 18px; min-height: 18px; }
body[data-page="host"] #smart-dj { display: inline-block; width: 18px; min-height: 18px; padding: 0; margin: 0; vertical-align: middle; }
body[data-page="host"] .offset-field input { width: 78px; min-height: 40px; }
body[data-page="host"] .request-actions { display: flex; gap: 7px; margin-top: 9px; }
body[data-page="host"] .request-card { display: block; }

@media (max-width: 820px) {
  .shell { padding: 20px 16px 40px; }
  .guest-deck { grid-template-columns: 1fr; }
  .guest-hero { grid-template-columns: 1fr; gap: 26px; padding-top: 34px; }
  .hero-art-column { order: initial; }
  .courtyard-stage { min-height: 232px; box-shadow: 7px 7px 0 var(--cobalt); }
  .guest-grid { grid-template-columns: 1fr; gap: 34px; padding-top: 35px; }
  .queue-section { padding: 28px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .now-playing-strip { grid-template-columns: 1fr; gap: 8px; }
  .request-section { grid-template-columns: 1fr; gap: 14px; }
  body[data-page="host"] .grid { grid-template-columns: 1fr; }
  body[data-page="host"] .panel.current.span-2, body[data-page="host"] .qr-panel { grid-column: auto; }
  body[data-page="host"] .deck-grid { grid-template-columns: 1fr; }
  body[data-page="host"] .span-2 { grid-column: auto; }
}
@media (max-width: 560px) {
  h1 { font-size: clamp(43px, 13vw, 62px); }
  .guest-hero { gap: 20px; padding: 26px 0 28px; }
  .hero-intro { margin-bottom: 17px; font-size: 16px; }
  .hero-rule { margin: 21px 0 11px; }
  .masthead { align-items: flex-start; }
  .brand-name { font-size: 20px; }
  .searchline, .requestline { align-items: stretch; flex-direction: column; }
  .searchline .secondary-button, .requestline button { width: 100%; }
  .track-row { gap: 8px; }
  .thumb { flex-basis: 48px; width: 48px; height: 38px; }
  .icon-button { width: 44px; min-height: 44px; }
  .art-controls { flex-wrap: wrap; gap: 9px 13px; }
  .scene-status { flex: 1 0 100%; max-width: none; }
  .guest-footer { flex-direction: column; }
  body[data-page="host"] .curation-row { align-items: flex-start; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .courtyard-stage.vote-flourish { animation: none; }
}

body[data-page="host"] .panel.current { order: -3; }
body[data-page="host"] #mixing-panel { order: -2; }
.manual-stage { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr); gap: 16px; }
.manual-stage.single-deck { grid-template-columns: minmax(200px, 1fr); }
.manual-stage [hidden] { display: none; }
@media (max-width: 700px) { .manual-stage { grid-template-columns: minmax(200px, 1fr); } }
body[data-page="host"] .player-frame { min-height: 200px; min-width: 200px; }
body[data-page="host"] .player-frame iframe { width: 100%; height: 100%; min-height: 200px; min-width: 200px; }
body[data-page="host"] #youtube-panel { order: -2; }
body[data-page="host"] #programming-panel { order: -1; }
.programming-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 16px 0; }
dialog { max-width: min(440px, calc(100vw - 32px)); padding: 24px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); }
dialog::backdrop { background: #111a; }
dialog input { display: block; margin: 12px 0; width: 100%; }
.voter-line { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
#voter-count { display: inline-block; font-size: 24px; font-weight: 800; }
.party-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.party-confetti i { position: absolute; width: 9px; height: 15px; background: var(--vermilion); animation: confetti-fall 1.5s ease-in forwards; }
.party-confetti i:nth-child(3n) { background: var(--cobalt); }
.party-confetti i:nth-child(3n + 1) { background: var(--mango); }
@keyframes confetti-fall { from { transform: translateY(-20px) rotate(0); } to { transform: translateY(100vh) rotate(500deg); opacity: 0; } }
.programming-controls label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.programming-controls input[type="checkbox"] { width: 20px; min-height: 20px; }
.programming-controls button, .plan-moves button { min-width: 44px; min-height: 44px; }
.plan-list { max-height: 620px; overflow-y: auto; overscroll-behavior: contain; margin-top: 14px; }
.plan-row, .history-row { display: flex; justify-content: space-between; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.plan-row > div { min-width: 0; }
.plan-row p { font-size: 13px; margin: 6px 0; overflow-wrap: anywhere; }
.plan-row strong { overflow-wrap: anywhere; }
.plan-moves { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 0 0 260px; }
.plan-moves input { width: 72px; }
.programming-panel details { margin-top: 20px; }
summary { cursor: pointer; min-height: 44px; padding: 12px 0; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
@media (max-width: 560px) {
  body[data-page="host"] .manual-stage { min-width: 0; width: 100%; }
  body[data-page="host"] .player-frame { aspect-ratio: auto; width: 100%; height: 200px; min-width: 200px; }
  .primary-button, .secondary-button, .control-button { min-height: 44px; }
  .shell, .panel, .track-meta, .guest-deck > *, .deck-card { min-width: 0; }
  body[data-page="host"] .panel { padding: 16px; }
  .programming-controls { align-items: stretch; }
  .programming-controls label { flex: 1 1 100%; }
  .programming-controls input, .programming-controls select { max-width: 100%; min-width: 0; }
  .plan-row { flex-direction: column; }
  .plan-moves { flex-basis: auto; }
  .authline { flex-wrap: wrap; }
  .authline input { width: 100%; min-width: 0; }
  .track-row { flex-wrap: wrap; }
  .track-meta { flex: 1 1 120px; }
  .vote-actions { margin-left: auto; }
  .qr-box { flex-wrap: wrap; }
  .masthead .status { max-width: 110px; white-space: normal; }
}
