:root {
  --ink: #fff5d6;
  --muted: #d8bd7a;
  --line: #9d681c;
  --panel: rgba(18, 9, 4, .92);
  --page: #050302;
  --accent: #ffb12b;
  --accent-2: #ffe8a3;
  --danger: #b91c1c;
  --good: #0f8f68;
  --wine: #5a0506;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(5, 3, 2, .74), rgba(5, 3, 2, .9)),
    url("/theme-regular.png") center top / min(100vw, 1500px) auto no-repeat,
    radial-gradient(circle at 50% -10%, rgba(246, 205, 112, .22), transparent 35%),
    linear-gradient(180deg, #080402, #150703);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
.admin-link {
  border: 1px solid #f4c56a;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffe8a3 0%, #d89b24 52%, #884e0d 100%);
  color: #170b02;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(216, 155, 36, .25), inset 0 1px 0 rgba(255, 255, 255, .62);
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.danger-button {
  background: linear-gradient(180deg, #ffddd6, #c33125 58%, #68130d);
  color: #fff7ed;
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  margin-left: 8px;
  font-size: .85rem;
}

.shell,
.admin-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 46px;
}

.hero,
.admin-top,
.display-head {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
}

.audio-status {
  min-height: 24px;
  margin: 0 0 10px;
  color: #d6c184;
  font-weight: 800;
}

.audio-status.ok {
  color: #7ef0a2;
}

.audio-status.error {
  color: #ff8a8a;
}

.branded-hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(260px, .95fr) 1fr auto;
  align-items: center;
}

.login-hero {
  min-height: min(720px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(22px, 4vw, 58px);
  padding: clamp(22px, 4vw, 48px);
}

.branded-hero img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 55px rgba(0, 0, 0, .48);
}

.sangeetmay-theme .branded-hero {
  display: block;
  padding: 0;
}

.sangeetmay-theme .branded-hero > div {
  display: none;
}

.sangeetmay-theme .branded-hero img {
  display: block;
  width: 100%;
  max-height: 42vh;
  object-fit: contain;
  background: #120604;
}

.login-hero img {
  width: 100%;
  max-height: 470px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 55px rgba(0, 0, 0, .48);
}

.login-hero h1 {
  font-size: clamp(3rem, 7.2vw, 7rem);
  white-space: nowrap;
}

.login-hero .compact {
  max-width: 720px;
}

.login-hero .form-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.login-hero button {
  grid-column: 1 / -1;
}

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

h1 {
  color: var(--accent-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 7vw, 5.5rem);
  line-height: .95;
  margin-bottom: 12px;
  text-shadow: 0 0 18px rgba(215, 161, 43, .6), 0 2px 0 #5a3309;
}

h2 {
  color: var(--accent-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.eyebrow {
  color: var(--accent-2);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.panel,
.live-board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255, 232, 163, .12);
}

.admin-dashboard,
.control-grid,
.live-board {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .75fr);
  gap: 16px;
}

.form-grid,
.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.compact {
  max-width: 450px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  padding: 10px 12px;
  color: #fff4cc;
  background: #100904;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 163, .05);
}

textarea {
  resize: vertical;
}

.wide {
  grid-column: 1 / -1;
}

.message {
  color: var(--muted);
  margin: 12px 0 0;
}

.youtube-live-panel {
  padding: 16px;
}

.youtube-live-panel h2 {
  margin: 0;
}

.gold-link-button {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid #ffe8a3;
  color: #120904;
  background: linear-gradient(#ffeeb1, #d29320 60%, #8a5505);
  font-weight: 900;
  text-decoration: none;
  box-shadow: inset 0 1px 0 #fff8d0, 0 12px 24px rgba(0, 0, 0, .28);
}

.youtube-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #050301;
}

.youtube-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.hidden {
  display: none !important;
}

.nav-row,
.ticket-head,
.button-row,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-control {
  display: inline-flex;
  align-items: center;
  grid-auto-flow: column;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 9, 4, .82);
}

.inline-control input {
  width: 120px;
  min-height: auto;
  padding: 0;
}

.switch-control {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 9, 4, .82);
  color: var(--accent-2);
}

.switch-control input {
  display: none;
}

.switch-control span {
  width: 54px;
  height: 28px;
  border-radius: 999px;
  background: #4b1f16;
  border: 1px solid var(--line);
  position: relative;
}

.switch-control span::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 2px;
  border-radius: 50%;
  background: #f7dec0;
  transition: transform .18s ease;
}

.switch-control input:checked + span {
  background: #0f8f68;
}

.switch-control input:checked + span::after {
  transform: translateX(25px);
}

.claim-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.theme-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.theme-picker label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 14px;
}

.theme-preview {
  color: var(--accent-2);
  font-weight: 800;
}

.claim-picker legend {
  color: var(--accent-2);
  font-weight: 900;
}

.claim-picker div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 232, 163, .08);
  border: 1px solid rgba(255, 232, 163, .18);
  border-radius: 6px;
  padding: 8px;
}

.check-line input {
  min-height: auto;
}

.mini-stage,
.current {
  background: linear-gradient(145deg, #1c0e04 0%, #090402 100%);
  color: white;
  border: 1px solid #9d6719;
  border-radius: 8px;
  padding: 20px;
}

.mini-stage {
  display: grid;
  justify-items: center;
  text-align: center;
  margin-bottom: 14px;
}

.mini-stage span {
  font-size: 4rem;
  color: #ffd36a;
  font-weight: 900;
}

.mini-stage strong,
.current strong {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  line-height: 1.05;
  margin-bottom: 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stats span,
.media-item,
.mini-list span {
  background: #100904;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.stats b {
  display: block;
  font-size: 1.75rem;
}

.signal-box {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  color: var(--muted);
  font-weight: 900;
  background: #100904;
}

.signal-box.green {
  background: linear-gradient(180deg, #0f8f68, #064533);
  color: white;
  box-shadow: 0 0 24px rgba(15, 143, 104, .52);
}

.pulse {
  animation: pulse 1s ease-in-out infinite;
}

.mini-list,
.media-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.folder-list {
  display: grid;
  gap: 10px;
}

.folder-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 9, 4, .92);
  padding: 12px;
}

.folder-card.active {
  border-color: var(--accent-2);
  box-shadow: 0 0 20px rgba(255, 232, 163, .22);
}

.folder-card b {
  color: var(--accent-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.folder-card span,
.folder-card small {
  color: var(--muted);
}

.folder-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.media-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.table-wrap {
  overflow: auto;
  margin-top: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

.claim-row-selected {
  background: rgba(15, 143, 104, .12);
}

.claim-select-box {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.claim-select-box input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  pointer-events: none;
}

.claim-select-box span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid #ffe8a3;
  border-radius: 4px;
  background: rgba(255, 245, 210, .92);
  box-shadow: 0 0 14px rgba(0, 0, 0, .22);
}

.claim-select-box input:checked + span {
  border-color: #7ef0a2;
  background: #0f8f68;
}

.claim-select-box input:checked + span::after {
  content: "✓";
  color: white;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}

.status {
  border-radius: 999px;
  padding: 4px 9px;
  color: white;
  background: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  font-size: .72rem;
}

.status.valid {
  background: var(--good);
}

.ticket-template-card {
  position: relative;
  width: min(100%, 980px);
  aspect-ratio: 1448 / 1086;
  margin: 14px auto;
  color: #4d0809;
  background: #f7eed5;
}

.ticket-template-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ticket-no-card {
  position: absolute;
  top: 45.2%;
  left: 69.8%;
  width: 16%;
  height: 4%;
  display: grid;
  place-items: center;
  color: #5a0506;
  font-weight: 900;
  font-size: clamp(.9rem, 2.2vw, 1.6rem);
}

.ticket-grid.overlay-grid {
  position: absolute;
  left: 4.75%;
  right: 4.3%;
  top: 51.4%;
  bottom: 7.1%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: .9%;
  border: 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
}

.ticket-cell {
  position: relative;
  border: 1px solid rgba(178, 119, 27, .35);
  border-radius: 6px;
  background: rgba(255, 253, 244, .78);
  color: #4d0809;
  padding: 4px;
  display: grid;
  place-items: center;
  text-align: center;
  min-width: 0;
  min-height: 0;
  font-weight: 900;
}

button.ticket-cell {
  box-shadow: none;
}

.ticket-cell span {
  color: #4d0809;
  font-size: clamp(.7rem, 1.45vw, 1.18rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  hyphens: auto;
  max-width: 100%;
}

.sangeetmay-theme .ticket-no-card {
  top: 53.1%;
  left: 72.2%;
  width: 16.8%;
  height: 4.2%;
  font-size: clamp(1rem, 2.4vw, 1.8rem);
}

.sangeetmay-theme .ticket-grid.overlay-grid {
  left: 4.1%;
  right: 3.3%;
  top: 59.2%;
  bottom: 6.2%;
  gap: .8%;
}

.sangeetmay-theme .ticket-cell {
  background: transparent;
  border-color: transparent;
  padding: 5px 8px;
}

.sangeetmay-theme .ticket-cell span {
  color: #701016;
  font-size: clamp(.66rem, 1.36vw, 1.18rem);
  line-height: 1.14;
}

.ticket-cell.marked {
  background: rgba(28, 140, 92, .88);
  color: white;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 0 16px rgba(28, 140, 92, .45);
}

.ticket-cell.marked::after {
  content: "✓";
  position: absolute;
  font-size: 2rem;
  color: white;
}

.ticket-cell.marked span {
  color: white;
}

.invalid-blink {
  animation: invalidBlink .65s linear infinite;
}

.claim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.claim-grid button.closed-claim {
  background: linear-gradient(#8b1e1e, #4f1111);
  color: #ffe5e5;
  text-decoration: line-through;
}

.claim-grid button.ready,
#claimAdminButtons button.ready {
  box-shadow: 0 0 0 2px rgba(126, 240, 162, .7), 0 0 26px rgba(126, 240, 162, .35);
}

.claim-grid button.valid-claim {
  background: linear-gradient(#56d988, #139152);
  color: #061b0e;
}

.registration-mode button.active {
  box-shadow: inset 0 0 0 2px #fff2bd;
}

.called-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
}

.called-list span,
.song-directory span {
  border: 1px solid #8a5b17;
  background: #100904;
  border-radius: 999px;
  padding: 7px 10px;
  color: #e0c17c;
}

.song-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.song-directory span.done {
  background: #0f513d;
  color: white;
}

.winners {
  display: grid;
  gap: 8px;
}

.winners div {
  border-left: 4px solid var(--accent-2);
  background: rgba(255, 232, 163, .1);
  padding: 10px 12px;
  display: grid;
  gap: 3px;
}

.display-body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: block;
  background:
    linear-gradient(rgba(0, 0, 0, .52), rgba(10, 2, 0, .82)),
    url("/theme-regular.png") center / cover fixed,
    #050302;
}

.prestart-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #000;
  display: grid;
  place-items: center;
}

.prestart-screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.display {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  position: fixed;
  inset: 0;
  display: block;
  transform: none;
  overflow: hidden;
}

.display .display-head {
  position: absolute;
  left: 22vw;
  right: 22vw;
  top: 8vh;
  z-index: 5;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
}

.display .display-head > div {
  display: grid;
  gap: 4px;
}

.display .display-head h1 {
  margin: 0;
  font-size: clamp(3.8rem, 6.2vw, 7.2rem);
  line-height: .9;
  max-width: 100%;
}

.display .display-head .eyebrow {
  margin: 0;
}

.display .display-head .progress-pill {
  position: fixed;
  right: 6.4vw;
  top: 8.4vh;
  pointer-events: auto;
}

.progress-pill {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .55);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--accent-2);
  font-weight: 900;
}

.progress-pill.audio-on {
  background: linear-gradient(180deg, #0f8f68, #064533);
  color: white;
}

.display-layout {
  position: absolute;
  inset: 24vh 4.8vw 15vh 4.8vw;
  display: block;
  overflow: hidden;
}

.called-rail {
  position: absolute;
  left: 0;
  top: 2vh;
  width: min(22vw, 380px);
  bottom: 0;
  border-right: 1px solid rgba(255, 211, 106, .38);
  padding-right: 16px;
  z-index: 6;
}

.called-rail h2 {
  margin: 0 0 12px;
  font-size: clamp(1.2rem, 1.75vw, 2rem);
}

.called-list.vertical {
  display: grid;
  align-content: start;
  max-height: 45vh;
  overflow: hidden;
  gap: 7px;
}

.display-current {
  position: absolute;
  inset: 0 0 0 calc(min(22vw, 380px) + 32px);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255, 211, 106, .16), transparent 35%);
  overflow: hidden;
}

.display-current::before,
.display-current::after {
  content: "♪ ♫ ♬";
  position: absolute;
  color: rgba(255, 211, 106, .28);
  font-size: clamp(3rem, 8vw, 8rem);
  animation: stageSpark 5.5s linear infinite;
  pointer-events: none;
}

.display-current::before {
  left: 4%;
  bottom: 8%;
}

.display-current::after {
  right: 6%;
  top: 10%;
  animation-delay: -2.4s;
}

.display-current span#displayNumber {
  display: none;
  font-size: 0;
  line-height: .9;
  color: #ffd36a;
  font-weight: 900;
  text-shadow: 0 0 34px rgba(255, 211, 106, .7);
  z-index: 1;
}

.display-current strong {
  font-size: clamp(4.2rem, 7.2vw, 8.8rem);
  line-height: 1;
  max-width: min(82vw, 1280px);
  z-index: 1;
  color: white;
  text-shadow: 0 0 26px rgba(0, 0, 0, .8);
}

.display-current small {
  margin-top: 12px;
  color: var(--accent-2);
  font-weight: 900;
  z-index: 1;
}

.claim-showcase {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  justify-items: center;
  gap: clamp(10px, 1.4vh, 18px);
  text-align: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 211, 106, .22), transparent 34%),
    linear-gradient(rgba(0, 0, 0, .76), rgba(0, 0, 0, .9));
  border: 0;
  padding: clamp(18px, 3vh, 34px) clamp(24px, 3vw, 58px);
  overflow: hidden;
}

.display > section:last-of-type {
  position: absolute;
  left: 4.8vw;
  right: 4.8vw;
  bottom: 3vh;
  height: 11vh;
  z-index: 5;
  overflow: hidden;
}

.display > section:last-of-type h2 {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 1.7vw, 2rem);
}

.display > section:last-of-type .winners {
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  overflow: hidden;
}

.display > .audio-status {
  position: absolute;
  left: 4.8vw;
  top: 20.5vh;
  z-index: 6;
  margin: 0;
}

.claim-showcase h2 {
  margin: 0;
  color: #ffd36a;
  font-size: clamp(3rem, 5.7vw, 6.9rem);
  line-height: .95;
  text-shadow: 0 0 32px rgba(255, 211, 106, .55);
}

.claim-showcase h3 {
  margin: 0;
  color: white;
  font-size: clamp(1.8rem, 3.4vw, 4.2rem);
  line-height: 1;
  text-shadow: 0 0 26px #000;
}

.showcase-list {
  display: grid;
  width: min(96vw, 1840px);
  gap: clamp(10px, 1.4vw, 26px);
  align-items: center;
  justify-content: center;
  align-content: center;
  max-height: 72vh;
  overflow: hidden;
}

.live-claim-card {
  background: rgba(255, 245, 210, .94);
  border: 2px solid #d6a642;
  color: #4d0809;
  padding: clamp(8px, .9vw, 16px);
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  box-shadow: 0 0 40px rgba(0, 0, 0, .34);
}

.live-claim-card > div:first-child {
  display: block;
  font-size: clamp(1rem, 1.7vw, 2.1rem);
  margin-bottom: clamp(6px, 1vh, 12px);
  text-align: left;
}

.live-claim-card .live-ticket-card {
  width: min(100%, 880px);
  margin: 0 auto;
}

.live-claim-card .ticket-cell.marked {
  background: rgba(28, 140, 92, .78);
}

.live-claim-card .ticket-cell.marked::after {
  font-size: clamp(1rem, 2vw, 2rem);
}

.live-ticket-mini {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(3px, .42vw, 8px);
}

.live-ticket-mini span {
  min-height: clamp(38px, 5.5vh, 76px);
  display: grid;
  place-items: center;
  border: 1px solid #c58b28;
  background: #fff9eb;
  padding: 4px;
  font-size: clamp(.58rem, 1.05vw, 1.25rem);
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.live-ticket-mini span.cut {
  background: #15915b;
  color: white;
  position: relative;
}

.live-ticket-mini span.cut::after {
  content: "✓";
  position: absolute;
  font-size: clamp(1.35rem, 2.4vw, 2.7rem);
  color: white;
  text-shadow: 0 1px 5px #063;
}

.winner-card {
  box-shadow: 0 0 34px rgba(255, 211, 106, .55);
}

.try-next {
  color: #ffe8a3;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-weight: 900;
}

.claim-showcase.winner-shuffling h2 {
  font-size: clamp(2.8rem, 5.4vw, 6.2rem);
}

.shuffle-winner-list {
  grid-template-columns: minmax(0, min(90vw, 1080px));
  justify-content: center;
  max-height: 72vh;
}

.shuffle-winner-list .live-claim-card {
  animation: winnerTicketPulse .18s ease-out;
}

.winner-shuffle-meter {
  margin: 0;
  color: #ffe8a3;
  font-size: clamp(1rem, 2vw, 1.8rem);
  font-weight: 900;
}

.claim-showcase.claim-count-1 .showcase-list {
  grid-template-columns: minmax(0, min(88vw, 1120px));
  justify-content: center;
}

.claim-showcase.claim-count-1 .live-ticket-mini span {
  min-height: clamp(54px, 7.2vh, 92px);
  font-size: clamp(.78rem, 1.35vw, 1.5rem);
}

.claim-showcase.claim-count-2 .showcase-list {
  grid-template-columns: repeat(2, minmax(0, min(44vw, 820px)));
}

.claim-showcase.claim-count-3 .showcase-list {
  grid-template-columns: repeat(3, minmax(0, min(29vw, 560px)));
  justify-content: space-between;
  gap: clamp(24px, 3vw, 60px);
}

.claim-showcase.claim-count-1 .live-claim-card.winner-card {
  max-width: min(84vw, 980px);
}

.claim-showcase.claim-count-mid .showcase-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 68vh;
}

.claim-showcase.claim-count-many .showcase-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(6px, .8vw, 12px);
  max-height: 68vh;
}

.claim-showcase.claim-count-many h2 {
  font-size: clamp(2.4rem, 4.2vw, 5rem);
}

.claim-showcase.claim-count-many h3 {
  font-size: clamp(1.4rem, 2.6vw, 3rem);
}

.claim-showcase.claim-count-many .live-claim-card {
  padding: 8px;
}

.claim-showcase.claim-count-many .live-claim-card > div:first-child {
  font-size: clamp(.78rem, 1.05vw, 1.25rem);
  margin-bottom: 6px;
}

.claim-showcase.claim-count-many .live-ticket-mini span {
  min-height: clamp(28px, 4vh, 48px);
  padding: 2px;
  font-size: clamp(.44rem, .74vw, .86rem);
}

.claim-showcase.claim-count-many .live-ticket-mini span.cut::after {
  font-size: clamp(1rem, 1.5vw, 1.8rem);
}

.winner-popup {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .72);
  padding: 20px;
}

.winner-popup > div {
  width: min(92vw, 520px);
  border: 2px solid #d6a642;
  background: radial-gradient(circle at top, rgba(255, 211, 106, .22), transparent 42%), #120805;
  color: white;
  text-align: center;
  padding: 28px;
  box-shadow: 0 0 40px rgba(255, 211, 106, .34);
}

.winner-popup h2 {
  margin: 0 0 12px;
  color: #ffd36a;
  font-size: clamp(2.4rem, 9vw, 4.8rem);
}

.winner-popup p {
  font-size: 1.2rem;
  font-weight: 800;
}

.shuffle-strip {
  position: absolute;
  inset: 4% 0 auto;
  display: flex;
  gap: 34px;
  white-space: nowrap;
  opacity: 0;
  color: #ffe8a3;
  font-size: clamp(2.1rem, 6vw, 5.6rem);
  font-weight: 900;
  text-shadow: 0 0 18px #000;
}

.shuffle-strip.spin {
  animation: shuffleStrip .82s ease-out;
}

.media-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #000;
  display: grid;
  place-items: center;
}

.media-overlay img,
.media-overlay video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.music-notes::before,
.music-notes::after {
  content: "♪ ♫ ♬ ♪ ♫";
  position: fixed;
  color: rgba(255, 211, 106, .16);
  font-size: 8rem;
  animation: floatNotes 12s linear infinite;
  pointer-events: none;
}

.music-notes::after {
  right: 2%;
  bottom: 8%;
  animation-duration: 16s;
}

.print-area {
  display: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes invalidBlink {
  0%, 100% { background: rgba(185, 28, 28, .95); }
  50% { background: rgba(255, 255, 255, .85); }
}

@keyframes shuffleStrip {
  0% { opacity: 1; transform: translateX(70%) scale(1.08); }
  80% { opacity: 1; transform: translateX(-45%) scale(1); }
  100% { opacity: 0; transform: translateX(-60%) scale(.96); }
}

@keyframes winnerTicketPulse {
  from { transform: scale(.92); filter: brightness(1.25); }
  to { transform: scale(1); filter: brightness(1); }
}

@keyframes stageSpark {
  0% { opacity: 0; transform: translateY(40px) rotate(-12deg) scale(.7); }
  20%, 70% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-120px) rotate(10deg) scale(1.25); }
}

@keyframes floatNotes {
  from { transform: translateY(100vh) rotate(-8deg); }
  to { transform: translateY(-120vh) rotate(8deg); }
}

@media (max-width: 820px) {
  .hero,
  .admin-top,
  .branded-hero,
  .login-hero,
  .admin-dashboard,
  .control-grid,
  .live-board,
  .display-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .login-hero h1 {
    white-space: normal;
  }

  .login-hero .form-grid {
    grid-template-columns: 1fr;
  }

  .display-layout {
    min-height: auto;
  }

  .called-rail {
    border-right: 0;
    padding-right: 0;
  }

  .display-current {
    min-height: 54vh;
  }

  #ticketCard {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  #ticketCard .ticket-cell {
    padding: 1px;
    border-radius: 3px;
  }

  #ticketCard .ticket-cell span {
    font-size: clamp(.36rem, 1.55vw, .58rem);
    line-height: .95;
    letter-spacing: 0;
  }

  #ticketCard .ticket-no-card {
    font-size: clamp(.65rem, 2.3vw, 1rem);
  }
}

@media print {
  @page {
    size: A3 landscape;
    margin: 5mm;
  }

  html,
  body {
    width: 100%;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body * {
    visibility: hidden;
  }

  #ticketCard,
  #ticketCard *,
  #printArea,
  #printArea * {
    visibility: visible;
  }

  #ticketCard {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100vw;
  }

  #printArea {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    background: white !important;
  }

  .print-sheet {
    width: 410mm;
    height: 287mm;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 4mm;
    align-items: center;
    justify-items: center;
    page-break-after: always;
    break-after: page;
    overflow: hidden;
  }

  .print-sheet:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .print-ticket {
    width: 100%;
    max-width: none;
    max-height: 100%;
    aspect-ratio: 1448 / 1086;
    page-break-after: auto;
    break-after: auto;
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0;
    overflow: hidden;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-ticket > img {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-ticket .ticket-cell {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

