/* 年賀状コーナー（/nenga/） */
.ng-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.ng-nav a { display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.ng-nav a[aria-current='page'] { background: var(--accent); color: #fff; }
.ng-nav i { font-style: normal; }
.ng-hero h1 small { display: block; font-family: var(--f-body); font-weight: 700; font-size: clamp(14px, 2.2vw, 19px); color: var(--ink2); margin-top: 8px; letter-spacing: 0; }
.ng-photo { margin: 6px 0 18px; border: var(--bw) solid var(--ink); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3 / 1.35; }
.ng-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.warn { color: #d6402c; }
.good { color: #12895f; }

/* 結論の箱 */
.ng-ans { border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); padding: 16px 18px 14px; margin: 8px 0 24px; position: relative; }
.ng-ans-k { position: absolute; top: -14px; left: 16px; margin: 0; background: var(--yellow); border: 2px solid var(--ink); border-radius: 8px; padding: 1px 12px; font-weight: 900; font-size: 14px; }
.ng-ans ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.ng-ans li { display: grid; grid-template-columns: 11.5em 1fr; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 12px; background: var(--paper2); }
.ng-ans li b { font-family: var(--f-display); font-weight: 400; font-size: 17px; }
.ng-ans li::before { content: none; }
.ng-ans li.no { background: #ffe9e4; }
.ng-ans li.ok { background: #e3f6ec; }
.ng-ans li.no b::after { content: ' ×'; color: #d6402c; }
.ng-ans li.ok b::after { content: ' ○'; color: #12895f; }
.ng-cd { margin: 12px 0 0; font-weight: 700; text-align: center; }
.ng-cd b { font-family: var(--f-display); font-weight: 400; font-size: 1.25em; color: var(--accent); }
.ng-est { border: 2px dashed var(--accent); border-radius: 12px; padding: 8px 12px; background: var(--soft); font-size: 14px; }
.ng-new { margin-top: 18px; border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; background: var(--t-yellow); color: #1b1511; }
.ng-new ul { margin: 6px 0; padding-left: 1.2em; }
.ng-new p { margin: 6px 0 0; font-size: 14px; }

/* 配達カレンダー */
.ng-cal { border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--card); overflow: hidden; box-shadow: var(--shadow); }
.ng-wk, .ng-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ng-wk span { text-align: center; font-weight: 900; padding: 6px 0; background: var(--ink); color: var(--paper); font-size: 13px; }
.ng-wk .sun { color: #ff8a80; }
.ng-wk .sat { color: #9ec1ff; }
.ng-d { position: relative; min-height: 76px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
.ng-d:nth-child(7n) { border-right: 0; }
.ng-dn { font-family: var(--f-en); font-weight: 700; font-size: 15px; align-self: flex-start; }
.ng-dm { font-size: 24px; font-weight: 900; line-height: 1; }
.ng-d.ok .ng-dm { color: #12895f; }
.ng-d.no { background: repeating-linear-gradient(-45deg, rgba(214, 64, 44, 0.06) 0 6px, transparent 6px 12px); }
.ng-d.no .ng-dm { color: #d6402c; }
.ng-d.ny { background: #fff1b8; }
.ng-d.j2 { background: #ffd9d2; outline: 3px solid #d6402c; outline-offset: -3px; }
.ng-d.dl { outline: 3px solid var(--accent2); outline-offset: -3px; }
.ng-d.out { opacity: 0.35; }
.ng-dt { font-size: 10.5px; font-weight: 700; line-height: 1.25; color: var(--ink2); word-break: keep-all; overflow-wrap: anywhere; }
.ng-dt.t-d, .ng-dt.t-x { color: #c8102e; }
.ng-dt.t-n { color: #8a5a00; }
.ng-dt.t-a { color: var(--accent2); }
.ng-legend { font-size: 13px; color: var(--ink2); margin: 10px 2px 0; line-height: 1.8; }
.ng-legend .lg { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-weight: 900; margin: 0 3px 0 6px; }
.ng-legend .lg.ok { color: #12895f; background: #e3f6ec; }
.ng-legend .lg.no { color: #d6402c; background: #ffe9e4; }
[data-theme='dark'] .ng-d.ny, [data-theme='dark'] .ng-d.j2 { color: #1b1511; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .ng-d.ny, :root:not([data-theme='light']) .ng-d.j2, :root:not([data-theme='light']) .ng-ans li.no, :root:not([data-theme='light']) .ng-ans li.ok { color: #1b1511; } }
[data-theme='dark'] .ng-ans li.no, [data-theme='dark'] .ng-ans li.ok { color: #1b1511; }

.ng-tbl th { white-space: normal; }
.ng-tbl td, .ng-tbl th { font-size: 14.5px; }
.ng-tbl tbody th { text-align: left; font-weight: 700; width: 42%; }

/* 届くもの・届かないもの */
.ng-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ng-k { display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 12px; padding: 8px 10px; background: var(--card); }
.ng-k span { font-size: 22px; font-weight: 900; }
.ng-k.ok span { color: #12895f; }
.ng-k.no span { color: #d6402c; }
.ng-k b { font-size: 13.5px; line-height: 1.35; }

/* 入口タイル */
.ng-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 10px 0 20px; }
.ng-tile { display: flex; gap: 10px; align-items: center; border: var(--bw) solid var(--ink); border-radius: 16px; background: var(--card); padding: 8px; color: var(--ink); text-decoration: none; box-shadow: 3px 3px 0 var(--sh); transition: transform 0.15s; }
.ng-tile:hover { transform: translate(-2px, -2px); }
.ng-tile img { width: 84px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; border: 2px solid var(--ink); }
.ng-tile-e { width: 84px; height: 64px; display: grid; place-items: center; font-size: 36px; flex: none; }
.ng-tile b { display: block; font-size: 15px; line-height: 1.35; }
.ng-tile small { display: block; color: var(--ink2); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }

/* 早わかり */
/* 6項目を 3×2 で。スマホは2列にして、長い「三が日」「干支」だけ横いっぱい（dense で空きを詰める） */
.ng-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 8px; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--card); padding: 14px; box-shadow: var(--shadow); margin-bottom: 18px; }
.ng-facts > div { background: var(--paper2); border-radius: 12px; padding: 8px 10px; line-height: 1.5; }
.ng-facts small { display: block; font-weight: 700; color: var(--ink2); font-size: 12.5px; }
.ng-facts span { font-size: 15px; font-weight: 700; }
.ng-facts .ng-cd { grid-column: 1 / -1; }
@media (max-width: 640px) { .ng-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ng-facts .w { grid-column: 1 / -1; } }
.ng-pick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ng-pick img { width: 100%; height: auto; aspect-ratio: 300 / 444; object-fit: cover; border-radius: 10px; border: 2px solid var(--ink); display: block; }
@media (max-width: 640px) { .ng-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ng-src { margin-top: 22px; font-size: 13px; color: var(--ink2); }
.ng-src ul { margin: 4px 0 0; padding-left: 1.2em; }
.ng-src a { color: var(--ink2); overflow-wrap: anywhere; }
.ng-upd { font-size: 12.5px; color: var(--ink3); }

/* 文例 */
.ng-bun { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ng-b { position: relative; border: var(--bw) solid var(--ink); border-radius: 16px; background: var(--card); padding: 12px 14px 12px; box-shadow: 3px 3px 0 var(--sh); }
.ng-b-h { display: inline-block; background: var(--accent); color: #fff; border-radius: 8px; padding: 2px 10px; font-size: 13.5px; margin-bottom: 6px; }
.ng-b-ja { margin: 4px 0 8px; line-height: 1.85; font-size: 15px; font-family: 'Zen Old Mincho', var(--f-body); }
.ng-b .cmp-en p { font-family: var(--f-read); font-size: 15px; line-height: 1.7; }
.ng-copy { position: absolute; top: 10px; right: 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper2); color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; padding: 3px 9px; cursor: pointer; }
@media (max-width: 400px) { .ng-bun { grid-template-columns: 1fr; } }

/* 時期の帯 */
.ng-span { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border: var(--bw) solid var(--ink); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
.ng-span .sp { padding: 12px 12px; display: flex; flex-direction: column; gap: 2px; color: #1b1511; }
.ng-span .sp + .sp { border-left: 2px solid var(--ink); }
.ng-span .sp.a { background: #ffe1d6; }
.ng-span .sp.b { background: #fff1b8; }
.ng-span .sp.c { background: #dcefe4; }
.ng-span small { font-weight: 900; font-size: 13px; }
.ng-span b { font-family: var(--f-display); font-weight: 400; font-size: 18px; }
.ng-span span { font-size: 12.5px; }
@media (max-width: 520px) { .ng-span .sp + .sp { border-left: 0; border-top: 2px solid var(--ink); } }

/* 発行枚数のグラフ */
.ng-bars { display: grid; gap: 8px; margin-top: 14px; }
.ng-bar { display: grid; grid-template-columns: 5.4em 1fr 4.6em; gap: 8px; align-items: center; font-size: 14px; }
.ng-bar .b { height: 22px; background: var(--paper2); border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.ng-bar .b i { display: block; height: 100%; background: var(--accent); }
.ng-bar b { text-align: right; }
.ng-cap { font-size: 12.5px; color: var(--ink2); margin: 6px 0 0; }

/* デザイン一覧 */
.ng-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ng-filter button, .nm-seg button, .nm-ex button { font: inherit; font-weight: 700; font-size: 13.5px; border: 2px solid var(--ink); border-radius: 999px; padding: 5px 12px; background: var(--card); color: var(--ink); cursor: pointer; }
.ng-filter [aria-pressed='true'], .nm-seg [aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.ng-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ng-g { font: inherit; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--card); padding: 0; overflow: hidden; cursor: pointer; text-align: center; box-shadow: 3px 3px 0 var(--sh); color: var(--ink); transition: transform 0.15s; }
.ng-g:hover { transform: translate(-2px, -2px); }
.ng-g img { width: 100%; height: auto; aspect-ratio: 300 / 444; object-fit: cover; display: block; }
.ng-g span { display: block; font-weight: 700; font-size: 13px; padding: 6px 4px; }


/* 年賀状メーカー */
.nm { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; border: var(--bw) solid var(--ink); border-radius: 22px; background: var(--card); padding: 16px; box-shadow: 4px 4px 0 var(--sh); }
.nm-prev { position: sticky; top: 80px; align-self: start; }
.nm-prev canvas { width: 100%; height: auto; display: block; border-radius: 10px; border: 2px solid var(--ink); background: #fff; }
.nm-form { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nm-form label { font-weight: 900; font-size: 13.5px; margin-top: 6px; }
.nm-form input:not([type='checkbox']), .nm-form textarea, .nm-form select { font: inherit; font-size: 16px; border: 2px solid var(--ink); border-radius: 10px; padding: 8px 10px; background: var(--paper2); color: var(--ink); width: 100%; min-width: 0; }
.nm-ds { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.nm-ds button { padding: 0; border: 2px solid var(--line2); border-radius: 6px; overflow: hidden; background: none; cursor: pointer; }
.nm-ds button[aria-pressed='true'] { border-color: var(--accent); outline: 2px solid var(--accent); }
.nm-ds img { width: 100%; height: auto; aspect-ratio: 300 / 444; object-fit: cover; display: block; }
.nm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.nm-row > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nm-seg, .nm-ex { display: flex; flex-wrap: wrap; gap: 5px; }
.nm-fonts button { font-size: 16px; }
.nm-chk { display: flex; gap: 8px; align-items: center; font-weight: 700 !important; }
.nm-note { font-size: 12.5px; color: var(--ink2); margin: 4px 0 0; }
@media (max-width: 760px) {
  .nm { grid-template-columns: 1fr; padding: 12px; }
  .nm-prev { position: static; max-width: 300px; margin: 0 auto; width: 100%; }
  .nm-ds { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .ng-ans li { grid-template-columns: 1fr; gap: 2px; }
  .ng-d { min-height: 64px; padding: 3px 2px 4px; }
  .ng-dm { font-size: 20px; }
  .ng-dt { font-size: 9.5px; }
  .ng-photo { aspect-ratio: 3 / 1.6; }
}
.nm-w { color: #fff; -webkit-text-stroke: 1px #1b1511; }
@media (max-width: 520px) {
  .ng-gal { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ng-g span { font-size: 11.5px; padding: 4px 2px; line-height: 1.3; }
  .nm-ds { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
}

/* 英語で言うと？・英語で説明 */
.ng-en { display: grid; gap: 14px; }
.ng-say { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ng-say-i { border: 2px solid var(--ink); border-radius: 12px; background: var(--card); padding: 8px 12px; }
.ng-say-i b { display: block; font-family: var(--f-en); font-size: 18px; color: var(--accent); line-height: 1.35; }
.ng-say-i span { display: block; font-size: 13.5px; font-weight: 700; }
.ng-say-i small { display: block; font-size: 12px; color: var(--ink3); }
.ng-ex { border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--card); padding: 12px 16px; box-shadow: 3px 3px 0 var(--sh); }
.ng-ex-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.ng-ex .en-t { font-family: var(--f-read); font-size: 17px; line-height: 1.7; margin: 10px 0 0; }
.ng-vocab { list-style: none; padding: 10px 0 0; margin: 12px 0 0; border-top: 2px dashed var(--line2); display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
.ng-vocab b { font-family: var(--f-en); margin-right: 5px; }
/* 松の内の日程 */
.ng-days { display: grid; gap: 10px; }
.ng-day { display: grid; grid-template-columns: 5.4em 1fr; gap: 12px; align-items: start; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); padding: 10px 12px; }
.ng-day-d { font-family: var(--f-display); font-size: 20px; line-height: 1.2; color: var(--accent); }
.ng-day-d small { display: block; font-family: var(--f-body); font-size: 12px; color: var(--ink2); font-weight: 700; }
.ng-day b { font-size: 15px; }
.ng-day p { margin: 2px 0 0; font-size: 14px; color: var(--ink2); line-height: 1.7; }
.ng-photo img { object-position: 50% 30%; }
@media (max-width: 520px) {
  .ng-span { grid-template-columns: 1fr; }
  .ng-nav { gap: 5px; }
  .ng-nav a { font-size: 12.5px; padding: 5px 9px; }
  .ng-say { grid-template-columns: 1fr 1fr; }
  .ng-say-i b { font-size: 15.5px; }
}
