:root {
  --ink: #f5f0e7;
  --muted: #c7c2b5;
  --deep: #061110;
  --deep-2: #0a1916;
  --panel: rgba(8, 25, 23, 0.88);
  --line: rgba(218, 191, 131, 0.28);
  --gold: #d7b679;
  --gold-bright: #f3dca7;
  --paper: #e9e4d9;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--deep);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
  background-image: radial-gradient(circle at 50% 12%, rgba(18, 82, 73, .28), transparent 34%), linear-gradient(#061110, #0a1714 58%, #06100f);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 4rem);
  background: rgba(5, 15, 14, .9); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.brand { text-decoration: none; letter-spacing: .09em; font-size: .95rem; white-space: nowrap; }
.site-nav { display: flex; gap: 1.1rem; font-size: .9rem; align-items: center; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--gold-bright); }
.menu-button { display: none; }

.hero { min-height: min(82vh, 860px); position: relative; display: grid; align-items: end; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(4,13,12,.06) 0%, rgba(4,13,12,.18) 43%, rgba(4,13,12,.94) 100%); }
.hero-copy { position: relative; z-index: 2; max-width: 780px; padding: clamp(4rem, 10vw, 8rem) clamp(1.25rem, 7vw, 7rem); }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .22em; font-size: .76rem; margin: 0 0 .6rem; }
h1, h2, h3 { line-height: 1.06; font-weight: 400; margin: 0 0 1rem; }
h1 { font-size: clamp(3rem, 8vw, 6.5rem); text-shadow: 0 2px 16px rgba(0,0,0,.55); }
h2 { font-size: clamp(2rem, 4.3vw, 4rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
.hero-copy > p:not(.eyebrow) { max-width: 660px; font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: #e7e1d5; }
.hero-actions, .retailer-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.button { display: inline-block; padding: .85rem 1.2rem; border: 1px solid var(--gold); text-decoration: none; text-transform: uppercase; letter-spacing: .1em; font-size: .77rem; cursor: pointer; color: var(--ink); background: transparent; }
.button.primary { background: var(--gold); color: #10201d; }
.button.ghost { background: rgba(3,13,12,.34); }
.button.small { padding: .68rem .9rem; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }

.section { padding: clamp(4rem, 8vw, 8rem) clamp(1.25rem, 7vw, 7rem); }
.section-heading { max-width: 850px; margin-bottom: 2rem; }
.section-heading > p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }
.split-heading { display: flex; align-items: end; justify-content: space-between; max-width: 1180px; gap: 2rem; }

.world-section { background: linear-gradient(180deg, rgba(255,255,255,.025), transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.world-heading { max-width: 900px; margin-bottom: 2.2rem; }
.world-maps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); max-width: 980px; margin: 0 auto; align-items: start; }
.world-map-card { min-width: 0; }
.map-card-heading { text-align: center; margin-bottom: 1rem; }
.map-card-heading h3 { margin-bottom: 0; }
.map-shell, .star-map-shell { position: relative; width: min(100%, 370px); margin: 0 auto; padding: .72rem; background: var(--paper); box-shadow: 0 22px 58px rgba(0,0,0,.34); overflow: hidden; }
.map-image { width: 100%; position: relative; z-index: 1; }
.map-expand { position: absolute; right: 1.25rem; bottom: 1.25rem; z-index: 8; border: 1px solid rgba(255,255,255,.55); background: rgba(6,17,15,.86); color: white; padding: .55rem .72rem; cursor: pointer; font-size: .78rem; }
.hotspot { position: absolute; z-index: 7; width: 17px; height: 17px; border-radius: 50%; border: 1px solid rgba(255,255,255,.95); background: rgba(215,182,121,.78); box-shadow: 0 0 0 4px rgba(215,182,121,.18), 0 0 13px rgba(255,232,176,.72); cursor: pointer; transform: translate(-50%, -50%); }
.hotspot:hover, .hotspot:focus-visible { transform: translate(-50%, -50%) scale(1.2); outline: none; }
.hotspot.glorn { left: 19%; top: 41%; }
.hotspot.morolynne { left: 56%; top: 59%; }
.hotspot.fayre { left: 78%; top: 35%; }
.hotspot.pillar { left: 88%; top: 12%; }
.hotspot.mountains { left: 58%; top: 15%; }
.star-map-shell { background: #06101a; padding: .72rem; aspect-ratio: 2 / 3; }
.star-map-underlay { position: absolute; inset: .72rem; width: calc(100% - 1.44rem); height: calc(100% - 1.44rem); object-fit: cover; filter: brightness(.18) sepia(.12) hue-rotate(155deg) saturate(1.65) contrast(1.2); opacity: .68; }
.star-map-svg { position: absolute; inset: .72rem; width: calc(100% - 1.44rem); height: calc(100% - 1.44rem); z-index: 3; background: radial-gradient(circle at 50% 35%, rgba(28,72,104,.16), rgba(3,8,18,.56)); }
.constellation-lines path { fill: none; stroke: rgba(213,230,255,.78); stroke-width: .18; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 3px rgba(180,220,255,.95)); }
.constellation-stars circle { fill: #f8f4df; filter: drop-shadow(0 0 2px white) drop-shadow(0 0 5px #9fdcff); }
.minor-stars circle { fill: rgba(237,245,255,.86); filter: drop-shadow(0 0 2px rgba(190,225,255,.85)); }
.star-map-glow { position: absolute; inset: .72rem; z-index: 4; pointer-events: none; box-shadow: inset 0 0 70px rgba(0,0,0,.72); background: radial-gradient(circle at 63% 41%, rgba(142,207,255,.11), transparent 18%); }
.map-caption { max-width: 420px; margin: .85rem auto 0; text-align: center; color: var(--muted); font-size: .9rem; }
.lore-panel { padding: 1.35rem 1.55rem; border: 1px solid var(--line); background: rgba(8,25,23,.8); box-shadow: 0 20px 55px rgba(0,0,0,.22); }
.lore-panel p { color: var(--muted); }
.world-lore { max-width: 980px; margin: 2rem auto 0; }

.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.portal-card { min-height: 390px; padding: clamp(2rem, 4vw, 4rem); background: linear-gradient(150deg, rgba(10,36,33,.96), rgba(5,19,18,.99)); display: flex; flex-direction: column; justify-content: end; }
.portal-card h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
.portal-card p { color: var(--muted); }
.text-link, .text-button { margin-top: .8rem; color: var(--gold-bright); text-decoration: none; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 1rem; }
.mini-bestiary { display: flex; flex-wrap: wrap; gap: .55rem; margin: .6rem 0 .9rem; }
.bestiary-chip { border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--gold-bright); padding: .52rem .7rem; cursor: pointer; }
.bestiary-chip:hover { background: rgba(215,182,121,.12); }
.bestiary-note { min-height: 4.6em; font-style: italic; }

.book-section { border-bottom: 1px solid var(--line); }
.book-layout { display: grid; grid-template-columns: minmax(260px, 410px) minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; max-width: 1280px; margin: 0 auto; }
.book-cover { width: 100%; box-shadow: 0 30px 70px rgba(0,0,0,.45); }
.book-copy { max-width: 760px; }
.lead { font-size: 1.18rem; color: #eee7da; }
.format-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 1.6rem 0; }
.format-grid > div { border: 1px solid var(--line); background: rgba(255,255,255,.025); padding: 1rem; display: flex; flex-direction: column; gap: .25rem; }
.format-grid span { color: var(--muted); font-size: .88rem; }
.format-grid code { color: var(--gold-bright); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.library-note { margin-top: 1.4rem; border-left: 2px solid var(--gold); padding: .8rem 1rem; color: var(--muted); background: rgba(215,182,121,.05); }
.library-note strong { color: var(--ink); }

.reviews-section { background: rgba(255,255,255,.02); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 1250px; }
.review-card { border: 1px solid var(--line); background: rgba(7,24,21,.82); padding: clamp(1.4rem, 3vw, 2.2rem); }
.review-card.featured { box-shadow: 0 0 0 1px rgba(215,182,121,.18), 0 20px 50px rgba(0,0,0,.18); }
.rating { color: var(--gold-bright); letter-spacing: .12em; font-size: 1.2rem; }
blockquote { margin: 1rem 0; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.45; }
.review-card p { color: var(--muted); }
.review-card a { color: var(--gold-bright); text-decoration: none; }

.authors-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; max-width: 1300px; }
.authors-image { width: 100%; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.24); }
.authors-copy p:not(.eyebrow) { color: var(--muted); }

.press-section { padding-top: 3rem; }
.press-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 1250px; }
.press-card { text-decoration: none; border: 1px solid var(--line); padding: 1.3rem; background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: .4rem; min-height: 160px; }
.press-card span { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; }
.press-card strong { font-weight: 400; font-size: 1.15rem; }
.press-card small { color: var(--muted); margin-top: auto; }
.press-card:hover { background: rgba(215,182,121,.06); }

.site-footer { padding: 2.2rem clamp(1.25rem, 7vw, 7rem); display: flex; justify-content: space-between; gap: 1.4rem; color: #9ea79f; border-top: 1px solid var(--line); font-size: .9rem; }
.site-footer p { margin: .2rem 0 0; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }

.map-dialog, .spell-dialog { border: 1px solid #d7d0c1; box-shadow: 0 40px 100px rgba(0,0,0,.65); }
.map-dialog { width: min(92vw, 900px); max-height: 92vh; padding: 0; background: #efe9dc; }
.map-dialog::backdrop, .spell-dialog::backdrop { background: rgba(0,0,0,.84); }
.map-dialog img { width: 100%; height: auto; }
.dialog-close { position: sticky; top: .75rem; float: right; margin: .75rem; z-index: 10; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: rgba(8,18,16,.9); color: white; font-size: 1.55rem; cursor: pointer; }
.spell-dialog { width: min(92vw, 760px); max-height: 90vh; overflow: auto; padding: 0; background: #071412; color: var(--ink); }
.spell-inner { padding: clamp(1.4rem, 5vw, 3.2rem); }
.spell-intro { color: var(--muted); }
.spell-dialog fieldset { border: 1px solid var(--line); margin: 1.2rem 0; padding: 1rem; }
.spell-dialog legend { color: var(--gold-bright); padding: 0 .45rem; }
.spell-dialog label { display: block; padding: .45rem .2rem; color: var(--muted); cursor: pointer; }
.spell-dialog input { accent-color: var(--gold); }
.spell-output { margin-top: 1.4rem; padding: 1rem; border: 1px solid var(--gold); background: rgba(215,182,121,.08); }
.spell-output strong { color: var(--gold-bright); }

@media (max-width: 1000px) {
  .world-maps { grid-template-columns: 1fr; }
  .review-grid, .press-grid { grid-template-columns: 1fr; }
  .authors-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .portal-grid { grid-template-columns: 1fr; }
  .portal-card { min-height: 300px; }
  .book-layout { grid-template-columns: 1fr; }
  .cover-wrap { max-width: 380px; margin: 0 auto; }
  .format-grid { grid-template-columns: 1fr; }
  .site-nav { position: absolute; top: 100%; right: 1rem; left: 1rem; display: none; flex-direction: column; align-items: stretch; padding: 1rem; background: #071312; border: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .menu-button { display: block; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: .45rem .7rem; }
  .site-footer { flex-direction: column; }
  .split-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .hero { min-height: 72vh; }
  .hero-art { object-position: 52% center; }
  .hero-copy { padding-bottom: 3rem; }
  .map-shell, .star-map-shell { width: min(100%, 340px); }
  .hotspot { width: 16px; height: 16px; }
}

/* v4 refinements */
.world-maps { grid-template-columns: minmax(250px, .72fr) minmax(420px, 1.28fr); max-width: 1120px; align-items: start; }
.map-shell { width: min(100%, 300px); border-radius: 4px; }
.reader-map-shell { width: 100%; min-height: 382px; border: 10px solid var(--paper); background: var(--paper); box-shadow: 0 22px 58px rgba(0,0,0,.34); overflow: hidden; }
.reader-map-shell iframe { display:block; width:100%; height:362px; border:0; background:#ddd; }
.map-link-row { text-align:center; margin:.65rem 0 0; }
.reader-map-card .map-caption { max-width: 560px; }
.review-grid { grid-template-columns: repeat(2, minmax(0,1fr)); max-width: 900px; }
.press-grid { grid-template-columns: repeat(4, 1fr); max-width: 1320px; }
.press-card { min-height: 190px; position: relative; overflow: hidden; }
.press-card::after { content:'↗'; position:absolute; right:1rem; top:.8rem; color:rgba(243,220,167,.55); font-size:1.1rem; }

/* Spellweaver: parchment ritual rather than browser form */
.spell-dialog { width:min(94vw,900px); max-height:92vh; overflow:auto; padding:0; color:#302719; background:#e7dcc2; border:1px solid #cfb276; box-shadow:0 40px 120px rgba(0,0,0,.72); }
.spell-dialog::backdrop { background:rgba(2,8,7,.86); backdrop-filter:blur(3px); }
.spell-dialog .dialog-close { background:#17342f; color:#f3dca7; border:1px solid rgba(215,182,121,.55); }
.spell-inner { position:relative; padding:clamp(2rem,6vw,4.4rem); background:
  radial-gradient(circle at 50% 0%, rgba(255,255,255,.7), transparent 34%),
  linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,.03)),
  #e7dcc2; }
.spell-inner::before { content:''; position:absolute; inset:15px; border:1px solid rgba(104,78,31,.35); pointer-events:none; }
.spell-inner .eyebrow { color:#785b29; text-align:center; }
.spell-inner h2 { text-align:center; color:#2f2a20; font-size:clamp(2.2rem,5vw,4rem); }
.spell-intro { color:#5d5140; text-align:center; max-width:650px; margin:0 auto 2.2rem; font-size:1.05rem; }
.spell-sigil { width:64px; height:64px; border-radius:50%; display:grid; place-items:center; margin:0 auto 1rem; border:1px solid #9f7e42; color:#745624; background:rgba(255,255,255,.32); box-shadow:0 0 0 8px rgba(159,126,66,.08); font-size:1.7rem; }
.spell-question { border:0!important; border-top:1px solid rgba(91,71,34,.28)!important; margin:1.6rem 0 0!important; padding:1.5rem 0 0!important; }
.spell-question legend { width:100%; color:#3a3022!important; padding:0!important; font-size:1.14rem; line-height:1.35; }
.spell-question legend span { display:inline-grid; place-items:center; width:34px; height:34px; margin-right:.65rem; border-radius:50%; background:#183b35; color:#f5e6bd; font-size:.75rem; letter-spacing:.08em; }
.spell-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; margin-top:1rem; }
.spell-option { position:relative; display:grid!important; grid-template-columns:42px 1fr; gap:.8rem; align-items:start; padding:1rem!important; color:#5a4c38!important; border:1px solid rgba(95,72,32,.26); background:rgba(255,255,255,.28); cursor:pointer; transition:.16s ease; }
.spell-option:hover { border-color:#9f7e42; background:rgba(255,255,255,.48); transform:translateY(-1px); }
.spell-option input { position:absolute; opacity:0; pointer-events:none; }
.spell-option:has(input:checked) { border-color:#775b28; background:#f4ead0; box-shadow:inset 0 0 0 2px rgba(159,126,66,.2),0 8px 24px rgba(76,54,19,.10); }
.spell-option:has(input:checked) .spell-mark { background:#183b35; color:#f4e3b7; }
.spell-mark { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; border:1px solid rgba(95,72,32,.33); color:#7b5c25; font-size:1.2rem; }
.spell-option strong { display:block; color:#33291b; font-size:1rem; letter-spacing:.04em; margin-bottom:.12rem; }
.spell-submit-row { display:flex; justify-content:center; margin-top:2rem; }
.spell-dialog .button.primary { background:#183b35; border-color:#183b35; color:#f6e8c4; min-width:190px; }
.spell-output { margin:2rem auto 0!important; max-width:680px; padding:1.4rem 1.6rem!important; border:1px solid #9f7e42!important; background:#f3e8cf!important; color:#4c402e; text-align:center; }
.spell-output strong { color:#173c35!important; display:block; font-size:1.35rem; }
.spell-output p { margin:.55rem 0 0; }

@media (max-width: 1100px) {
  .press-grid { grid-template-columns:repeat(2,1fr); }
  .world-maps { grid-template-columns:1fr; }
  .reader-map-shell { max-width:720px; margin:0 auto; }
}
@media (max-width: 700px) {
  .spell-options { grid-template-columns:1fr; }
  .review-grid, .press-grid { grid-template-columns:1fr; }
  .reader-map-shell iframe { height:330px; }
}


/* v6 mobile polish ------------------------------------------------------- */
/* Keep the complete hero/banner visible on phones instead of cropping it. */
@media (max-width: 700px) {
  .site-header {
    padding: .75rem .9rem;
  }
  .brand {
    font-size: clamp(.78rem, 4.2vw, .95rem);
    letter-spacing: .07em;
  }
  .menu-button {
    flex: 0 0 auto;
  }

  .hero {
    min-height: 0;
    display: block;
    overflow: visible;
    background: #071311;
  }
  .hero-art {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center top;
  }
  .hero-shade {
    display: none;
  }
  .hero-copy {
    max-width: none;
    padding: 1.6rem 1rem 2.4rem;
    background: linear-gradient(180deg, #0b1c18 0%, #071311 100%);
  }
  .hero-copy h1 {
    font-size: clamp(2.6rem, 13vw, 4rem);
  }
  .hero-copy > p:not(.eyebrow) {
    font-size: 1.03rem;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero-actions .button {
    width: 100%;
    text-align: center;
  }

  /* Give the World section almost the full screen width on phones. */
  .world-section {
    padding-left: .8rem;
    padding-right: .8rem;
  }
  .world-heading {
    padding-left: .2rem;
    padding-right: .2rem;
  }
  .world-maps {
    width: 100%;
    gap: 2.4rem;
  }
  .map-shell {
    width: min(86vw, 330px);
    padding: .48rem;
  }
  .reader-map-shell {
    width: 100%;
    max-width: none;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-width: 5px;
  }
  .reader-map-shell iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  .reader-map-card .map-caption,
  .map-link-row {
    padding-left: .35rem;
    padding-right: .35rem;
  }
  .world-lore {
    margin-left: .2rem;
    margin-right: .2rem;
  }
}

@media (max-width: 420px) {
  .world-section {
    padding-left: .45rem;
    padding-right: .45rem;
  }
  .reader-map-shell {
    border-width: 4px;
  }
}

/* v7 hero sizing fix ----------------------------------------------------- */
/*
   Preserve the banner's native 1558×697 aspect ratio on desktop so the
   Galwyn's Locket title is never cropped by a tall browser window.
   Below 900px, stack the full-width artwork above the hero copy.
*/
@media (min-width: 901px) {
  .hero {
    min-height: 0;
    aspect-ratio: 1558 / 697;
    display: grid;
    align-items: end;
    overflow: hidden;
  }
  .hero-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: #071311;
  }
  .hero-copy {
    padding-top: clamp(2.25rem, 5vw, 5rem);
    padding-bottom: clamp(2.25rem, 5vw, 5rem);
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
    aspect-ratio: auto;
    display: block;
    overflow: visible;
    background: #071311;
  }
  .hero-art {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center top;
  }
  .hero-shade {
    display: none;
  }
  .hero-copy {
    max-width: none;
    padding: 1.75rem clamp(1rem, 5vw, 2rem) 2.6rem;
    background: linear-gradient(180deg, #0b1c18 0%, #071311 100%);
  }
}


/* v8 section separation -------------------------------------------------- */
/* The fictional world and the real-reader Star Map are intentionally
   separate experiences. */
.arkona-layout {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(360px, 1.28fr);
  gap: clamp(2rem, 6vw, 5rem);
  max-width: 1040px;
  margin: 0 auto;
  align-items: center;
}
.arkona-map-card .map-shell {
  width: min(100%, 390px);
}
.world-lore {
  max-width: none;
  margin: 0;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Keep markers off the printed labels where possible. */
.hotspot.glorn { left: 13.5%; top: 39.5%; }
.hotspot.morolynne { left: 58%; top: 54%; }
.hotspot.fayre { left: 71%; top: 33%; }
.hotspot.pillar { left: 90%; top: 11%; }
.hotspot.mountains { left: 58%; top: 13.5%; }

.weave-section {
  background: linear-gradient(180deg, rgba(3,18,26,.78), rgba(4,20,18,.98));
  border-bottom: 1px solid var(--line);
}
.weave-heading {
  max-width: 900px;
  margin: 0 auto 2rem;
  text-align: center;
}
.standalone-reader-map {
  width: min(100%, 1080px);
  max-width: 1080px;
  min-height: 0;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border: 10px solid var(--paper);
}
.standalone-reader-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.weave-section .map-link-row {
  text-align: center;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .arkona-layout {
    grid-template-columns: 1fr;
    gap: 1.7rem;
  }
  .world-lore {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .arkona-map-card .map-shell {
    width: min(88vw, 360px);
  }
  .weave-section {
    padding-left: .55rem;
    padding-right: .55rem;
  }
  .weave-heading {
    padding-left: .45rem;
    padding-right: .45rem;
  }
  .standalone-reader-map {
    width: 100%;
    border-width: 4px;
    aspect-ratio: 16 / 10;
  }
}


/* v9 bestiary ----------------------------------------------------------- */
.portal-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.bestiary-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 20%, rgba(26, 78, 68, .18), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.018), rgba(0,0,0,.08));
}
.bestiary-heading { max-width: 930px; }
.bestiary-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .72rem;
  max-width: 1180px;
  margin: 0 auto 2rem;
}
.bestiary-tab {
  min-height: 72px;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.018);
  color: var(--gold-bright);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.bestiary-tab:hover, .bestiary-tab:focus-visible {
  border-color: rgba(243,220,167,.72);
  background: rgba(215,182,121,.085);
  transform: translateY(-1px);
  outline: none;
}
.bestiary-tab.active {
  color: #fff2cb;
  border-color: var(--gold);
  background: rgba(215,182,121,.10);
  box-shadow: 0 0 0 1px rgba(215,182,121,.15), 0 10px 28px rgba(0,0,0,.15);
}
.bestiary-detail {
  display: grid;
  grid-template-columns: minmax(210px, 310px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.1rem);
  border: 1px solid var(--line);
  background: rgba(5,19,17,.72);
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}
.bestiary-portrait {
  min-height: 250px;
  display: grid;
  place-items: center;
  padding: .5rem;
  border-right: 1px solid var(--line);
}
.bestiary-portrait img {
  width: min(100%, 280px);
  aspect-ratio: 1;
  object-fit: contain;
}
.bestiary-copy { max-width: 720px; }
.bestiary-copy h3 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin-bottom: .85rem;
}
.bestiary-copy > p:not(.eyebrow) {
  margin: 0;
  color: #ddd6c8;
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  font-style: italic;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .portal-grid.two-up { grid-template-columns: 1fr; }
  .bestiary-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bestiary-detail { grid-template-columns: 220px minmax(0,1fr); }
}
@media (max-width: 650px) {
  .bestiary-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .bestiary-tab { min-height: 60px; padding: .72rem .5rem; }
  .bestiary-detail { grid-template-columns: 1fr; text-align: center; }
  .bestiary-portrait { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 1.2rem; }
  .bestiary-portrait img { width: min(72vw, 270px); }
  .bestiary-copy { margin: 0 auto; }
}

/* v10 Spellweaver multi-lesson quiz ------------------------------------- */
.spell-progress { max-width: 680px; margin: 0 auto 1.6rem; }
.spell-progress-copy { display:flex; justify-content:space-between; gap:1rem; color:#76664e; font-size:.82rem; letter-spacing:.05em; text-transform:uppercase; }
.spell-progress-track { height:5px; margin-top:.6rem; background:rgba(94,72,34,.15); overflow:hidden; border-radius:999px; }
.spell-progress-track span { display:block; width:25%; height:100%; background:#183b35; transition:width .25s ease; }
.spell-page[hidden] { display:none!important; }
.spell-page-heading { max-width:680px; margin:0 auto 1rem; text-align:center; }
.spell-page-heading .eyebrow { margin-bottom:.35rem; }
.spell-page-heading h3 { margin:.15rem 0 .5rem; color:#302719; font-family:Georgia,'Times New Roman',serif; font-size:clamp(1.65rem,3.3vw,2.35rem); }
.spell-page-heading p { margin:0 auto; max-width:620px; color:#665946; line-height:1.55; }
.spell-nav-row { display:flex; justify-content:center; align-items:center; gap:.75rem; margin-top:2rem; }
.spell-nav-row .button { min-width:150px; }
.spell-dialog .spell-nav-row .button.ghost { background:transparent; color:#4d3e28; border-color:#9f7e42; }
.spell-page-error { max-width:640px; margin:1rem auto 0; padding:.75rem 1rem; text-align:center; color:#7a2d22; border:1px solid rgba(122,45,34,.3); background:rgba(255,255,255,.27); }
.spell-result-mark { width:62px; height:62px; display:grid; place-items:center; margin:0 auto .8rem; border-radius:50%; background:#173c35; color:#f4e3b7; font-size:1.6rem; }
.spell-secondary { padding-top:.35rem; border-top:1px solid rgba(126,94,39,.18); }
.spell-result-foot { font-size:.92rem; font-style:italic; color:#6c5d48; }
.spell-restart { margin-top:1rem; }

@media (max-width:700px) {
  .spell-dialog { width:96vw; max-height:94vh; }
  .spell-inner { padding:2.6rem 1.1rem 1.5rem; }
  .spell-inner::before { inset:8px; }
  .spell-progress-copy { font-size:.7rem; }
  .spell-question legend { font-size:1rem; }
  .spell-option { grid-template-columns:36px 1fr; padding:.85rem!important; }
  .spell-mark { width:34px; height:34px; }
  .spell-nav-row { justify-content:stretch; }
  .spell-nav-row .button { flex:1; min-width:0; padding:.85rem .75rem; }
}


/* v11 refinements ------------------------------------------------------- */
/* Three destination cards now intentionally fill the portal row. */
.portal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-card.bestiary-card {
  background:
    radial-gradient(circle at 72% 18%, rgba(215,182,121,.08), transparent 30%),
    linear-gradient(150deg, rgba(11,39,34,.96), rgba(5,19,18,.99));
}

/* Expanded field notes */
.world-lore { justify-content: flex-start; }
.lore-text { color: var(--muted); }
.lore-text p { margin: 0 0 .9rem; color: var(--muted); }
.lore-text p:last-child { margin-bottom: 0; }

/* Keep selected bestiary artwork and copy side-by-side at every size. */
.bestiary-detail { grid-template-columns: minmax(150px, 260px) minmax(0, 1fr); }
.bestiary-portrait { min-height: 190px; }
@media (max-width: 650px) {
  .bestiary-detail {
    grid-template-columns: minmax(92px, 30vw) minmax(0, 1fr);
    gap: 1rem;
    text-align: left;
    padding: 1rem;
  }
  .bestiary-portrait {
    min-height: 0;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding: .25rem .8rem .25rem 0;
  }
  .bestiary-portrait img { width: min(100%, 145px); }
  .bestiary-copy h3 { font-size: clamp(1.55rem, 7vw, 2.2rem); margin-bottom: .45rem; }
  .bestiary-copy > p:not(.eyebrow) { font-size: .96rem; line-height: 1.48; }
  .bestiary-copy .eyebrow { font-size: .62rem; }
}

/* Spellweaver progression: results only on the final lesson. */
.spell-nav-row button[hidden] { display: none !important; }
.spell-nav-row .button:disabled {
  opacity: .38;
  cursor: not-allowed;
  transform: none;
  filter: saturate(.55);
}

/* Make joining the real-world Weave an unmistakable call to action. */
.weave-section .map-link-row { margin-top: 1.5rem; }
.weave-join-button {
  padding: 1rem 1.55rem;
  font-size: .9rem;
  box-shadow: 0 10px 28px rgba(0,0,0,.24), 0 0 0 1px rgba(243,220,167,.12);
}
.weave-join-button:hover { box-shadow: 0 14px 34px rgba(0,0,0,.3), 0 0 0 1px rgba(243,220,167,.24); }

@media (max-width: 900px) {
  .portal-grid { grid-template-columns: 1fr; }
  .portal-card { min-height: 300px; }
}
