/* Shared design tokens for the page and story pages; category Shadow DOMs inherit them.
   Subject marker palettes are shared by category and regional views.
   Run scripts/check-palette.py after changing a --kind-*, paper or selected color,
   or a tab's subcategory palette. */
:root,:host{
  --color-paper:#f7f4ec; --color-paper-2:#e8edef; --color-surface:#fffdf8;
  --color-ink:#172b3a; --color-ink-2:#526573; --color-rule:#cbd4d8;
  --color-accent:#28527f; --color-danger:#a3243b; --color-selected:#b07800; --color-accent-ink:#fffaf2; --color-focus:#1473e6;
  --color-shadow:rgb(23 43 58/.12); --color-marker-shadow:rgb(23 43 58/.35); --color-backdrop:rgb(12 24 33/.94);
  /* UI accents are indigo; vermilion belongs to festivals, so errors use --color-danger.
     Selected map items use yamabuki, which no category or sub-category uses (>= 3:1 on the map). */
  /* Category identity colors. White text on them must stay >= 4.5:1. */
  --kind-shiseki:#683a8e; --kind-omatsuri:#c4462d; --kind-onsen:#20646f; --kind-tokusan:#5e4108; --kind-geo:#3c7c5a; --kind-landscape:#5b2726; --kind-infrastructure:#4c4c4c;
  /* Geo sub-kinds inside the geo tab. */
  --geo-geopark:#2f6f4f; --geo-nationalpark:#245b78; --geo-geosite:#664619; --geo-plant:#2d5349;
  --geo-water:#245b78; --geo-wetland:#3c7c5a;
  /* Landscape subjects; the category identity remains --kind-landscape. */
  --landscape-townscape:#8f473e; --landscape-waterside:#356298; --landscape-farmland:#2c7d62; --landscape-woodland:#59747d; --landscape-craft:#7d2c62;
  --font-display:system-ui,-apple-system,"Yu Gothic",sans-serif; --font-body:system-ui,-apple-system,"Yu Gothic",sans-serif;
  --space-xs:.5rem; --space-sm:.75rem; --space-md:1rem; --space-lg:1.5rem; --space-xl:2rem;
  --radius:.35rem; --ease-out:cubic-bezier(.16,1,.3,1);
  --blog-article-width:50rem; --blog-reading-width:40rem; --blog-index-width:64rem; --blog-masthead-width:72rem;
  --blog-gutter:clamp(1rem,4vw,2rem); --blog-space-section:clamp(2rem,4vw,3rem);
  --blog-space-display:clamp(2rem,5vw,4rem); --blog-space-paragraph:1.25rem;
  --blog-text-body:clamp(1rem,.4vw + .95rem,1.0625rem); --blog-text-note:.875rem;
  --blog-title-size:clamp(1.75rem,2.2vw + 1rem,2.75rem); --blog-index-title-size:clamp(2.25rem,5vw,4rem);
  --blog-photo-index-height:15rem; --blog-photo-feature-height:22rem; --blog-photo-article-height:380px;
  --blog-photo-column:15rem; --blog-heading-column:max-content; --blog-duration:160ms;
  --map-text-small:.8125rem; --map-text-control:.875rem; --map-text-body:1rem; --map-title-size:1.375rem;
  --map-detail-title-size:1.5rem; --map-section-title-size:.9375rem; --map-panel-padding:1.25rem;
  --map-control-height:44px; --map-control-radius:6px; --map-panel-radius:8px; --map-motion-duration:140ms;
}

/* Subtype fills: labels use ink; fills keep >= 3:1 contrast on paper/map.
   Normal-vision pairwise deltaE >= 12, simulated protan/deutan >= 8.
   Regional maps use the seven --kind-* identity colors instead. */
:root,:host{
  --color-category-religious:#86231a;
  --color-category-castle:#23477d;
  --color-category-bridge:#237d98;
  --color-category-burial:#986208;
  --color-category-archaeological:#8f5035;
  --color-category-historic:#6b3e50;
  --color-category-garden:#597459;
  --color-category-scenic:#478f59;
  --color-category-port:#0874bc;
  --color-category-former:#bc478f;
  --color-category-building:#62473e;
  --color-category-industrial:#47626b;
  --color-category-other:#747474;
  --cat-mt:#a14735;
  --cat-hb:#5062aa;
  --cat-ma:#1a7d8f;
  --cat-kw:#3e7d59;
  --cat-jr:#595950;
  --cat-hn:#7d3e08;
  --cat-si:#235059;
  --cat-ar:#6b477d;
  --cat-ks:#8f2335;
  --cat-sm:#6b626b;
  --cat-kt:#747d7d;
  --color-cat-sa:#862c59;
  --color-cat-te:#3e8f6b;
  --color-cat-ui:#2c6bc5;
  --color-cat-sa2:#746b08;
  --color-cat-am:#aa74aa;
  --color-cat-ko:#987b47;
  --color-cat-ry:#8f6247;
  --color-cat-ta:#353e98;
  --color-cat-or:#7d7dd7;
  --color-cat-ri:#7d3e35;
  --color-cat-kg:#1a6b7d;
  --color-cat-nk:#6b6259;
  --color-cat-sz:#744708;
  --color-cat-se:#866b74;
  --color-cat-ka:#b33e8f;
  --color-cat-none:#86868f;
  --onsen-open:#2e7d43; --onsen-closed:#68737d; --onsen-unknown:var(--color-ink);
}
