.draw-main { padding-block: 3rem 5rem; }
.draw-main h1 { font-size: clamp(2.5rem, 7vw, 5rem); margin-block: .3em; }
.draw-main h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.draw-box { background: #fff; border: 1px solid #e5d9cf; padding: clamp(1rem, 4vw, 2rem); margin-block: 1.5rem 2.5rem; border-radius: 12px; }
.draw-box form { display: grid; gap: .65rem; max-width: 32rem; }
.draw-box .button { justify-self: start; cursor: pointer; border: 0; }
.draw-box .button:disabled { opacity: .6; cursor: wait; }
.draw-box input, .draw-box select, .draw-box textarea { width: 100%; padding: .75rem; border: 1px solid #9e8c82; border-radius: 5px; font: inherit; }
.draw-box label { font-weight: 700; }
.prize-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 1rem; }
.prize-tile { border: 1px solid #e5d9cf; border-radius: 10px; overflow: hidden; background: white; margin: 0; }
.prize-tile img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.prize-tile p { margin: 0; padding: 1rem; font-weight: 700; }
.prize-tile .token { display: grid; place-items: center; aspect-ratio: 3 / 2; background: #f2e5dc; color: #8c1d24; font-size: 2rem; font-weight: 700; letter-spacing: .1em; }
#history { overflow-x: auto; }
#history table { width: 100%; border-collapse: collapse; }
#history th, #history td { text-align: left; padding: .6rem; border-bottom: 1px solid #e5d9cf; white-space: nowrap; }
.draw-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(1.5rem, 5vw, 5rem); margin-block: 1.5rem 3rem; }
.draw-layout .draw-box { margin: 0; min-width: 0; }
.wheel-stage { position: relative; width: min(100%, 31rem); margin-inline: auto; padding-top: 10px; container-type: inline-size; }
#wheel { position: relative; aspect-ratio: 1; border: clamp(4px, 1vw, 8px) solid #642129; border-radius: 50%; box-shadow: 0 9px 26px #64212932; }
.wheel-label { position: absolute; width: 24%; text-align: center; font-size: clamp(8px, 3.1cqi, 15px); line-height: 1.12; font-weight: 800; white-space: pre-line; }
.wheel-label:nth-child(odd) { color: #fff9ee; }
.wheel-label:nth-child(even) { color: #4f181e; }
.wheel-pointer { position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%); width: 7%; height: 8%; background: #d1a557; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.wheel-hub { position: absolute; z-index: 1; top: calc(50% + 5px); left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 14%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #d1a557; background: #571a22; color: #ffdf9c; font-size: clamp(18px, 7cqi, 38px); }
@media (max-width: 760px) {
  .draw-main { padding-top: 1.75rem; }
  .draw-layout { grid-template-columns: minmax(0, 1fr); }
  .wheel-stage { width: min(100%, 24rem); }
}

body[data-mode] .header-inner > .brand { flex-shrink: 1; min-width: 0; }
body[data-mode] .brand-logo { max-width: 100%; }
body[data-mode] .header-inner > .menu-toggle { flex-shrink: 0; }
body[data-mode="admin"] .header-inner > a:last-child { white-space: nowrap; }

body[data-mode="public"] { background: #f7f2ea; }
.draw-main > .eyebrow { color: #8c2634; }
.draw-main > h1 { margin-bottom: .45em; letter-spacing: -.035em; }
.draw-layout {
  position: relative;
  isolation: isolate;
  padding: clamp(1.2rem, 4vw, 3.75rem);
  border: 1px solid #64212a;
  border-radius: 1.4rem;
  background: radial-gradient(ellipse at 25% 48%, #832d3d 0, transparent 56%), linear-gradient(135deg, #551e2a, #281118);
  box-shadow: 0 20px 48px #4f181e25;
}
.draw-layout .wheel-stage { width: min(100%, 29rem); }
.draw-layout #wheel {
  border-color: #e1bd79;
  box-shadow: 0 0 0 4px #54202a, 0 0 0 6px #d7ad64, 0 15px 34px #140709a0;
}
.draw-layout .wheel-hub { box-shadow: 0 3px 14px #23101780; }
.draw-layout .draw-box {
  background: #fffaf1;
  border-color: #e8cf9f;
  padding: clamp(1.15rem, 3vw, 2.25rem);
  box-shadow: 0 12px 30px #17070b40;
}
.draw-layout .draw-box h2 { margin: 0 0 .45rem; }
.draw-instructions { margin: 0 0 1.25rem; color: #65534b; }
.draw-layout form { gap: .8rem; }
.draw-layout input { min-width: 0; background: #fff; }
.draw-layout input:focus-visible { outline: 2px solid #8c2634; outline-offset: 2px; }
.draw-layout .button { width: 100%; justify-content: center; border-radius: 5px; }
.draw-layout #status:empty { display: none; }
.draw-prizes { padding-top: 1.25rem; border-top: 1px solid #dac8b8; }
.draw-prizes h2 { margin: 0 0 1rem; }
.draw-prizes .prize-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); }
.draw-prizes .prize-tile { box-shadow: 0 4px 14px #4f181e0e; }
.draw-prizes .prize-tile p { padding: .8rem .9rem; }
.prize-tile .token {
  background: radial-gradient(ellipse at center, #833545, #451824);
  color: #f7dba2;
  font-family: Georgia, serif;
}
@media (max-width: 760px) {
  .draw-layout { gap: 1.75rem; border-radius: 1rem; }
  .draw-layout .wheel-stage { width: min(100%, 22rem); }
}
@media (max-width: 480px) {
  .draw-prizes .prize-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .draw-prizes .prize-tile p { font-size: .85rem; overflow-wrap: anywhere; }
}

#history small { display: block; white-space: normal; }
.history-copy { margin-inline-start: .65rem; cursor: pointer; }
#status a { color: #8c2634; text-decoration: underline; font-weight: 700; }

#prize-dialog {
  width: min(26rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1rem, 4vw, 1.75rem);
  border: 1px solid #d7ad64;
  border-radius: 1rem;
  background: #fffaf1;
  color: #321b20;
  box-shadow: 0 20px 70px #1e0a15aa;
  text-align: center;
}
#prize-dialog::backdrop { background: #240c16ba; }
#prize-dialog h2 { margin: 0 0 .9rem; color: #8c2634; font-size: clamp(1.6rem, 5vw, 2.5rem); }
#prize-dialog-result { max-width: 17rem; margin-inline: auto; }
#prize-save-note { padding: .75rem; margin: 1rem 0; border-radius: .5rem; background: #f4e5cc; font-size: .95rem; }
#prize-dialog form { display: block; padding: 0; margin: 0; background: none; border: 0; }
#prize-dialog .button { cursor: pointer; }

#prize-dialog [hidden] { display: none; }
#prize-close-confirm p { margin: 0 0 .75rem; font-weight: 700; }
#prize-close-confirm .button { margin: .2rem; }
