/* Smaller headings use transparent backgrounds without an underline. Page titles
   use a centred enamel street-sign treatment, independent of button styling. */
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) :is(h1,h2,h3,h4,h5,h6,.help-heading,.help-topic-title,[role="heading"]){
 background:transparent;color:#ff9700;border:0;border-radius:0;box-shadow:none;
 padding:10px 14px;min-width:0;max-width:100%;overflow-wrap:anywhere;
 font-family:Arial,Helvetica,sans-serif;font-weight:900;line-height:1.25;letter-spacing:normal;text-transform:none;
}
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) h1{font-size:clamp(1.5rem,3.5vw,2rem)}
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) h2{font-size:1.25rem}
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) :is(h3,h4,h5,h6,.help-topic-title,[role="heading"]:not(h1,h2)){font-size:1rem}
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) .help-heading{width:100%;align-items:center}
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) .help-heading>:is(h1,h2,h3,h4,h5,h6){
 background:transparent;border:0;padding:0;flex:0 1 auto;
}
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) :is(h1,h2,h3,h4,h5,h6)>a:not(.thing-link){color:inherit}
/* A purchase manuscript prints its heading in embossed dark ink. */
body.game-body :is(#main,#content,#wrapper #content) .embassy-contract h2{color:#392c19;padding:0;margin:20px 0 6px;font-size:1.4rem;text-shadow:0 1px #fff,0 -1px #8c775a55}

body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) :is(h1:not(.visually-hidden,.sr-only,[hidden]),.help-heading:has(>h1)){
 position:relative;isolation:isolate;box-sizing:border-box;width:fit-content;max-width:100%;margin:8px auto 24px;padding:18px 38px;
 background:linear-gradient(175deg,#f6f5ef,#eeede6 65%,#e6e4da);color:#151515;border:6px double #151515;border-radius:4px;
 box-shadow:0 0 0 1px #b4b4af,inset 0 1px 1px #fff,inset 0 -2px 3px #706c5a33,0 3px 5px #0007;text-align:center;letter-spacing:normal;text-transform:none;
 align-self:center;justify-self:center;justify-content:center;
}
/* Decorative hardware and fixed irregular grime stay behind the readable title.
   SVG views give each screw its own slot angle without adding DOM or controls. */
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) :is(h1:not(.visually-hidden,.sr-only,[hidden]),.help-heading:has(>h1))::before{
 content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
 background:url('/assets/heading-hardware.svg#north-west') left 3px top 3px/18px 18px no-repeat,
 url('/assets/heading-hardware.svg#north-east') right 3px top 3px/18px 18px no-repeat,
 url('/assets/heading-hardware.svg#south-west') left 3px bottom 3px/18px 18px no-repeat,
 url('/assets/heading-hardware.svg#south-east') right 3px bottom 3px/18px 18px no-repeat;
}
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) :is(h1:not(.visually-hidden,.sr-only,[hidden]),.help-heading:has(>h1))::after{
 content:"";position:absolute;inset:0;z-index:-2;pointer-events:none;
 background:url('/assets/heading-grime.svg') center/100% 100% no-repeat;opacity:.76;
}
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) .help-heading>h1{
 width:auto;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;color:inherit;
}
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) .help-heading>h1::before,
body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) .help-heading>h1::after{content:none}
body.game-body :is(#main,#content,#wrapper #content) .page-title:has(h1){display:block}
body.game-body :is(#main,#content,#wrapper #content) .page-title>div:has(h1){width:100%}
body.game-body :is(#main,#content,#wrapper #content) :is(.workshop-factories .workshop-build-card,.workshop-factories .workshop-station,.moon-card,.gadget-card,.item-card,.shop-card,.profession-card,.container-card,.commerce-card,.miner-card,.faction-card,.stone-card,.credit-bundle) :is(h2,h3,h4,h5,h6,.help-heading:not(:has(>h1)),.help-topic-title){background:transparent;color:#202020}
@media(max-width:600px){
 body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) :is(h1:not(.visually-hidden,.sr-only,[hidden]),.help-heading:has(>h1)){width:100%;margin:0 auto 12px;padding:6px 27px;letter-spacing:normal}
 body.game-body :is(#main,#content,#wrapper #content,.hearthmere-coach,.map-encounter-dialog,dialog) .help-heading>h1{width:auto;margin:0;padding:0}
 body.game-body :is(#main,#content,#wrapper #content) .page-title:has(h1){gap:8px;margin-bottom:12px;padding-block:0}
}

/* Shared heading typography wins over imported component labels. Keep source
   casing (including names and acronyms), without decorative tracking. */
@layer shared-heading-type {
 .game-body :is(h1,h2,h3,h4,h5,h6,[role="heading"],.help-heading,.help-topic-title,.eyebrow,legend,th,dt),
 .game-body :is(h1,h2,h3,h4,h5,h6,[role="heading"],.eyebrow,legend,th,dt) :is(a,span,strong,small){
  font-family:Arial,Helvetica,sans-serif!important;text-transform:none!important;letter-spacing:normal!important;font-style:normal!important;
 }
}

/* The public landing headline is part of the hero artwork, not a game page plaque. */
body.game-body #main .rebirth-landing .landing-hero #landing-title{
 width:auto;max-width:100%;margin:.6rem 0 1.45rem;padding:0;
 background:transparent;color:#f5f0e6;border:0;border-radius:0;box-shadow:none;
 text-align:left;font:900 clamp(40px,5vw,76px)/1.05 Arial,Helvetica,sans-serif;
 letter-spacing:normal;text-transform:none;overflow-wrap:anywhere;
 align-self:start;justify-self:start;
}
body.game-body #main .rebirth-landing .landing-hero #landing-title::before,
body.game-body #main .rebirth-landing .landing-hero #landing-title::after{content:none}
