
/* The Tapestry of Us — Global Style Normalizer
   Loaded last on every page to keep typography, backgrounds, controls, sections,
   widgets, dropdowns, cards, and menu treatments consistent across EN/UK/PT. */
:root{
  --tou-bg:#110b16;
  --tou-bg-2:#1c1322;
  --tou-panel:rgba(31,20,38,.86);
  --tou-panel-soft:rgba(255,255,255,.055);
  --tou-border:rgba(232,204,142,.28);
  --tou-border-strong:rgba(232,204,142,.44);
  --tou-text:#f8efe2;
  --tou-muted:#d8c5a3;
  --tou-gold:#e8cc8e;
  --tou-gold-2:#c89b51;
  --tou-accent:#8f5f3f;
  --tou-radius:22px;
  --tou-radius-sm:14px;
  --tou-shadow:0 20px 60px rgba(0,0,0,.35);
  --tou-font: Georgia, 'Times New Roman', serif;
  --tou-ui: Inter, 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
html{scroll-behavior:smooth; background:var(--tou-bg)!important;}
body{
  margin:0;
  min-height:100vh;
  color:var(--tou-text)!important;
  background:
    radial-gradient(circle at 20% 8%, rgba(232,204,142,.13), transparent 34%),
    radial-gradient(circle at 85% 20%, rgba(143,95,63,.16), transparent 36%),
    linear-gradient(135deg, var(--tou-bg), var(--tou-bg-2) 58%, #0e0912)!important;
  font-family:var(--tou-font)!important;
  font-size:17px;
  line-height:1.72;
}
body, p, li, blockquote, figcaption, input, textarea, select, button{font-size:clamp(15px,1vw,18px);}
p{max-width:76ch;}
a{color:var(--tou-gold); text-decoration:none;}
a:hover{color:#fff2bf; text-decoration:none;}
img{max-width:100%; height:auto; border-radius:var(--tou-radius-sm);}
main, .page, .page-wrap, .content, .container, .site-container{width:min(1180px, calc(100% - 36px)); margin-inline:auto;}
section, .section, .story-section, .city-section, .world-section, .reader-section, .archive-section{
  box-sizing:border-box;
}
section:not(.hero):not(.site-hero), .section, .story-section, .city-section, .reader-card, .world-card, .memory-card, .museum-room, .archive-card, .passport-card{
  border:1px solid var(--tou-border);
  border-radius:var(--tou-radius);
  background:linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow:var(--tou-shadow);
  backdrop-filter:blur(10px);
}
section:not(.hero):not(.site-hero){padding:clamp(22px,3vw,42px); margin:clamp(22px,4vw,52px) auto;}
.hero, .site-hero, header.hero, .page-hero{
  border-radius:0 0 34px 34px;
  background-size:cover!important;
  background-position:center!important;
}
h1,h2,h3,h4,.section-title,.site-title,.page-title{
  font-family:var(--tou-font)!important;
  color:var(--tou-gold)!important;
  letter-spacing:.02em;
  line-height:1.18;
  text-wrap:balance;
}
h1,.page-title{font-size:clamp(2.15rem,5vw,4.65rem)!important;}
h2,.section-title{font-size:clamp(1.55rem,3.2vw,2.55rem)!important;}
h3{font-size:clamp(1.18rem,2vw,1.55rem)!important;}
h4{font-size:clamp(1rem,1.45vw,1.22rem)!important;}
.display-title, .giant-title, .oversized-title{font-size:clamp(2rem,5vw,4rem)!important;}
.navbar, .site-nav, nav, .main-menu, .menu, .topbar{
  font-family:var(--tou-ui)!important;
}
.navbar a, .site-nav a, nav a, .main-menu a, .menu a, .dropdown a, .nav-link{
  border-radius:999px;
  transition:background .18s ease, border-color .18s ease, transform .18s ease;
}
.navbar a:hover, .site-nav a:hover, nav a:hover, .main-menu a:hover, .menu a:hover, .dropdown a:hover{
  background:rgba(232,204,142,.12);
  border-color:var(--tou-border-strong);
}
button, .button, .btn, .site-button, .lw-button, a.button, a.btn, .cta, .card-button, .passport-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  min-height:38px;
  padding:.68rem 1.05rem;
  border:1px solid var(--tou-border-strong)!important;
  border-radius:999px!important;
  background:linear-gradient(135deg, rgba(232,204,142,.2), rgba(143,95,63,.22))!important;
  color:var(--tou-text)!important;
  font-family:var(--tou-ui)!important;
  font-weight:650;
  letter-spacing:.015em;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  cursor:pointer;
}
button:hover, .button:hover, .btn:hover, .site-button:hover, .lw-button:hover, a.button:hover, a.btn:hover, .cta:hover{
  transform:translateY(-1px);
  background:linear-gradient(135deg, rgba(232,204,142,.3), rgba(143,95,63,.28))!important;
}
select, .site-select, .language-select, .world-compass select, .world-compass-dropdown, .compass-select, input, textarea{
  min-height:38px;
  border:1px solid var(--tou-border-strong)!important;
  border-radius:999px!important;
  background:rgba(18,12,24,.92)!important;
  color:var(--tou-text)!important;
  padding:.58rem .9rem!important;
  font-family:var(--tou-ui)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.2);
}
textarea{border-radius:var(--tou-radius-sm)!important;}
select option{background:#1c1322; color:var(--tou-text);}
.card, .book-card, .city-card, .character-card, .feature-card, .memory-card, .portal-card, .route-card, .museum-room{
  border:1px solid var(--tou-border)!important;
  border-radius:var(--tou-radius)!important;
  background:linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025))!important;
  box-shadow:var(--tou-shadow)!important;
  color:var(--tou-text)!important;
}
.card p, .book-card p, .city-card p, .character-card p, .feature-card p{color:var(--tou-muted);}
.badge, .pill, .tag, .chip{
  border:1px solid var(--tou-border);
  background:rgba(232,204,142,.12);
  color:var(--tou-gold);
  border-radius:999px;
  font-family:var(--tou-ui);
  padding:.25rem .65rem;
}
.living-world-widget, .lw-panel, .daily-dva-svita, .day-in-world, .ambient-widget, .world-compass, .floating-widget, .reader-widget{
  font-family:var(--tou-ui)!important;
  border:1px solid var(--tou-border-strong)!important;
  border-radius:18px!important;
  background:rgba(20,12,26,.9)!important;
  color:var(--tou-text)!important;
  box-shadow:0 18px 50px rgba(0,0,0,.34)!important;
  backdrop-filter:blur(12px);
}
.living-world-widget h2,.living-world-widget h3,.lw-panel h2,.lw-panel h3,.daily-dva-svita h2,.daily-dva-svita h3,.day-in-world h2,.day-in-world h3{font-size:1rem!important;}
.living-world-widget p,.lw-panel p,.daily-dva-svita p,.day-in-world p,.reader-widget p{font-size:.92rem!important; line-height:1.45;}
.footer, footer{font-family:var(--tou-ui); color:var(--tou-muted);}
/* Prevent accidental oversized generated blocks */
.exploration-streak, .reader-streak, .legacy-panel{font-size:1rem!important;}
.exploration-streak h2,.reader-streak h2,.legacy-panel h2{font-size:clamp(1.3rem,2.2vw,1.9rem)!important;}
/* Language selector and compass consistency */
.language-selector-global, .language-control, .site-language-control{
  display:inline-flex; align-items:center; gap:.45rem; font-family:var(--tou-ui)!important;
}
.language-selector-global label, .language-control label{display:none!important;}
.language-selector-global select{max-width:132px;}
/* Mobile */
@media (max-width:720px){
  body{font-size:16px;}
  main,.page,.page-wrap,.content,.container,.site-container{width:min(100% - 24px, 1180px);}
  section:not(.hero):not(.site-hero){padding:20px; margin:22px auto;}
  .floating-widget,.living-world-widget,.lw-panel{max-width:calc(100vw - 24px)!important;}
}
