:root {
  color-scheme: light;
  --ink: #20193e;
  --muted: #625878;
  --purple: #5625b6;
  --line: #e8e2f1;
  --paper: #f6f4fb;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
.top { background: white; border-bottom: 1px solid var(--line); }
.top-inner, main { width: min(1120px, calc(100% - 40px)); margin: auto; }
.top-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand strong { font-size: 1.16rem; letter-spacing: -.035em; }
.brand-sub { color: var(--muted); border-left: 1px solid var(--line); padding-left: 11px; font-size: .83rem; }
.mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 12px; background: #e5dcff; color: var(--purple); font-size: 23px; }
main { padding: 28px 0 48px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.15rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -.065em; overflow-wrap: anywhere; }
h2 { font-size: 1.32rem; letter-spacing: -.035em; }
.muted { color: var(--muted); }
.card { padding: clamp(20px, 3vw, 32px); background: white; border: 1px solid var(--line); border-radius: 23px; box-shadow: 0 10px 24px #29194708; min-width: 0; }
.narrow { width: min(100%, 520px); margin: clamp(24px, 9vh, 105px) auto 0; }
.narrow h1 { margin: 12px 0; font-size: clamp(2rem, 6vw, 3.15rem); }
.narrow p { margin-bottom: 16px; }
.tag, .pill { font-size: .8rem; font-weight: 750; padding: 5px 11px; border-radius: 99px; display: inline-block; color: #522a98; background: #eee6ff; }
.pill { vertical-align: middle; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab { background: transparent; color: var(--muted); }
.tab[aria-current="page"] { color: var(--purple); background: #ece3ff; }
.hero { background: radial-gradient(ellipse at 98% 0%, #5939a9, transparent 56%), #221744; color: white; padding: clamp(23px, 5vw, 52px); border-radius: 25px; margin: 10px 0 22px; }
.hero h1 { margin-top: 10px; }
.hero p { margin-top: 12px; color: #e1d7f6; }
.control-hero { display: flex; align-items: end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.stack { display: grid; gap: 9px; margin-top: 15px; }
label { font-weight: 660; }
input, textarea, select, button, .button { font: inherit; }
input:not([type="checkbox"]), textarea, select { width: 100%; padding: 11px 12px; background: #fbfaff; border: 1px solid #dcd3ea; color: var(--ink); border-radius: 11px; }
textarea { resize: vertical; }
.check { display: flex; gap: 8px; align-items: start; font-size: .91rem; margin: 7px 0; }
input[type="checkbox"] { accent-color: var(--purple); margin-top: 5px; }
button, .button { display: inline-block; border: 0; text-decoration: none; padding: 10px 15px; border-radius: 11px; cursor: pointer; font-weight: 680; text-align: center; }
button:disabled, select:disabled { opacity: .48; cursor: default; }
button:not(:disabled):hover, .button:hover { filter: brightness(.94); }
:focus-visible { outline: 3px solid #8653ee; outline-offset: 3px; }
.primary { color: white; background: var(--purple); }
.secondary { background: #ece4fb; color: #452185; }
.quiet { color: #5b4088; background: transparent; }
.danger { color: #99224b; background: #ffe8ee; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.wheel-control { display: grid; gap: 13px; }
.result-box { padding: 15px; background: #f2edf9; border-radius: 12px; overflow-wrap: anywhere; }
.list { list-style: none; margin: 12px 0 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 11px 0; overflow-wrap: anywhere; }
.list li:first-child { border-top: 0; }
.list small { color: var(--muted); display: block; }
.people { max-height: 360px; overflow: auto; padding: 0 4px; }
#delete { margin-top: 12px; }
#notice { margin-bottom: 16px; color: #7e1841; background: #ffeaf1; border-radius: 10px; padding: 11px 16px; }
dialog { width: min(440px, calc(100% - 32px)); padding: 22px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); }
dialog::backdrop { background: #160d30a0; }
dialog form { margin: 0 !important; }
body.projector { color: white; background: radial-gradient(ellipse at 85% 0%, #3c247e, transparent 65%), #17122f; }
.projector .top { background: #17122f; border-color: #413565; }
.projector .brand-sub, .projector .quiet { color: #e5d9ff; }
.projector main { padding-top: 14px; }
#projection { text-align: center; }
#fullscreen { display: block; margin-left: auto; }
#screen-title { font-size: clamp(1.75rem, 5vw, 3.35rem); margin: 8px auto 16px; }
.lobby { display: flex; text-align: left; align-items: center; justify-content: center; gap: clamp(24px, 6vw, 72px); padding: 22px 0; }
.lobby h2 { font-size: clamp(1.65rem, 4vw, 3.3rem); margin: 10px 0; line-height: 1.08; }
.lobby a { color: #ded0ff; }
#screen-count { margin-bottom: 8px; font-size: clamp(1.05rem, 3vw, 1.6rem); }
.qr-card { flex: 0 0 auto; border-radius: 20px; background: white; padding: 8px; width: min(39vw, 380px); }
.qr-card img { width: 100%; display: block; }
.wheel-wrap { width: min(58vh, 77vw, 620px); margin: 0 auto; position: relative; }
canvas { display: block; width: 100%; height: auto; }
.pointer { position: absolute; top: 0; left: 50%; transform: translateX(-50%); border: min(2.4vw, 20px) solid transparent; border-top: min(4vw, 35px) solid #fff3ad; filter: drop-shadow(0 3px 4px #1a1235); }
.screen-result { margin: 8px 0 4px; font-size: clamp(1.4rem, 4vw, 2.6rem); font-weight: 800; color: #fff3ad; line-height: 1.15; overflow-wrap: anywhere; }
.entries { color: #d3c8ee; }
@media (max-width: 660px) {
  .columns { grid-template-columns: 1fr; }
  .lobby { flex-direction: column; text-align: center; }
  .qr-card { width: min(70vw, 310px); }
  .brand-sub { display: none; }
}
