/* 目的: 中袋の見本アプリだけの見た目。手本は docs/design-tehon/nakabukuro.png
   （和紙の地・中央の明朝の題字・藍の地の切り替え・罫線にはさんだ金額の並び・紙の上に置いた白い袋2枚）。
   白い箱で囲まない。段は細い罫線と余白で分ける。 */
.atama { text-align: center; padding-top: 26px; }
.atama h1 { font-size: clamp(34px, 10vw, 56px); letter-spacing: .06em; }

/* 目的: 目には見せず、読み上げにだけ伝える名前 */
.nk-kakusu { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 目的: 「香典｜ご祝儀」。選ばれた方だけ藍の地に白い字、間に細い縦線 */
.nk-shurui { display: flex; justify-content: center; align-items: center; margin: 18px 0 22px; }
.nk-shurui button {
  border: 0; border-radius: 0; background: none; color: var(--ji);
  font-size: clamp(20px, 5.8vw, 24px); letter-spacing: .2em; min-height: 48px; padding: 6px 16px 6px 21px;
}
.nk-shurui button + button { position: relative; margin-left: 40px; }
.nk-shurui button + button::before { content: ""; position: absolute; left: -20px; top: 28%; height: 44%; width: 1px; background: var(--sen); }
/* 目的: 押せる高さ（48）は保ったまま、地の色は字の高さに近い帯だけに塗る（1色の塗り。ぼかしではない） */
.nk-shurui button[aria-pressed="true"] { background: linear-gradient(var(--iro), var(--iro)) center / 100% 40px no-repeat; color: #fdfaf2; }

/* 目的: 字の並びで選ぶ所（金額・細かい切り替え）。選ばれた物だけ鈍い金の地に白い字。箱や丸い札にしない */
.nk-narabi { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.nk-narabi button {
  border: 0; border-radius: 0; background: none; color: var(--ji);
  font-size: 17px; letter-spacing: .04em; min-height: 44px; min-width: 44px; padding: 4px 10px;
}
/* 目的: 押せる高さ（44）は保ったまま、地の色は字の高さに近い帯だけに塗る（1色の塗り） */
.nk-narabi button[aria-pressed="true"] { background: linear-gradient(var(--kin), var(--kin)) center / 100% 32px no-repeat; color: #fffdf6; }

/* 目的: 金額は、上下を細い罫線ではさんだ1行。入らない幅では自然に折り返す */
.nk-gaku-botan { justify-content: space-between; border-top: 1px solid var(--sen); border-bottom: 1px solid var(--sen); padding: 6px 0; }
.nk-gaku-botan button { font-size: clamp(17px, 4.8vw, 21px); padding: 4px 8px; }

/* 目的: 主役の袋の絵。「表」「裏」の小さな字の下に、紙の地へ置いた白い袋を横に2枚（狭い幅でも横並び） */
.nk-mihon { margin: 16px 0 0; }
.nk-e { display: flex; justify-content: center; gap: 0 clamp(14px, 5vw, 44px); }
.nk-e figure { margin: 0; flex: 0 1 280px; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.nk-e figure[hidden] { display: none; }
.nk-e figcaption { order: -1; font-family: var(--midashi); font-size: 15px; letter-spacing: .2em; line-height: 1.4; margin: 0 0 8px; text-align: center; }
.nk-e canvas {
  display: block; width: 100%; height: auto; background: var(--shiro);
  box-shadow: 0 1px 1px rgba(70, 52, 20, .24), 2px 5px 9px rgba(70, 52, 20, .13);
}

/* 目的: 「画像で保存」は幅の広い藍の主ボタン、「印刷」は字だけ */
.nk-osu { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 30px 8px 0; }
.nk-osu .omo { font-size: 20px; min-height: 58px; }
button.nk-jidake { border: 0; background: none; color: var(--ji); font-size: 18px; letter-spacing: .22em; min-height: 48px; }

/* 目的: 金額の字を、絵とは別に読める文字でも見せる（写せる・読み上げられる） */
.nk-moji { margin: 14px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 12px; }
.nk-moji b { font-family: var(--midashi); font-size: 20px; letter-spacing: .1em; overflow-wrap: anywhere; }
.nk-hosoku { margin: 6px 0 0; text-align: center; }

/* 目的: 袋の絵より下の段。箱で囲まず、上の細い罫線と余白で分ける */
.nk-dan { margin: 30px 0 0; padding: 22px 0 0; border-top: 1px solid var(--sen); }
.nk-dan + .nk-dan { margin-top: 22px; border-top-color: var(--sen-usui); }

/* 目的: 見出しを左、欄を右に置く。欄は下線だけ */
.nk-ran { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 8px; align-items: center; }
.nk-ran > label, .nk-ran-mei { margin: 0; font-family: var(--midashi); font-weight: 700; font-size: 15px; letter-spacing: .08em; white-space: nowrap; }
.nk-ran input[type="text"], .nk-ran textarea { min-width: 0; font-size: 18px; }
.nk-ran textarea { font-size: 16.5px; line-height: 1.6; border: 0; border-bottom: 1.5px solid var(--sen); padding: 9px 4px 8px; resize: vertical; display: block; }
.nk-zen { grid-column: 1 / -1; margin: 0; }
.nk-chuu { margin: 0 0 4px; }
.nk-dan > .nk-chuu { margin: 12px 0 0; }
.nk-ayamari { color: var(--shu); }
.nk-kirikae { row-gap: 2px; }

/* 目的: 説明の所の対応表（数字と大字）は字を大きめに、まん中に */
.nk-taiou th, .nk-taiou td { text-align: center; }
.nk-taiou td { font-size: 18px; font-family: var(--midashi); }

@media (max-width: 420px) {
  .nk-ran { column-gap: 12px; }
  .nk-ran > label, .nk-ran-mei { font-size: 14.5px; letter-spacing: .04em; }
  .nk-narabi button { padding: 4px 8px; }
  .nk-gaku-botan button { padding: 4px 5px; }
}

/* 目的: 印刷では袋の絵と金額の字だけを出す。白い紙の上でも袋の形が分かるよう、影の代わりに細い線で囲む */
@media print {
  .atama { padding-top: 0; }
  .atama h1 { font-size: 24px; }
  .lead { display: none; }
  .nk-e { gap: 0 24px; }
  .nk-e figure { flex-basis: 250px; }
  .nk-e canvas { box-shadow: none; border: 1px solid #999; background: #fff; }
}

/* 目的: 幅375の画面でも金額の7つを1行に収める（2026-11-28 目視で「10万」だけ2行目に落ちたのを直す） */
@media (max-width: 389px) {
  .nk-gaku-botan button { font-size: 16px; padding: 4px 3px; letter-spacing: 0; }
}
