/* 数字図鑑 専用スタイル（共通部分は /css/common.css） */
.nz { max-width: 860px; }
.nz-text, .nz-text p, .nz-text li, .nz-text td, .nz-text dd, .nz-lead {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}
.nz a:focus-visible, .nz button:focus-visible { outline: 3px solid var(--base-brown); outline-offset: 3px; }
.nz-crumb { font-size: .95rem; margin-bottom: 18px; }
.nz-crumb a { text-decoration: underline; text-underline-offset: 4px; }

/* 表紙 */
.nz-hero { background: var(--light-bg); border: 3px solid var(--base-brown); border-radius: 18px; padding: 34px 30px 26px; }
.nz-hero-top { display: flex; align-items: center; gap: 34px; }
.nz-big { font-size: clamp(6rem, 22vw, 11rem); line-height: 1; color: var(--base-brown); font-weight: normal; flex: none; }
.nz-catch { font-size: clamp(1.25rem, 3.6vw, 1.7rem); line-height: 1.55; }
.nz-lead { margin-top: 12px; line-height: 1.9; font-size: 1rem; }
.nz-dots { margin-top: 24px; border-top: 2px dashed rgba(67,37,23,.3); padding-top: 18px; }
.nz-dots svg { display: block; width: 100%; max-height: 190px; margin: 0 auto; }
.nz-dots p { text-align: center; font-size: .95rem; margin-top: 10px; }

/* 基本データ */
.nz-h2 { font-size: 1.6rem; margin: 52px 0 18px; padding-bottom: 6px; border-bottom: 3px solid var(--base-brown); line-height: 1.5; }
.nz-data { display: grid; grid-template-columns: repeat(2, 1fr); background: var(--light-bg); border-radius: 12px; overflow: hidden; }
.nz-data div { display: flex; gap: 14px; padding: 11px 18px; border-bottom: 1px solid rgba(67,37,23,.15); }
.nz-data dt { flex: 0 0 7em; font-weight: bold; }
.nz-data dd { min-width: 0; overflow-wrap: anywhere; }
.nz-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; list-style: none; }
.nz-tags li { background: var(--base-brown); color: var(--base-beige); border-radius: 6px; padding: 2px 12px; font-size: .92rem; }

/* もくじ */
.nz-toc { list-style: none; counter-reset: t; background: var(--light-bg); border-radius: 12px; padding: 8px 22px; }
.nz-toc li { counter-increment: t; border-bottom: 1px solid rgba(67,37,23,.15); }
.nz-toc li:last-child { border-bottom: 0; }
.nz-toc a { display: flex; gap: 14px; padding: 10px 0; }
.nz-toc a::before { content: counter(t); width: 1.4em; color: #a85a00; }
.nz-toc a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* 読み物 */
.nz-story { background: var(--light-bg); border-radius: 14px; padding: 34px 36px; margin-top: 24px; scroll-margin-top: 90px; }
.nz-story h3 { font-size: 1.45rem; line-height: 1.55; margin-bottom: 16px; }
.nz-kind { display: block; color: #a85a00; font-size: .95rem; margin-bottom: 4px; }
.nz-story p { font-size: 1.03rem; line-height: 2.05; margin-bottom: 1.1em; color: #35201a; }
.nz-story strong { background: linear-gradient(transparent 62%, rgba(255,152,0,.32) 62%); }
.nz-fig { margin: 22px 0 6px; padding: 20px 16px 14px; background: #fff; border: 1px solid rgba(67,37,23,.2); border-radius: 10px; }
.nz-fig svg { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif; }
.nz-fig figcaption { text-align: center; font-size: .92rem; line-height: 1.7; margin-top: 10px; }
.nz-src { border-top: 1px dashed rgba(67,37,23,.3); padding-top: 12px; font-size: .88rem; line-height: 1.8; }
.nz-src a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.nz-src ul { padding-left: 1.3em; }

/* 前後の数字 */
.nz-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; margin-top: 46px; align-items: center; }
.nz-nav a { background: var(--base-brown); color: var(--base-beige); border-radius: 10px; padding: 12px 18px; text-align: center; }
.nz-nav a:hover { background: #5d3623; }

/* 一覧 */
.nz-index-lead { max-width: 640px; margin: -30px auto 34px; text-align: center; line-height: 2; }
.nz-filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.nz-filter button { font: inherit; color: var(--base-brown); background: var(--light-bg); border: 2px solid var(--base-brown); border-radius: 8px; padding: 5px 14px; min-height: 44px; cursor: pointer; }
.nz-filter button[aria-pressed="true"] { background: var(--base-brown); color: var(--base-beige); }
.nz-note { text-align: center; min-height: 3.6em; margin-bottom: 12px; line-height: 1.8; }
.nz-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; list-style: none; }
.nz-grid li { aspect-ratio: 1; }
.nz-cell { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 10px; font-size: clamp(1rem, 2.6vw, 1.6rem); background: rgba(253,251,247,.5); color: rgba(67,37,23,.62); }
a.nz-cell { background: var(--base-brown); color: var(--base-beige); }
a.nz-cell:hover { background: #7a4527; }
.nz-grid li.on .nz-cell { box-shadow: inset 0 0 0 4px var(--accent-orange); }
.nz-grid li.off .nz-cell { opacity: .3; }
.nz-rand { text-align: center; margin-top: 30px; }
.nz-rand button { font: inherit; font-size: 1.1rem; background: var(--accent-orange); color: var(--base-brown); border: 0; border-radius: 10px; padding: 12px 30px; cursor: pointer; }

@media (max-width: 640px) {
    .nz-hero { padding: 24px 18px 20px; }
    .nz-hero-top { flex-direction: column; align-items: flex-start; gap: 10px; }
    .nz-data { grid-template-columns: 1fr; }
    .nz-story { padding: 24px 18px; }
    .nz-story p { line-height: 1.95; }
    .nz-grid { grid-template-columns: repeat(5, 1fr); }
    .nz-index-lead { margin-top: -20px; }
}
@media (prefers-reduced-motion: reduce) { body { animation: none; } html { scroll-behavior: auto; } }
.nz-story h3 { font-family: 'SetoFont', sans-serif; }
.nz-catch, .nz-index-lead, .nz-note, .nz-story h3, .nz-dots p, .nz-fig figcaption { text-wrap: balance; word-break: auto-phrase; }
