:root {
  color-scheme: dark;
  --bg: #080d20;
  --panel: rgba(12, 18, 42, 0.78);
  --panel-strong: rgba(12, 18, 42, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(255, 255, 255, 0.24);
  --text: #f9f8ff;
  --muted: #aaaec4;
  --muted-strong: #c9ccda;
  --gold: #ffc868;
  --coral: #ff6f81;
  --mint: #72e1ce;
  --blue: #7395ff;
  --danger: #ff7b88;
  --shadow: 0 30px 80px rgba(2, 4, 15, 0.38);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(5, 9, 24, 0.34), rgba(5, 9, 24, 0.46)),
    url("assets/celebration-background.png") center / cover fixed,
    var(--bg);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background: radial-gradient(circle at 50% 28%, rgba(90, 89, 190, 0.1), transparent 44%);
  pointer-events: none;
}

button,
input,
textarea {
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(114, 225, 206, 0.78);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
}

.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;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.app-shell {
  width: min(1380px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  margin-bottom: 22px;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #1b1831;
  background: linear-gradient(145deg, var(--gold), #ff9c6d);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(255, 154, 104, 0.2);
}

.brand-mark .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.2;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  margin-bottom: 2px;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: var(--muted-strong);
  cursor: pointer;
  background: rgba(10, 15, 35, 0.7);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 140ms var(--ease-out);
}

.icon-button:active,
.primary-small-button:active,
.secondary-button:active,
.text-button:active,
.danger-button:active,
.dialog-primary:active,
.dialog-close:active,
.participant-remove:active {
  transform: scale(0.97);
}

.sound-off-icon {
  display: none;
}

.icon-button[aria-pressed="false"] .sound-on-icon {
  display: none;
}

.icon-button[aria-pressed="false"] .sound-off-icon {
  display: block;
}

.icon-button--danger:not(:disabled) {
  color: #ffabb3;
}

.icon-button:disabled {
  color: rgba(170, 174, 196, 0.35);
  background: rgba(10, 15, 35, 0.4);
  border-color: rgba(255, 255, 255, 0.07);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(390px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
}

.draw-card {
  position: sticky;
  top: 20px;
  min-height: 680px;
  padding: clamp(28px, 4vw, 54px);
  overflow: hidden;
}

.draw-card::before,
.draw-card::after {
  position: absolute;
  z-index: -1;
  content: "";
  border-radius: 999px;
  pointer-events: none;
}

.draw-card::before {
  top: -120px;
  right: -130px;
  width: 360px;
  height: 360px;
  background: rgba(114, 149, 255, 0.12);
  filter: blur(18px);
}

.draw-card::after {
  bottom: -180px;
  left: -80px;
  width: 420px;
  height: 420px;
  background: rgba(255, 111, 129, 0.09);
  filter: blur(22px);
}

.draw-card__header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--mint);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 12px;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.draw-intro {
  max-width: 500px;
  margin-bottom: 0;
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.6;
}

.eligible-pill,
.count-badge {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--border);
}

.eligible-pill {
  padding: 10px 12px;
  color: var(--muted-strong);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.eligible-pill strong {
  color: var(--text);
}

.draw-stage {
  position: relative;
  display: flex;
  min-height: 270px;
  margin: clamp(36px, 6vw, 74px) 0 30px;
  padding: 34px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 200, 104, 0.1), transparent 48%),
    rgba(5, 9, 24, 0.5);
  border: 1px solid var(--border-bright);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 24px 70px rgba(0, 0, 0, 0.22);
  transition:
    border-color 200ms ease,
    box-shadow 240ms ease;
}

.draw-stage.has-winner {
  border-color: rgba(255, 200, 104, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 26px 80px rgba(255, 138, 105, 0.11);
}

.stage-label {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.winner-name {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: clamp(2.1rem, 6.1vw, 5.2rem);
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.06em;
  text-wrap: balance;
  transition:
    opacity 160ms ease,
    filter 180ms ease,
    transform 200ms var(--ease-out);
}

.winner-name.is-cycling {
  opacity: 0.82;
  filter: blur(1.5px);
  transform: scale(0.985);
}

.stage-status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.draw-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  width: 100%;
  min-height: 62px;
  padding: 0 26px;
  overflow: hidden;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: #19152a;
  font-weight: 820;
  cursor: pointer;
  background: linear-gradient(112deg, var(--gold), #ff9e70 50%, var(--coral));
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(255, 126, 106, 0.24);
  transition:
    filter 180ms ease,
    box-shadow 180ms ease,
    transform 140ms var(--ease-out);
}

.draw-button:active:not(:disabled) {
  transform: scale(0.985);
}

.draw-button:disabled {
  color: rgba(223, 223, 231, 0.55);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

.draw-button__shine {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.42) 48%, transparent 74%);
  transform: translateX(-100%);
  transition:
    opacity 160ms ease,
    transform 460ms var(--ease-in-out);
}

.draw-button.is-drawing .draw-button__shine {
  opacity: 1;
  transform: translateX(100%);
}

.draw-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.text-button,
.secondary-button,
.primary-small-button,
.danger-button,
.dialog-primary {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 720;
  cursor: pointer;
  border-radius: 12px;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 140ms var(--ease-out);
}

.text-button {
  min-height: 39px;
  padding: 0 11px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  background: transparent;
  border: 1px solid transparent;
}

.text-button:disabled {
  color: rgba(170, 174, 196, 0.38);
}

.control-column {
  display: grid;
  gap: 22px;
}

.participants-card,
.history-card {
  padding: 25px;
}

.section-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 21px;
}

.section-heading .eyebrow {
  margin-bottom: 6px;
}

.count-badge {
  min-height: 28px;
  padding: 0 9px;
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.055);
  border-radius: 999px;
}

.count-badge--gold {
  color: var(--gold);
  border-color: rgba(255, 200, 104, 0.23);
  background: rgba(255, 200, 104, 0.08);
}

.add-name-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

input,
textarea {
  width: 100%;
  color: var(--text);
  caret-color: var(--mint);
  background: rgba(5, 9, 24, 0.62);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(170, 174, 196, 0.62);
}

input:focus,
textarea:focus {
  background: rgba(5, 9, 24, 0.84);
  border-color: rgba(114, 225, 206, 0.6);
  box-shadow: 0 0 0 4px rgba(114, 225, 206, 0.09);
  outline: none;
}

.add-name-form input {
  min-height: 46px;
  padding: 0 14px;
}

.primary-small-button {
  min-width: 84px;
  padding: 0 15px;
  color: #17142a;
  background: var(--mint);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.duplicate-option {
  display: flex;
  width: fit-content;
  margin: 11px 0 3px;
  gap: 9px;
  align-items: flex-start;
  color: var(--muted-strong);
  cursor: pointer;
}

.duplicate-option input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--mint);
  box-shadow: none;
}

.duplicate-option span,
.duplicate-option strong,
.duplicate-option small {
  display: block;
}

.duplicate-option strong {
  font-size: 0.75rem;
}

.duplicate-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.bulk-entry {
  margin: 12px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.bulk-entry summary {
  width: fit-content;
  margin-bottom: 12px;
  color: var(--muted-strong);
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 160ms ease;
}

.bulk-entry__content {
  padding: 2px 0 16px;
}

.bulk-entry__content label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.bulk-entry textarea {
  min-height: 94px;
  padding: 11px 12px;
  resize: vertical;
}

.secondary-button,
.danger-button,
.dialog-primary {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--border);
}

.secondary-button {
  margin-top: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  margin-bottom: 12px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field .icon {
  position: absolute;
  left: 12px;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.search-field input {
  min-height: 42px;
  padding: 0 13px 0 37px;
  font-size: 0.82rem;
}

.participant-list-wrap {
  position: relative;
  min-height: 176px;
}

.participant-list,
.winner-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.participant-list {
  display: grid;
  max-height: 290px;
  gap: 7px;
  padding-right: 3px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.participant-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 48px;
  padding: 6px 7px 6px 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 13px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease,
    transform 180ms var(--ease-out);
}

.participant-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--muted-strong);
  font-size: 0.69rem;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.065);
  border-radius: 9px;
}

.participant-name {
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 690;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-remove {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 9px;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    transform 140ms var(--ease-out);
}

.participant-remove .icon {
  width: 15px;
  height: 15px;
}

.empty-state {
  display: flex;
  min-height: 176px;
  padding: 18px;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 16px;
}

.empty-state[hidden] {
  display: none;
}

.empty-state strong {
  color: var(--muted-strong);
  font-size: 0.86rem;
}

.empty-state span:last-child {
  max-width: 240px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.empty-state__icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 3px;
  place-items: center;
  color: var(--mint);
  background: rgba(114, 225, 206, 0.09);
  border: 1px solid rgba(114, 225, 206, 0.17);
  border-radius: 13px;
}

.empty-state--compact {
  min-height: 104px;
}

.empty-state__icon--gold {
  color: var(--gold);
  background: rgba(255, 200, 104, 0.08);
  border-color: rgba(255, 200, 104, 0.17);
}

.winner-list {
  display: grid;
  max-height: 250px;
  gap: 8px;
  overflow: auto;
}

.winner-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  min-height: 55px;
  padding: 8px 11px 8px 8px;
  align-items: center;
  background: linear-gradient(110deg, rgba(255, 200, 104, 0.1), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 200, 104, 0.17);
  border-radius: 14px;
}

.winner-rank {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #21172a;
  font-size: 0.77rem;
  font-weight: 850;
  background: linear-gradient(145deg, var(--gold), #ff9a6d);
  border-radius: 11px;
}

.winner-meta {
  min-width: 0;
}

.winner-meta strong,
.winner-meta time {
  display: block;
}

.winner-meta strong {
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-meta time {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.winner-item .icon {
  color: var(--gold);
}

.footer-note {
  padding: 22px 8px 0;
  color: rgba(201, 204, 218, 0.72);
  font-size: 0.73rem;
  text-align: center;
}

dialog {
  color: var(--text);
}

dialog::backdrop {
  background: rgba(3, 5, 16, 0.7);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.winner-dialog,
.confirm-dialog {
  position: fixed;
  width: min(500px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 38px;
  overflow: hidden auto;
  text-align: center;
  background: var(--panel-strong);
  border: 1px solid var(--border-bright);
  border-radius: 28px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.56);
  opacity: 1;
  transform: scale(1) translateY(0);
  transition:
    display 220ms allow-discrete,
    overlay 220ms allow-discrete,
    opacity 180ms ease,
    transform 220ms var(--ease-out);
}

.winner-dialog:not([open]),
.confirm-dialog:not([open]) {
  opacity: 0;
  transform: scale(0.97) translateY(8px);
}

@starting-style {
  .winner-dialog[open],
  .confirm-dialog[open] {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
}

.winner-dialog.is-instant,
.confirm-dialog.is-instant {
  transition-duration: 0ms;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    transform 140ms var(--ease-out);
}

.winner-dialog__glow {
  position: absolute;
  top: -160px;
  left: 50%;
  z-index: -1;
  width: 440px;
  height: 330px;
  background: radial-gradient(circle, rgba(255, 200, 104, 0.22), transparent 68%);
  transform: translateX(-50%);
  pointer-events: none;
}

.winner-dialog__icon,
.confirm-dialog__icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 3px auto 22px;
  place-items: center;
  color: #1d1830;
  background: linear-gradient(145deg, var(--gold), #ff956d);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(255, 151, 109, 0.22);
}

.winner-dialog__icon .icon,
.confirm-dialog__icon .icon {
  width: 27px;
  height: 27px;
}

.winner-dialog h2,
.confirm-dialog h2 {
  margin-bottom: 13px;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.05em;
}

.winner-dialog__name {
  margin: 0 0 14px;
  overflow-wrap: anywhere;
  color: var(--gold);
  font-size: clamp(2rem, 8vw, 3.8rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.055em;
}

.winner-dialog__name.is-long {
  font-size: clamp(1.65rem, 5vw, 2.8rem);
  line-height: 1.05;
}

.winner-dialog__name.is-very-long {
  font-size: clamp(1.35rem, 4vw, 2.05rem);
  line-height: 1.08;
}

.winner-dialog__note,
.confirm-dialog p {
  max-width: 360px;
  margin: 0 auto 24px;
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.55;
}

.dialog-primary {
  width: 100%;
  min-height: 50px;
  color: #1b1729;
  background: linear-gradient(115deg, var(--gold), #ff9e70);
  border-color: rgba(255, 255, 255, 0.42);
}

.confirm-dialog__icon {
  color: #2c1420;
  background: linear-gradient(145deg, #ff9ba5, var(--danger));
}

.confirm-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.confirm-dialog__actions .secondary-button {
  margin-top: 0;
}

.danger-button {
  color: #2f1219;
  background: var(--danger);
  border-color: rgba(255, 255, 255, 0.35);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: flex;
  max-width: min(390px, calc(100% - 32px));
  min-height: 48px;
  padding: 11px 14px;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 660;
  background: rgba(12, 18, 42, 0.96);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition:
    opacity 180ms ease,
    transform 220ms var(--ease-out);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast .icon {
  color: var(--mint);
}

@media (hover: hover) and (pointer: fine) {
  .icon-button:hover:not(:disabled),
  .dialog-close:hover,
  .participant-remove:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-bright);
  }

  .icon-button--danger:hover:not(:disabled),
  .participant-remove:hover {
    color: #ffd1d5;
    background: rgba(255, 123, 136, 0.12);
  }

  .draw-button:hover:not(:disabled) {
    filter: brightness(1.05) saturate(1.04);
    box-shadow: 0 20px 54px rgba(255, 126, 106, 0.3);
  }

  .text-button:hover:not(:disabled),
  .bulk-entry summary:hover {
    color: var(--text);
  }

  .text-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .primary-small-button:hover,
  .dialog-primary:hover,
  .danger-button:hover {
    filter: brightness(1.05);
  }

  .secondary-button:hover {
    background: rgba(255, 255, 255, 0.105);
    border-color: var(--border-bright);
  }

  .participant-item:hover {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.12);
  }
}

@media (max-width: 980px) {
  body {
    background-attachment: scroll;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .draw-card {
    position: relative;
    top: auto;
    min-height: auto;
  }

  .control-column {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 24px, 680px);
    padding-top: 14px;
  }

  .brand small {
    display: none;
  }

  .dashboard,
  .control-column {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .panel {
    border-radius: 22px;
  }

  .draw-card {
    padding: 24px 18px;
  }

  .draw-card__header {
    display: block;
  }

  .eligible-pill {
    margin-top: 18px;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 4rem);
  }

  .draw-stage {
    min-height: 225px;
    margin: 34px 0 20px;
    padding: 26px 16px;
  }

  .winner-name {
    font-size: clamp(2.15rem, 14vw, 4rem);
  }

  .participants-card,
  .history-card {
    padding: 20px 16px;
  }

  .participant-list,
  .winner-list {
    max-height: none;
  }

  .winner-dialog,
  .confirm-dialog {
    padding: 34px 22px 24px;
    border-radius: 24px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 430px) {
  .add-name-form {
    grid-template-columns: 1fr;
  }

  .primary-small-button {
    min-height: 44px;
  }

  .confirm-dialog__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px), (max-height: 620px) {
  .winner-dialog {
    padding: 24px 17px 18px;
  }

  .winner-dialog__icon {
    width: 46px;
    height: 46px;
    margin-bottom: 13px;
    border-radius: 14px;
  }

  .winner-dialog__icon .icon {
    width: 22px;
    height: 22px;
  }

  .winner-dialog .eyebrow {
    margin-bottom: 7px;
  }

  .winner-dialog h2 {
    margin-bottom: 8px;
    font-size: 1.65rem;
  }

  .winner-dialog__name {
    margin-bottom: 9px;
    font-size: clamp(1.7rem, 10vw, 2.45rem);
  }

  .winner-dialog__name.is-long,
  .winner-dialog__name.is-very-long {
    max-height: 142px;
    overflow: auto;
    font-size: 1.2rem;
    line-height: 1.12;
    scrollbar-width: thin;
  }

  .winner-dialog__note {
    margin-bottom: 15px;
    font-size: 0.78rem;
  }

  .winner-dialog .dialog-primary {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .winner-name.is-cycling,
  .toast,
  .winner-dialog,
  .confirm-dialog,
  .draw-button__shine {
    transform: none;
    filter: none;
  }
}

@media (forced-colors: active) {
  .panel,
  .draw-stage,
  .participant-item,
  .winner-item,
  input,
  textarea,
  button {
    border: 1px solid CanvasText;
  }
}
