:root {
  color-scheme: dark;
  --body: #0b0b0c;
  --nav: #0b0b0cf5;
  --surface: #141415;
  --line: #ffffff17;
  --main: #f2f0ec;
  --muted: #a9a5a0;
  --accent: #f7ae63;
  --accent-text: #ffb76c;
  --field: #111012;
  --green: #75d6a3;
  --red: #f39794;
  --glass: #1b1816e8;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --body: #f5f3ef;
  --nav: #f9f6f0f5;
  --surface: #fffdf9;
  --line: #3b241a22;
  --main: #231e19;
  --muted: #60574f;
  --accent-text: #874114;
  --field: #f6f2ec;
  --green: #237c55;
  --red: #a5332a;
  --glass: #fbf5ecef;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--body); color: var(--main); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, p, dl, dd { margin: 0; }
button:not(:disabled), select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(calc(100% - 112px), 1280px); margin-inline: auto; }
.skip { position: fixed; top: -80px; left: 12px; background: var(--body); z-index: 10; padding: 12px; }
.skip:focus { top: 12px; }
.topbar { position: sticky; z-index: 3; top: 0; background: var(--nav); border-bottom: 1px solid var(--line); backdrop-filter: blur(15px); }
.top-inner { display: flex; justify-content: space-between; align-items: center; min-height: 63px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 17px; font-weight: 750; letter-spacing: -.04em; }
.brand small { font-size: 9px; letter-spacing: .14em; font-weight: 650; margin-left: 4px; color: var(--muted); }
.brand-logo { display: block; flex: none; width: 66px; height: auto; border-radius: 8px; }
.top-nav, .utilities { display: flex; align-items: center; gap: 26px; }
.top-nav a { color: var(--muted); font-size: 13px; }
.top-nav a:is(:hover,.selected) { color: var(--main); }
.utilities { gap: 8px; }
.utility { background: transparent; border: 1px solid var(--line); height: 36px; min-width: 36px; padding: 0 8px; border-radius: 11px; color: var(--main); }
.utility:hover { background: var(--surface); }
.language { font-size: 11px; font-weight: 700; }
.theme { display: grid; place-items: center; }
.theme-icon { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset -4px -3px 0 0 currentColor; transition: rotate .22s ease; }
[data-theme="light"] .theme-icon { box-shadow: none; border: 1px solid currentColor; background: currentColor; width: 10px; height: 10px; }
.theme:hover .theme-icon { rotate: -18deg; }
.hero { position: relative; isolation: isolate; border-bottom: 1px solid var(--line); color: #f2f0ec; }
.hero-art, .hero-art img, .hero::after { position: absolute; inset: 0; height: 100%; width: 100%; z-index: -2; }
.hero-art img { object-fit: cover; object-position: center 56%; }
.hero::after { content: ""; z-index: -1; background: linear-gradient(90deg,#060606ed 0%,#080706ba 33%,#09070426 72%,#110a072e 100%), linear-gradient(0deg,#0b0b0c 0%,#0b0b0c00 29%); }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 368px); align-items: center; gap: clamp(50px, 10vw, 153px); min-height: 605px; padding-block: 66px; }
.hero-copy { padding: 14px 0 25px; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .17em; color: var(--accent-text); line-height: 1.55; }
.hero-copy .eyebrow { color: #ffc384; display: flex; align-items: center; gap: 11px; }
.hero-copy .eyebrow span:first-child { display: block; height: 1px; width: 24px; background: currentColor; }
.hero h1 { margin: 20px 0 14px; font-size: clamp(68px, 7.9vw, 123px); font-weight: 770; line-height: .91; letter-spacing: -.091em; }
.hero h1 em { display: block; color: #ffb974; font-style: normal; }
.statement { font-size: clamp(21px, 2.2vw, 32px); font-weight: 640; letter-spacing: -.04em; line-height: 1.2; margin-top: 26px; }
.hero-description { color: #c9c1b8; margin-top: 13px; font-size: 14px; }
.hero-link { display: inline-flex; align-items: center; gap: 11px; margin-top: 30px; color: #f5ebe0; font-weight: 650; font-size: 13px; }
.hero-link:hover .circle-arrow { translate: 0 3px; }
.circle-arrow { height: 27px; width: 27px; display: grid; place-items: center; border: 1px solid #ffffff45; border-radius: 50%; transition: translate .2s ease; }
.join-card { color: var(--main); background: var(--glass); border: 1px solid #eec99f47; border-radius: 24px; padding: 27px; box-shadow: 0 30px 85px #0a0507a6; backdrop-filter: blur(21px); scroll-margin-top: 82px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status { display: inline-flex; max-width: max-content; align-items: center; white-space: nowrap; gap: 7px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); font-size: 11px; font-weight: 650; }
.status[data-state="online"] { color: var(--green); }
.status[data-state="offline"] { color: var(--red); }
.dot, .mini-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status[data-state="online"] .dot { box-shadow: 0 0 8px color-mix(in srgb, currentColor 43%, transparent); }
.join-card h2 { margin-top: 8px; font-size: 33px; letter-spacing: -.045em; line-height: 1.14; }
.quick-grid { display: grid; grid-template-columns: .75fr 1fr; gap: 11px; margin: 20px 0; }
.quick-grid div { min-width: 0; border-radius: 12px; border: 1px solid var(--line); padding: 9px 11px; }
.quick-grid span, .server-data span { display: block; color: var(--muted); font-size: 11px; font-weight: 570; }
.quick-grid strong { display: block; margin-top: 3px; overflow-wrap: anywhere; font-size: 18px; font-weight: 720; line-height: 1.2; }
.quick-grid .map-value { font: 650 14px/1.55 var(--mono); }
label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 6px; color: var(--muted); }
input, select { width: 100%; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--field); color: var(--main); }
input::placeholder { color: var(--muted); font-size: 12px; opacity: .85; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 11px; min-height: 43px; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; font-weight: 730; font-size: 13px; transition: filter .16s ease, transform .16s ease; line-height: 1.35; }
.button:not(:disabled):hover { filter: brightness(1.08); }
.button:not(:disabled):active { transform: scale(.98); }
.primary { background: var(--accent); color: #23170c; }
.secondary { border-color: var(--line); background: var(--field); }
.button:disabled { opacity: .5; }
.join-card .primary { display: flex; width: 100%; margin-top: 10px; justify-content: space-between; padding-inline: 14px; }
.button-arrow { font-size: 17px; line-height: 1; }
.join-actions { display: flex; justify-content: space-between; gap: 5px 12px; margin-top: 14px; flex-wrap: wrap; }
.link-button { border: 0; background: none; padding: 5px 0; color: var(--accent-text); font-size: 12px; font-weight: 620; }
.link-button:hover { text-decoration: underline; text-underline-offset: .24em; }
.feedback { margin-top: 10px; color: var(--accent-text); font-size: 12px; }
.feedback[data-error="true"] { color: var(--red); }
.mobile-note { display: none; color: var(--muted); font-size: 12px; margin-top: 10px; }
.server-data { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line); background: var(--surface); border-radius: 17px; margin-top: 26px; }
.server-data > div { min-width: 0; padding: 18px 22px; }
.server-data > div + div { border-left: 1px solid var(--line); }
.server-data strong { display: block; margin-top: 3px; font-size: 15px; overflow-wrap: anywhere; }
.status-foot { display: flex; align-items: center; margin: 11px 3px 0; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.status-foot time { font-variant-numeric: tabular-nums; }
.mini-dot { opacity: .55; width: 5px; height: 5px; }
.guide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .93fr); gap: clamp(36px,6vw,110px); align-items: center; padding: 78px 0 87px; scroll-margin-top: 54px; }
.guide h2 { margin: 8px 0 11px; font-size: clamp(30px,4.2vw,55px); line-height: 1.16; letter-spacing: -.055em; }
.guide-copy > p:not(.eyebrow,.feedback) { color: var(--muted); max-width: 36ch; }
.guide-actions { margin-top: 23px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.guide .secondary { border-radius: 12px; }
.steps { margin: 0; padding: 2px 19px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); list-style: none; }
.steps li { display: flex; gap: 13px; align-items: start; padding: 16px 0; }
.steps li + li { border-top: 1px solid var(--line); }
.step-number { display: grid; place-items: center; min-width: 31px; height: 30px; border-radius: 8px; background: var(--field); border: 1px solid var(--line); font: 10px var(--mono); color: var(--accent-text); }
.steps li div { min-width: 0; }
.steps li strong { font-size: 13px; font-weight: 680; }
.steps li p { margin-top: 2px; color: var(--muted); font-size: 12px; }
code { font-family: var(--mono); word-break: break-word; }
.steps code { display: inline-block; margin-top: 4px; border-radius: 5px; color: var(--accent-text); padding: 2px 6px; background: var(--field); }
footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 78px; font-size: 11px; color: var(--muted); }
.footer-inner .brand { color: var(--main); }
.footer-inner > a:last-child { white-space: nowrap; }
.footer-inner > a:hover { color: var(--main); }
.admin-page { min-height: 100vh; background-image: radial-gradient(ellipse at 62% 0%, #aa6b251a, transparent 55%); }
.admin-main { padding: 45px 0 64px; }
.admin-login { max-width: 400px; margin: min(12vh,100px) auto 0; }
.admin-login h1, .dashboard-head h1 { margin: 4px 0 8px; font-size: clamp(32px,5vw,47px); line-height: 1.12; letter-spacing: -.055em; }
.admin-login h1 + p, .dashboard-head h1 + p, .muted { color: var(--muted); }
.admin-login form { margin-top: 23px; }
.admin-login .primary { width: 100%; margin-top: 11px; }
.dashboard-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.panel { border: 1px solid var(--line); background: var(--surface); border-radius: 17px; padding: 22px; color: var(--main); min-width: 0; }
.panel h2 { font-size: 20px; line-height: 1.2; letter-spacing: -.025em; margin-bottom: 12px; }
.panel .card-top h2 { margin-bottom: 0; }
.panel .muted, #job-status { margin-top: 9px; font-size: 12px; }
.admin-actions, .select-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; align-items: end; margin-top: 12px; }
#settings-form input, #settings-form select { margin-bottom: 9px; }
#settings-form .primary { margin-top: 15px; }
.select-pair { margin: 0; }
.metrics-list div, .player-list li { display: flex; justify-content: space-between; align-items: start; gap: 13px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.metrics-list dt { color: var(--muted); }
.metrics-list dd { text-align: end; }
.player-list { list-style: none; padding: 0; margin: 12px 0 0; }
.logs-panel { margin-top: 15px; }
.logs-panel pre { background: var(--field); border-radius: 10px; overflow: auto; max-height: 290px; padding: 12px; font: 11px/1.65 var(--mono); margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 980px) {
  .shell { width: min(calc(100% - 70px), 1280px); }
  .hero-layout { gap: 42px; grid-template-columns: minmax(0, 1fr) minmax(0, 345px); min-height: 550px; }
  .join-card { padding: 21px; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 40px); }
  .top-inner { min-height: 56px; gap: 16px; }
  .brand-logo { width: 56px; }
  .top-nav { gap: 14px; }
  .hero-layout { gap: 26px; grid-template-columns: 1fr; padding-block: 45px 26px; min-height: 0; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(60px, 13vw, 91px); margin-top: 16px; }
  .hero::after { background: linear-gradient(90deg,#080605ca,#0a06054d 100%), linear-gradient(0deg,#0b0b0c 13%,#0b0b0c00 85%); }
  .hero-art img { object-position: center top; }
  .statement { margin-top: 17px; }
  .hero-description { margin-top: 9px; }
  .hero-link { margin-top: 15px; }
  .join-card { width: min(100%, 430px); }
  .mobile-note { display: block; }
  .guide { grid-template-columns: 1fr; padding-block: 55px; gap: 25px; }
  .footer-inner { padding-block: 15px; flex-wrap: wrap; }
  .footer-inner > span { flex-basis: 100%; order: 3; }
}
@media (max-width: 500px) {
  .brand small, .top-nav { display: none; }
  .server-data { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 18px; }
  .server-data > div { padding: 14px 16px; }
  .server-data > div:nth-child(3) { border-left: none; }
  .server-data > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-main { padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.mobile-note.device-notice { display: block; }
