/* 共通デザイン：.nj-page の内側にだけ適用 */
.nj-page{--nj-green:#325e4d;--nj-pale:#f2f6f2;--nj-ink:#29352e;--nj-line:#d9e3d9;--nj-gold:#8c7449;color:var(--nj-ink);font-family:"游ゴシック体","Yu Gothic",Meiryo,sans-serif;font-size:max(1em,16px);line-height:1.95;overflow-wrap:anywhere;text-align:left;max-width:100%;padding-bottom:1em;}
.nj-page,.nj-page *{box-sizing:border-box;}
.nj-page :is(section,article,nav,figure,figcaption,dl,dt,dd,ul,li,p,h3,h4){float:none;width:auto;max-width:100%;height:auto;margin:0;padding:0;border:0;background:none;box-shadow:none;}
.nj-page :is(section,article,nav,figure,dl,ul){min-width:0;}
.nj-page :is(h3,h4){font-family:"游明朝","Yu Mincho","ヒラギノ明朝 ProN",serif;font-weight:600;letter-spacing:.06em;color:var(--nj-green);line-height:1.6;clear:none;}
.nj-page :is(h3,h4)::first-letter{border:0;padding:0;}
.nj-page a{color:var(--nj-green);text-decoration:underline;text-underline-offset:.22em;text-decoration-thickness:1px;transition:none;}
.nj-page a:hover{color:#203f33;text-decoration-thickness:2px;}
.nj-page a:focus-visible{outline:3px solid var(--nj-gold);outline-offset:4px;border-radius:2px;}
.nj-page img{display:block;float:none;width:100%;max-width:100%;height:auto;margin:0;border:0;}
.nj-page p+p{margin-top:1em;}
.nj-page .nj-toc{padding:1.2em 1.5em;background:var(--nj-pale);border-top:2px solid var(--nj-green);margin-bottom:2.6em;}
.nj-page .nj-toc ul{display:flex;flex-wrap:wrap;gap:.55em 1.6em;list-style:none;}
.nj-page .nj-toc a{display:inline-flex;align-items:center;gap:.6em;min-height:44px;font-size:.94em;text-decoration:none;}
.nj-page .nj-toc a::after{content:"↓";color:var(--nj-gold);font-size:.85em;}
.nj-page .nj-section{margin-top:3.5em;scroll-margin-top:1.5em;}
.nj-page .nj-section:first-of-type{margin-top:0;}
.nj-page .nj-heading{display:flex;align-items:baseline;gap:.8em;padding:0 0 .65em;margin-bottom:1.5em;border-bottom:1px solid var(--nj-line);font-size:1.5em;}
.nj-page .nj-number{font-family:Georgia,serif;font-size:.68em;font-weight:400;letter-spacing:.06em;color:var(--nj-gold);}
.nj-page .nj-intro{display:grid;grid-template-columns:1fr 1.08fr;gap:2em;align-items:center;margin-bottom:2em;}
.nj-page .nj-intro figure{grid-column:2;grid-row:1;}
.nj-page .nj-intro p{grid-column:1;grid-row:1;}
.nj-page .nj-prose{max-width:48em;margin-inline:auto;}
.nj-page .nj-history{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5em;}
.nj-page .nj-history figure{padding:.75em;background:var(--nj-pale);border:1px solid var(--nj-line);}
.nj-page .nj-history .nj-history-first{grid-column:1 / -1;}
.nj-page .nj-history-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1em;align-items:start;}
.nj-page .nj-history img{object-fit:contain;}
.nj-page .nj-history figcaption{padding:.65em .25em .15em;text-align:center;font-size:.94em;}
.nj-page .nj-deity{container-type:inline-size;display:grid;grid-template-columns:12em minmax(0,1fr);gap:1.8em;padding:1.8em 0;border-bottom:1px solid var(--nj-line);}
.nj-page .nj-deity:first-of-type{padding-top:0;}
.nj-page .nj-deity h4{font-size:1.35em;}
/* 神名は一塊で表示。左列は内容幅を確保し、狭い画面では縦積みに切り替える。 */
.nj-page .nj-deity-name{display:block;white-space:nowrap;overflow-wrap:normal;word-break:keep-all;letter-spacing:.04em;font-size:min(1em,10cqi);}
.nj-page .nj-reading{display:block;margin-bottom:.55em;font-family:"游ゴシック体","Yu Gothic",Meiryo,sans-serif;font-size:.53em;font-weight:400;letter-spacing:.03em;}
.nj-page .nj-blessing{padding:.8em 1em;background:var(--nj-pale);border-left:3px solid var(--nj-green);font-weight:600;}
.nj-page .nj-calendar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.2em;}
.nj-page .nj-event{display:flex;flex-direction:column;border:1px solid var(--nj-line);background:#fff;}
.nj-page .nj-event-date{padding:.65em .9em;color:var(--nj-green);background:var(--nj-pale);font-weight:600;font-size:.86em;}
.nj-page .nj-event figure{padding:.8em;}
.nj-page .nj-event figcaption{padding-top:.7em;font-size:.92em;line-height:1.75;}
.nj-page .nj-event-time{display:block;font-size:.92em;color:#505d54;}
.nj-page .nj-album{margin-top:1.5em;padding:1.2em 1.5em;background:var(--nj-pale);border-left:3px solid var(--nj-green);}
.nj-page .nj-album p+p{margin-top:.35em;}
.nj-page .nj-prayers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:2em;}
.nj-page .nj-prayers>div{padding:1.2em 0;border-bottom:1px solid var(--nj-line);}
.nj-page .nj-prayers dt{font-weight:600;font-size:1.05em;margin-bottom:.4em;color:var(--nj-green);}
.nj-page .nj-prayers dd{font-size:.94em;line-height:1.9;}
.nj-page .nj-apply{margin-top:1.8em;padding:1.5em;background:var(--nj-pale);text-align:center;}
.nj-page .nj-buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:.8em;margin-top:.8em;}
.nj-page .nj-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:.65em 1.6em;background:var(--nj-green);color:#fff;border:1px solid var(--nj-green);text-decoration:none;line-height:1.6;}
.nj-page .nj-button:hover{color:#fff;background:#244737;}
.nj-page .nj-dolls{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:2em;align-items:center;}
.nj-page .nj-top{margin-top:2em;text-align:right;font-size:.9em;}
@media(max-width:900px){.nj-page .nj-calendar{grid-template-columns:repeat(2,minmax(0,1fr));}.nj-page .nj-intro{grid-template-columns:1fr;gap:1.5em;}.nj-page .nj-intro figure,.nj-page .nj-intro p{grid-column:1;grid-row:auto;}.nj-page .nj-intro figure{width:100%;max-width:38em;margin-inline:auto;}.nj-page .nj-deity{grid-template-columns:1fr;gap:1em;}}
@media(max-width:600px){.nj-page .nj-toc{padding:.8em 1em;}.nj-page .nj-toc ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.2em .8em;}.nj-page .nj-toc a{font-size:.86em;}.nj-page .nj-section{margin-top:2.5em;}.nj-page .nj-heading{font-size:1.3em;gap:.6em;}.nj-page .nj-history,.nj-page .nj-prayers,.nj-page .nj-calendar,.nj-page .nj-dolls{grid-template-columns:1fr;}.nj-page .nj-history-pair{gap:.6em;}.nj-page .nj-prayers>div{padding:1em 0;}.nj-page .nj-apply{padding:1.2em 1em;}.nj-page .nj-buttons{flex-direction:column;}.nj-page .nj-button{width:100%;}.nj-page .nj-event figure{padding:1em;}}
@media print{.nj-page .nj-toc,.nj-page .nj-top{display:none;}.nj-page .nj-section{margin-top:2em;}.nj-page .nj-event,.nj-page .nj-history figure,.nj-page .nj-prayers>div{break-inside:avoid;}.nj-page a{color:inherit;}.nj-page .nj-button{background:#fff;color:#000;}}


/* 沿革・由来の共通年表。本文を保ったまま年代ラベルを添える。 */
.nj-page .nj-timeline{list-style:none;margin:0;padding:0;}
.nj-page .nj-timeline-item{position:relative;display:grid;grid-template-columns:10.5em minmax(0,1fr);column-gap:2em;padding:0 0 2em;margin:0;min-width:0;}
.nj-page .nj-timeline-item::before{content:"";position:absolute;left:11.25em;top:.85em;bottom:-.85em;width:1px;background:var(--nj-line);}
.nj-page .nj-timeline-item:last-child{padding-bottom:0;}
.nj-page .nj-timeline-item:last-child::before{display:none;}
.nj-page .nj-timeline-item::after{content:"";position:absolute;left:calc(11.25em - .27em);top:.6em;width:.6em;height:.6em;border:2px solid var(--nj-green);border-radius:50%;background:#fff;box-sizing:border-box;}
.nj-page .nj-timeline-date{padding:.05em .5em 0 0;line-height:1.6;}
.nj-page .nj-timeline-era{display:block;white-space:nowrap;overflow-wrap:normal;color:var(--nj-green);font-weight:600;font-size:1.1em;}
.nj-page .nj-timeline-western{display:block;white-space:nowrap;overflow-wrap:normal;color:var(--nj-gold);font-size:.88em;margin-top:.25em;}
.nj-page .nj-timeline-content{min-width:0;padding-bottom:1.8em;border-bottom:1px solid var(--nj-line);}
.nj-page .nj-timeline-item:last-child .nj-timeline-content{padding-bottom:0;border-bottom:0;}
.nj-page .nj-timeline-opening{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.5em;align-items:start;}
.nj-page .nj-timeline-opening figure{margin:0;}
@media(max-width:900px){.nj-page .nj-timeline-opening{grid-template-columns:1fr;}.nj-page .nj-timeline-opening figure{max-width:32em;}}
@media(max-width:600px){.nj-page .nj-timeline-item{grid-template-columns:1fr;gap:.75em;padding:0 0 1.8em 1.5em;}.nj-page .nj-timeline-item::before{left:.3em;top:.9em;bottom:-.9em;}.nj-page .nj-timeline-item::after{left:.03em;top:.6em;}.nj-page .nj-timeline-date{display:flex;align-items:baseline;flex-wrap:wrap;gap:.4em .9em;padding:0;}.nj-page .nj-timeline-western{margin:0;}.nj-page .nj-timeline-content{padding-bottom:1.4em;}}
@media print{.nj-page .nj-timeline-item{break-inside:avoid;}}

/* 読み物ページ共通：小見出し、挿絵、本文との組み合わせ。 */
.nj-page .nj-article{margin-top:2em;}
.nj-page .nj-subheading{font-size:1.15em;line-height:1.65;margin:0 0 1em;padding:0 0 0 .8em;border-left:3px solid var(--nj-green);}
.nj-page .nj-subtitle{margin:-1.2em 0 1.7em;color:var(--nj-gold);font-size:.95em;}
.nj-page .nj-feature{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,250px);gap:2em;align-items:start;}
.nj-page .nj-feature-copy,.nj-page .nj-feature-media{min-width:0;}
.nj-page .nj-illustration{width:fit-content;max-width:100%;margin:1.2em auto;}
.nj-page .nj-illustration img{width:auto;max-width:100%;height:auto;}
.nj-page .nj-illustration-wide{max-width:100%;margin:1.5em auto;}
.nj-page .nj-related{padding:.7em 1em;margin-top:1em;background:var(--nj-pale);border-left:3px solid var(--nj-green);}
@media(max-width:900px){.nj-page .nj-feature{grid-template-columns:1fr;gap:1em;}.nj-page .nj-feature-media{display:flex;flex-wrap:wrap;justify-content:center;gap:1em;}.nj-page .nj-feature-media .nj-illustration{margin:.5em auto;}}
@media print{.nj-page .nj-illustration{break-inside:avoid;}}

/* ページ冒頭の導入。本文の番号付き大項目とは分けて配置する。 */
.nj-page .nj-lead{padding:0 0 2em;margin:0 0 2em;border-bottom:1px solid var(--nj-line);}
.nj-page .nj-lead-title{font-size:1.7em;line-height:1.7;margin:0 0 1em;padding:0;border:0;}
@media(max-width:600px){.nj-page .nj-lead-title{font-size:1.35em;}.nj-page .nj-lead{padding-bottom:1.5em;margin-bottom:1.5em;}}

/* 高解像度化した小写真の表示サイズ。画面幅より大きくしない。 */
.nj-page .nj-illustration img.nj-image-enhanced{width:250px;max-width:100%;height:auto;}
.nj-page .nj-illustration img.nj-image-enhanced.nj-image-portrait{width:200px;}
.nj-page .nj-illustration img.nj-image-enhanced.nj-image-square{width:220px;}

/* 外部サイトへのリンクを共通表示。同一サイト・ページ内リンクは対象外。 */
.nj-page a[href^="http"]:not([href^="https://nishinojinja.or.jp/"]):not([href^="http://nishinojinja.or.jp/"]):not([href^="https://www.nishinojinja.or.jp/"]):not([href^="http://www.nishinojinja.or.jp/"])::after{content:"";content:"" / "（外部サイト）";display:inline-block;width:1.2em;height:1.2em;margin-left:.3em;vertical-align:-.19em;background:url("external-link-icon.png") center / 135% 135% no-repeat;}
/* 人生儀礼の本文と、折り返して読める年齢一覧。 */
.nj-page .nj-life-feature{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,220px);gap:1.8em;align-items:start;margin:1em 0 1.5em;}
.nj-page .nj-life-copy,.nj-page .nj-life-media{min-width:0;}
.nj-page .nj-life-image{width:fit-content;max-width:100%;margin:1em auto;}
.nj-page .nj-life-image img{width:auto;max-width:100%;height:auto;}
.nj-page .nj-life-image-wide{margin:1.6em auto;}
.nj-page .nj-life-list{padding-left:1em;text-indent:-1em;}
.nj-page.nj-life .nj-subheading{margin-top:1.7em;}
.nj-page .nj-age-group{margin:2em 0;}
.nj-page .nj-age-sex{font:600 1.05em/1.7 "游ゴシック体","Yu Gothic",Meiryo,sans-serif;color:var(--nj-green);margin:1.5em 0 .7em;padding:0;max-width:100%;width:auto;background:none;border:0;}
.nj-page .nj-age-triples{display:grid;gap:.8em;}
.nj-page .nj-age-triple{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--nj-line);background:#fff;}
.nj-page .nj-age-cell{display:flex;flex-direction:column;text-align:center;min-width:0;padding:.8em .3em;line-height:1.8;}
.nj-page .nj-age-cell+.nj-age-cell{border-left:1px solid var(--nj-line);}
.nj-page .nj-age-main{background:var(--nj-pale);}
.nj-page .nj-age-label{display:block;font-weight:600;color:var(--nj-green);}
.nj-page .nj-age-years{display:block;font-weight:600;font-size:1.15em;font-variant-numeric:tabular-nums;}
.nj-page .nj-age-birth{display:block;font-size:.94em;font-variant-numeric:tabular-nums;}
.nj-page .nj-age-note{font-size:.9em;color:#505d54;margin-bottom:.7em;}
.nj-page .nj-age-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9em),1fr));gap:.65em;list-style:none;}
.nj-page .nj-age-cards>li{display:flex;flex-direction:column;justify-content:center;min-width:0;padding:.8em .55em;text-align:center;border:1px solid var(--nj-line);background:var(--nj-pale);line-height:1.8;}
@media(max-width:900px){.nj-page .nj-life-feature{grid-template-columns:1fr;gap:.5em;}.nj-page .nj-life-media{display:flex;flex-wrap:wrap;gap:1em;justify-content:center;}}
@media(max-width:600px){.nj-page .nj-age-cell{font-size:.92em;}.nj-page .nj-age-cards{grid-template-columns:repeat(2,minmax(0,1fr));}.nj-page .nj-age-birth{font-size:.9em;}}
@media print{.nj-page .nj-age-triple,.nj-page .nj-age-cards>li{break-inside:avoid;}}
.nj-page .nj-period{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.8em;padding:.7em 0;border-bottom:1px solid var(--nj-line);}.nj-page .nj-period-dots{display:none;}
@media(max-width:600px){.nj-page .nj-age-cell{font-size:1em;}.nj-page .nj-age-birth{font-size:.94em;}}

/* 人生のまつり：一覧の目的別ナビゲーションと見出し階層。 */
.nj-page.nj-life .nj-child-heading{display:block;font:600 1.02em/1.75 "游ゴシック体","Yu Gothic",Meiryo,sans-serif;color:var(--nj-green);margin:1.5em 0 .8em;padding:0 0 .4em;border:0;border-bottom:1px solid var(--nj-line);background:none;width:auto;max-width:100%;}
.nj-page .nj-ritual-group{padding:0 0 1em;margin:1.5em 0 2em;}
.nj-page .nj-ritual-group>.nj-subheading{background:var(--nj-pale);padding:.7em 1em;margin-top:0;}
.nj-page .nj-ritual-group>.nj-child-heading{margin-left:.75em;}
.nj-page .nj-age-guide-note{padding:1em 1.2em;background:var(--nj-pale);border-left:3px solid var(--nj-green);}
.nj-page .nj-age-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7em;margin:1.3em 0 2em;}
.nj-page .nj-age-nav a{display:flex;flex-direction:column;justify-content:center;gap:.4em;padding:.9em .7em;min-height:70px;text-align:center;border:1px solid var(--nj-line);text-decoration:none;background:#fff;line-height:1.6;}
.nj-page .nj-age-nav a::after{content:"↓";color:var(--nj-gold);}
.nj-page .nj-age-nav span{font-size:.8em;}
.nj-page .nj-age-panel{margin:2.8em 0;scroll-margin-top:1em;}
.nj-page .nj-age-panel-title{font-size:1.3em;padding:.65em .9em;margin:0 0 1.2em;background:var(--nj-green);color:#fff;letter-spacing:.04em;}
.nj-page .nj-yaku-sexes,.nj-page .nj-celebration-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.4em;align-items:start;}
.nj-page .nj-yaku-sex .nj-age-sex,.nj-page .nj-celebration-groups .nj-age-sex{margin:0 0 .8em;}
.nj-page .nj-yaku-set{border:1px solid var(--nj-line);background:#fff;margin-bottom:1em;}
.nj-page .nj-yaku-target{display:grid;grid-template-columns:auto auto;align-items:baseline;justify-content:center;column-gap:.7em;row-gap:.25em;margin:0;padding:.8em;background:var(--nj-pale);color:var(--nj-green);font:600 1em/1.5 "游ゴシック体","Yu Gothic",Meiryo,sans-serif;max-width:100%;width:auto;}
.nj-page .nj-yaku-target strong{font-size:1.65em;}
.nj-page .nj-yaku-target span{grid-column:1/-1;text-align:center;font-weight:400;}
.nj-page .nj-yaku-neighbors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
.nj-page .nj-yaku-neighbors>div{padding:.7em .3em;text-align:center;min-width:0;}
.nj-page .nj-yaku-neighbors>div+div{border-left:1px solid var(--nj-line);}
.nj-page .nj-yaku-neighbors dt{color:var(--nj-gold);font-size:.9em;}
.nj-page .nj-yaku-neighbors dd>span{display:block;font-size:.9em;}
.nj-page .nj-age-rows{list-style:none;margin:0;padding:0;}
.nj-page .nj-age-rows>li{display:grid;grid-template-columns:4.5em minmax(0,1fr);align-items:center;gap:.6em;padding:.6em .7em;border-bottom:1px solid var(--nj-line);line-height:1.65;background:#fff;}
.nj-page .nj-age-rows>li:nth-child(even){background:var(--nj-pale);}
.nj-page .nj-age-value{font-size:1.15em;color:var(--nj-green);font-variant-numeric:tabular-nums;}
.nj-page .nj-age-person,.nj-page .nj-age-person>span{display:block;min-width:0;}
.nj-page .nj-age-occasion{font-size:.85em;color:var(--nj-gold);}
.nj-page .nj-star-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.4em;}
.nj-page .nj-star-group{border:1px solid var(--nj-line);min-width:0;}
.nj-page .nj-star-title{display:block;margin:0;padding:.75em .7em;text-align:center;color:var(--nj-green);background:var(--nj-pale);font:600 1.05em/1.7 "游ゴシック体","Yu Gothic",Meiryo,sans-serif;max-width:100%;width:auto;border:0;}
@media(max-width:600px){.nj-page .nj-age-nav{grid-template-columns:1fr;gap:.5em;}.nj-page .nj-age-nav a{display:grid;grid-template-columns:minmax(0,1fr) auto;min-height:60px;text-align:left;padding:.7em 1em;}.nj-page .nj-age-nav a strong{grid-column:1;}.nj-page .nj-age-nav a span{grid-column:1;}.nj-page .nj-age-nav a::after{grid-column:2;grid-row:1/3;}.nj-page .nj-yaku-sexes,.nj-page .nj-celebration-groups,.nj-page .nj-star-groups{grid-template-columns:1fr;gap:1.8em;}.nj-page .nj-age-panel-title{font-size:1.15em;}}
@media print{.nj-page .nj-age-nav{display:none;}.nj-page .nj-yaku-set,.nj-page .nj-age-rows>li{break-inside:avoid;}}
.nj-page .nj-intro-action{margin:1.4em 0;}.nj-page a.nj-intro-cta{display:flex;gap:1em;justify-content:space-between;min-height:60px;max-width:32em;padding:1em 1.25em;font-weight:600;text-align:left;}.nj-page .nj-intro-cta>.nj-cta-arrow{flex:none;font-size:1.2em;}.nj-page .nj-cta-copy{min-width:0;}.nj-page .nj-cta-caption{display:block;font-size:.85em;font-weight:400;}

.nj-page.nj-life .nj-related-heading{background:var(--nj-pale);padding:.7em 1em;border-left:3px solid var(--nj-green);font-size:1.15em;}
