/* ============================================================
 * フェーズ18：御朱印帳（pages/shrine/goshuin.html）と、村のページに置いた印
 * ============================================================ */

/* ---- 村のページに置いた、押せる小さな朱色の印 ---- */
.goshuin-slot {
  margin: 28px 0 8px;
  text-align: right;
  line-height: 1;
}
.goshuin-mark {
  display: inline-block;
  width: 36px;
  height: 36px;
  cursor: pointer;
  vertical-align: middle;
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease;
}
.goshuin-mark:hover { transform: scale(1.08); }
.goshuin-mark:focus-visible { outline: 2px solid #b3261e; outline-offset: 3px; }
.goshuin-mark:active { transform: scale(0.94); }
.goshuin-mark-svg { display: block; width: 100%; height: 100%; }

/* ---- 押したときの小さな表示 ---- */
.goshuin-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 360px;
  margin: 0 auto;
  padding: 10px 14px;
  background: #2a1a0a;
  color: #f1e3c8;
  border: 1px solid #b3261e;
  border-left-width: 4px;
  font-size: 13px;
  line-height: 1.8;
  z-index: 9500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.goshuin-toast p { margin: 0; }
.goshuin-toast a { color: #f0c27a; font-size: 12px; text-decoration: underline; }

/* ---- 御朱印帳 ---- */
.gs-intro { font-size: 13px; line-height: 1.9; color: #4a3a28; margin-bottom: 14px; }
.gs-count {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border: 1px solid #b3261e;
  color: #8e1d17;
  font-size: 13px;
  letter-spacing: .08em;
}
.gs-book {
  background: #f4ecd8;
  border: 1px solid #b8a890;
  box-shadow: 2px 3px 10px rgba(57, 45, 31, .12);
  padding: 18px 14px 6px;
}
.gs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}
@media (min-width: 640px) {
  .gs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.gs-cell {
  background: #fbf6e8;
  border: 1px solid #d8ccb0;
  padding: 10px 8px 12px;
  text-align: center;
  min-width: 0;
}
.gs-month { font-size: 13px; color: #5a4a35; letter-spacing: .2em; margin-bottom: 6px; }
.gs-slot { width: 96px; height: 96px; margin: 0 auto 8px; }
.gs-slot svg { display: block; width: 100%; height: 100%; }
.gs-clue { font-size: 13px; line-height: 1.8; color: #5a4a35; margin: 0; text-align: left; }
.gs-cell.is-stamped .gs-clue { color: #8a7a65; }

.gs-thirteen { margin: 18px 0 8px; }
.gs-thirteen-frame {
  border: 2px double #8e1d17;
  background: #fbf6e8;
  padding: 16px 14px;
  text-align: center;
}
.gs-thirteen-label { font-size: 13px; color: #8e1d17; letter-spacing: .3em; margin-bottom: 8px; }
.gs-thirteen-text { margin: 0; font-size: 15px; color: #3d2b1a; letter-spacing: .08em; line-height: 1.9; }
.gs-pencil {
  margin: 10px 4px 4px;
  padding: 10px 14px;
  border-left: 3px solid #9a9a9a;
  color: #5c5c5c;
  font-size: 13px;
  line-height: 2;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-style: italic;
}
.gs-pencil p { margin: 0 0 4px; }
.gs-pencil .gs-pencil-sign { text-align: right; font-size: 12px; }

.gs-note { font-size: 11px; color: #8a7a65; margin: 14px 0 6px; line-height: 1.8; }

/* ---- 「印刷する」ボタン（御朱印帳の末尾。印刷には出さない） ---- */
.gs-print { margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.gs-print-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 8px 18px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.4;
  color: #3d2b1a;
  background: #f4ecd8;
  border: 1px solid #8e1d17;
  border-radius: 2px;
  cursor: pointer;
}
.gs-print-btn:hover { background: #ecdfc0; }
.gs-print-btn:focus-visible { outline: 2px solid #b3261e; outline-offset: 2px; }
.gs-print-note { font-size: 11px; line-height: 1.8; color: #8a7a65; flex: 1 1 14em; min-width: 0; }

/* ---- 印刷（紙の御朱印帳）：A4 縦。ヘッダー・ナビ・フッター・演出は出さず、白地に墨色。朱の印は朱のまま ---- */
@page goshuin-book { size: A4 portrait; margin: 14mm 14mm 16mm; }
@media print {
  body[data-page="shrine-goshuin"] { background: #fff; color: #1c1812; font-size: 10pt; line-height: 1.7; }
  body[data-page="shrine-goshuin"]::before,
  body[data-page="shrine-goshuin"]::after { content: none; display: none; }
  body[data-page="shrine-goshuin"] :is(#site-header, #site-nav, #site-footer, #mobile-search-bar, #devtools-overlay, #custom-cursor, #custom-context-menu, #flash-msg, #welcome-overlay, #villager-counter-container, .skip-link, .breadcrumb, .hoshi-banner, .goshuin-toast, .n-box, .gs-print, .gs-note, .gs-back) { display: none !important; }
  body[data-page="shrine-goshuin"] #site-main { display: block; max-width: none; margin: 0; padding: 0; page: goshuin-book; }
  body[data-page="shrine-goshuin"] .content-area { display: block; }
  body[data-page="shrine-goshuin"] .page-title { font-size: 20pt; text-align: center; color: #1c1812; border-bottom: 1.5pt solid #1c1812; padding-bottom: 6pt; margin-bottom: 10pt; letter-spacing: .3em; }
  body[data-page="shrine-goshuin"] .page-title .title-en { color: #5a5242; font-size: 8pt; }
  body[data-page="shrine-goshuin"] .gs-intro { font-size: 9pt; line-height: 1.8; color: #2e2820; margin: 0 0 6pt; }
  body[data-page="shrine-goshuin"] .gs-count { margin: 0 0 8pt; padding: 2pt 10pt; font-size: 10pt; border: 1pt solid #b3261e; color: #8e1d17; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body[data-page="shrine-goshuin"] .gs-book { background: none; border: 1pt solid #1c1812; box-shadow: none; padding: 8pt 8pt 2pt; }
  body[data-page="shrine-goshuin"] .gs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5pt 6pt; }
  body[data-page="shrine-goshuin"] .gs-cell { background: none; border: .6pt solid #6f6654; padding: 4pt 5pt 5pt; break-inside: avoid; }
  body[data-page="shrine-goshuin"] .gs-month { font-size: 10pt; color: #1c1812; margin-bottom: 3pt; }
  body[data-page="shrine-goshuin"] .gs-slot { width: 19mm; height: 19mm; margin-bottom: 3pt; }
  body[data-page="shrine-goshuin"] .gs-seal { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body[data-page="shrine-goshuin"] .gs-empty rect { stroke: #8a7f68; }
  body[data-page="shrine-goshuin"] .gs-empty text { fill: #8a7f68; }
  body[data-page="shrine-goshuin"] .gs-clue,
  body[data-page="shrine-goshuin"] .gs-cell.is-stamped .gs-clue { font-size: 8.5pt; line-height: 1.6; color: #2e2820; }
  body[data-page="shrine-goshuin"] .gs-thirteen { margin: 6pt 0 4pt; break-inside: avoid; }
  body[data-page="shrine-goshuin"] .gs-thirteen-frame { background: none; border: 2pt double #8e1d17; padding: 5pt 10pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body[data-page="shrine-goshuin"] .gs-thirteen-label { font-size: 10pt; color: #8e1d17; }
  body[data-page="shrine-goshuin"] .gs-thirteen-text { font-size: 11pt; color: #1c1812; }
  body[data-page="shrine-goshuin"] .gs-pencil { margin: 5pt 2pt 2pt; padding: 3pt 10pt; font-size: 9pt; line-height: 1.8; color: #4a463d; border-left: 2pt solid #8f8b82; break-inside: avoid; }
}
