/* Myth Atlas unified parchment palette v21. Visual-only; never changes story content or navigation.
   Canonical reference: original JA/EN story background #d8ccb0, paper #f0e5cd, ink #35271c, dark header #382b24.
   Apply only to documented page families via html[data-myth-palette]. */
html[data-myth-palette]{
  --myth-parchment:#d8ccb0;
  --myth-paper:#f0e5cd;
  --myth-card:#f8efd9;
  --myth-ink:#35271c;
  --myth-muted:#685543;
  --myth-dark:#382b24;
  --myth-gold:#dfbf86;
  --myth-stroke:#b5a07f;
  --myth-accent:#60402c;
  --myth-header-text:#f6e8cb;
  color-scheme:light;
}
html[data-myth-palette] a:focus-visible,
html[data-myth-palette] button:focus-visible,
html[data-myth-palette] input:focus-visible,
html[data-myth-palette] select:focus-visible{outline:3px solid #93632d;outline-offset:3px}
/* French story reader is the only old full-screen navy-blue page; make it match the complete JA/EN story reader. */
html[data-myth-palette="story"] body{
  background:var(--myth-parchment);
  color:var(--myth-ink);
}
html[data-myth-palette="story"] header{
  background:var(--myth-dark);
  border-bottom:1px solid #957c60;
  color:var(--myth-header-text);
  min-height:74px;
  align-items:center;
}
html[data-myth-palette="story"] header a{color:var(--myth-header-text)}
html[data-myth-palette="story"] header strong{font-family:Georgia,"Yu Mincho",serif;font-size:clamp(24px,3vw,34px)}
html[data-myth-palette="story"] main{
  background:var(--myth-paper);
  color:var(--myth-ink);
  max-width:800px;
  padding:26px 38px 56px;
  margin:22px auto 42px;
  border:1px solid var(--myth-stroke);
  border-radius:10px;
}
html[data-myth-palette="story"] h1,
html[data-myth-palette="story"] h2,
html[data-myth-palette="story"] h3{font-family:Georgia,"Yu Mincho",serif;color:var(--myth-dark)}
html[data-myth-palette="story"] a{color:var(--myth-accent)}
html[data-myth-palette="story"] .story{color:var(--myth-ink);font-size:18px;line-height:1.95}
html[data-myth-palette="story"] .muted{color:var(--myth-muted)}
html[data-myth-palette="story"] .warn,
html[data-myth-palette="story"] .prep{color:#714b29}
html[data-myth-palette="story"] .extras{border-color:var(--myth-stroke)}
html[data-myth-palette="story"] details{
  background:#ebdbba;
  border:1px solid var(--myth-stroke);
  color:var(--myth-ink);
}
html[data-myth-palette="story"] .tag{border-color:#ad8c66;color:var(--myth-ink);background:var(--myth-card)}
html[data-myth-palette="story"] .lang-switch a,
html[data-myth-palette="story"] .lang-switch button{
  background:#ebdbba;color:var(--myth-dark);border:1px solid #ad8c66;
}
html[data-myth-palette="story"] .lang-switch a[aria-current=page]{background:var(--myth-gold);color:var(--myth-dark);font-weight:700}
html[data-myth-palette="story"] .prep{border-color:#a07b4d}
html[data-myth-palette="story"] .fr-story-gateway,
html[data-myth-palette="story"] .fr-story-gateway a{color:var(--myth-ink)}
html[data-myth-palette="story"] footer{background:var(--myth-dark);color:var(--myth-header-text);border-color:#957c60;padding:18px 5%}
html[data-myth-palette="story"] footer a{color:var(--myth-header-text)}
@media(max-width:800px){
 html[data-myth-palette="story"] main{max-width:none;margin:0;padding:22px 18px 48px;border-left:0;border-right:0;border-radius:0}
 html[data-myth-palette="story"] header{padding:14px 4%}
 html[data-myth-palette="story"] .story{font-size:17px;line-height:1.9}
}
/* Six editorial research guides now share the same parchment, ink and header as the JA/EN stories. */
html[data-myth-palette="guide"] body{background:var(--myth-parchment);color:var(--myth-ink)}
html[data-myth-palette="guide"] .head,
html[data-myth-palette="guide"] .foot{background:var(--myth-dark);color:var(--myth-header-text)}
html[data-myth-palette="guide"] .head a,
html[data-myth-palette="guide"] .foot a{color:var(--myth-header-text)}
html[data-myth-palette="guide"] .hero{background:var(--myth-paper);border-bottom-color:var(--myth-stroke)}
html[data-myth-palette="guide"] main.body{
 background:var(--myth-paper);border:1px solid var(--myth-stroke);
 border-radius:10px;margin:18px auto 42px;padding:0 24px 30px;
}
html[data-myth-palette="guide"] h1,
html[data-myth-palette="guide"] h2,
html[data-myth-palette="guide"] h3{color:var(--myth-dark)}
html[data-myth-palette="guide"] a{color:var(--myth-accent)}
html[data-myth-palette="guide"] .eyebrow,
html[data-myth-palette="guide"] .meta,
html[data-myth-palette="guide"] .lang-note,
html[data-myth-palette="guide"] .links small{color:var(--myth-muted)}
html[data-myth-palette="guide"] .dek{color:#554532}
html[data-myth-palette="guide"] .body section{border-bottom-color:#cdbb9f}
html[data-myth-palette="guide"] .notice,
html[data-myth-palette="guide"] .call{background:#e7d8bb;border-left-color:#a07b4d}
html[data-myth-palette="guide"] .links a,
html[data-myth-palette="guide"] table{background:var(--myth-card);border-color:var(--myth-stroke);color:var(--myth-ink)}
html[data-myth-palette="guide"] .tablewrap{border-color:var(--myth-stroke)}
html[data-myth-palette="guide"] thead th{background:#e5d2ae}
html[data-myth-palette="guide"] tbody th{background:#ebdbba}
html[data-myth-palette="guide"] td,
html[data-myth-palette="guide"] th{border-color:#d5c19e}
@media(max-width:600px){
 html[data-myth-palette="guide"] main.body{margin:0 auto 20px;padding:0 16px 24px;border-left:0;border-right:0;border-radius:0}
}
/* Comparison tool uses the same base parchment instead of a noticeably more saturated gold gradient. */
html[data-myth-palette="compare"] body{background:linear-gradient(160deg,var(--myth-paper),var(--myth-parchment));color:var(--myth-ink)}
html[data-myth-palette="compare"] header{background:var(--myth-dark);border-color:#957c60;color:var(--myth-header-text)}
html[data-myth-palette="compare"] header strong,
html[data-myth-palette="compare"] header a{color:var(--myth-header-text)}
html[data-myth-palette="compare"] .panel,
html[data-myth-palette="compare"] .pair{background:var(--myth-paper);color:var(--myth-ink);border-color:var(--myth-stroke)}
html[data-myth-palette="compare"] select,
html[data-myth-palette="compare"] button,
html[data-myth-palette="compare"] input:not([type=checkbox]):not([type=radio]){
 background:var(--myth-card);color:var(--myth-ink);border-color:var(--myth-stroke);
}
html[data-myth-palette="compare"] .myth-choice:hover{background:#ead9ba}
html[data-myth-palette="compare"] .myth-choice{border-bottom-color:#c5b08d}
html[data-myth-palette="compare"] .muted{color:var(--myth-muted)}
html[data-myth-palette="compare"] a{color:var(--myth-accent)}
html[data-myth-palette="compare"] header nav a{color:var(--myth-header-text)}
/* Information, research and source pages retain their established layouts and imagery. */
html[data-myth-palette="info"] body,
html[data-myth-palette="library"] body{background-color:var(--myth-parchment);color:var(--myth-ink)}
html[data-myth-palette="info"] header,
html[data-myth-palette="library"] .source-head{background-color:var(--myth-dark);color:var(--myth-header-text)}
html[data-myth-palette="info"] header a,
html[data-myth-palette="library"] .source-head a{color:var(--myth-header-text)}
html[data-myth-palette="info"] main{background-color:var(--myth-paper);color:var(--myth-ink)}
html[data-myth-palette="info"] .note{border-color:var(--myth-stroke)}
html[data-myth-palette="info"] a,
html[data-myth-palette="library"] a{color:var(--myth-accent)}
html[data-myth-palette="library"] .source-head a{color:var(--myth-header-text)}
html[data-myth-palette="library"] body[data-atlas-page]{background:linear-gradient(160deg,var(--myth-paper),var(--myth-parchment))}
html[data-myth-palette="library"] .atlas-header{background:var(--myth-dark);border-bottom-color:#957c60}
/* Preserve the ancient-map homepage's existing layered map, tiles, sidebar and frame.
   Its dark wood already matches the unified palette. */
html[data-myth-palette="atlas"] .atlas-header,
html[data-myth-palette="atlas"] .topbar{border-bottom-color:#957c60}

/* Contrast audit patch v23: previously invisible open language menus in the pale parchment theme. */
html[data-myth-palette] .translation-menu,
html[data-myth-palette] .translation-menu a,
html[data-myth-palette] .translation-menu button{
  color:#35271c!important;
}
html[data-myth-palette] .translation-menu{
  background:#fff3dc!important;
  border:1px solid #ad8c66!important;
}
html[data-myth-palette] .translation-menu a:hover,
html[data-myth-palette] .translation-menu button:hover{
  background:#ebdbba!important;color:#35271c!important;
}
html[data-myth-palette] .translation-menu a[aria-current],
html[data-myth-palette] .translation-menu a.active,
html[data-myth-palette] .translation-menu .active,
html[data-myth-palette] .translation-menu a[aria-selected=true]{
  background:#dfbf86!important;color:#35271c!important;
}
/* Old dark-background notes had an icy-blue font of contrast 1.24 on light parchment. */
html[data-myth-palette="story"] .night-verified-notes small{
  color:#554532!important;
}
html[data-myth-palette="story"] .night-verified-notes,
html[data-myth-palette="story"] .night-verified-notes article{
  border-color:#b5a07f!important;
}
/* Untranslated-story gateway kept a navy panel while dark typography was applied. */
html[data-myth-palette="story"] .fr-story-gateway{
  background:#f8efd9!important;
  color:#35271c!important;
  border:1px solid #b5a07f!important;
}
html[data-myth-palette="story"] .fr-story-gateway h1,
html[data-myth-palette="story"] .fr-story-gateway h2,
html[data-myth-palette="story"] .fr-story-gateway p{
  color:#35271c!important;
}
html[data-myth-palette="story"] .fr-story-gateway .story-kicker,
html[data-myth-palette="story"] .fr-story-gateway .story-note{
  color:#685543!important;
}
html[data-myth-palette="story"] .fr-story-gateway a.story-language-link{
  background:#ead9ba!important;
  color:#35271c!important;
  border:1px solid #ad8c66!important;
}
html[data-myth-palette="story"] .fr-story-gateway a.story-language-link:hover{
  background:#dfbf86!important;
}
/* Comparison controls remain clearly legible even when no stories have been selected. */
html[data-myth-palette="compare"] #compare{
  background:#60402c!important;
  color:#fff5e5!important;
  border-color:#60402c!important;
}
html[data-myth-palette="compare"] #compare:disabled{
  opacity:1!important;
  background:#e6d5b4!important;
  color:#554532!important;
  border-color:#ac8e63!important;
}
