/* Shared rhythm for the journal, merchant, evolution details and tower sheet.
   This file is loaded last so the established Waldgrün and rarity palettes win. */
body.framed-ui.wald-design #reward-popup[open]:not(.upgrade-detail-popup){
  width:min(358px,calc(100vw - 32px));
  max-width:358px;
  max-height:calc(100dvh - 24px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
body.framed-ui.wald-design #reward-popup:not(.upgrade-detail-popup)>.popup-head{flex:none}
body.framed-ui.wald-design #reward-popup:not(.upgrade-detail-popup)>.popup-content{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
body.framed-ui.wald-design #reward-popup:not(.upgrade-detail-popup)>.popup-actions{flex:none}
body.framed-ui.wald-design #reward-popup .watch-journal{padding-right:2px}
body.framed-ui.wald-design #reward-popup>.popup-head:has(+.popup-content .watch-journal) h2,
body.framed-ui.wald-design #reward-popup>.popup-head:has(+.popup-content .book-hero-detail) h2,
body.framed-ui.wald-design #reward-popup>.popup-head:has(+.popup-content>.reward-detail-emblem) h2{
  font:700 21px/1.16 'Courier New',monospace;
  letter-spacing:-.6px;
  overflow-wrap:anywhere;
}
body.framed-ui.wald-design #reward-popup:has(>.popup-content .watch-journal)>.popup-head{min-height:60px;padding:12px 12px 10px 14px}
body.framed-ui.wald-design #reward-popup .watch-journal .journal-heading{display:none}
body.framed-ui.wald-design #reward-popup .book-content{padding:10px}
body.framed-ui.wald-design #reward-popup .book-tabs{margin-bottom:12px}
body.framed-ui.wald-design #reward-popup .book-grid{gap:8px}
body.framed-ui.wald-design #reward-popup .book-grid :is(button,.book-locked){min-height:132px}
body.framed-ui.wald-design #reward-popup .book-grid.book-heroes .book-hero{min-height:164px}
body.framed-ui.wald-design #reward-popup .journal-footer{display:none}

/* Detail views keep the same header, content and action order. */
body.framed-ui.wald-design #reward-popup:has(>.popup-content>.book-hero-detail)>.popup-content,
body.framed-ui.wald-design #reward-popup:has(>.popup-content>.reward-detail-emblem)>.popup-content{padding:12px 14px}
body.framed-ui.wald-design #reward-popup .book-hero-detail{gap:11px}
body.framed-ui.wald-design #reward-popup .book-hero-banner{min-height:142px;padding:8px}
body.framed-ui.wald-design #reward-popup .book-hero-detail .book-hero-portrait{height:126px}
body.framed-ui.wald-design #reward-popup .book-hero-detail section{padding:10px 12px}
body.framed-ui.wald-design #reward-popup .book-hero-detail h3{margin:0 0 6px}
body.framed-ui.wald-design #reward-popup:has(>.popup-content>.reward-detail-emblem)>.popup-content>.reward-detail-emblem{margin:8px auto 12px;width:76px;height:76px}
body.framed-ui.wald-design #reward-popup:has(>.popup-content>.reward-detail-emblem)>.popup-content>p{margin:0 0 12px;line-height:1.5}
body.framed-ui.wald-design #reward-popup>.popup-actions>#reward-back{width:100%;min-height:46px;margin-top:0}

/* Evolution detail inherits its hero accent and keeps its confirmation reachable. */
body.framed-ui.wald-design #reward-popup.upgrade-detail-popup:has(.evolution-detail-card){
  width:min(358px,calc(100vw - 32px));
  max-height:calc(100dvh - 24px);
  padding:8px;
}
body.framed-ui.wald-design .evolution-detail-card{padding:0 12px 12px}
body.framed-ui.wald-design .evolution-detail-card .upgrade-detail-head{padding:12px 0 10px}
body.framed-ui.wald-design .evolution-detail-card .upgrade-detail-head>small{line-height:1.35}
body.framed-ui.wald-design .evolution-detail-card .upgrade-detail-emblem{width:68px;height:68px;margin:12px auto 8px}
body.framed-ui.wald-design .evolution-detail-card .upgrade-detail-emblem svg{width:48px;height:48px}
body.framed-ui.wald-design .evolution-detail-card .upgrade-detail-head h2{margin-top:10px}
body.framed-ui.wald-design .evolution-detail-card .upgrade-detail-description{margin:12px 0;line-height:1.48}
body.framed-ui.wald-design .evolution-detail-card .evolution-comparison{margin:10px 0;padding:10px}
body.framed-ui.wald-design .evolution-detail-card .upgrade-stack-limit{margin-bottom:12px;padding:9px 10px}
body.framed-ui.wald-design .evolution-detail-card .upgrade-detail-actions{gap:8px;padding-top:11px}
body.framed-ui.wald-design .evolution-detail-card .upgrade-detail-actions button{min-height:46px}

/* Merchant offers use the same compact information and action rhythm. */
body.framed-ui.wald-design #modal.merchant-selection .modal{display:flex;flex-direction:column;max-height:calc(100dvh - 24px);overflow:hidden}
body.framed-ui.wald-design #modal.merchant-selection #modal-title{flex:none;padding:14px 14px 12px}
body.framed-ui.wald-design #modal.merchant-selection #modal-copy{flex:none;padding:10px 14px 0;margin:0 0 10px;font-size:13px;line-height:1.4}
body.framed-ui.wald-design #modal.merchant-selection #choices{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;gap:9px;padding:0 12px 12px}
body.framed-ui.wald-design #modal.merchant-selection .merchant-wagon{margin-bottom:2px}
body.framed-ui.wald-design #modal.merchant-selection .merchant-wagon>svg{height:88px;object-fit:cover}
body.framed-ui.wald-design #modal.merchant-selection .merchant-shelves{gap:9px}
body.framed-ui.wald-design #modal.merchant-selection .merchant-ware{grid-template-columns:38px minmax(0,1fr);gap:9px;padding:9px}
body.framed-ui.wald-design #modal.merchant-selection .merchant-icon svg{width:36px;height:36px}
body.framed-ui.wald-design #modal.merchant-selection .merchant-ware h3{margin:0 0 5px;font:700 14px/1.25 'Courier New',monospace}
body.framed-ui.wald-design #modal.merchant-selection .merchant-ware p{margin:0 0 8px;font-size:12px;line-height:1.4}
body.framed-ui.wald-design #modal.merchant-selection .merchant-ware button{min-height:44px;padding:7px 9px;font-size:12px}
body.framed-ui.wald-design #modal.merchant-selection #merchant-leave{position:sticky;bottom:0;z-index:2;width:100%;min-height:46px;margin:0;background:#e7ca83}
body.framed-ui.wald-design #modal.merchant-selection .merchant-note{display:block;padding:2px 2px 0;font-size:10px;line-height:1.4;color:#60704f}

/* Tower values align to the same compact labels and quiet separators. */
body.framed-ui.wald-design #inspector .tower-content{padding:10px 12px 12px}
body.framed-ui.wald-design #inspector .radius-legend{gap:5px 9px;margin-bottom:8px;font-size:10px}
body.framed-ui.wald-design #inspector .tower-description{margin:0 0 9px;font-size:12px;line-height:1.4}
body.framed-ui.wald-design #inspector .target-priority-label{margin-bottom:9px;font-size:11px}
body.framed-ui.wald-design #inspector .target-priority-label select{min-height:40px;font-size:12px}
body.framed-ui.wald-design #inspector .tower-stats>div{padding:7px 2px}
body.framed-ui.wald-design #inspector .tower-stats strong{font-size:19px}
body.framed-ui.wald-design #inspector .tower-stats span{font-size:9px}
body.framed-ui.wald-design #inspector .compact-effect{margin:8px 0 0;font-size:11px;line-height:1.4}
body.framed-ui.wald-design #inspector .tower-section-heading{margin:10px 0 7px}
body.framed-ui.wald-design #inspector .tower-section-heading h4{font:700 12px/1.3 'Courier New',monospace}

@media(max-width:370px){
  body.framed-ui.wald-design #reward-popup[open]:not(.upgrade-detail-popup){width:calc(100vw - 20px);max-height:calc(100dvh - 16px)}
  body.framed-ui.wald-design #reward-popup>.popup-head:has(+.popup-content .watch-journal) h2,
  body.framed-ui.wald-design #reward-popup>.popup-head:has(+.popup-content .book-hero-detail) h2,
  body.framed-ui.wald-design #reward-popup>.popup-head:has(+.popup-content>.reward-detail-emblem) h2{font-size:19px}
  body.framed-ui.wald-design #modal.merchant-selection .modal{max-height:calc(100dvh - 16px)}
  body.framed-ui.wald-design #modal.merchant-selection #choices{padding-right:9px;padding-left:9px}
  body.framed-ui.wald-design #modal.merchant-selection .merchant-ware{grid-template-columns:32px minmax(0,1fr);gap:7px;padding:8px}
  body.framed-ui.wald-design #modal.merchant-selection .merchant-icon svg{width:30px;height:30px}
  body.framed-ui.wald-design #inspector .tower-menu-head{grid-template-columns:42px minmax(0,1fr) 27px 40px;gap:6px;padding:10px 8px;min-height:78px}
  body.framed-ui.wald-design #inspector .tower-menu-head h3{font-size:14px}
  body.framed-ui.wald-design #inspector .close-inspector{width:40px;min-height:44px}
}
@media(prefers-reduced-motion:reduce){
  body.framed-ui.wald-design #reward-popup *,body.framed-ui.wald-design #modal.merchant-selection *{scroll-behavior:auto!important;animation:none!important;transition:none!important}
}

/* Dämmerwacht's shared materials: forest wood, parchment and a restrained brass edge. */
body.wald-design{
 --dw-forest:#294b40;--dw-paper:#f1e7c9;--dw-ink:#294b40;
 --dw-brass:#b49a62;--dw-edge:#879668;--dw-muted:#64754f;
 --dw-frame:2px;--dw-space:12px;
}
body.framed-ui.wald-design :is(#reward-popup,#run-info,.game-menu>.menu-panel,#inspector,.encounter-arrival){
 border:var(--dw-frame) solid var(--dw-edge);border-image:none;border-radius:0;
 box-shadow:0 0 0 3px var(--dw-paper),0 8px 24px #102c2355;
}
body.framed-ui.wald-design :is(#reward-popup,#run-info,.game-menu,.encounter-arrival)::backdrop{background:#0d281ecc}
body.framed-ui.wald-design :is(.popup-head,.menu-heading,.tower-menu-head){padding:12px;gap:10px;border-bottom:2px solid var(--dw-brass)}
body.framed-ui.wald-design :is(.popup-head,.menu-heading,.tower-menu-head) :is(h2,h3){line-height:1.2;letter-spacing:-.5px}
body.framed-ui.wald-design :is(.popup-actions,.upgrade-detail-actions){gap:8px;padding:12px;border-top:1px solid var(--dw-brass)}
body.framed-ui.wald-design :is(.popup-actions,.upgrade-detail-actions,.merchant-ware,.run-end-actions) button,
body.framed-ui.wald-design :is(#merchant-leave,#reward-back,#choose-evolution){
 min-height:46px;border:2px solid var(--rarity-line,var(--dw-edge));border-image:none;border-radius:0;
 box-shadow:0 2px 0 #294b4033;padding:10px 12px;font-weight:700;line-height:1.25;touch-action:manipulation;
}
body.framed-ui.wald-design :is(.popup-head,.menu-heading,.tower-menu-head) :is(.reward-close,#close-run-info,#close-menu,.close-inspector){
 display:grid;place-items:center;flex:none;width:44px;height:44px;min-height:44px;padding:0;
 border:2px solid var(--dw-brass);border-image:none;border-radius:0;box-shadow:0 2px 0 #102c2344;
}
body.framed-ui.wald-design button:focus-visible,body.framed-ui.wald-design summary:focus-visible{outline:3px solid #dcaf54;outline-offset:3px}
body.framed-ui.wald-design :is(.popup-actions,.upgrade-detail-actions,.merchant-ware,.run-end-actions) button:active:not(:disabled){transform:translateY(1px);box-shadow:none}
body.framed-ui.wald-design .effect-value{color:inherit;font-weight:700;white-space:nowrap}
body.framed-ui.wald-design :is(.book-hero-detail p,.run-hero-ability p,.tower-description,.upgrade-detail-description){font-size:14px;line-height:1.5;text-wrap:pretty}
body.framed-ui.wald-design .book-hero-detail section{border:0;border-left:3px solid var(--hero-accent,var(--dw-edge));background:#fff8e440}
body.framed-ui.wald-design .book-hero-banner{border:2px solid var(--hero-accent,var(--dw-edge));box-shadow:none;background:var(--hero-field,var(--dw-forest));overflow:hidden}
body.framed-ui.wald-design :is(.book-hero-portrait,.summary-hero):not(.hero-silhouette){object-fit:contain;filter:drop-shadow(2px 3px 0 #122d2344)}
body.framed-ui.wald-design #menu-hero>img{padding:8px;background:var(--dw-forest);border:2px solid var(--dw-edge);object-fit:contain}
body.framed-ui.wald-design :is(.encounter-scene,.merchant-wagon)>svg{border:2px solid var(--dw-edge);box-sizing:border-box}
body.framed-ui.wald-design #modal.merchant-selection .merchant-wagon>svg{height:auto;max-height:140px;aspect-ratio:16/9}
body.framed-ui.wald-design .merchant-purse{border:0;border-top:1px solid var(--dw-edge);font-weight:700}
body.framed-ui.wald-design .run-hero-ability h3 svg{width:24px;height:24px;vertical-align:middle;margin-right:7px}
.ability-state{margin-top:10px;padding:10px 12px;border:1px solid var(--dw-edge,#879668);background:#e4ddbf;color:#294b40;font-size:12px}
.ability-state[data-state="ready"]{border-color:#66834e;background:#dae5bc}
.ability-state[data-state="active"]{border-color:#b49a62;background:#f0dfaa}
.ability-state>span{font-weight:700}
.ability-meter{height:4px;margin-top:7px;background:#294b4022}
.ability-meter i{display:block;height:100%;background:#66834e}
.ability-state[data-state="active"] .ability-meter i{background:#ac8138}
body.framed-ui.wald-design .run-complete .modal{display:flex;flex-direction:column;max-height:calc(100dvh - 24px);overflow:hidden}
body.framed-ui.wald-design .run-complete #modal-title{flex:none;font-size:22px;line-height:1.2}
body.framed-ui.wald-design .run-complete #modal-copy{flex:none;font-size:13px;line-height:1.4;margin:10px 14px}
body.framed-ui.wald-design .run-complete #choices{min-height:0;flex:1;padding:0 12px 12px;gap:10px}
body.framed-ui.wald-design .run-complete .summary-scene{height:190px;border:2px solid var(--dw-edge);box-shadow:none}
body.framed-ui.wald-design .run-complete .summary-hero{height:145px;bottom:40px;max-width:70%}
body.framed-ui.wald-design .run-complete .summary-scene figcaption{padding:7px;gap:2px}
body.framed-ui.wald-design .run-complete .summary-grid{margin:10px 0;gap:0}
body.framed-ui.wald-design .run-complete .summary-grid>div{padding:8px}
body.framed-ui.wald-design .run-complete .summary-grid strong{font-size:23px}
body.framed-ui.wald-design .run-complete :is(.run-end-details,.run-summary){border:0;border-top:1px solid var(--dw-edge);padding:0;margin:0}
body.framed-ui.wald-design .run-complete summary{padding:12px 0;font-weight:700;font-size:13px;cursor:pointer;min-height:44px;box-sizing:border-box}
body.framed-ui.wald-design .run-complete .record-banner{margin:8px 0;padding:9px 12px;border-left:3px solid var(--dw-brass)}
body.framed-ui.wald-design .run-complete .summary-new-heroes{padding:10px;background:#dae5bc;border-left:3px solid #66834e}
body.framed-ui.wald-design .run-complete .summary-new-heroes h3{margin:0 0 6px;padding:0;border:0}
body.framed-ui.wald-design .run-end-actions{position:sticky;bottom:-12px;background:var(--dw-paper);padding:10px 0 12px;z-index:3}
body.framed-ui.wald-design #again{width:100%;background:var(--dw-forest);color:var(--dw-paper);border-color:var(--dw-brass)}
@media(max-height:620px){body.framed-ui.wald-design .run-complete .summary-scene{height:145px}body.framed-ui.wald-design .run-complete .summary-hero{height:108px}body.framed-ui.wald-design .run-complete #modal-title{font-size:19px}}
/* Dialog entrances are started once on opening by menu-design.js (140 ms opacity). */
/* Use each card's existing rarity/hero palette in the shared frame system. */
body.framed-ui.wald-design #reward-popup:is(.rarity-common,.rarity-rare,.rarity-legendary){border-width:2px;border-color:var(--card-edge);box-shadow:0 0 0 3px var(--card-paper),0 8px 24px #102c2355}
body.framed-ui.wald-design #reward-popup.rarity-legendary{box-shadow:0 0 0 3px var(--card-paper),0 0 18px #a476c744,0 8px 24px #102c2355}
body.framed-ui.wald-design #reward-popup :is(.popup-actions,.upgrade-detail-actions) button{border:2px solid var(--card-edge,var(--dw-edge));border-image:none;box-shadow:0 2px 0 #294b4033;border-radius:0}
body.framed-ui.wald-design #reward-popup .upgrade-detail-actions .primary{background:var(--card-head,var(--dw-forest));color:#fff1d0}
body.framed-ui.wald-design #reward-popup .popup-head .reward-close{border:2px solid var(--card-inset,var(--dw-brass));border-image:none;box-shadow:0 2px 0 #102c2344}
body.framed-ui.wald-design #run-info{background:var(--dw-paper)}
body.framed-ui.wald-design #run-info .menu-heading{background:var(--dw-forest);color:var(--dw-paper)}
body.framed-ui.wald-design #run-info .menu-content{background:var(--dw-paper)}
/* Large menu portraits share the illustrated woodland used by the guardian scenes. */
body.framed-ui.wald-design .book-hero-banner,
body.framed-ui.wald-design .run-complete .summary-scene{
 background-color:#294b40;background-image:linear-gradient(#173c2c70,#173c2c70),url('assets/npcs/gold-keeper-background-v1.png');
 background-size:cover;background-position:center;
}
body.framed-ui.wald-design .run-complete .summary-landscape{display:none}
body.framed-ui.wald-design .run-complete .summary-frost{background-image:linear-gradient(#bfd9e270,#264a5c50),url('assets/npcs/gold-keeper-background-v1.png')}
body.framed-ui.wald-design .run-complete .summary-moor{background-image:linear-gradient(#849c9470,#243e3860),url('assets/npcs/gold-keeper-background-v1.png')}
body.framed-ui.wald-design .run-complete :is(.summary-ash,.summary-autumn){background-image:linear-gradient(#99633b50,#4c372960),url('assets/npcs/gold-keeper-background-v1.png')}
body.framed-ui.wald-design #hero-card-detail .hc-actions button{border:2px solid var(--hero-accent,#b49a62);border-image:none;border-radius:0;box-shadow:0 2px 0 #294b4033;min-height:46px}

/* A layout declaration must never override the native closed-dialog state. */
body.framed-ui.wald-design dialog:not([open]){display:none!important}
/* Read the shot, area and continuing effect separately; synergy rows explain this tower. */
body.framed-ui.wald-design #inspector .tower-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
body.framed-ui.wald-design #inspector .tower-damage-sections>section{padding:10px 0;border-bottom:1px solid #c5c6a1}
body.framed-ui.wald-design #inspector .tower-damage-sections .tower-section-heading{margin:0 0 5px}
body.framed-ui.wald-design #inspector .tower-damage-sections p{margin:4px 0;font-size:12px;line-height:1.45;color:#294b40}
body.framed-ui.wald-design #inspector .tower-value-note{display:block;margin-top:9px;font-size:10px;line-height:1.4;color:#64754f}
body.framed-ui.wald-design #inspector .tower-synergy-details>.tower-section-heading{display:block;margin-top:14px}
body.framed-ui.wald-design #inspector .tower-synergy-details>.tower-section-heading small{display:block;margin-top:5px;font-size:10px;line-height:1.4}
body.framed-ui.wald-design #inspector .active-synergies{display:grid;grid-template-columns:1fr;border:0;padding:0;margin-top:8px;gap:7px}
body.framed-ui.wald-design #inspector .active-synergies button{display:grid;grid-template-columns:28px minmax(0,1fr) 10px;gap:8px;width:100%;height:auto;min-height:52px;padding:9px;text-align:left;border:1px solid #97ab7b;background:#e0e7c7}
body.framed-ui.wald-design #inspector .active-synergies svg{width:28px;height:28px}
body.framed-ui.wald-design #inspector .active-synergies button>span{min-width:0}
body.framed-ui.wald-design #inspector .active-synergies strong{display:block;font-size:12px;line-height:1.3}
body.framed-ui.wald-design #inspector .active-synergies strong small{font-weight:400;color:#64754f}
body.framed-ui.wald-design #inspector .active-synergies button>span>span{display:block;font-size:11px;line-height:1.4;margin-top:4px}

/* Horizontal upgrade gestures keep vertical page scrolling available. */
body.framed-ui.wald-design .reward-list-item.swipe-choice{touch-action:pan-y pinch-zoom;transition:translate 150ms ease-out}
body.framed-ui.wald-design .reward-list-item.swiping{transition:none}
body.framed-ui.wald-design .reward-list-item.swipe-ready{box-shadow:0 0 0 2px var(--card-edge),0 0 16px color-mix(in srgb,var(--card-edge) 35%,transparent)}
@media(prefers-reduced-motion:reduce){body.framed-ui.wald-design .reward-list-item.swipe-choice{transition:none}}

body.framed-ui.wald-design .upgrade-list-selection #choices>.choice-block{overflow:hidden}

body.framed-ui.wald-design .upgrade-list-selection .choice-block.swipe-reveal{position:relative;isolation:isolate;background:#3b5c45}
body.framed-ui.wald-design .upgrade-swipe-underlay{position:absolute;inset:0;display:flex;align-items:center;width:var(--swipe-distance,0px);justify-content:center;color:#d8e5ca;pointer-events:none;opacity:0;transition:opacity 150ms ease-out}
body.framed-ui.wald-design .upgrade-swipe-underlay svg{width:36px;height:36px;min-width:36px;transition:scale 120ms ease-out}
body.framed-ui.wald-design .swipe-dragging .upgrade-swipe-underlay{opacity:.65}
body.framed-ui.wald-design .swipe-reveal.swipe-ready{background:#294f36}
body.framed-ui.wald-design .swipe-reveal.swipe-ready .upgrade-swipe-underlay{opacity:1;color:#fff0b9}
body.framed-ui.wald-design .swipe-reveal.swipe-ready .upgrade-swipe-underlay svg{scale:1.15}
@media(prefers-reduced-motion:reduce){body.framed-ui.wald-design .upgrade-swipe-underlay,body.framed-ui.wald-design .upgrade-swipe-underlay svg{transition:none}}

/* Hero accents stay on the seal and border; descriptions use ink on parchment. */
body.framed-ui.wald-design .evolution-list-item small{color:var(--card-ink,#294b40)}

/* Category describes the effect; the existing palette still describes rarity. */
body.framed-ui.wald-design .upgrade-list-selection .reward-list-item{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:24px minmax(0,1fr);gap:0;padding:0;height:104px;align-content:stretch;align-items:stretch}
body.framed-ui.wald-design .upgrade-category-line{grid-column:1;grid-row:1;display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;height:100%;margin:0;padding:3px 8px;background:#ffffff45;border-bottom:1px solid color-mix(in srgb,var(--card-edge) 40%,transparent);min-width:0}
body.framed-ui.wald-design .upgrade-category{display:inline-flex;align-items:center;gap:4px;color:#294b40;font:700 11px/1.2 'Trebuchet MS',sans-serif;margin:0;min-width:0}
body.framed-ui.wald-design .upgrade-category>span{font:inherit;color:inherit;display:block;margin:0;white-space:nowrap}
body.framed-ui.wald-design .upgrade-category svg{width:14px;height:14px;flex:none}
body.framed-ui.wald-design .upgrade-category-rarity{display:flex;align-items:center;gap:6px;margin:0;flex:none}
body.framed-ui.wald-design .upgrade-category-line .rarity-badge{display:block;color:var(--card-ink);font-size:10px;line-height:1.2;background:none;border:0;margin:0;padding:0;white-space:nowrap}
body.framed-ui.wald-design .upgrade-category-line .rarity-badge::before{content:'◆ ';color:var(--card-edge)}
body.framed-ui.wald-design .upgrade-category-line .evolution-level{font-size:10px;color:var(--card-ink);margin:0}
body.framed-ui.wald-design .reward-list-content{grid-column:1;grid-row:2;display:grid;grid-template-columns:36px minmax(0,1fr) 10px;align-items:center;gap:9px;width:100%;min-height:0;height:100%;margin:0;padding:7px 8px;overflow:hidden}
body.framed-ui.wald-design .reward-list-content .reward-emblem{width:36px;height:36px}
body.framed-ui.wald-design .reward-list-content .reward-emblem svg{width:36px;height:36px}
body.framed-ui.wald-design #reward-popup .upgrade-detail-head>.upgrade-category{display:flex;justify-content:center;margin:0 0 9px}
@media(max-width:360px){body.framed-ui.wald-design .upgrade-category{font-size:10px}body.framed-ui.wald-design .reward-list-content{grid-template-columns:32px minmax(0,1fr);gap:7px;padding:5px 7px}body.framed-ui.wald-design .reward-list-content .reward-emblem,body.framed-ui.wald-design .reward-list-content .reward-emblem svg{width:32px;height:32px}}
@media(max-height:700px){body.framed-ui.wald-design .upgrade-list-selection .reward-list-item{height:88px;grid-template-rows:22px minmax(0,1fr)}body.framed-ui.wald-design .reward-list-content{padding-top:5px;padding-bottom:5px}body.framed-ui.wald-design .upgrade-list-selection .reward-list-item .reward-list-copy strong{margin-bottom:4px}}

/* Approved parchment details: fixed controls around a single scrolling body. */
body.framed-ui.wald-design .detail-head-seal{width:38px;height:46px;display:grid;place-items:center;flex:none;border-left:1px solid #ffe3a066;border-right:1px solid #ffe3a033;color:#ebc66e}
body.framed-ui.wald-design .detail-head-seal svg{width:27px;height:30px}
body.framed-ui.wald-design .menu-heading>div,body.framed-ui.wald-design #reward-popup .detail-title-copy{flex:1;min-width:0}
body.framed-ui.wald-design :is(.menu-heading,.detail-title-head){display:flex;align-items:center;gap:10px;padding:12px;background:#38503d;color:#fff0c5;border-bottom:2px solid #b49a62;flex:none}
body.framed-ui.wald-design .menu-heading #close-menu,body.framed-ui.wald-design #inspector #close-inspector,body.framed-ui.wald-design #reward-popup #close-reward-details{width:44px;height:44px;min-height:44px;flex:none;position:static;align-self:center;padding:0;border:0;border-image:none;background:transparent url('assets/mockups/forest-button-build.svg') center/100% 100% no-repeat;box-shadow:none;color:#fff0c5;font:27px 'Trebuchet MS',sans-serif}
body.framed-ui.wald-design :is(.menu-content,.detail-scroll-body,#inspector .tower-content){background:linear-gradient(90deg,#bfa57418,transparent 9%,transparent 91%,#bfa57418),radial-gradient(ellipse at 20% 10%,#fff7df38,transparent 70%),var(--card-paper,#f1e7c9);overscroll-behavior:contain}
body.framed-ui.wald-design .game-menu .menu-content{flex:1 1 auto;padding:12px 14px}
body.framed-ui.wald-design .game-menu .menu-tabs{flex:none}
body.framed-ui.wald-design .game-menu .menu-actions{gap:8px}
body.framed-ui.wald-design .game-menu .menu-actions button{min-height:48px}
body.framed-ui.wald-design .menu-footer{display:grid;gap:8px;flex:none;padding:10px 14px;background:#dfd4b84d}
body.framed-ui.wald-design .menu-footer button,body.framed-ui.wald-design .tower-detail-actions button{min-height:48px;width:100%;border:2px solid #b49a62;border-image:url('assets/mockups/forest-frame-subtle.svg') 8 / 4px / 0 stretch;background:#f1e7c9;color:#294b40;font:700 14px 'Courier New',monospace;box-shadow:inset 0 -2px #bbaa7c33}
body.framed-ui.wald-design :is(.menu-footer,.tower-detail-actions) button.primary{border:0;border-image:none;background:#3d5140 url('assets/mockups/forest-button-wide.svg') center/100% 100% no-repeat;color:#fff0c5}
body.framed-ui.wald-design .menu-footer small{margin:0;text-align:center;line-height:1.3}
body.framed-ui.wald-design #biome-menu{padding-top:10px;border-top:1px solid #a4ae83;font-size:12px}
body.framed-ui.wald-design #biome-menu strong{display:block;font:700 15px 'Courier New',monospace;margin-bottom:4px}
body.framed-ui.wald-design #inspector .tower-menu-head{grid-template-columns:38px minmax(0,1fr) 30px 44px;padding:12px;min-height:80px;flex:none;border-bottom:2px solid #b49a62;background:#38503d}
body.framed-ui.wald-design #inspector .tower-menu-head h3{font-size:19px}
body.framed-ui.wald-design #inspector .tower-portrait{background:none;border:0;border-left:1px solid #ffe3a066;border-right:1px solid #ffe3a033;height:46px}
body.framed-ui.wald-design #inspector .tower-portrait img{width:30px;height:40px;object-fit:contain}
body.framed-ui.wald-design #inspector .tower-progress{display:none}
body.framed-ui.wald-design #inspector>.target-priority-label{order:1;flex:none;margin:0;padding:10px 12px;border-bottom:1px solid #b49a62;background:#f1e7c9;font-size:12px}
body.framed-ui.wald-design #inspector .target-priority-label select{min-height:44px;font-size:13px}
body.framed-ui.wald-design #inspector .tower-content{flex:1 1 auto;padding:14px 12px}
body.framed-ui.wald-design #inspector .tower-object-summary{display:flex;gap:14px;align-items:center;margin-bottom:12px}
body.framed-ui.wald-design #inspector .tower-object-summary strong{display:block;font:700 17px 'Courier New',monospace}
body.framed-ui.wald-design #inspector .tower-object-summary small{display:block;margin-top:6px;font-size:12px}
body.framed-ui.wald-design #inspector .tower-art-field{width:78px;height:80px;flex:none;display:grid;place-items:center;background:#d5d8b8;border:1px solid #9ba679;box-shadow:inset 0 0 0 3px #eee6c877}
body.framed-ui.wald-design #inspector .tower-art-field img{max-width:66px;max-height:72px;width:auto;height:auto}
body.framed-ui.wald-design #inspector .tower-stats{grid-template-columns:repeat(3,minmax(0,1fr));background:none;border-top:1px solid #b49a62;border-bottom:1px solid #b49a62;margin:10px 0}
body.framed-ui.wald-design #inspector .tower-stats>div{background:none;border-right:1px solid #b49a624d}
body.framed-ui.wald-design #inspector .tower-stats>div:last-child{border:0}
body.framed-ui.wald-design #inspector .tower-stats strong{font:700 19px 'Courier New',monospace}
body.framed-ui.wald-design #inspector .tower-stats span{font-size:11px}
body.framed-ui.wald-design #inspector .tower-damage-sections>section{border:0;border-left:3px solid #b49a62;background:none;padding:0 0 0 10px;margin:12px 0}
body.framed-ui.wald-design #inspector .tower-detail-actions{order:3;display:grid;gap:8px;padding:10px 12px;flex:none;border-top:1px solid #b49a62;background:#e7dfbf}
body.framed-ui.wald-design #reward-popup.upgrade-detail-popup{padding:0;border:3px solid var(--card-edge);width:min(358px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:hidden;box-shadow:inset 0 0 0 2px #fff3,4px 6px #102b2480}
body.framed-ui.wald-design #reward-popup.upgrade-detail-popup[open]{display:flex;flex-direction:column}
body.framed-ui.wald-design #reward-popup .upgrade-detail-card{padding:0;border:0;display:flex;flex-direction:column;min-height:0;width:100%}
body.framed-ui.wald-design #reward-popup .upgrade-detail-card:before,body.framed-ui.wald-design #reward-popup .upgrade-detail-card:after{display:none}
body.framed-ui.wald-design #reward-popup .detail-title-head{background:var(--card-head);border-bottom-color:var(--card-edge)}
body.framed-ui.wald-design #reward-popup .detail-title-head h2{font:700 21px/1.15 'Courier New',monospace;color:#fff0c5;margin:4px 0 0;overflow-wrap:anywhere}
body.framed-ui.wald-design #reward-popup .detail-title-copy>small{font-size:11px;color:#fff0c5}
body.framed-ui.wald-design #reward-popup .detail-scroll-body{padding:14px;min-height:0;overflow:auto;flex:1 1 auto;color:var(--card-ink);scrollbar-width:thin}
body.framed-ui.wald-design #reward-popup .upgrade-detail-head{position:relative;padding:0 0 10px;border:0;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px}
body.framed-ui.wald-design #reward-popup .upgrade-detail-head>.upgrade-category{margin:0;justify-content:start}
body.framed-ui.wald-design #reward-popup .upgrade-detail-head>.rarity-badge{font-size:12px}
body.framed-ui.wald-design #reward-popup .upgrade-detail-emblem{width:100%;height:94px;outline:0;border:0;margin:6px 0 0;background:linear-gradient(90deg,transparent,#ffffff30,transparent);box-shadow:none}
body.framed-ui.wald-design #reward-popup .upgrade-detail-emblem svg{width:64px;height:64px;filter:drop-shadow(2px 3px #102b2433)}
body.framed-ui.wald-design #reward-popup .upgrade-detail-emblem:before,body.framed-ui.wald-design #reward-popup .upgrade-detail-emblem:after{display:none}
body.framed-ui.wald-design #reward-popup .upgrade-detail-description{font-size:15px;line-height:1.5;margin:0 0 14px;color:#294b40}
body.framed-ui.wald-design #reward-popup .upgrade-stack-limit{flex-direction:column-reverse;align-items:stretch;padding:12px 0 0;border:0;border-top:1px solid var(--card-edge);background:none;margin:0;color:var(--card-ink)}
body.framed-ui.wald-design #reward-popup .upgrade-stack-marks{max-width:none;width:100%;flex-wrap:nowrap;gap:8px}
body.framed-ui.wald-design #reward-popup .upgrade-stack-marks i{flex:1;height:8px;border-width:1px;background:#ffffff33}
body.framed-ui.wald-design #reward-popup .upgrade-stack-marks i.owned{background:var(--card-edge)}
body.framed-ui.wald-design #reward-popup .upgrade-detail-actions{flex:none;margin:0;padding:12px 14px;gap:8px;background:#ffffff15}
body.framed-ui.wald-design #reward-popup .upgrade-detail-actions button{min-height:48px;font:700 14px 'Courier New',monospace}
body.framed-ui.wald-design #reward-popup .evolution-detail-card .detail-title-head{background:#38503d}
body.framed-ui.wald-design #reward-popup .upgrade-detail-head .card-sparkles{inset:25px 0 0}
body.framed-ui.wald-design #reward-popup .upgrade-detail-head .card-sparkles i:nth-child(n+3){display:none}
@media(max-width:350px){body.framed-ui.wald-design #reward-popup .detail-title-head h2{font-size:19px}body.framed-ui.wald-design #inspector .tower-menu-head h3{font-size:17px}}

body.framed-ui.wald-design #reward-popup .upgrade-clarification{font-size:12px;line-height:1.45;padding:9px 10px;margin:0 0 14px;background:#fff9f24d;border-left:2px solid var(--card-edge);color:#294b40}
body.framed-ui.wald-design #biome-menu .biome-badge{padding:0;border:0;background:none;box-shadow:none;gap:10px}
body.framed-ui.wald-design #biome-menu .biome-sigil{width:28px;min-width:28px;height:36px;padding:0;background:none;border:0;color:#627b52}
body.framed-ui.wald-design #biome-menu .biome-copy>span{font-size:12px;line-height:1.45}
@media(max-height:620px){body.framed-ui.wald-design #reward-popup .upgrade-detail-emblem{height:76px}body.framed-ui.wald-design #reward-popup .detail-scroll-body{padding:12px}body.framed-ui.wald-design #reward-popup .upgrade-detail-description{margin-bottom:10px}}

/* The remaining information views share the approved woodland component family. */
body.framed-ui.wald-design :is(.game-menu>.menu-panel,#inspector,#run-info,#enemy-info,#build-info),
body.framed-ui.wald-design #reward-popup:not(.upgrade-detail-popup){border:4px solid #b49a62;border-image:url('assets/mockups/forest-frame-subtle.svg') 8 / 8px / 0 stretch;box-shadow:4px 6px #102b2480}
body.framed-ui.wald-design :is(.popup-head,#run-info .menu-heading){display:flex;align-items:center;gap:10px;flex:none;padding:12px;background:#38503d;color:#fff0c5;border-bottom:2px solid #b49a62}
body.framed-ui.wald-design :is(.popup-head,.menu-heading)>.detail-title-copy{flex:1;min-width:0}
body.framed-ui.wald-design #reward-popup .popup-head #reward-detail-title,
body.framed-ui.wald-design #enemy-info .popup-head #enemy-title{font:700 21px/1.15 'Courier New',monospace;letter-spacing:-.5px;margin:0;padding:0;color:#fff0c5;overflow-wrap:anywhere}
body.framed-ui.wald-design .detail-title-copy>small{display:block;font-size:11px;margin-bottom:4px;color:#e0d7b4}
body.framed-ui.wald-design .detail-head-seal img{max-width:32px;max-height:40px;width:auto;height:auto;object-fit:contain}
body.framed-ui.wald-design :is(#close-run-info,#close-enemy,#close-build-details,#close-hero-details){position:static;flex:none;align-self:center;width:44px;height:44px;min-height:44px;border:0;border-image:none;border-radius:0;padding:0;background:transparent url('assets/mockups/forest-button-build.svg') center/100% 100% no-repeat;box-shadow:none;color:#fff0c5;font:27px 'Trebuchet MS',sans-serif}
body.framed-ui.wald-design #run-info .menu-heading #close-run-info,
body.framed-ui.wald-design #enemy-info .popup-head #close-enemy{border:0;box-shadow:none}
body.framed-ui.wald-design #reward-popup:not(.upgrade-detail-popup)>.popup-content,
body.framed-ui.wald-design #run-info>.menu-content,
body.framed-ui.wald-design #enemy-info>.detail-scroll-body{padding:14px;min-height:0;overflow:auto;overscroll-behavior:contain;background:linear-gradient(90deg,#bfa57418,transparent 9%,transparent 91%,#bfa57418),radial-gradient(ellipse at 20% 10%,#fff7df38,transparent 70%),#f1e7c9;color:#294b40;font-size:14px;line-height:1.5}
body.framed-ui.wald-design #run-info>.menu-content{flex:1 1 auto}
body.framed-ui.wald-design #reward-popup .popup-content>p{font-size:14px;line-height:1.5;margin:0 0 12px}
body.framed-ui.wald-design :is(#reward-popup:not(.upgrade-detail-popup),#run-info,#enemy-info)>.popup-actions{flex:none;display:grid;gap:8px;padding:12px 14px;background:#dfd4b84d;border-top:1px solid #b49a62}
body.framed-ui.wald-design :is(#reward-popup,#run-info,#enemy-info) .popup-actions button{width:100%;min-height:48px;border:2px solid #b49a62;border-image:url('assets/mockups/forest-frame-subtle.svg') 8 / 4px / 0 stretch;background:#f1e7c9;color:#294b40;font:700 14px 'Courier New',monospace;box-shadow:inset 0 -2px #bbaa7c33}
body.framed-ui.wald-design :is(#reward-popup,#run-info,#enemy-info) .popup-actions button.primary{border:0;border-image:none;background:#3d5140 url('assets/mockups/forest-button-wide.svg') center/100% 100% no-repeat;color:#fff0c5}
body.framed-ui.wald-design #reward-popup .reward-detail-actions{display:grid;gap:8px;width:100%}
body.framed-ui.wald-design #enemy-info{padding:0;overflow:hidden;max-height:calc(100dvh - 24px)}
body.framed-ui.wald-design #enemy-info:not([hidden]){display:flex;flex-direction:column}
body.framed-ui.wald-design #enemy-info .detail-scroll-body{flex:1 1 auto}
body.framed-ui.wald-design .object-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:10px 0;border-top:1px solid #b49a62;border-bottom:1px solid #b49a62;margin-bottom:14px}
body.framed-ui.wald-design .object-facts>div{min-width:0;border-right:1px solid #b49a624d;padding-right:6px}
body.framed-ui.wald-design .object-facts>div:last-child{border:0}
body.framed-ui.wald-design .object-facts small{display:block;font-size:11px;color:#596b50}
body.framed-ui.wald-design .object-facts strong{display:block;font:700 14px/1.4 'Courier New',monospace;overflow-wrap:anywhere;margin-top:4px}
body.framed-ui.wald-design .detail-effect-section{border-left:3px solid #b49a62;padding-left:10px;margin:14px 0}
body.framed-ui.wald-design .detail-effect-section h3{font:700 14px 'Courier New',monospace;margin:0 0 8px;color:#294b40}
body.framed-ui.wald-design .detail-effect-section p{font-size:14px;line-height:1.5;margin:0}
body.framed-ui.wald-design #reward-popup .detail-object-summary{display:flex;align-items:center;justify-content:center;min-height:90px;margin:0 0 12px}
body.framed-ui.wald-design #reward-popup .detail-object-summary .reward-detail-emblem{margin:0;width:76px;height:76px;border:0;box-shadow:none;background:linear-gradient(90deg,transparent,#fff6,transparent)}
body.framed-ui.wald-design #reward-popup .book-hero-detail section{padding:2px 0 2px 10px;background:none}
body.framed-ui.wald-design #reward-popup .book-hero-detail h3{font:700 14px 'Courier New',monospace}
body.framed-ui.wald-design #reward-popup .book-hero-ability small{display:block;margin-top:10px;padding:8px 10px;background:#fff9f24d;border-top:1px solid #b49a62;font-size:12px}
body.framed-ui.wald-design #reward-popup .book-tabs button{border-radius:0;clip-path:none;border:2px solid #b49a62;border-image:url('assets/mockups/forest-frame-subtle.svg') 8 / 4px / 0 stretch;box-shadow:none;min-height:48px}
body.framed-ui.wald-design #reward-popup .book-tabs button[aria-pressed=true]{background:#38503d;color:#fff0c5}
body.framed-ui.wald-design #reward-popup .audio-bus{border:0;border-left:3px solid #b49a62;border-radius:0;padding:4px 0 4px 10px;background:none}
body.framed-ui.wald-design #reward-popup .audio-bus h3{font:700 15px 'Courier New',monospace;color:#294b40}
body.framed-ui.wald-design #reward-popup .audio-bus button{min-width:44px;min-height:44px;border-radius:0}
body.framed-ui.wald-design #reward-popup .visual-setting{padding:12px 0;min-height:48px;border-bottom:1px solid #b49a62;margin:0 0 12px}
body.framed-ui.wald-design #reward-popup .visual-setting select{min-height:44px;font-size:14px}
body.framed-ui.wald-design #modal:is(.merchant-selection,.encounter-selection) #modal-title{display:flex;align-items:center;gap:10px;padding:12px;font:700 21px/1.15 'Courier New',monospace;border-bottom:2px solid #b49a62}
body.framed-ui.wald-design #modal:is(.merchant-selection,.encounter-selection) #modal-title>span:last-child{min-width:0;overflow-wrap:anywhere}
body.framed-ui.wald-design #modal.merchant-selection #choices{background:linear-gradient(90deg,#bfa57418,transparent 9%,transparent 91%,#bfa57418),#f1e7c9}
body.framed-ui.wald-design #modal:not(.merchant-selection) .merchant-detail-actions{display:none}
body.framed-ui.wald-design #modal.merchant-selection .merchant-detail-actions{flex:none;display:grid;gap:8px;padding:12px 14px;background:#dfd4b84d;border-top:1px solid #b49a62}
body.framed-ui.wald-design #modal.merchant-selection .merchant-detail-actions #merchant-leave{position:static;min-height:48px;border:0;border-image:none;background:#3d5140 url('assets/mockups/forest-button-wide.svg') center/100% 100% no-repeat;color:#fff0c5;font:700 14px 'Courier New',monospace}
body.framed-ui.wald-design #modal.merchant-selection .merchant-ware{background:#fff9f24d;border:0;border-left:3px solid #b49a62;box-shadow:none}
body.framed-ui.wald-design #modal.merchant-selection .merchant-ware button{border-radius:0;border:2px solid #b49a62;background:#f1e7c9;color:#294b40;min-height:44px}
body.framed-ui.wald-design #hero-card-detail .hc-flip-back{padding:12px!important}
body.framed-ui.wald-design #hero-card-detail .hc-back-title{padding:10px;gap:8px;border:0;border-bottom:2px solid var(--accent)}
body.framed-ui.wald-design #hero-card-detail .hc-back-title h2{flex:1;min-width:0;overflow-wrap:anywhere;font-size:19px}
body.framed-ui.wald-design #hero-card-detail #close-hero-details{position:static;width:44px;height:44px;min-height:44px;border:0;padding:0;background:transparent url('assets/mockups/forest-button-build.svg') center/100% 100% no-repeat;box-shadow:none;color:#fff0c5;font:27px 'Trebuchet MS',sans-serif}
body.framed-ui.wald-design #hero-card-detail .hc-actions{gap:8px;padding:12px 0 0}
body.framed-ui.wald-design #hero-card-detail #choose-hero{border:0;background:var(--field) url('assets/mockups/forest-button-wide.svg') center/100% 100% no-repeat;color:#fff0c5;box-shadow:none}
body.framed-ui.wald-design #hero-card-detail #hero-card-back{border:2px solid var(--accent);background:var(--paper);color:#294b40;box-shadow:none}

body.framed-ui.wald-design[data-ui-motion=reduced] :is(#reward-popup,#run-info,.game-menu,#enemy-info,#build-info){animation:none}
body.framed-ui.wald-design[data-ui-motion=reduced] .card-sparkles i{animation:none}
@media(max-width:350px){body.framed-ui.wald-design :is(#reward-popup .popup-head #reward-detail-title,#enemy-info .popup-head #enemy-title){font-size:19px}}
body.framed-ui.wald-design #build-info{padding:0;overflow:hidden;max-height:calc(100dvh - 140px)}
body.framed-ui.wald-design #build-info:not([hidden]){display:flex;flex-direction:column;gap:0}
body.framed-ui.wald-design #build-info .popup-head strong{color:#fff0c5;font:700 19px/1.2 'Courier New',monospace}
body.framed-ui.wald-design #build-info .detail-scroll-body{padding:12px;min-height:0;overflow:auto;background:linear-gradient(90deg,#bfa57418,transparent 9%,transparent 91%,#bfa57418),#f1e7c9}
body.framed-ui.wald-design #build-info .detail-scroll-body p{font-size:14px;line-height:1.45}
body.framed-ui.wald-design #build-info #close-build-details{background:transparent url('assets/mockups/forest-button-build.svg') center/100% 100% no-repeat;color:#fff0c5}
body.framed-ui.wald-design #update-notice{background:#f1e7c9;color:#294b40;border:4px solid #b49a62;border-image:url('assets/mockups/forest-frame-subtle.svg') 8 / 8px / 0 stretch;box-shadow:4px 6px #102b2480;border-radius:0;padding:12px}
body.framed-ui.wald-design #update-notice .update-heading{display:flex;align-items:center;gap:10px;font-size:14px;line-height:1.4}
body.framed-ui.wald-design #update-notice .update-sigil{width:28px;flex:none;color:#627b52}
body.framed-ui.wald-design #update-notice .update-sigil svg{width:28px;height:32px}
body.framed-ui.wald-design #update-notice button{min-height:48px;border:2px solid #b49a62;border-radius:0;background:#f1e7c9;color:#294b40;box-shadow:none;font-weight:700}
body.framed-ui.wald-design #update-notice #update-now{border:0;background:#3d5140 url('assets/mockups/forest-button-wide.svg') center/100% 100% no-repeat;color:#fff0c5}
body.framed-ui.wald-design #build-info{border-width:2px;border-image:url('assets/mockups/forest-frame-subtle.svg') 8 / 4px / 0 stretch}
body.framed-ui.wald-design #boss-preview.wald-rift #close-boss{border:0;padding:0;background:transparent url('assets/mockups/forest-button-build.svg') center/100% 100% no-repeat;box-shadow:none;color:#fff0c5;font:27px 'Trebuchet MS',sans-serif}

body.framed-ui.wald-design[data-ui-motion=reduced] #update-notice{animation:none}
body.framed-ui.wald-design #hero-card-detail .hc-detail-body strong.effect-value{display:inline;min-height:0;margin:0;padding:0;border:0;background:none;box-shadow:none;color:inherit;text-shadow:none;text-align:inherit;font:inherit;font-weight:700}

/* Keep short-screen flows in the same fixed-head, scrolling-body family. */
body.framed-ui.wald-design #modal:is(.start-help-open,.run-complete,.upgrade-list-selection) #modal-title:has(.detail-head-seal){display:flex;align-items:center;gap:10px;padding:12px;text-align:left;font:700 21px/1.15 'Courier New',monospace}
body.framed-ui.wald-design #modal:is(.start-help-open,.run-complete,.upgrade-list-selection) #modal-title>span:last-child{min-width:0}
body.framed-ui.wald-design #modal.start-help-open .modal{display:flex;flex-direction:column;max-height:calc(100dvh - 24px);overflow:hidden}
body.framed-ui.wald-design #modal.start-help-open :is(#modal-title,#modal-copy,#start-guide-actions){flex:none}
body.framed-ui.wald-design #modal.start-help-open #choices{display:block;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 14px 12px}
body.framed-ui.wald-design #modal.start-help-open .start-guide{margin:0;padding:0}
body.framed-ui.wald-design #start-guide-actions{padding:12px 14px;background:#e5dbbb;border-top:1px solid #b49a62}
body.framed-ui.wald-design #start-guide-actions button{width:100%;min-height:48px;background:#f1e7c9;color:#294b40;border:2px solid #b49a62;border-image:url('assets/mockups/forest-frame-subtle.svg') 8 / 4px / 0 stretch;box-shadow:none}
body.framed-ui.wald-design #again{min-height:48px;border:0;border-image:none;background:transparent url('assets/mockups/forest-button-wide.svg') center/100% 100% no-repeat;color:#fff0c5;font:700 15px 'Courier New',monospace;box-shadow:none}
@media(max-height:620px){
 body.framed-ui.wald-design #modal.hero-draft #choices{min-height:0;flex:1 1 220px;padding-top:8px;padding-bottom:8px}
 body.framed-ui.wald-design #modal.hero-draft #choices>.hc-card{height:min(210px,100%);min-height:0;flex-basis:138px;width:138px}
 body.framed-ui.wald-design #modal.hero-draft #choices{padding-left:calc(50% - 69px);padding-right:calc(50% - 69px)}
 body.framed-ui.wald-design #modal.hero-draft #hero-carousel-nav{padding-bottom:8px}
 body.framed-ui.wald-design #modal.hero-draft #hero-draft-controls{padding:8px 12px}
 body.framed-ui.wald-design #modal.hero-draft #modal-title{font-size:20px;padding:12px}
 body.framed-ui.wald-design #modal.hero-draft #modal-copy{margin:8px 12px}
}

/* Journey choices reuse the established parchment dialog and symbol family. */
body.framed-ui.wald-design #modal.journey-selection #choices {display:flex;flex-direction:column;gap:12px;padding:12px;min-height:0;overflow:auto}
body.framed-ui.wald-design #modal.journey-selection #choices>.choice-block {width:100%;flex:none}
body.framed-ui.wald-design #modal.journey-selection .journey-card {display:flex;flex-direction:row;align-items:center;gap:12px;text-align:left;min-height:112px;height:auto;width:100%;padding:12px;color:#294b40;background:#f1e7c9;--card-edge:#a78849;--card-inset:#d6bb79}
body.framed-ui.wald-design #modal.journey-selection .reward-emblem {flex:0 0 40px;width:40px;height:48px;min-height:48px;margin:0}
body.framed-ui.wald-design #modal.journey-selection .reward-emblem .upgrade-icon {width:34px;height:34px}
body.framed-ui.wald-design #modal.journey-selection .journey-offer-copy {display:flex;flex-direction:column;gap:7px;min-width:0;color:#294b40}
body.framed-ui.wald-design #modal.journey-selection .journey-offer-copy strong {font-family:'Courier New',monospace;font-size:17px;line-height:1.2;color:#294b40;margin:0}
body.framed-ui.wald-design #modal.journey-selection .journey-offer-copy>span {font-size:14px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#294b40}
body.framed-ui.wald-design #modal.journey-selection .journey-offer-copy small {font-size:13px;line-height:1.35;font-weight:bold;color:#294b40}
@media(max-height:600px){body.framed-ui.wald-design #modal.journey-selection .journey-card{min-height:98px;padding:10px}body.framed-ui.wald-design #modal.journey-selection .journey-offer-copy{gap:4px}body.framed-ui.wald-design #modal.journey-selection .journey-offer-copy strong{font-size:16px}}

.run-tendency{display:block;margin-top:8px;font-weight:bold;color:#294b40}
body.framed-ui.wald-design #modal.pact-selection .journey-card{min-height:94px}
@media(max-height:600px){body.framed-ui.wald-design #modal.pact-selection .journey-card{min-height:84px;padding:9px}body.framed-ui.wald-design #modal.pact-selection .journey-offer-copy strong{font-size:15px}body.framed-ui.wald-design #modal.pact-selection .journey-offer-copy>span{font-size:13px}body.framed-ui.wald-design #modal.pact-selection #modal-copy{font-size:13px;margin:10px 0}body.framed-ui.wald-design #modal.pact-selection #choices{gap:10px}}

body.framed-ui.wald-design #run-tendency-help{display:block;min-height:44px;width:100%;margin:6px 0 0;padding:8px;text-align:left;font-size:13px;color:#294b40;background:#e1dfc0;border:1px solid #a99a68;border-image:none;box-shadow:none}

/* Hero selection shares the large image stage and stacked actions of map selection. */
body.framed-ui.wald-design #modal.hero-draft .modal{height:min(720px,calc(100dvh - 32px));max-height:calc(100dvh - 32px)}
body.framed-ui.wald-design #modal.hero-draft #modal-copy{display:none}
body.framed-ui.wald-design #modal.hero-draft #choices{--hero-width:clamp(220px,calc(100vw - 84px),286px);flex:1 1 auto;min-height:0;align-items:center;padding:10px calc(50% - var(--hero-width)/2);gap:14px}
body.framed-ui.wald-design #modal.hero-draft #choices>.hc-card{flex:0 0 var(--hero-width);width:var(--hero-width);max-width:none;min-height:0;height:min(440px,100%);aspect-ratio:auto}
body.framed-ui.wald-design #modal.hero-draft #choices .hc-card strong{font-size:17px;min-height:52px;white-space:normal}
body.framed-ui.wald-design #modal.hero-draft #hero-draft-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:12px 14px}
body.framed-ui.wald-design #modal.hero-draft #hero-draft-controls[hidden]{display:none}
body.framed-ui.wald-design #hero-draft-next{border:0;border-image:none;background:#3d5140 url('assets/mockups/forest-button-wide.svg') center/100% 100% no-repeat;color:#fff0c5;font:bold 14px 'Courier New',monospace;min-height:48px;box-shadow:none}
body.framed-ui.wald-design #hero-draft-next:disabled{opacity:.45;cursor:default}
@media(max-height:650px){body.framed-ui.wald-design #modal.hero-draft .modal{height:calc(100dvh - 20px);max-height:calc(100dvh - 20px)}body.framed-ui.wald-design #modal.hero-draft #hero-draft-controls{padding:8px 10px;gap:6px}body.framed-ui.wald-design #modal.hero-draft #hero-draft-controls button{min-height:44px}body.framed-ui.wald-design #modal.hero-draft #choices .hc-card strong{font-size:15px;min-height:44px}}

body.framed-ui.wald-design #modal.hero-draft #choices>.hc-card:not(.hc-current){transform:scale(.96);opacity:.65}

/* The purse belongs to the offer scroller, not the short illustration wrapper. */
body.framed-ui.wald-design #modal.merchant-selection #choices>.merchant-purse{position:sticky;top:0;z-index:3;background:#294b40;color:#f4d783;margin:0 0 9px;box-shadow:0 3px 0 #b49a62;isolation:isolate}

/* Locked hero art must remain concealed in book details as well as the grid. */
body.framed-ui.wald-design #reward-popup .book-hero-portrait.hero-silhouette{filter:brightness(0);opacity:.75}
#hero-unlock-notice{position:fixed;z-index:48;top:calc(88px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(330px,calc(100vw - 28px));display:flex;align-items:center;gap:10px;padding:8px 5px 8px 9px;background:#193f32;color:#f1e7c9;border:2px solid #b49a62;box-shadow:0 3px #102b2499}
#hero-unlock-notice[hidden]{display:none}
#hero-unlock-notice>img{width:52px;height:66px;object-fit:cover;object-position:center 18%;image-rendering:pixelated}
#hero-unlock-notice>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
#hero-unlock-notice small{font:11px 'Trebuchet MS',sans-serif;color:#cad4ad}
#hero-unlock-notice strong{font:bold 14px 'Courier New',monospace;color:#ffe3a0}
#hero-unlock-notice span{font:11px 'Trebuchet MS',sans-serif}
#hero-unlock-notice button{border-image:none;flex:0 0 44px;width:44px;height:44px;padding:0;background:transparent;border:0;box-shadow:none;color:#f1e7c9;font-size:20px}

/* Approved hero profile 4A: original portrait, three readable parchment sections. */
body.framed-ui.wald-design #reward-popup .book-hero-profile-a .book-hero-banner{height:145px;min-height:145px}
body.framed-ui.wald-design #reward-popup .book-hero-profile-a .book-hero-portrait{height:140px}
body.framed-ui.wald-design #reward-popup .book-hero-profile-a .book-hero-profile-copy section{border:0;border-left:2px solid var(--dw-brass);background:transparent;padding:0 0 0 10px;margin:13px 0}
body.framed-ui.wald-design #reward-popup .book-hero-profile-a .book-hero-profile-copy h3{font:bold 14px/1.3 'Courier New';margin:0 0 6px}
body.framed-ui.wald-design #reward-popup .book-hero-profile-a .book-hero-profile-copy p{font:14px/1.5 'Trebuchet MS'}
body.framed-ui.wald-design #reward-popup .book-hero-ability-values{display:flex;gap:16px;flex-wrap:wrap;margin:10px 0 0;padding:9px 0;border-top:1px solid var(--dw-brass)}
body.framed-ui.wald-design #reward-popup .book-hero-ability-values>div{flex:1;min-width:100px}
body.framed-ui.wald-design #reward-popup .book-hero-ability-values dt{font:11px/1.4 'Trebuchet MS'}
body.framed-ui.wald-design #reward-popup .book-hero-ability-values dd{font:bold 16px/1.35 'Courier New';margin:3px 0 0}
