:root {
  color-scheme: dark;
  --bg: #0d100f;
  --bg-soft: #131715;
  --panel: #181d1a;
  --panel-raised: #1e2521;
  --line: #303a34;
  --line-soft: #252d29;
  --text: #f1eee4;
  --muted: #a7afa8;
  --gold: #d5a94e;
  --gold-light: #f0cb78;
  --green: #6fc28d;
  --red: #df746f;
  --blue: #78a9ca;
  --shadow: 0 22px 70px rgba(0, 0, 0, .24);
  --radius: 18px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 80% 5%, rgba(213, 169, 78, .07), transparent 28rem), var(--bg); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--gold-light); text-decoration: none; }
a:hover { color: #ffe0a0; }
code { padding: .15rem .4rem; border: 1px solid var(--line); border-radius: 6px; color: #d8dfda; background: #101411; font-family: "SFMono-Regular", Consolas, monospace; font-size: .87em; }
h1, h2, p { margin-top: 0; }
h1, h2 { letter-spacing: -.025em; }
h1 { margin-bottom: 0; font-family: var(--serif); font-size: clamp(1.75rem, 3vw, 2.35rem); font-weight: 500; }
h2 { margin-bottom: .45rem; font-size: 1.2rem; }
small { color: var(--muted); }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 10; display: flex; flex-direction: column; height: 100vh; padding: 26px 20px 20px; border-right: 1px solid var(--line-soft); background: rgba(13, 16, 15, .96); }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 32px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.brand small { margin-top: -2px; font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 46px; color: #17140c; background: linear-gradient(145deg, var(--gold-light), #9f7629); border: 1px solid #f1ce80; clip-path: polygon(50% 0, 92% 20%, 84% 76%, 50% 100%, 16% 76%, 8% 20%); font-family: var(--serif); font-size: 1.3rem; font-weight: 700; filter: drop-shadow(0 8px 16px rgba(213, 169, 78, .2)); }
.brand-mark.large { width: 64px; height: 74px; font-size: 2rem; }
.nav { display: grid; gap: 5px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); font-size: .91rem; transition: color .15s, background .15s, border-color .15s; }
.nav a span { color: #657069; font-family: "SFMono-Regular", Consolas, monospace; font-size: .65rem; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--text); border-color: #594b2d; background: linear-gradient(90deg, rgba(213, 169, 78, .14), rgba(213, 169, 78, .03)); }
.nav a.active span { color: var(--gold); }
.sidebar-footer { display: grid; gap: 14px; margin-top: auto; padding: 18px 8px 0; border-top: 1px solid var(--line-soft); }
.mini-status, .topbar-status { display: flex; align-items: center; gap: 10px; }
.mini-status strong, .mini-status small, .topbar-status strong, .topbar-status small { display: block; }
.mini-status strong { font-size: .84rem; }
.mini-status small { font-size: .68rem; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 5px rgba(167, 175, 168, .08); }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 5px rgba(111, 194, 141, .1), 0 0 18px rgba(111, 194, 141, .45); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 0 5px rgba(223, 116, 111, .09); }

.content { width: 100%; max-width: 1500px; padding: 30px clamp(24px, 4vw, 60px) 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.topbar .eyebrow { margin-bottom: 3px; }
.topbar-status { min-width: 150px; justify-content: flex-end; }
.topbar-status small { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.topbar-status strong { font-size: .9rem; }
.eyebrow { margin-bottom: 8px; color: var(--gold); font-size: .67rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

.alert { margin-bottom: 20px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.alert.success { color: #c7efd5; border-color: rgba(111, 194, 141, .4); background: rgba(35, 81, 52, .32); }
.alert.error { color: #ffd2cf; border-color: rgba(223, 116, 111, .4); background: rgba(89, 37, 35, .35); }

.hero-card { position: relative; display: grid; grid-template-columns: 1.4fr .6fr; min-height: 270px; margin-bottom: 16px; overflow: hidden; border: 1px solid #4b422d; border-radius: var(--radius); background: linear-gradient(115deg, #24241d, #171d19 60%, #141816); box-shadow: var(--shadow); }
.hero-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .33; background-image: repeating-linear-gradient(55deg, transparent 0 32px, rgba(255,255,255,.025) 33px 34px); mask-image: linear-gradient(90deg, #000, transparent); }
.hero-copy { position: relative; z-index: 1; align-self: center; padding: clamp(28px, 5vw, 56px); }
.hero-copy h2 { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.8rem); font-weight: 400; }
.hero-copy > p:not(.eyebrow) { max-width: 660px; color: #bcc3bd; }
.hero-rune { display: grid; place-items: center; min-height: 240px; overflow: hidden; }
.hero-rune span { display: grid; place-items: center; width: 180px; height: 210px; color: rgba(213, 169, 78, .22); border: 1px solid rgba(213, 169, 78, .22); clip-path: polygon(50% 0, 94% 21%, 84% 77%, 50% 100%, 16% 77%, 6% 21%); background: radial-gradient(circle, rgba(213,169,78,.09), transparent 68%); font-family: var(--serif); font-size: 7rem; transform: rotate(5deg); }
.endpoint { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; padding: 7px 8px 7px 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(5, 7, 6, .45); }
.endpoint > span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.endpoint code { padding: 0; border: 0; background: none; color: var(--text); }
.copy-button { padding: 5px 8px; border: 0; border-radius: 6px; color: #1c170c; background: var(--gold); cursor: pointer; font-size: .72rem; font-weight: 700; }

.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 13px; background: #111512; }
.action-row form { margin: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--panel-raised); cursor: pointer; font-size: .82rem; font-weight: 650; transition: transform .12s, border-color .12s, background .12s; }
.button:hover { color: var(--text); border-color: #536057; background: #252d29; }
.button:active { transform: translateY(1px); }
.button.primary { color: #211a0d; border-color: #e8c36d; background: linear-gradient(145deg, var(--gold-light), var(--gold)); }
.button.primary:hover { background: #f0cb78; }
.button.full { width: 100%; }
.text-button { padding: 0; border: 0; color: var(--gold-light); background: none; cursor: pointer; font: inherit; }
.text-button:hover { color: #ffe2a4; }
.text-button.danger { color: #ef9b96; }
.copy-fallback { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; opacity: 0; }
.hidden { display: none !important; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.metric-card { padding: 20px; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--panel); }
.metric-card > span, .metric-card > strong, .metric-card > small { display: block; }
.metric-card > span { color: var(--muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.metric-card > strong { margin: 5px 0 12px; font-family: var(--serif); font-size: 1.8rem; font-weight: 400; }
.metric-card > small { margin-top: 8px; font-size: .7rem; }
.metric-card.build { background: linear-gradient(145deg, #1c211e, #161a18); }
.meter { display: block; width: 100%; height: 4px; overflow: hidden; border: 0; border-radius: 99px; background: #0e120f; appearance: none; }
.meter::-webkit-progress-bar { border-radius: 99px; background: #0e120f; }
.meter::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, #96752f, var(--gold-light)); transition: width .4s ease; }
.meter::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, #96752f, var(--gold-light)); }

.split-grid, .security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.panel-card { margin-bottom: 14px; padding: 24px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: linear-gradient(145deg, rgba(30,37,33,.97), rgba(22,27,24,.97)); box-shadow: 0 12px 38px rgba(0, 0, 0, .12); }
.panel-card p { color: var(--muted); }
.note-card { border-color: #463e2b; background: linear-gradient(145deg, rgba(50, 44, 29, .58), rgba(24, 28, 25, .98)); }
.maintenance-card { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(420px, 1fr); align-items: center; gap: 40px; border-color: #463e2b; }
.maintenance-card > div > p:last-child { max-width: 720px; margin-bottom: 0; }
.maintenance-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.maintenance-facts div { padding: 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(12, 16, 13, .38); }
.maintenance-facts dt, .maintenance-facts dd { margin: 0; }
.maintenance-facts dt { color: #7f8a83; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.maintenance-facts dd { margin-top: 5px; color: var(--text); font-size: .76rem; font-weight: 650; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.card-heading h2, .card-heading p { margin-bottom: 0; }
.card-heading > p { max-width: 420px; font-size: .82rem; text-align: right; }
.detail-list { margin: 0; }
.detail-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; text-align: right; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-stack { display: grid; gap: 16px; }
label > span { display: block; margin-bottom: 7px; color: #ced3cf; font-size: .76rem; font-weight: 650; }
label > small { display: block; margin-top: 5px; font-size: .68rem; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--text); background: #101411; transition: border-color .15s, box-shadow .15s; }
input, select { min-height: 43px; padding: 9px 11px; }
textarea { padding: 12px; resize: vertical; font-family: "SFMono-Regular", Consolas, monospace; font-size: .78rem; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(213, 169, 78, .1); }
input[type="file"] { min-width: 0; max-width: 100%; padding: 7px; overflow: hidden; font-size: .76rem; }
input[type="file"]::file-selector-button { margin-right: 10px; padding: 5px 9px; border: 0; border-radius: 5px; color: var(--text); background: #2a322d; }
.toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.toggle-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.toggle { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line-soft); border-radius: 10px; cursor: pointer; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle > span { position: relative; display: block; width: 38px; height: 21px; margin: 0; border-radius: 99px; background: #0d100f; box-shadow: inset 0 0 0 1px #414a45; }
.toggle > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #78817b; transition: transform .16s, background .16s; }
.toggle input:checked + span { background: rgba(213, 169, 78, .16); box-shadow: inset 0 0 0 1px #a88640; }
.toggle input:checked + span::after { background: var(--gold-light); transform: translateX(17px); }
.toggle input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.toggle b { font-size: .78rem; font-weight: 600; }
.toggle b small { display: block; margin-top: 2px; font-weight: 400; }
.toggle.compact { grid-template-columns: 42px 1fr; min-height: 58px; }
.sticky-actions { position: sticky; bottom: 14px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px 0; padding: 13px 13px 13px 18px; border: 1px solid #51452c; border-radius: 12px; background: rgba(19, 23, 21, .96); box-shadow: 0 16px 50px rgba(0,0,0,.35); backdrop-filter: blur(12px); }
.sticky-actions span { color: var(--muted); font-size: .78rem; }

.intro-card, .upload-card { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.intro-card > p, .intro-card .inline-actions { max-width: 660px; margin-bottom: 0; }
.inline-actions { display: flex; align-items: center; gap: 20px; }
.inline-actions p { margin-bottom: 0; }
.three-column { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.access-card { display: flex; flex-direction: column; }
.access-card textarea { flex: 1; min-height: 250px; margin: 5px 0 16px; }
.world-tool-grid { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(560px, 1.25fr); gap: 14px; }
.world-tool-grid > .panel-card { min-width: 0; align-content: start; }
.world-create-card { border-color: #51452c; }
.world-create-card .button { justify-self: start; }
.world-import-card { min-width: 0; }
.import-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.import-option { display: grid; align-content: space-between; gap: 16px; min-width: 0; padding: 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(12, 16, 13, .34); }
.import-option h3 { margin: 7px 0 5px; font-size: .95rem; }
.import-option p { margin-bottom: 0; font-size: .77rem; }
.format-label { display: inline-flex; padding: 3px 7px; border: 1px solid rgba(111, 194, 141, .32); border-radius: 99px; color: #bde6ca; background: rgba(111, 194, 141, .08); font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.format-label.legacy { color: #f0ca91; border-color: rgba(213, 169, 78, .34); background: rgba(213, 169, 78, .08); }
.compact-upload-form, .legacy-upload-form, .backup-upload-form { display: grid; align-items: end; gap: 10px; }
.compact-upload-form, .legacy-upload-form { grid-template-columns: 1fr; }
.compact-upload-form .button, .legacy-upload-form .button { justify-self: start; }
.backup-import-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); align-items: end; gap: 40px; }
.backup-import-card p { max-width: 760px; margin-bottom: 8px; }
.backup-upload-form { grid-template-columns: minmax(220px, 1fr) auto; }
.upload-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto; align-items: end; gap: 10px; min-width: min(100%, 620px); }

.count-badge, .active-label, .warning-label { display: inline-flex; align-items: center; width: max-content; padding: 3px 7px; border-radius: 99px; font-size: .64rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.count-badge { flex: 0 0 auto; color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.active-label { margin-top: 4px; color: #bde6ca; background: rgba(111,194,141,.12); }
.warning-label { margin-top: 4px; color: #f0ca91; background: rgba(213,169,78,.12); }
.format-name { font-size: .78rem; }
.data-table { overflow: hidden; border: 1px solid var(--line-soft); border-radius: 11px; }
.table-row { display: grid; grid-template-columns: minmax(200px, 1.6fr) minmax(100px, .8fr) minmax(80px, .5fr) minmax(230px, 1fr); align-items: center; min-height: 62px; border-top: 1px solid var(--line-soft); }
.table-row:first-child { border-top: 0; }
.table-row > span { min-width: 0; padding: 12px 14px; color: var(--muted); }
.table-row strong, .table-row small { display: block; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.table-head { min-height: 42px; background: #111512; }
.table-head > span { color: #7e8982; font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; }
.table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .75rem; }
.table-actions form { display: inline; }
.world-table .table-row { grid-template-columns: minmax(150px, 1.2fr) minmax(145px, .9fr) minmax(95px, .65fr) minmax(70px, .45fr) minmax(270px, 1.5fr); }
.empty-state { padding: 45px 20px; border: 1px dashed var(--line); border-radius: 11px; text-align: center; }
.empty-state strong { font-family: var(--serif); font-size: 1.2rem; }
.empty-state p { margin: 5px 0 0; }

.player-activity-card { overflow: hidden; }
.player-help { max-width: 900px; margin: -6px 0 20px; font-size: .82rem; }
.player-table { overflow-x: auto; }
.player-table .table-row { grid-template-columns: minmax(115px, 1fr) minmax(180px, 1.35fr) minmax(105px, .8fr) minmax(100px, .75fr) minmax(78px, .55fr) minmax(225px, 1.65fr); min-width: 850px; }
.player-table code { font-size: .72em; white-space: nowrap; }
.player-actions { gap: 10px; }
.status-label, .role-label { display: inline-flex; align-items: center; width: max-content; padding: 3px 8px; border-radius: 99px; font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.status-label.online { color: #c8efd5; background: rgba(111, 194, 141, .13); }
.status-label.offline { color: #c5ccc7; background: rgba(126, 137, 130, .13); }
.role-label { color: #cbd2cd; border: 1px solid var(--line); }
.role-label.admin { color: #f6d993; border-color: rgba(213, 169, 78, .36); background: rgba(213, 169, 78, .08); }
.role-label.allowed { color: #bcdbee; border-color: rgba(120, 169, 202, .34); background: rgba(120, 169, 202, .08); }
.role-label.banned { color: #f5b1ad; border-color: rgba(223, 116, 111, .36); background: rgba(223, 116, 111, .08); }

.log-card pre { max-height: calc(100vh - 240px); min-height: 460px; margin: 0; padding: 18px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 10px; color: #c9d1cb; background: #090c0a; font-family: "SFMono-Regular", Consolas, monospace; font-size: .74rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.security-grid { align-items: start; max-width: 1050px; }
.security-note ul { padding-left: 20px; color: var(--muted); }
.security-note li { margin: 8px 0; }
.security-wide { grid-column: 1 / -1; }
.page-footer { padding: 24px 0 6px; color: #5f6862; font-size: .65rem; letter-spacing: .08em; text-align: center; text-transform: uppercase; }

.login-body { display: grid; min-height: 100vh; place-items: center; padding: 30px; background: radial-gradient(circle at 15% 20%, rgba(213,169,78,.11), transparent 28rem), radial-gradient(circle at 90% 80%, rgba(82,114,93,.11), transparent 28rem), #0d100f; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .65fr); width: min(1180px, 100%); min-height: 700px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: 0 35px 100px rgba(0,0,0,.38); }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: clamp(36px, 7vw, 72px); background: linear-gradient(150deg, rgba(42,45,35,.92), rgba(17,22,19,.98)); }
.login-story::before, .login-story::after { content: ""; position: absolute; border: 1px solid rgba(213,169,78,.14); transform: rotate(24deg); }
.login-story::before { top: -150px; right: -100px; width: 420px; height: 520px; }
.login-story::after { top: -90px; right: -40px; width: 260px; height: 330px; }
.login-story > * { position: relative; z-index: 1; }
.login-story .brand-mark { margin-bottom: 22px; }
.login-server-overview { margin-bottom: auto; padding: 16px; border: 1px solid rgba(213, 169, 78, .24); border-radius: 15px; background: rgba(11, 15, 12, .48); backdrop-filter: blur(6px); }
.login-server-grid { display: grid; grid-template-columns: 1.35fr .75fr .9fr; gap: 8px; }
.login-server-grid article { min-width: 0; padding: 10px 11px; border: 1px solid rgba(112, 124, 116, .2); border-radius: 9px; background: rgba(27, 34, 29, .72); }
.login-server-grid article > span, .login-server-grid article > strong { display: block; }
.login-server-grid article > span, .public-player-names > span { margin-bottom: 4px; color: #8e9991; font-size: .61rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.login-server-grid article > strong { overflow: hidden; color: var(--text); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.public-state { display: flex !important; align-items: center; gap: 9px; }
.public-state b { font-weight: 700; }
.public-player-names { margin-top: 12px; }
.public-player-names > div { display: flex; flex-wrap: wrap; gap: 7px; }
.public-player-names b, .public-player-names em { padding: 4px 9px; border: 1px solid #454d47; border-radius: 99px; color: #dce2dd; background: rgba(35, 43, 38, .78); font-size: .7rem; font-style: normal; font-weight: 600; }
.public-player-names em { color: var(--muted); font-weight: 400; }
.login-story h1 { max-width: 540px; margin-bottom: 18px; font-size: clamp(3rem, 7vw, 5.4rem); line-height: .97; }
.login-intro { max-width: 520px; color: #b8c0ba; font-size: 1.02rem; }
.login-facts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.login-facts span { padding: 5px 9px; border: 1px solid #494533; border-radius: 99px; color: #d8c99f; font-size: .67rem; text-transform: uppercase; letter-spacing: .06em; }
.login-card { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(34px, 5vw, 60px); background: #171c19; }
.login-card h2 { font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.login-card p { color: var(--muted); }
.login-card .alert { margin-bottom: 0; }
.login-card .fine-print { margin: 0; font-size: .7rem; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-column { grid-template-columns: 1fr; }
  .access-card textarea { min-height: 190px; }
  .upload-card { align-items: flex-start; flex-direction: column; gap: 20px; }
  .upload-form { width: 100%; }
  .form-grid.four, .toggle-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .maintenance-card { grid-template-columns: 1fr; gap: 20px; }
  .world-tool-grid { grid-template-columns: 1fr; }
  .backup-import-card { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: static; display: block; width: 100%; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .brand { margin: 0 0 14px; }
  .nav { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 4px; }
  .nav a { flex: 0 0 auto; padding: 8px 11px; }
  .nav a span { display: none; }
  .sidebar-footer { display: none; }
  .content { padding: 22px 16px; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-rune { position: absolute; right: -40px; bottom: -75px; opacity: .45; }
  .hero-copy { padding-right: 90px; }
  .split-grid, .security-grid { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro-card { display: block; }
  .intro-card > p, .intro-card .inline-actions { margin-top: 18px; }
  .table-card { overflow-x: auto; }
  .data-table { min-width: 720px; }
  .import-options { grid-template-columns: 1fr; }
  .login-body { padding: 14px; }
  .login-shell { grid-template-columns: 1fr; min-height: auto; }
  .login-story { min-height: 340px; padding: 36px; }
  .login-story h1 { font-size: 3.2rem; }
  .login-server-overview { margin-bottom: 48px; }
  .login-card { padding: 36px; }
}

@media (max-width: 560px) {
  .topbar { align-items: flex-end; }
  .topbar-status { min-width: auto; }
  .topbar-status small { display: none; }
  .hero-copy { padding: 30px 24px 35px; }
  .hero-copy h2 { font-size: 2.4rem; }
  .endpoint { display: grid; grid-template-columns: 1fr auto; }
  .endpoint > span { grid-column: 1 / -1; }
  .metric-grid, .form-grid, .form-grid.three, .form-grid.four, .toggle-grid, .toggle-grid.four { grid-template-columns: 1fr; }
  .card-heading { display: block; }
  .card-heading > p { margin-top: 8px; text-align: left; }
  .inline-actions { align-items: flex-start; flex-direction: column; }
  .upload-form { grid-template-columns: 1fr; }
  .compact-upload-form, .legacy-upload-form, .backup-upload-form { grid-template-columns: 1fr; }
  .legacy-upload-form .button { grid-column: auto; }
  .world-table { min-width: 0; overflow: visible; }
  .world-table .table-head { display: none; }
  .world-table .table-row { grid-template-columns: 1fr; min-height: 0; padding: 14px; }
  .world-table .table-row > span { padding: 6px 0; }
  .world-table .table-row > span[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #7e8982; font-size: .61rem; letter-spacing: .1em; text-transform: uppercase; }
  .world-table .table-actions { margin-top: 5px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
  .sticky-actions { align-items: stretch; flex-direction: column; }
  .sticky-actions .button { width: 100%; }
  .login-server-grid { grid-template-columns: 1fr; }
  .maintenance-facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
