/* Shared player portal chrome and interactive controls. */
:root {
  --realm-width: 1312px;
  --realm-gutter: clamp(24px, 5.2vw, 80px);
  --realm-border: rgba(218, 188, 130, .28);
  --realm-rule: #384251;
  --realm-gold: var(--gold-2);
  --realm-card: #131e2d;
  --muted: var(--ink-2);
}
.realm-wrap {
  width: min(calc(100% - var(--realm-gutter) * 2), var(--realm-width));
  margin-inline: auto;
}
.realm-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #0b111bf5;
  border-bottom: 1px solid var(--realm-border);
  backdrop-filter: blur(14px);
}
.header-inner, .realm-actions, .realm-nav, .realm-nav a, .account-link, .nav-action,
.nav-toggle, .footer-signature, .footer-main nav { display: flex; align-items: center; }
.header-inner { min-height: 76px; gap: clamp(20px, 3.8vw, 62px); }
.realm-logo { display: block; flex-shrink: 0; }
.realm-logo img { display: block; width: 142px; max-height: 61px; object-fit: contain; }
.realm-nav { align-self: stretch; gap: clamp(18px, 2.4vw, 40px); }
.realm-nav a, .account-link {
  position: relative;
  color: #c7c9cc;
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  min-height: 44px;
}
.realm-nav a { align-self: stretch; white-space: nowrap; }
.realm-nav a[aria-current], .realm-nav a:hover, .account-link:hover { color: var(--gold-1); }
.realm-nav a[aria-current]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--realm-gold);
}
.realm-nav a[aria-current]::before {
  content: ''; position: absolute; bottom: -3px; left: calc(50% - 3px);
  width: 6px; height: 6px; transform: rotate(45deg); background: var(--realm-gold);
}
.realm-actions { margin-left: auto; gap: clamp(15px, 2vw, 30px); }
.account-link { gap: 8px; color: var(--ink-1); white-space: nowrap; }
.account-link .icon { color: var(--realm-gold); width: 17px; height: 17px; }
.nav-action {
  justify-content: center; gap: 9px; padding: 9px 19px; min-height: 39px;
  border: 1px solid #a98a54; border-radius: 3px; background: #d4af6d0b;
  color: var(--gold-1); font-size: .84rem; font-weight: 600; white-space: nowrap;
}
.nav-action:hover, .nav-action:focus-visible { background: #e5bf771b; color: #fff0cd; border-color: var(--gold-1); }
.nav-toggle {
  width: 42px; height: 42px; justify-content: center; display: none; cursor: pointer;
  background: transparent; border: 1px solid var(--realm-border); border-radius: 3px;
}
.nav-toggle .icon { width: 20px; height: 20px; }
.nav-toggle[aria-expanded=false] .icon-close, .nav-toggle[aria-expanded=true] .icon-menu { display: none; }
.realm-menu {
  position: absolute; left: 0; right: 0; top: 100%; background: #101a28; padding: 8px var(--realm-gutter) 20px;
  border-bottom: 1px solid var(--realm-border); box-shadow: 0 18px 30px #050a1090;
  overflow-y: auto; max-height: calc(100dvh - 74px); animation: menu-fade var(--dur-1) ease-out;
}
.realm-menu a, .realm-menu button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 10px 4px; min-height: 44px; color: var(--ink-1); border: 0;
  border-bottom: 1px solid var(--line-2); background: none; text-align: left;
}
.realm-menu a[aria-current], .realm-menu a:hover { color: var(--realm-gold); }
@keyframes menu-fade { from { opacity: 0; } to { opacity: 1; } }
.btn { border-radius: 3px; }
.btn.primary {
  --btn-fg: #241b0e;
  --btn-bg: linear-gradient(110deg, #f1d69c, #ddb467);
  --btn-bd: #e8c88b;
  box-shadow: inset 0 0 0 2px #31210b16; font-weight: 700;
  overflow: hidden; isolation: isolate;
}
.btn.primary::before {
  content: ''; position: absolute; z-index: -1; top: -15%; left: -50%; width: 35%; height: 130%;
  pointer-events: none; background: linear-gradient(90deg, transparent, #fff6d9a3, transparent);
  transform: skewX(-23deg);
}
.btn.primary:hover, .btn.primary:focus-visible {
  --btn-bg: linear-gradient(110deg, #f6dfa9, #e4bf79);
  box-shadow: inset 0 0 0 2px #31210b16;
}
.btn.primary:is(:hover, :focus-visible)::before { animation: gold-glint calc(520ms * var(--ms)) ease-out; }
@keyframes gold-glint { to { left: 125%; } }
a:focus-visible, button:focus-visible, .btn:focus-visible, .btn.primary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #ffe0a2; outline-offset: 3px; }
main:focus { outline: none; box-shadow: none; }
.realm-footer { background: #0a1019; border-top: 1px solid var(--realm-border); }
.footer-main { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; padding-block: 32px; }
.footer-signature { gap: 10px; color: var(--ink-1); font: 500 1rem var(--display); }
.footer-signature small { display: block; font: 400 .72rem var(--body); color: var(--ink-3); margin-top: 3px; }
.footer-main nav { gap: 16px; flex-wrap: wrap; margin-left: auto; }
.footer-main nav a, .footer-main nav button {
  background: transparent; border: 0; padding: 0; color: var(--ink-2); font: 500 .8rem var(--body); cursor: pointer;
}
.footer-main nav :is(a,button):hover { color: var(--realm-gold); }
.motion-switch { border-radius: 3px; }
.motion-switch button { border-radius: 2px; }
.realm-section-title { display: flex; gap: 12px; align-items: center; min-width: 0; margin-bottom: 20px; }
.realm-section-title h2 {
  margin: 0; color: var(--ink-1); font: 500 clamp(1.45rem, 2.15vw, 2.1rem)/1.15 var(--display);
}
.section-sigil, .fact-icon, .quest-chevron {
  fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45;
}
.section-sigil { color: var(--realm-gold); width: 27px; height: 27px; flex-shrink: 0; }
.title-line { position: relative; height: 1px; flex: 1; min-width: 12px; margin-left: 3px; background: linear-gradient(90deg, #89754e88, #89754e21); }
.title-line::before { content: ''; position: absolute; left: 0; top: -2px; width: 5px; height: 5px; transform: rotate(45deg); background: #9f8557; }
.text-action { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--realm-gold); font-size: .82rem; font-weight: 600; }
.text-action .icon { width: 14px; height: 14px; }
@media (max-width: 1050px) {
  .header-inner { gap: 29px; }
  .realm-nav { gap: 19px; }
  .realm-logo img { width: 120px; }
}
@media (max-width: 899px) {
  .header-inner { min-height: 66px; }
  .realm-nav { display: none; }
  .has-js .nav-toggle { display: flex; }
  html:not(.has-js) .header-inner { flex-wrap: wrap; padding-block: 7px; gap: 4px; }
  html:not(.has-js) .realm-nav { display: flex; order: 3; flex-basis: 100%; gap: 0; justify-content: space-between; }
  html:not(.has-js) .realm-nav a { min-height: 32px; font-size: .78rem; }
  .footer-main nav { margin-left: 0; }
}
@media (max-width: 630px) {
  :root { --realm-gutter: 19px; }
  .header-inner { min-height: 61px; gap: 8px; }
  .realm-logo img { width: 96px; }
  .realm-actions { gap: 10px; }
  .account-link { font-size: .76rem; gap: 4px; }
  .account-link .icon { width: 14px; height: 14px; }
  .nav-action { min-height: 35px; font-size: .75rem; padding: 7px 10px; }
  .nav-toggle { width: 34px; height: 35px; }
  .realm-section-title { gap: 9px; margin-bottom: 15px; }
  .section-sigil { width: 23px; height: 23px; }
}
@media (max-width: 375px) {
  .header-inner { width: calc(100% - 26px); }
  .realm-logo img { width: 88px; }
  .realm-actions { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='full']) *, html:not([data-motion='full']) *::before, html:not([data-motion='full']) *::after {
    animation-duration: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important;
  }
}
html[data-motion='reduced'] *, html[data-motion='reduced'] *::before, html[data-motion='reduced'] *::after {
  animation-duration: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important;
}

