/* 月・宇宙カレンダー（/calendar/） */
.mn { display: block; flex: none; }
.cal-hero .lead b { color: var(--gold); }
.cal-big { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 210, 122, 0.12); border: 1px solid rgba(255, 210, 122, 0.4); }
.cal-now { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding: 14px 18px; max-width: 460px; }
.cal-now span { font-size: 13px; color: var(--tx2); display: block; }
.cal-now b { font-size: 22px; display: block; color: var(--gold); }
.cal-now small { display: block; font-size: 14px; color: var(--tx2); }
.cn-moon .mn { filter: drop-shadow(0 0 14px rgba(255, 231, 163, 0.45)); }
.cal-corner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cal-corner a { display: flex; flex-direction: column; gap: 6px; padding: 18px; text-decoration: none; color: inherit; transition: transform 0.2s, border-color 0.2s; }
.cal-corner a:hover { transform: translateY(-3px); border-color: var(--gold); }
.cc-ic { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45)); }
.cal-corner b { font-size: 18px; color: var(--gold); }
.cal-corner span:last-child { font-size: 14px; color: var(--tx2); line-height: 1.6; }
@media (max-width: 960px) { .cal-corner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .cal-corner { grid-template-columns: 1fr; } }
.cal-ycs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cal-yc { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; text-decoration: none; color: inherit; text-align: center; transition: transform 0.2s, border-color 0.2s; }
.cal-yc:hover { transform: translateY(-3px); border-color: var(--gold); }
.cal-yc b { font-size: 28px; line-height: 1.1; }
.cal-yc b small { font-size: 14px; }
.cal-yc span { font-size: 13px; color: var(--tx2); }
.cal-yc em { font-style: normal; font-size: 13px; color: var(--gold); font-weight: 700; }
@media (max-width: 860px) { .cal-ycs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .cal-ycs { grid-template-columns: 1fr 1fr; } }
.cal-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.cal-strip a { flex: none; width: 54px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.cal-strip a.today { border-color: var(--gold); background: rgba(255, 210, 122, 0.12); }
.cal-strip small { font-size: 11.5px; color: var(--tx2); }
.cal-strip b { font-size: 16px; }
.cal-strip em { font-style: normal; font-size: 11px; color: var(--gold); }
.cal-strip .sun b, .cal-strip .sun small { color: #ff9db0; }
.cal-strip .sat b, .cal-strip .sat small { color: #9cc4ff; }
.cal-names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cn-i { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; }
.cn-i small { font-size: 12px; color: var(--tx2); display: block; }
.cn-i b { font-size: 18px; display: block; }
.cn-i em { font-style: normal; font-size: 13px; color: var(--gold); display: block; }
.cn-i span { font-size: 13.5px; color: var(--tx2); line-height: 1.6; display: block; margin-top: 2px; }
@media (max-width: 960px) { .cal-names { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cal-names { grid-template-columns: 1fr; } }
.cal-box { padding: 18px 20px; }
.cal-box p { line-height: 1.85; }
.cal-years { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-years a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: inherit; font-weight: 700; }
.cal-years a[aria-current] { background: var(--gold); color: #1a1205; border-color: var(--gold); }
/* みどころ */
.cal-hl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cal-hl li { display: flex; gap: 12px; align-items: flex-start; }
.cal-hl b { display: block; font-size: 16px; }
.cal-hl span { display: block; font-size: 14px; color: var(--tx2); line-height: 1.65; }
.cal-hl .ok { color: var(--green); display: inline; font-size: inherit; }
.hl-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex !important; align-items: center; justify-content: center; font-size: 16px; background: rgba(255, 255, 255, 0.07); margin-top: 1px; }
.hl-ecl .hl-ic::before { content: '🌑'; } .hl-sun .hl-ic::before { content: '☀️'; } .hl-super .hl-ic::before { content: '🌕'; } .hl-blue .hl-ic::before { content: '💙'; }
.hl-jugoya .hl-ic::before { content: '🎑'; } .hl-jusanya .hl-ic::before { content: '🌔'; } .hl-met .hl-ic::before { content: '🌠'; } .hl-sek .hl-ic::before { content: '🌏'; }
.cal-fm { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 210, 122, 0.08); }
.cal-fm b { display: block; color: var(--gold); }
.cal-fm span { display: block; font-size: 14px; color: #cfe0ff; }
.cal-fm small { display: block; font-size: 13.5px; color: var(--tx2); line-height: 1.6; margin-top: 4px; }
.cal-tv { font-size: 16px; }
.cal-tv-en { color: #cfe0ff; font-size: 15px; }
/* 1年：小さな月 */
.cy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cy-m { padding: 14px; text-decoration: none; color: inherit; transition: border-color 0.2s; }
.cy-m:hover { border-color: var(--gold); }
.cy-m h3 { margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; }
.cy-m h3 b { font-size: 22px; color: var(--gold); }
.cy-m h3 small { font-size: 12px; color: var(--tx2); letter-spacing: 0.04em; }
.cy-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.cy-g em { font-style: normal; font-size: 11px; color: var(--tx2); }
.cy-g span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px 0; border-radius: 6px; }
.cy-g span b { font-size: 11px; font-weight: 600; }
.cy-g .sun b, .cy-g em.sun { color: #ff9db0; }
.cy-g .sat b, .cy-g em.sat { color: #9cc4ff; }
.cy-g .fm .mn { outline: 1.5px solid var(--gold); border-radius: 50%; }
.cy-g .nm .mn { outline: 1.5px solid #6f9cff; border-radius: 50%; }
.cy-g .sp { background: rgba(255, 122, 200, 0.16); }
@media (max-width: 960px) { .cy-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cy-grid { grid-template-columns: 1fr; } }
.tbl-wrap { overflow-x: auto; margin-top: 10px; }
.cal-tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.cal-tbl th, .cal-tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cal-tbl thead th { color: var(--gold); font-size: 13px; }
.cal-tbl small { color: var(--tx2); }
.tg { font-style: normal; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: rgba(99, 140, 255, 0.18); color: #cfe0ff; white-space: nowrap; }
.tg-super { background: rgba(255, 210, 122, 0.2); color: var(--gold); } .tg-blue { background: rgba(99, 170, 255, 0.25); } .tg-ecl { background: rgba(255, 122, 150, 0.2); color: #ffb3c2; }
.cal-sekki { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.cal-sekki li, .cal-hol li { display: flex; gap: 8px; align-items: baseline; border-bottom: 1px dashed var(--line); padding: 4px 0; font-size: 14px; }
.cal-sekki small { color: var(--tx2); font-size: 11.5px; }
.cal-sekki span { margin-left: auto; color: var(--tx2); }
.cal-hol { list-style: none; margin: 10px 0 0; padding: 0; }
.cal-hol span { min-width: 6.5em; color: var(--tx2); }
.cal-pn { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px; }
.cal-pn a { padding: 12px 14px; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.cal-pn a:nth-child(2) { text-align: center; } .cal-pn a:last-child { text-align: right; }
.cal-pn small { color: var(--gold); font-weight: 700; }
@media (max-width: 600px) { .cal-pn { grid-template-columns: 1fr; } .cal-pn a { text-align: left !important; } }
.cal-more { display: flex; flex-wrap: wrap; gap: 10px; }
/* 道具 */
.cal-tools { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.ct-g { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ct-l { font-size: 13px; color: var(--tx2); font-weight: 700; margin-right: 4px; }
.cal-tools .chip { cursor: pointer; border: 0; font-family: inherit; }
.cal-tools .chip.on { background: var(--gold); color: #1a1205; }
.ct-note { margin: 0; font-size: 13.5px; }

/* ── 印刷できる1か月（紙） ── */
.cal-sheet { --ink: #eef2ff; --sub: #a9b6d8; --bg: #0b1230; --cell: rgba(255, 255, 255, 0.04); --cl: rgba(255, 255, 255, 0.12); --sun: #ff8fa6; --sat: #8fb8ff; --acc: #ffd27a; --mlit: #ffe7a3; --mdark: #2a3150;
  background: radial-gradient(ellipse at 80% 0%, #1b2a6b 0%, transparent 55%), var(--bg); color: var(--ink); border-radius: 18px; padding: clamp(10px, 2.2vw, 26px); border: 1px solid var(--cl); overflow: hidden; }
.cal-sheet[data-theme='kraft'] { --ink: #3b2412; --sub: #6b4a2c; --bg: #c9a173; --cell: transparent; --cl: rgba(59, 36, 18, 0.45); --sun: #9b1c1c; --sat: #1f3f7a; --acc: #3b2412; --mlit: #f4e4c4; --mdark: #4a2e17;
  background: repeating-linear-gradient(37deg, rgba(0, 0, 0, 0.025) 0 2px, transparent 2px 5px), #c9a173; }
.cal-sheet[data-theme='white'] { --ink: #1a1a1a; --sub: #555; --bg: #fff; --cell: transparent; --cl: #bbb; --sun: #c8102e; --sat: #1d4fa8; --acc: #1a1a1a; --mlit: #fff; --mdark: #444; background: #fff; }
.cal-sheet .mn circle { fill: var(--mdark); }
.cal-sheet .mn path { fill: var(--mlit); }
.cal-sheet[data-theme='white'] .mn circle, .cal-sheet[data-theme='kraft'] .mn circle { stroke: var(--mdark); stroke-width: 2; }
.cal-sheet[data-theme='white'] .mn path { stroke: #444; stroke-width: 1.2; }
.cs-hd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: stretch; margin-bottom: 12px; }
.cs-ph { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 1; background: #000; }
.cs-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-ph small { position: absolute; right: 8px; bottom: 6px; font-size: 10.5px; color: #fff; text-shadow: 0 1px 3px #000; }
.cal-sheet[data-theme='kraft'] .cs-ph, .cal-sheet[data-theme='white'] .cs-ph { filter: grayscale(1) contrast(1.1); }
.cal-sheet[data-theme='kraft'] .cs-ph { mix-blend-mode: multiply; filter: grayscale(1) sepia(0.6) contrast(1.2); }
.cs-ttl { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; text-align: right; min-width: 150px; }
.cs-y { margin: 0; font-size: 18px; letter-spacing: 0.3em; color: var(--sub); font-weight: 700; }
.cs-ttl h2 { margin: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.cs-ttl h2 b { font-size: clamp(56px, 8vw, 96px); color: var(--acc); font-weight: 900; }
.cs-ttl h2 span { font-size: 14px; letter-spacing: 0.3em; color: var(--sub); margin-top: 4px; }
.cs-wa { margin: 6px 0 0; font-size: 20px; font-weight: 800; }
.cs-wa small { font-size: 12px; color: var(--sub); margin-left: 6px; font-weight: 400; }
.cm-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cm-h { text-align: center; font-weight: 800; font-size: 14px; padding: 4px 0; color: var(--ink); }
.cm-h small { display: block; font-size: 9.5px; letter-spacing: 0.12em; color: var(--sub); font-weight: 600; }
.cm-h.sun, .cm-d.sun .cm-n { color: var(--sun); }
.cm-h.sat, .cm-d.sat .cm-n { color: var(--sat); }
.cm-d { min-height: 104px; border: 1px solid var(--cl); border-radius: 8px; background: var(--cell); padding: 4px 5px 5px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; overflow: hidden; }
.cm-x { border-style: dashed; opacity: 0.35; }
.cm-d.today { box-shadow: inset 0 0 0 2px var(--acc); }
.cm-top { width: 100%; display: flex; align-items: flex-start; gap: 4px; min-width: 0; }
.cm-n { font-size: 20px; font-weight: 900; line-height: 1; }
.cm-hol { font-size: 10px; color: var(--sun); line-height: 1.2; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cm-d .mn { width: 40px; height: 40px; margin-top: 2px; }
.cm-age { font-size: 10.5px; color: var(--sub); line-height: 1.1; }
.cm-kyu { font-size: 10.5px; font-weight: 700; color: var(--acc); line-height: 1.15; text-align: center; }
.cm-nt { list-style: none; margin: 1px 0 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; width: 100%; }
.cm-nt li { font-size: 10px; line-height: 1.2; text-align: center; padding: 1px 4px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); max-width: 100%; overflow-wrap: anywhere; }
.cal-sheet[data-theme='kraft'] .cm-nt li, .cal-sheet[data-theme='white'] .cm-nt li { background: none; border: 1px solid var(--cl); }
.cm-nt .n-ph2, .cm-nt .n-super, .cm-nt .n-jugoya { color: var(--acc); font-weight: 800; }
.cm-nt .n-ecl { color: var(--sun); font-weight: 800; }
.cs-ft { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cs-ph4 { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.cs-ph4 li { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.cs-ph4 span { color: var(--sub); }
.cs-ph4 small { margin-left: 4px; font-size: 10.5px; }
.cs-tv { margin: 0; font-size: 13px; line-height: 1.6; }
.cs-tv b { margin-right: 8px; color: var(--acc); }
.cs-sig { margin: 0; font-size: 10.5px; color: var(--sub); text-align: right; }
@media (max-width: 720px) {
  .cs-hd { grid-template-columns: 1fr; gap: 8px; }
  .cs-ttl { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; }
  .cs-ttl h2 { flex-direction: row; align-items: baseline; gap: 8px; }
  .cs-ttl h2 b { font-size: 52px; }
  .cm-grid { gap: 2px; }
  .cm-d { min-height: 72px; padding: 3px 1px; border-radius: 6px; }
  .cm-n { font-size: 14px; }
  .cm-d .mn { width: 26px; height: 26px; }
  .cm-hol, .cm-kyu { font-size: 8.5px; }
  .cm-age { font-size: 8.5px; }
  .cm-nt li { font-size: 8px; padding: 0 2px; }
  .cm-h { font-size: 12px; } .cm-h small { display: none; }
  .cm-top { flex-direction: column; align-items: center; gap: 0; }
  .cm-hol { white-space: normal; text-align: center; }
}
/* 型紙 */
.cr-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.cr-sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cr-pg { background: #fff; color: #222; border-radius: 14px; padding: 14px; }
.cr-h { font-size: 15px; margin: 0 0 8px; color: #222; }
.cr-svg { width: 100%; height: auto; display: block; }
.cr-p { font-size: 13px; color: #444; margin: 8px 0 0; }
.cr-steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; line-height: 1.7; }
@media (max-width: 860px) { .cr-sheet { grid-template-columns: 1fr; } }

/* ── 印刷 ── */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  html, body { background: #fff !important; }
  body * { visibility: hidden; }
  [data-sheet], [data-sheet] * { visibility: visible; }
  [data-sheet] { position: absolute; left: 0; top: 0; width: 100%; border: 0; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cal-sheet[data-theme='kraft'] { background: none !important; }
  .cal-sheet[data-theme='kraft'] .cs-ph { mix-blend-mode: normal; }
  .cm-d { min-height: 0; height: 22mm; }
  .cr-sheet { display: block; }
  .cr-pg { page-break-after: always; break-after: page; padding: 0; }
  .cr-pg .cr-svg { width: 190mm; max-height: 180mm; margin: 0 auto; }
  .cr-pg .cr-stand { width: 190mm; }
  body.print-craft { }
}
.cal-sheet[data-theme='navy'] .mn circle, .cal-strip .mn circle, .cy-g .mn circle { stroke: rgba(170, 190, 255, 0.35); stroke-width: 2; }
.cal-more .btn, .cal-tools .btn, .cr-tools .btn { white-space: normal; max-width: 100%; text-align: center; }
@media print {
  .cs-hd { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 2mm; gap: 6mm; }
  .cs-ph { aspect-ratio: auto; height: 30mm; }
  .cs-ttl { flex-direction: column; align-items: flex-end; }
  .cs-ttl h2 { flex-direction: column; }
  .cs-ttl h2 b { font-size: 44pt; }
  .cs-y { font-size: 11pt; }
  .cm-d { height: 20mm; min-height: 0; padding: 1mm; }
  .cm-d .mn { width: 9mm; height: 9mm; }
  .cm-h { padding: 0.5mm 0; }
  .cs-ft { margin-top: 2mm; gap: 1mm; }
  .cal-sheet { padding: 0; }
}
@media print {
  body * { visibility: visible; }
  body > *:not(main), main > *:not(:has([data-sheet])), .noprint, [data-sheet] ~ *:not([data-sheet]) { display: none !important; }
  main, main > section { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  [data-sheet] { position: static; }
}
/* 印刷：1枚の A4 横にぴったり。マスは「日付・祝日（左上）＋月の絵（右上）＋月齢・名前・できごと（下）」 */
@media print {
  [data-sheet] { width: auto !important; max-width: none !important; margin: 0 !important; box-shadow: none !important; }
  .cal-sheet { padding: 3mm 4mm !important; border-radius: 0 !important; }
  .cs-ph { height: 26mm; }
  .cs-ttl h2 b { font-size: 40pt; }
  .cm-grid { gap: 1mm; }
  .cm-h { font-size: 9pt; } .cm-h small { font-size: 6pt; }
  .cm-d { height: 19.5mm; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: start; gap: 0 1mm; padding: 1mm 1.2mm; border-radius: 2mm; }
  .cm-x { display: block; }
  .cm-top { grid-column: 1; grid-row: 1; flex-direction: column; align-items: flex-start; gap: 0; }
  .cm-n { font-size: 15pt; }
  .cm-hol { font-size: 6pt; white-space: normal; }
  .cm-d .mn { grid-column: 2; grid-row: 1; width: 9mm; height: 9mm; margin: 0; }
  .cm-age, .cm-kyu, .cm-nt { grid-column: 1 / 3; }
  .cm-age { font-size: 6pt; justify-self: end; margin-top: -0.6mm; }
  .cm-kyu { font-size: 6.5pt; justify-self: center; }
  .cm-nt { gap: 0.3mm; }
  .cm-nt li { font-size: 5.8pt; padding: 0 1mm; line-height: 1.25; }
  .cs-ph4 li { font-size: 8pt; } .cs-ph4 .mn { width: 5mm; height: 5mm; }
  .cs-tv { font-size: 7.5pt; } .cs-sig { font-size: 6.5pt; }
}
@media print {
  .cs-hd { align-items: center; }
  .cs-ttl { min-width: 0; }
  .cs-ttl h2 b { font-size: 30pt; }
  .cs-ttl h2 span { font-size: 7pt; margin-top: 0; }
  .cs-y { font-size: 9pt; }
  .cs-wa { font-size: 10pt; margin-top: 1mm; }
  .cm-nt { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .cm-nt li { font-size: 5.5pt; }
}
@media print {
  @page { size: A4 landscape; margin: 0; }
  .cal-sheet { width: 297mm !important; height: 209mm !important; box-sizing: border-box; padding: 7mm 9mm !important; overflow: hidden; }
  .cs-sig { white-space: nowrap; }
  .cr-pg { padding: 8mm !important; }
}
.cal-hl .hl-more { color: var(--gold); font-weight: 700; white-space: nowrap; }
