:root {
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  color: #18333b;
  background: #f5f7f6;
  --ink:#18333b;
  --muted:#526970;
  --line:#d9e3e1;
  --white:#fff;
  --teal:#0b5757;
  --stage:#0e2530;
  --light:#f6fbfa;
  --gold:#efd3a1;
}
* { box-sizing:border-box }
body { margin:0; line-height:1.48 }
.wrap { width:min(1140px,calc(100% - 56px)); margin-inline:auto }
h1,h2,p { margin:0 }
a { color:var(--teal); text-underline-offset:.22em }
.mast { background:var(--white); border-bottom:1px solid var(--line) }
.mast-inner,.top-actions,.title,.round-meta,.dialog-head,.archive-heading {
  display:flex; justify-content:space-between; align-items:center; gap:16px;
}
.mast-inner { min-height:74px }
.brand { display:flex; align-items:center; gap:12px; font-weight:750; color:var(--ink); text-decoration:none }
.brand img { display:block; object-fit:contain }
.top-actions { flex-wrap:wrap; justify-content:flex-end; gap:8px }
#sync { color:var(--muted); font-size:.86rem }
.title { align-items:end; padding:36px 0 26px }
.eyebrow { font-size:.78rem; font-weight:750; color:var(--teal); text-transform:uppercase; letter-spacing:.15em }
.title h1 { font:400 clamp(3.1rem,8vw,6rem)/.98 Georgia,serif; letter-spacing:-.075em; margin:.08em 0 .13em }
#subtitle { color:var(--muted) }
.round-meta { gap:24px; padding-bottom:3px }
.raffle-clock,.count { min-height:55px; display:flex; flex-direction:column; justify-content:center }
.raffle-clock { gap:3px; padding-right:21px; border-right:1px solid var(--line) }
.raffle-clock a,.count span { color:var(--muted); font-size:.86rem }
.raffle-clock iframe { border:0; height:26px; width:130px }
.count strong { font-size:1.35rem; font-variant-numeric:tabular-nums; white-space:nowrap }
.layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); gap:16px; align-items:stretch }
.stage,.entry-panel,.details,.archive { border-radius:16px; min-width:0; overflow:hidden }
.stage { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:23px 21px 16px; background:var(--stage); color:var(--light) }
.wheel-frame { width:min(100%,480px); aspect-ratio:1; position:relative }
.wheel-frame canvas { width:100%; height:100%; display:block }
.pointer { position:absolute; top:0; left:50%; transform:translateX(-50%); width:0; height:0; border-left:9px solid transparent; border-right:9px solid transparent; border-top:23px solid var(--gold) }
.result { color:var(--gold); text-align:center; font-weight:690; font-size:1.08rem; overflow-wrap:anywhere; max-width:100% }
.entry-panel,.archive { background:var(--white); border:1px solid var(--line) }
.entry-panel { display:flex; flex-direction:column }
.entry-head,.controls { padding:16px 19px }
.entry-head h2,.details h2,.archive h2,.dialog-head h2 { font:400 1.55rem/1.1 Georgia,serif; letter-spacing:-.025em }
.entry-head p,.controls p,.archive p { margin-top:5px; color:var(--muted); font-size:.9rem }
.slot-list { max-height:415px; overflow:auto; border-block:1px solid var(--line) }
.slot { display:grid; grid-template-columns:43px 1fr; align-items:center; gap:5px 10px; padding:7px 18px; min-height:35px; border-bottom:1px solid #edf1f0 }
.slot:last-child { border-bottom:0 }
.slot strong { color:var(--teal); font-weight:680; font-variant-numeric:tabular-nums; font-size:.86rem }
.slot span { min-width:0; overflow-wrap:anywhere }
.open-slot { color:var(--muted); font-size:.89rem }
.slot input,.slot textarea,dialog input,#round-number { width:100%; min-width:0; background:var(--white); color:var(--ink); border:1px solid var(--line); border-radius:6px; padding:7px 9px; font:inherit }
.controls p { margin:0 0 8px }
.slot-details { grid-column:2; min-width:0; color:var(--muted); font-size:.84rem }
.slot-details summary { cursor:pointer; color:var(--teal) }
.slot-details label { display:grid; gap:4px; margin:5px 0 }
.slot-details p { overflow-wrap:anywhere }
.slot-details textarea { resize:vertical }
button,.main-button { display:inline-block; font:inherit; font-weight:680; cursor:pointer; border-radius:7px; padding:8px 12px; color:var(--ink); background:var(--white); border:1px solid var(--line); text-decoration:none }
button:hover { border-color:var(--teal) }
button:disabled { opacity:.56; cursor:default }
.main-button { color:white; background:var(--teal); border-color:var(--teal) }
.stage .main-button { background:var(--gold); border-color:var(--gold); color:#162e36 }
.stage button:not(.main-button) { color:var(--light); background:#193642; border-color:#37535b }
button:focus-visible,input:focus-visible,a:focus-visible,textarea:focus-visible,summary:focus-visible { outline:3px solid #458c84; outline-offset:3px }
.details { margin-top:18px; padding:17px; display:grid; grid-template-columns:minmax(145px,190px) minmax(0,1fr); gap:19px; align-items:center; background:var(--stage); color:var(--light); border:1px solid #294854 }
.raffle-art { width:100%; height:auto; border-radius:9px; display:block }
.details h2 { font-weight:650 }
.entry-summary p { margin-top:8px; color:#c7dbdd }
.entry-summary .terms { font-size:.88rem; color:#afc8cc }
.enter { margin-top:11px; background:#ade7d9; border-color:#ade7d9; color:#102e39 }
.prizes { margin:10px 0 0; padding:0; display:flex; flex-wrap:wrap; gap:7px }
.prizes div { display:flex; flex-direction:column-reverse; padding:6px 10px; border:1px solid #3b5661; border-radius:7px }
.prizes dt { color:#d2e4e6; font-size:.84rem }
.prizes dd { margin:0; color:var(--gold); font-size:1rem; font-weight:740 }
.archive { padding:18px 22px; margin:16px 0 32px }
.archive ul,.draw-results { padding:0; margin:8px 0 0; list-style:none; width:100% }
.draw-results:empty,.archive ul:empty { display:none }
.draw-results li,.archive li { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 0; border-top:1px solid var(--line) }
.draw-results li { border-color:#34515a; font-size:.89rem }
.draw-results li span { overflow-wrap:anywhere }
.archive li span { color:var(--muted) }
dialog { width:min(448px,calc(100% - 22px)); color:var(--ink); background:var(--white); border:1px solid var(--line); border-radius:14px; padding:20px }
dialog::backdrop { background:#102832a8 }
dialog form,dialog label,#round-field { display:grid; gap:7px }
dialog form { margin-top:14px; gap:11px }
#round-field { max-width:160px; margin-bottom:10px; font-size:.9rem; font-weight:700 }
#demo-label { margin-bottom:12px; padding:8px 12px; background:#f6ecd7; border-radius:7px; color:#5c441c }
#exit-demo { color:var(--light) }
[hidden] { display:none!important }
@media(max-width:745px) {
  .wrap { width:calc(100% - 30px) }
  .title { padding:24px 0 19px }
  .layout { grid-template-columns:1fr }
  .slot-list { max-height:290px }
}
@media(max-width:550px) {
  .mast-inner { min-height:65px }
  .brand { gap:5px; font-size:.86rem }
  .brand img { width:37px; height:auto }
  .top-actions button { font-size:.8rem; padding:6px 7px }
  .title { flex-direction:column; align-items:start; gap:14px }
  .round-meta { width:100%; justify-content:start }
  .raffle-clock,.count { min-height:43px }
  .stage { padding:12px }
  .details { grid-template-columns:1fr; gap:11px; padding:15px }
  .raffle-art { width:min(100%,180px) }
  .prizes div { padding:5px 7px }
  .archive { padding:15px }
}
#replay-settings{display:grid;gap:8px;padding-top:14px;margin-top:13px;border-top:1px solid var(--line)}
#replay-settings label{font-size:.9rem}
#replay-settings select{display:block;width:100%;font:inherit;color:var(--ink);padding:6px;margin:4px 0;border:1px solid var(--line);border-radius:6px;background:white}
#show-download{width:auto}
#replay-settings button{justify-self:start}
#video-status{font-size:.88rem;text-align:center;color:#d2e4e6}
#video-status a{color:var(--gold)}
