:root {
  color-scheme: light;
  --ink: #24232b;
  --muted: #626571;
  --line: #dde3ea;
  --panel: #fff;
  --page: #f0f7fb;
  --accent: #d9006c;
  --accent-dark: #a50052;
  --accent-soft: #ffedf5;
  --secondary: #006d86;
  --secondary-soft: #e3f4f8;
  --gold: #f2bb31;
  --green: #087b62;
  --shadow: 0 18px 60px rgba(28, 25, 37, 0.16);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--panel); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
button, a { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
button, a, input, textarea { transition: background-color 160ms, border-color 160ms, box-shadow 160ms; }
:focus-visible { outline: 3px solid #84cfdf; outline-offset: 4px; }
button svg, a svg, h2 svg { flex: 0 0 auto; width: 18px; height: 18px; stroke-width: 1.8; }
h1, h2, p { margin-top: 0; }
h1, h2 { color: var(--ink); }
h1 { margin-bottom: 0; font-size: 30px; line-height: 1.2; font-weight: 720; }
h2 { margin-bottom: 0; font-size: 15px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  width: min(1600px, 100%);
  min-height: 100svh;
  margin: 0 auto;
}
.app-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 116px;
  padding: 20px 36px;
  border-bottom: 1px solid var(--line);
  background: #24232b;
  box-shadow: inset 0 -3px var(--accent);
}
.brand-strip, .remote-brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.brand-strip img, .remote-brand img { display: block; flex: 0 0 auto; width: 72px; height: 72px; object-fit: contain; }
.brand-copy { min-width: 0; padding-left: 20px; border-left: 1px solid var(--line); }
.brand-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.app-header h1 { color: #fff; }
.app-header .brand-copy { border-color: #56515e; }
.app-header .brand-copy p { color: #cecbd3; }
.app-header .brand-strip img { padding: 4px; border-radius: 6px; background: #fff; }
.app-header .remote-link { color: #ece8ef; }
.app-header .remote-link:hover { background: #3c3743; }
.app-header .presentation-toggle { color: #fff; background: #3c3743; border-color: #56515e; }
.app-header .presentation-toggle:hover { background: #514452; }
.header-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.remote-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 12px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; border-radius: 6px; }
.remote-link:hover { color: var(--ink); background: var(--page); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--muted); }
.icon-button:hover { background: var(--secondary-soft); color: var(--secondary); border-color: #9ecfdd; }
.presentation-mode .app-header .presentation-toggle { color: #fff; background: var(--accent); border-color: var(--accent); }

.stage { display: flex; flex-direction: column; align-self: start; min-width: 0; height: calc(100svh - 116px); min-height: 660px; padding: 28px 40px 32px; }
.stage-topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.live-label { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; margin: 0; padding: 9px 12px; border-radius: 6px; color: var(--secondary); background: var(--secondary-soft); font-size: 12px; font-weight: 650; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--secondary); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 350px; }
.stats span { padding: 0 18px; border-left: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: center; white-space: nowrap; }
.stats span:first-child { border-left: 0; }
.stats strong { display: block; margin-bottom: 2px; font-size: 23px; font-weight: 700; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats span:nth-child(2) strong { color: var(--green); }
.stats span:nth-child(3) strong { color: var(--accent); }
.draw-area { display: grid; grid-template-columns: minmax(190px, 250px) minmax(0, 1fr); align-items: center; gap: 40px; flex: 1; min-height: 470px; padding: 44px 0; }
.ticket-animation { --ticket-duration: 4.8s; position: relative; width: calc(100% - 24px); max-width: 250px; aspect-ratio: 1 / 1.15; margin: 0 auto; }
.raffle-ticket {
  position: absolute;
  top: 28%;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: stretch;
  width: 100%;
  height: 144px;
  border-radius: 8px;
  box-shadow: 0 12px 18px rgba(45, 26, 47, 0.12);
  mask: radial-gradient(circle at 0 50%, transparent 7px, #000 8px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 7px, #000 8px) right / 51% 100% no-repeat;
  animation-duration: var(--ticket-duration);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.ticket-back { z-index: 1; color: #5e4204; background: #ffd264; transform: translate(-10px, -34px) rotate(-18deg); animation-name: ticket-back-sway; }
.ticket-middle { z-index: 2; color: #fff; background: #008ba3; transform: translate(10px, -12px) rotate(11deg); animation-name: ticket-middle-sway; }
.ticket-front { z-index: 3; color: #fff; background: var(--accent); transform: translate(0, 14px) rotate(-7deg); animation-name: ticket-front-sway; }
.ticket-mark { display: grid; align-items: center; padding: 20px; font-size: 22px; font-weight: 800; }
.ticket-face { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; padding: 16px 20px; gap: 8px; }
.ticket-caption { font-size: 10px; font-weight: 650; line-height: 1.2; text-transform: uppercase; opacity: 0.85; }
#animated-ticket-number { display: -webkit-box; max-width: 100%; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; font-size: 36px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
#animated-ticket-number.is-long-ticket { font-size: 14px; line-height: 1.2; }
.ticket-stub { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 15px; border-left: 2px dashed currentColor; opacity: 0.65; }
.ticket-stub svg { width: 21px; height: 21px; stroke-width: 1.7; }
.ticket-barcode { display: block; width: 20px; height: 42px; background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 5px, transparent 5px 8px); }
.is-drawing .ticket-animation { --ticket-duration: 620ms; }
.is-drawing .primary-action svg { animation: spin 1.8s linear infinite; }
@keyframes ticket-back-sway { 0%, 100% { transform: translate(-10px, -34px) rotate(-18deg); } 50% { transform: translate(-16px, -43px) rotate(-24deg); } }
@keyframes ticket-middle-sway { 0%, 100% { transform: translate(10px, -12px) rotate(11deg); } 50% { transform: translate(17px, -23px) rotate(17deg); } }
@keyframes ticket-front-sway { 0%, 100% { transform: translate(0, 14px) rotate(-7deg); } 50% { transform: translate(8px, -2px) rotate(-2deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

.winner-panel { min-width: 0; }
.current-prize { display: inline-block; max-width: 100%; margin: 0 0 20px; padding: 8px 12px; border: 1px solid #f2b6d0; border-radius: 6px; color: var(--accent-dark); background: var(--accent-soft); font-size: 12px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.winner-name { display: flex; align-items: center; min-height: 168px; font-size: 48px; font-weight: 740; line-height: 1.12; overflow-wrap: anywhere; hyphens: auto; }
.winner-ticket { margin: 18px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.primary-action, .secondary-action, .ghost-button, .row-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; font-size: 13px; font-weight: 650; }
.primary-action { min-width: 210px; min-height: 54px; color: #fff; background: var(--accent); font-size: 16px; box-shadow: 0 6px 16px #d9006c24; }
.primary-action:hover:not(:disabled) { background: var(--accent-dark); box-shadow: 0 8px 22px #d9006c35; }
.primary-action:disabled { opacity: 1; color: #92526e; background: #f2d9e6; box-shadow: none; }
.primary-action svg { width: 20px; height: 20px; }
.secondary-action { min-height: 48px; background: transparent; color: var(--muted); }
.secondary-action:hover:not(:disabled) { color: var(--ink); background: var(--page); }
.ghost-button { color: var(--muted); background: transparent; }
.ghost-button:hover:not(:disabled) { color: var(--secondary); background: var(--secondary-soft); }

.workspace { display: grid; align-content: start; align-self: start; min-width: 0; max-height: calc(100svh - 116px); padding: 8px 28px; border-left: 1px solid var(--line); background: var(--page); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.panel { min-width: 0; padding: 24px 0; border-bottom: 1px solid var(--line); }
.panel:last-child { border-bottom: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; margin-bottom: 16px; }
.panel-header h2 { display: flex; align-items: center; gap: 9px; }
.panel-header h2 svg { color: var(--secondary); }
#prizes-title svg { color: var(--accent); }
#history-title svg { color: #ad7700; }
.sample-button { min-height: 32px; padding: 0 7px; font-size: 11px; }
.sample-button svg { width: 14px; height: 14px; }
.field-label { display: block; margin-bottom: 8px; color: #4d5c6b; font-size: 11px; font-weight: 650; }
textarea, input, select { min-width: 0; width: 100%; border: 1px solid #cad9e4; border-radius: 6px; background: var(--panel); color: var(--ink); font-size: 12px; }
textarea:focus, input:focus { outline: 0; border-color: #348da5; box-shadow: 0 0 0 3px var(--secondary-soft); }
textarea { display: block; min-height: 124px; padding: 11px 12px; resize: vertical; line-height: 1.8; }
textarea::placeholder, input::placeholder { color: #7e8995; opacity: 1; }
input { min-height: 40px; padding: 0 12px; }
.file-importer { margin-bottom: 20px; }
.file-importer input { padding: 0; min-height: 38px; line-height: 36px; font-size: 11px; color: var(--muted); }
input::file-selector-button { min-height: 36px; margin-right: 10px; padding: 0 10px; border: 0; border-right: 1px solid var(--line); background: #e1edf5; color: #425c70; font: inherit; font-weight: 600; cursor: pointer; }
.import-status { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.import-status:empty { display: none; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.row-actions button { min-height: 36px; color: #fff; background: var(--secondary); font-size: 11px; }
.row-actions button:hover:not(:disabled) { background: #005469; }
.row-actions button svg { width: 15px; height: 15px; }
.row-actions .ghost-button, .row-actions .icon-button { background: #fff; color: var(--secondary); border-color: #bfd7e2; }
.row-actions .ghost-button:hover:not(:disabled), .row-actions .icon-button:hover:not(:disabled) { background: var(--secondary-soft); }
.row-actions .icon-button { width: 36px; height: 36px; padding: 0; }
.row-actions .icon-button:last-child { margin-left: auto; }
.import-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; }
.prize-editor { display: flex; align-items: center; gap: 8px; }
.prize-editor input { flex: 1; }
.prize-editor button { background: var(--accent); color: #fff; border-color: var(--accent); }
.prize-editor button:hover { background: var(--accent-dark); }
.empty-state { margin: 18px 0 0; padding: 12px 0; color: #627488; font-size: 12px; line-height: 1.6; }
.compact-list, .history-list { padding: 0; margin: 14px 0 0; list-style: none; }
.compact-list:empty, .history-list:empty { margin: 0; }
.compact-list li, .history-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.compact-list button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 4px; color: #627488; background: transparent; }
.compact-list button svg { width: 15px; height: 15px; }
.compact-list button:hover:not(:disabled) { color: var(--accent); background: var(--accent-soft); }
.prize-actions { display: flex; align-items: center; gap: 4px; }
.prize-actions button { width: 32px; height: 32px; }
.prize-actions button[data-move]:hover:not(:disabled) { color: var(--secondary); background: var(--secondary-soft); }
.history-list li { grid-template-columns: 28px minmax(0, 1fr); align-items: start; }
.history-number { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--secondary); background: var(--secondary-soft); font-size: 11px; font-weight: 700; }
.history-name { margin: 2px 0 0; font-size: 12px; font-weight: 650; }
.history-detail { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.history-list { max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }

.presentation-mode .app-shell { grid-template-columns: minmax(0, 1fr); }
.presentation-mode .workspace { display: none; }
.presentation-mode .stage { padding: 28px 64px 32px; }
.presentation-mode .draw-area { grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: 64px; max-width: 1200px; width: 100%; margin: 0 auto; }
.presentation-mode .ticket-animation { max-width: 300px; }
.presentation-mode .winner-name { min-height: 224px; font-size: 72px; }
.presentation-mode .current-prize { padding: 12px 18px; font-size: 20px; }
.presentation-mode .winner-ticket { font-size: 18px; }

dialog { width: min(860px, calc(100% - 32px)); max-width: none; max-height: calc(100svh - 32px); margin: auto; padding: 0; border: 0; overflow: auto; color: var(--ink); background: transparent; scrollbar-width: thin; }
dialog::backdrop { background: rgba(24, 21, 31, 0.76); backdrop-filter: blur(6px); }
.dialog-logo { display: block; width: 112px; height: 112px; margin: 0 auto 20px; object-fit: contain; }
.dialog-content { position: relative; padding: 36px 48px 44px; border-top: 4px solid var(--accent); border-radius: 8px; text-align: center; background: var(--panel); box-shadow: var(--shadow); }
.dialog-close-button { position: absolute; top: 14px; right: 14px; border: 0; background: var(--page); }
.winner-emblem { display: inline-grid; place-items: center; width: 56px; height: 56px; margin: 0 0 14px; color: #b8830d; background: #fff7da; border-radius: 8px; }
.winner-emblem svg { width: 28px; height: 28px; stroke-width: 1.5; }
.eyebrow { margin: 0 0 12px; color: var(--secondary); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.dialog-content h2 { margin: 0 0 16px; font-size: 52px; line-height: 1.13; font-weight: 740; overflow-wrap: anywhere; }
#dialog-winner-ticket { margin-bottom: 24px; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.dialog-prize { margin: 0; padding: 24px 16px 0; border-top: 1px solid var(--line); color: var(--accent-dark); font-size: 32px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }

.confetti-layer { position: fixed; inset: 0; z-index: 9999; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; display: none; overflow: hidden; pointer-events: none; background: transparent; }
.confetti-layer.is-active { display: block; }
.confetti-piece { position: absolute; top: -24px; border-radius: 2px; opacity: 0.95; animation-name: confetti-fall; animation-timing-function: linear; animation-iteration-count: infinite; animation-fill-mode: both; }
.firework { position: absolute; width: 8px; height: 8px; }
.firework::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #fff8d7; box-shadow: 0 0 28px #eabc48; animation: firework-flash 3.4s ease-out infinite both; animation-delay: var(--firework-delay, 0s); }
.firework-spark { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 10px currentColor; animation: firework-spark 3.4s ease-out infinite both; animation-delay: var(--firework-delay, 0s); }
@keyframes confetti-fall { 0% { transform: translate3d(0, -40px, 0) rotate(0deg); opacity: 0; } 8% { opacity: 0.95; } 100% { transform: translate3d(var(--confetti-drift, 80px), 110vh, 0) rotate(720deg); opacity: 0.95; } }
@keyframes firework-flash { 0%, 34%, 100% { opacity: 0; transform: scale(0.3); } 38% { opacity: 1; transform: scale(1); } 48% { opacity: 0; transform: scale(1.4); } }
@keyframes firework-spark { 0%, 34% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); } 38% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); } 65% { opacity: 0; transform: translate(calc(-50% + var(--spark-x, 70px)), calc(-50% + var(--spark-y, 70px))) scale(0.05); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.05); } }

.remote-body { display: grid; place-items: center; min-height: 100svh; padding: 24px; border-top: 4px solid var(--accent); background: #fff; }
.remote-control { width: min(500px, 100%); padding: 24px 0; text-align: center; }
.remote-brand { justify-content: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); text-align: left; }
.remote-brand .brand-copy .eyebrow { margin: 0 0 6px; color: var(--secondary); font-size: 10px; }
.remote-control h1 { font-size: 28px; }
.remote-draw-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; width: 240px; height: 240px; margin: 56px auto 32px; border: 8px solid #f3b4d0; outline: 1px solid #e5c0d4; outline-offset: 10px; border-radius: 50%; color: #fff; background: var(--accent); box-shadow: 0 12px 24px #d9006c24; font-size: 30px; font-weight: 700; }
.remote-draw-button svg { width: 40px; height: 40px; stroke-width: 1.8; }
.remote-draw-button:hover:not(:disabled) { background: var(--accent-dark); }
.remote-draw-button:active:not(:disabled) { transform: scale(0.97); }
.remote-status { min-height: 40px; margin: 0; padding: 12px 0; color: var(--muted); font-size: 13px; font-weight: 500; }

@media (min-width: 1600px) {
  .app-shell { border-right: 1px solid var(--line); border-left: 1px solid var(--line); }
}
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: minmax(0, 1fr) 340px; }
  .stage { padding-right: 28px; padding-left: 28px; }
  .draw-area { grid-template-columns: minmax(170px, 210px) minmax(0, 1fr); gap: 28px; }
  .winner-name { font-size: 40px; min-height: 150px; }
  .stage-topbar { flex-wrap: wrap; gap: 20px; }
  .stats { width: 300px; }
  .workspace { padding-right: 22px; padding-left: 22px; }
}
@media (min-width: 1025px) and (max-height: 800px) {
  .stage { min-height: 0; padding-top: 20px; padding-bottom: 20px; }
  .draw-area { min-height: 0; padding-top: 24px; padding-bottom: 24px; }
  .ticket-animation { max-width: 210px; }
  .winner-name { min-height: 140px; font-size: 42px; }
  .controls { padding-top: 16px; }
  .presentation-mode .ticket-animation { max-width: 240px; }
  .presentation-mode .winner-name { min-height: 180px; font-size: 60px; }
}
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .stage { height: auto; min-height: 620px; }
  .draw-area { grid-template-columns: 230px minmax(0, 1fr); gap: 48px; min-height: 400px; }
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; max-height: none; padding: 8px 28px; border-top: 1px solid var(--line); border-left: 0; overflow: visible; }
  .participants-panel { grid-row: span 2; border-bottom: 0; }
  .history-list { max-height: 220px; }
  .presentation-mode .draw-area { grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); gap: 36px; }
  .presentation-mode .winner-name { font-size: 52px; }
}
@media (max-width: 640px) {
  .app-header { min-height: 94px; gap: 12px; padding: 16px; }
  .brand-strip, .remote-brand { gap: 12px; }
  .brand-strip img { width: 48px; height: 48px; }
  .brand-copy { padding-left: 12px; }
  h1 { font-size: 22px; }
  .brand-copy p { margin-top: 4px; font-size: 10px; }
  .header-actions { gap: 4px; }
  .remote-link { width: 34px; min-height: 36px; padding: 0; }
  .remote-link span { display: none; }
  .presentation-toggle { width: 34px; height: 36px; }
  .stage, .presentation-mode .stage { min-height: 690px; padding: 24px 20px; }
  .stage-topbar { gap: 24px; }
  .live-label { font-size: 11px; }
  .stats { width: 100%; }
  .stats span { font-size: 10px; padding: 0 8px; }
  .stats strong { font-size: 22px; }
  .draw-area, .presentation-mode .draw-area { display: flex; flex-direction: column; justify-content: center; gap: 24px; min-height: 0; padding: 32px 0; }
  .ticket-animation, .presentation-mode .ticket-animation { width: 200px; flex: 0 0 auto; }
  .raffle-ticket { height: 124px; grid-template-columns: minmax(0, 1fr) 36px; }
  .ticket-face { padding: 12px 16px; gap: 6px; }
  .ticket-mark { padding: 16px; font-size: 18px; }
  #animated-ticket-number { font-size: 32px; }
  #animated-ticket-number.is-long-ticket { font-size: 12px; }
  .ticket-caption { font-size: 9px; }
  .winner-panel { width: 100%; text-align: center; }
  .current-prize, .presentation-mode .current-prize { margin-bottom: 16px; padding: 7px 11px; font-size: 11px; }
  .winner-name, .presentation-mode .winner-name { justify-content: center; min-height: 86px; font-size: 34px; line-height: 1.14; }
  .winner-ticket, .presentation-mode .winner-ticket { margin-top: 12px; font-size: 12px; }
  .controls { gap: 4px; padding-top: 20px; }
  .primary-action { flex: 1 1 100%; min-width: 0; }
  .secondary-action { min-height: 44px; font-size: 12px; }
  .workspace { display: block; padding: 0 20px; }
  .panel, .participants-panel { padding: 24px 0; border-bottom: 1px solid var(--line); }
  .history-list { max-height: none; }
  .dialog-logo { width: 82px; height: 82px; margin-bottom: 14px; }
  .dialog-content { padding: 40px 20px 28px; }
  .dialog-content h2 { font-size: 32px; }
  .dialog-prize { padding-top: 18px; font-size: 25px; }
  #dialog-winner-ticket { font-size: 12px; }
  .winner-emblem { width: 46px; height: 46px; }
  .winner-emblem svg { width: 24px; height: 24px; }
  .dialog-close-button { width: 32px; height: 32px; top: 10px; right: 10px; }
  .remote-body { padding: 20px; }
  .remote-brand img { width: 64px; height: 64px; }
  .remote-control h1 { font-size: 24px; }
  .remote-draw-button { width: 220px; height: 220px; margin-top: 48px; }
}
@media (max-width: 360px) {
  .app-header { padding-right: 12px; padding-left: 12px; gap: 8px; }
  .brand-strip { gap: 8px; }
  .brand-strip img { width: 40px; height: 40px; }
  .brand-copy { padding-left: 8px; }
  h1 { font-size: 20px; }
  .winner-name, .presentation-mode .winner-name { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .raffle-ticket, .is-drawing .primary-action svg { animation: none; }
  .confetti-piece { animation-duration: 12s !important; }
  .firework::before, .firework-spark { animation-duration: 8s; }
}
