/* ========================================================================== */
/* WEBSITE 3.38 OVERRIDE LAYER — loaded after the complete legacy sheet.     */
/* WEBSITE 3.38 — THE KING'S WAR COUNCIL                                     */
/* Cinematic chamber, living atmosphere, asymmetric halls and battle reports. */
/* ========================================================================== */
:root{
  --council-gold:#d6aa5a;
  --council-gold-hi:#f4da94;
  --council-blood:#761f19;
  --council-ember:#ef7b2d;
  --council-ink:#070707;
  --tool-accent:#b98a47;
  --tool-accent-rgb:185,138,71;
}
body[data-site-page="rts"]{--tool-accent:#c4523d;--tool-accent-rgb:196,82,61}
body[data-site-page="world-map"]{--tool-accent:#d1a450;--tool-accent-rgb:209,164,80}
body[data-site-page="rebel"]{--tool-accent:#a56337;--tool-accent-rgb:165,99,55}
body[data-site-page="dragon"]{--tool-accent:#bd4935;--tool-accent-rgb:189,73,53}
body[data-site-page="equipment"]{--tool-accent:#9b7443;--tool-accent-rgb:155,116,67}
body[data-site-page="guides"]{--tool-accent:#bc9760;--tool-accent-rgb:188,151,96}

html{scroll-behavior:smooth}
body{
  background:
    radial-gradient(ellipse at 62% -10%,rgba(175,88,30,.12),transparent 42rem),
    linear-gradient(180deg,#070707,#0b0807 38%,#060606);
}
body::before{
  opacity:.24;
  background:
    linear-gradient(180deg,rgba(7,6,5,.42),rgba(7,6,5,.94) 63%),
    url("assets/theme/kings-council-chamber.webp") center top/cover no-repeat fixed;
}
body::after{box-shadow:inset 0 0 260px 110px rgba(0,0,0,.8)}

/* A restrained living-fire layer; disabled automatically for reduced motion. */
.council-atmosphere{position:fixed;inset:0;z-index:75;overflow:hidden;pointer-events:none;mix-blend-mode:screen;opacity:.5}
.council-atmosphere i{
  position:absolute;left:var(--x);bottom:-8px;width:var(--size);height:var(--size);border-radius:50%;
  background:#ff9b46;box-shadow:0 0 6px #f56b20,0 0 13px rgba(246,92,19,.5);
  animation:councilEmber var(--duration) linear var(--delay) infinite;
}
@keyframes councilEmber{0%{transform:translate3d(0,0,0) scale(.5);opacity:0}9%{opacity:.85}70%{opacity:.4}100%{transform:translate3d(var(--drift),-106vh,0) scale(0);opacity:0}}

/* Navigation is now a forged vertical standard with a true council seal. */
@media(min-width:981px){
  .topbar{
    width:272px;padding:25px 18px 20px;
    background:
      linear-gradient(90deg,rgba(255,255,255,.025),transparent 12%),
      linear-gradient(180deg,rgba(24,17,13,.98),rgba(7,7,7,.995));
    border-right:1px solid #765630;
    box-shadow:inset -5px 0 #080808,inset -6px 0 #3f311f,24px 0 80px rgba(0,0,0,.62);
  }
  body{padding-left:272px}
  .topbar::before{content:"THE KING'S COUNCIL";color:rgba(232,199,126,.25);right:3px;letter-spacing:.28em}
  .topbar::after{left:37px;right:37px;top:91px;height:118px;background:url("assets/theme/twin-dragon-compass.webp") center/112px 112px no-repeat;opacity:.75;filter:drop-shadow(0 8px 22px #000)}
  .brand{padding-bottom:132px;border-bottom-color:#4e3a23}
  .nav{gap:8px}
}
.brand-mark{
  color:transparent!important;text-shadow:none!important;border:0!important;
  background:url("assets/theme/twin-dragon-compass.webp") center/115% no-repeat!important;
  box-shadow:none!important;clip-path:none!important;
  filter:drop-shadow(0 7px 12px rgba(0,0,0,.72));
}
.brand strong{font-size:18px;letter-spacing:.02em}.brand small{color:#a28b68;font-size:9px}
.nav a{
  min-height:52px;padding:8px 11px 8px 9px;border-radius:1px;
  background:linear-gradient(90deg,rgba(40,29,21,.48),rgba(8,8,8,.2));
  border-top:1px solid rgba(218,173,94,.06);border-bottom:1px solid rgba(0,0,0,.7);
  clip-path:polygon(0 0,calc(100% - 9px) 0,100% 50%,calc(100% - 9px) 100%,0 100%);
}
.nav a::before{width:33px;height:33px;border-color:#6b5031;transition:transform .22s ease,filter .22s ease}
.nav a:hover::before{transform:rotate(-7deg) scale(1.08);filter:brightness(1.3)}
body[data-site-page="home"] [data-site-link="home"],body[data-site-page="rts"] [data-site-link="rts"],body[data-site-page="world-map"] [data-site-link="world-map"],body[data-site-page="rebel"] [data-site-link="rebel"],body[data-site-page="dragon"] [data-site-link="dragon"],body[data-site-page="equipment"] [data-site-link="equipment"],body[data-site-page="guides"] [data-site-link="guides"]{
  background:linear-gradient(90deg,rgba(var(--tool-accent-rgb),.38),rgba(35,20,13,.75) 58%,rgba(10,9,8,.72));
  border-color:rgba(var(--tool-accent-rgb),.6);box-shadow:inset 4px 0 var(--tool-accent),0 10px 28px rgba(0,0,0,.3);
}

/* Home opens inside the chamber, with the product immediately actionable. */
body[data-site-page="home"] .hero{
  min-height:min(810px,calc(100vh - 68px));margin-top:24px;padding:clamp(52px,6vw,92px);
  grid-template-columns:minmax(0,1.05fr) minmax(390px,.72fr);gap:clamp(36px,5vw,84px);
  align-items:center;border:1px solid #7a5831;border-radius:0;
  background:
    linear-gradient(90deg,rgba(5,6,7,.98) 0%,rgba(5,6,7,.88) 37%,rgba(5,6,7,.18) 69%,rgba(5,6,7,.28) 100%),
    linear-gradient(0deg,rgba(4,4,4,.82),transparent 55%),
    url("assets/theme/kings-council-chamber.webp") center/cover no-repeat;
  box-shadow:inset 0 0 0 7px rgba(7,6,5,.8),inset 0 0 0 8px rgba(231,181,88,.14),0 45px 120px rgba(0,0,0,.65);
}
body[data-site-page="home"] .hero::before{inset:19px;border-color:rgba(235,193,112,.22);box-shadow:inset 0 0 90px rgba(0,0,0,.24)}
body[data-site-page="home"] .hero::after{height:7px;background:linear-gradient(90deg,#1d0c09,#85271d 18%,#e4ae52 50%,#85271d 82%,#1d0c09)}
.hero-copy{max-width:760px}.hero-copy .eyebrow{font-size:11px;color:#e1bd74}
.hero h1{font-size:clamp(58px,6.5vw,102px);line-height:.91;letter-spacing:-.058em;max-width:850px;text-shadow:0 4px #000,0 18px 50px #000}
.hero h1 span{display:block;margin-top:.12em;color:#f2d98f;font-style:italic;font-weight:500}
.hero-copy>p{font-size:18px;max-width:630px;color:#d0c8ba;text-shadow:0 3px 16px #000}
.hero-actions{gap:12px}.hero-actions .primary,.hero-actions .secondary{min-height:54px;padding:15px 22px;font-size:13px}
.trust-row{color:#b7a888}.trust-row i{background:#9a6832}

.council-dais{
  position:relative;align-self:center;min-height:570px;padding:24px;overflow:hidden;border-radius:50% 50% 5px 5px;
  background:radial-gradient(circle at 50% 34%,rgba(124,54,23,.44),rgba(12,9,7,.92) 50%,#080808 74%);
  border:1px solid #8a6338;box-shadow:inset 0 0 0 6px #080808,inset 0 0 0 7px rgba(221,176,91,.16),0 35px 75px rgba(0,0,0,.64);
}
.council-dais::before{content:"";position:absolute;inset:19px;border:1px solid rgba(222,175,90,.2);border-radius:50% 50% 3px 3px;pointer-events:none}
.council-dais::after{content:"";position:absolute;left:9%;right:9%;top:45%;height:1px;background:linear-gradient(90deg,transparent,#b77b3c,transparent);box-shadow:0 0 24px rgba(222,112,33,.48)}
.council-orbit,.council-orbit span{position:absolute;border-radius:50%;pointer-events:none}
.council-orbit{left:50%;top:43%;width:380px;height:380px;transform:translate(-50%,-50%);border:1px solid rgba(231,190,104,.16);animation:slowTurn 80s linear infinite}
.council-orbit span:nth-child(1){inset:26px;border:1px dashed rgba(231,190,104,.16)}
.council-orbit span:nth-child(2){inset:58px;border:1px solid rgba(159,62,30,.2)}
.council-orbit span:nth-child(3){left:50%;top:-5px;width:10px;height:10px;background:#e2b65f;box-shadow:0 0 15px #d85d23}
@keyframes slowTurn{to{transform:translate(-50%,-50%) rotate(360deg)}}
.council-crest{position:absolute;left:50%;top:39%;width:min(79%,410px);height:auto;transform:translate(-50%,-50%);filter:drop-shadow(0 22px 28px #000);animation:crestBreathe 7s ease-in-out infinite}
@keyframes crestBreathe{50%{filter:drop-shadow(0 24px 35px #000) drop-shadow(0 0 16px rgba(228,105,35,.22));transform:translate(-50%,-51%) scale(1.012)}}
.council-dais-copy{position:absolute;z-index:3;left:34px;right:34px;bottom:132px;display:grid;justify-items:center;text-align:center;text-shadow:0 3px 12px #000}
.council-dais-copy strong{font:700 24px Georgia,serif;color:#f0deb2;margin:8px 0 5px}.council-dais-copy small{font-size:12px;line-height:1.45;color:#afa58f;max-width:390px}
.council-quick-links{position:absolute;z-index:4;left:20px;right:20px;bottom:20px;display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.council-quick-links a{display:flex;align-items:center;gap:9px;min-width:0;padding:10px;border:1px solid #624728;background:linear-gradient(180deg,rgba(38,25,16,.94),rgba(10,9,8,.96));color:#d9c49a;text-decoration:none;transition:.2s}
.council-quick-links a:hover{transform:translateY(-3px);border-color:#c39049;background:linear-gradient(180deg,#55321c,#160f0b);box-shadow:0 10px 22px #000}
.council-quick-links i{flex:0 0 25px;width:25px;height:25px;background-position:center;background-repeat:no-repeat;background-size:contain}
.council-quick-links a:nth-child(1) i{background-image:url("assets/theme/rts-emblem.svg")}.council-quick-links a:nth-child(2) i{background-image:url("assets/theme/world-emblem.svg")}.council-quick-links a:nth-child(3) i{background-image:url("assets/theme/rebel-emblem.svg")}
.council-quick-links span{display:grid;min-width:0}.council-quick-links small{font-size:7px;text-transform:uppercase;letter-spacing:.09em;color:#987d54}.council-quick-links strong{font:700 13px Georgia,serif;color:#ead39f}

/* Every tool enters through its own illustrated battle standard. */
.page-masthead{
  min-height:285px;padding:54px 430px 49px 54px;border-radius:0;border-color:#6f522f;
  background:
    linear-gradient(90deg,rgba(7,7,7,.98) 0%,rgba(9,8,7,.88) 46%,rgba(8,7,6,.34) 100%),
    url("assets/theme/kings-council-chamber.webp") center 43%/cover no-repeat;
  box-shadow:inset 0 0 0 6px rgba(5,5,5,.8),inset 0 0 0 7px rgba(var(--tool-accent-rgb),.16),0 32px 82px rgba(0,0,0,.48);
  clip-path:polygon(0 0,100% 0,100% calc(100% - 22px),calc(100% - 22px) 100%,22px 100%,0 calc(100% - 22px));
}
.page-masthead::before{right:62px;width:255px;height:255px;opacity:.92;filter:drop-shadow(0 16px 25px #000) drop-shadow(0 0 20px rgba(var(--tool-accent-rgb),.18))}
.page-masthead::after{left:54px;right:54px;bottom:24px;height:4px;background:linear-gradient(90deg,var(--tool-accent),#e4bb68 28%,transparent 60%);opacity:.9}
.page-masthead h1{font-size:clamp(50px,5.4vw,82px);letter-spacing:-.048em;text-shadow:0 4px #000,0 18px 34px #000}.page-masthead p{font-size:16px;color:#d2c8b6}
.page-masthead-meta span{padding:9px 12px;background:rgba(8,7,6,.88);border-color:rgba(var(--tool-accent-rgb),.6);color:#ead5a9;border-radius:1px}

/* Asymmetric great halls: the important optimizers dominate the map. */
.site-portal{padding-top:88px}.site-portal h2{font-size:clamp(46px,5.3vw,72px);max-width:900px}.site-portal .section-title-row p{font-size:15px;max-width:700px}
.portal-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:18px}
.portal-card,.portal-card.optimizer,.portal-card:last-child{grid-column:span 4;min-height:260px;padding:34px 155px 30px 31px;border-radius:0;transition:transform .28s ease,border-color .28s ease,box-shadow .28s ease}
.portal-card:nth-child(1){grid-column:span 7;min-height:330px;padding-top:55px}.portal-card:nth-child(2){grid-column:span 5;min-height:330px;padding-top:55px}
.portal-card:nth-child(1)::before,.portal-card:nth-child(2)::before{width:145px;height:145px;right:25px;opacity:.68}
.portal-card:nth-child(1){background:linear-gradient(110deg,rgba(20,12,10,.98),rgba(50,18,13,.78)),url("assets/theme/map-table.svg") right center/650px auto no-repeat}
.portal-card:nth-child(2){background:linear-gradient(110deg,rgba(19,14,9,.98),rgba(55,37,17,.72)),url("assets/theme/map-table.svg") right center/590px auto no-repeat}
.portal-card:nth-child(3){background:linear-gradient(125deg,#21140e,#0a0908 72%)}
.portal-card:nth-child(4){background:linear-gradient(125deg,#24100c,#090808 72%)}
.portal-card:nth-child(5){background:linear-gradient(125deg,#1b1815,#0b0907 72%)}
.portal-card:nth-child(6){background:linear-gradient(125deg,#211a11,#090807 72%)}
.portal-card>span{font-size:9px}.portal-card h3{font-size:clamp(28px,2.3vw,38px);line-height:1.02}.portal-card p{font-size:13px;line-height:1.65}.portal-card>b{position:absolute;left:31px;bottom:28px;font-size:10px;text-transform:uppercase;letter-spacing:.1em}
.portal-card:hover{transform:translateY(-8px);border-color:#bb8c48;box-shadow:0 35px 70px rgba(0,0,0,.54),inset 0 0 0 4px rgba(6,5,4,.68),inset 0 0 0 5px rgba(229,190,111,.15)}

/* Tool surfaces become readable tactical boards with deliberate depth. */
.section{padding:60px 0}.section-title-row{margin-bottom:26px}.section h2{font-size:clamp(36px,3.4vw,52px);letter-spacing:-.035em}.section-title-row p{font-size:14px;max-width:720px}
.card-surface,.setup-card,.advanced,.comparison,.enemy-matchup,.rebel-team-result,.rebel-alternatives,.guide-card,.database-card,.full-guide-card{
  border-color:rgba(var(--tool-accent-rgb),.32)!important;
  background:
    linear-gradient(135deg,rgba(var(--tool-accent-rgb),.035),transparent 25%),
    linear-gradient(180deg,rgba(23,18,14,.985),rgba(8,8,8,.995))!important;
  box-shadow:0 20px 48px rgba(0,0,0,.32),inset 0 1px rgba(255,228,179,.025)!important;
}
.card-surface::before,.setup-card::before,.advanced::before,.comparison::before,.enemy-matchup::before,.rebel-team-result::before,.rebel-alternatives::before{
  content:"";position:absolute;left:0;top:0;width:96px;height:2px;background:linear-gradient(90deg,var(--tool-accent),transparent);pointer-events:none
}
.primary{background:linear-gradient(180deg,#e0ba6d,#a87332);border-color:#efcf8a;box-shadow:inset 0 1px rgba(255,255,255,.32),0 10px 28px rgba(120,69,21,.28);clip-path:polygon(9px 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%,0 9px)}
.secondary,.ghost{border-color:#59452f;background:linear-gradient(180deg,#1e1813,#0d0c0b)}
.secondary:hover,.ghost:hover{border-color:#a07642;background:linear-gradient(180deg,#302116,#14100c)}

/* Portrait plaques feel like collectible pieces on a war table. */
.commander-grid{gap:15px}.commander-card,.weapon-card{transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease;overflow:hidden}
.commander-card::before,.weapon-card::before{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;background:linear-gradient(115deg,rgba(255,255,255,.09),transparent 20% 75%,rgba(214,161,75,.05));mix-blend-mode:screen}
.commander-card:hover,.weapon-card:hover{transform:translateY(-7px) scale(1.012);box-shadow:0 24px 42px rgba(0,0,0,.52),0 0 0 1px rgba(var(--tool-accent-rgb),.22)}
.commander-card.owned{border-color:#75552e}.commander-card:not(.owned) img{filter:grayscale(1) brightness(.48) contrast(1.08)}
.quality-chip{box-shadow:0 3px 12px rgba(0,0,0,.5)}

/* Results read as sealed battle reports rather than generic output cards. */
.result-hero-score,.march-card,.enemy-result-card,.world-map-result-card,.rebel-column,.best-assignment{
  position:relative;overflow:hidden;border-color:rgba(var(--tool-accent-rgb),.38)!important;
  box-shadow:0 20px 50px rgba(0,0,0,.35),inset 0 0 0 1px rgba(223,177,92,.03)!important;
}
.result-hero-score::before,.march-card::before,.world-map-result-card::before,.best-assignment::before{content:"";position:absolute;right:-25px;bottom:-25px;width:130px;height:130px;background:url("assets/theme/council-emblem.svg") center/contain no-repeat;opacity:.05;pointer-events:none}
.march-head,.rebel-column-head,.world-map-result-head{background:linear-gradient(90deg,rgba(var(--tool-accent-rgb),.18),rgba(13,11,9,.95))!important;border-bottom-color:rgba(var(--tool-accent-rgb),.34)!important}
.result-score-ring{filter:drop-shadow(0 8px 20px rgba(0,0,0,.5))}

/* Dialogs open like heavy iron folios. */
.commander-dialog{border-radius:2px;border-color:#7b5b35;background:linear-gradient(155deg,#1e1711,#080808 70%);box-shadow:inset 0 0 0 5px #080808,inset 0 0 0 6px rgba(224,176,89,.12),0 42px 120px rgba(0,0,0,.82)}
.commander-dialog::backdrop{background:rgba(2,2,2,.87);backdrop-filter:blur(8px) saturate(.65)}
.dialog-close{border-radius:2px;border-color:#7a5833;background:#160e0b;color:#e1c98e}

.community-credit-card{position:relative;overflow:hidden;padding-left:100px;background:linear-gradient(90deg,#21160f,#0b0908)!important;border-color:#5f472c}
.community-credit-card::before{content:"";position:absolute;left:24px;top:50%;width:56px;height:56px;transform:translateY(-50%);background:url("assets/theme/guides-emblem.svg") center/contain no-repeat;opacity:.58}
.footer{border-top-color:#4b3924;background:linear-gradient(180deg,transparent,rgba(24,14,9,.35));padding-bottom:42px}

@media(max-width:1240px) and (min-width:981px){
  body[data-site-page="home"] .hero{grid-template-columns:1fr;padding:58px}.council-dais{min-height:530px;max-width:650px;width:100%;justify-self:center}
  .portal-card:nth-child(1),.portal-card:nth-child(2){grid-column:span 6}.portal-card,.portal-card.optimizer,.portal-card:last-child{grid-column:span 6}
}
@media(max-width:980px){
  body{padding-left:0}.topbar{background:linear-gradient(180deg,rgba(27,18,13,.98),rgba(8,8,8,.98))!important}
  .brand-mark{width:42px;height:42px}.mobile-site-nav summary{border-color:#725333;background:#17110d}
  body[data-site-page="home"] .hero{min-height:0;padding:54px 42px;grid-template-columns:1fr;background-position:62% center}
  .hero-copy{max-width:760px}.council-dais{min-height:540px;max-width:650px;width:100%;justify-self:center}
  .page-masthead{min-height:250px;padding:42px 220px 38px 34px}.page-masthead::before{width:175px;height:175px;right:32px}
  .portal-card:nth-child(1),.portal-card:nth-child(2),.portal-card,.portal-card.optimizer,.portal-card:last-child{grid-column:span 6}
}
@media(max-width:650px){
  .council-atmosphere{opacity:.32}
  body[data-site-page="home"] .hero{padding:42px 21px 25px;background-position:66% center;box-shadow:inset 0 0 0 4px rgba(7,6,5,.8),inset 0 0 0 5px rgba(231,181,88,.14),0 30px 70px rgba(0,0,0,.55)}
  body[data-site-page="home"] .hero::before{inset:9px}.hero h1{font-size:49px}.hero-copy>p{font-size:16px}.hero-actions{display:grid}.hero-actions>*{width:100%;text-align:center}
  .council-dais{min-height:500px;padding:12px;border-radius:48% 48% 2px 2px}.council-dais::before{inset:10px}.council-orbit{width:280px;height:280px;top:38%}.council-crest{width:86%;top:36%}
  .council-dais-copy{left:18px;right:18px;bottom:143px}.council-dais-copy strong{font-size:20px}.council-dais-copy small{font-size:11px}
  .council-quick-links{grid-template-columns:1fr;left:13px;right:13px;bottom:13px}.council-quick-links a{padding:7px 10px}.council-quick-links i{width:21px;height:21px;flex-basis:21px}
  .page-masthead{min-height:430px;padding:30px 22px 200px;background-position:68% center}.page-masthead::before{bottom:38px;width:145px;height:145px}.page-masthead h1{font-size:43px}.page-masthead p{font-size:14px}.page-masthead-meta{bottom:18px}
  .portal-grid{grid-template-columns:1fr}.portal-card:nth-child(1),.portal-card:nth-child(2),.portal-card,.portal-card.optimizer,.portal-card:last-child{grid-column:1;min-height:235px;padding:28px 105px 55px 22px}.portal-card:nth-child(1),.portal-card:nth-child(2){min-height:255px;padding-top:34px}.portal-card:nth-child(1)::before,.portal-card:nth-child(2)::before{width:90px;height:90px;right:12px}.portal-card>b{left:22px;bottom:23px}.portal-card h3{font-size:26px}
  .section{padding:45px 0}.section h2{font-size:34px}.commander-grid{gap:9px}.community-credit-card{padding-left:74px}.community-credit-card::before{left:17px;width:42px;height:42px}
}

/* 3.39 visual correction — remove boxed emblems and make each chamber cinematic. */
body[data-site-page="home"] .hero{
  grid-template-columns:minmax(0,850px);
  align-items:center;
  min-height:610px;
  padding:clamp(54px,7vw,108px);
  background:
    linear-gradient(90deg,rgba(3,3,3,.96) 0%,rgba(4,4,4,.83) 47%,rgba(4,4,4,.16) 78%),
    url("assets/theme/kings-council-chamber.webp") 61% 48%/cover no-repeat;
}
body[data-site-page="home"] .hero-copy{max-width:820px}

.page-masthead{
  min-height:320px;
  padding:58px 390px 54px 58px;
  border:0;
  background:
    linear-gradient(90deg,rgba(3,3,3,.98) 0%,rgba(5,5,5,.86) 48%,rgba(5,5,5,.22) 82%),
    linear-gradient(0deg,rgba(var(--tool-accent-rgb),.12),transparent 70%),
    url("assets/theme/war-room-masthead-v2.png") center/cover no-repeat;
  box-shadow:0 30px 85px rgba(0,0,0,.58),inset 0 -1px rgba(var(--tool-accent-rgb),.38);
  clip-path:polygon(0 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%);
}
.page-masthead::before{
  inset:auto 72px auto auto;
  top:50%;
  width:220px;
  height:220px;
  transform:translateY(-50%);
  border:0;
  opacity:.82;
  background-position:center;
  background-repeat:no-repeat;
  background-size:contain;
  filter:drop-shadow(0 14px 22px rgba(0,0,0,.9)) drop-shadow(0 0 20px rgba(var(--tool-accent-rgb),.2));
}
body[data-site-page="rts"] .page-masthead::before{background-image:url("assets/theme/rts-emblem.svg")}
body[data-site-page="world-map"] .page-masthead::before{background-image:url("assets/theme/world-emblem.svg")}
body[data-site-page="rebel"] .page-masthead::before{background-image:url("assets/theme/rebel-emblem.svg")}
body[data-site-page="dragon"] .page-masthead::before{background-image:url("assets/theme/dragon-emblem.svg")}
body[data-site-page="equipment"] .page-masthead::before{background-image:url("assets/theme/equipment-emblem.svg")}
body[data-site-page="guides"] .page-masthead::before{background-image:url("assets/theme/guides-emblem.svg")}
.page-masthead::after{left:58px;right:auto;bottom:28px;width:min(420px,42%);height:2px}

/* Chamber cards: full-bleed engraved emblems, never icons inside boxes. */
.portal-card,.portal-card.optimizer,.portal-card:last-child{
  isolation:isolate;
  overflow:hidden;
  padding:38px 180px 72px 34px;
  border:1px solid rgba(197,154,81,.3);
  clip-path:polygon(0 0,calc(100% - 16px) 0,100% 16px,100% 100%,16px 100%,0 calc(100% - 16px));
  box-shadow:0 22px 58px rgba(0,0,0,.38),inset 0 1px rgba(244,218,148,.05);
}
.portal-card::before{
  z-index:-1;
  left:auto;right:24px;top:50%;bottom:auto;
  width:132px;height:132px;
  transform:translateY(-50%);
  border:0;border-radius:0;
  background-color:transparent;
  background-position:center;background-repeat:no-repeat;background-size:contain;
  box-shadow:none;
  opacity:.56;
  filter:drop-shadow(0 12px 22px #000);
}
.portal-card::after{display:none}
.portal-card[href*="rts"]::before{background-image:url("assets/theme/rts-emblem.svg")}
.portal-card[href*="world-map"]::before{background-image:url("assets/theme/world-emblem.svg")}
.portal-card[href*="rebel"]::before{background-image:url("assets/theme/rebel-emblem.svg")}
.portal-card[href*="dragon"]::before{background-image:url("assets/theme/dragon-emblem.svg")}
.portal-card[href*="equipment"]::before{background-image:url("assets/theme/equipment-emblem.svg")}
.portal-card[href*="scriptures"]::before{background-image:url("assets/theme/emblem-scriptures-v4.webp")}
.portal-card[href*="friendship"]::before{background-image:url("assets/theme/emblem-friendship-v1.webp")}
.portal-card[href*="guides"]::before{background-image:url("assets/theme/guides-emblem.svg")}
.portal-card:nth-child(1),.portal-card:nth-child(2){padding:54px 210px 78px 38px}
.portal-card:nth-child(1)::before,.portal-card:nth-child(2)::before{right:36px;width:158px;height:158px;opacity:.62}
.portal-card>span,.portal-card h3,.portal-card p{text-align:left}
.portal-card>b{left:34px;bottom:28px;text-align:left}
.portal-card:hover::before{background-color:transparent;box-shadow:none;opacity:.88;filter:drop-shadow(0 16px 28px #000) drop-shadow(0 0 16px rgba(var(--tool-accent-rgb),.28))}

@media(max-width:980px){
  body[data-site-page="home"] .hero{min-height:540px;padding:58px 44px}
  .page-masthead{padding:44px 230px 42px 38px;min-height:280px}
  .page-masthead::before{right:34px;width:160px;height:160px}
  .portal-card:nth-child(1),.portal-card:nth-child(2),.portal-card,.portal-card.optimizer,.portal-card:last-child{padding-right:145px}
}
@media(max-width:650px){
  body[data-site-page="home"] .hero{min-height:520px;padding:42px 24px;background-position:66% center}
  .page-masthead{min-height:440px;padding:34px 22px 190px;background-position:68% center}
  .page-masthead::before{inset:auto 50% 34px auto;top:auto;width:132px;height:132px;transform:translateX(50%)}
  .page-masthead::after{left:22px;bottom:20px}
  .portal-card:nth-child(1),.portal-card:nth-child(2),.portal-card,.portal-card.optimizer,.portal-card:last-child{padding:30px 108px 66px 22px}
  .portal-card::before,.portal-card:nth-child(1)::before,.portal-card:nth-child(2)::before{right:12px;width:82px;height:82px}
  .portal-card>b{left:22px;bottom:22px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.council-atmosphere{display:none}.council-orbit,.council-crest{animation:none!important}.portal-card,.commander-card,.weapon-card,.nav a::before{transition:none!important}}

/* 3.38 visual QA corrections from the full-site walkthrough. */
@media(min-width:1600px){
  .shell{width:min(1780px,calc(100% - 72px))}
}

/* Keep each heraldic emblem in its dedicated right-hand field. */
.page-masthead::before{
  inset:auto 62px auto auto;
  top:50%;
  width:255px;
  height:255px;
  transform:translateY(-50%);
}
.page-masthead-copy{position:relative;z-index:3;max-width:900px}
.page-masthead h1{position:relative;z-index:2;max-width:900px}
.page-masthead p{position:relative;z-index:2;max-width:760px}

/* Replace scattered center diamonds with a quieter forged divider. */
.section-title-row::before{display:none!important}
.section-title-row::after{
  height:3px;
  background:linear-gradient(90deg,var(--tool-accent),rgba(var(--tool-accent-rgb),.26) 34%,transparent 78%);
  opacity:.72;
}
.section-title-row{padding-bottom:17px}

/* Better density and legibility on the very wide desktop shown in the video. */
.section{padding:48px 0}
.section-title-row p,.page-masthead p,.database-panel-intro p{font-size:14px;line-height:1.62}
.toolbar,.roster-toolbar{padding:14px}
.filters button,.guide-category-filters button,.database-tabs button,.database-tabs a{font-size:12px}
input,select,textarea,.ghost,.secondary{font-size:13px}
.setup-card p,.advanced p,.world-map-intro p,.rebel-rule-strip span,.rebel-damage-boosts li{font-size:13px;line-height:1.55}

/* Disabled optimizer controls should read as inactive iron, not a white block. */
button:disabled,.primary:disabled,.optimize-button:disabled{
  opacity:.62!important;
  color:#8e877b!important;
  border-color:#3e3932!important;
  background:linear-gradient(180deg,#242321,#141413)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.035)!important;
  filter:none!important;
}

/* Dragon skill rankings now belong to the same war-room material system. */
.dragon-guide-grid{gap:18px}
.dragon-guide-card{
  border-radius:3px;
  border-color:#4f3b27;
  background:
    radial-gradient(circle at 92% 4%,rgba(176,91,38,.09),transparent 180px),
    linear-gradient(155deg,#1c1510,#0a0908 74%);
  box-shadow:0 18px 44px rgba(0,0,0,.34),inset 0 0 0 1px rgba(220,172,84,.03);
}
.dragon-guide-card::before{height:3px;background:linear-gradient(90deg,#a66e33,#e2b75e,transparent)!important}
.dragon-guide-card.green::before{background:linear-gradient(90deg,#486c49,#c1a65b,transparent)!important}
.dragon-guide-card.red::before{background:linear-gradient(90deg,#8c3328,#d7964b,transparent)!important}
.dragon-guide-card.cyan::before{background:linear-gradient(90deg,#47706f,#c1a65b,transparent)!important}
.dragon-guide-card.blue::before{background:linear-gradient(90deg,#4b5d79,#c1a65b,transparent)!important}
.dragon-guide-head{padding:21px 22px 16px;border-bottom-color:#3a2c20}
.dragon-guide-head>span{color:#b59766;font-size:10px}
.dragon-guide-head h3{font-size:24px;color:#f0dfb8}
.dragon-guide-head p{font-size:12px;color:#aaa08f}
.dragon-guide-card ol{padding:10px 17px 17px}
.dragon-guide-card li{grid-template-columns:31px 1fr;gap:10px;padding:8px 5px;border-top-color:rgba(213,172,95,.08)}
.dragon-guide-card li>b{width:24px;height:24px;background:#241b11;border:1px solid #5d462b;color:#e0bd6d}
.dragon-guide-card li em{font-size:11px;color:#c9c0af;background:#13110e;border-color:#3c3327;border-radius:3px;padding:5px 8px}

/* Database, equipment and guide cards use one consistent readable scale. */
.database-tabs{border-radius:3px;background:linear-gradient(180deg,#17120e,#0b0a09);border-color:#574229}
.database-tabs button,.database-tabs a{min-height:49px;border-radius:2px}
.database-tabs button.active,.database-tabs a.active{background:linear-gradient(180deg,#362716,#17110d);border-color:#9a713a;color:#f0d389}
.lord-equipment-card,.equipment-database-summary,.game-guide-card,.full-guide-card{
  border-color:#493925!important;
  background:linear-gradient(155deg,#19140f,#0a0908 76%)!important;
}
.base-stat-group,.weapon-rules-panel,.base-stats-panel,.equipment-roster-column .lord-equipment-card{
  border-color:#463827!important;
  background:linear-gradient(160deg,#17130f,#0a0908)!important;
}
.base-stat-group h4{color:#cda75f}
.base-stat-field>div{background:#0b0a09;border-color:#443727}
.rebel-controls,.rebel-team-result,.rebel-alternatives{background:linear-gradient(165deg,#19130f,#090807)!important}
.lord-equipment-card h3,.equipment-database-summary h3,.game-guide-card h3,.full-guide-card h3{color:#eadbb8}
.game-guide-card>p,.game-guide-card>div>p,.full-guide-card>div>p{font-size:13px;line-height:1.6;color:#aaa293}
.game-guide-card ol,.game-guide-card ul{font-size:12px;color:#c1b8a7}
.source-badge{font-size:10px}

/* Results and empty states should not create huge dead black wells. */
.results-placeholder{min-height:245px;display:grid;place-content:center;text-align:center}
.results-placeholder .sigil{margin-inline:auto}
.about-grid{padding-top:38px}
.footer{margin-top:22px}

@media(max-width:980px){
  .page-masthead::before{inset:auto 32px auto auto;top:50%;width:175px;height:175px;transform:translateY(-50%)}
}
@media(max-width:650px){
  .page-masthead::before{inset:auto 50% 38px auto;top:auto;width:145px;height:145px;transform:translateX(50%)}
  .page-masthead-copy{max-width:none}
  .dragon-guide-head h3{font-size:22px}
  .dragon-guide-card li em{font-size:10px}
}

/* 3.40 — cinematic chamber artwork and an unframed twin-dragon hero. */
body[data-site-page="home"] .hero{
  grid-template-columns:minmax(0,1fr);
  min-height:690px;
  padding:clamp(62px,7vw,112px);
  background:
    linear-gradient(90deg,rgba(2,2,2,.98) 0%,rgba(3,3,3,.9) 47%,rgba(3,3,3,.3) 74%,rgba(3,3,3,.12) 100%),
    url("assets/theme/kings-council-chamber.webp") 61% 48%/cover no-repeat;
}
body[data-site-page="home"] .hero::before{
  display:block!important;content:"";position:absolute;z-index:2;
  inset:auto 1% auto auto;top:50%;width:32%;height:76%;transform:translateY(-50%);
  border:0!important;box-shadow:none!important;opacity:1!important;
  background:url("assets/theme/twin-dragon-crest-v2.webp") center/contain no-repeat!important;
  filter:drop-shadow(0 30px 45px rgba(0,0,0,.95)) drop-shadow(0 0 28px rgba(224,111,29,.22));
  pointer-events:none;
}
body[data-site-page="home"] .hero::after{display:none!important}
body[data-site-page="home"] .hero-copy{position:relative;z-index:3;max-width:min(850px,58%)}
.hero-dragon-crest{display:none}

.portal-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:20px}
.portal-card,.portal-card.optimizer,.portal-card:last-child,
.portal-card:nth-child(1),.portal-card:nth-child(2){
  grid-column:span 4;
  min-height:320px;
  padding:38px 30px 70px;
  border:1px solid rgba(201,157,80,.34);
  background-position:center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  box-shadow:0 24px 62px rgba(0,0,0,.48),inset 0 1px rgba(255,220,148,.06);
}
.portal-card::before,.portal-card::after{display:none!important}
.portal-card[href*="rts"]{background-image:linear-gradient(90deg,rgba(5,5,6,.98),rgba(5,5,6,.78) 48%,rgba(5,5,6,.08)),url("assets/theme/card-rts-v2.webp")!important}
.portal-card[href*="world-map"]{background-image:linear-gradient(90deg,rgba(5,4,3,.98),rgba(5,4,3,.76) 48%,rgba(5,4,3,.08)),url("assets/theme/card-world-v2.webp")!important}
.portal-card[href*="rebel"]{background-image:linear-gradient(90deg,rgba(6,4,3,.98),rgba(6,4,3,.78) 48%,rgba(6,4,3,.08)),url("assets/theme/card-rebels-v2.webp")!important}
.portal-card[href*="dragon"]{background-image:linear-gradient(90deg,rgba(5,3,3,.98),rgba(5,3,3,.76) 48%,rgba(5,3,3,.06)),url("assets/theme/card-dragon-v2.webp")!important}
.portal-card[href*="equipment"]{background-image:linear-gradient(90deg,rgba(4,4,4,.98),rgba(4,4,4,.76) 48%,rgba(4,4,4,.06)),url("assets/theme/card-equipment-v2.webp")!important}
.portal-card[href*="guides"]{background-image:linear-gradient(90deg,rgba(5,4,3,.98),rgba(5,4,3,.76) 48%,rgba(5,4,3,.06)),url("assets/theme/card-guides-v2.webp")!important}
.portal-card>span,.portal-card h3,.portal-card p{position:relative;z-index:2;text-align:left;max-width:64%}
.portal-card h3{font-size:clamp(29px,2.2vw,38px);text-shadow:0 3px 15px #000}
.portal-card p{font-size:13px;color:#c6c0b5;text-shadow:0 2px 8px #000}
.portal-card>b{z-index:2;left:30px;bottom:27px;text-shadow:0 2px 8px #000}
.portal-card:hover{transform:translateY(-7px) scale(1.008);border-color:#d1a04c;box-shadow:0 34px 78px rgba(0,0,0,.62),0 0 0 1px rgba(232,181,91,.14)}

@media(max-width:1180px){
  body[data-site-page="home"] .hero-copy{max-width:61%}
  body[data-site-page="home"] .hero::before{right:.5%;width:30%;height:68%}
  .portal-card,.portal-card.optimizer,.portal-card:last-child,.portal-card:nth-child(1),.portal-card:nth-child(2){grid-column:span 6}
}
@media(max-width:760px){
  body[data-site-page="home"] .hero{min-height:720px;padding:42px 24px 260px;background-position:68% center}
  body[data-site-page="home"] .hero-copy{max-width:none}
  body[data-site-page="home"] .hero::before{inset:auto 18% 12px auto;top:auto;width:64%;height:235px;transform:none}
  .portal-card,.portal-card.optimizer,.portal-card:last-child,.portal-card:nth-child(1),.portal-card:nth-child(2){grid-column:1/-1;min-height:280px;padding:28px 24px 64px}
  .portal-card>span,.portal-card h3,.portal-card p{max-width:72%}
  .portal-card>b{left:24px;bottom:22px}
}

/* 3.41 — one council crest, seven page-specific forged emblems. */
@media(min-width:981px){
  .topbar::after{display:none!important}
  .brand{padding-bottom:24px!important}
}
.brand-mark{
  background:url("assets/theme/emblem-home-v3.webp") center/contain no-repeat!important;
  border:0!important;box-shadow:none!important;filter:drop-shadow(0 7px 12px #000)
}
.nav a::before{
  content:""!important;width:34px!important;height:34px!important;border:0!important;border-radius:0!important;
  background-color:transparent!important;background-position:center!important;background-repeat:no-repeat!important;background-size:contain!important;
  box-shadow:none!important;filter:drop-shadow(0 5px 7px rgba(0,0,0,.82));
}
.nav a::after{display:none!important}
.nav a[data-site-link="home"]::before{background-image:url("assets/theme/emblem-home-v3.webp")!important}
.nav a[data-site-link="rts"]::before{background-image:url("assets/theme/emblem-rts-v3.webp")!important}
.nav a[data-site-link="world-map"]::before{background-image:url("assets/theme/emblem-world-v3.webp")!important}
.nav a[data-site-link="rebel"]::before{background-image:url("assets/theme/emblem-rebel-v3.webp")!important}
.nav a[data-site-link="dragon"]::before{background-image:url("assets/theme/emblem-dragon-v3.webp")!important}
.nav a[data-site-link="equipment"]::before{background-image:url("assets/theme/emblem-equipment-v3.webp")!important}
.nav a[data-site-link="guides"]::before{background-image:url("assets/theme/emblem-guides-v3.webp")!important}

body[data-site-page="rts"] .page-masthead::before{background-image:url("assets/theme/emblem-rts-v3.webp")}
body[data-site-page="world-map"] .page-masthead::before{background-image:url("assets/theme/emblem-world-v3.webp")}
body[data-site-page="rebel"] .page-masthead::before{background-image:url("assets/theme/emblem-rebel-v3.webp")}
body[data-site-page="dragon"] .page-masthead::before{background-image:url("assets/theme/emblem-dragon-v3.webp")}
body[data-site-page="equipment"] .page-masthead::before{background-image:url("assets/theme/emblem-equipment-v3.webp")}
body[data-site-page="guides"] .page-masthead::before{background-image:url("assets/theme/emblem-guides-v3.webp")}
body[data-site-page="friendship"] .page-masthead::before{background-image:url("assets/theme/emblem-friendship-v1.webp")}

.council-quick-links a:nth-child(1) i{background-image:url("assets/theme/emblem-rts-v3.webp")}
.council-quick-links a:nth-child(2) i{background-image:url("assets/theme/emblem-world-v3.webp")}
.council-quick-links a:nth-child(3) i{background-image:url("assets/theme/emblem-rebel-v3.webp")}

/* Plain rectangular information panels: no clipped-corner arrows or ornamental ticks. */
.about-card{clip-path:none!important;border-radius:2px!important;position:relative}
.about-card::before,.about-card::after{display:none!important;content:none!important}

/* 3.42 — walkthrough polish: remove the repeated UI-template corner glyphs. */
.card-surface::before,.card-surface::after,
.setup-card::before,.setup-card::after,
.advanced::before,.advanced::after,
.comparison::before,.comparison::after,
.enemy-matchup::before,.enemy-matchup::after,
.rebel-team-result::before,.rebel-team-result::after,
.rebel-alternatives::before,.rebel-alternatives::after,
.rebel-evidence-card::before,.rebel-evidence-card::after,
.recommended-build-panel::before,.recommended-build-panel::after,
.equipment-build-recommendation::before,.equipment-build-recommendation::after,
.full-guide-card::before,.full-guide-card::after,
.game-guide-card::before,.game-guide-card::after,
.world-map-team-builder::before,.world-map-team-builder::after,
.world-map-result-card::after,
.results-placeholder::before,.results-placeholder::after{
  content:none!important;display:none!important
}

/* Keep functional cards handsome without the artificial clipped-corner language. */
.card-surface,.setup-card,.advanced,.comparison,.enemy-matchup,
.rebel-team-result,.rebel-alternatives,.rebel-evidence-card,
.recommended-build-panel,.equipment-build-recommendation,
.full-guide-card,.game-guide-card,.world-map-team-builder,.results-placeholder{
  clip-path:none!important;border-radius:3px!important
}

/* Prevent short companion panels from stretching into tall empty boxes. */
.account-build-grid,.equipment-builder-workspace,.rebel-workspace{align-items:start}
.weapon-rules-panel,.equipment-summary-rail{align-self:start}

/* Page-specific database introductions replace the repeated generic template voice. */
body[data-site-page="dragon"] .player-database-section{padding-top:42px}
body[data-site-page="equipment"] .player-database-section{padding-top:42px}
body[data-site-page="guides"] .player-database-section{padding-top:42px}

/* Quieter framing lets content and generated heraldry lead the visual hierarchy. */
.database-tabs,.equipment-database-toolbar,.guide-library-toolbar{
  box-shadow:0 14px 36px rgba(0,0,0,.26)!important
}
.full-guide-card,.game-guide-card{
  background:linear-gradient(155deg,rgba(27,20,15,.96),rgba(9,9,9,.99) 76%)!important;
  border-color:#493722!important
}
.community-credit-card::before{
  content:""!important;display:block!important;position:absolute;left:24px;top:50%;
  width:56px;height:56px;transform:translateY(-50%);
  background:url("assets/theme/emblem-guides-v3.webp") center/contain no-repeat!important;
  opacity:.62;filter:drop-shadow(0 6px 10px #000)
}


/* ========================================================================== */
/* WEBSITE 3.43 — WARM IRON PASS + WORLD MAP FORMATION HEADER REBUILD          */
/* Removes residual blue/steel dashboard tint and the oval Column header shape. */
/* ========================================================================== */
:root{
  --bg:#080706;
  --bg2:#0d0a08;
  --surface:#120e0b;
  --surface2:#19120e;
  --surface3:#21170f;
  --line:#463522;
  --text:#f2eadb;
  --muted:#a69a86;
  --grey:#9f9587;
}
body[data-site-page="equipment"]{--tool-accent:#a77d47;--tool-accent-rgb:167,125,71}

/* Generic controls and bars should read as soot, iron and leather — never navy. */
.search-wrap,.guide-search,
.setup-card select,.advanced select,.rebel-controls select,
.world-map-slot-body select,.whatif-grid select,
.roster-toolbar,.database-tabs,.equipment-database-toolbar,.guide-library-toolbar,
.battle-tool-tabs,.result-tabs{
  background-color:#0f0c0a!important;
  border-color:#4a3927!important;
}
.secondary,.ghost{
  background:linear-gradient(180deg,#1f1711,#0d0b09)!important;
  border-color:#5d452d!important;
  color:#d8c9ad!important;
}
.secondary:hover,.ghost:hover{
  background:linear-gradient(180deg,#302117,#15100c)!important;
  border-color:#9b713b!important;
  color:#f2dfb7!important;
}

/* Five-commander formation: deliberately flat, rectangular, forged-metal headers. */
.world-map-team-builder{
  gap:12px!important;
}
.world-map-slot{
  position:relative!important;
  border:1px solid #4b3926!important;
  border-radius:2px!important;
  clip-path:none!important;
  background:linear-gradient(180deg,#110d0a,#090807)!important;
  box-shadow:inset 0 0 0 1px rgba(208,159,84,.045),0 12px 28px rgba(0,0,0,.28)!important;
  overflow:hidden!important;
}
.world-map-slot::before,.world-map-slot::after{
  content:none!important;
  display:none!important;
}
.world-map-slot-label{
  position:relative!important;
  z-index:4!important;
  min-height:39px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:9px 10px 8px 12px!important;
  margin:0!important;
  color:#e4bd69!important;
  background:linear-gradient(180deg,#251a10 0%,#17100c 100%)!important;
  border:0!important;
  border-bottom:1px solid #71502a!important;
  border-left:3px solid #b77c36!important;
  border-radius:0!important;
  clip-path:none!important;
  box-shadow:inset 0 1px rgba(255,224,166,.06)!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.13em!important;
  line-height:1!important;
  text-transform:uppercase!important;
  transform:none!important;
}
.world-map-slot-label::before,.world-map-slot-label::after{
  content:none!important;
  display:none!important;
  border:0!important;
  border-radius:0!important;
  clip-path:none!important;
  background:none!important;
  box-shadow:none!important;
}
.slot-lock-btn{
  min-width:37px!important;
  padding:5px 7px 4px!important;
  border:1px solid #59442d!important;
  border-radius:1px!important;
  clip-path:none!important;
  background:#0d0b09!important;
  color:#bca67d!important;
  box-shadow:inset 0 1px rgba(255,255,255,.025)!important;
  transform:none!important;
}
.slot-lock-btn:hover:not(:disabled){
  border-color:#a97a3c!important;
  color:#efd596!important;
  background:#1b130d!important;
}
.slot-lock-btn:disabled{opacity:.58!important}
.slot-lock-btn.active,.active-lock{
  border-color:#bc8b43!important;
  color:#f1cf7b!important;
  background:#26190d!important;
}
.world-map-portrait{
  background:#070605!important;
  border-bottom:1px solid #2d2218!important;
}
.world-map-empty-portrait{color:#584937!important}
.world-map-slot-body{
  background:linear-gradient(180deg,#0d0a08,#090807)!important;
}
.world-map-slot-body small,.world-map-slot-stats.muted span{color:#948875!important}
.world-map-slot-stats span{
  background:#15100c!important;
  border-color:#4a3926!important;
  color:#c9b99c!important;
}
.world-map-role-pill{
  background:rgba(176,126,57,.09)!important;
  border-color:rgba(205,157,82,.34)!important;
  color:#dfbf7a!important;
}
.world-map-builder,.world-map-intro,.ultimate-army,
.world-map-summary-grid>div,.ultimate-rule-grid>div,.ultimate-tournament-note{
  background-color:#0d0a08!important;
  border-color:#4a3926!important;
}
.world-map-builder-head p,.world-map-scope small,.ultimate-army-head p,
.world-map-team-summary p{color:#9f9482!important}

/* Warm the remaining high-visibility panels that previously exposed blue-grey legacy fills. */
.rebel-rule-strip>div,.rebel-column,.rebel-evidence-stats>div,.rebel-team-notes>div,.rebel-alt,
.comparison-team,.scope-stat,.comparison-metric,.comparison-optimized-list,.comparison-plan,
.whatif-grid article,.insight-output,.stability-grid>div,.team-compare-side,.portfolio-compare-side,
.equipment-optimizer-handoff,.meta-badge,.toast{
  background-color:#0f0c0a!important;
  border-color:#463626!important;
}
.rebel-dragon-banner,.rebel-enzo-note{
  background:linear-gradient(90deg,rgba(151,100,48,.13),rgba(13,10,8,.62))!important;
  border-color:#65462b!important;
  color:#cbb797!important;
}
.rebel-dragon-banner b,.rebel-enzo-note strong{color:#e3c68e!important}
.rebel-dragon-banner span,.rebel-enzo-note span{color:#aa9a83!important}

/* Semantic rarity colors remain untouched; all structural chrome stays warm. */

/* Website 3.44 — T5 Scripture Planner chamber */
body[data-site-page="scriptures"]{--tool-accent:#b98a47;--tool-accent-rgb:185,138,71}
body[data-site-page="scriptures"] [data-site-link="scriptures"]{
  background:linear-gradient(90deg,rgba(var(--tool-accent-rgb),.38),rgba(35,20,13,.75) 58%,rgba(10,9,8,.72));
  border-color:rgba(var(--tool-accent-rgb),.6);
  box-shadow:inset 4px 0 var(--tool-accent),0 10px 28px rgba(0,0,0,.3);
}
.nav a[data-site-link="scriptures"]::before{background-image:url("assets/theme/emblem-scriptures-v4.webp")!important}
body[data-site-page="scriptures"] .page-masthead::before{background-image:url("assets/theme/emblem-scriptures-v4.webp")!important}
.portal-card[href*="scriptures"]{background-image:linear-gradient(90deg,rgba(5,4,3,.98),rgba(5,4,3,.77) 48%,rgba(5,4,3,.07)),url("assets/theme/card-scriptures-v2.svg")!important}
@media(min-width:1201px){.portal-grid>.portal-card:nth-child(n+4){grid-column:span 3!important}}
body[data-site-page="friendship"]{--tool-accent:#b6844d;--tool-accent-rgb:182,132,77}
body[data-site-page="friendship"] [data-site-link="friendship"]{
  background:linear-gradient(90deg,rgba(var(--tool-accent-rgb),.38),rgba(35,20,13,.75) 58%,rgba(10,9,8,.72));
  border-color:rgba(var(--tool-accent-rgb),.6);
  box-shadow:inset 4px 0 var(--tool-accent),0 10px 28px rgba(0,0,0,.3);
}
.nav a[data-site-link="friendship"]::before{background-image:url("assets/theme/emblem-friendship-v1.webp")!important}
.portal-card[href*="friendship"]{background-image:linear-gradient(90deg,rgba(5,4,3,.98),rgba(5,4,3,.77) 48%,rgba(5,4,3,.07))!important}



/* v3.49 — homepage card art for T5 Planner + Friendship */
/* Use dedicated room artwork like the other homepage chambers. */
.portal-card[href*="scriptures"]{
  background-image:
    linear-gradient(90deg,rgba(5,4,3,.992) 0%,rgba(5,4,3,.90) 38%,rgba(5,4,3,.48) 66%,rgba(5,4,3,.16) 100%),
    url("assets/theme/card-scriptures-home-v1.png")!important;
  background-repeat:no-repeat,no-repeat!important;
  background-position:center center,center center!important;
  background-size:auto,cover!important;
}
.portal-card[href*="scriptures"]::before{
  opacity:0!important;
}
.portal-card[href*="friendship"]{
  background-image:
    linear-gradient(90deg,rgba(5,4,3,.992) 0%,rgba(5,4,3,.90) 38%,rgba(5,4,3,.46) 66%,rgba(5,4,3,.16) 100%),
    url("assets/theme/card-friendship-home-v1.png")!important;
  background-repeat:no-repeat,no-repeat!important;
  background-position:center center,center center!important;
  background-size:auto,cover!important;
}
.portal-card[href*="friendship"]::before{
  opacity:0!important;
}

/* Friendship page header: align with the shared room masthead layout. */
.friendship-masthead{
  background:
    linear-gradient(90deg,rgba(7,6,5,.988) 0%,rgba(9,8,6,.92) 42%,rgba(10,8,6,.42) 70%,rgba(22,14,10,.18) 100%),
    radial-gradient(circle at 82% 50%,rgba(182,132,77,.16),transparent 18rem),
    url("assets/theme/card-friendship-home-v1.png") center/cover no-repeat!important;
}
.friendship-masthead::before{
  right:54px!important;width:182px!important;height:182px!important;opacity:.95!important;
  filter:drop-shadow(0 18px 32px rgba(0,0,0,.92)) drop-shadow(0 0 24px rgba(182,132,77,.18))!important;
}
.friendship-masthead .page-masthead-copy{max-width:860px}
.friendship-masthead .page-masthead-meta{position:relative;z-index:2}

/* Scripture page header: make the crest feel embedded into the chamber rather than pasted on. */
.scripture-masthead{
  background:
    linear-gradient(90deg,rgba(7,6,5,.985) 0%,rgba(10,8,6,.92) 44%,rgba(13,9,7,.54) 70%,rgba(52,29,18,.3) 100%),
    radial-gradient(circle at 82% 50%,rgba(197,151,77,.18),transparent 18rem),
    url("assets/theme/war-room-masthead-v2.png") center/cover no-repeat!important;
}
.scripture-masthead::before{
  right:54px!important;width:188px!important;height:188px!important;opacity:.95!important;
  filter:drop-shadow(0 18px 32px rgba(0,0,0,.92)) drop-shadow(0 0 24px rgba(214,173,88,.2))!important;
}
.scripture-masthead .page-masthead-copy{max-width:860px}
.scripture-masthead .page-masthead-meta{position:relative;z-index:2}

/* Friendship page deserves a proper chamber hero with the handshake room emblem. */
.friendship-hero{
  position:relative;overflow:hidden;min-height:350px;
  padding:56px 320px 44px 0!important;
  background:
    linear-gradient(90deg,rgba(5,4,3,.985) 0%,rgba(6,5,4,.93) 47%,rgba(6,5,4,.44) 70%,rgba(25,15,10,.18) 100%),
    radial-gradient(circle at 82% 48%,rgba(175,119,66,.18),transparent 18rem),
    url("assets/theme/kings-council-chamber.webp") center/cover no-repeat;
  border:1px solid rgba(197,154,81,.28);
  clip-path:polygon(0 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%);
  box-shadow:0 30px 80px rgba(0,0,0,.46),inset 0 -1px rgba(182,132,77,.3);
}
.friendship-hero::before{
  content:"";position:absolute;inset:16px 16px 16px 16px;pointer-events:none;
  border:1px solid rgba(214,173,88,.16);
}
.friendship-hero::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:2px;
  background:linear-gradient(90deg,transparent,#a13d2f 18%,#d5a555 52%,#a13d2f 86%,transparent);
}
.friendship-hero .hero-copy{position:relative;z-index:2;max-width:820px!important;padding-left:42px}
.friendship-hero .hero-copy p{max-width:760px}
.friendship-hero .hero-actions{position:relative;z-index:2}
.friendship-hero .hero-dragon-crest{
  display:block!important;position:absolute;right:58px;top:50%;transform:translateY(-50%);
  width:190px;height:190px;object-fit:contain;opacity:.96;z-index:1;
  filter:drop-shadow(0 18px 28px rgba(0,0,0,.92)) drop-shadow(0 0 22px rgba(182,132,77,.22));
}
.friendship-source-note{position:relative;z-index:2;max-width:720px;color:#b8ac99}
body[data-site-page="friendship"] [data-site-link="friendship"]::before{filter:drop-shadow(0 5px 7px rgba(0,0,0,.82)) drop-shadow(0 0 12px rgba(182,132,77,.15))}

@media(max-width:1180px){
  .friendship-hero{padding-right:240px!important}
  .friendship-hero .hero-dragon-crest{right:34px;width:152px;height:152px}
  .scripture-masthead::before{right:34px!important;width:156px!important;height:156px!important}
  .portal-card[href*="scriptures"]::before,.portal-card[href*="friendship"]::before{width:132px!important;height:132px!important}
}
@media(max-width:760px){
  .friendship-hero{min-height:0;padding:40px 24px 170px!important}
  .friendship-hero .hero-copy{padding-left:0}
  .friendship-hero .hero-dragon-crest{right:50%;top:auto;bottom:18px;transform:translateX(50%);width:126px;height:126px}
}


/* v3.51 — room-specific masthead artwork reused from homepage cards */
/* Each room now uses the same bespoke environment artwork as its homepage chamber card. */
body[data-site-page="rts"] .page-masthead{
  background:
    linear-gradient(90deg,rgba(4,4,4,.995) 0%,rgba(4,4,4,.92) 39%,rgba(4,4,4,.50) 67%,rgba(4,4,4,.13) 100%),
    linear-gradient(0deg,rgba(var(--tool-accent-rgb),.08),transparent 72%),
    url("assets/theme/card-rts-v2.webp") 66% 50%/cover no-repeat!important;
}
body[data-site-page="world-map"] .page-masthead{
  background:
    linear-gradient(90deg,rgba(4,3,3,.995) 0%,rgba(4,3,3,.91) 39%,rgba(4,3,3,.46) 66%,rgba(4,3,3,.11) 100%),
    linear-gradient(0deg,rgba(var(--tool-accent-rgb),.08),transparent 72%),
    url("assets/theme/card-world-v2.webp") 62% 51%/cover no-repeat!important;
}
body[data-site-page="rebel"] .page-masthead{
  background:
    linear-gradient(90deg,rgba(5,4,3,.995) 0%,rgba(5,4,3,.92) 39%,rgba(5,4,3,.48) 67%,rgba(5,4,3,.11) 100%),
    linear-gradient(0deg,rgba(var(--tool-accent-rgb),.08),transparent 72%),
    url("assets/theme/card-rebels-v2.webp") 65% 50%/cover no-repeat!important;
}
body[data-site-page="dragon"] .page-masthead{
  background:
    linear-gradient(90deg,rgba(4,3,3,.995) 0%,rgba(4,3,3,.93) 39%,rgba(4,3,3,.50) 67%,rgba(4,3,3,.12) 100%),
    linear-gradient(0deg,rgba(var(--tool-accent-rgb),.08),transparent 72%),
    url("assets/theme/card-dragon-v2.webp") 66% 49%/cover no-repeat!important;
}
body[data-site-page="equipment"] .page-masthead{
  background:
    linear-gradient(90deg,rgba(4,4,4,.995) 0%,rgba(4,4,4,.92) 39%,rgba(4,4,4,.48) 67%,rgba(4,4,4,.11) 100%),
    linear-gradient(0deg,rgba(var(--tool-accent-rgb),.08),transparent 72%),
    url("assets/theme/card-equipment-v2.webp") 66% 49%/cover no-repeat!important;
}
body[data-site-page="scriptures"] .page-masthead{
  background:
    linear-gradient(90deg,rgba(5,4,3,.995) 0%,rgba(5,4,3,.91) 39%,rgba(5,4,3,.46) 67%,rgba(5,4,3,.11) 100%),
    linear-gradient(0deg,rgba(var(--tool-accent-rgb),.08),transparent 72%),
    url("assets/theme/card-scriptures-home-v1.png") 61% 50%/cover no-repeat!important;
}
body[data-site-page="friendship"] .page-masthead{
  background:
    linear-gradient(90deg,rgba(5,4,3,.995) 0%,rgba(5,4,3,.91) 39%,rgba(5,4,3,.44) 67%,rgba(5,4,3,.10) 100%),
    linear-gradient(0deg,rgba(var(--tool-accent-rgb),.08),transparent 72%),
    url("assets/theme/card-friendship-home-v1.png") 62% 50%/cover no-repeat!important;
}
body[data-site-page="guides"] .page-masthead{
  background:
    linear-gradient(90deg,rgba(5,4,3,.995) 0%,rgba(5,4,3,.93) 39%,rgba(5,4,3,.51) 68%,rgba(5,4,3,.12) 100%),
    linear-gradient(0deg,rgba(var(--tool-accent-rgb),.08),transparent 72%),
    url("assets/theme/card-guides-v2.webp") 66% 50%/cover no-repeat!important;
}

/* Keep page crests floating above their bespoke room scenes. */
body[data-site-page="rts"] .page-masthead::before,
body[data-site-page="world-map"] .page-masthead::before,
body[data-site-page="rebel"] .page-masthead::before,
body[data-site-page="dragon"] .page-masthead::before,
body[data-site-page="equipment"] .page-masthead::before,
body[data-site-page="scriptures"] .page-masthead::before,
body[data-site-page="friendship"] .page-masthead::before,
body[data-site-page="guides"] .page-masthead::before{
  opacity:.94!important;
  filter:drop-shadow(0 18px 32px rgba(0,0,0,.94)) drop-shadow(0 0 20px rgba(var(--tool-accent-rgb),.18))!important;
}

@media(max-width:980px){
  body[data-site-page="rts"] .page-masthead,
  body[data-site-page="world-map"] .page-masthead,
  body[data-site-page="rebel"] .page-masthead,
  body[data-site-page="dragon"] .page-masthead,
  body[data-site-page="equipment"] .page-masthead,
  body[data-site-page="scriptures"] .page-masthead,
  body[data-site-page="friendship"] .page-masthead,
  body[data-site-page="guides"] .page-masthead{background-position:center center,center center,62% center!important}
}


/* Website 3.53 — persistent War Room music player */
.site-music-player{
  position:sticky;
  top:0;
  z-index:74;
  min-height:56px;
  border-bottom:1px solid rgba(197,154,81,.28);
  background:
    linear-gradient(90deg,rgba(34,23,15,.97),rgba(14,12,10,.985) 46%,rgba(11,10,8,.99)),
    #0d0b09;
  box-shadow:0 12px 30px rgba(0,0,0,.34),inset 0 1px rgba(246,211,143,.035);
  backdrop-filter:blur(14px);
}
.site-music-player::before{
  content:"";
  position:absolute;
  left:0;right:0;top:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(216,173,91,.55),transparent);
  pointer-events:none;
}
.site-music-player-inner{
  width:min(1780px,calc(100% - 72px));
  min-height:56px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:7px 0;
}
.music-now-playing{min-width:0;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.music-kicker{color:#a88750;font-size:8px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;white-space:nowrap}
.music-current-line{color:#b8ad9c;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.music-current-line strong{color:#f0dfbd;font-family:Georgia,"Times New Roman",serif;font-size:14px;font-weight:700}
.music-playback-notice{display:none;color:#cda75e;font-size:9px;line-height:1.25}
.site-music-player.autoplay-blocked .music-playback-notice{display:inline}
.music-controls{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex:0 0 auto}
.music-control-button{
  min-height:34px;
  padding:7px 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  border:1px solid #4d3b28;
  border-radius:2px;
  background:linear-gradient(180deg,#221810,#0d0b09);
  color:#cdbc9b;
  font-size:9px;
  font-weight:850;
  letter-spacing:.04em;
  cursor:pointer;
  transition:border-color .15s ease,color .15s ease,background .15s ease,transform .15s ease;
}
.music-control-button:hover{border-color:#9a7139;color:#f0d89f;background:linear-gradient(180deg,#322216,#14100c);transform:translateY(-1px)}
.music-play-button{width:36px;padding:7px;font-size:12px}
.music-repeat-button.is-active{border-color:#bd8d45;color:#f1cf7c;background:linear-gradient(180deg,#392513,#17100b);box-shadow:inset 0 0 0 1px rgba(226,172,79,.1)}
.music-volume-control{display:grid;grid-template-columns:auto minmax(90px,140px) 34px;align-items:center;gap:8px;margin-left:4px;color:#9f9585;font-size:8px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}
.music-volume-control input{width:100%;accent-color:#c6984e;cursor:pointer}
.music-volume-control output{min-width:34px;color:#d7c49d;font-variant-numeric:tabular-nums;text-align:right}
@media(max-width:1180px){
  .site-music-player-inner{width:min(100% - 36px,1100px);gap:14px}
  .music-kicker{display:none}
  .music-volume-control{grid-template-columns:minmax(75px,110px) 34px}
  .music-volume-label{display:none}
}
@media(max-width:980px){
  .site-music-player{position:relative;top:auto;z-index:45}
  .site-music-player-inner{width:min(100% - 24px,900px);min-height:62px;gap:8px}
  .music-now-playing{flex:1 1 auto}
  .music-current-line{max-width:42vw}
  .music-controls{gap:5px}
}
@media(max-width:650px){
  .site-music-player-inner{display:grid;grid-template-columns:1fr;gap:7px;padding:9px 0 10px}
  .music-now-playing{display:grid;gap:2px}
  .music-current-line{max-width:100%;font-size:10px}
  .music-current-line strong{font-size:13px}
  .music-controls{justify-content:flex-start;flex-wrap:wrap}
  .music-volume-control{flex:1 1 150px;display:grid;grid-template-columns:minmax(90px,1fr) 34px;margin-left:2px}
}
