:root {
  color-scheme: dark;
  --bg: #07080f;
  --bg-2: #0f1223;
  --panel: rgba(13, 16, 29, 0.76);
  --panel-strong: rgba(8, 10, 18, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f7ff;
  --muted: rgba(245, 247, 255, 0.74);
  --faint: rgba(245, 247, 255, 0.46);
  --accent: #7bf1ff;
  --accent-2: #ffb86b;
  --accent-3: #ff5f87;
  --success: #8dff9e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 28px;
  --radius-sm: 18px;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(90, 120, 255, 0.12), transparent 38%),
    radial-gradient(circle at bottom right, rgba(255, 120, 90, 0.12), transparent 28%),
    linear-gradient(180deg, #05060b 0%, #090b13 40%, #05060b 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-display);
  background: transparent;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.12;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 100%);
}

button,
kbd {
  font: inherit;
}

button {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.backdrop--aurora {
  background:
    radial-gradient(circle at 20% 20%, rgba(94, 206, 255, 0.14), transparent 28%),
    radial-gradient(circle at 80% 16%, rgba(255, 96, 163, 0.12), transparent 24%),
    radial-gradient(circle at 50% 80%, rgba(255, 190, 102, 0.08), transparent 28%);
  filter: blur(24px);
  animation: drift 18s ease-in-out infinite alternate;
}

.backdrop--grid {
  opacity: 0.14;
}

.backdrop--embers {
  background:
    radial-gradient(circle at 14% 76%, rgba(255, 120, 64, 0.12), transparent 12%),
    radial-gradient(circle at 64% 62%, rgba(255, 120, 64, 0.1), transparent 9%),
    radial-gradient(circle at 82% 28%, rgba(123, 241, 255, 0.08), transparent 10%);
  filter: blur(10px);
  animation: float 12s ease-in-out infinite alternate-reverse;
}

.ceremony-shell {
  position: relative;
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
  display: grid;
  gap: 22px;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.panel--wide {
  padding: 30px;
}

.panel--trailer {
  border-color: rgba(255, 110, 88, 0.24);
}

.panel__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel__eyebrow,
.hero__eyebrow,
.hero__kicker {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.panel__eyebrow,
.hero__eyebrow {
  color: var(--accent);
  margin: 0 0 8px;
}

.panel__header h2,
.hero h1,
.hero__kicker {
  margin: 0;
}

.panel__header h2 {
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.panel__hint {
  margin: 0;
  color: var(--muted);
  max-width: 32ch;
}

.hero {
  background:
    linear-gradient(135deg, rgba(14, 16, 31, 0.92), rgba(24, 28, 47, 0.72)),
    radial-gradient(circle at top left, rgba(123, 241, 255, 0.12), transparent 35%),
    radial-gradient(circle at top right, rgba(255, 184, 107, 0.12), transparent 32%);
}

.hero__title-block {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.hero__kicker {
  color: var(--accent-2);
  opacity: 0.95;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-wrap: balance;
  max-width: 12ch;
}

.hero__lede {
  margin: 0;
  max-width: 64ch;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px) scale(1.01);
}

.button--primary {
  color: #071018;
  background: linear-gradient(135deg, var(--accent), #b2fff7);
  box-shadow: 0 16px 34px rgba(123, 241, 255, 0.2);
  font-weight: 700;
}

.button--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.status-chip {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.status-chip__label {
  color: var(--faint);
  font-size: 0.8rem;
}

.status-chip__value {
  font-size: 1.1rem;
  font-weight: 700;
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  position: relative;
}

.employee-card {
  position: relative;
  cursor: grab;
  user-select: none;
  touch-action: none;
  --drag-x: 0px;
  --drag-y: 0px;
  --drag-rotate: 0deg;
  --lift-y: 0px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 16px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translate3d(var(--drag-x), calc(var(--drag-y) + var(--lift-y)), 0) rotate(var(--drag-rotate));
  will-change: transform;
}

body.is-ready .employee-card {
  animation: cardRise 640ms cubic-bezier(0.2, 0.85, 0.25, 1) both;
  animation-delay: var(--entry-delay, 0ms);
}

.employee-card:hover,
.employee-card.is-active {
  --lift-y: -4px;
  border-color: rgba(123, 241, 255, 0.34);
  background: rgba(123, 241, 255, 0.08);
}

.employee-card.is-dragging {
  cursor: grabbing;
  z-index: 20;
  transition: none;
}

.employee-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.employee-card.is-cycled .employee-card__emoji {
  animation: pop 360ms ease;
}

.employee-card.is-hired {
  animation: hiredOut 560ms ease forwards;
  pointer-events: none;
}

.employee-card__emoji {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  font-size: 2rem;
}

.employee-card__body h3 {
  margin: 0 0 4px;
  font-size: 1.12rem;
}

.employee-card__body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.trailer {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  gap: 18px;
}

.trailer__frame {
  position: relative;
  min-height: 320px;
  padding: 24px;
  border-radius: 26px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 36%),
    linear-gradient(180deg, rgba(255, 62, 94, 0.18), rgba(17, 18, 26, 0.96));
  border: 1px solid rgba(255, 123, 93, 0.22);
  box-shadow: inset 0 0 60px rgba(255, 100, 100, 0.1);
}

.company-badge {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  min-width: 120px;
}

.company-badge span {
  font-size: 2.6rem;
  line-height: 1;
}

.company-badge strong {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  text-align: center;
}

.trailer__tag {
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.28em;
  color: #ffe2a2;
}

.trailer__title {
  margin: 14px 0 12px;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

.trailer__copy {
  margin: 0;
  max-width: 24ch;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

.trailer__effects {
  display: grid;
  gap: 12px;
}

.trailer__effects span {
  min-height: 66px;
  padding: 18px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
}

.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 22px;
}

.picker-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.picker-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
}

.picker-pill.is-selected {
  background: linear-gradient(135deg, rgba(123, 241, 255, 0.18), rgba(255, 184, 107, 0.12));
  border-color: rgba(123, 241, 255, 0.32);
}

.picker-stage {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.picker-stage.is-shaking {
  animation: shake 420ms ease;
}

body.is-shaking {
  animation: shake 420ms ease;
}

.picker-stage__core {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}

.picker-stage__label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-2);
}

.emoji-cloud {
  position: relative;
  width: min(100%, 360px);
  height: 150px;
}

.emoji-cloud span {
  position: absolute;
  font-size: 2rem;
  animation: bob 4s ease-in-out infinite;
}

.emoji-cloud span:nth-child(1) { top: 8px; left: 18px; }
.emoji-cloud span:nth-child(2) { top: 14px; right: 24px; animation-delay: 300ms; }
.emoji-cloud span:nth-child(3) { bottom: 16px; left: 44px; animation-delay: 600ms; }
.emoji-cloud span:nth-child(4) { bottom: 14px; right: 64px; animation-delay: 900ms; }
.emoji-cloud span:nth-child(5) { top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: 1200ms; font-size: 2.3rem; }

.picker-stage__note {
  margin: 0;
  color: var(--muted);
  max-width: 32ch;
}

.picker-scene {
  width: min(100%, 560px);
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.picker-scene__machine {
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.35));
}

.picker-scene__title {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--accent);
}

.picker-scene__rack {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.picker-scene__rack span,
.picker-scene__winner {
  min-width: 52px;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-size: 1.5rem;
}

.picker-scene__winner {
  min-width: 80px;
  min-height: 80px;
  font-size: 2.2rem;
  background: linear-gradient(135deg, rgba(123, 241, 255, 0.14), rgba(255, 184, 107, 0.14));
  border-color: rgba(123, 241, 255, 0.28);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.picker-scene__subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
}

.picker-stage[data-mode="slot"] .picker-scene__machine,
.picker-stage[data-mode="wheel"] .picker-scene__machine,
.picker-stage[data-mode="popcorn"] .picker-scene__machine {
  animation: spin 1.4s linear infinite;
}

.picker-stage[data-mode="ufo"] .picker-scene__machine,
.picker-stage[data-mode="science"] .picker-scene__machine {
  animation: float 1.8s ease-in-out infinite alternate;
}

.picker-stage[data-mode="claw"] .picker-scene__machine {
  color: var(--accent);
}

.picker-stage[data-mode="slot"] .picker-scene__machine {
  color: var(--accent-2);
}

.picker-stage[data-mode="wheel"] .picker-scene__machine {
  color: var(--success);
}

.picker-stage[data-mode="ufo"] .picker-scene__machine {
  color: #c2ff9a;
}

.picker-stage[data-mode="science"] .picker-scene__machine {
  color: #ffd66b;
}

.picker-stage[data-mode="pirate"] .picker-scene__machine {
  color: #ff8c6b;
}

.picker-stage[data-mode="gift"] .picker-scene__machine {
  color: #ffb86b;
}

.picker-stage[data-mode="dart"] .picker-scene__machine {
  color: #ff5f87;
}

.picker-stage[data-mode="ball"] .picker-scene__machine {
  color: #f5f7ff;
}

.window-stack {
  display: grid;
  gap: 14px;
  min-height: 300px;
}

.mini-window {
  position: relative;
  width: min(100%, 360px);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(9, 11, 20, 0.88);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

.mini-window--live {
  transform: translate3d(var(--float-x, 0px), var(--float-y, 0px), 0) rotate(var(--float-rotate, 0deg));
}

.mini-window--offset {
  margin-left: 36px;
}

.mini-window--glow {
  margin-left: 72px;
  border-color: rgba(123, 241, 255, 0.24);
  box-shadow: 0 20px 48px rgba(123, 241, 255, 0.12);
}

.mini-window__bar {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.mini-window__content {
  display: grid;
  gap: 6px;
  padding: 16px 14px 18px;
}

.mini-window__content strong {
  font-size: 1.04rem;
}

.mini-window__content span {
  color: var(--muted);
}

.mission-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(123, 241, 255, 0.2);
  background: linear-gradient(180deg, rgba(123, 241, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.mission-card pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.96rem;
  line-height: 1.65;
  white-space: pre-wrap;
  color: rgba(245, 247, 255, 0.88);
}

.hotkey-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hotkey {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hotkey kbd {
  min-width: 64px;
  padding: 10px 12px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
}

.hotkey span {
  color: var(--muted);
}

.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 24;
}

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  display: grid;
  gap: 10px;
  z-index: 40;
  pointer-events: none;
}

.toast {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(7, 8, 15, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: toastIn 220ms ease both;
}

.toast__title {
  display: block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  margin-bottom: 6px;
  color: var(--accent);
}

.toast__message {
  display: block;
  color: var(--text);
  line-height: 1.45;
}

.toast--success {
  border-color: rgba(141, 255, 158, 0.26);
}

.toast--warning {
  border-color: rgba(255, 184, 107, 0.28);
}

.toast--danger {
  border-color: rgba(255, 95, 135, 0.3);
}

.fx-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: var(--size);
  transform: translate3d(0, 0, 0);
  animation: particleFall var(--dur) cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

.alarm-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at center, rgba(255, 80, 90, 0.22), rgba(3, 4, 7, 0.96) 64%),
    linear-gradient(180deg, rgba(255, 42, 70, 0.16), rgba(3, 4, 7, 0.92));
  backdrop-filter: blur(8px);
}

.alarm-overlay__panel {
  width: min(640px, calc(100vw - 32px));
  padding: 34px 28px;
  border-radius: 30px;
  border: 1px solid rgba(255, 95, 135, 0.32);
  background: rgba(14, 8, 12, 0.78);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.54);
  text-align: center;
  animation: alarmPulse 1.5s ease-in-out infinite;
}

.alarm-overlay__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: #ff9ba9;
}

.alarm-overlay__panel h2 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.alarm-overlay__countdown {
  margin: 18px 0 12px;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.06em;
}

.alarm-overlay__hint {
  margin: 0;
  color: rgba(245, 247, 255, 0.78);
}

.alarm-overlay__action {
  margin-top: 20px;
  min-width: min(100%, 280px);
}

@keyframes drift {
  from {
    transform: translate3d(-1%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.05);
  }
}

@keyframes float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-12px);
  }
}

@keyframes bob {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.04);
  }
}

@keyframes cardRise {
  0% {
    opacity: 0;
    transform: translate3d(var(--drag-x), calc(var(--drag-y) + 26px), 0) scale(0.82) rotate(-4deg);
    filter: blur(4px);
  }
  65% {
    opacity: 1;
    transform: translate3d(var(--drag-x), calc(var(--drag-y) - 2px), 0) scale(1.01) rotate(1deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate3d(var(--drag-x), var(--drag-y), 0) scale(1) rotate(0);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.82);
  }
  50% {
    transform: scale(1.22);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes hiredOut {
  0% {
    opacity: 1;
    filter: saturate(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drag-x), calc(var(--drag-y) + 84px), 0) scale(0.68) rotate(-12deg);
    filter: blur(4px) saturate(0.2);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-5px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes particleFall {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    opacity: 0;
    transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--spin));
  }
}

@keyframes alarmPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.54);
  }
  50% {
    transform: scale(1.01);
    box-shadow: 0 34px 120px rgba(255, 75, 90, 0.2);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1024px) {
  .employee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trailer,
  .layout-split {
    grid-template-columns: 1fr;
  }

  .hotkey-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ceremony-shell {
    width: min(100vw - 20px, 1200px);
    padding: 14px 0 32px;
  }

  .panel--wide {
    padding: 20px;
  }

  .hero h1 {
    max-width: 100%;
  }

  .status-strip,
  .employee-grid,
  .hotkey-grid {
    grid-template-columns: 1fr;
  }

  .panel__header {
    align-items: start;
    flex-direction: column;
  }

  .mini-window--offset,
  .mini-window--glow {
    margin-left: 0;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .toast-host {
    width: min(94vw, 560px);
  }

  .alarm-overlay__panel {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .backdrop--aurora,
  .backdrop--embers,
  .emoji-cloud span {
    animation: none !important;
  }
}

/* ==========================================================================
   Student Arrival Input Bar & Controls
   ========================================================================== */

.student-add-bar {
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
}

.student-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.input {
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 12px 20px;
  background: rgba(10, 14, 26, 0.7);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.input--student {
  flex: 1 1 240px;
  min-height: 48px;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 241, 255, 0.2);
  background: rgba(15, 20, 36, 0.9);
}

.button--accent {
  color: #071018;
  background: linear-gradient(135deg, var(--accent-2), #ffe08b);
  box-shadow: 0 12px 24px rgba(255, 184, 107, 0.2);
  font-weight: 700;
  min-height: 48px;
}

.button--sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.85rem;
}

/* Remove button on employee cards */
.employee-card {
  position: relative;
}

.employee-card__remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 95, 135, 0.16);
  border: 1px solid rgba(255, 95, 135, 0.3);
  color: var(--accent-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 150ms ease, background 150ms ease, transform 150ms ease;
  z-index: 5;
  cursor: pointer;
}

.employee-card:hover .employee-card__remove {
  opacity: 1;
}

.employee-card__remove:hover {
  background: rgba(255, 95, 135, 0.4);
  color: #fff;
  transform: scale(1.1);
}

/* Empty hint for history */
.history-empty-hint {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
  color: var(--faint);
  font-size: 0.9rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Alarm Overlay / Finale Modal
   ========================================================================== */

.alarm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(5, 6, 12, 0.82);
  backdrop-filter: blur(14px);
  padding: 20px;
  animation: fadeIn 300ms ease;
}

.alarm-overlay[hidden] {
  display: none !important;
}

.alarm-overlay__panel {
  position: relative;
  width: min(100%, 540px);
  background: linear-gradient(145deg, rgba(28, 12, 20, 0.96), rgba(12, 14, 26, 0.98));
  border: 1px solid rgba(255, 95, 135, 0.4);
  box-shadow: 0 24px 80px rgba(255, 95, 135, 0.25), inset 0 0 40px rgba(255, 95, 135, 0.1);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.alarm-overlay__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin: 0;
}

.alarm-overlay__panel h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 95, 135, 0.5);
}

.alarm-overlay__countdown {
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--accent);
  margin: 0;
  letter-spacing: 0.1em;
}

.alarm-overlay__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 38ch;
}

.alarm-overlay__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

