/* CopiMine release UI: shared public, player and admin design system. */
:root,
:root[data-theme="light"] {
  --bg: #edf4ef;
  --bg-deep: #dfeae3;
  --surface: #ffffff;
  --surface-soft: #f4f8f5;
  --surface-strong: #e5eee7;
  --surface-raised: #ffffff;
  --ink: #102119;
  --muted: #4f6257;
  --faint: #748278;
  --line: #c9d7cd;
  --line-strong: #a8bbaa;
  --accent: #1f7a42;
  --accent-strong: #145a31;
  --accent-soft: #dcefe2;
  --teal: #2b706b;
  --teal-soft: #dcecea;
  --brass: #946516;
  --brass-soft: #f4e8c8;
  --red: #a63830;
  --red-soft: #f8dfdc;
  --on-accent: #ffffff;
  --focus: #147a4c;
  --shadow-1: 0 4px 14px rgba(18, 45, 29, .08);
  --shadow-2: 0 12px 30px rgba(18, 45, 29, .13);
  --shadow-focus: 0 0 0 3px rgba(31, 122, 66, .2);
  --body-gradient: linear-gradient(145deg, #e7f0e9 0%, #f8fbf8 46%, #e6f0ed 100%);
  --surface-gradient: linear-gradient(145deg, rgba(255, 255, 255, .99), rgba(244, 249, 246, .97));
  --accent-gradient: linear-gradient(135deg, #247d47 0%, #277762 58%, #286b72 100%);
  --status-gradient: linear-gradient(90deg, rgba(31, 122, 66, .16), rgba(43, 112, 107, .08));
  --r-sm: 3px;
  --r: 4px;
  --r-lg: 6px;
  --speed-fast: 140ms;
  --speed: 200ms;
  --speed-slow: 260ms;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #08130d;
  --bg-deep: #050c08;
  --surface: #13251a;
  --surface-soft: #192f21;
  --surface-strong: #23432d;
  --surface-raised: #1a3122;
  --ink: #f2fff4;
  --muted: #bdd3c2;
  --faint: #95ac9b;
  --line: #345841;
  --line-strong: #4f7b5b;
  --accent: #6fe495;
  --accent-strong: #a1f2b8;
  --accent-soft: #214d31;
  --teal: #78c9bc;
  --teal-soft: #1b3934;
  --brass: #e0b75a;
  --brass-soft: #3a301b;
  --red: #f08479;
  --red-soft: #4d2926;
  --on-accent: #071d10;
  --focus: #7df2a2;
  --shadow-1: 0 5px 18px rgba(0, 0, 0, .24);
  --shadow-2: 0 18px 42px rgba(0, 0, 0, .34);
  --shadow-focus: 0 0 0 3px rgba(111, 228, 149, .22);
  --body-gradient: linear-gradient(145deg, #050d08 0%, #0a1710 46%, #09201c 100%);
  --surface-gradient: linear-gradient(145deg, rgba(25, 48, 33, .98), rgba(15, 34, 24, .98));
  --accent-gradient: linear-gradient(135deg, #6fe495 0%, #55c9ad 58%, #65aebb 100%);
  --status-gradient: linear-gradient(90deg, rgba(111, 228, 149, .17), rgba(120, 201, 188, .07));
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg-deep);
  color: var(--ink);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--body-gradient);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: -1;
  height: 340px;
  background: linear-gradient(110deg, rgba(31, 122, 66, .08), transparent 45%, rgba(43, 112, 107, .08));
  pointer-events: none;
}

button,
input,
select,
textarea { font: inherit; }

button,
a,
input,
select,
textarea { -webkit-tap-highlight-color: transparent; }

[hidden],
.hidden { display: none !important; }

::selection { background: var(--accent-soft); color: var(--ink); }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus) !important;
  outline-offset: 2px;
  box-shadow: var(--shadow-focus) !important;
}

h1,
h2,
h3,
h4,
p { letter-spacing: 0; }

.public-site,
.page-shell,
.app-shell,
.cabinet-shell,
.admin-shell {
  width: min(calc(100% - 32px), 1240px);
  margin-inline: auto;
}

/* Navigation */
.public-nav {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-1);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 184px;
  color: var(--ink) !important;
  text-decoration: none;
}

.public-brand-logo {
  width: 54px !important;
  height: 54px !important;
  max-width: 54px;
  max-height: 54px;
  flex: 0 0 54px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  object-fit: contain;
  display: block;
  box-shadow: var(--shadow-1);
}

.public-brand-copy { display: grid; gap: 1px; }
.public-brand-copy strong { color: var(--ink); font-size: 1.05rem; }
.public-brand-copy small { color: var(--muted); font-size: .75rem; }

.public-nav nav,
.app-nav,
.topbar nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.public-nav nav > a,
.app-nav a,
.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--muted) !important;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--speed-fast) ease, border-color var(--speed-fast) ease, background-color var(--speed-fast) ease, transform var(--speed-fast) ease;
}

.public-nav nav > a:hover,
.public-nav nav > a[aria-current="page"],
.app-nav a[aria-current="page"] {
  border-color: var(--line);
  background: var(--status-gradient);
  color: var(--accent-strong) !important;
  transform: translateY(-1px);
}

.public-mobile-toggle { display: none !important; }

/* Controls */
.btn,
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--r) !important;
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--speed-fast) ease, border-color var(--speed-fast) ease, background-color var(--speed-fast) ease, transform var(--speed-fast) ease, box-shadow var(--speed-fast) ease;
}

.btn:hover,
button:hover,
.button:hover {
  border-color: var(--accent) !important;
  color: var(--accent-strong) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}

.btn:active,
button:active,
.button:active { transform: translateY(0); box-shadow: none; }

.btn-primary,
.button-primary,
.preview-button.is-primary {
  border-color: transparent !important;
  background: var(--accent-gradient) !important;
  color: var(--on-accent) !important;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 24%, transparent);
}

.btn-primary:hover,
.button-primary:hover,
.preview-button.is-primary:hover { color: var(--on-accent) !important; filter: saturate(1.08); }

.btn-secondary { background: var(--surface) !important; color: var(--accent-strong) !important; }
.btn-ghost { border-color: transparent !important; background: transparent !important; color: var(--muted) !important; box-shadow: none; }
.btn-danger,
.button-danger { border-color: var(--red) !important; background: var(--red-soft) !important; color: var(--red) !important; }
.btn-wide { width: 100%; }
.icon-btn { width: 44px; padding: 0; }

:where(button, .btn, .button, input, select, textarea):disabled,
:where(button, .btn, .button)[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

input,
select,
textarea {
  min-height: 44px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--r) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  transition: border-color var(--speed-fast) ease, background-color var(--speed-fast) ease, box-shadow var(--speed-fast) ease;
}

textarea { min-height: 112px; resize: vertical; }
input::placeholder,
textarea::placeholder { color: var(--faint); opacity: 1; }
input:hover,
select:hover,
textarea:hover { border-color: var(--accent) !important; }
label,
.field-label { color: var(--muted); font-weight: 650; }

input[type="number"] { font-variant-numeric: tabular-nums; }

input[type="range"] {
  min-height: 44px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  accent-color: var(--accent);
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--accent), var(--teal));
}

input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: var(--shadow-1);
  -webkit-appearance: none;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(92px, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-strong);
}

.segmented > button,
.segmented > .btn {
  min-height: 38px;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none;
}

.segmented > .active,
.segmented > [aria-selected="true"],
.segmented > [aria-pressed="true"] {
  background: var(--surface) !important;
  color: var(--accent-strong) !important;
  box-shadow: var(--shadow-1);
}

.ui-switch,
.theme-toggle.ui-switch {
  min-width: 88px;
  gap: 8px;
  white-space: nowrap;
}

.theme-toggle-icon {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex: 0 0 36px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-strong);
  transition: background-color var(--speed) ease, border-color var(--speed) ease;
}

.theme-toggle-icon::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
  transition: transform var(--speed) cubic-bezier(.2, .8, .2, 1), background-color var(--speed) ease;
}

:root[data-theme="dark"] .theme-toggle-icon {
  border-color: var(--accent);
  background: var(--accent-soft);
}

:root[data-theme="dark"] .theme-toggle-icon::after {
  transform: translateX(16px);
  background: var(--accent);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.toggle-row input[type="checkbox"] {
  position: relative;
  width: 38px;
  min-width: 38px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 11px !important;
  background: var(--surface-strong) !important;
  appearance: none;
  cursor: pointer;
}

.toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--faint);
  transition: transform var(--speed-fast) ease, background-color var(--speed-fast) ease;
}

.toggle-row input[type="checkbox"]:checked { background: var(--accent-soft) !important; border-color: var(--accent) !important; }
.toggle-row input[type="checkbox"]:checked::after { transform: translateX(16px); background: var(--accent-strong); }

/* Public first viewport */
.public-page-shell { padding: 22px 0 48px; }

.public-hero,
.hero,
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: stretch;
  padding: 30px 0 24px;
}

.public-hero-copy {
  min-width: 0;
  align-self: center;
  padding: 22px 8px 22px 0;
}

.public-hero-copy .page-kicker-row { display: none; }

.public-hero-copy h1,
.hero h1,
.page-hero h1 {
  max-width: 720px;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 4rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.public-hero-copy > p,
.hero > p,
.page-hero > p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.hero-inline-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.hero-inline-card {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--status-gradient);
}

.hero-inline-card span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-inline-card strong { display: block; margin-top: 4px; color: var(--ink); }

.public-hero-side {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(245px, .84fr);
  gap: 12px;
  min-width: 0;
}

.hero-media-card,
.hero-side-card,
.scene-card,
.showcase-card,
.public-panel,
.panel,
.card,
.surface,
.metric,
.table-shell,
.form-card,
.modal,
.dialog {
  border: 1px solid var(--line) !important;
  border-radius: var(--r-lg) !important;
  background: var(--surface-gradient) !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-1);
}

.hero-media-card,
.hero-side-card,
.scene-card,
.showcase-card,
.public-panel,
.panel,
.card,
.surface { padding: 18px; }

.hero-media-card,
.hero-side-card { min-width: 0; }

.hero-media-card { display: grid; grid-template-rows: auto 1fr; gap: 14px; }
.hero-media-art { overflow: hidden; border-radius: var(--r); background: var(--surface-strong); }
.hero-media-art .hero-scene-image,
.scene-card-image {
  display: block;
  width: 100% !important;
  height: 220px !important;
  max-height: none;
  border: 0;
  border-radius: var(--r);
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2, .7, .2, 1), opacity var(--speed) ease;
}

.hero-media-card:hover .hero-scene-image { transform: scale(1.025); }
.theme-dark-asset { display: none !important; }
:root[data-theme="dark"] .theme-light-asset { display: none !important; }
:root[data-theme="dark"] .theme-dark-asset { display: block !important; }

.hero-media-copy strong,
.hero-side-card strong { color: var(--ink); }
.hero-media-copy p,
.hero-side-card p,
.hero-side-note p { color: var(--muted); }
.hero-sprite-strip,
.public-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-sprite-strip { margin-top: 12px; }
.hero-sprite-chip {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-soft);
}
.hero-sprite-chip img { width: 28px; height: 28px; image-rendering: pixelated; }

.hero-side-card { display: grid; align-content: start; gap: 16px; }
.hero-side-card .login-copy,
.hero-side-note { padding: 14px 0 0; border-top: 1px solid var(--line); background: transparent !important; box-shadow: none !important; }
.public-actions > * { flex: 1 1 150px; }

.hero-kicker,
.eyebrow,
.section-head > span,
.auth-kicker,
.auth-section-kicker {
  color: var(--accent-strong) !important;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.public-section,
.content-section,
.section { padding: 30px 0; }
.public-page-shell > section { margin-bottom: 16px; }
.section-head { max-width: 720px; margin-bottom: 18px; }
.section-head h2 { margin: 5px 0 8px; color: var(--ink); font-size: 2rem; line-height: 1.16; }
.section-head p { margin: 0; color: var(--muted); }

.public-dashboard-grid,
.dashboard-grid,
.workspace-grid,
.layout-grid { display: grid; gap: 14px !important; align-items: start; }
.public-dashboard-grid { grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); }
.public-panel-wide { grid-column: span 1; }
.public-panel h2,
.public-panel h3,
.panel h2,
.panel h3,
.card h2,
.card h3 { margin-top: 0; color: var(--ink); }
.public-panel p,
.panel p,
.card p,
.muted,
.subtle { color: var(--muted) !important; }

.public-status-grid,
.public-online-board,
.treasury-history-grid,
.shop-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.public-shop-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.public-shop-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-gradient);
  box-shadow: var(--shadow-1);
  transition: transform var(--speed) ease, border-color var(--speed) ease, box-shadow var(--speed) ease;
}
.public-shop-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.public-shop-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.shop-item-chip { padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-soft); }
.budget-counter-value { display: flex; align-items: center; gap: 10px; font-size: 1.7rem; }
.budget-counter-value img { width: 34px; height: 34px; image-rendering: pixelated; }

/* Auth */
.auth-shell { max-width: 920px; margin: 0 auto; }
.auth-card { padding: 24px; }
.auth-card-head { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.auth-brand-logo { width: 62px !important; height: 62px !important; flex: 0 0 62px; border-radius: var(--r); object-fit: cover; }
.auth-card-copy h1 { margin: 4px 0 7px; font-size: 2rem; }
.auth-card-copy p { margin: 0; color: var(--muted); }
.auth-card-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: 24px; padding-top: 22px; }
.auth-card-section-note { padding-right: 20px; border-right: 1px solid var(--line); }
.auth-form { display: grid; gap: 9px; }
.auth-checkbox { display: flex; align-items: center; gap: 9px; font-weight: 450; }
.auth-checkbox input { width: 18px; min-width: 18px; height: 18px; min-height: 18px; padding: 0; accent-color: var(--accent); }
.auth-links { margin-top: 14px; }

/* Status, notices and data */
.status-chip,
.route-chip,
.pill,
.badge,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line) !important;
  border-radius: var(--r) !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  font-size: .78rem;
  font-weight: 700;
}

.notice { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-soft); color: var(--muted); }
.notice.good,
.status-good { border-left: 3px solid var(--accent) !important; }
.notice.warn,
.status-warn { border-left: 3px solid var(--brass) !important; background: var(--brass-soft) !important; }
.notice.bad,
.status-bad { border-left: 3px solid var(--red) !important; background: var(--red-soft) !important; }

.loading {
  position: relative;
  overflow: hidden;
  color: var(--muted);
}

/* Persistent result for money, transfer, purchase and recipe actions. Native
   alerts block the cabinet and make the next click look broken, so the result
   remains visible without locking the page. */
.operation-status {
  display: block;
  margin: 0 0 12px;
  padding: 11px 14px;
  border: 1px solid var(--release-line-strong, #5a8f69);
  border-left: 4px solid var(--release-accent, #43bd73);
  border-radius: 10px;
  background: var(--release-surface, rgba(18, 43, 29, .92));
  color: var(--release-ink, #eff8f0);
  font-weight: 700;
}
.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 40px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 12px 15px;
  border: 1px solid var(--release-line-strong, #5a8f69);
  border-left: 4px solid var(--release-accent, #43bd73);
  border-radius: 10px;
  background: var(--release-surface, #10251a);
  color: var(--release-ink, #eff8f0);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .3);
  font-weight: 700;
  animation: ui-toast-in .18s ease-out both;
}
.toast.bad { border-color: #d97272; border-left-color: #e75d5d; color: #ffd9d9; }
@keyframes ui-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
:root[data-theme="light"] .toast { background: #f8fcf8; color: #173722; }
:root[data-theme="light"] .toast.bad { color: #8c1f2b; }
.operation-status[data-operation-state="error"] {
  border-color: #d97272;
  border-left-color: #e75d5d;
  color: #ffd9d9;
}

/* The modern cabinet does not load the retired legacy stylesheet. Keep
   confirmations as true viewport modals instead of ordinary content appended
   below the page. */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(4, 12, 8, .72);
  /* Keep the veil opaque enough to separate the dialog without applying a
     glass blur to the Minecraft item surface. */
}
.modal {
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--release-line-strong, #5a8f69);
  border-radius: 16px;
  background: var(--release-surface, #10251a);
  color: var(--release-ink, #eff8f0);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .44);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.modal-head h2 { margin: 0; color: inherit; }
.modal-head p { margin: 5px 0 0; color: var(--release-muted, #b9d2bf); }
.modal .notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--release-line, #31583e);
  border-radius: 10px;
  background: rgba(61, 152, 92, .12);
  color: inherit;
}
:root[data-theme="light"] .modal-overlay { background: rgba(9, 22, 14, .42); }
:root[data-theme="light"] .modal {
  background: #f8fcf8;
  color: #173722;
  border-color: #a7c9b0;
  box-shadow: 0 28px 70px rgba(22, 59, 35, .25);
}
:root[data-theme="light"] .modal-head p { color: #52705b; }
:root[data-theme="light"] .operation-status {
  background: #f5fbf6;
  color: #173722;
}
:root[data-theme="light"] .operation-status[data-operation-state="error"] {
  color: #8c1f2b;
}
.loading::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--teal), transparent);
  animation: ui-loading 1.4s linear infinite;
}

.table-wrap,
.table-shell { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: transparent !important; color: var(--ink); }
th,
td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .75rem; font-weight: 750; letter-spacing: 0; text-transform: uppercase; }
tbody tr { transition: background-color var(--speed-fast) ease; }
tbody tr:hover { background: var(--status-gradient); }
.shop-price-editor { display: flex; align-items: center; gap: 6px; min-width: 180px; }
.shop-price-editor input { width: 92px; min-width: 0; padding: 7px 8px; font-variant-numeric: tabular-nums; }
.shop-price-editor .btn { white-space: nowrap; }

/* Dashboard visuals are part of the current runtime, not the retired legacy
   stylesheet.  Keeping them here prevents SVG areas from falling back to a
   browser-black fill and keeps the first screen readable in both themes. */
.dashboard-hero { min-height: 278px; display: grid; grid-template-columns: minmax(320px, .82fr) minmax(460px, 1.18fr); gap: 18px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface-gradient); box-shadow: var(--shadow-1); }
.hero-copy { min-width: 0; display: grid; align-content: center; gap: 14px; padding: 28px; }
.hero-copy h2 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.05; font-weight: 850; }
.hero-copy p { max-width: 620px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: stretch; padding: 18px; border-left: 1px solid var(--line); background: var(--surface-strong); }
.hero-tile { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-content: center; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface-soft); }
.hero-tile img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; }
.hero-tile span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.hero-tile strong { display: block; margin-top: 2px; overflow: hidden; color: var(--ink); font-size: 18px; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-visual-grid { display: grid; grid-template-columns: minmax(360px, 1.1fr) minmax(180px, .42fr) minmax(280px, .75fr); gap: 16px; }
.visual-card { min-height: 172px; min-width: 0; display: grid; gap: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--surface); box-shadow: var(--shadow-1); }
.visual-card-large { grid-template-columns: minmax(220px, .7fr) minmax(240px, 1fr); align-items: center; }
.visual-label { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.visual-card strong { display: block; margin-top: 6px; font-size: 25px; line-height: 1.08; }
.visual-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.ring-card { place-items: center; }
.readiness-ring { width: min(156px, 100%); aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.readiness-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg, .ring-fg { fill: none; stroke-width: 11; }
.ring-bg { stroke: var(--line-strong); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 283; stroke-dashoffset: var(--ring-offset); animation: ringReveal .9s ease-out both; }
.readiness-ring > div { width: 86px; height: 86px; display: grid; place-items: center; align-content: center; border-radius: 999px; background: var(--surface-soft); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.readiness-ring strong { display: block; font-size: 24px; line-height: 1; }
.readiness-ring span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.sparkline { width: 100%; height: 132px; overflow: visible; }
.sparkline polygon { fill: color-mix(in srgb, var(--accent) 18%, transparent); }
.sparkline polyline { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 220; stroke-dashoffset: 220; animation: chartDraw 1.25s ease-out forwards; }
.sparkline.bad polygon { fill: color-mix(in srgb, var(--red) 18%, transparent); }
.sparkline.bad polyline { stroke: var(--red); }
.mini-bars { display: grid; gap: 10px; }
.mini-bar { min-height: 34px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; background: var(--surface-soft); }
.mini-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--bar); border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--teal) 20%, transparent)); animation: barGrow .8s ease-out both; }
.mini-bar span, .mini-bar strong { position: relative; z-index: 1; }
.mini-bar span { color: var(--muted); font-size: 12px; font-weight: 750; }
.mini-bar strong { font-size: 14px; }

/* Dashboard observatory: compact real-data charts, no decorative rings. */
.dashboard-visual-grid-data { grid-template-columns: minmax(320px, 1.1fr) repeat(2, minmax(230px, .8fr)); }
.data-chart-card { align-content: start; }
.dashboard-week-chart { min-height: 112px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; align-items: end; padding-top: 8px; border-bottom: 1px solid var(--line); }
.week-column { min-width: 0; display: grid; justify-items: center; gap: 4px; }
.week-bars { width: 100%; height: 68px; display: flex; justify-content: center; align-items: end; gap: 3px; }
.week-bar { display: block; width: min(13px, 42%); height: var(--height); min-height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); animation: barGrow .65s ease-out both; }
.week-bar.secondary { background: var(--teal); opacity: .78; animation-delay: 80ms; }
.week-column strong { font-size: 12px; line-height: 1; }
.week-column span { color: var(--muted); font-size: 10px; }
.chart-legend { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.chart-legend i, .chart-legend em { width: 8px; height: 8px; display: inline-block; border-radius: 2px; background: var(--accent); }
.chart-legend em { background: var(--teal); opacity: .78; }
.dashboard-online-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.dashboard-online-row { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-soft); }
.dashboard-online-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-dot { color: var(--green, #42c98a); font-size: 11px; font-weight: 800; }
.dashboard-check-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.dashboard-check { display: grid; gap: 4px; padding: 11px 12px; border-left: 3px solid var(--line-strong); background: var(--surface-soft); }
.dashboard-check.good { border-color: var(--green, #42c98a); }
.dashboard-check.warn { border-color: var(--amber, #e6ae55); }
.dashboard-check.bad { border-color: var(--red, #e86767); }
.dashboard-check span { color: var(--muted); font-size: 11px; font-weight: 750; }
.dashboard-check strong { font-size: 16px; }

@media (max-width: 1100px) {
  .dashboard-visual-grid-data { grid-template-columns: 1fr 1fr; }
  .dashboard-visual-grid-data .visual-card-large { grid-column: 1 / -1; }
  .dashboard-check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .dashboard-visual-grid-data { grid-template-columns: 1fr; }
  .dashboard-visual-grid-data .visual-card-large { grid-column: auto; }
  .dashboard-check-grid { grid-template-columns: 1fr 1fr; }
}

/* admin-release.css was authored for the old dark-only shell.  These tokens
   and colors make the same current admin markup legible in the light theme. */
:root[data-theme="light"] {
  --release-shell-bg: var(--body-gradient);
  --release-panel-bg: var(--surface);
  --release-panel-strong: var(--surface);
  --release-line: var(--line);
  --release-line-strong: var(--line-strong);
}
:root[data-theme="light"] body.panel-admin-mode,
:root[data-theme="light"] body.junior-admin-mode,
:root[data-theme="light"] body.player-mode { color: var(--ink); }
:root[data-theme="light"] body.panel-admin-mode .sidebar,
:root[data-theme="light"] body.junior-admin-mode .sidebar,
:root[data-theme="light"] body.player-mode .sidebar { background: var(--surface-gradient); border-color: var(--line); }
:root[data-theme="light"] body.panel-admin-mode .side-brand,
:root[data-theme="light"] body.junior-admin-mode .side-brand,
:root[data-theme="light"] body.player-mode .side-brand,
:root[data-theme="light"] body.panel-admin-mode .nav-item,
:root[data-theme="light"] body.junior-admin-mode .nav-item,
:root[data-theme="light"] body.player-mode .nav-item { background: var(--surface-soft) !important; border-color: var(--line) !important; }
:root[data-theme="light"] body.panel-admin-mode .side-brand-copy strong,
:root[data-theme="light"] body.junior-admin-mode .side-brand-copy strong,
:root[data-theme="light"] body.player-mode .side-brand-copy strong,
:root[data-theme="light"] body.panel-admin-mode .nav-label,
:root[data-theme="light"] body.junior-admin-mode .nav-label,
:root[data-theme="light"] body.player-mode .nav-label { color: var(--ink) !important; }
:root[data-theme="light"] body.panel-admin-mode .side-brand-copy span,
:root[data-theme="light"] body.junior-admin-mode .side-brand-copy span,
:root[data-theme="light"] body.player-mode .side-brand-copy span,
:root[data-theme="light"] body.panel-admin-mode .nav-hint,
:root[data-theme="light"] body.junior-admin-mode .nav-hint,
:root[data-theme="light"] body.player-mode .nav-hint,
:root[data-theme="light"] body.panel-admin-mode .nav-group-title,
:root[data-theme="light"] body.junior-admin-mode .nav-group-title,
:root[data-theme="light"] body.player-mode .nav-group-title { color: var(--muted) !important; }
:root[data-theme="light"] body.panel-admin-mode .nav-icon,
:root[data-theme="light"] body.junior-admin-mode .nav-icon,
:root[data-theme="light"] body.player-mode .nav-icon { color: var(--accent-strong) !important; background: var(--accent-soft) !important; }
:root[data-theme="light"] body.panel-admin-mode .topbar,
:root[data-theme="light"] body.junior-admin-mode .topbar,
:root[data-theme="light"] body.player-mode .topbar { background: var(--surface-gradient) !important; border-color: var(--line) !important; }
:root[data-theme="light"] body.panel-admin-mode .page-heading h1,
:root[data-theme="light"] body.junior-admin-mode .page-heading h1,
:root[data-theme="light"] body.player-mode .page-heading h1 { color: var(--ink) !important; }
:root[data-theme="light"] body.panel-admin-mode .page-heading p,
:root[data-theme="light"] body.junior-admin-mode .page-heading p,
:root[data-theme="light"] body.player-mode .page-heading p { color: var(--muted) !important; }
:root[data-theme="light"] body.panel-admin-mode .mini-health,
:root[data-theme="light"] body.junior-admin-mode .mini-health,
:root[data-theme="light"] body.player-mode .mini-health { background: var(--surface-soft) !important; border-color: var(--line) !important; color: var(--muted) !important; }

@media (max-width: 1100px) {
  .dashboard-hero, .dashboard-visual-grid { grid-template-columns: 1fr; }
  .hero-board { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 680px) {
  .hero-copy { padding: 20px; }
  .hero-board { grid-template-columns: 1fr; padding: 14px; }
  .visual-card-large { grid-template-columns: 1fr; }
}

/* Authenticated shells */
body.player-mode,
body.junior-admin-mode,
body.panel-admin-mode { background: var(--body-gradient) !important; color: var(--ink) !important; }

body[data-page-kind="cabinet"] > .public-nav {
  width: min(calc(100% - 32px), 1440px);
  margin-inline: auto;
}

body.panel-admin-mode #app,
body.junior-admin-mode #app,
body.player-mode #app {
  width: min(calc(100% - 32px), 1440px);
  margin: 12px auto 24px;
  gap: 12px;
}

body.panel-admin-mode .sidebar,
body.junior-admin-mode .sidebar,
body.player-mode .sidebar {
  border: 1px solid var(--line) !important;
  border-radius: var(--r-lg) !important;
  background: var(--surface-gradient) !important;
  box-shadow: var(--shadow-1);
}

body.panel-admin-mode .topbar,
body.junior-admin-mode .topbar,
body.player-mode .topbar {
  border: 1px solid var(--line) !important;
  border-radius: var(--r-lg) !important;
  background: color-mix(in srgb, var(--surface) 95%, transparent) !important;
  box-shadow: var(--shadow-1);
}

body.panel-admin-mode .panel,
body.panel-admin-mode .metric,
body.panel-admin-mode .table-wrap,
body.junior-admin-mode .panel,
body.junior-admin-mode .metric,
body.junior-admin-mode .table-wrap,
body.player-mode .panel,
body.player-mode .metric,
body.player-mode .table-wrap {
  border-color: var(--line) !important;
  background: var(--surface-gradient) !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-1) !important;
}

body.panel-admin-mode :where(.panel, .metric):hover,
body.junior-admin-mode :where(.panel, .metric):hover,
body.player-mode :where(.panel, .metric):hover { border-color: var(--line-strong) !important; }

.cabinet-nav-toggle { display: none !important; }
.cabinet-nav-backdrop { display: none; }

/* Narcotics recipe editor */
.recipe-toolbar select,
.recipe-inventory-head input { background: var(--surface) !important; }
.recipe-tape,
.recipe-inventory-head,
.creative-inventory-grid,
.recipe-inventory-closed {
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--r-lg) !important;
  background: var(--surface-strong) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 50%, transparent);
}
.recipe-slot,
.creative-item,
.recipe-tabs button {
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--r) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  transition: transform var(--speed-fast) ease, border-color var(--speed-fast) ease, background-color var(--speed-fast) ease, box-shadow var(--speed-fast) ease;
}
.recipe-slot:hover,
.creative-item:hover,
.recipe-tabs button:hover,
.recipe-tabs button.active {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}
.recipe-search-field {
  display: grid;
  gap: 4px;
  min-width: min(100%, 300px);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.recipe-search-field input { width: 100%; }
.recipe-slot-removable .recipe-remove-cross {
  position: absolute;
  top: 2px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  transform: scale(.72);
  transition: opacity var(--speed-fast) ease, transform var(--speed-fast) ease;
}
.recipe-slot-removable:hover .recipe-remove-cross,
.recipe-slot-removable:focus-visible .recipe-remove-cross {
  opacity: 1;
  transform: scale(1);
}
.recipe-apply-hint {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}
.creative-item { contain: layout paint; }

/* Keep recipe labels above the Minecraft-style tape instead of clipping them
   inside the panel. The native title attribute remains as a fallback for the
   scrollable creative inventory. */
body.panel-admin-mode .panel:has(.recipe-tape),
body.junior-admin-mode .panel:has(.recipe-tape) {
  overflow: visible !important;
}
body.panel-admin-mode .recipe-tape,
body.junior-admin-mode .recipe-tape {
  overflow: visible !important;
  position: relative;
  z-index: 2;
}
body.panel-admin-mode .recipe-slot span,
body.panel-admin-mode .creative-item span,
body.junior-admin-mode .recipe-slot span,
body.junior-admin-mode .creative-item span {
  z-index: 30;
}

/* Admin account and player-card forms stay compact at desktop and mobile
   widths; every control gets a visible label and cannot push the panel wider. */
.admin-create-panel,
.admin-account-form {
  min-width: 0;
}
.admin-create-panel input,
.admin-create-panel select,
.admin-account-form input,
.admin-account-form select {
  min-width: 0;
  width: 100%;
}
.admin-role-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  grid-column: 1 / -1;
}
.admin-role-toggle label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.admin-role-toggle input { width: auto; }
.admin-role-toggle label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.admin-access-advanced { grid-column: 1 / -1; }
.admin-access-advanced summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}
.admin-player-commerce-card .form-grid { min-width: 0; }
.admin-player-commerce-card .field-stack { min-width: 0; }
.admin-player-commerce-card .field-stack input,
.admin-player-commerce-card .field-stack select { width: 100%; min-width: 0; }


/* Motion */
@keyframes ui-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ui-loading {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes server-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 22%, transparent); }
  50% { box-shadow: 0 0 0 5px transparent; }
}

.public-hero-copy,
.public-hero-side,
.public-home-summary > *,
.public-page-shell > section,
.view > * { animation: ui-enter var(--speed-slow) ease both; }
.public-hero-side { animation-delay: 60ms; }
.public-home-summary > *:nth-child(2) { animation-delay: 55ms; }
.public-home-summary > *:nth-child(3) { animation-delay: 110ms; }
.public-home-summary > *:nth-child(4) { animation-delay: 165ms; }
.status-online,
.server-online,
[data-status="online"] { animation: server-pulse 2.4s ease-in-out infinite; }

/* Shop catalogue and checkout */
.shop-cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 84%, var(--accent-soft));
  color: var(--ink) !important;
  font-weight: 700;
  text-decoration: none;
  transition: border-color var(--speed-fast) ease, background-color var(--speed-fast) ease, transform var(--speed-fast) ease;
}
.shop-cart-button:hover,
.shop-cart-button:focus-visible,
.shop-cart-button.has-items {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 82%, var(--surface));
  color: var(--accent-strong) !important;
}
.shop-cart-button:hover { transform: translateY(-1px); }
.shop-cart-count {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
:root[data-theme="dark"] .shop-cart-count { color: #06110b; }
.shop-cart-mobile-shortcut { display: none; }

.shop-storefront {
  display: grid;
  gap: 30px;
  padding: 30px 0 46px;
}
.shop-storefront-head,
.cart-page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.shop-storefront-head h2,
.cart-page-intro h1 {
  max-width: 760px;
  margin: 5px 0 8px;
  color: var(--ink);
  font-size: 2.15rem;
  line-height: 1.12;
}
.shop-storefront-head p,
.cart-page-intro p { max-width: 680px; margin: 0; color: var(--muted); }
.shop-storefront-cart-link { flex: 0 0 auto; }

.shop-catalog-band {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}
.shop-catalog-band + .shop-catalog-band {
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.shop-catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.shop-catalog-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--accent-strong);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
}
.shop-catalog-head h2 { margin: 4px 0 5px; color: var(--ink); font-size: 1.55rem; }
.shop-catalog-head p { margin: 0; color: var(--muted); }
.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.shop-catalog-loading { margin: 0; color: var(--muted); }
.shop-product-card {
  display: grid;
  grid-template-rows: 118px minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-gradient);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--ink) 7%, transparent);
  transition: transform var(--speed-fast) ease, border-color var(--speed-fast) ease, box-shadow var(--speed-fast) ease;
}
.shop-product-card:hover {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
  box-shadow: 0 13px 28px color-mix(in srgb, var(--accent) 14%, transparent);
  transform: translateY(-2px);
}
.shop-product-art {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px) 0 0 / 16px 16px,
    color-mix(in srgb, var(--surface-soft) 84%, var(--accent-soft));
}
.shop-product-art img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 8px color-mix(in srgb, var(--ink) 26%, transparent));
  transition: transform var(--speed) ease;
}
.shop-product-card:hover .shop-product-art img { transform: translateY(-2px) scale(1.06); }
.shop-product-body { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 14px; }
.shop-product-category { color: var(--accent-strong); font-size: .73rem; font-weight: 800; text-transform: uppercase; }
.shop-product-body h3 { margin: 0; color: var(--ink); font-size: 1rem; line-height: 1.32; overflow-wrap: anywhere; }
.shop-product-body p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.shop-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}
.shop-product-price { color: var(--accent-strong); font-size: .94rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shop-product-add { min-width: 102px; padding-inline: 10px !important; }
.shop-product-add:disabled { opacity: .72; cursor: default; }

.cart-page-shell { padding-bottom: 46px; }
.cart-page-intro { padding-top: 28px; }
.cart-global-notice {
  margin: 18px 0 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
}
.cart-global-notice[data-tone="error"] { border-left-color: var(--red); }
.cart-checkout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding-top: 26px; }
.cart-checkout-section {
  display: grid;
  align-content: start;
  gap: 15px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-gradient);
}
.cart-checkout-section-ar { border-top: 3px solid var(--accent); }
.cart-checkout-section-donation { border-top: 3px solid var(--blue); }
.cart-checkout-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.cart-checkout-head h2 { margin: 4px 0 0; color: var(--ink); font-size: 1.35rem; }
.cart-total { color: var(--accent-strong); font-size: 1.1rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-item-list { display: grid; gap: 8px; }
.cart-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.cart-item-art { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--surface) 72%, var(--accent-soft)); }
.cart-item-art img { width: 35px; height: 35px; object-fit: contain; image-rendering: pixelated; }
.cart-item-copy { min-width: 0; }
.cart-item-copy strong { display: block; color: var(--ink); overflow-wrap: anywhere; }
.cart-item-copy p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.38; }
.cart-item-aside { display: grid; justify-items: end; gap: 7px; }
.cart-item-price { color: var(--accent-strong); white-space: nowrap; font-size: .86rem; font-variant-numeric: tabular-nums; }
.cart-item-remove {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--speed-fast) ease, border-color var(--speed-fast) ease, background-color var(--speed-fast) ease;
}
.cart-item-remove:hover,
.cart-item-remove:focus-visible { border-color: var(--red); background: var(--red-2); color: var(--red); }
.cart-empty-state { display: grid; gap: 6px; justify-items: start; padding: 17px 0 5px; color: var(--muted); }
.cart-empty-state strong { color: var(--ink); }
.cart-empty-state p { margin: 0; }
.cart-checkout-form { display: grid; gap: 7px; padding-top: 3px; }
.cart-checkout-form label { color: var(--muted); font-size: .84rem; font-weight: 700; }
.cart-checkout-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.cart-checkout-controls input { min-width: 0; }
.cart-checkout-controls .btn { min-width: 176px; }
.cart-section-status { min-height: 1.4em; margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.4; }
.cart-section-status[data-tone="success"] { color: var(--accent-strong); }
.cart-section-status[data-tone="warning"] { color: var(--amber); }
.cart-section-status[data-tone="error"] { color: var(--red); }

@media (max-width: 1080px) {
  .public-nav { align-items: flex-start; flex-wrap: wrap; }
  .public-nav nav { width: 100%; justify-content: flex-start; }
  .public-hero { grid-template-columns: 1fr; }
  .public-hero-copy { padding: 10px 0 0; }
  .public-hero-copy h1 { max-width: 820px; font-size: 3.4rem; }
  .public-hero-side { grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); }
}

@media (max-width: 900px) {
  .public-dashboard-grid,
  .public-shop-board,
  .auth-card-grid,
  .cart-checkout-grid { grid-template-columns: 1fr; }
  .auth-card-grid > .auth-card-section:not(.auth-card-section-note) { order: 1; }
  .auth-card-section-note { order: 2; padding: 18px 0 0; border-right: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .public-site,
  .page-shell,
  .app-shell,
  .cabinet-shell,
  .admin-shell { width: min(calc(100% - 20px), 1240px); }

  .public-nav { align-items: center; flex-wrap: wrap; min-height: 68px; padding: 8px; }
  .public-nav > .shop-cart-mobile-shortcut { display: inline-flex; margin-left: auto; }
  .public-nav nav .shop-cart-button { display: none !important; }
  .public-brand-logo { width: 48px !important; height: 48px !important; flex-basis: 48px; }
  .public-mobile-toggle:not(.hidden),
  .mobile-only:not(.hidden) { display: inline-flex !important; }
  .public-nav nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 3px; padding-top: 8px; }
  .public-nav.public-nav-open nav { display: flex; animation: ui-enter var(--speed) ease both; }
  .public-nav nav > a,
  .public-nav nav > button { width: 100%; justify-content: flex-start; text-align: left; }
  .public-nav nav > .theme-toggle { justify-content: space-between; }

  .public-page-shell { padding-top: 14px; }
  .shop-storefront { gap: 22px; padding: 20px 0 34px; }
  .shop-storefront-head,
  .cart-page-intro { align-items: start; flex-direction: column; gap: 13px; padding-bottom: 18px; }
  .shop-storefront-head h2,
  .cart-page-intro h1 { font-size: 1.8rem; }
  .shop-storefront-cart-link { width: 100%; }
  .shop-product-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 9px; }
  .shop-product-card { grid-template-rows: 102px minmax(0, 1fr) auto; }
  .shop-product-art img { width: 65px; height: 65px; }
  .shop-product-body { padding: 11px; }
  .shop-product-footer { align-items: stretch; flex-direction: column; padding: 10px 11px 11px; }
  .shop-product-add { width: 100%; }
  .cart-checkout-grid { gap: 14px; padding-top: 18px; }
  .cart-checkout-section { padding: 14px; }
  .cart-checkout-controls { grid-template-columns: 1fr; }
  .cart-checkout-controls .btn { width: 100%; min-width: 0; }
  .public-hero { gap: 14px; padding: 18px 0; }
  .public-hero-copy h1 { font-size: 2.7rem; }
  .public-hero-side { grid-template-columns: 1fr; }
  .hero-media-art .hero-scene-image,
  .scene-card-image { height: 190px !important; }

  body[data-page-kind="cabinet"] > .public-nav,
  body.panel-admin-mode #app,
  body.junior-admin-mode #app,
  body.player-mode #app { width: calc(100% - 20px); }

  .cabinet-nav-toggle { display: inline-flex !important; }
  .cabinet-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 39;
    display: block;
    border: 0;
    border-radius: 0 !important;
    background: rgba(3, 12, 7, .64) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--speed) ease;
  }
  #app.nav-open + .cabinet-nav-backdrop,
  .cabinet-nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
  body.cabinet-nav-open { overflow: hidden; }
}

@media (max-width: 560px) {
  .public-brand { min-width: 0; }
  .shop-cart-button { justify-content: space-between !important; }
  .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-product-body h3 { font-size: .92rem; }
  .shop-product-body p { font-size: .8rem; }
  .cart-item { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; padding: 8px; }
  .cart-item-art { width: 42px; height: 42px; }
  .cart-item-art img { width: 30px; height: 30px; }
  .cart-item-copy p { font-size: .76rem; }
  .public-brand-copy small { display: none; }
  .public-hero-copy h1 { font-size: 2.35rem; }
  .hero-inline-status { grid-template-columns: 1fr; }
  .hero-media-art .hero-scene-image,
  .scene-card-image { height: 160px !important; }
  .public-shop-card-head { display: grid; }
  .auth-card { padding: 16px; }
  .auth-card-head { gap: 12px; }
  .auth-brand-logo { width: 50px !important; height: 50px !important; flex-basis: 50px; }
  .auth-card-copy h1 { font-size: 1.7rem; }
  .segmented { display: grid; grid-auto-flow: row; grid-auto-columns: auto; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Player audit details: a readable block/action trail instead of raw log text. */
.activity-block-sprite {
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
  object-fit: contain;
}

.activity-icon:has(.activity-block-sprite) {
  display: grid;
  place-items: center;
  padding: 3px;
  background: var(--surface-soft);
}

.admin-player-credentials,
.admin-player-credentials-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-soft);
}

.admin-player-credentials .credential-actions,
.admin-player-credentials-card .credential-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-player-credentials .credential-hint,
.admin-player-credentials-card .credential-note {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: .82rem;
}

/*
 * Release refinement — a compact civic-inventory layer.
 *
 * The public shop reads like a Minecraft inventory ledger: two clearly
 * separated currencies, quiet item cells and an obvious next action. The
 * authenticated interfaces use the same restrained square geometry so dense
 * operational data stays readable instead of becoming a wall of cards.
 */
:root {
  --ui-display: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
  --ui-body: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ui-data: "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --shop-ar: #1d7841;
  --shop-ar-soft: #dceee1;
  --shop-donation: #176f68;
  --shop-donation-soft: #dceeea;
  --surface-inset: color-mix(in srgb, var(--surface-soft) 86%, var(--accent-soft));
}

:root[data-theme="dark"] {
  --shop-ar: #72e69a;
  --shop-ar-soft: #1c4c30;
  --shop-donation: #78d3c3;
  --shop-donation-soft: #193e38;
  --surface-inset: color-mix(in srgb, var(--surface-soft) 88%, var(--accent-soft));
}

body { font-family: var(--ui-body); }

:where(h1, h2, h3, h4, .page-heading h1, .metric-value, .shop-product-price, .cart-total) {
  font-family: var(--ui-display);
  font-variant-numeric: lining-nums tabular-nums;
}

/* Keep controls deliberately square; toggles retain their small round thumb. */
.public-nav,
.hero-media-card,
.hero-side-card,
.scene-card,
.showcase-card,
.public-panel,
.public-shop-card,
.auth-card,
.shop-product-card,
.cart-checkout-section,
.cart-global-notice,
.cart-item,
.loading {
  border-radius: var(--r-lg) !important;
}

.hero-media-art,
.shop-item-chip,
.hero-sprite-chip,
.shop-product-art,
.shop-product-category,
.cart-item-art,
.cart-item-remove,
.status-chip,
.route-chip,
.badge,
.chip,
.pill {
  border-radius: var(--r) !important;
}

@media (min-width: 761px) {
  /* The navigation trigger is a mobile affordance, never a desktop control. */
  .public-mobile-toggle,
  .cabinet-nav-toggle,
  #mobileNavToggle {
    display: none !important;
  }
}

/* Public navigation: one calm bar, not a row of detached pills. */
.public-nav {
  gap: 12px;
  padding: 8px 10px;
  border-color: color-mix(in srgb, var(--line) 86%, var(--accent-soft));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface) 97%, var(--accent-soft)), var(--surface));
}

.public-nav nav { gap: 2px; }

.public-nav nav > a,
.app-nav a,
.topbar nav a {
  border-radius: var(--r) !important;
  letter-spacing: .005em;
}

.public-nav .theme-toggle {
  min-width: 0;
  padding-inline: 10px;
}

/* The two shop shelves share a system but never blend their balances. */
.shop-catalog-band-ar,
.cart-checkout-section-ar { --catalog-accent: var(--shop-ar); --catalog-soft: var(--shop-ar-soft); }

.shop-catalog-band-donation,
.cart-checkout-section-donation { --catalog-accent: var(--shop-donation); --catalog-soft: var(--shop-donation-soft); }

.shop-catalog-band {
  gap: 13px;
  padding-top: 8px;
}

.shop-catalog-band + .shop-catalog-band {
  padding-top: 26px;
  border-top-color: color-mix(in srgb, var(--line) 86%, var(--catalog-accent));
}

.shop-catalog-head {
  align-items: center;
  min-height: 56px;
  padding-left: 12px;
  border-left: 3px solid var(--catalog-accent);
}

.shop-catalog-eyebrow {
  color: var(--catalog-accent);
  letter-spacing: .08em;
}

.shop-catalog-head h2 {
  letter-spacing: -.022em;
}

.shop-product-grid { gap: 10px; }

.shop-product-card {
  --product-accent: var(--shop-ar);
  position: relative;
  border-color: color-mix(in srgb, var(--line) 86%, var(--product-accent));
  box-shadow: 0 5px 16px color-mix(in srgb, var(--ink) 7%, transparent);
}

.shop-product-card-donation { --product-accent: var(--shop-donation); }

.shop-product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 3px;
  background: linear-gradient(90deg, var(--product-accent), color-mix(in srgb, var(--product-accent) 28%, transparent));
  pointer-events: none;
}

.shop-product-card:hover,
.shop-product-card:focus-within {
  border-color: var(--product-accent);
  box-shadow: 0 11px 24px color-mix(in srgb, var(--product-accent) 17%, transparent);
}

.shop-product-art {
  border-bottom-color: color-mix(in srgb, var(--line) 82%, var(--product-accent));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--product-accent) 10%, transparent) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(color-mix(in srgb, var(--product-accent) 10%, transparent) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(145deg, var(--surface-inset), var(--surface-soft));
}

.shop-product-art img {
  filter: drop-shadow(0 8px 8px color-mix(in srgb, var(--product-accent) 24%, transparent));
}

.shop-product-body { gap: 9px; padding: 13px 14px 14px; }

.shop-product-category {
  width: max-content;
  max-width: 100%;
  padding: 3px 6px;
  background: color-mix(in srgb, var(--product-accent) 12%, var(--surface));
  color: var(--product-accent);
  letter-spacing: .07em;
}

.shop-product-body h3 {
  font-family: var(--ui-display);
  letter-spacing: -.012em;
}

.shop-product-footer {
  min-height: 59px;
  padding: 10px 13px 12px;
  background: color-mix(in srgb, var(--surface-soft) 88%, var(--product-accent) 4%);
}

.shop-product-price,
.cart-total,
.cart-item-price {
  color: var(--product-accent, var(--catalog-accent, var(--accent-strong)));
  font-family: var(--ui-data);
  font-weight: 750;
  letter-spacing: -.02em;
}

.shop-product-add {
  border-color: color-mix(in srgb, var(--product-accent) 52%, var(--line-strong)) !important;
}

.shop-product-add:hover:not(:disabled),
.shop-product-add:focus-visible:not(:disabled) {
  border-color: var(--product-accent) !important;
  background: color-mix(in srgb, var(--product-accent) 13%, var(--surface)) !important;
  color: var(--product-accent) !important;
}

/* Cart is a ledger with two checkout desks, not two unrelated cards. */
.shop-cart-button {
  border-radius: var(--r) !important;
  border-color: color-mix(in srgb, var(--line-strong) 74%, var(--accent));
  background: color-mix(in srgb, var(--surface) 88%, var(--accent-soft));
}

.shop-cart-button.has-items {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.shop-cart-count {
  border-radius: var(--r-sm);
  font-family: var(--ui-data);
  font-weight: 800;
}

.shop-cart-button.has-items .shop-cart-count {
  animation: cart-count-pop 300ms cubic-bezier(.2, .85, .3, 1) both;
}

.cart-checkout-grid { gap: 16px; }

.cart-checkout-section {
  --catalog-accent: var(--shop-ar);
  --catalog-soft: var(--shop-ar-soft);
  gap: 14px;
  padding: 16px;
  border-top: 3px solid var(--catalog-accent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 97%, var(--catalog-soft)), var(--surface-soft));
  box-shadow: var(--shadow-1);
}

.cart-checkout-section-donation { border-top-color: var(--catalog-accent); }

.cart-checkout-head {
  padding-bottom: 11px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, var(--catalog-accent));
}

.cart-checkout-head .shop-catalog-eyebrow { color: var(--catalog-accent); }

.cart-checkout-section .cart-total { color: var(--catalog-accent); }

.cart-item {
  gap: 10px;
  padding: 9px;
  border-color: color-mix(in srgb, var(--line) 84%, var(--catalog-accent));
  background: color-mix(in srgb, var(--surface) 72%, var(--catalog-soft));
}

.cart-item-art {
  border-color: color-mix(in srgb, var(--line) 74%, var(--catalog-accent));
  background: color-mix(in srgb, var(--surface) 75%, var(--catalog-soft));
}

.cart-checkout-section .cart-item-price { color: var(--catalog-accent); }

.cart-checkout-controls input:focus-visible {
  border-color: var(--catalog-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--catalog-accent) 20%, transparent) !important;
}

/* A plain-language payment ledger for player accounts. */
.payment-history-table {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.payment-history-head,
.payment-history-row {
  display: grid;
  grid-template-columns: minmax(145px, .8fr) minmax(220px, 1.6fr) minmax(120px, .6fr);
  gap: 18px;
  align-items: center;
  padding: 13px 16px;
}

.payment-history-head {
  color: var(--muted);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.payment-history-row {
  min-height: 66px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  transition: background-color 160ms ease, transform 160ms ease;
}

.payment-history-row:last-child { border-bottom: 0; }
.payment-history-row:hover { background: color-mix(in srgb, var(--accent-soft) 46%, var(--surface)); }
.payment-history-row time { color: var(--muted); font-family: var(--ui-data); font-size: 12px; }
.payment-history-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.payment-history-row > .payment-amount { justify-self: end; font-family: var(--ui-data); font-size: 17px; }
.payment-amount.is-positive { color: var(--success, #16834b); }
.payment-amount.is-negative { color: var(--danger, #b53b3b); }

@media (max-width: 680px) {
  .payment-history-head { display: none; }
  .payment-history-row { grid-template-columns: 1fr auto; gap: 6px 14px; padding: 13px 14px; }
  .payment-history-row time { grid-column: 1 / -1; grid-row: 1; font-size: 11px; }
  .payment-history-row > div { grid-column: 1; grid-row: 2; }
  .payment-history-row > .payment-amount { grid-column: 2; grid-row: 2; }
}

/* Compact working surfaces for player and staff panels. */
body.player-mode .sidebar,
body.panel-admin-mode .sidebar,
body.junior-admin-mode .sidebar,
body.player-mode .side-brand,
body.panel-admin-mode .side-brand,
body.junior-admin-mode .side-brand,
body.player-mode .topbar,
body.panel-admin-mode .topbar,
body.junior-admin-mode .topbar,
body.player-mode .panel,
body.panel-admin-mode .panel,
body.junior-admin-mode .panel,
body.player-mode .metric,
body.panel-admin-mode .metric,
body.junior-admin-mode .metric,
body.player-mode .table-wrap,
body.panel-admin-mode .table-wrap,
body.junior-admin-mode .table-wrap {
  border-radius: var(--r-lg) !important;
}

body.player-mode .nav-item,
body.panel-admin-mode .nav-item,
body.junior-admin-mode .nav-item,
body.player-mode .mini-health,
body.panel-admin-mode .mini-health,
body.junior-admin-mode .mini-health,
body.player-mode .inventory-card,
body.panel-admin-mode .inventory-card,
body.junior-admin-mode .inventory-card,
body.panel-admin-mode .stack-card,
body.junior-admin-mode .stack-card,
body.panel-admin-mode .detail-chip,
body.junior-admin-mode .detail-chip {
  border-radius: var(--r) !important;
}

body.player-mode .nav-item,
body.panel-admin-mode .nav-item,
body.junior-admin-mode .nav-item {
  min-height: 44px;
  padding: 9px 10px;
  border-color: var(--line) !important;
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent) !important;
}

body.player-mode .nav-item.active,
body.panel-admin-mode .nav-item.active,
body.junior-admin-mode .nav-item.active {
  border-color: color-mix(in srgb, var(--accent) 66%, var(--line)) !important;
  background: var(--status-gradient) !important;
  box-shadow: inset 3px 0 0 var(--accent) !important;
}

body.player-mode .nav-group-title,
body.panel-admin-mode .nav-group-title,
body.junior-admin-mode .nav-group-title,
body.player-mode .metric-label,
body.panel-admin-mode .metric-label,
body.junior-admin-mode .metric-label {
  color: var(--muted) !important;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .075em;
}

body.player-mode .topbar,
body.panel-admin-mode .topbar,
body.junior-admin-mode .topbar {
  padding: 14px 16px !important;
  box-shadow: var(--shadow-1) !important;
}

body.player-mode .page-heading h1,
body.panel-admin-mode .page-heading h1,
body.junior-admin-mode .page-heading h1 {
  font-family: var(--ui-display);
  letter-spacing: -.03em;
}

body.player-mode .panel,
body.panel-admin-mode .panel,
body.junior-admin-mode .panel,
body.player-mode .metric,
body.panel-admin-mode .metric,
body.junior-admin-mode .metric {
  box-shadow: 0 5px 16px color-mix(in srgb, var(--ink) 8%, transparent) !important;
}

body.player-mode .metric-value,
body.panel-admin-mode .metric-value,
body.junior-admin-mode .metric-value {
  color: var(--ink) !important;
  font-family: var(--ui-display);
  letter-spacing: -.026em;
  line-height: 1.08;
}

body.player-mode .table-wrap,
body.panel-admin-mode .table-wrap,
body.junior-admin-mode .table-wrap {
  overflow: auto;
  box-shadow: none !important;
}

body.player-mode th,
body.panel-admin-mode th,
body.junior-admin-mode th {
  background: color-mix(in srgb, var(--surface-soft) 92%, var(--accent-soft));
  color: var(--muted);
  font-size: .7rem;
  letter-spacing: .065em;
}

body.player-mode td,
body.panel-admin-mode td,
body.junior-admin-mode td { line-height: 1.42; }

body.player-mode tbody tr:hover,
body.panel-admin-mode tbody tr:hover,
body.junior-admin-mode tbody tr:hover {
  background: var(--status-gradient);
}

body.panel-admin-mode .admin-search-fab,
body.junior-admin-mode .admin-search-fab {
  width: 46px;
  height: 46px;
  border-radius: var(--r) !important;
  box-shadow: var(--shadow-1);
}

body.panel-admin-mode .admin-search-panel,
body.junior-admin-mode .admin-search-panel {
  border-radius: var(--r-lg) !important;
}

@keyframes cart-count-pop {
  0% { transform: scale(.84); }
  68% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@media (max-width: 760px) {
  .public-nav { padding: 7px; }
  .shop-catalog-head { min-height: 0; padding-left: 9px; }
  .shop-product-grid { gap: 8px; }
  .shop-product-body { gap: 7px; padding: 10px; }
  .shop-product-footer { min-height: 0; padding: 9px 10px 10px; }
  .cart-checkout-section { padding: 13px; }
  .cart-checkout-head { gap: 10px; }
}

@media (forced-colors: active) {
  .shop-product-card::before { background: Highlight; }
  .shop-catalog-head { border-left-color: Highlight; }
}
