/* Top bar ----------------------------------------------------------------*/
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-topbar);
  height: calc(var(--topbar-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.94), rgba(5, 6, 10, 0.66) 70%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid rgba(217, 179, 108, 0.09);
}

.topbar__inner {
  width: min(100%, var(--content-max));
  height: var(--topbar-h);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  padding-left: max(var(--page-pad), var(--safe-left));
  padding-right: max(var(--page-pad), var(--safe-right));
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.topbar__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Buttons ----------------------------------------------------------------*/
.btn {
  --btn-bg: rgba(255, 255, 255, 0.045);
  --btn-border: rgba(217, 179, 108, 0.22);
  --btn-ink: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-md);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.btn svg {
  flex: none;
  opacity: 0.9;
}

.btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn::after {
  content: "";
  position: absolute;
  inset: -60% -30%;
  z-index: -1;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.16) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform 0.7s var(--ease-out);
}

.btn:hover::after {
  transform: translateX(110%);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn:disabled::after {
  display: none;
}

.btn--primary {
  --btn-bg: linear-gradient(180deg, #e8c887, #c89b52);
  --btn-border: rgba(255, 236, 191, 0.65);
  --btn-ink: #1a1308;
  box-shadow: 0 10px 28px rgba(217, 179, 108, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--primary:hover {
  background: linear-gradient(180deg, #f2d79e, #d4a75d);
  box-shadow: 0 14px 36px rgba(217, 179, 108, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn--danger {
  --btn-bg: linear-gradient(180deg, #b23a45, #87212c);
  --btn-border: rgba(255, 148, 158, 0.38);
  --btn-ink: #fff4ef;
  box-shadow: 0 10px 26px rgba(168, 40, 52, 0.22);
}

.btn--danger:hover {
  background: linear-gradient(180deg, #c84551, #9a2834);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-border: rgba(217, 179, 108, 0.28);
}

.btn--quiet {
  --btn-bg: transparent;
  --btn-border: transparent;
  --btn-ink: var(--ink-dim);
  padding: 0 var(--space-3);
}

.btn--quiet:hover {
  --btn-ink: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.btn--lg {
  min-height: 56px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-lg);
  font-size: var(--fs-md);
}

.btn--sm {
  min-height: 34px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
}

.btn--icon {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn--icon.btn--sm {
  width: 34px;
  min-height: 34px;
}

.btn--block {
  width: 100%;
}

.btn--gold-ghost {
  --btn-bg: rgba(217, 179, 108, 0.08);
  --btn-border: rgba(217, 179, 108, 0.35);
  --btn-ink: var(--gold-soft);
}

.btn--glow {
  animation: pulse-ring 2.6s ease-out infinite;
}

.icon {
  flex: none;
}

/* Icon button ------------------------------------------------------------*/
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ink-dim);
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.icon-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.icon-btn.is-active {
  color: var(--gold);
  border-color: var(--line-strong);
  background: rgba(217, 179, 108, 0.08);
}

/* Panels -----------------------------------------------------------------*/
.panel {
  position: relative;
  background: linear-gradient(165deg, rgba(24, 29, 45, 0.78), rgba(11, 14, 22, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(14px) saturate(1.05);
}

.panel--flat {
  background: rgba(15, 19, 30, 0.62);
  box-shadow: none;
}

.panel--gold {
  border-color: rgba(217, 179, 108, 0.32);
  box-shadow: var(--glow-gold), var(--shadow-2);
}

.panel--danger {
  border-color: rgba(216, 75, 87, 0.32);
  box-shadow: var(--glow-crimson), var(--shadow-2);
}

.panel__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
}

.panel__title {
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 650;
}

.panel__body {
  padding: var(--space-5);
}

.panel__foot {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--line);
}

/* Badges & chips ---------------------------------------------------------*/
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(217, 179, 108, 0.25);
  background: rgba(217, 179, 108, 0.08);
  color: var(--gold-soft);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

.badge--muted {
  border-color: rgba(143, 149, 166, 0.28);
  background: rgba(143, 149, 166, 0.08);
  color: var(--muted);
}

.badge--danger {
  border-color: rgba(216, 75, 87, 0.38);
  background: rgba(216, 75, 87, 0.1);
  color: var(--crimson-soft);
}

.badge--town {
  border-color: rgba(92, 192, 138, 0.35);
  background: rgba(92, 192, 138, 0.09);
  color: var(--town-soft);
}

.badge--violet {
  border-color: rgba(176, 124, 255, 0.35);
  background: rgba(176, 124, 255, 0.09);
  color: var(--violet-soft);
}

.badge--dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 32px;
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-dim);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s ease;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.chip.is-active {
  color: var(--night-1);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border-color: transparent;
}

.chip--static {
  cursor: default;
}

/* Tabs -------------------------------------------------------------------*/
.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  flex: none;
  padding: var(--space-3) var(--space-4);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.tab::after {
  content: "";
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: -1px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease-out);
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  color: var(--gold-soft);
}

.tab.is-active::after {
  transform: scaleX(1);
}

.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
}

.seg__btn {
  min-height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 650;
  transition: 0.2s ease;
}

.seg__btn.is-active {
  background: rgba(217, 179, 108, 0.14);
  color: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(217, 179, 108, 0.2);
}

/* Forms ------------------------------------------------------------------*/
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--ink-dim);
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field__hint {
  color: var(--muted-2);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.field__error {
  color: var(--danger);
  font-size: var(--fs-xs);
  min-height: 1em;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 var(--space-4);
  border: 1px solid rgba(160, 176, 210, 0.18);
  border-radius: var(--radius-md);
  background: rgba(4, 6, 11, 0.5);
  color: var(--ink);
  font-size: var(--fs-base);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: rgba(160, 176, 210, 0.3);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 179, 108, 0.11);
  background: rgba(4, 6, 11, 0.7);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.textarea {
  min-height: 92px;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
  line-height: 1.45;
}

.select {
  padding-right: var(--space-8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a9a89f' stroke-width='1.6'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  cursor: pointer;
}

.input-group {
  display: flex;
  gap: var(--space-2);
}

.input-group .input {
  flex: 1;
  min-width: 0;
}

.input-group .btn {
  min-height: 46px;
}

.code-input {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
  padding-left: calc(var(--space-4) + 0.28em);
}

/* Range ------------------------------------------------------------------*/
input[type="range"] {
  --range-fill: 50%;
  width: 100%;
  height: 26px;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) var(--range-fill), rgba(255, 255, 255, 0.12) var(--range-fill));
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 2px solid var(--night-1);
  box-shadow: 0 0 14px rgba(217, 179, 108, 0.45);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 2px solid var(--night-1);
  box-shadow: 0 0 14px rgba(217, 179, 108, 0.45);
}

.range-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.range-row output {
  min-width: 3.4em;
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--gold-soft);
}

/* Switch -----------------------------------------------------------------*/
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch__track {
  position: relative;
  flex: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: 0.25s ease;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-dim);
  transition: 0.25s var(--ease-spring);
}

.switch input:checked + .switch__track {
  background: rgba(217, 179, 108, 0.5);
  border-color: rgba(217, 179, 108, 0.7);
}

.switch input:checked + .switch__track::after {
  transform: translateX(20px);
  background: var(--gold-soft);
  box-shadow: 0 0 12px rgba(217, 179, 108, 0.5);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.switch__text {
  font-size: var(--fs-sm);
  color: var(--ink-dim);
}

/* Stepper ----------------------------------------------------------------*/
.stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 3px;
  background: rgba(4, 6, 11, 0.4);
}

.stepper button {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--ink-dim);
  display: grid;
  place-items: center;
  transition: 0.18s ease;
}

.stepper button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.stepper output,
.stepper input {
  width: 4ch;
  text-align: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-md);
}

/* Avatars ----------------------------------------------------------------*/
.avatar {
  --avatar-size: 48px;
  --avatar-accent: var(--gold);
  position: relative;
  display: inline-grid;
  place-items: stretch;
  flex: none;
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 28%;
  padding: 2px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--avatar-accent) 55%, transparent), rgba(255, 255, 255, 0.04)),
    rgba(8, 10, 17, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.35);
}

.avatar__inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.12), transparent 55%),
    linear-gradient(160deg, #1a2032, #0b0e16);
  display: grid;
  place-items: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.avatar__monogram {
  font-family: var(--font-display);
  font-size: calc(var(--avatar-size) * 0.38);
  font-weight: 700;
  color: var(--avatar-accent);
  text-shadow: 0 0 16px color-mix(in srgb, var(--avatar-accent) 40%, transparent);
  letter-spacing: 0.02em;
}

.avatar--xs {
  --avatar-size: 26px;
}

.avatar--sm {
  --avatar-size: 34px;
}

.avatar--md {
  --avatar-size: 56px;
}

.avatar--lg {
  --avatar-size: 72px;
}

.avatar--xl {
  --avatar-size: 104px;
}

.avatar--dead {
  filter: grayscale(0.85) brightness(0.62);
}

.avatar--dead::after {
  content: "";
  position: absolute;
  inset: -6%;
  background:
    linear-gradient(45deg, transparent 46%, rgba(216, 75, 87, 0.9) 47% 53%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, rgba(216, 75, 87, 0.7) 47% 53%, transparent 54%);
  border-radius: 30%;
  pointer-events: none;
}

.avatar__crown {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f0d9a5, #b8853b);
  color: #241809;
  border: 2px solid var(--night-1);
  z-index: 2;
}

.avatar__bot {
  position: absolute;
  bottom: -5px;
  right: -5px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(8, 11, 18, 0.95);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  z-index: 2;
}

/* Modal ------------------------------------------------------------------*/
.modal-root {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: var(--space-4);
  pointer-events: none;
}

.modal-root:empty {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(10, 13, 22, 0.6), rgba(2, 3, 6, 0.9));
  backdrop-filter: blur(8px);
  animation: fade-in 0.25s ease both;
  pointer-events: auto;
}

.modal {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: min(86dvh, 820px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(165deg, rgba(27, 33, 50, 0.98), rgba(9, 12, 20, 0.99));
  border: 1px solid rgba(217, 179, 108, 0.3);
  border-radius: var(--radius-xl);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.38s var(--ease-out) both;
  pointer-events: auto;
  overflow: hidden;
}

.modal--wide {
  width: min(100%, 820px);
}

.modal--role {
  width: min(100%, 500px);
}

.modal__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--line);
}

.modal__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 600;
}

.modal__sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.modal__body {
  padding: var(--space-5);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal__foot {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding: var(--space-4) var(--space-5) calc(var(--space-5) + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 12, 0.35);
}

.modal__close {
  flex: none;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .modal-root {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92dvh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-bottom: 0;
    animation: sheet-in 0.4s var(--ease-out) both;
  }

  .modal__foot {
    position: sticky;
    bottom: 0;
  }

  @keyframes sheet-in {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Toasts -----------------------------------------------------------------*/
.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(var(--space-6) + var(--safe-bottom));
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  width: min(92vw, 480px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: fit-content;
  max-width: 100%;
  padding: 10px var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(12, 16, 26, 0.95);
  color: var(--ink);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(12px);
  animation: toast-in 0.35s var(--ease-out) both;
  pointer-events: auto;
}

.toast svg {
  color: var(--gold);
}

.toast--danger {
  border-color: rgba(216, 75, 87, 0.45);
}

.toast--danger svg {
  color: var(--danger);
}

.toast--town {
  border-color: rgba(92, 192, 138, 0.45);
}

.toast--town svg {
  color: var(--town);
}

.toast.is-leaving {
  animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}

/* Loading ----------------------------------------------------------------*/
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(217, 179, 108, 0.2);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}

.spinner--lg {
  width: 38px;
  height: 38px;
  border-width: 3px;
}

.loading-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-12) var(--space-4);
  color: var(--muted);
  text-align: center;
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.04) 20%,
    rgba(255, 255, 255, 0.09) 40%,
    rgba(255, 255, 255, 0.04) 60%
  );
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}

/* Empty / error ----------------------------------------------------------*/
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-10) var(--space-4);
  text-align: center;
  color: var(--muted);
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(217, 179, 108, 0.05);
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.empty__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.empty__text {
  max-width: 38ch;
  font-size: var(--fs-sm);
}

.notice {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(217, 179, 108, 0.05);
  color: var(--ink-dim);
  font-size: var(--fs-sm);
}

.notice svg {
  flex: none;
  margin-top: 2px;
  color: var(--gold);
}

.notice--danger {
  border-color: rgba(216, 75, 87, 0.3);
  background: rgba(216, 75, 87, 0.06);
}

.notice--danger svg {
  color: var(--danger);
}

.notice--town {
  border-color: rgba(92, 192, 138, 0.3);
  background: rgba(92, 192, 138, 0.06);
}

.notice--town svg {
  color: var(--town);
}

/* Misc -------------------------------------------------------------------*/
.kbd {
  display: inline-block;
  min-width: 1.8em;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.72em;
  text-align: center;
  color: var(--ink-dim);
}

.code-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(4, 6, 11, 0.5);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--gold-soft);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat__value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--ink);
}

.stat__label {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
}

.dot--live {
  background: var(--town);
  box-shadow: 0 0 8px var(--town);
}

.dot--wait {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.dot--dead {
  background: var(--crimson);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
