/* MYRHA v14.5 FINAL RC3 — coherent page-wide UI correction
   Applies to all public content templates EXCEPT short story pages.
   Preserve H1/H2/H3, source facts, spoilers and feature semantics. */

/* 1. Cover and home page: prevent overlapping labels and artificial clipping.
   The fixed hero height in original v14.4 was too short for its cover and CTA. */
.view-home .home-hero {height:auto!important;min-height:0!important;overflow:hidden}
.view-home .hero-layout {
 height:auto!important;min-height:clamp(650px,72svh,790px);
 padding:clamp(75px,8vw,112px) clamp(22px,5.5vw,88px) clamp(46px,5vw,70px)!important;
 grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);
 gap:clamp(35px,5vw,90px);align-items:center;
}
.view-home .hero-left,.view-home .hero-product{min-width:0}
.view-home .hero-product{width:min(100%,390px);margin:0 auto;align-self:center}
.view-home .cover-shell{transform:none;max-width:100%}
.view-home .cover-shell img{width:100%;height:auto;display:block;max-height:min(68svh,650px);object-fit:contain}
.view-home .cta-group{margin-top:clamp(24px,3vw,40px);position:relative;z-index:4}
.view-home .hero-desc{margin-top:clamp(18px,2.5vw,34px)}
.view-home .home-h1 {font-size:clamp(57px,6.5vw,95px);letter-spacing:-.043em;line-height:.98;margin:16px 0 24px}
.view-home .chapter-grid-section{padding-top:clamp(35px,4.4vw,60px)!important}
/* The homepage cards show the complete book and map artwork, not severed logos or borders. */
.view-home .chapter-art-book{background-size:auto 93%!important;background-position:center center!important;background-repeat:no-repeat}
.view-home .chapter-art-map{background-size:auto 97%!important;background-position:center center!important;background-repeat:no-repeat}
.view-home .chapter-card:has(.chapter-art-book),
.view-home .chapter-card:has(.chapter-art-map){background:#172421}
.view-home .chapter-layer{padding:clamp(19px,2vw,29px)}
.view-home .chapter-layer h2{font-size:clamp(27px,2.7vw,39px);line-height:1.15}
.view-home .chapter-layer p{font-size:clamp(13px,1vw,15px)}

/* 2. Sample: one closed-by-default, native keyboard-operable navigation. */
.view-sample .sample-chapter-picker{
 max-width:450px;margin:26px 0 16px;border:1px solid rgba(160,192,174,.46);
 border-radius:3px;background:rgba(10,28,27,.79);color:#e8f1ea;
}
.view-sample .sample-chapter-picker>summary{
 display:flex;align-items:center;justify-content:space-between;gap:18px;
 min-height:52px;padding:13px 19px;cursor:pointer;list-style:none;
 font:600 14px/1.45 var(--sans);letter-spacing:.025em;
}
.view-sample .sample-chapter-picker>summary::-webkit-details-marker{display:none}
.view-sample .sample-chapter-picker>summary::after{content:'⌄';font:26px/1 var(--sans);color:#7ce0d2;transition:transform .16s ease}
.view-sample .sample-chapter-picker[open]>summary::after{transform:rotate(180deg)}
.view-sample .sample-chapter-picker .sample-nav{
 display:flex;flex-direction:column;gap:0;margin:0;padding:6px 10px 10px;
 border-top:1px solid rgba(178,206,191,.24);border-bottom:0;
}
.view-sample .sample-chapter-picker .sample-nav a{
 min-height:44px;display:flex;align-items:center;padding:12px;
 font:500 15px/1.5 var(--sans);letter-spacing:.015em;color:#c5eee0;
 border-radius:2px;
}
.view-sample .sample-chapter-picker .sample-nav a:hover,
.view-sample .sample-chapter-picker .sample-nav a:focus-visible{background:#1c413a;color:#fff}
.view-sample .sample-toolrow{padding:12px 0 15px;gap:12px}
.view-sample .sample-chapter{padding:clamp(39px,5vw,67px) 0 clamp(55px,6vw,75px)}
.view-sample .sample-container .sample-chapter h2{margin-bottom:clamp(24px,4vw,45px)}
.view-sample .sample-novel-text{font-size:clamp(17px,1.33vw,20px);line-height:1.86;max-width:730px}
.view-sample .reader-compass-inner>.reader-chapter-links,
.view-sample .reader-compass-inner>.reader-privacy{display:none!important}
@media(min-width:980px){
 .view-sample .reader-layout{grid-template-columns:minmax(0,1fr) clamp(210px,18vw,245px);gap:clamp(28px,4vw,55px)}
 .view-sample .reader-gauge{height:128px;width:128px;margin:14px auto 19px}
 .view-sample .reader-ring-number{font-size:2.5rem}
 .view-sample .reader-compass-inner{padding:19px 18px}
 .view-sample .reader-current{padding:13px 0}
 .view-sample .reader-current small{font-size:11px;letter-spacing:.045em;color:#b6c7ba}
 .view-sample .reader-current strong{font-size:1.15rem}
 .view-sample .reader-progress-label{display:none}
}

/* 3. Shared content hygiene. Quiet labels, less redundant card chrome.
   Status labels (in development, game concept, spoiler) remain visible. */
.myrha-site :where(.page-eyebrow,.section-eyebrow){letter-spacing:.075em;font-weight:600}
.view-press .editorial-card>.page-eyebrow,
.view-faq .editorial-card>.page-eyebrow,
.view-regions .region-directory-copy .small-caps,
.view-lore .lore-card .lore-no{display:none!important}
.view-press .editorial-card h2,.view-faq .editorial-card h2{margin-top:4px}
.view-regions .region-directory-card{min-height:clamp(300px,30vw,405px)}
.view-regions .region-directory-copy{padding:clamp(21px,2.4vw,32px)}
.view-regions .region-directory-copy h2{font-size:clamp(28px,3vw,42px)}
.view-regions .region-data-count{font-size:12px;letter-spacing:0;color:#bed4c7}
.view-lore .lore-cards .lore-card{min-height:0}
.view-lore .lore-card h2{margin-top:12px}
.view-entry .entry-save-note:empty{display:none}
.view-entry .entry-save-note{font-size:12px;line-height:1.5;letter-spacing:0}
.view-journal .journal-heading,.view-journal .journal-intro{min-height:0}
.view-journal .journal-intro{padding-bottom:clamp(32px,4vw,54px)}
.view-contact .editorial-page,.view-press .editorial-page,
.view-faq .editorial-page{min-height:0;padding-top:clamp(105px,11vw,145px);padding-bottom:clamp(46px,6vw,82px)}
.view-press .editorial-grid,.view-faq .editorial-grid{margin-top:clamp(24px,3vw,40px)}
.view-book .book-art-frame img{object-fit:contain!important;background:#0b1517}
.view-world .world-map-tag{display:none}
.myrha-story-bridge .page-eyebrow{display:none}
/* Keep editorial prose, avoid huge dead gutters in region and codex detail. */
.view-region .myrha-chronicle-intro,
.view-region .myrha-story-layout{margin-top:clamp(18px,3vw,32px)}
.view-region .myrha-story-section{gap:clamp(14px,2vw,28px)}
.view-region .myrha-story-section h3{font-size:clamp(26px,3.2vw,40px)}
.view-note .myrha-essay-related,.view-entry .entry-layout{padding-top:clamp(32px,4vw,65px);padding-bottom:clamp(42px,5vw,78px)}
/* Consistent painting rules: full poster, map and emblem; crop only landscapes. */
:where(.view-book,.view-press,.view-author) img[src*='cover-'],
:where(.view-world,.view-atlas,.view-press) img[src*='map.webp']{object-fit:contain;object-position:center}
:where(.view-lore,.view-entry,.view-codex) img[src*='dragon-emblem']{object-fit:contain;object-position:center}
.view-journal .myrha-fieldnote-card>img{aspect-ratio:16/9!important;object-fit:cover!important;height:auto!important}

@media(max-width:1020px){
 .view-home .hero-layout{grid-template-columns:minmax(0,1.15fr) minmax(245px,.85fr);gap:27px}
 .view-home .home-h1{font-size:clamp(54px,7vw,75px)}
}
@media(max-width:760px){
 .view-home .hero-layout{display:flex;flex-direction:column;align-items:flex-start;min-height:0!important;
   padding:clamp(102px,15vw,122px) 6vw 44px!important;gap:34px}
 .view-home .home-h1{font-size:clamp(49px,11vw,70px);line-height:1.04}
 .view-home .hero-product{width:min(63vw,285px);max-width:100%;margin:0 auto;align-self:center}
 .view-home .cover-shell img{max-height:none}
 .view-home .chapter-card{min-height:clamp(265px,76vw,365px)}
 .view-sample .sample-chapter-picker{max-width:100%}
 .view-sample .sample-toolrow{gap:7px}
 .view-sample .sample-novel-text{font-size:17px;line-height:1.77}
 .view-journal .journal-intro{padding-top:clamp(102px,15vw,128px)}
 .view-regions .region-directory-card{min-height:310px}
 .view-contact .editorial-page,.view-press .editorial-page,.view-faq .editorial-page{padding-top:109px}
}
@media(max-width:480px){
 .view-home .home-h1{font-size:clamp(45px,11.4vw,57px)}
 .view-home .hero-product{width:min(67vw,260px)}
 .view-home .cta-group{width:100%}
 .view-home .btn{white-space:normal;min-height:48px;gap:10px}
 .view-sample .sample-chapter-picker>summary{padding:13px 14px}
 .view-sample .reader-gauge{width:60px;height:60px}
 .view-sample .reader-ring-number{font-size:1.19rem}
 .view-regions .region-directory-card{min-height:290px}
}
@media(prefers-reduced-motion:reduce){
 .view-sample .sample-chapter-picker>summary::after{transition:none}
}
/* Narrow German Codex heading: do not push the viewport sideways. */
@media(max-width:480px){
 .view-codex .codex-hero-inner h1{font-size:clamp(34px,9.4vw,49px);overflow-wrap:anywhere;hyphens:auto}
}
@media(max-width:480px){
 .view-codex .codex-policy h2{font-size:clamp(29px,8vw,42px);overflow-wrap:anywhere;hyphens:auto}
}

/* Journal: a second large banner is not another hero. Retain semantic H2. */
.view-journal .myrha-fieldnotes-heading h2{font-size:clamp(29px,4.2vw,49px);line-height:1.12;margin:10px 0 19px}
.view-journal .myrha-fieldnotes-heading>.page-eyebrow{display:none}
.view-journal .myrha-fieldnotes-heading{margin-bottom:clamp(21px,2.6vw,32px)}
.view-note .myrha-essay-disclaimer{font-size:12px;color:#94aba3}

/* World atlas: quiet, useful controls without decorative overlays competing
   with mapped locations. On narrow devices bring the map into view sooner. */
.view-atlas .map-corner-tag{display:none!important}
.view-atlas .atlas-map-note{
  bottom:18px;right:auto;left:15px;max-width:min(45%,315px);
  line-height:1.4;background:rgba(5,19,21,.94);
}
.view-atlas .atlas-scroll-continue{right:15px;bottom:16px;max-width:52%;line-height:1.4}
.view-atlas .atlas-search-block:has(#atlas-search:placeholder-shown) .atlas-search-clear{display:none}
/* Region hotspots should be sized by their diamonds, not by invisible 100px labels. */
.view-atlas .map-pin{
  width:38px;min-width:38px;height:38px;min-height:38px;
  display:flex;justify-content:center;align-items:center;flex-direction:column;
  padding:0;overflow:visible;
}
.view-atlas .map-pin .pin-core{display:block;width:12px;height:12px;flex:0 0 12px}
.view-atlas .map-pin small{
  position:absolute;left:50%;top:32px;transform:translateX(-50%);
  pointer-events:none;white-space:nowrap;
}
/* The lake region has its own region pin and a searchable place entry.
   Showing both overlapping hotspots at mobile size creates accidental taps. */
.view-atlas .atlas-place-marker[data-place-id="heartmere"]{display:none}
.view-atlas .atlas-map-canvas:focus-within{outline-color:#72d9cb}
@media(max-width:800px){
  .view-atlas .atlas-side>.page-eyebrow{display:none}
  .view-atlas .atlas-side>.atlas-title{font-size:clamp(36px,9vw,49px);margin-top:31px;margin-bottom:8px}
  .view-atlas .atlas-side>.atlas-intro{font-size:14px;line-height:1.5;margin-bottom:8px}
  .view-atlas .atlas-side>.atlas-layers{margin:8px 5vw 12px}
  .view-atlas .atlas-guided-shortcut{display:none}
  .view-atlas .atlas-map-note{left:11px;right:11px;bottom:75px;max-width:calc(100% - 22px);font-size:10px}
  .view-atlas .atlas-scroll-continue{left:11px;right:11px;bottom:13px;max-width:none;justify-content:center;min-height:44px}
}

/* The Codex is a browseable reference, not two consecutive giant landing heroes. */
.view-codex .codex-hero{min-height:0!important}
.view-codex .codex-hero-inner{padding-top:clamp(95px,11vw,145px);padding-bottom:clamp(38px,5vw,70px)}
.view-codex .codex-browse{padding-top:clamp(32px,5vw,65px)}
.view-codex .codex-heading h2{font-size:clamp(29px,4vw,49px);line-height:1.12}
.view-codex .codex-heading .page-eyebrow{display:none}
.view-game-atlas .myrha-visual-heading .page-eyebrow{display:none}
.view-game-atlas .myrha-visual-heading h2{font-size:clamp(28px,3.8vw,47px);line-height:1.13}
@media(max-width:760px){
  .view-codex .codex-hero-inner{padding-top:clamp(71px,13vw,100px);padding-bottom:40px}
  .view-codex .codex-browse{padding-top:35px}
  .view-game-atlas .myrha-visual-atlas{padding-top:36px}
}
@media(max-width:760px){.view-codex .codex-hero-art{opacity:.12!important;pointer-events:none}}
