/* Secret Santa draw screen · Figma mobile frame 390 × 728 */
[hidden] { display: none !important; }
.draw-card[hidden], .recipient-card[hidden], #drawStage[hidden] { display: none !important; }
body:has(#drawStage:not([hidden])) { background: #f5ced2; }
#appContent:has(#drawStage:not([hidden])) { background-color: #f8dadd; background-image: linear-gradient(180deg, #f5ced2 0%, #fef1ef 52%, #f8dadd 100%); }
#appContent:has(#drawStage:not([hidden])) .topbar { background: #801222; border: 0; }
#appContent:has(#drawStage:not([hidden])) .brand { color: #fff8f6; }
#appContent:has(#drawStage:not([hidden])) .profile-button { border: 0; background: transparent; }
#appContent:has(#drawStage:not([hidden])) main { background-color: transparent; background-image: url("snow_dots.png"), linear-gradient(180deg, #f5ced2 0%, #fef1ef 52%, #f8dadd 100%); background-position: center, center; background-size: 220px auto, cover; }
#appContent:has(#drawStage:not([hidden])) .christmas-top-scene { overflow: visible; z-index: 0; }
#appContent:has(#drawStage:not([hidden])) .top-banner { position: absolute; top: -3.6vw; left: 0; width: 100%; max-width: none; height: auto; object-fit: contain; }
#appContent #drawStage:not([hidden]) { display: flex !important; position: relative; z-index: 2; width: 100%; justify-content: center; align-items: center; padding: 18px clamp(18px, 4.3vw, 44px) 25px; }
.draw-card, .recipient-card { width: min(100%, 720px); padding: clamp(22px, 4vw, 40px); border: 1.5px solid #fffaf8; border-radius: 28px; background: #fbedec; box-shadow: 0 9px 15px rgba(122, 14, 26, .19); text-align: center; }
.draw-heading { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.draw-heading > span { color: #8e1222; font-size: 14px; font-weight: 800; letter-spacing: 0; }
.draw-heading h2 { margin: 0; color: #214d25; font: 800 clamp(25px, 4vw, 38px)/1.15 "Segoe UI", Arial, sans-serif; }
.draw-heading p { min-height: 0; margin: 0; color: #534948; font-size: 14px; line-height: 1.3; }
.wheel-wrap { position: relative; width: min(72vw, 310px); aspect-ratio: 1; margin: 12px auto 24px; display: grid; place-items: center; transition: filter .35s, opacity .35s; }
.wheel-wrap.is-locked .draw-wheel { filter: blur(7px) grayscale(.38) brightness(.72); }
.draw-wheel { position: relative; width: 100%; height: 100%; overflow: hidden; border: 9px solid #fff; border-radius: 50%; background: conic-gradient(from -22.5deg, #ec4f65 0deg 45deg, #f7b849 45deg 90deg, #56a980 90deg 135deg, #55a9d3 135deg 180deg, #a774ca 180deg 225deg, #ef7f9b 225deg 270deg, #f1ba56 270deg 315deg, #55a98c 315deg 360deg); box-shadow: 0 8px 24px rgba(35, 48, 91, .22); transition: transform 3.6s cubic-bezier(.12, .74, .12, 1), filter .35s; }
.draw-wheel::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(from -22.5deg, transparent 0deg 43.5deg, rgba(255,255,255,.95) 43.5deg 45deg); }
.wheel-item { position: absolute; z-index: 1; font-size: clamp(21px, 4vw, 31px); transform: translate(-50%, -50%); }
.wheel-center { position: absolute; z-index: 4; left: 50%; top: 50%; width: 27%; aspect-ratio: 1; display: grid; place-items: center; transform: translate(-50%, -50%); border: 5px solid #fff; border-radius: 50%; background: #fff3d9; box-shadow: 0 2px 12px #492c6540; }
.wheel-center img { width: 78%; height: 78%; object-fit: contain; }
.wheel-pointer { position: absolute; z-index: 5; left: 50%; top: -7px; transform: translateX(-50%); width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 29px solid #b52c80; filter: drop-shadow(0 2px 2px #63304f55); }
.wheel-lock { position: absolute; z-index: 6; left: 50%; top: 50%; width: 54px; height: 54px; display: grid; place-items: center; transform: translate(-50%, -50%); border: 1px solid #ffffffc9; border-radius: 50%; background: #ffffffd9; font-size: 24px; box-shadow: 0 3px 12px #4b416244; }
.wheel-lock[hidden] { display: none !important; }
.wheel-names { position: absolute; inset: 0; z-index: 2; border-radius: 50%; pointer-events: none; }
.wheel-name { position: absolute; z-index: 2; overflow: visible; white-space: normal; overflow-wrap: anywhere; word-break: normal; color: #fff; text-align: center; font: 800 9px/1.05 Arial, sans-serif; text-shadow: 0 1px 2px #273045aa; transform: translate(-50%, -50%) rotate(var(--label-angle)); transform-origin: center; }
#drawWheel::after { display: none; }
.spin-button { position: relative; width: min(100%, 460px); min-height: 60px; padding: 0 55px; border: 0; border-radius: 18px; background: linear-gradient(105deg, #c94350 0%, #8f1021 100%); color: #fff8f6; font: 800 18px/1.2 "Segoe UI", Arial, sans-serif; box-shadow: 0 10px 22px rgba(122, 14, 26, .19); transition: filter .2s, transform .2s; }
.spin-button:disabled { filter: none; opacity: 1; box-shadow: 0 10px 22px rgba(122, 14, 26, .19); cursor: not-allowed; }
.spin-button:not(:disabled):hover { transform: translateY(-2px); }
.spin-button span { position: absolute; right: 21px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 400; }
.draw-result { width: min(100%, 460px); margin: 22px auto 0; padding: 20px; border: 1px solid #e9deef; border-radius: 18px; background: #fffaf5; }
.draw-result p { margin: 0; color: #777486; font-size: 13px; }
.draw-result h3 { margin: 5px 0 14px; color: #214d25; font: 800 28px "Segoe UI", Arial, sans-serif; }
.recipient-wishlist { display: grid; gap: 8px; width: min(100%, 460px); margin: auto; }
.recipient-wish { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 18px; border: 1px solid #eee8f1; border-radius: 16px; background: #fff; color: #354238; font-size: 16px; font-weight: 650; text-align: center; overflow-wrap: anywhere; }
.recipient-card { border-color: #f2edf3; background: #fff; box-shadow: 0 9px 20px rgba(78, 44, 76, .12); }
.recipient-card h3 { margin: 10px 0 20px; color: #214d25; font: 800 clamp(24px, 4vw, 34px) "Segoe UI", Arial, sans-serif; }
.draw-footer-snow { display: none; }
@media (max-width: 600px) {
  #appContent:has(#drawStage:not([hidden])) .topbar { flex: 0 0 58px; width: 100%; height: 58px; min-height: 58px; margin: 0; padding: 0 18px; }
  #appContent:has(#drawStage:not([hidden])) .brand { gap: clamp(8px, 4.1vw, 16px); min-width: 0; font-size: clamp(17px, 5.25vw, 20.5px); letter-spacing: -.5px; white-space: nowrap; transform: translateY(-3px); }
  #appContent:has(#drawStage:not([hidden])) .brand-mark { width: 42px; height: 37px; flex: 0 0 42px; background: transparent; border-radius: 0; overflow: visible; }
  #appContent:has(#drawStage:not([hidden])) .profile-button { flex: 0 0 37px; width: 37px; height: 37px; padding: 0; }
  #appContent:has(#drawStage:not([hidden])) .profile-button img { width: 37px; height: 37px; object-fit: contain; }
  #appContent:has(#drawStage:not([hidden])) main { grid-template-rows: minmax(72px, 18dvh) minmax(0, 1fr); background-size: 150px auto, cover; }
  #appContent:has(#drawStage:not([hidden])) .christmas-top-scene { grid-column: 1; grid-row: 1; width: 100%; height: 100%; min-height: 0; margin: 0; align-items: center; }
  #appContent:has(#drawStage:not([hidden])) .top-banner { top: -3.6vw; width: 100%; height: auto; object-fit: contain; }
  #appContent #drawStage:not([hidden]) { grid-column: 1; grid-row: 2; align-items: flex-start; height: 100%; min-height: 0; margin: 0; padding: 4px 16px 0; overflow: hidden; overscroll-behavior: none; touch-action: none; }
  .draw-card, .recipient-card { flex: 0 0 auto; width: min(100%, 358px); max-height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none; padding: 14px 13px 15px; border-radius: clamp(18px, 5.5vw, 24px); }
  .draw-card { height: min(65.5dvh, 100%); min-height: min(65.5dvh, 100%); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
  .draw-heading { gap: 4px; }
  .draw-heading > span { font-size: clamp(.75rem, 3.4vw, .875rem); }
  .draw-heading h2 { margin: 0; font-size: clamp(1.2rem, 6.15vw, 1.5rem); line-height: 1.2; white-space: nowrap; }
  .draw-heading p { margin: 0; font-size: clamp(.75rem, 3.4vw, .84rem); line-height: 1.25; }
  .wheel-wrap { width: min(80vw, 46dvh, 320px); max-width: 100%; margin: 3px auto; }
  .draw-wheel { border-width: 7px; }
  .wheel-name { line-height: 1.05; }
  .spin-button { width: 100%; height: 57px; min-height: 57px; padding: 0 64px; border-radius: 18px; font-size: clamp(.875rem, 4.2vw, 1.025rem); line-height: 1.22; text-align: center; white-space: normal; }
  .spin-button span { right: 25px; font-size: 25px; }
  .draw-result { margin: 10px auto 0; padding: 12px; }
  .draw-result h3 { margin: 4px 0 8px; font-size: 24px; }
  .recipient-card { height: auto; min-height: 0; display: flex; flex-direction: column; gap: 0; }
  .recipient-card .draw-heading { gap: clamp(4px, 1.5vw, 7px); }
  .recipient-card .draw-heading > span { color: #b32c80; font-size: clamp(.75rem, 3.5vw, .875rem); letter-spacing: .16em; text-transform: uppercase; }
  .recipient-card .draw-heading h2 { max-width: 100%; font-size: clamp(1.2rem, 6vw, 1.5rem); line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }
  .recipient-card .draw-heading p { font-size: clamp(.8rem, 3.7vw, .9375rem); line-height: 1.3; }
  .recipient-card h3 { align-self: center; width: 100%; max-width: 100%; margin: clamp(14px, 4vw, 18px) 0 clamp(12px, 3vw, 16px); color: #075541; font-size: clamp(1.2rem, 5.2vw, 1.5rem); line-height: 1.2; text-align: center; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
  .recipient-wishlist { flex: 0 1 auto; align-content: start; min-height: 0; width: 100%; margin: 0 auto; padding: 0 clamp(8px, 3vw, 12px); gap: clamp(6px, 1.8vw, 8px); }
  .recipient-wish { min-width: 0; min-height: clamp(42px, 11.3vw, 48px); padding: clamp(8px, 2.5vw, 11px) clamp(9px, 3.3vw, 13px); border-radius: clamp(12px, 3.8vw, 17px); font-size: clamp(.875rem, 3.9vw, 1rem); line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
  .draw-footer-snow { position: absolute; z-index: 1; left: 0; bottom: -1.8dvh; display: block; width: 100%; height: auto; pointer-events: none; }
  body:has(#drawStage:not([hidden])) .site-credit { bottom: calc(21px + env(safe-area-inset-bottom)); color: #8b4545; font-size: 11px; font-weight: 400; }
}
@media (max-width: 600px) and (max-height: 600px) {
  #appContent:has(#drawStage:not([hidden])) main { grid-template-rows: minmax(56px, 13dvh) minmax(0, 1fr); }
  .draw-card { height: min(65.5dvh, 100%); padding-top: 9px; padding-bottom: 9px; }
  .wheel-wrap { width: min(80vw, 37dvh, 320px); margin: 3px auto; }
  .draw-heading p { font-size: 12px; }
}
