.theme-toggle { font: inherit; font-size: .88rem; cursor: pointer; border: 1px solid #b6d2f3; border-radius: 10px; padding: 8px 11px; background: #e6f0ff; color: #112b46; }
.header-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.site-footer { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.site-footer a { text-decoration: underline; text-underline-offset: .2em; }
.portal-main { width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: 112px 0 42px; }
.portal-main p, .portal-main li { line-height: 1.65; }
.portal-main a:not(.primary), .wiki-links a { color: #1857ca; text-decoration: underline; text-underline-offset: .2em; }
.portal-main h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.wiki-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 28px; }
:root[data-theme="dark"] { color-scheme: dark; --paper:#0c1726; --bg:#0c1726; --panel:#142438; --line:#2c4663; --ink:#e6f1ff; --muted:#acc3dc; --gold:#a6cdff; --green:#29476a; }
[data-theme="dark"] body { color: var(--ink); }
[data-theme="dark"] .theme-toggle, [data-theme="dark"] .address, [data-theme="dark"] .cart-button,
[data-theme="dark"] .close, [data-theme="dark"] .topics button { background: #1c344f; border-color:#426288; color: #e6f1ff; }
[data-theme="dark"] .theme-toggle:hover, [data-theme="dark"] .address:hover, [data-theme="dark"] .cart-button:hover,
[data-theme="dark"] .topics button[aria-pressed="true"], [data-theme="dark"] nav a:hover { background:#294b73; color:#fff; }
[data-theme="dark"] .header, [data-theme="dark"] dialog { background:#142438; border-color:#2c4663; }
[data-theme="dark"] .hero { border-color:#2c4663; background: radial-gradient(ellipse at 87% 28%, #23476c, transparent 70%), #102034; }
[data-theme="dark"] .wordmark { filter: brightness(0) invert(1); }
[data-theme="dark"] .start, [data-theme="dark"] .topic { background:#14283f; border-color:#2c4663; }
[data-theme="dark"] .topic a, [data-theme="dark"] .start p a, [data-theme="dark"] .wiki-links a, [data-theme="dark"] .portal-main a:not(.primary) { color:#a6cdff; }
[data-theme="dark"] footer { border-color:#2c4663; }
[data-theme="dark"] input, [data-theme="dark"] select { background:#101e31; color:#e6f1ff; border-color:#426288; }
[data-theme="dark"] .recipe-tag { color:#b5d3f2; }
[data-theme="dark"] .action { background:#234f91; color:#fff; }
[data-theme="dark"] .filters button:hover, [data-theme="dark"] .filters button[aria-pressed="true"] { color:#fff; }
[data-theme="dark"] .copy-icon { box-shadow:-3px -3px 0 -1px #1c344f,-4px -4px currentColor; }
@media (max-width: 660px) {
  .header-tools { justify-content: flex-end; }
  .header .theme-toggle { font-size: .77rem; padding-inline: 5px; }
  .header .cart-label { display:none; }
  .portal-main { padding-top: 144px; }
}

:root { --hero-photo: url("https://play.elycraft.online/assets/spawn.jpg"); }
body > main > .hero:has(.wordmark) {
  background: linear-gradient(0deg, var(--paper), transparent 16%),
    linear-gradient(90deg, #081624df 0%, #09162794 42%, #09162712 80%),
    var(--hero-photo) center 50% / cover no-repeat, #132334;
}
body > main > .hero .wordmark { filter: brightness(0) invert(1); }
body > main > .hero .status { color:#fff; }
@media (max-width:660px) {
  body > main > .hero:has(.wordmark) { background-position: center, center, 59% center; }
}

:root[data-theme="dark"] {
  --paper:#070e18; --bg:#070e18; --panel:#0d1928; --line:#24364b;
  --ink:#e6f1ff; --muted:#a9bdd4;
}
[data-theme="dark"] .header, [data-theme="dark"] dialog { background:#0b1522; border-color:#24364b; }
[data-theme="dark"] .start, [data-theme="dark"] .topic { background:#0d1928; border-color:#24364b; }
[data-theme="dark"] .theme-toggle, [data-theme="dark"] .address,
[data-theme="dark"] .cart-button, [data-theme="dark"] .close,
[data-theme="dark"] .topics button { background:#142438; border-color:#344b66; }
[data-theme="dark"] .topics button[aria-pressed="true"], [data-theme="dark"] .address:hover,
[data-theme="dark"] .cart-button:hover, [data-theme="dark"] .theme-toggle:hover { background:#213d5c; }
[data-theme="dark"] body > main > .hero:has(.wordmark) {
  background-image: linear-gradient(0deg, var(--paper), transparent 34%),
    linear-gradient(90deg, #03070eed 0%, #040912bc 46%, #04091272 100%),
    var(--hero-photo);
}

:root[data-theme="dark"] {
  --paper:#080b10; --bg:#080b10; --panel:#10151d; --line:#222c39;
  --ink:#f3f5f8; --muted:#a1acba; --blue:#245dba;
}
[data-theme="dark"] body {
  background: radial-gradient(ellipse at 86% 54%, #101e31, transparent 56%), var(--paper);
}
[data-theme="dark"] .header {
  background:#0b0f16; border-color:#252e3a; box-shadow:none; border-radius:14px;
}
[data-theme="dark"] .header nav a { color:#b8c2d0; }
[data-theme="dark"] .header nav a:hover { background:#151f2c; color:#fff; }
[data-theme="dark"] .address, [data-theme="dark"] .cart-button {
  background:#141c28; border-color:#303f52;
}
[data-theme="dark"] .primary {
  background:#245dba; border-color:#326cc7;
}
[data-theme="dark"] .primary:hover { background:#2b66c4; }
[data-theme="dark"] body > main > .hero:has(.wordmark) {
  background-image: linear-gradient(0deg,#080b10 1%,#080b104d 24%,transparent 48%),
    linear-gradient(96deg,#080b10 0%,#09101be8 27%,#09142273 56%,#080b1030 100%),
    var(--hero-photo);
}
.online { display:flex; align-items:center; gap:9px; margin-top:17px; color:#c1ccd9; font-size:.92rem; }
.online-dot { flex:none; width:8px; height:8px; border-radius:50%; background:#818b9b; }
.online[data-state="online"] .online-dot { background:#65d8a1; }
.online[data-state="offline"] .online-dot { background:#e89183; }
[data-theme="dark"] .start, [data-theme="dark"] .topic {
  background:#101720; border-color:#263244; border-radius:14px;
}
[data-theme="dark"] .store-product {
  background:linear-gradient(124deg,#1c1c19,#10151d 74%);
}
[data-theme="dark"] .store-product[data-product="Prime+"] {
  background:linear-gradient(124deg,#201b2d,#10151d 74%);
}
.store-product p { color:#c0c9d6; font-variant-numeric:tabular-nums; }
.network-footer {
  display:block; margin:0; width:100%; padding:0 max(20px,calc((100% - 1100px)/2));
  border-top:1px solid #222b38; background:#06080c; color:#aab3c0;
}
.footer-main { display:grid; grid-template-columns:1fr minmax(0,420px); gap:32px; padding:38px 0 34px; }
.footer-brand .brand { display:inline-flex; color:#f3f5f8; text-decoration:none; }
.footer-brand .brand img { border-radius:9px; }
.footer-brand p { margin:12px 0 0; }
.footer-brand p span { padding-inline:5px; }
.footer-brand .footer-ip { color:#8db6fa; }
.footer-links { display:grid; grid-template-columns:1fr 1fr; align-content:start; gap:12px 22px; }
.footer-links a { color:#b9c3cf; text-decoration:none; line-height:1.35; }
.footer-links a:hover, .footer-brand p a:hover { text-decoration:underline; text-underline-offset:.2em; }
.footer-caption {
  border-top:1px solid #222b38; color:#8e9ba9; display:flex; justify-content:space-between;
  flex-wrap:wrap; gap:8px 20px; padding:16px 0 20px; font-size:.84rem;
}
@media (max-width:680px) {
  .footer-main { grid-template-columns:1fr; gap:24px; padding-block:28px; }
  [data-theme="dark"] .header nav a { padding-inline:.47rem; }
}

[data-theme="dark"] body:not(.wiki-page) {
  background: radial-gradient(ellipse at 85% 22%, #14253a, transparent 61%),
    linear-gradient(145deg, #090d14, #0c111c 56%, #080b10 100%);
}
[data-theme="dark"] .header .address { min-height:40px; padding:8px 12px; }
@media (max-width:660px) {
  [data-theme="dark"] .header .address { padding-inline:8px; }
  [data-theme="dark"] .header nav { font-size:.88rem; }
}

.mechanic-links { margin:18px 0 0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.mechanic-links a { display:grid; gap:5px; padding:14px; border:1px solid #293547; border-radius:10px; background:#101720; }
.mechanic-links a:hover { border-color:#5472a0; }
.mechanic-links span { color:#b0bdcd; font-size:.87rem; line-height:1.4; }
.start-steps { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; counter-reset:steps; padding:0; list-style:none; }
.start-steps li { counter-increment:steps; display:grid; grid-template-columns:34px 1fr; gap:12px; padding:16px; border:1px solid #263244; border-radius:12px; background:#101720; }
.start-steps li::before { content:counter(steps); display:grid; place-items:center; width:34px; height:34px; border-radius:8px; background:#203854; color:#d5e8ff; font-weight:750; }
.start-steps h3 { margin:0 0 6px; font-size:1.06rem; }
.start-steps p, .connect-faq p { color:#b9c5d5; margin:0 0 9px; line-height:1.5; }
.quick-start a, .rules-article a { color:#a6cdff; text-decoration:underline; text-underline-offset:.2em; }
.start-steps .address { min-height:40px; padding:6px 10px; }
.quick-status:empty { display:none; }
.start-steps .quick-status { margin:6px 0 0; }
.connect-faq { margin-top:26px; }
.connect-faq details { border-bottom:1px solid #263244; padding:10px 0; }
.connect-faq summary { cursor:pointer; padding-bottom:4px; font-weight:650; }
.connect-faq p { margin:5px 0 0; }
.rules-layout { display:grid; grid-template-columns:235px minmax(0,1fr); gap:35px; align-items:start; }
.rules-aside { position:sticky; top:22px; border-right:1px solid #263244; padding-right:14px; }
.rules-aside nav { display:block; font-size:.91rem; }
.rules-aside ul { list-style:none; margin:0; padding:0; }
.rules-aside a { display:block; padding:8px; }
.rules-article section { scroll-margin-top:24px; }
.rules-article section h2 { font-size:1.45rem; margin:25px 0 8px; }
@media(max-width:820px) { .mechanic-links { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:650px) {
  .start-steps,.rules-layout { grid-template-columns:1fr; }
  .rules-layout { gap:18px; }
  .rules-aside { position:static; border-right:0; border-bottom:1px solid #263244; padding-bottom:10px; }
  .rules-aside ul { display:flex; flex-wrap:wrap; gap:4px; }
}
