/* Ground Zero — site styles
   Palette: deep slate blues with a desert-sand accent (taken from the sunset photo in the hero).
   Dark is the default; a light theme is available via the toggle (html[data-theme="light"]). */

:root{
  color-scheme:dark;
  --bg:#0d1118;
  --bg-2:#10161f;
  --surface:#141b26;
  --surface-2:#1a2331;
  --line:#243042;
  --line-2:#33445c;
  --text:#dfe4eb;
  --text-2:#a2adbb;
  --text-3:#76838f;
  --accent:#c9a67a;
  --accent-hi:#dcbc90;
  --accent-ink:#1c1510;
  --accent-text:#e0c49b;
  --accent-soft:rgba(201,166,122,.18);
  --link:#e6cfa8;
  --pos:#86c39b;
  --plate-1:#4a5666;
  --plate-2:#323c4a;
  --shadow:0 12px 32px rgba(0,0,0,.35);
  --nav-bg:rgba(13,17,24,.8);
  --rar-common:#86a894;
  --rar-uncommon:#6aa4d4;
  --rar-rare:#e0ad3b;
  --rar-veryrare:#e0805f;
  --rar-special:#a98fe0;
  --r-sm:10px;
  --r:14px;
  --r-lg:20px;
  --maxw:1120px;
  --nav-h:64px;
  --font:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --mono:ui-monospace,'SF Mono','Cascadia Mono',Consolas,monospace;
}
:root[data-theme="light"]{
  color-scheme:light;
  --bg:#eef1f5;
  --bg-2:#e6eaf0;
  --surface:#ffffff;
  --surface-2:#f3f5f9;
  --line:#d9e0e8;
  --line-2:#c2cdd9;
  --text:#141d29;
  --text-2:#455468;
  --text-3:#66768a;
  --accent-hi:#a98456;
  --accent-text:#7b5a2a;
  --accent-soft:rgba(169,132,86,.16);
  --link:#7f5a22;
  --pos:#2b7a4b;
  --plate-1:#d3dae4;
  --plate-2:#b9c4d1;
  --shadow:0 10px 28px rgba(31,45,66,.1);
  --nav-bg:rgba(238,241,245,.85);
  --rar-common:#4f7f63;
  --rar-uncommon:#2f78b3;
  --rar-rare:#b07800;
  --rar-veryrare:#c1502b;
  --rar-special:#7556c2;
}
/* sections that always sit on the dark map (hero, join band) */
.dark-scope{
  --text:#dfe4eb; --text-2:#b3bdca; --text-3:#8795a5;
  --line:rgba(255,255,255,.12); --line-2:rgba(255,255,255,.2);
  --surface:rgba(20,27,38,.78); --surface-2:rgba(255,255,255,.07);
  --accent-text:#e0c49b; --link:#e6cfa8;
  color:var(--text);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
html,body{ margin:0; padding:0; }
body{
  background:var(--bg); color:var(--text);
  font-family:var(--font); font-size:16px; line-height:1.6;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
h1,h2,h3,h4{ margin:0; font-weight:650; letter-spacing:-.02em; line-height:1.2; text-wrap:balance; }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
ul,ol{ margin:0; padding:0; list-style:none; }
img{ max-width:100%; display:block; }
button,input,select,textarea{ font:inherit; color:inherit; }
button{ cursor:pointer; }
::selection{ background:var(--accent); color:var(--accent-ink); }
:focus-visible{ outline:2px solid var(--link); outline-offset:2px; border-radius:6px; }
[hidden]{ display:none !important; }
.icon{ width:1.25em; height:1.25em; flex:none; }
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip{ position:absolute; left:12px; top:-60px; z-index:100; background:var(--accent); color:var(--accent-ink); padding:10px 16px; border-radius:8px; font-weight:600; }
.skip:focus{ top:12px; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } *{ transition:none !important; animation:none !important; } }

.container{ width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:20px; }
@media (min-width:700px){ .container{ padding-inline:32px; } }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 20px; border-radius:11px; border:1px solid transparent;
  font-weight:600; font-size:.94rem; line-height:1.2; white-space:nowrap;
  transition:background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--accent); color:var(--accent-ink); }
.btn-primary:hover{ background:var(--accent-hi); }
.btn-secondary{ background:transparent; color:var(--text); border-color:var(--line-2); }
.btn-secondary:hover{ border-color:var(--text-3); background:var(--surface-2); }
.btn-lg{ padding:14px 26px; font-size:1rem; }
.btn-sm{ padding:8px 14px; font-size:.86rem; border-radius:9px; }
.link-arrow{ display:inline-flex; align-items:center; gap:6px; color:var(--accent-text); font-weight:600; font-size:.92rem; }
.link-arrow .icon{ width:1.1em; height:1.1em; transition:transform .15s; }
.link-arrow:hover .icon{ transform:translateX(3px); }

/* ---------- nav ---------- */
.nav{ position:sticky; top:0; z-index:50; background:var(--nav-bg); -webkit-backdrop-filter:saturate(1.4) blur(14px); backdrop-filter:saturate(1.4) blur(14px); border-bottom:1px solid var(--line); }
.nav-inner{ display:flex; align-items:center; gap:20px; height:var(--nav-h); }
.brand{ display:flex; align-items:center; flex:none; }
.brand img{ height:21px; width:auto; }
.logo-dark{ display:none; }
:root[data-theme="light"] .logo-light:not(.keep){ display:none; }
:root[data-theme="light"] .logo-dark{ display:block; }
.nav-links{ display:flex; gap:2px; margin-left:8px; }
.nav-links a{ padding:8px 13px; border-radius:9px; color:var(--text-2); font-weight:500; font-size:.92rem; white-space:nowrap; transition:color .15s, background .15s; }
.nav-links a:hover{ color:var(--text); background:var(--surface-2); }
.nav-links a[aria-current="page"]{ color:var(--text); background:var(--surface-2); }
.nav-links .nav-join,.nav-links .nav-join:hover{ color:var(--accent-ink); }
.nav-links .nav-join{ background:var(--accent); }
.nav-links .nav-join:hover{ background:var(--accent-hi); }
.nav-actions{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.icon-btn{ width:40px; height:40px; border-radius:10px; border:1px solid var(--line); background:transparent; color:var(--text-2); display:inline-grid; place-items:center; transition:color .15s, border-color .15s, background .15s; }
.icon-btn:hover{ color:var(--text); border-color:var(--line-2); background:var(--surface-2); }
.icon-btn .icon{ width:20px; height:20px; }
.theme-toggle .i-sun{ display:inline; }
.theme-toggle .i-moon{ display:none; }
:root[data-theme="light"] .theme-toggle .i-sun{ display:none; }
:root[data-theme="light"] .theme-toggle .i-moon{ display:inline; }
.nav-menu{ display:none; }
@media (max-width:960px){
  .nav-menu{ display:inline-grid; }
  .nav-actions .btn{ display:none; }
  .nav-links{
    display:none; position:absolute; left:0; right:0; top:var(--nav-h); margin:0; padding:10px 20px 18px;
    flex-direction:column; gap:2px; background:var(--bg); border-bottom:1px solid var(--line); box-shadow:var(--shadow);
  }
  .nav[data-open="true"] .nav-links{ display:flex; }
  .nav-links a{ padding:13px 12px; font-size:1rem; }
  .nav-links .nav-join{ display:flex; margin-top:8px; }
}
@media (min-width:961px){ .nav-links .nav-join{ display:none; } }

/* ---------- sections ---------- */
.view{ min-height:60vh; }
.section{ padding:72px 0; }
.section.tight{ padding:48px 0; }
.section-alt{ background:var(--bg-2); border-block:1px solid var(--line); }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:28px; }
.section-head h2{ font-size:clamp(1.5rem,2.6vw,1.95rem); }
.section-head p{ color:var(--text-2); margin-top:8px; max-width:56ch; }
.eyebrow{ color:var(--accent-text); font-size:.78rem; font-weight:650; letter-spacing:.1em; text-transform:uppercase; margin-bottom:10px; }
.page-head{ padding:52px 0 28px; }
.page-head h1{ font-size:clamp(1.9rem,3.6vw,2.6rem); }
.page-head p:not(.eyebrow){ color:var(--text-2); margin-top:12px; max-width:60ch; font-size:1.05rem; }
.page-body{ padding-bottom:88px; }
.card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); }

/* ---------- hero ---------- */
.hero{ position:relative; isolation:isolate; overflow:hidden; padding:84px 0 76px; }
.hero-bg{ position:absolute; inset:0; z-index:-2; background:#0d1118 url(../img/hero.jpg) center 52%/cover no-repeat; filter:brightness(1.3) saturate(1.1); }   /* the photo is a dusk shot: lift it so it still reads under the overlay */
.hero::after{
  content:""; position:absolute; inset:0; z-index:-1;
  background:linear-gradient(90deg,rgba(13,17,24,.86) 0%,rgba(13,17,24,.5) 46%,rgba(13,17,24,.1) 100%),
             linear-gradient(180deg,rgba(13,17,24,0) 55%,var(--bg) 100%);
}
.hero-grid{ display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr); gap:56px; align-items:center; }
.hero h1{ font-size:clamp(2.1rem,4.8vw,3.5rem); font-weight:700; letter-spacing:-.035em; line-height:1.07; max-width:17ch; }
.hero .lead{ margin-top:20px; font-size:1.12rem; color:var(--text-2); max-width:50ch; }
.hero-actions{ display:flex; flex-wrap:wrap; gap:12px; margin-top:32px; }
.connect{ padding:22px; border-radius:var(--r-lg); background:rgba(16,22,32,.86); border:1px solid var(--line); }
.connect h2{ font-size:1.05rem; margin-bottom:16px; }
.connect dl{ margin:0; display:grid; gap:14px; }
.connect dt{ font-size:.72rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--text-3); margin-bottom:3px; }
.connect dd{ margin:0; font-weight:500; word-break:break-word; }
.ip-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.mono{ font-family:var(--mono); font-size:.95rem; }
.copy-btn{ display:inline-flex; align-items:center; gap:6px; padding:5px 11px; border-radius:8px; border:1px solid var(--line-2); background:transparent; color:var(--text); font-size:.8rem; font-weight:600; transition:border-color .15s, color .15s; }
.copy-btn:hover{ border-color:var(--accent); color:var(--accent-text); }
.copy-btn.copied{ border-color:var(--pos); color:var(--pos); }
.copy-btn .icon{ width:15px; height:15px; }
.connect .hint{ margin-top:16px; padding-top:14px; border-top:1px solid var(--line); font-size:.85rem; color:var(--text-3); }
@media (max-width:900px){ .hero{ padding:56px 0 52px; } .hero-grid{ grid-template-columns:1fr; gap:36px; } .hero h1{ max-width:20ch; } }

.facts{ display:grid; grid-template-columns:repeat(4,1fr); border:1px solid var(--line); border-radius:var(--r); background:var(--surface); margin-top:-30px; position:relative; z-index:2; }
.fact{ padding:22px 24px; border-left:1px solid var(--line); }
.fact:first-child{ border-left:0; }
.fact b{ display:block; font-size:1.55rem; font-weight:700; letter-spacing:-.03em; line-height:1.15; }
.fact span{ display:block; color:var(--text-2); font-size:.88rem; margin-top:4px; }
@media (max-width:760px){
  .facts{ grid-template-columns:1fr 1fr; margin-top:-20px; }
  .fact:nth-child(3){ border-left:0; }
  .fact:nth-child(n+3){ border-top:1px solid var(--line); }
  .fact{ padding:18px; }
}

/* ---------- server cards ---------- */
.server-grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.server-card{ position:relative; overflow:hidden; display:flex; flex-direction:column; padding:30px; border-radius:var(--r-lg); background:var(--surface); border:1px solid var(--line); }
.server-card::before{ content:""; position:absolute; inset:0 0 auto 0; height:3px; background:var(--accent); opacity:.85; }
.server-card.alt::before{ background:var(--link); }
.server-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.server-card h3{ font-size:1.5rem; letter-spacing:-.025em; }
.pill{ display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:99px; font-size:.76rem; font-weight:600; border:1px solid var(--line-2); color:var(--text-2); white-space:nowrap; }
.pill.live::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--pos); }
.server-card > p{ color:var(--text-2); margin-bottom:18px; }
.checks{ display:grid; gap:10px; margin-bottom:26px; }
.checks li{ display:flex; gap:10px; align-items:flex-start; font-size:.95rem; }
.checks .icon{ color:var(--accent-text); margin-top:3px; width:17px; height:17px; }
.server-card .actions{ margin-top:auto; display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
@media (max-width:820px){ .server-grid{ grid-template-columns:1fr; } .server-card{ padding:24px; } }

/* ---------- tiles ---------- */
.tile-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
@media (max-width:1040px){ .tile-grid{ grid-template-columns:repeat(2,1fr); } }
.tile{ display:flex; flex-direction:column; gap:10px; padding:24px; border-radius:var(--r); background:var(--surface); border:1px solid var(--line); transition:border-color .15s, transform .15s, background .15s; }
a.tile:hover{ border-color:var(--line-2); transform:translateY(-2px); background:var(--surface-2); }
.tile-icon{ width:44px; height:44px; border-radius:12px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent-text); margin-bottom:6px; }
.tile-icon .icon{ width:22px; height:22px; }
.tile h3{ font-size:1.12rem; }
.tile p{ color:var(--text-2); font-size:.93rem; flex:1; }
.tile .link-arrow{ margin-top:6px; }
@media (max-width:860px){ .tile-grid{ grid-template-columns:1fr; } }

/* ---------- blog ---------- */
.post-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.post-card{ display:flex; flex-direction:column; border-radius:var(--r); background:var(--surface); border:1px solid var(--line); overflow:hidden; transition:border-color .15s, transform .15s; }
.post-card:hover{ border-color:var(--line-2); transform:translateY(-2px); }
.post-cover{ aspect-ratio:16/9; background:var(--surface-2) center/cover no-repeat; border-bottom:1px solid var(--line); }
.post-cover.none{ display:grid; place-items:center; color:var(--text-3); background:linear-gradient(135deg,var(--surface-2),var(--surface)); }
.post-cover.none .icon{ width:34px; height:34px; opacity:.6; }
.post-card-body{ display:flex; flex-direction:column; gap:8px; padding:20px; flex:1; }
.post-meta{ color:var(--text-3); font-size:.8rem; font-weight:500; display:flex; flex-wrap:wrap; gap:6px 12px; align-items:center; }
.post-card h3{ font-size:1.12rem; letter-spacing:-.015em; }
.post-card p{ color:var(--text-2); font-size:.92rem; }
.tags{ display:flex; flex-wrap:wrap; gap:6px; }
#bot{ scroll-margin-top:calc(var(--nav-h) + 8px); }
.bot-head{ flex-wrap:wrap; }
.bot-head .eyebrow{ margin-bottom:8px; }
.bot-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:16px; align-items:start; }
.bot-card{ padding:22px; }
.bot-card h3{ font-size:1.05rem; margin-bottom:14px; }
.bot-card .tags .tag{ display:inline-flex; align-items:center; gap:7px; font-size:.82rem; padding:5px 12px 5px 10px; }
.bot-card .tag .icon{ width:15px; height:15px; flex:none; color:var(--accent-text); }
.tag{ padding:2px 9px; border-radius:99px; font-size:.72rem; font-weight:600; background:var(--surface-2); color:var(--text-2); border:1px solid var(--line); }
@media (max-width:900px){ .post-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ .post-grid{ grid-template-columns:1fr; } }
.empty{ padding:36px; text-align:center; color:var(--text-3); border:1px dashed var(--line-2); border-radius:var(--r); }

.article{ max-width:740px; margin-inline:auto; padding:44px 0 88px; }
.article .back{ display:inline-flex; align-items:center; gap:8px; color:var(--text-2); font-weight:500; font-size:.92rem; margin-bottom:26px; }
.article .back:hover{ color:var(--text); }
.article h1{ font-size:clamp(1.9rem,4vw,2.6rem); letter-spacing:-.03em; line-height:1.12; }
.article .post-meta{ margin:16px 0 28px; font-size:.88rem; }
.article-cover{ width:100%; border-radius:var(--r); border:1px solid var(--line); margin-bottom:32px; }
.article-foot{ margin-top:48px; padding-top:24px; border-top:1px solid var(--line); display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; align-items:center; }
.prose{ font-size:1.05rem; line-height:1.75; color:var(--text); }
.prose > * + *{ margin-top:1.15em; }
.prose h2,.prose h3,.prose h4,.prose h5{ margin-top:1.9em; line-height:1.25; }
.prose h2{ font-size:1.5rem; } .prose h3{ font-size:1.22rem; } .prose h4,.prose h5{ font-size:1.05rem; }
.prose h2 + *, .prose h3 + *, .prose h4 + *{ margin-top:.6em; }
.prose p,.prose li{ color:var(--text-2); }
.prose strong{ color:var(--text); font-weight:650; }
.prose a{ color:var(--link); text-decoration:underline; text-underline-offset:3px; text-decoration-color:color-mix(in srgb,var(--link) 45%,transparent); }
.prose a:hover{ text-decoration-color:currentColor; }
.prose ul,.prose ol{ padding-left:1.4em; display:grid; gap:.45em; }
.prose ul{ list-style:disc; } .prose ol{ list-style:decimal; }
.prose li::marker{ color:var(--accent-text); }
.prose ul ul,.prose ol ol,.prose ul ol,.prose ol ul{ margin-top:.45em; }
.prose blockquote{ margin-left:0; padding:2px 0 2px 18px; border-left:3px solid var(--accent); color:var(--text-2); }
.prose code{ font-family:var(--mono); font-size:.88em; padding:2px 6px; border-radius:6px; background:var(--surface-2); border:1px solid var(--line); }
.prose pre{ padding:16px 18px; border-radius:var(--r-sm); background:var(--surface); border:1px solid var(--line); overflow-x:auto; }
.prose pre code{ padding:0; border:0; background:none; }
.prose img{ border-radius:var(--r-sm); border:1px solid var(--line); margin-inline:auto; }
.prose hr{ border:0; border-top:1px solid var(--line); margin-block:2em; }
.prose .table-wrap{ overflow-x:auto; border:1px solid var(--line); border-radius:var(--r-sm); }
.prose table{ border-collapse:collapse; width:100%; font-size:.93rem; }
.prose th,.prose td{ padding:10px 14px; text-align:left; border-bottom:1px solid var(--line); }
.prose th{ background:var(--surface-2); color:var(--text); font-weight:600; }
.prose tr:last-child td{ border-bottom:0; }

/* ---------- gallery ---------- */
.gallery-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px; }
.gallery-grid.preview{ grid-template-columns:repeat(6,1fr); }
.gallery-item{ position:relative; aspect-ratio:4/3; overflow:hidden; border-radius:12px; border:1px solid var(--line); background:var(--surface); padding:0; }
.gallery-item img{ width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.gallery-item:hover img{ transform:scale(1.05); }
@media (max-width:900px){ .gallery-grid.preview{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:520px){ .gallery-grid.preview{ grid-template-columns:repeat(2,1fr); } .gallery-grid{ grid-template-columns:repeat(2,1fr); } }
.lightbox{ position:fixed; inset:0; z-index:100; background:rgba(6,9,13,.94); display:flex; align-items:center; justify-content:center; padding:56px 16px; }
.lightbox img{ max-width:100%; max-height:100%; border-radius:10px; box-shadow:0 20px 60px rgba(0,0,0,.6); }
.lb-btn{ position:fixed; width:44px; height:44px; border-radius:12px; border:1px solid rgba(255,255,255,.2); background:rgba(20,27,38,.8); color:#dfe4eb; display:grid; place-items:center; }
.lb-btn:hover{ border-color:var(--accent); color:var(--accent-hi); }
.lb-close{ top:16px; right:16px; } .lb-prev{ left:14px; top:50%; transform:translateY(-50%); } .lb-next{ right:14px; top:50%; transform:translateY(-50%); }
.lb-count{ position:fixed; bottom:16px; left:50%; transform:translateX(-50%); color:#a2adbb; font-size:.85rem; }

/* ---------- join band + footer ---------- */
.join-card{ position:relative; isolation:isolate; overflow:hidden; border-radius:24px; padding:56px 32px; text-align:center; border:1px solid var(--line); }
.join-card::before{ content:""; position:absolute; inset:0; z-index:-2; background:#0d1118 url(../img/map.jpg) center/cover no-repeat; }
.join-card::after{ content:""; position:absolute; inset:0; z-index:-1; background:radial-gradient(ellipse at center,rgba(13,17,24,.7),rgba(13,17,24,.94)); }
.join-card h2{ font-size:clamp(1.6rem,3.4vw,2.3rem); letter-spacing:-.03em; }
.join-card p{ color:var(--text-2); margin:12px auto 26px; max-width:48ch; }
.footer{ border-top:1px solid var(--line); background:var(--bg-2); padding:44px 0 28px; }
.footer-grid{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:32px; }
.footer-brand{ max-width:360px; }
.footer-brand img{ height:20px; width:auto; margin-bottom:14px; }
.footer-brand p{ color:var(--text-2); font-size:.9rem; }
.footer-cols{ display:flex; gap:56px; flex-wrap:wrap; }
.footer h4{ font-size:.74rem; letter-spacing:.1em; text-transform:uppercase; color:var(--text-3); font-weight:650; margin-bottom:12px; }
.footer-links{ display:grid; gap:8px; }
.footer-links a{ color:var(--text-2); font-size:.92rem; }
.footer-links a:hover{ color:var(--text); }
.socials{ display:flex; gap:10px; margin-top:18px; }
.legal{ margin-top:36px; padding-top:20px; border-top:1px solid var(--line); color:var(--text-3); font-size:.76rem; line-height:1.7; display:grid; gap:8px; }
.legal strong{ color:var(--text-2); font-weight:600; }

/* ---------- server switch + tabs + chips ---------- */
.switch{ display:inline-flex; gap:4px; padding:4px; border:1px solid var(--line); border-radius:13px; background:var(--surface); max-width:100%; }
.switch button{ display:flex; flex-direction:column; align-items:flex-start; gap:1px; padding:9px 20px; border:0; border-radius:9px; background:transparent; color:var(--text-2); font-weight:650; font-size:.95rem; line-height:1.2; text-align:left; transition:background .15s, color .15s; }
.switch button small{ font-size:.72rem; font-weight:500; opacity:.75; white-space:nowrap; }
.switch button:hover{ color:var(--text); }
.switch button[aria-pressed="true"]{ background:var(--accent); color:var(--accent-ink); }
@media (max-width:420px){ .switch button{ padding:9px 14px; } .switch button small{ display:none; } }
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); margin:22px 0 18px; overflow-x:auto; }
.tab{ background:none; border:0; border-bottom:2px solid transparent; margin-bottom:-1px; padding:11px 18px; color:var(--text-2); font-weight:600; font-size:.95rem; white-space:nowrap; transition:color .15s, border-color .15s; }
.tab:hover{ color:var(--text); }
.tab[aria-selected="true"]{ color:var(--text); border-bottom-color:var(--accent); }
.tab .n{ margin-left:8px; font-size:.75rem; font-weight:500; color:var(--text-3); }
.chip-row{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.chip{ padding:7px 14px; border-radius:99px; border:1px solid var(--line); background:transparent; color:var(--text-2); font-size:.84rem; font-weight:550; transition:all .12s; }
.chip:hover{ border-color:var(--line-2); color:var(--text); }
.chip.active{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.search-row{ display:flex; align-items:center; gap:10px; padding:0 14px; height:48px; border:1px solid var(--line); border-radius:12px; background:var(--bg); }
.search-row:focus-within{ border-color:var(--link); }
.search-row .icon{ color:var(--text-3); }
.search-row input{ flex:1; min-width:0; border:0; outline:0; background:transparent; font-size:1rem; }
.search-row input::placeholder{ color:var(--text-3); }
.result-count{ font-size:.8rem; color:var(--text-3); white-space:nowrap; }
.empty-msg{ padding:36px 16px; text-align:center; color:var(--text-3); }
.zone-row{ align-items:center; }
.zone-row label{ font-size:.82rem; color:var(--text-3); font-weight:550; }
.zone-row select{ padding:7px 12px; border-radius:10px; border:1px solid var(--line); background:var(--bg); font-size:.88rem; }

/* ---------- servers page (features) ---------- */
.intro{ max-width:68ch; display:grid; gap:14px; color:var(--text-2); font-size:1.04rem; margin-top:26px; }
.feature-group{ margin-top:44px; }
.feature-group h3{ font-size:.8rem; text-transform:uppercase; letter-spacing:.1em; color:var(--text-3); font-weight:650; padding-bottom:12px; border-bottom:1px solid var(--line); margin-bottom:6px; }
.feature-list{ display:grid; grid-template-columns:1fr 1fr; column-gap:48px; }
.feature{ display:flex; gap:16px; padding:18px 0; border-bottom:1px solid var(--line); }
.feature-icon{ width:40px; height:40px; flex:none; border-radius:11px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent-text); }
.feature-icon .icon{ width:20px; height:20px; }
.feature h4{ font-size:1rem; letter-spacing:-.01em; }
.feature p{ color:var(--text-2); font-size:.93rem; margin-top:3px; }
.feature .link-arrow{ margin-top:6px; font-size:.86rem; }
@media (max-width:760px){ .feature-list{ grid-template-columns:1fr; } }
.aside-card{ margin-top:40px; padding:24px; }
.aside-card h3{ font-size:1.05rem; margin-bottom:14px; }
.aside-card .tags .tag{ font-size:.8rem; padding:4px 12px; }
.note{ margin-top:16px; color:var(--text-3); font-size:.88rem; max-width:70ch; }
.extras{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:56px; }
.extras .card{ padding:26px; }
.extras h3{ font-size:1.2rem; margin-bottom:14px; }
.extras li{ padding:6px 0 6px 20px; position:relative; color:var(--text-2); }
.extras li::before{ content:""; position:absolute; left:2px; top:15px; width:6px; height:6px; border-radius:50%; background:var(--accent); }
.extras li a{ color:var(--text); font-weight:550; text-decoration:underline; text-underline-offset:3px; text-decoration-color:var(--line-2); }
.extras li a:hover{ text-decoration-color:var(--accent); }
@media (max-width:760px){ .extras{ grid-template-columns:1fr; } }
.connect-inline{ margin-top:30px; padding:20px 22px; display:flex; flex-wrap:wrap; gap:20px 40px; align-items:center; }
.connect-inline .cc-name{ flex:1 1 100%; order:-1; }
.connect-switch{ margin:-6px 0 16px; }
.connect-switch .chip{ padding:5px 13px; font-size:.8rem; }

/* videos */
.poi-intro{ color:var(--text-2); max-width:70ch; margin:14px 0 4px; font-size:.95rem; }
.poi-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; margin-top:16px; }
.poi-card{ display:flex; flex-direction:column; gap:10px; padding:20px; border-radius:var(--r); background:var(--surface); border:1px solid var(--line); overflow:hidden; }
.poi-img{ display:block; margin:-20px -20px 4px; padding:0; border:0; background:var(--surface-2); cursor:zoom-in; aspect-ratio:3/2; overflow:hidden; }
.poi-img img{ display:block; width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.poi-img:hover img{ transform:scale(1.04); }
.poi-img:focus-visible{ outline:2px solid var(--accent-hi); outline-offset:-2px; }
.poi-card h4{ font-size:1.08rem; letter-spacing:-.015em; }
.poi-card p{ margin:0; color:var(--text-2); font-size:.93rem; }
.poi-meta{ display:flex; flex-wrap:wrap; gap:6px; }
.poi-pill{ padding:3px 10px; border-radius:99px; border:1px solid var(--line-2); color:var(--text-2); font-size:.68rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.poi-pill.danger-critical,.poi-pill.danger-deadly{ color:#ff9189; border-color:rgba(255,120,110,.55); background:rgba(255,82,82,.1); }
.poi-pill.danger-substantial{ color:#ffcb85; border-color:rgba(255,183,77,.55); background:rgba(255,167,38,.1); }
.poi-pill.danger-unknown{ color:var(--text-3); }
:root[data-theme="light"] .poi-pill.danger-critical,:root[data-theme="light"] .poi-pill.danger-deadly{ color:#b3261e; border-color:rgba(179,38,30,.45); background:rgba(179,38,30,.07); }
:root[data-theme="light"] .poi-pill.danger-substantial{ color:#8a5200; border-color:rgba(138,82,0,.45); background:rgba(138,82,0,.07); }
.poi-card .poi-loot{ font-size:.84rem; color:var(--text-3); }
.poi-card .poi-loot b{ color:var(--text-2); font-weight:600; }
.poi-card .link-arrow{ margin-top:auto; padding-top:4px; }
#videoLinks{ margin-top:16px; }
.video-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:22px 18px; margin-top:22px; }
.video-item{ min-width:0; }
.video-slot{ position:relative; }
.video-card{ position:relative; display:block; width:100%; aspect-ratio:9/16; padding:0; border:1px solid var(--line); border-radius:var(--r); overflow:hidden; background:#06080c; color:#fff; cursor:pointer; }
.video-card img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.video-card .vc-fallback{ position:absolute; inset:0; background:radial-gradient(120% 80% at 50% 0%,#233047 0%,#0e131b 70%); }
.video-card .vc-play{ position:absolute; left:50%; top:50%; width:58px; height:58px; margin:-29px 0 0 -29px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.55); border:1px solid rgba(255,255,255,.4); transition:transform .15s, background .15s; }
.video-card .vc-play .icon{ width:24px; height:24px; margin-left:3px; }
.video-card:hover .vc-play,.video-card:focus-visible .vc-play{ transform:scale(1.08); background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.vc-badge{ position:absolute; left:10px; top:10px; padding:4px 10px; border-radius:99px; font-size:.66rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; background:rgba(0,0,0,.62); color:#fff; }
.video-card.is-playing{ cursor:default; }
.video-card iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.vc-open{ display:inline-block; margin-top:8px; font-size:.8rem; color:var(--text-3); }
.vc-open:hover{ color:var(--accent-text); }
.connect-inline div > span{ display:block; font-size:.72rem; letter-spacing:.08em; text-transform:uppercase; color:var(--text-3); font-weight:600; }

/* ---------- trader ---------- */
.note-text{ font-size:.86rem; color:var(--text-3); margin:14px 2px 0; max-width:75ch; }
.calc-layout{ display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:20px; align-items:start; margin-top:20px; }
.calc-catalog{ min-width:0; }
.calc-controls{ padding:16px; }
.item-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(188px,1fr)); gap:14px; margin-top:16px; }
.item-card{ display:flex; flex-direction:column; border-radius:var(--r); background:var(--surface); border:1px solid var(--line); overflow:hidden; transition:border-color .15s; }
.item-card:hover{ border-color:var(--line-2); }
.item-img{ aspect-ratio:4/3; display:flex; align-items:center; justify-content:center; padding:14px; overflow:hidden; background:radial-gradient(ellipse at 50% 30%,var(--plate-1),var(--plate-2)); }
.item-img img{ max-width:100%; max-height:100%; object-fit:contain; filter:drop-shadow(0 4px 6px rgba(0,0,0,.4)); }
.ph{ display:flex; flex-direction:column; align-items:center; gap:4px; color:var(--text-3); font-size:.66rem; font-weight:600; letter-spacing:.1em; text-transform:uppercase; }
.ph svg{ width:34px; height:34px; opacity:.7; }
.item-body{ display:flex; flex-direction:column; gap:9px; padding:13px 14px 14px; flex:1; }
.item-cat{ font-size:.66rem; font-weight:650; letter-spacing:.09em; text-transform:uppercase; color:var(--text-3); }
.item-name{ font-size:.96rem; font-weight:600; line-height:1.25; letter-spacing:-.01em; }
.item-base{ font-size:.76rem; color:var(--text-3); margin-top:-5px; font-variant-numeric:tabular-nums; }
.item-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; margin-top:-5px; }
.item-meta .item-base{ margin-top:0; }
.item-stock{ display:inline-flex; align-items:center; gap:6px; font-size:.74rem; font-weight:600; color:var(--text-2); font-variant-numeric:tabular-nums; }
.item-stock::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--pos); flex:none; }
.item-stock.out::before{ background:var(--text-3); }
.item-prices{ display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:auto; }
.price{ display:flex; flex-direction:column; gap:1px; padding:7px 10px; background:var(--bg); border:1px solid var(--line); border-radius:9px; min-width:0; }
.price.only{ grid-column:1 / -1; }
.price .k{ font-size:.62rem; letter-spacing:.09em; text-transform:uppercase; color:var(--text-3); font-weight:650; }
.price .v{ font-size:.93rem; font-weight:650; font-variant-numeric:tabular-nums; white-space:nowrap; }
.price.sell .v{ color:var(--pos); }
.price.none .v{ color:var(--text-3); font-size:.84rem; font-weight:550; }
.item-prices.stack{ grid-template-columns:1fr; }
.item-prices.stack .price{ flex-direction:row; align-items:baseline; justify-content:space-between; gap:8px; }
.item-prices.stack .price .v{ font-size:.86rem; }
.item-actions{ display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:6px; }
.add-btn{ padding:8px 6px; border-radius:9px; border:1px solid var(--line-2); background:transparent; color:var(--text); font-size:.82rem; font-weight:650; transition:all .12s; }
.add-btn.add-buy{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.add-btn.add-buy:hover{ background:var(--accent-hi); border-color:var(--accent-hi); }
.add-btn.add-sell:hover{ border-color:var(--pos); color:var(--pos); }
.add-btn.flash{ background:var(--surface-2); border-color:var(--pos); color:var(--pos); }

.market-box{ padding:20px 22px 16px; margin-top:6px; }
.market-title{ font-size:1.05rem; margin-bottom:8px; }
.market-lead{ color:var(--text-2); font-size:.93rem; max-width:76ch; margin-bottom:16px; }
.market-stats{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.market-stats .stat-cell{ background:var(--bg); }
@media (max-width:760px){ .market-stats{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px){ .market-stats{ display:none; } .market-box{ padding:16px 16px 12px; } }
.stat-cell{ padding:12px 14px; background:var(--surface); }
.stat-cell .k{ display:block; font-size:.68rem; font-weight:650; letter-spacing:.07em; text-transform:uppercase; color:var(--text-3); margin-bottom:3px; }
.stat-cell .v{ font-size:1rem; font-weight:600; font-variant-numeric:tabular-nums; }
.market-more{ margin-top:12px; }
.market-more summary{ cursor:pointer; color:var(--accent-text); font-weight:600; font-size:.88rem; padding:4px 0; }
.market-more ul{ margin:10px 0 0; display:grid; gap:9px; }
.market-more li{ position:relative; padding-left:18px; color:var(--text-2); font-size:.9rem; max-width:80ch; }
.market-more li::before{ content:""; position:absolute; left:3px; top:.65em; width:5px; height:5px; border-radius:50%; background:var(--accent); }

.basket{ position:sticky; top:calc(var(--nav-h) + 16px); display:flex; flex-direction:column; max-height:calc(100vh - var(--nav-h) - 36px); background:var(--surface); border:1px solid var(--line); border-radius:var(--r); }
.basket-head{ display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:none; border:0; border-bottom:1px solid var(--line); padding:15px 18px; cursor:default; color:var(--text); }
.bh-title{ font-weight:650; font-size:1rem; }
.bh-sum{ margin-left:auto; font-size:.8rem; color:var(--text-2); font-variant-numeric:tabular-nums; }
.bh-caret{ display:none; color:var(--text-2); transition:transform .15s; }
.basket-body{ display:flex; flex-direction:column; min-height:0; }
.basket-list{ overflow-y:auto; padding:0 16px; min-height:0; }
.basket-empty{ margin:0; padding:24px 18px; color:var(--text-3); font-size:.9rem; }
.basket-empty b{ color:var(--text-2); font-weight:600; }
.bl{ display:grid; grid-template-columns:46px minmax(0,1fr) auto; column-gap:12px; row-gap:7px; align-items:center; padding:13px 0; border-bottom:1px solid var(--line); }
.bl-img{ grid-row:1 / span 2; width:46px; height:46px; display:flex; align-items:center; justify-content:center; padding:4px; background:radial-gradient(ellipse at 50% 30%,var(--plate-1),var(--plate-2)); border-radius:10px; }
.bl-img img{ max-width:100%; max-height:100%; object-fit:contain; }
.bl-img .ph span{ display:none; } .bl-img .ph svg{ width:22px; height:22px; }
.bl-name{ font-size:.9rem; font-weight:600; line-height:1.25; min-width:0; }
.bl-mode{ display:inline-block; margin-left:7px; padding:1px 7px; border-radius:99px; font-size:.64rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; vertical-align:1px; border:1px solid; }
.bl-mode.buy{ color:var(--accent-text); border-color:color-mix(in srgb,var(--accent) 55%,transparent); }
.bl-mode.sell{ color:var(--pos); border-color:color-mix(in srgb,var(--pos) 55%,transparent); }
.bl-unit{ font-size:.76rem; color:var(--text-3); font-variant-numeric:tabular-nums; }
.bl-x{ background:none; border:0; color:var(--text-3); font-size:1.3rem; line-height:1; padding:2px 6px; }
.bl-x:hover{ color:var(--text); }
.bl-row2{ grid-column:2 / -1; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.qty{ display:inline-flex; align-items:center; border:1px solid var(--line-2); border-radius:9px; overflow:hidden; }
.qty button{ width:30px; height:30px; background:none; border:0; color:var(--text-2); font-size:1rem; }
.qty button:hover:not(:disabled){ color:var(--text); background:var(--surface-2); }
.qty button:disabled{ opacity:.35; cursor:default; }
.qty input{ width:42px; height:30px; text-align:center; background:transparent; border:0; border-inline:1px solid var(--line-2); font-size:.88rem; font-variant-numeric:tabular-nums; }
.bl-total{ font-weight:650; font-size:.93rem; font-variant-numeric:tabular-nums; }
.bl-total.minus{ color:var(--pos); }
.basket-totals{ padding:14px 18px 4px; display:grid; gap:7px; }
.trow{ display:flex; justify-content:space-between; gap:12px; font-size:.86rem; color:var(--text-2); font-variant-numeric:tabular-nums; }
.trow .minus{ color:var(--pos); }
.trow.net{ margin-top:6px; padding-top:14px; border-top:1px dashed var(--line-2); align-items:baseline; color:var(--text); }
.trow.net .lbl{ font-weight:650; font-size:.92rem; }
.net-val{ font-size:1.6rem; font-weight:700; letter-spacing:-.02em; }
.net-val.range{ font-size:1.3rem; }
.net-val.pay{ color:var(--accent-text); }
.net-val.get{ color:var(--pos); }
.basket-foot{ padding:8px 18px 18px; }
@media (max-width:900px){
  .calc-layout{ grid-template-columns:minmax(0,1fr); }
  #view-trader{ padding-bottom:110px; }
  .basket{ position:fixed; left:0; right:0; bottom:0; top:auto; z-index:60; max-height:72vh; border-radius:18px 18px 0 0; border-inline:0; border-bottom:0; padding-bottom:env(safe-area-inset-bottom,0px); box-shadow:0 -14px 34px rgba(0,0,0,.45); }
  .basket.is-empty,.basket[data-inview="0"]{ display:none; }
  .basket-head{ cursor:pointer; }
  .bh-caret{ display:inline; }
  .basket.collapsed .basket-body{ display:none; }
  .basket.collapsed .bh-caret{ transform:rotate(180deg); }
}
@media (max-width:560px){
  .item-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  #calcCats,#lootCats{ flex-wrap:nowrap; overflow-x:auto; padding-bottom:6px; }
  #calcCats .chip,#lootCats .chip{ flex:none; }
}

/* ---------- loot finder ---------- */
#lootServer{ margin-bottom:14px; }
.finder-controls{ padding:16px; margin-top:6px; }
.finder-body{ display:grid; grid-template-columns:340px minmax(0,1fr); gap:20px; align-items:start; margin-top:20px; }
@media (max-width:900px){ .finder-body{ grid-template-columns:minmax(0,1fr); } }
.results-pane{ padding:6px; display:flex; flex-direction:column; max-height:660px; }
.results-list{ overflow-y:auto; max-height:600px; }
.result-row{ display:flex; align-items:center; gap:11px; padding:11px 12px; cursor:pointer; border-radius:9px; transition:background .1s; }
.result-row:hover{ background:var(--surface-2); }
.result-row.active{ background:var(--accent-soft); }
.rar-dot{ width:9px; height:9px; border-radius:50%; flex:none; }
.result-name{ flex:1; min-width:0; font-size:.92rem; font-weight:550; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.result-nom{ font-size:.76rem; color:var(--text-3); font-variant-numeric:tabular-nums; }
.results-footer{ padding:10px 12px 6px; margin:0; font-size:.78rem; color:var(--text-3); }
.detail-pane{ padding:26px; min-height:560px; }
.detail-title{ font-size:1.6rem; letter-spacing:-.025em; }
.detail-raw{ font-family:var(--mono); font-size:.78rem; color:var(--text-3); margin:4px 0 16px; }
.tag-row{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:18px; }
.tag-row .tag{ font-size:.74rem; }
.tag-cat{ color:var(--accent-text); border-color:color-mix(in srgb,var(--accent) 45%,transparent); }
.tag-zone{ color:var(--link); border-color:color-mix(in srgb,var(--link) 45%,transparent); }
.tag-crafted{ color:var(--rar-special); border-color:color-mix(in srgb,var(--rar-special) 45%,transparent); }
.rarity-line{ display:flex; align-items:center; gap:12px; margin-bottom:22px; }
.rarity-meter{ flex:1; height:6px; border-radius:3px; background:var(--line); overflow:hidden; }
.rarity-fill{ height:100%; border-radius:3px; }
.rarity-word{ font-size:.82rem; font-weight:650; white-space:nowrap; }
.stat-grid{ display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--line); border:1px solid var(--line); border-radius:12px; overflow:hidden; margin-bottom:24px; }
@media (max-width:420px){ .stat-grid{ grid-template-columns:1fr; } }
.scope-label h4{ font-size:.82rem; font-weight:650; text-transform:uppercase; letter-spacing:.08em; color:var(--text-3); margin-bottom:10px; }
.scope-canvas-box{ position:relative; width:100%; aspect-ratio:1/1; max-width:440px; border:1px solid var(--line); border-radius:var(--r); overflow:hidden; background:#090e15; }
.scope-canvas-box canvas{ width:100%; height:100%; display:block; }
.scope-empty{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; text-align:center; padding:22px; font-size:.88rem; color:#8795a5; background:rgba(9,14,21,.6); }
.heat-legend{ display:flex; align-items:center; gap:10px; margin-top:12px; font-size:.78rem; color:var(--text-3); }
.heat-bar{ width:90px; height:8px; border-radius:99px; background:linear-gradient(90deg,rgba(224,173,59,.15),#e0ad3b 55%,#fff1cc); flex:none; }
.disclaimer{ font-size:.82rem; color:var(--text-3); margin-top:12px; line-height:1.55; max-width:62ch; }

/* ---------- blog editor (write.html) ---------- */
.ed-layout{ display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:24px; align-items:start; }
@media (max-width:980px){ .ed-layout{ grid-template-columns:minmax(0,1fr); } }
.panel{ padding:22px; }
.panel + .panel{ margin-top:16px; }
.panel h2{ font-size:1.05rem; margin-bottom:14px; }
.panel h2 small{ font-weight:500; color:var(--text-3); font-size:.8rem; margin-left:6px; }
.status{ font-size:.88rem; color:var(--text-2); }
.status.warn{ color:var(--accent-text); }
.status.ok{ color:var(--pos); }
.status.err{ color:#e58a7b; }
:root[data-theme="light"] .status.err{ color:#b3412f; }

/* connection bar */
.conn{ display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; padding:14px 18px; margin-bottom:18px; }
.conn .dot{ width:9px; height:9px; border-radius:50%; background:var(--text-3); flex:none; }
.conn.on .dot{ background:var(--pos); }
.conn p{ flex:1; min-width:200px; font-size:.93rem; color:var(--text-2); }
.conn p b{ color:var(--text); font-weight:600; }
.conn-setup{ margin-bottom:18px; padding:20px 22px; }
.conn-setup .steps{ margin:14px 0 16px; }
.token-row{ display:flex; flex-wrap:wrap; gap:10px; }
.token-row input{ flex:1; min-width:220px; padding:11px 13px; border-radius:10px; border:1px solid var(--line-2); background:var(--bg); font-size:.95rem; }
.token-row input:focus{ outline:0; border-color:var(--link); }

/* form fields */
.field{ display:grid; gap:6px; margin-bottom:14px; }
.field > label,.label{ font-size:.82rem; font-weight:600; color:var(--text-2); }
.field small{ color:var(--text-3); font-size:.78rem; font-weight:400; }
.field input[type="text"],.field input[type="date"],.field textarea{ width:100%; padding:11px 13px; border-radius:10px; border:1px solid var(--line-2); background:var(--bg); font-size:.95rem; }
.field input[type="text"],.field input[type="date"]{ height:44px; }
.field input:focus,.field textarea:focus{ outline:0; border-color:var(--link); }
.title-input{ width:100%; padding:10px 2px 14px; border:0; border-bottom:1px solid var(--line); background:transparent; font-size:clamp(1.5rem,3vw,2rem); font-weight:700; letter-spacing:-.025em; margin-bottom:18px; }
.title-input:focus{ outline:0; border-bottom-color:var(--link); }
.title-input::placeholder{ color:var(--text-3); }
.row-2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:560px){ .row-2{ grid-template-columns:1fr; } }
.btn-row{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.tag-pick{ display:flex; flex-wrap:wrap; gap:8px; }
.tag-pick .chip{ padding:6px 13px; }

/* cover image */
.cover-box{ display:flex; flex-wrap:wrap; align-items:center; gap:12px 16px; }
.cover-thumb{ width:112px; height:63px; border-radius:8px; border:1px solid var(--line); background:var(--surface-2) center/cover no-repeat; flex:none; }

/* rich-text editor */
.toolbar{ display:flex; flex-wrap:wrap; align-items:center; gap:4px; padding:8px; border:1px solid var(--line-2); border-bottom:0; border-radius:12px 12px 0 0; background:var(--surface-2); position:sticky; top:calc(var(--nav-h) + 6px); z-index:5; }
.tb{ min-width:36px; height:36px; padding:0 9px; display:inline-flex; align-items:center; justify-content:center; gap:6px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--text-2); font-weight:700; font-size:.9rem; }
.tb:hover{ color:var(--text); background:var(--surface); border-color:var(--line); }
.tb.on{ background:var(--accent); color:var(--accent-ink); }
.tb .icon{ width:18px; height:18px; }
.tb:disabled{ opacity:.4; cursor:default; }
.tb:disabled:hover{ background:transparent; border-color:transparent; color:var(--text-2); }
.tb-sep{ width:1px; height:22px; background:var(--line-2); margin:0 4px; }
.tb-spacer{ flex:1; }
.editor{ min-height:380px; padding:20px 22px; border:1px solid var(--line-2); border-radius:0 0 12px 12px; background:var(--bg); outline:0; overflow-wrap:anywhere; }
.editor:focus{ border-color:var(--link); }
.editor:empty::before{ content:attr(data-placeholder); color:var(--text-3); }
.editor img{ max-width:100%; cursor:default; }
.md-box{ width:100%; min-height:380px; padding:18px 20px; border:1px solid var(--line-2); border-radius:0 0 12px 12px; background:var(--bg); font-family:var(--mono); font-size:.88rem; line-height:1.6; resize:vertical; }
.md-box:focus{ outline:0; border-color:var(--link); }
.drop-hint{ font-size:.82rem; color:var(--text-3); margin-top:8px; }
.publish-bar{ display:flex; flex-wrap:wrap; align-items:center; gap:12px 16px; margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.publish-bar .status{ flex:1; min-width:200px; }
.alt-publish{ margin-top:14px; }
.alt-publish summary{ cursor:pointer; color:var(--text-2); font-size:.88rem; font-weight:600; }
.alt-publish .btn-row{ margin-top:12px; }

/* sidebar: your posts */
.post-row{ display:flex; align-items:center; gap:8px; padding:11px 0; border-bottom:1px solid var(--line); }
.post-row:last-child{ border-bottom:0; }
.post-row .t{ flex:1; min-width:0; }
.post-row .t b{ display:block; font-size:.9rem; font-weight:600; line-height:1.3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.post-row .t span{ font-size:.76rem; color:var(--text-3); }
.post-row.current .t b{ color:var(--accent-text); }
.mini{ width:32px; height:32px; display:inline-grid; place-items:center; border:1px solid var(--line); border-radius:8px; background:transparent; color:var(--text-2); }
.mini:hover{ color:var(--text); border-color:var(--line-2); background:var(--surface-2); }
.mini.danger:hover{ color:#e58a7b; border-color:#e58a7b; }
.mini .icon{ width:16px; height:16px; }
.tips{ display:grid; gap:10px; color:var(--text-2); font-size:.88rem; }
.tips b{ color:var(--text); font-weight:600; }
.steps{ counter-reset:s; display:grid; gap:12px; }
.steps li{ counter-increment:s; position:relative; padding-left:38px; color:var(--text-2); font-size:.93rem; }
.steps li::before{ content:counter(s); position:absolute; left:0; top:0; width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent-text); font-weight:700; font-size:.82rem; }
.steps b{ color:var(--text); }
.steps a{ color:var(--link); text-decoration:underline; text-underline-offset:3px; }

/* ---------- badlands map ---------- */
.map-layout{ display:grid; grid-template-columns:292px minmax(0,1fr); gap:20px; align-items:start; margin-top:6px; }
.map-stage{ min-width:0; }
.map-panel{ position:sticky; top:calc(var(--nav-h) + 16px); max-height:calc(100vh - var(--nav-h) - 36px); overflow-y:auto; padding:18px; display:flex; flex-direction:column; gap:22px; }
.map-ptitle{ margin:0 0 9px; font-size:.7rem; font-weight:650; letter-spacing:.09em; text-transform:uppercase; color:var(--text-3); }
.map-count{ margin-top:10px; font-size:.8rem; color:var(--text-3); font-variant-numeric:tabular-nums; }
.map-panel .switch{ display:flex; width:100%; }
.map-panel .switch button{ flex:1; align-items:center; text-align:center; padding:9px 4px; font-size:.86rem; }
.gm-sub{ margin:12px 0 2px; font-size:.7rem; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--text-3); }
.gm-ly{ display:grid; grid-template-columns:18px 26px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:40px; padding:2px 8px; margin-inline:-8px; border-radius:10px; cursor:pointer; }
.gm-ly:hover{ background:var(--surface-2); }
.gm-ly input{ accent-color:var(--accent-hi); width:16px; height:16px; margin:0; }
.gm-name{ font-size:.92rem; line-height:1.25; }
.gm-n{ font-size:.78rem; color:var(--text-3); font-variant-numeric:tabular-nums; }
.map-prow{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.map-prow .chip{ margin:0; }
.map-gridtoggle{ display:flex; align-items:center; gap:8px; margin-left:auto; font-size:.86rem; color:var(--text-2); cursor:pointer; }
.map-gridtoggle input{ accent-color:var(--accent-hi); width:16px; height:16px; margin:0; }
.map-pnote{ margin:0; font-size:.8rem; color:var(--text-3); line-height:1.55; }

/* round badge (legend swatch + card header) */
.gm-sw{ --gs:68% 68%; width:26px; height:26px; border-radius:50%; background-color:#777; border:2px solid #fff; box-sizing:border-box; box-shadow:0 0 0 1px rgba(0,0,0,.4); background-repeat:no-repeat; background-position:center,0 0; background-size:var(--gs),100% 100%; }
.gm-sw.is-cus{ border-radius:30%; box-shadow:0 0 0 1px rgba(0,0,0,.35), 0 0 9px rgba(224,173,59,.75); }

.map-frame{ border:1px solid var(--line); border-radius:var(--r); overflow:hidden; background:#7f6951; }
.map-view{ position:relative; height:clamp(460px,76vh,780px); overflow:hidden; background:#7f6951; touch-action:none; cursor:grab; user-select:none; -webkit-user-select:none; }
.map-view.grabbing{ cursor:grabbing; }
.map-view:focus-visible{ outline-offset:-3px; }
.map-world{ position:absolute; left:0; top:0; transform-origin:0 0; will-change:transform; }
.map-world img{ display:block; max-width:none; pointer-events:none; -webkit-user-drag:none; }
.map-tiles{ position:absolute; left:0; top:0; pointer-events:none; }
.gm-places,.gm-place{ position:absolute; left:0; top:0; pointer-events:none; }
.gm-place span{ display:block; transform:translate(-50%,-50%); white-space:nowrap; color:#fff; font:600 11px/1.1 var(--font); letter-spacing:.02em; text-shadow:0 0 3px #000,0 0 3px #000,0 0 5px #000,0 1px 2px #000; }
.gm-place.t-c span{ font-size:15px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
.gm-place.t-t span{ font-size:12.5px; font-weight:700; letter-spacing:.04em; }
.gm-place.t-m span{ color:#e2f3a8; font-size:11.5px; font-weight:700; }
.gm-place.t-w span{ color:#b9dcff; font-style:italic; }
.gm-place.t-x span{ color:#ffe08a; font-size:11.5px; font-weight:700; letter-spacing:.015em; text-shadow:0 0 3px #000,0 0 3px #000,0 0 5px #000,0 0 7px #000,0 1px 2px #000; }
.gm-place.t-l span{ color:#f3e9d2; font-size:10.5px; font-weight:550; }
.gm-sw-t{ display:inline-flex; align-items:center; justify-content:center; background:#3b414d; color:#fff; font:700 10.5px/1 var(--font); }
.map-grid{ position:absolute; left:0; top:0; pointer-events:none; }
.map-grid path{ stroke:rgba(255,255,255,.3); stroke-width:1; fill:none; vector-effect:non-scaling-stroke; }
.map-marks{ position:absolute; left:0; top:0; width:0; height:0; }

/* markers: drawn at their real size on top of the map (positioned from JS), three detail levels by zoom */
.gm-grp{ --ms:12px; --sz:1; --gs:0 0; --bw:1.5px; }
.gm-grp.is-gl0{ --gs:66% 66%; }
.map-lv1 .gm-grp{ --ms:24px; --gs:68% 68%; --bw:2px; }
.map-lv2 .gm-grp{ --ms:32px; --gs:68% 68%; --bw:2.5px; }
.gm-mk{ position:absolute; left:0; top:0; width:0; height:0; }
.gm-mk:hover{ z-index:8; }
.gm-in{ position:absolute; left:0; top:0; }
.gm-in i{
  position:absolute; display:block; box-sizing:border-box; cursor:pointer; pointer-events:auto;
  width:calc(var(--ms) * var(--sz)); height:calc(var(--ms) * var(--sz));
  left:calc(var(--ms) * var(--sz) / -2); top:calc(var(--ms) * var(--sz) / -2);
  border-radius:50%; border:var(--bw) solid #fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.55), 0 2px 5px rgba(0,0,0,.55);
  background-repeat:no-repeat; background-position:center,0 0; background-size:var(--gs),100% 100%;
  transition:transform .12s ease;
}
.gm-in i:hover{ transform:scale(1.18); }
.gm-grp.is-big .gm-in i{ border-color:#ffd23f; }
.gm-grp.is-cus .gm-in i{ border-radius:30%; box-shadow:0 0 0 1px rgba(0,0,0,.4), 0 0 0 3px rgba(224,173,59,.6), 0 0 16px 3px rgba(224,173,59,.85); }
.gm-mk.is-sel{ z-index:9; }
.gm-mk.is-sel .gm-in i{ box-shadow:0 0 0 2px #0b0908, 0 0 0 4px #fff, 0 0 18px 5px rgba(255,255,255,.6); }
.gm-lbl{ position:absolute; left:calc(var(--ms) * var(--sz) / 2 + 6px); top:-8px; display:none; white-space:nowrap; pointer-events:none; font:600 11px/16px var(--font); color:#fff; letter-spacing:.02em; text-shadow:0 0 3px #000,0 0 3px #000,0 1px 2px #000; }
.map-lv1 .gm-lbl,.map-lv2 .gm-lbl{ display:block; }

/* controls drawn over the map follow the page theme */
.map-ctl{ position:absolute; left:12px; top:12px; z-index:10; display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--line-2); border-radius:12px; box-shadow:var(--shadow); overflow:hidden; }
.map-ctl button{ width:40px; height:40px; display:grid; place-items:center; background:none; border:0; border-bottom:1px solid var(--line); color:var(--text); }
.map-ctl button:last-child{ border-bottom:0; }
.map-ctl button:hover{ background:var(--surface-2); color:var(--accent-text); }
.map-ctl .icon{ width:19px; height:19px; }
.map-coords{ position:absolute; left:12px; bottom:12px; z-index:10; pointer-events:none; font-family:var(--mono); font-size:.78rem; color:var(--text); background:var(--surface); border:1px solid var(--line-2); padding:5px 10px; border-radius:9px; font-variant-numeric:tabular-nums; box-shadow:var(--shadow); }
.map-scale{ position:absolute; right:12px; bottom:12px; z-index:10; pointer-events:none; font-family:var(--mono); font-size:.7rem; color:#fff; text-align:center; text-shadow:0 0 3px #000,0 0 3px #000; }
.map-scale span{ display:block; height:6px; margin-top:2px; border:2px solid #fff; border-top:0; box-shadow:0 1px 2px rgba(0,0,0,.8); }
.map-status,.map-missing{ position:absolute; z-index:6; margin:0; font-size:.92rem; color:var(--text-2); }
.map-status{ left:50%; top:50%; transform:translate(-50%,-50%); padding:10px 16px; background:var(--surface); border:1px solid var(--line-2); border-radius:12px; box-shadow:var(--shadow); }
.map-missing{ inset:0; display:flex; align-items:center; justify-content:center; text-align:center; padding:24px; pointer-events:none; }
.map-tip{ position:absolute; z-index:20; pointer-events:none; background:var(--surface); border:1px solid var(--line-2); border-radius:10px; padding:6px 10px; font-size:.8rem; font-weight:550; line-height:1.4; white-space:nowrap; box-shadow:var(--shadow); }
.map-tip small{ display:block; font-family:var(--mono); font-size:.72rem; font-weight:400; color:var(--text-3); }

.map-card{ position:absolute; z-index:15; top:12px; right:12px; width:min(330px,calc(100% - 76px)); max-height:calc(100% - 24px); overflow-y:auto; background:var(--surface); border:1px solid var(--line-2); border-radius:var(--r); padding:16px; box-shadow:var(--shadow); cursor:default; touch-action:pan-y; }
.mc-head{ display:flex; gap:12px; align-items:flex-start; }
.mc-head .gm-sw{ flex:none; width:34px; height:34px; margin-top:1px; }
.mc-title{ font-size:1.08rem; line-height:1.25; }
.mc-x{ margin:-4px -6px 0 auto; flex:none; width:32px; height:32px; display:grid; place-items:center; border:0; background:none; color:var(--text-3); border-radius:8px; }
.mc-x:hover{ background:var(--surface-2); color:var(--text); }
.mc-x .icon{ width:18px; height:18px; }
.mc-badge{ display:inline-block; margin-top:6px; padding:2px 9px; border-radius:99px; font-size:.72rem; font-weight:600; border:1px solid var(--line-2); color:var(--text-2); }
.mc-badge.is-cus{ color:var(--rar-rare); border-color:color-mix(in srgb,var(--rar-rare) 55%,transparent); }
.mc-desc{ margin-top:12px; font-size:.9rem; color:var(--text-2); line-height:1.5; }
.mc-dl{ display:grid; grid-template-columns:auto 1fr; gap:7px 14px; margin:14px 0 0; font-size:.85rem; }
.mc-dl dt{ color:var(--text-3); font-size:.7rem; font-weight:650; letter-spacing:.07em; text-transform:uppercase; padding-top:3px; }
.mc-dl dd{ margin:0; font-weight:550; font-variant-numeric:tabular-nums; word-break:break-word; }
.mc-items{ margin-top:14px; }
.mc-items h5{ margin:0 0 7px; font-size:.7rem; font-weight:650; letter-spacing:.07em; text-transform:uppercase; color:var(--text-3); }
.mc-items ul{ max-height:176px; overflow-y:auto; border-top:1px solid var(--line); }
.mc-items li{ display:flex; justify-content:space-between; gap:12px; padding:6px 0; border-bottom:1px solid var(--line); font-size:.86rem; }
.mc-items li span:last-child{ color:var(--text-3); font-variant-numeric:tabular-nums; }
.mc-items li .mc-ic{ width:30px; height:30px; flex:none; align-self:center; border-radius:50%; margin-right:-2px; }
.mc-items li .mc-ic + span{ flex:1; align-self:center; color:var(--text-2); font-variant-numeric:normal; }
.mc-actions{ margin-top:14px; }

@media (max-width:900px){
  .map-layout{ grid-template-columns:1fr; }
  .map-stage{ order:-1; }
  .map-panel{ position:static; max-height:none; }
  .map-view{ height:clamp(380px,72vw,640px); }
  .map-card{ top:auto; bottom:12px; left:12px; right:12px; width:auto; max-height:52%; }
  .map-coords{ bottom:auto; top:12px; left:64px; }
}