/* Original illustrated realm plates; shared reading and planning surfaces. */
body {
  --paper:#11121a; --ink:#ece5d5; --accent:#ddbd7e; --line:#4b4350;
  --surface:#1c1c28; --muted:#bdb5c5; --realm-art:url('/realms/nexus.svg');
  --heading:Georgia, 'Times New Roman', serif;
  color-scheme:dark;
  background:radial-gradient(ellipse at 90% 0,#33283c77,transparent 65%),var(--paper);
  color:var(--ink);
}
body.osrs { --paper:#191e16; --surface:#252e21; --ink:#eee3c5; --accent:#e0bd73; --muted:#c5c4a5; --line:#5c6145; --realm-art:url('/game-art/osrs-scene.webp'); }
body.eve { --paper:#0c151e; --surface:#132631; --ink:#daeaf0; --accent:#90dbe9; --muted:#9fbecb; --line:#365565; --realm-art:url('/game-art/eve-scene.webp'); --heading:'Bahnschrift','Segoe UI',sans-serif; }
body.ffxiv { --paper:#f0ebe1; --surface:#fcf9f1; --ink:#403a50; --accent:#68517f; --muted:#6d6176; --line:#cbbfb0; --realm-art:url('/game-art/ffxiv-scene.webp'); color-scheme:light; background:radial-gradient(ellipse at 90% 0,#d3dce288,transparent 65%),var(--paper); }
body.palworld { --paper:#0a202a; --surface:#102f38; --ink:#e3f2f1; --accent:#90e5cd; --muted:#b4c8ce; --line:#365a61; --realm-art:url('/game-art/palworld-scene.webp'); --heading:'Trebuchet MS','Segoe UI',sans-serif; }
body.pokemon-go { --paper:#f2f4e9; --surface:#fffef7; --ink:#24443b; --accent:#28634c; --muted:#55695d; --line:#bdcdbc; --realm-art:url('/game-art/pokemon-go-scene.webp'); --heading:'Trebuchet MS','Segoe UI',sans-serif; color-scheme:light; background:radial-gradient(ellipse at 95% 0,#d1e3c77a,transparent 60%),var(--paper); }
.page { padding-top:2.8rem; }
.page h1,.page h2,.page h3 { font-family:var(--heading); text-wrap:balance; }
.page h1 { letter-spacing:-.035em; font-size:clamp(2.4rem,5vw,4rem); }
.page>.eyebrow { display:flex; align-items:center; gap:12px; }
.page>.eyebrow:before { content:''; width:28px; height:1px; background:var(--accent); }
.page .eyebrow,.page .meta,.site-footer { color:var(--muted); }
.page .lede { color:var(--muted); }
.page a { color:var(--accent); }
.page .card { background:var(--surface); border:1px solid var(--line); border-radius:3px 14px 3px 14px; padding:1.6rem; box-shadow:0 5px 20px #00000012; position:relative; min-width:0; }
.page .card:before { content:''; position:absolute; top:-1px; left:24px; width:44px; height:2px; background:var(--accent); }
.page .card h2 { font-size:1.45rem; line-height:1.3; }
.page .card h2 a { text-decoration:none; }
.page .card h2 a:hover { text-decoration:underline; }
.page .card p:last-child { margin-bottom:0; }
.page .card-grid { gap:1.25rem; }
.page .card:focus-within { outline:2px solid var(--accent); outline-offset:3px; }
.page button,.page a.button { background:var(--accent); color:var(--paper); border:1px solid var(--accent); border-radius:4px 10px 4px 10px; min-height:44px; font-weight:650; }
.page button.secondary { background:transparent; color:var(--accent); }
.page input,.page select,.page textarea { background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:4px; min-height:44px; padding:.7rem; font:inherit; }
.page input[type=checkbox],.page input[type=radio] { min-height:0; accent-color:var(--accent); }
.page .notice,.page .callout,.page .planner-handoff { color:var(--ink); background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--accent); padding:1.2rem 1.5rem; border-radius:0 10px 10px 0; margin:1.5rem 0; line-height:1.7; }
.page .planner-handoff p { margin:.4rem 0 0; color:var(--muted); }
.page .search-results button { background:var(--surface); color:var(--accent); }
.page .prose th,.page .result th { background:var(--surface); }
.page .reading-aside { border-color:var(--line); font-size:.95rem; }
.page .prose { max-width:800px; }
.page .prose h2 { border-top:1px solid var(--line); padding-top:1.5rem; }
.page .prose li { margin:.4rem 0; }
.game-nav.companion-game-nav { color:var(--muted); background:transparent; border-color:var(--line); gap:0 1.6rem; padding-top:.5rem; padding-bottom:.5rem; }
.game-nav.companion-game-nav a { color:inherit; text-decoration:none; font-size:.9rem; }
.game-nav.companion-game-nav a:first-child { color:var(--accent); font-weight:700; }
.game-nav.companion-game-nav a[aria-current=page] { color:var(--ink); box-shadow:inset 0 -2px var(--accent); text-decoration:none; }
.realm-hero { min-height:350px; display:flex; flex-direction:column; justify-content:center; position:relative; isolation:isolate; padding:clamp(24px,4vw,52px); border:1px solid var(--line); border-radius:4px 28px 4px 28px; overflow:hidden; margin-bottom:2.8rem; background:var(--paper); }
.realm-hero:before { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,var(--paper) 4%,transparent 100%),var(--realm-art) center/cover; }
.realm-hero .lede { max-width:580px; margin-top:0; }
.realm-hero h1 { max-width:720px; margin:.6rem 0 1rem; }
.realm-hero .realm-actions { display:flex; flex-wrap:wrap; align-items:center; gap:1.25rem; margin-top:.7rem; }
.realm-section { display:flex; gap:20px; justify-content:space-between; align-items:baseline; border-bottom:1px solid var(--line); margin-top:2.5rem; padding-bottom:.8rem; }
.realm-section h2 { margin:0; font-size:1.7rem; }
.realm-section a { font-size:.9rem; }
.realm-portals { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:22px; }
.realm-portals .realm-portal { grid-column:span 2; padding:0; overflow:hidden; transition:transform .2s,border-color .2s; background:#1b1b25; border-color:#494050; border-radius:4px 20px 4px 20px; }
.realm-portals .realm-portal:nth-child(-n+2) { grid-column:span 3; }
.realm-portal .realm-plate { height:170px; background-position:center right; background-size:cover; border-bottom:1px solid #494050; }
.realm-portals .realm-portal:nth-child(-n+2) .realm-plate { height:210px; }
.realm-portal .realm-copy { padding:24px; }
.realm-portals .realm-portal h2 { font:500 1.6rem/1.25 var(--heading); }
.realm-portals .realm-portal h2 a { color:#efd59c; }
.realm-portal p { color:#c8c3d1; }
.realm-portal .portal-link { display:inline-flex; align-items:center; gap:12px; color:#e0c28b; font-size:.85rem; margin-top:.5rem; }
.realm-portal:has(a:hover) { transform:translateY(-4px); border-color:#d2b57c; }
.realm-portal a:after { content:''; position:absolute; inset:0; }
.realm-portal .eyebrow { color:#c9b991; }
.realm-portal:before { display:none; }
.realm-directory .realm-hero { min-height:305px; }
.realm-directory .realm-hero h1 { font-size:clamp(3rem,6vw,5rem); }
body.eve .page .card { border-radius:0; border-left:3px solid #477686; }
body.eve .page .eyebrow { font-family:Consolas,monospace; }
body.eve .page h1 { text-transform:uppercase; font-weight:600; letter-spacing:.02em; }
body.eve .realm-hero { border-radius:0; }
body.osrs .page .card { border:3px double var(--line); border-radius:2px; }
body.osrs .page .card:before { top:-3px; }
body.osrs .realm-hero { border:3px double var(--line); border-radius:2px; }
body.ffxiv .page .card { box-shadow:0 5px 18px #65503b0c; }
body.ffxiv .page .card:before { background:#ae9564; }
body.pokemon-go .page .card { border-radius:18px; }
body.pokemon-go .page h1,body.pokemon-go .page h2 { font-weight:750; }
body.pokemon-go .go-public-hero { background:linear-gradient(90deg,#143d38f5 15%,#143d3870),url('/game-art/pokemon-go-scene.webp') center/cover; color:#f3f7e5; border:1px solid #538e71; border-radius:6px 24px 6px 24px; }
body.pokemon-go .go-public-hero a.button { background:#d5e7b7; color:#203f33; border-color:#d5e7b7; }
body.pokemon-go .go-public-hero a:not(.button) { color:#d5e7b7; }
body.pokemon-go .go-public-note { color:var(--ink); background:#e2ead6; border-radius:0 12px 12px 0; }
.site-footer { padding-top:1.5rem; font-size:.8rem; }
@media(max-width:800px) {
  .realm-portals { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .realm-portals .realm-portal,.realm-portals .realm-portal:nth-child(-n+2) { grid-column:auto; }
  .realm-portals .realm-portal:nth-child(-n+2) .realm-plate { height:170px; }
  .realm-hero { min-height:320px; }
  .realm-hero:before { background:linear-gradient(90deg,var(--paper),transparent 190%),var(--realm-art) center right/cover; }
}
@media(max-width:540px) {
  .page { padding:24px 16px 40px; }
  .realm-portals { grid-template-columns:1fr; }
  .realm-section { align-items:flex-start; }
  .realm-section h2 { font-size:1.4rem; }
  .realm-hero h1 { font-size:2.6rem; }
  .realm-hero .lede { font-size:1.05rem; }
  .page .card { padding:1.2rem; }
  .realm-portals .realm-portal { padding:0; }
  .game-nav.companion-game-nav { gap:0 16px; white-space:normal; }
}
@media(prefers-reduced-motion:reduce) { .realm-portals .realm-portal { transition:none; } }
@media print { body { --ink:#111; --muted:#333; --paper:white; --surface:white; color:#111; background:white; } .realm-hero:before { display:none; } .companion-shell,.realm-actions { display:none; } }
