/* T03 polish: historical type, compact estate and a fully visible desktop dynasty. */
@font-face{font-family:"1MD Alegreya";src:url("../assets/fonts/Alegreya-Variable.ttf") format("truetype");font-style:normal;font-weight:400 900;font-display:swap}
@font-face{font-family:"1MD Fraktur";src:url("../assets/fonts/UnifrakturCook-Bold.ttf") format("truetype");font-style:normal;font-weight:700;font-display:swap}

:root{--font-antiqua:"1MD Alegreya",Georgia,"Times New Roman",serif;--font-accent:"1MD Fraktur","1MD Alegreya",Georgia,serif;--font-interface:Arial,"Segoe UI",sans-serif}
body{font-family:var(--font-antiqua);font-kerning:normal}
button,input,select,textarea{font-family:var(--font-antiqua)}
.resource,.inspector-stat,.inline-effects,.action-change-table,.operations-table-wrap,.decision-number-table,.world-date,.turn-control,.condition-orb,.industrial-cockpit{font-variant-numeric:tabular-nums lining-nums}
.main-menu,.world-view-tabs small,.resource span,.turn-control span,.inspector-kicker,.badge,.action-status,.action-new-marker,.generation-label,.industrial-facility-copy small,.industrial-cockpit small,.action-change-table th,.operations-table-wrap th{font-family:var(--font-interface)}
.brand h1,.event-card>h2,.act-card>h2,.end-card>h2,.gallery-inscription strong,.building-label.timber-sign strong,.map-caption strong,.historical-fixpoint h2{font-family:var(--font-accent);font-weight:700;letter-spacing:.018em}
.action-summary-card strong,.action-detail-lead,.inspector-description,.history-ribbon p{font-family:var(--font-antiqua)}

@media(min-width:1101px){
  .world-column{--world-view-height:clamp(31rem,calc(100dvh - 16.75rem),46rem)}
  #world-view-estate .estate-map{height:var(--world-view-height);min-height:var(--world-view-height)}
  .map-location .art-sprite{transform:scale(.88);transform-origin:50% 100%}
  .map-location:hover .art-sprite,.map-location.selected .art-sprite{transform:translateY(-4px) scale(.9)}
  .condition-orb{transform:scale(.9);transform-origin:100% 0}
  .building-label.timber-sign{bottom:-2.8rem;width:clamp(12.75rem,107%,19.75rem);padding:.58rem .78rem .64rem}
  .building-label.timber-sign strong{margin-bottom:.18rem;font-size:1.02rem;line-height:1.08}
  .building-label.timber-sign span{font-size:.72rem;line-height:1.22}
  .building-label.timber-sign span+span{margin-top:.2rem;padding-top:.2rem}
  .building-label.home-sign{width:clamp(12.25rem,96%,16rem)}
  .building-label.timber-sign::before{bottom:-1.95rem;height:2rem}

  #world-view-dynasty .family-command{display:grid;grid-template-rows:auto minmax(0,1fr);height:var(--world-view-height)!important;min-height:0!important;overflow:hidden!important}
  #world-view-dynasty .family-org{height:100%;min-height:0;overflow:hidden}
  #world-view-dynasty .vertical-org-chart{box-sizing:border-box;display:grid;height:100%!important;min-height:0!important;grid-template-columns:1fr!important;grid-template-rows:minmax(0,.95fr) .22rem minmax(0,1.04fr) .22rem minmax(0,1.08fr) auto;align-content:stretch!important;gap:.22rem!important;padding:2.9rem .65rem .32rem!important;overflow:hidden}
  #world-view-dynasty .gallery-generation{box-sizing:border-box;display:grid;width:min(76rem,100%);height:100%;min-height:0;margin:auto;grid-template-rows:auto minmax(0,1fr);align-items:center;align-content:stretch;gap:.15rem}
  #world-view-dynasty .gallery-elder{grid-template-columns:minmax(0,22rem)}
  #world-view-dynasty .gallery-parents{grid-template-columns:repeat(2,minmax(0,22rem))}
  #world-view-dynasty .gallery-children{grid-template-columns:repeat(3,minmax(0,22rem))}
  #world-view-dynasty .generation-label{padding:.16rem .38rem;font-size:.67rem;line-height:1.1}
  #world-view-dynasty .org-chart-connector{height:100%;min-height:0}
  #world-view-dynasty .ancestor-card{box-sizing:border-box;display:grid;height:100%;min-height:0;grid-template-columns:auto minmax(0,1fr)!important;align-items:center;align-self:stretch;gap:.48rem;max-width:22rem;padding:0 .18rem;overflow:visible;text-align:left}
  #world-view-dynasty .ancestor-frame{width:auto!important;max-width:none!important;height:clamp(4.9rem,calc(var(--world-view-height)*.18),8.75rem)!important;aspect-ratio:4/5}
  #world-view-dynasty .ancestor-plaque{box-sizing:border-box;width:100%;min-width:0;min-height:0;margin:0;padding:.34rem .42rem;text-align:center;overflow:visible}
  #world-view-dynasty .ancestor-plaque strong{font-size:clamp(.72rem,1.05vw,.95rem);line-height:1.05;white-space:normal;overflow-wrap:anywhere;text-overflow:clip}
  #world-view-dynasty .ancestor-plaque small{margin-top:.1rem;font-size:clamp(.52rem,.72vw,.66rem);line-height:1.12;white-space:normal;overflow-wrap:anywhere}
  #world-view-dynasty .ancestor-focus,#world-view-dynasty .ancestor-lifecycle,#world-view-dynasty .ancestor-substitute{font-size:clamp(.5rem,.68vw,.63rem);line-height:1.08;white-space:normal;overflow-wrap:anywhere}
  #world-view-dynasty .ancestor-plaque em{margin-top:.18rem;padding-top:.16rem;font-size:clamp(.5rem,.66vw,.62rem);line-height:1.08;white-space:normal;overflow-wrap:anywhere}
  #world-view-dynasty .gallery-inscription{top:.42rem;padding:.28rem 1rem}
  #world-view-dynasty .gallery-inscription strong{font-size:1.2rem}
  #world-view-dynasty .gallery-hint{position:static;align-self:end;justify-self:center;margin:0;font-size:.58rem;line-height:1.1;text-align:center}
}

@media(min-width:1101px) and (max-height:820px){
  #world-view-dynasty .vertical-org-chart{padding-top:2.35rem!important}
  #world-view-dynasty .gallery-inscription{top:.22rem;padding:.18rem .8rem}
  #world-view-dynasty .gallery-inscription strong{font-size:1rem}
  #world-view-dynasty .gallery-inscription span{font-size:.44rem}
  #world-view-dynasty .ancestor-frame{height:clamp(4.35rem,calc(var(--world-view-height)*.165),6.5rem)!important}
}

.industrial-facility-motif{overflow:visible}
.industrial-facility-motif img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 6px 5px #000b);pointer-events:none}
.industrial-facility{overflow:visible;background:#15100ca8}
.industrial-facility-copy{position:relative;z-index:2}

@media(max-width:1100px){
  #world-view-dynasty .family-command{overflow:visible}
  #world-view-dynasty .ancestor-plaque strong,#world-view-dynasty .ancestor-plaque small,#world-view-dynasty .ancestor-plaque span,#world-view-dynasty .ancestor-plaque em{white-space:normal;overflow-wrap:anywhere}
}
