/* Kanji-Seiten (factory_core/site_pages.py). Neutrale Grundfassung;
   Farben und Schriften der App setzt `theme` in config/site-pages.json. */
:root {
  color-scheme: light dark;
  --bg: #f5f5f7; --card: #ffffff; --ink: #1d1d1f; --muted: #6e6e73; --accent: #0a66c2; --on-accent: #ffffff; --line: #e5e5ea;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101014; --card: #1c1c21; --ink: #f2f2f4; --muted: #98989f; --accent: #5ea8ff; --on-accent: #101014; --line: #2c2c33; }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); padding: 32px 16px 48px; }
main { max-width: 780px; margin: 0 auto; }
a { color: var(--accent); }
:lang(ja) { font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; }
.hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.hero img { width: 200px; height: 200px; background: var(--card); border-radius: 24px; padding: 10px; }
.glyph { font-size: 4.5rem; line-height: 1; font-weight: 600; }
h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.2; }
.meta { color: var(--muted); margin-top: 6px; }
section, aside { background: var(--card); border-radius: 24px; padding: 22px 24px; margin-bottom: 16px; }
h2 { font-size: 1.15rem; margin-bottom: 10px; }
.meanings { font-size: 1.15rem; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
dt { color: var(--muted); }
dd { font-size: 1.2rem; }
.oku { color: var(--muted); }
.parts { display: flex; flex-wrap: wrap; gap: 10px; }
.part { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 16px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.part b { font-size: 1.6rem; font-weight: 600; }
.part small { color: var(--muted); }
.family, .index ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.family a, .index a { display: block; text-align: center; padding: 8px 4px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.family b, .index b { display: block; font-size: 1.8rem; font-weight: 600; line-height: 1.2; }
.family small, .index small { display: block; font-size: 0.72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.words { list-style: none; }
.words li { padding: 8px 0; border-top: 1px solid var(--line); }
.words li:first-child { border-top: 0; }
.words b { font-size: 1.25rem; font-weight: 600; margin-right: 8px; }
.words span { color: var(--muted); }
.app { background: var(--accent); color: var(--on-accent); }
.app p { margin-bottom: 14px; }
.button { display: inline-block; background: #fff; color: #202d41; font-weight: 700; text-decoration: none; padding: 10px 18px; border-radius: 999px; }
.languages a { margin: 0 2px; }
.credit { font-size: 0.78rem; color: var(--muted); margin-top: 12px; }
/* Gestaltung der App, aus config/site-pages.json */
:root { --bg: #F6F3EB; --card: #FFFFFF; --ink: #202D41; --muted: #526072; --accent: #3C4E9A; --on-accent: #FFFFFF; --line: #dedfe7; }
@media (prefers-color-scheme: dark) { :root { --bg: #151A22; --card: #212833; --ink: #EFF1F5; --muted: #B5BDCA; --accent: #A8B5FF; --on-accent: #151A22; --line: #343c4a; } }
