@font-face {
  font-family: "Rubik";
  src: local("Rubik"), url("../fonts/rubik-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --graphite: #11100f;
  --graphite-soft: #1a1816;
  --wine: #291314;
  --wine-bright: #633033;
  --temple: #2b1d17;
  --gold: #c79a3c;
  --crown: #e0b85a;
  --beam: #f7e8c7;
  --pearl: #f8f2e8;
  --ash: #a7a09a;
  --emerald: #1a5b4c;
  --blue: #1b4367;
  --danger: #d36c68;
  --success: #67b49c;
  --line: rgba(199, 154, 60, 0.28);
  --line-soft: rgba(248, 242, 232, 0.1);
  --shadow: 0 20px 65px rgba(0, 0, 0, 0.35);
  --radius: 20px;
  --radius-small: 13px;
  --shell: 1160px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--safe-top);
  padding-right: var(--safe-right);
  padding-left: var(--safe-left);
  color: var(--pearl);
  background:
    radial-gradient(circle at 75% -10%, rgba(199, 154, 60, 0.11), transparent 32rem),
    linear-gradient(135deg, var(--graphite) 0 65%, rgba(41, 19, 20, 0.72) 100%);
  font-family: "Rubik", "Noto Sans Thai", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(199, 154, 60, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(199, 154, 60, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input[type="file"] {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(calc(100% - 32px), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: calc(8px + var(--safe-top));
  left: calc(8px + var(--safe-left));
  z-index: 100;
  padding: 10px 14px;
  color: var(--graphite);
  background: var(--crown);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: 60px;
  height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  color: var(--crown);
  font-size: 0.84rem;
  letter-spacing: 0.12em;
}

.brand-copy span {
  margin-top: 4px;
  color: var(--ash);
  font-size: 0.72rem;
}

.language-control select,
select {
  min-height: 44px;
  padding: 0 38px 0 13px;
  color: var(--pearl);
  background: var(--graphite-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.language-control select:focus-visible,
select:focus-visible,
input:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--crown);
  outline-offset: 3px;
}

.page-main {
  padding-block: 54px 72px;
}

.entry-layout {
  display: grid;
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 250px);
}

.intro-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--crown);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.12;
}

h1 {
  max-width: 13ch;
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 10vw, 5rem);
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.35rem, 4vw, 2rem);
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.lede {
  max-width: 56ch;
  margin: 0;
  color: #d6cec5;
  font-size: 1.08rem;
}

.experience-note {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 520px;
  margin-top: 28px;
  color: var(--ash);
  font-size: 0.9rem;
}

.experience-note p {
  margin: 0;
}

.glow-dot,
.live-indicator i,
.connection-pill i,
.large-status-dot {
  width: 9px;
  height: 9px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(103, 180, 156, 0.7);
  flex: 0 0 auto;
}

.card {
  position: relative;
  padding: 24px;
  background: linear-gradient(145deg, rgba(35, 32, 29, 0.94), rgba(20, 18, 17, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.access-card,
.auth-card {
  width: 100%;
  max-width: 500px;
}

.card-kicker,
.section-heading,
.admin-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-kicker {
  margin-bottom: 30px;
  color: var(--crown);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.live-indicator,
.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #dfd7ce;
  font-size: 0.86rem;
  font-weight: 600;
}

input:not([type="checkbox"]):not([type="file"]),
select:not(.language-control select) {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--pearl);
  background: rgba(7, 7, 6, 0.66);
  border: 1px solid rgba(248, 242, 232, 0.18);
  border-radius: 11px;
}

input::placeholder {
  color: #8c8680;
}

.code-input {
  height: 82px;
  padding-inline: 20px !important;
  color: var(--beam) !important;
  font-size: 2.25rem !important;
  font-weight: 700;
  letter-spacing: 0.38em;
  text-align: center;
}

.field-help,
.subtle {
  color: var(--ash);
  font-size: 0.82rem;
}

.field-help {
  margin: 9px 0 20px;
}

.form-error {
  margin: 12px 0;
  color: #f0a09c;
  font-size: 0.88rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 11px 17px;
  color: var(--pearl);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 650;
  min-width: 0;
  text-decoration: none;
  text-align: center;
  overflow-wrap: anywhere;
  white-space: normal;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button-primary {
  color: #18130b;
  background: linear-gradient(135deg, var(--crown), var(--gold));
  box-shadow: 0 9px 28px rgba(199, 154, 60, 0.15);
}

.button-primary:hover {
  background: linear-gradient(135deg, #ecc86f, #cfa44d);
}

.button-wide {
  width: 100%;
}

.button-quiet {
  background: rgba(248, 242, 232, 0.04);
  border-color: rgba(248, 242, 232, 0.16);
}

.button-quiet:hover {
  border-color: var(--gold);
}

.button-wine,
.button-danger {
  background: var(--wine-bright);
  border-color: rgba(211, 108, 104, 0.45);
}

.button-danger-quiet {
  color: #e9aaa7;
  border-color: rgba(211, 108, 104, 0.28);
}

.button-text {
  color: var(--ash);
  border-color: transparent;
}

.button.compact {
  min-height: 44px;
  padding-inline: 10px;
  font-size: 0.82rem;
}

.queue-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.queue-heading h1,
.admin-title-row h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(2rem, 8vw, 3.6rem);
}

.connection-pill {
  padding: 8px 12px;
  color: #c1ddd4;
  background: rgba(26, 91, 76, 0.2);
  border: 1px solid rgba(103, 180, 156, 0.24);
  border-radius: 999px;
}

.connection-pill.offline {
  color: #e9aaa7;
  background: rgba(99, 48, 51, 0.25);
}

.connection-pill.offline i {
  background: var(--danger);
  box-shadow: none;
}

.status-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 17px;
  color: #f0d8d8;
  background: rgba(99, 48, 51, 0.35);
  border: 1px solid rgba(211, 108, 104, 0.34);
  border-radius: var(--radius-small);
}

.status-banner p,
.status-banner strong {
  display: block;
  margin: 0;
}

.status-banner p {
  margin-top: 3px;
  color: #c9b4b4;
  font-size: 0.86rem;
}

.status-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #f2c2be;
  background: rgba(99, 48, 51, 0.7);
  border-radius: 50%;
  flex: 0 0 auto;
}

.countdown-card {
  position: relative;
  display: grid;
  justify-items: center;
  overflow: hidden;
  padding: 42px 20px 35px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(224, 184, 90, 0.12), transparent 44%),
    linear-gradient(140deg, rgba(42, 35, 27, 0.94), rgba(19, 17, 15, 0.98));
  border: 1px solid rgba(224, 184, 90, 0.38);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.orbital-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border: 1px solid rgba(224, 184, 90, 0.45);
  border-radius: 50%;
}

.orbital-mark::before,
.orbital-mark::after,
.orbital-mark span {
  position: absolute;
  width: 17px;
  height: 17px;
  border: 1px solid var(--crown);
  border-radius: 50% 50% 50% 10%;
  content: "";
  transform-origin: 14px 14px;
}

.orbital-mark::before { transform: rotate(0deg) translateY(-3px); }
.orbital-mark::after { transform: rotate(120deg) translateY(-3px); }
.orbital-mark span { transform: rotate(240deg) translateY(-3px); }

.countdown-label {
  margin: 0;
  color: #dfd7ce;
  font-size: 0.86rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.countdown {
  margin-block: 5px 8px;
  color: var(--beam);
  font-size: clamp(3.15rem, 18vw, 7.4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 1.05;
  text-shadow: 0 0 35px rgba(224, 184, 90, 0.12);
}

.countdown-message {
  margin: 0 0 18px;
  color: var(--ash);
  font-size: 0.84rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-block: 16px;
}

.metric-card {
  display: grid;
  min-height: 138px;
  padding: 18px;
  background: rgba(25, 23, 21, 0.88);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-small);
}

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

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

.metric-label {
  align-self: end;
  margin-top: 14px;
  color: var(--ash);
  font-size: 0.76rem;
}

.metric-value {
  color: var(--pearl);
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.metric-time {
  font-size: 1.35rem;
}

.ahead-card {
  margin-top: 16px;
  box-shadow: none;
}

.section-heading h2 {
  margin-bottom: 0;
}

.count-badge,
.step-badge {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding-inline: 8px;
  color: var(--crown);
  background: rgba(199, 154, 60, 0.09);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.ahead-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
  counter-reset: queue;
}

.ahead-list li {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 50px;
  padding: 10px 13px;
  background: rgba(248, 242, 232, 0.025);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  counter-increment: queue;
}

.ahead-list li::before {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--crown);
  background: rgba(199, 154, 60, 0.09);
  border-radius: 50%;
  content: counter(queue, decimal-leading-zero);
  font-size: 0.7rem;
  flex: 0 0 auto;
}

.empty-note {
  margin: 22px 0 0;
  color: var(--ash);
}

.arrival-note {
  display: flex;
  gap: 13px;
  margin-top: 16px;
  padding: 18px;
  color: #ded5c9;
  background: rgba(27, 67, 103, 0.14);
  border-left: 2px solid #5686ad;
  border-radius: 4px var(--radius-small) var(--radius-small) 4px;
}

.arrival-note-icon {
  color: #83acd0;
}

.arrival-note p,
.arrival-note span {
  margin: 0;
}

.arrival-note strong,
.arrival-note p > span {
  display: block;
}

.arrival-note p > span {
  margin-top: 3px;
  color: var(--ash);
  font-size: 0.84rem;
}

.client-actions {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}

.site-footer {
  padding-block: 28px calc(28px + var(--safe-bottom));
  color: #8c8680;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8rem;
}

.site-footer p {
  max-width: 88ch;
  margin: 0 0 7px;
}

.site-footer strong {
  color: #9d8a6c;
}

.admin-link {
  display: inline-block;
  margin-top: 10px;
  color: #8c8680;
}

.dialog-card {
  width: min(calc(100% - var(--safe-left) - var(--safe-right) - 28px), 480px);
  max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 28px);
  overflow-y: auto;
  padding: 0;
  color: var(--pearl);
  background: var(--graphite-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 100px #000;
}

.dialog-card::backdrop {
  background: rgba(5, 4, 4, 0.78);
  backdrop-filter: blur(4px);
}

.dialog-card form {
  position: relative;
  padding: 28px;
}

.dialog-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ash);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 1.6rem;
}

.dialog-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--crown);
  background: rgba(199, 154, 60, 0.1);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.danger-symbol {
  color: #f0a09c;
  background: rgba(99, 48, 51, 0.35);
  border-color: rgba(211, 108, 104, 0.35);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-block: 22px;
  padding: 14px;
  background: rgba(99, 48, 51, 0.22);
  border-radius: 10px;
}

.check-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--gold);
  flex: 0 0 auto;
}

.dialog-actions {
  display: grid;
  gap: 9px;
}

.toast-region {
  position: fixed;
  right: calc(16px + var(--safe-right));
  bottom: calc(16px + var(--safe-bottom));
  z-index: 150;
  display: grid;
  width: min(calc(100% - var(--safe-left) - var(--safe-right) - 32px), 390px);
  gap: 8px;
}

.toast {
  padding: 14px 16px;
  color: var(--pearl);
  background: #292522;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow);
  animation: toast-in 220ms ease-out;
}

.toast.error {
  border-color: rgba(211, 108, 104, 0.5);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
}

/* Admin */
.header-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.admin-auth-wrap {
  display: grid;
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 240px);
}

.auth-card h2 {
  margin-bottom: 25px;
}

.auth-card input {
  margin-bottom: 17px;
}

.admin-title-row {
  align-items: flex-end;
  margin-bottom: 28px;
}

.admin-title-row .subtle {
  margin: 8px 0 0;
  font-variant-numeric: tabular-nums;
}

.service-control-card,
.duration-card {
  box-shadow: none;
}

.large-status-dot {
  width: 13px;
  height: 13px;
  margin-top: 7px;
}

.large-status-dot.paused {
  background: var(--danger);
  box-shadow: 0 0 16px rgba(211, 108, 104, 0.5);
}

.control-actions {
  display: grid;
  gap: 9px;
  margin-top: 24px;
}

.duration-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.duration-input-row input {
  max-width: 112px;
  font-size: 1.4rem;
  font-weight: 650;
  text-align: center;
}

.duration-card select {
  margin-bottom: 14px;
  border-radius: 11px;
}

.duration-card {
  width: 100%;
  max-width: 560px;
  margin-top: 36px;
}

.add-guest-card {
  margin-top: 42px;
  margin-bottom: 0;
  box-shadow: none;
}

.guest-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 18px;
  color: var(--ash);
  text-align: center;
  background: rgba(7, 7, 6, 0.46);
  border: 1px dashed rgba(224, 184, 90, 0.4);
  border-radius: 12px;
}

.upload-zone:hover {
  border-color: var(--crown);
}

.upload-zone:focus-within {
  border-color: var(--crown);
  outline: 3px solid var(--crown);
  outline-offset: 3px;
}

.upload-zone input:focus-visible {
  outline: 0;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-zone strong {
  color: var(--pearl);
}

.upload-zone > span:last-of-type {
  font-size: 0.76rem;
}

.upload-icon {
  margin-bottom: 8px;
  color: var(--crown);
  font-size: 2rem;
}

.upload-zone img {
  width: 100%;
  max-height: 220px;
  margin-top: 12px;
  object-fit: contain;
  border-radius: 8px;
}

.queue-admin-section {
  margin-top: 30px;
}

.admin-section-heading {
  margin-bottom: 16px;
}

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

.admin-queue-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  padding: 15px;
  background: rgba(25, 23, 21, 0.9);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-small);
}

.admin-queue-item.active {
  background: linear-gradient(110deg, rgba(55, 43, 26, 0.8), rgba(25, 23, 21, 0.96));
  border-color: rgba(224, 184, 90, 0.42);
}

.queue-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--crown);
  background: rgba(199, 154, 60, 0.1);
  border-radius: 50%;
  font-size: 0.76rem;
  font-weight: 700;
}

.queue-item-main {
  min-width: 0;
}

.queue-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.queue-item-top h3 {
  margin: 0;
}

.queue-guest-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
  min-width: 0;
}

.guest-access-code {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: #17130d;
  background: var(--beam);
  border-radius: 999px;
  direction: ltr;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  color: #d7d1ca;
  background: rgba(248, 242, 232, 0.05);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-chip.active {
  color: var(--beam);
  background: rgba(199, 154, 60, 0.12);
  border-color: var(--line);
}

.status-chip.cancelled {
  color: #e9aaa7;
}

.queue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 5px 0 0;
  color: var(--ash);
  font-size: 0.76rem;
}

.queue-live-timing {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin: 9px 0 0;
  font-size: 0.78rem;
}

.queue-row-countdown {
  color: var(--beam);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.queue-row-exact-time {
  color: #d7d1ca;
  font-variant-numeric: tabular-nums;
}

.queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.slip-thumbnail {
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  border: 1px solid rgba(224, 184, 90, 0.38);
  border-radius: 0.55rem;
  object-fit: cover;
  background: var(--pearl);
}

.queue-actions button[data-action="slip"] {
  gap: 0.55rem;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
}

.queue-actions .button {
  min-height: 44px;
  padding: 8px 11px;
  font-size: 0.82rem;
}

.empty-admin-state {
  display: grid;
  justify-items: center;
  padding-block: 46px;
  color: var(--ash);
  text-align: center;
  box-shadow: none;
}

.empty-admin-state > span {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 2rem;
}

.empty-admin-state p {
  max-width: 45ch;
  margin: 0;
}

.history-panel {
  margin-top: 36px;
  padding: 18px;
  background: rgba(17, 16, 15, 0.45);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.history-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}

.history-panel summary::-webkit-details-marker {
  display: none;
}

.history-panel summary strong,
.history-panel summary span {
  display: block;
}

.history-list {
  margin-top: 18px;
}

.history-list .admin-queue-item {
  opacity: 0.8;
}

.code-dialog {
  text-align: center;
}

.code-dialog .dialog-symbol {
  margin-inline: auto;
}

.new-code {
  display: block;
  margin-block: 20px 12px;
  color: var(--beam);
  font-size: clamp(3rem, 18vw, 5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.22em;
  line-height: 1;
}

.image-dialog {
  width: min(calc(100% - var(--safe-left) - var(--safe-right) - 20px), 900px);
  background: #070706;
}

.image-dialog form {
  padding: 0;
}

.image-dialog img {
  width: 100%;
  max-height: calc(100dvh - 30px);
  object-fit: contain;
}

.image-close {
  z-index: 2;
  color: white;
  background: rgba(0, 0, 0, 0.65);
}

@media (max-width: 420px) {
  .admin-header {
    gap: 8px;
  }

  .admin-header .brand-copy {
    display: none;
  }

  .header-actions {
    min-width: 0;
  }
}

@media (min-width: 720px) {
  .shell { width: min(calc(100% - 64px), var(--shell)); }
  .site-header { min-height: 104px; }
  .brand img { width: 72px; height: 67px; }
  .brand-copy strong { font-size: 0.94rem; }
  .brand-copy span { font-size: 0.8rem; }
  .page-main { padding-block: 78px 92px; }
  .card { padding: 30px; }
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-wide-mobile { grid-column: auto; }
  .client-actions { display: flex; justify-content: center; }
  .dialog-actions { grid-template-columns: 1fr 1fr; }
  .control-actions { grid-template-columns: 1fr 1fr; }
  .guest-form { grid-template-columns: 1fr 1fr; }
  .slip-field, .guest-form .form-error, .guest-submit { grid-column: 1 / -1; }
  .admin-queue-item { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 18px; }
  .queue-actions { grid-column: auto; justify-content: flex-end; padding: 0 0 0 12px; border-top: 0; border-left: 1px solid var(--line-soft); }
}

@media (min-width: 940px) {
  .entry-layout, .admin-auth-wrap { grid-template-columns: minmax(0, 1.25fr) minmax(390px, 0.75fr); gap: 80px; }
  .access-card, .auth-card { justify-self: end; }
  .countdown-card { padding-block: 55px 45px; }
}

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