:root {
  color-scheme: dark;
  --ink: #070c10;
  --ink-soft: #0d171d;
  --panel: rgba(10, 22, 28, 0.94);
  --panel-light: rgba(18, 34, 41, 0.92);
  --line: rgba(183, 151, 83, 0.24);
  --line-cool: rgba(130, 181, 190, 0.16);
  --gold: #d9b96e;
  --gold-bright: #f0d690;
  --gold-dim: #806c3c;
  --teal: #7bbcc0;
  --teal-bright: #9ee4dc;
  --leaf: #729568;
  --acorn: #a97845;
  --red: #bc5f51;
  --green: #73c99a;
  --text: #eef2ed;
  --muted: #91a0a1;
  --muted-dark: #667779;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--text); font-family: var(--sans); background: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: -80px; left: 20px; padding: 12px 18px; background: var(--gold); color: #111; transition: top .2s; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.public-page { position: relative; display: flex; flex-direction: column; overflow-x: hidden; background: #071017; }
.world-sky { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; background: radial-gradient(circle at 73% 25%, rgba(54, 119, 125, .2), transparent 24%), linear-gradient(150deg, #0a1e27 0%, #071116 45%, #0b0e12 100%); }
.world-sky::before { content: ""; position: absolute; inset: 0; opacity: .55; background-image: radial-gradient(circle, rgba(222, 235, 213, .75) 0 1px, transparent 1.5px), radial-gradient(circle, rgba(112, 202, 198, .5) 0 1px, transparent 1.5px); background-position: 0 0, 37px 48px; background-size: 117px 117px, 173px 173px; mask-image: linear-gradient(to bottom, #000 0%, transparent 68%); }
.world-sky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2, 8, 11, .15), transparent 40%, transparent 70%, rgba(2, 8, 11, .48)); }
.moon { position: absolute; width: 430px; height: 430px; right: 7%; top: 8%; border-radius: 50%; opacity: .35; filter: blur(1px); background: radial-gradient(circle at 45% 42%, rgba(184, 233, 219, .48), rgba(77, 156, 158, .2) 48%, transparent 70%); box-shadow: 0 0 120px rgba(66, 186, 181, .14); }
.oak-bough { position: absolute; width: 58%; height: 34%; right: -9%; top: -12%; opacity: .46; border-bottom: 28px solid #06100e; border-radius: 0 0 48% 60%; transform: rotate(-6deg); filter: drop-shadow(0 18px 20px rgba(0, 0, 0, .35)); }
.oak-bough::before, .oak-bough::after { content: ""; position: absolute; background: repeating-radial-gradient(ellipse at center, #0c2119 0 9px, transparent 10px 29px); }
.oak-bough::before { width: 70%; height: 150px; left: 5%; bottom: -10px; transform: rotate(8deg); }
.oak-bough::after { width: 55%; height: 120px; right: 0; bottom: -2px; transform: rotate(-12deg); }
.mountains { position: absolute; left: -8%; width: 120%; bottom: 0; transform-origin: bottom; clip-path: polygon(0 66%, 7% 49%, 13% 63%, 20% 29%, 26% 53%, 32% 38%, 38% 60%, 46% 35%, 51% 57%, 60% 25%, 68% 55%, 75% 36%, 81% 59%, 88% 41%, 96% 64%, 100% 57%, 100% 100%, 0 100%); }
.mountains-far { height: 58%; background: linear-gradient(165deg, rgba(37, 72, 75, .5), rgba(5, 13, 17, .72)); filter: blur(2px); }
.mountains-near { height: 39%; bottom: -4%; transform: scaleX(1.08); background: linear-gradient(165deg, rgba(18, 39, 41, .8), rgba(2, 7, 9, .98)); }
.mist { position: absolute; width: 120%; height: 42%; left: -10%; bottom: 0; opacity: .45; filter: blur(24px); background: repeating-linear-gradient(178deg, transparent 0 44px, rgba(101, 163, 158, .12) 64px 88px, transparent 112px 148px); }

.site-header, .site-footer, .public-main { position: relative; z-index: 2; }
.realm-rules { position: relative; z-index: 2; width: min(1280px, calc(100% - 96px)); margin: 0 auto; padding: 30px 0 90px; }
.rules-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.rules-heading .eyebrow { margin: 0 0 15px; }
.rules-heading h2 { margin: 0 0 10px; color: #f0f3ed; font: 500 clamp(31px, 4vw, 48px)/1.05 var(--serif); letter-spacing: -.035em; }
.rules-heading > div > p:last-child { max-width: 670px; margin: 0; color: var(--muted); font: 15px/1.65 var(--serif); }
.rules-heading > small { flex: 0 0 auto; color: var(--green); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.rate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rate-card { position: relative; min-height: 176px; padding: 28px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(circle at 100% 0%, rgba(214, 178, 92, .12), transparent 47%), linear-gradient(145deg, rgba(16, 34, 39, .96), rgba(7, 17, 22, .96)); box-shadow: 0 24px 60px rgba(0,0,0,.2); }
.rate-card::after { content: "✦"; position: absolute; right: 20px; top: 10px; color: rgba(223, 190, 106, .12); font: 58px var(--serif); }
.rate-card span { color: var(--gold); font-size: 9px; font-weight: 850; letter-spacing: .2em; }
.rate-card strong { display: block; margin: 14px 0 7px; color: var(--gold-bright); font: 500 47px var(--serif); }
.rate-card p { max-width: 270px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.rate-card.is-loading { opacity: .58; }
.rules-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; margin-top: 14px; }
.rules-panel { padding: 28px; }
.rules-panel > .card-kicker { margin: 0 0 17px; }
.change-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.change-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 63px; padding: 12px 0; border-top: 1px solid var(--line-cool); }
.change-row > span, .module-row > span { display: flex; flex-direction: column; gap: 5px; }
.change-row strong, .module-row strong { color: #dbe3df; font-size: 10px; }
.change-row small, .module-row small { color: var(--muted-dark); font-size: 9px; line-height: 1.45; }
.change-row b { flex: 0 0 auto; color: var(--teal-bright); font: 500 18px var(--serif); }
.module-list { display: flex; flex-direction: column; }
.module-row { display: flex; gap: 13px; align-items: flex-start; min-height: 63px; padding: 12px 0; border-top: 1px solid var(--line-cool); }
.module-row i { display: grid; place-items: center; flex: 0 0 auto; width: 27px; height: 27px; border: 1px solid var(--gold-dim); color: var(--gold); font-size: 9px; font-style: normal; transform: rotate(45deg); }
.module-row i::first-letter { transform: rotate(-45deg); }
.rules-empty { color: var(--muted-dark); font-size: 10px; }
.site-header { display: flex; align-items: center; justify-content: space-between; width: min(1400px, calc(100% - 80px)); margin: 0 auto; padding: 32px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; letter-spacing: .12em; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 45px; color: var(--gold-bright); font: bold 21px var(--serif); background: linear-gradient(145deg, rgba(211, 174, 95, .24), rgba(21, 43, 43, .15)); border: 1px solid var(--gold-dim); clip-path: polygon(50% 0, 94% 22%, 94% 72%, 50% 100%, 6% 72%, 6% 22%); }
.brand span:last-child { display: flex; flex-direction: column; }
.brand small { color: var(--gold-dim); font-size: 8px; font-weight: 800; line-height: 1; }
.brand strong { color: var(--gold-bright); font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.25; }
.text-link { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.text-link:hover { color: var(--gold-bright); }

.public-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .72fr); gap: clamp(50px, 8vw, 140px); align-items: center; width: min(1280px, calc(100% - 96px)); min-height: calc(100vh - 190px); margin: 0 auto; padding: 24px 0 70px; }
.realm-intro { position: relative; max-width: 690px; }
.squirrel-crest { position: absolute; width: 96px; height: 96px; right: 2px; top: -20px; opacity: .58; filter: drop-shadow(0 8px 16px #000); }
.crest-tail { position: absolute; width: 52px; height: 72px; left: 1px; top: 3px; border: 9px solid var(--gold-dim); border-left-color: transparent; border-radius: 62% 68% 58% 70%; transform: rotate(-28deg); }
.crest-body { position: absolute; width: 27px; height: 44px; left: 47px; top: 42px; border-radius: 55% 55% 42% 48%; background: linear-gradient(145deg, var(--gold), var(--acorn)); transform: rotate(-9deg); }
.crest-body::before, .crest-body::after { content: ""; position: absolute; width: 27px; height: 5px; left: 16px; top: 17px; border-radius: 50%; background: var(--gold-dim); transform: rotate(-35deg); transform-origin: left; }
.crest-body::after { top: 24px; transform: rotate(24deg); }
.crest-head { position: absolute; width: 27px; height: 26px; left: 56px; top: 24px; border-radius: 55% 65% 55% 45%; background: linear-gradient(145deg, var(--gold-bright), var(--acorn)); transform: rotate(-8deg); }
.crest-head::before { content: ""; position: absolute; width: 13px; height: 18px; left: 2px; top: -10px; background: var(--gold); clip-path: polygon(50% 0, 100% 100%, 0 82%); transform: rotate(-17deg); }
.crest-head::after { content: ""; position: absolute; width: 4px; height: 4px; right: 5px; top: 8px; border-radius: 50%; background: #10140e; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.crest-acorn { position: absolute; width: 15px; height: 19px; right: 0; bottom: 6px; border-radius: 45% 45% 60% 60%; background: var(--acorn); transform: rotate(22deg); }
.crest-acorn::before { content: ""; position: absolute; width: 17px; height: 8px; left: -1px; top: -2px; border-radius: 50%; background: var(--gold-dim); box-shadow: 0 -4px 0 -2px var(--gold); }
.eyebrow, .card-kicker { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 14px; }
.eyebrow span { width: 42px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow span:last-child { transform: scaleX(-1); }
.realm-intro h1 { margin: 22px 0 23px; color: #f0f3ed; font: 500 clamp(48px, 5.2vw, 78px)/.94 var(--serif); letter-spacing: -.05em; text-shadow: 0 8px 34px #000; }
.realm-intro h1 em { color: var(--gold-bright); font-weight: 400; }
.lede { max-width: 580px; margin: 0; color: #aeb9b7; font: 17px/1.75 var(--serif); }
.glass-panel { border: 1px solid rgba(165, 196, 191, .16); background: linear-gradient(100deg, rgba(10, 24, 29, .8), rgba(10, 18, 23, .5)); box-shadow: inset 0 1px rgba(255, 255, 255, .03); backdrop-filter: blur(12px); }
.realm-status { display: flex; align-items: center; gap: 15px; width: max-content; max-width: 100%; margin: 34px 0; padding: 14px 18px; }
.realm-status > span:not(.status-orb, .status-divider) { display: flex; flex-direction: column; gap: 3px; min-width: 110px; }
.realm-status small, .sidebar-foot small { color: var(--muted-dark); font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.realm-status strong { color: #d8e1dd; font-size: 11px; font-weight: 650; }
.status-orb { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-dim); box-shadow: 0 0 0 5px rgba(128, 108, 60, .1); }
.status-orb.online { background: var(--green); box-shadow: 0 0 0 5px rgba(94, 202, 146, .09), 0 0 16px rgba(94, 202, 146, .38); }
.status-divider { width: 1px; height: 24px; margin: 0 5px; background: var(--line-cool); }
.realm-address-block { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.realm-address-block > span { color: var(--muted-dark); font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.realm-address { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; color: var(--teal-bright); background: none; cursor: pointer; }
.realm-address code { font-size: 15px; }
.realm-address-block small { color: #657478; font-size: 10px; }

.registration-card, .login-card { position: relative; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(14, 29, 34, .97), rgba(7, 15, 20, .97)); box-shadow: var(--shadow), inset 0 0 60px rgba(88, 131, 127, .04); }
.registration-card::before, .registration-card::after, .login-card::before, .login-card::after { content: ""; position: absolute; width: 34px; height: 34px; pointer-events: none; }
.registration-card::before, .login-card::before { top: 8px; left: 8px; border-top: 1px solid var(--gold-dim); border-left: 1px solid var(--gold-dim); }
.registration-card::after, .login-card::after { right: 8px; bottom: 8px; border-right: 1px solid var(--gold-dim); border-bottom: 1px solid var(--gold-dim); }
.registration-card { width: 100%; max-width: 510px; justify-self: end; padding: 50px 48px 44px; }
.registration-card { background: radial-gradient(circle at 92% 3%, rgba(114, 149, 104, .1), transparent 33%), linear-gradient(145deg, rgba(14, 29, 34, .97), rgba(7, 15, 20, .97)); }
.card-rune { position: absolute; display: grid; place-items: center; width: 42px; height: 42px; top: -21px; left: calc(50% - 21px); color: var(--gold); font-size: 15px; background: #0b171c; border: 1px solid var(--gold-dim); transform: rotate(45deg); box-shadow: 0 6px 18px #000; }
.card-rune::first-letter { transform: rotate(-45deg); }
.card-kicker { margin: 0 0 10px; }
.registration-card h2, .panel h2, .portal-dialog h2 { margin: 0; color: #f1f1e9; font: 500 31px/1.15 var(--serif); }
.card-copy, .login-card > p, .panel > p, .portal-dialog > p { color: var(--muted); font: 14px/1.65 var(--serif); }
.registration-card form, .login-card form, .stacked-form { display: flex; flex-direction: column; gap: 9px; margin-top: 25px; }
label { margin-top: 7px; color: #bac4c0; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
label span { color: var(--muted-dark); font-weight: 600; letter-spacing: 0; text-transform: none; }
input, select { width: 100%; min-height: 45px; padding: 10px 13px; border: 1px solid rgba(135, 169, 168, .2); border-radius: 0; color: #eef2ed; background: rgba(3, 10, 13, .62); outline: none; transition: border-color .2s, background .2s; }
input::placeholder { color: #566568; }
input:focus, select:focus { border-color: var(--gold-dim); background: rgba(6, 15, 18, .84); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field-row > div { display: flex; flex-direction: column; gap: 9px; }
.form-note { margin: 8px 0 3px; color: var(--muted-dark); font-size: 9px; line-height: 1.5; }
.form-note span { margin-right: 6px; color: var(--gold-dim); }
.form-error { min-height: 17px; margin: 0; color: #e29183; font-size: 11px; line-height: 1.5; }
.primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 46px; padding: 13px 17px; border: 0; font-size: 10px; font-weight: 850; letter-spacing: .15em; text-decoration: none; cursor: pointer; transition: filter .2s, transform .2s, border-color .2s; }
.primary-button { color: #162019; background: linear-gradient(100deg, #c8a65d, #ead28f); box-shadow: 0 8px 24px rgba(190, 151, 70, .15); }
.primary-button:hover, .danger-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-button:disabled, .secondary-button:disabled, .danger-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.secondary-button { justify-content: center; border: 1px solid var(--line); color: var(--gold); background: rgba(12, 26, 31, .6); }
.secondary-button:hover { border-color: var(--gold-dim); }
.danger-button { justify-content: center; color: #fff1ed; background: linear-gradient(100deg, #743b34, #a95046); }
.success-view { padding: 36px 10px; text-align: center; }
.success-view .success-seal, .success-seal { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 30px; border: 1px solid var(--gold-dim); border-radius: 50%; color: var(--gold-bright); font: 26px var(--serif); box-shadow: inset 0 0 30px rgba(217, 185, 110, .08), 0 0 30px rgba(217, 185, 110, .07); }
.success-view p:not(.card-kicker) { margin: 18px 0 28px; color: var(--muted); font: 15px/1.7 var(--serif); }
.site-footer { display: flex; align-items: center; justify-content: space-between; width: min(1400px, calc(100% - 80px)); margin: auto auto 0; padding: 20px 0 25px; border-top: 1px solid rgba(139, 171, 169, .1); color: #536265; font-size: 9px; }
.footer-runes { color: var(--gold-dim); letter-spacing: 12px; }

/* Admin sign in */
.admin-page { min-height: 100vh; background: radial-gradient(circle at 50% 25%, #1a342e 0, #091619 40%, #05090c 100%); }
.admin-backdrop { position: fixed; inset: 0; opacity: .55; pointer-events: none; background-image: linear-gradient(rgba(144, 195, 192, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(144, 195, 192, .025) 1px, transparent 1px); background-size: 52px 52px; mask-image: radial-gradient(circle at center, #000, transparent 75%); }
.login-view { position: relative; z-index: 1; display: grid; place-items: center; min-height: 100vh; padding: 100px 24px 50px; }
.login-brand { position: absolute; top: 32px; left: 50%; transform: translateX(-50%); }
.login-card { width: min(440px, 100%); padding: 52px 48px 42px; text-align: center; }
.login-card h1 { margin: 8px 0 15px; font: 500 36px var(--serif); }
.login-card form { text-align: left; }
.login-card .primary-button { width: 100%; margin-top: 8px; }
.back-link { display: inline-block; margin-top: 24px; color: var(--muted-dark); font-size: 10px; text-decoration: none; }
.error-page { display: grid; place-items: center; min-height: 100vh; padding: 30px; background: radial-gradient(circle at center, #15303a, #05090c 70%); }
.error-page .login-card { padding: 70px 50px; text-align: center; }
.error-page .primary-button { margin-top: 22px; }

/* Dashboard */
.dashboard { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: fixed; z-index: 10; display: flex; flex-direction: column; width: 236px; height: 100vh; padding: 28px 20px 20px; border-right: 1px solid rgba(169, 137, 71, .18); background: linear-gradient(180deg, #0a171c, #071015); }
.sidebar-brand { margin: 0 10px 46px; }
.sidebar nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 13px; border: 1px solid transparent; color: #748587; background: transparent; font-size: 11px; font-weight: 650; text-align: left; cursor: pointer; }
.nav-item span { width: 17px; color: #526567; font-size: 15px; text-align: center; }
.nav-item:hover { color: #dce4df; background: rgba(96, 148, 146, .05); }
.nav-item.active { border-color: rgba(213, 180, 106, .16); color: var(--gold-bright); background: linear-gradient(90deg, rgba(204, 171, 94, .11), rgba(204, 171, 94, .02)); }
.nav-item.active span { color: var(--gold); }
.sidebar-foot { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-top: auto; padding: 17px 8px 2px; border-top: 1px solid var(--line-cool); }
.sidebar-foot > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sidebar-foot strong { overflow: hidden; color: #ced7d3; font-size: 10px; text-overflow: ellipsis; }
.icon-button { border: 0; color: var(--muted-dark); background: none; font-size: 18px; cursor: pointer; }
.dashboard-shell { grid-column: 2; min-width: 0; background: radial-gradient(circle at 70% 0%, rgba(30, 78, 80, .15), transparent 30%), #091116; }
.dashboard-header { position: sticky; z-index: 6; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 94px; padding: 20px clamp(24px, 4vw, 62px); border-bottom: 1px solid var(--line-cool); background: rgba(8, 17, 22, .9); backdrop-filter: blur(16px); }
.eyebrow.compact { display: block; margin: 0 0 6px; }
.dashboard-header h1 { margin: 0; font: 500 27px var(--serif); }
.compact-button { min-height: 37px; padding: 9px 13px; font-size: 9px; }
.dashboard-content { width: min(1380px, 100%); padding: 35px clamp(24px, 4vw, 62px) 70px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { position: relative; min-height: 132px; padding: 24px; overflow: hidden; border: 1px solid var(--line-cool); background: linear-gradient(140deg, rgba(17, 35, 42, .82), rgba(9, 20, 25, .86)); }
.stat-card::after { content: "❦"; position: absolute; right: 17px; top: 10px; color: rgba(214, 182, 106, .08); font: 48px var(--serif); }
.stat-card span { color: var(--muted-dark); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.stat-card strong { display: block; margin: 12px 0 4px; color: #f0f3ed; font: 500 34px var(--serif); }
.stat-card small { color: #68797b; font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 16px; margin-top: 18px; }
.panel { border: 1px solid var(--line-cool); background: linear-gradient(140deg, rgba(15, 31, 37, .87), rgba(8, 18, 23, .9)); box-shadow: 0 20px 45px rgba(0, 0, 0, .12); }
.server-panel, .quick-panel, .control-panel, .safety-panel { padding: 30px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading .card-kicker { margin-bottom: 7px; }
.realm-live { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; color: var(--green); background: rgba(73, 171, 119, .07); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.realm-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.realm-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 25px 0; border-top: 1px solid var(--line-cool); border-left: 1px solid var(--line-cool); }
.realm-facts div { min-width: 0; padding: 17px; border-right: 1px solid var(--line-cool); border-bottom: 1px solid var(--line-cool); }
.realm-facts dt { margin-bottom: 6px; color: var(--muted-dark); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.realm-facts dd { overflow: hidden; margin: 0; color: #cdd7d3; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.quick-panel { display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 100% 0%, rgba(209, 172, 87, .08), transparent 50%), linear-gradient(140deg, rgba(18, 34, 39, .9), rgba(10, 19, 23, .92)); }
.quick-panel .primary-button { margin-top: 18px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.search-field { display: flex; align-items: center; width: min(420px, 100%); min-height: 42px; margin: 0; padding-left: 14px; border: 1px solid var(--line-cool); background: rgba(4, 12, 16, .7); }
.search-field span { color: var(--muted-dark); font-size: 18px; }
.search-field input { min-height: 40px; border: 0; background: transparent; }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { height: 46px; padding: 0 18px; border-bottom: 1px solid var(--line-cool); color: #647678; font-size: 8px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
td { height: 62px; padding: 10px 18px; border-bottom: 1px solid rgba(130, 181, 190, .08); color: #aebbb8; font-size: 10px; white-space: nowrap; }
tbody tr:hover { background: rgba(97, 151, 150, .03); }
.account-cell { display: flex; align-items: center; gap: 11px; }
.account-cell > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.account-cell strong { color: #e1e7e2; font-size: 11px; }
.account-cell small { max-width: 180px; overflow: hidden; color: var(--muted-dark); text-overflow: ellipsis; }
.account-avatar { width: 30px; height: 34px; border: 1px solid var(--gold-dim); background: linear-gradient(135deg, rgba(219, 188, 110, .16), rgba(38, 73, 74, .2)); clip-path: polygon(50% 0, 93% 23%, 93% 72%, 50% 100%, 7% 72%, 7% 23%); }
.table-status { display: inline-flex; align-items: center; gap: 7px; color: #718082; }
.table-status i { width: 6px; height: 6px; border-radius: 50%; background: #526063; }
.table-status.is-online { color: var(--green); }
.table-status.is-online i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.access-badge { display: inline-block; padding: 6px 8px; border: 1px solid rgba(127, 155, 155, .15); color: #8a9999; font-size: 8px; text-transform: uppercase; }
.access-badge.level-1 { color: #82b7c5; border-color: rgba(93, 164, 187, .2); }
.access-badge.level-2 { color: #b793e4; border-color: rgba(153, 112, 203, .25); }
.access-badge.level-3 { color: var(--gold); border-color: var(--line); }
.row-action { padding: 6px 10px; border: 1px solid transparent; color: var(--gold); background: transparent; font-size: 9px; cursor: pointer; }
.row-action:hover { border-color: var(--line); }
.row-action:disabled { color: var(--muted-dark); cursor: not-allowed; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; color: var(--muted-dark); font-size: 9px; }
.pagination button { border: 0; color: var(--gold); background: none; font-size: 9px; cursor: pointer; }
.pagination button:disabled { color: #39484a; cursor: not-allowed; }
.empty-state { padding: 35px; color: var(--muted-dark); text-align: center; }

.invite-grid { grid-template-columns: minmax(300px, .72fr) minmax(440px, 1.28fr); margin-top: 0; }
.invite-grid > .panel { padding: 30px; }
.invite-list { display: flex; flex-direction: column; margin: 19px -8px -8px; }
.invite-item { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 15px 8px; border-top: 1px solid var(--line-cool); }
.invite-item > div { display: flex; flex-direction: column; gap: 4px; }
.invite-item strong { color: #dbe3de; font-size: 10px; }
.invite-item small { color: var(--muted-dark); font-size: 8px; }
.invite-item .invite-usage { color: var(--gold); font: 14px var(--serif); }
.invite-item button, .danger-text-button { border: 0; color: #b77367; background: transparent; font-size: 8px; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.invite-item.inactive { opacity: .5; }
.server-control-grid { display: grid; grid-template-columns: minmax(420px, .9fr) minmax(300px, .65fr); gap: 16px; max-width: 960px; }
.control-icon { float: right; color: rgba(219, 185, 110, .17); font: 70px var(--serif); }
.control-panel > p:not(.card-kicker) { max-width: 550px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 13px; border: 1px solid var(--line-cool); text-transform: none; }
.check-row input { flex: 0 0 auto; width: 16px; min-height: 16px; margin: 2px 0 0; accent-color: var(--gold); }
.check-row span { display: flex; flex-direction: column; gap: 4px; }
.check-row strong { color: #cbd5d1; font-size: 10px; letter-spacing: 0; }
.check-row small { color: var(--muted-dark); font-size: 9px; }
.safety-list { display: flex; flex-direction: column; gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.safety-list li { display: flex; gap: 12px; }
.safety-list li > span { display: grid; place-items: center; flex: 0 0 auto; width: 25px; height: 25px; border: 1px solid rgba(83, 180, 131, .25); border-radius: 50%; color: var(--green); font-size: 10px; }
.safety-list p { margin: 0; color: var(--muted-dark); font-size: 10px; line-height: 1.6; }
.safety-list strong { color: #c9d3cf; }
.audit-heading { padding: 24px 24px 12px; }

/* Dialogs and feedback */
.portal-dialog { width: min(600px, calc(100% - 28px)); padding: 34px; border: 1px solid var(--line); color: var(--text); background: linear-gradient(145deg, #10242a, #081318); box-shadow: 0 40px 100px #000; }
.portal-dialog::backdrop { background: rgba(2, 7, 9, .82); backdrop-filter: blur(5px); }
.portal-dialog form { display: flex; flex-direction: column; gap: 9px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.dialog-close { border: 0; color: var(--muted); background: none; font-size: 24px; cursor: pointer; }
.dialog-user-status { margin-bottom: 7px; padding: 10px 12px; border: 1px solid var(--line-cool); color: var(--muted); font-size: 9px; }
.dialog-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; margin-top: 15px; }
.invite-dialog { max-width: 720px; text-align: left; }
.invite-dialog-heading { display: flex; gap: 18px; align-items: center; }
.invite-dialog-heading .success-seal { flex: 0 0 auto; width: 58px; height: 58px; margin: 0; }
.invite-dialog-heading .card-kicker { margin: 0 0 6px; }
.invite-dialog-heading h2 { margin-bottom: 4px; }
.invite-dialog-heading p:last-child { margin: 0; color: var(--muted); font: 13px/1.5 var(--serif); }
.revealed-code { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 20px 0 5px; padding: 16px; border: 1px solid var(--gold-dim); color: var(--gold-bright); background: rgba(2, 9, 12, .65); cursor: pointer; }
.revealed-code code { font-size: clamp(14px, 4vw, 18px); }
.revealed-code span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.email-template { margin-top: 18px; }
.email-template-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 8px; }
.email-template-heading label { color: var(--gold); font-size: 9px; font-weight: 850; letter-spacing: .17em; }
.email-template-heading small { color: var(--muted-dark); font-size: 9px; }
.email-template input, .email-template textarea { width: 100%; }
.email-template input { margin-bottom: 8px; }
.email-template textarea { min-height: 245px; padding: 13px 14px; resize: vertical; border: 1px solid var(--line-cool); color: #ccd7d3; background: rgba(3, 11, 15, .72); font: 11px/1.55 var(--sans); }
.invite-email-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin-top: 14px; }
.invite-email-actions .primary-button, .invite-email-actions .secondary-button { display: grid; place-items: center; width: 100%; min-height: 42px; margin: 0; text-align: center; text-decoration: none; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(400px, calc(100% - 48px)); padding: 14px 18px; border: 1px solid rgba(83, 180, 131, .3); color: #c9eed9; background: #10261d; box-shadow: 0 20px 60px #000; font-size: 11px; opacity: 0; transform: translateY(20px); pointer-events: none; transition: .25s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast[data-tone="error"] { border-color: rgba(190, 82, 67, .4); color: #f0c4bb; background: #2c1716; }

@media (max-width: 1050px) {
  .public-main { grid-template-columns: 1fr 430px; gap: 40px; width: min(100% - 48px, 1000px); }
  .realm-intro h1 { font-size: clamp(46px, 6.2vw, 64px); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid, .invite-grid { grid-template-columns: 1fr; }
  .rules-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .site-header, .site-footer { width: calc(100% - 36px); }
  .site-header { padding-top: 20px; }
  .brand strong { font-size: 14px; }
  .text-link { font-size: 9px; }
  .public-main { grid-template-columns: 1fr; width: calc(100% - 32px); padding-top: 55px; }
  .realm-intro { text-align: center; }
  .squirrel-crest { right: 3%; top: -55px; transform: scale(.8); }
  .eyebrow { justify-content: center; }
  .lede { margin: auto; }
  .realm-status { margin-right: auto; margin-left: auto; }
  .realm-address-block { align-items: center; }
  .registration-card { justify-self: center; max-width: 540px; }
  .site-footer { flex-direction: column; gap: 8px; text-align: center; }
  .realm-rules { width: calc(100% - 32px); padding-top: 15px; }
  .rules-heading { display: block; text-align: center; }
  .rules-heading .eyebrow { justify-content: center; }
  .rules-heading > small { display: block; margin-top: 14px; }
  .rate-grid { grid-template-columns: 1fr; }
  .footer-runes { order: -1; }
  .dashboard { display: block; }
  .sidebar { position: sticky; top: 0; flex-direction: row; align-items: center; width: 100%; height: auto; padding: 9px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-brand { display: none; }
  .sidebar nav { flex-direction: row; }
  .nav-item { width: auto; white-space: nowrap; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0 0 0 10px; border: 0; }
  .sidebar-foot > span:nth-child(2), .sidebar-foot > .status-orb { display: none; }
  .dashboard-shell { min-height: 100vh; }
  .dashboard-header { top: 58px; min-height: 78px; padding: 15px 20px; }
  .dashboard-content { padding: 24px 16px 60px; }
  .server-control-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .public-main { padding-top: 25px; }
  .realm-intro h1 { font-size: 43px; }
  .squirrel-crest { display: none; }
  .realm-status { gap: 10px; width: 100%; justify-content: center; }
  .realm-status > span:not(.status-orb, .status-divider) { min-width: 90px; }
  .registration-card, .login-card { padding: 45px 25px 32px; }
  .field-row { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .change-list { grid-template-columns: 1fr; }
  .dashboard-header .secondary-button { display: none; }
  .dashboard-header { top: 55px; }
  .nav-item { padding: 10px; }
  .nav-item span { display: none; }
  .stat-card { min-height: 112px; }
  .realm-facts { grid-template-columns: 1fr; }
  .invite-grid > .panel, .server-panel, .quick-panel, .control-panel, .safety-panel { padding: 22px; }
  .server-control-grid { display: block; }
  .server-control-grid > * + * { margin-top: 14px; }
  .dialog-actions { grid-template-columns: 1fr 1fr; }
  .dialog-actions span { display: none; }
  .dialog-actions .danger-text-button { grid-column: 1 / -1; order: 3; margin-top: 8px; }
  .invite-dialog { padding: 28px 20px; }
  .invite-dialog-heading { align-items: flex-start; }
  .invite-dialog-heading .success-seal { width: 42px; height: 42px; }
  .email-template-heading { display: block; }
  .email-template-heading small { display: block; margin-top: 5px; }
  .invite-email-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
