/* Canonical source. sync-design.py copies this file into each independent webroot. */
:root {
  color-scheme: dark;
  --bg: #10131c; --surface: #1b202c; --surface-raised: #242a38;
  --glass: linear-gradient(135deg, rgba(39,45,61,.94), rgba(25,30,42,.96));
  --text: #f2f1f7; --muted: #b1b7c8; --subtle: #979fb5;
  --line: #3c4356; --accent: #c6b7ff; --accent-ink: #211a39;
  --ok: #85dfbc; --warn: #ffd28c; --danger: #ffa6b3;
  --radius: 20px; --small-radius: 12px; --shadow: 0 12px 36px #0002;
  --space: 8px; --content: 1440px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.6; min-width: 0; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 5% 0%, #74635c33, transparent 48%), radial-gradient(ellipse at 95% 20%, #70619529, transparent 50%); }
a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
p a,li a,.note a,.java-v2-note a,.legal-value a { text-decoration: underline; }
.legal-link-list { display: flex; flex-wrap: wrap; gap: 12px; }
.legal-link-list a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px; }
button,input,select,textarea { font: inherit; }
button,.button,.btn { cursor: pointer; }
button,.button,.btn,.history-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border: 1px solid var(--line); border-radius: var(--small-radius); padding: 10px 16px;
  color: var(--text); background: var(--surface-raised); font-size: 13px; font-weight: 650; line-height: 1.4;
  transition: background .16s, border-color .16s, transform .16s; text-decoration: none; }
button:hover,.button:hover,.btn:hover { background: #333b50; border-color: #7a7297; text-decoration: none; }
button:active,.button:active,.btn:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.primary,.login-submit,.start-button { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.primary:hover,.login-submit:hover,.start-button:hover { background: #d7cbff; color: var(--accent-ink); }
.danger-outline { color: var(--danger); border-color: #80505e; background: #38242d; }
.warning-outline { color: var(--warn); border-color: #79613d; background: #322b24; }
input:not([type=checkbox]):not([type=radio]),select,textarea { display: block; width: 100%; min-width: 0; min-height: 46px;
  border: 1px solid #565e74; border-radius: 10px; padding: 10px 12px; color: var(--text); background: #131722; }
input::placeholder,textarea::placeholder { color: var(--subtle); opacity: 1; }
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox],input[type=radio] { accent-color: var(--accent); width: 20px; height: 20px; flex: 0 0 20px; }
label { color: var(--muted); font-size: 13px; }
label>span:first-child { display: inline-block; margin-bottom: 6px; }
:focus-visible { outline: 3px solid #dfceff; outline-offset: 4px; }
[hidden],.hidden { display: none !important; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 12px 20px; background: var(--accent); color: var(--accent-ink); border-radius: 10px; }
.skip-link:focus { top: 16px; }
img { max-width: 100%; height: auto; }
figure { margin: 0; }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: clamp(30px,3.4vw,48px); line-height: 1.15; letter-spacing: -.045em; font-weight: 650; margin-bottom: 16px; }
h2 { font-size: clamp(20px,2vw,26px); line-height: 1.25; letter-spacing: -.025em; font-weight: 620; margin-bottom: 12px; }
h3 { font-size: 17px; line-height: 1.35; font-weight: 620; }
p { color: var(--muted); margin-bottom: 16px; }
small { font-size: 12px; color: var(--muted); }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .88em; overflow-wrap: anywhere; color: #e0d8ff; }
strong,b { font-weight: 650; }
.page-shell,.container,.admin-shell,.legal-shell { width: min(var(--content),calc(100% - 80px)); margin-inline: auto; }
main { min-width: 0; }
.topbar,.nav-row { display: flex; align-items: center; gap: 24px; min-height: 100px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand strong { font-size: 18px; letter-spacing: -.025em; }
.brand-mark,.login-brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #75698d; border-radius: 13px; background: #393246; flex: 0 0 auto; }
.brand-mark img,.login-brand-mark img { width: 30px; height: 30px; object-fit: contain; }
.main-nav,.top-tabs { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.main-nav a,.top-tabs a,.dashboard-subnav a,.sub-tabs a,.game-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 16px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 550; white-space: nowrap; }
.main-nav a:hover,.top-tabs a:hover,.dashboard-subnav a:hover,.sub-tabs a:hover,.game-tabs a:hover { background: #ffffff0a; color: var(--text); text-decoration: none; }
.main-nav a.active,.top-tabs a.active { background: #c6b7ff17; color: #e4dcff; }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar { margin-bottom: 28px; }
.topbar:has(+ .games-subnav) { margin-bottom: 0; }
.dashboard-subnav,.sub-tabs { display: flex; align-items: center; gap: 6px; padding-block: 16px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.dashboard-subnav a.active,.sub-tabs a.active,.game-tabs a.active { background: var(--surface-raised); color: var(--text); box-shadow: inset 0 0 0 1px #716783; }
.top-status,.status-pill,.container-state,.value-badge,.layout-status,.game-admin-state { display: inline-flex; align-items: center; gap: 7px;
  border-radius: 7px; background: #ffffff08; color: var(--muted); padding: 4px 8px; font-size: 10px; font-weight: 650; letter-spacing: .035em; white-space: nowrap; }
.top-status { font-size: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 30px; }
.top-status>span,.live-dot,.container-state i,.layout-status i,.game-admin-state i,.player-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.online,.ok,.running,.healthy,.value-badge.ok { color: var(--ok); }
.offline,.bad,.danger,.stopped,.error,.value-badge.danger { color: var(--danger); }
.warn,.warning,.stale,.value-badge.warn { color: var(--warn); }
.eyebrow,.hero-kicker,.section-kicker,.login-kicker,.qualification-label { display: block; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; margin-bottom: 12px; }
.hero,.history-hero,.admin-hero { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-block: 8px 32px; }
.hero p,.history-hero p,.admin-hero p { max-width: 64ch; margin-bottom: 0; }
.hero-meta,.history-meta { display: flex; gap: 24px; flex-shrink: 0; }
.hero-meta>div,.history-meta>div { display: flex; flex-direction: column; }
.hero-meta span,.history-meta span { font-size: 11px; color: var(--muted); }
.hero-meta strong,.history-meta strong { font-size: 13px; }
.section,.dashboard-section { margin-block: 32px; }
.section-heading,.section-header,.panel-heading,.section-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2,.panel-heading h2 { margin-bottom: 0; }
.section-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.section-status .live-dot { color: var(--ok); }
.section-heading .section-kicker,.panel-heading .section-kicker { margin-bottom: 6px; }
.card,.box,.panel,.stat-card,.container-card,.history-panel,.control-card,.settings-card,.players-card,.logs-card,.layout-manager,.access-manager,.login-card,.legal-card,.qualification-card,.skill-group,.highlight,.contact-box,.friends-card,.setup-v5-card,.favorite-v5-card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; min-width: 0; }
.box p:last-child,.card p:last-child,.panel p:last-child { margin-bottom: 0; }
.hero-actions,.contact-actions,.actions,.control-actions,.layout-actions,.layout-actions-right,.access-actions,.player-action-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hero-actions { margin-top: 24px; }
.notice,.layout-notice,.access-notice,.dashboard-notice,.history-message,.login-notice { color: var(--warn); border-radius: 12px; background: #2c2638; padding: 14px 18px; margin-block: 12px; }
.notice.error,.layout-notice.error,.access-notice.error,.history-message.error,.login-notice.error { color: var(--danger); background: #38242d; }
.notice:empty,.layout-notice:empty,.access-notice:empty,.dashboard-notice:empty,.history-message:empty,.login-notice:empty { display: none; }
.loading,.empty-state,.layout-empty,.access-loading,.game-admin-empty,.empty-players,.log-empty { padding: 28px; color: var(--muted); text-align: center; }
.empty-state strong,.empty-state span { display: block; }
.tag-row,.skill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag,.skill-list span,.file-chip,.resolution-pill,.legal-pill { display: inline-block; border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; font-size: 11px; color: var(--muted); background: #ffffff05; }
footer,.footer { margin-block: 48px 0; padding-block: 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
footer,.footer-inner,.footer-links { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--muted); }
.footer>.page-shell { width: min(var(--content),calc(100% - 80px)); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th,td { padding: 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 550; }
.table-sort { border: 0; background: none; padding: 4px; justify-content: flex-start; }
.table-sort:hover { background: #ffffff08; }
tr:last-child td { border-bottom: 0; }
section[id],article[id] { scroll-margin-top: 24px; }
.skeleton { min-height: 150px; background: linear-gradient(100deg,#1b202c 30%,#292e40 50%,#1b202c 70%); background-size: 200% 100%; animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } *,*::before,*::after { animation: none !important; transition: none !important; } }
@media (min-width:1200px) {
  body.has-workspace-nav { padding-left: 212px; }
  .workspace-nav { position: fixed; inset: 20px auto 20px 20px; width: 188px; display: flex; flex-direction: column; gap: 8px;
    border: 1px solid var(--line); border-radius: 22px; background: #1c202ad9; backdrop-filter: blur(18px); padding: 20px 12px; }
  .workspace-nav .workspace-label { padding: 12px; font-size: 10px; letter-spacing: .15em; color: var(--subtle); }
  .workspace-nav>a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: var(--muted); font-size: 13px; min-height: 46px; }
  .workspace-nav>a:hover { background: #ffffff08; text-decoration: none; }
  .workspace-nav>a[aria-current] { background: #c6b7ff1c; color: #e0d5ff; }
  .workspace-icon { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
  .workspace-icon svg { width: 19px; height: 19px; }
  .workspace-foot { margin-top: auto; padding: 12px; color: var(--subtle); font-size: 11px; border-top: 1px solid var(--line); }
}
@media (max-width:1199px) {
  .workspace-nav { display: flex; gap: 4px; padding: 8px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); background: #1b202ce6; scrollbar-width: thin; }
  .workspace-nav>a { display: inline-flex; gap: 8px; align-items: center; flex: 0 0 auto; min-height: 44px; padding: 10px 12px; border-radius: 9px; font-size: 12px; color: var(--muted); }
  .workspace-nav>a[aria-current] { color: var(--text); background: #c6b7ff1c; }
  .workspace-icon { display: inline-flex; width: 16px; height: 16px; }
  .workspace-icon svg { width: 16px; height: 16px; }
  .workspace-label,.workspace-foot { display: none; }
}
@media (max-width:1023px) {
  .page-shell,.container,.admin-shell,.legal-shell { width: calc(100% - 48px); }
  .hero,.history-hero,.admin-hero { align-items: flex-start; flex-direction: column; gap: 20px; }
  .topbar,.nav-row { flex-wrap: wrap; gap: 12px; padding-block: 18px; min-height: 84px; }
  .main-nav,.top-tabs { order: 3; width: 100%; margin: 0; flex-wrap: wrap; }
}
@media (max-width:599px) {
  .page-shell,.container,.admin-shell,.legal-shell,.footer>.page-shell { width: calc(100% - 32px); }
  h1 { font-size: 32px; } h2 { font-size: 22px; }
  .brand strong { font-size: 16px; } .brand-mark { width: 36px; height: 36px; }
  .top-status { font-size: 10px; padding: 6px 9px; }
  .dashboard-subnav,.sub-tabs { flex-wrap: wrap; gap: 4px; margin-bottom: 24px; }
  .dashboard-subnav a,.sub-tabs a,.top-tabs a,.main-nav a { padding: 9px 12px; font-size: 12px; }
  .hero,.history-hero,.admin-hero { padding-bottom: 24px; }
  .hero-meta,.history-meta { flex-wrap: wrap; gap: 16px 24px; }
  .card,.box,.panel,.stat-card,.container-card,.history-panel,.control-card,.settings-card,.players-card,.logs-card,.layout-manager,.access-manager,.legal-card,.qualification-card,.skill-group,.highlight,.contact-box,.friends-card { padding: 20px; border-radius: 16px; }
  .section-heading,.panel-heading,.section-header,.section-intro { align-items: flex-start; flex-wrap: wrap; }
  .section,.dashboard-section { margin-block: 28px; }
  footer,.footer { margin-top: 32px; }
}
