@charset "utf-8";
/* 量の計算とお買い物のページの見た目（トップページと同じ、紙・墨・黄）。w1.css のあとに読む。
   w1.css は、ほかのページ（コラム・規約など）も読むので変えない。
   決まり：
   - 押せる物は、墨（黒）。ぬりつぶしのボタンは、墨の地に白い字、右はしに黄色の「›」。
     次の大きなステップへ進むボタンは、黄色の地に墨の字と、墨の太い枠。
   - 次に押す所は、いつも1つ。ぬりつぶしのボタンは、質問の下に1つと、結果の上と下（行き先は同じ、お買い物のページ）。
     ゆっくり動く（「›」と、まわりのうすい輪）のは、質問の下か、結果の下の、そのとき押してほしい1つだけ。
   - 結果の中の、ほかの押せる物（目次の札・品目ごとの「これを買う」）は、わくだけ。ぬりつぶしにしない。
   - 読む物は、白い札に入れる（墨の太い枠）。選んだ所は、黄色の地。
   - 大事な言葉に、黄色のライン（1画面に1〜2か所。押せる所には引かない）。
   - 見出しは明朝、本文はゴシック、数字は幅のそろった字。どれも端末の字。
   - 赤（朱）は、このページでは使わない。暗い画面の版は作らない。
   - 字と地の色の差は 4.5 以上、押せる物とまわりの差は 3 以上（test/w1_look.test.mjs が見張る）。
   - 群の色・札の種類（国の推奨・目安・体験談）・キーボードの輪は、前のまま。 */
:root {
  --bg: #F3EDE2;
  --card: #FFFFFF;
  --ink: #141414;
  --sub: #5A544B;
  --line: #D6CDBD;
  --field-line: #7A7266;
  --soft: #F3EDE2;
  --sel: #FFF1BF;
  --act: #141414;
  --yel: #FFD23F;
  --go: #FFD23F;
  --go-ink: #141414;
  --mark: #FFD23F;
  --ok-bg: #FFF1BF;
  --ok-ink: #141414;
  --none-bg: #E9E1D2;
  --none-ink: #2A2724;
  --r: .9rem;
  --card-r: 1.5rem;
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "Noto Serif CJK JP", serif;
  --num: Bahnschrift, "DIN Alternate", "Roboto Condensed", "Segoe UI", sans-serif;
}

/* キーボードで選んだ所の輪は、前の決まりのまま（黒い枠と黄色の二重の輪） */
:focus-visible { outline: 4px solid #1A1A1A; outline-offset: 2px; box-shadow: 0 0 0 2px #FFD43D; }
.choice-input:focus-visible + label { outline: 4px solid #1A1A1A; outline-offset: 2px; box-shadow: 0 0 0 2px #FFD43D; }

/* 上の帯：紙の地に、筆のロゴと、明朝の大きな見出し */
.hero { background: transparent; border-radius: 0; padding: 1.1em var(--side) .4em; }
.hero h1 { font-family: var(--mincho); font-weight: 600; font-size: 2em; line-height: 1.3; letter-spacing: .01em; margin: .5em 0 .4em; }
.lead { font-weight: 700; }

/* 文字のリンクは押せる物：墨の字と、太い下線 */
.wrap a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: .2em; }
/* 結果の目次：「目次：」のあとに、小さな札を並べる。札は、紙の地・細い線・墨の字（群の色は、下の札の見出しだけ）。
   押せる所の高さは 48px のまま（線で囲んだ、目に見える所だけを小さくする） */
.jump { display: flex; align-items: flex-start; gap: 0 .5em; margin: 0 0 1em; }
.jump-lead { flex: none; display: inline-flex; align-items: center; min-height: 48px; font-size: .85em; font-weight: 700; color: var(--sub); white-space: nowrap; }
.jump ul { flex: 1 1 0; min-width: 0; margin: 0; gap: 0 .4em; }
.wrap .jump a { padding: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: .85em; font-weight: 400; }
.jump a span { padding: .1em .75em; border: 1px solid var(--field-line); border-radius: 999px; background: var(--bg); line-height: 1.6; }

/* 黄色のライン：いちばん読んでほしい言葉に */
.mk { background: linear-gradient(transparent 58%, var(--mark) 58%); }

/* 読む札：白い地に、墨の太い枠 */
.q { border: 3px solid var(--ink); background: var(--card); padding: 1em 14px 1.1em; }
.group { border: 3px solid var(--ink); background: var(--card); padding: .9em 14px 1em; }
.fallback { border: 3px solid var(--ink); background: var(--card); }
.q h2, .q legend { font-family: var(--mincho); font-weight: 600; font-size: 1.24em; line-height: 1.45; margin: 0 0 .5em; }
.q legend h2 { font-family: var(--mincho); font-weight: 600; }
/* 質問の番号は、順番の印（押せないので、ぬりつぶしの墨にしない） */
.qno { border: 2px solid var(--ink); background: var(--yel); color: var(--ink); font-family: var(--num); font-weight: 700; }

/* 家族の人数：入れる所の枠と、丸い＋− */
.step { border: 2px solid var(--field-line); background: var(--card); padding: 5px 5px 5px 12px; }
.step.has { border: 2px solid var(--ink); background: var(--sel); }
.step.inner { border-style: dashed; }
.ctr button {
  width: 48px; height: 48px;
  border: 0; border-radius: 50%; background: var(--act); color: var(--card); font-size: 1.3em; line-height: 1;
}
/* それ以上押せないときも、押す所に残す（うすい地と点線で伝える） */
.ctr button[aria-disabled="true"] { border: 2px dashed var(--field-line); background: var(--none-bg); color: var(--none-ink); }
.ctr output { font-family: var(--num); font-size: 1.5em; }

/* 日数と基準の選ぶ所：選んだ所は、黄色の地と、墨の太い枠 */
.seg label { border: 2px solid var(--field-line); background: var(--card); }
.choices label { border: 2px solid var(--field-line); background: var(--card); }
.choice-input:checked + label { border: 3px solid var(--ink); background: var(--yel); font-weight: 700; }
.choice-input:checked + label .mark { color: var(--ink); }
.choice-input:checked + label .d { color: var(--ink); }
/* 選ぶ所の札（最低限・国の推奨・地域によって・より手厚く）：読むだけなので、枠なし */
.badge { border: 0; background: var(--none-bg); color: var(--none-ink); }
.choice-input:checked + label .badge { background: var(--card); color: var(--ink); }

/* 計算できないときの知らせ */
.problem { border: 3px solid var(--ink); background: var(--card); }
/* ［答えを消す］を押したあとの知らせ（質問の頭。押すと、ページは、ここへ移る）。空の間は、場所を取らない */
.forgot { margin: 0; }
.forgot:not(:empty) { margin: 0 0 1em; padding: .6em .9em; border: 3px solid var(--ink); border-radius: var(--r); background: var(--ok-bg); color: var(--ok-ink); font-weight: 700; }

/* 押して進むボタン：墨のぬりつぶし。左に「すること」と「押すと：」、右はしに黄色の「›」 */
.primary {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: .6em;
  min-height: 3.5rem; padding: .6em 1.2em .6em 1.4em; border: 0; border-radius: 999px;
  background: var(--act); color: var(--card); text-align: left; line-height: 1.4;
  box-shadow: 0 .5rem 0 -.2rem var(--yel);
}
.primary::after { content: "\203A"; flex: none; font-size: 1.6em; line-height: 1; color: var(--yel); }
.primary small { display: block; font-size: .76em; font-weight: 400; }
/* 次の大きなステップへ進むボタン：黄色の地に、墨の字と太い枠。ひとまわり大きく */
.primary.big {
  min-height: 4rem; padding: .8em 1.1em .8em 1.2em; border: 3px solid var(--ink); border-radius: 1.4rem; background: var(--go); color: var(--go-ink);
  box-shadow: .3rem .4rem 0 var(--ink);
  font-size: 1.25em; text-decoration: none;
}
.primary.big::after { color: var(--go-ink); }
.primary.big .pt { word-break: keep-all; }
.primary.big small { font-size: .72em; }
.wrap a.primary { color: var(--card); }
.wrap a.primary.big { color: var(--go-ink); }

/* 押してほしい、ただ1つのボタンの動き。質問に答えている間は、下の墨のボタン。
   結果が出たあと（html に has-sheet が付く）は、結果の下の黄色のボタンだけ。
   動くのは、右はしの「›」（右へ 10px 行って戻る）と、まわりのうすい輪（16px 広がって消える）。
   1.8秒で1回。ボタンと字は動かさない。色も変えない。 */
#questions .primary::before, .next .primary.big::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit;
  color: var(--yel); pointer-events: none; animation: osu-wa 1.8s ease-out infinite;
}
.next .primary.big::before { color: var(--ink); }
#questions .primary::after, .next .primary.big::after { animation: osu-ya 1.8s ease-in-out infinite; }
.has-sheet #questions .primary::before, .has-sheet #questions .primary::after { animation: none; }
/* キーボードで選んだ所は、黒と黄色の輪だけにする */
#questions .primary:focus-visible::before, .next .primary.big:focus-visible::before { animation: none; }
@keyframes osu-wa {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: .6; }
  70% { box-shadow: 0 0 0 16px currentColor; opacity: 0; }
  100% { box-shadow: 0 0 0 16px currentColor; opacity: 0; }
}
@keyframes osu-ya {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}
/* 「動きを減らす」設定の人には、動かさない（ぬりつぶしと大きさで、止まっていても目立つ） */
@media (prefers-reduced-motion: reduce) {
  #questions .primary::before, #questions .primary::after,
  .next .primary.big::before, .next .primary.big::after { animation: none; }
}

/* ほかのボタン：墨のわく。右はしに「›」 */
.secondary {
  justify-content: space-between; gap: .6em; padding: .35em 1.1em .35em 1.3em;
  border: 2px solid var(--act); border-radius: 999px; background: var(--card); color: var(--act);
  text-align: left; line-height: 1.4;
}
.secondary::after { content: "\203A"; flex: none; font-size: 1.4em; line-height: 1; }
.secondary small { display: block; font-size: .85em; font-weight: 400; color: var(--sub); }
.wrap a.secondary { text-decoration: none; }

/* 結果 */
.result { border-top: 3px solid var(--ink); }
.result h2 { font-family: var(--mincho); font-weight: 600; font-size: 1.7em; line-height: 1.35; }
.group > h3 { margin: 0 0 .5em; }
.val b { font-family: var(--num); font-size: 2.5em; letter-spacing: -.01em; }
.amt b { font-family: var(--num); }
.why summary { color: var(--ink); }
.why ul { background: var(--soft); }
.caution { background: var(--soft); }
.tag { background: var(--soft); }
.plus { background: var(--ink); color: var(--yel); }
.notcount { border: 0; background: var(--card); border-radius: var(--card-r); }
.goalmsg { border: 3px solid var(--ink); }
/* 結果の下：白い札に、墨の太い枠 */
.steps { border: 3px solid var(--ink); background: var(--card); border-radius: var(--card-r); padding: 1.1em 14px; }
.steps h3 { font-family: var(--mincho); font-weight: 600; font-size: 1.3em; line-height: 1.5; }

/* 3つのステップ：全部で3つ・終わった所・次の所を、丸と線で見せる。
   3つを横1列に並べ、丸の下に、短い名前と、今の様子の言葉を積む（せまい画面でも1列）。
   終わった所＝墨の丸に ✓。次の所＝黄色の丸に、二重の輪。まだの所＝うすい地に点線。
   色だけで伝えないように、丸の下に「終わり」「次はここ」「まだ」を出す。 */
.steps .s3 { display: flex; list-style: none; margin: 1em 0 1.1em; padding: 0; }
.steps .s3 li {
  position: relative; flex: 1 1 0; min-width: 0; margin: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.35;
}
/* 丸と丸をつなぐ線：終わった所までは墨の実線、その先は点線 */
.s3 li + li::before {
  content: ""; position: absolute; top: 1.8rem; right: 50%; width: 100%; margin-top: -3px;
  border-top: 6px dotted var(--field-line);
}
.s3 li.s3-now::before { border-top: 6px solid var(--ink); }
.s3-dot {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  width: 3.6rem; height: 3.6rem; border-radius: 50%; font-family: var(--num); font-size: 1.6em; font-weight: 700; line-height: 1;
}
.s3-done .s3-dot { background: var(--ink); color: var(--yel); }
.s3-now .s3-dot { border: 3px solid var(--ink); background: var(--go); color: var(--go-ink); }
.s3-yet .s3-dot { border: 2px dashed var(--field-line); background: var(--none-bg); color: var(--none-ink); }
.s3-nm { margin-top: .7em; font-size: 1.06em; font-weight: 700; }
.s3-st { margin-top: .3em; padding: .1em .7em; border-radius: 999px; font-size: .94em; font-weight: 700; }
.s3-done .s3-st { background: var(--ok-bg); color: var(--ok-ink); }
.s3-now .s3-st { background: var(--ink); color: var(--yel); }
.s3-yet .s3-st { background: var(--none-bg); color: var(--none-ink); }
/* 次の所：ひとまわり大きい字と、すぐ下に、黄色のボタンを1つ */
.s3-next { margin: 1.1em 0 0; }
.s3-next h4 { margin: 0 0 .5em; font-family: var(--mincho); font-weight: 600; font-size: 1.3em; line-height: 1.6; word-break: keep-all; }
.s3-next .primary { margin: .5em 0 .9em; }
/* 3つの段の名前と説明：読むだけの物。うすい線で分け、小さな見出しと、丸のない番号で出す */
.steps .s3-cap { margin: 1.3em 0 0; padding: .8em 0 0; border-top: 2px solid var(--line); font-size: .94em; font-weight: 700; color: var(--sub); }
.steps .s3-list { list-style: none; margin: .2em 0 0; padding: 0; counter-reset: s3; }
.s3-list li { position: relative; margin: .6em 0; padding-left: 1.6em; font-size: .94em; counter-increment: s3; }
.s3-list li::before { content: counter(s3) "."; position: absolute; left: .1em; top: 0; font-weight: 700; color: var(--sub); }
.steps .s3-list li.done b::after { content: none; }
/* 3つ目の段の右に、小さな絵（飾り） */
.s3-pic { float: right; width: auto; height: 4.5rem; margin: 0 0 .2em .6em; }
.steps .s3-list::after { content: ""; display: block; clear: both; }
/* 3つのステップの名前の下の、短い説明（名前は、アプリのはじめの画面と同じ） */
.steps .d { display: block; font-size: .94em; color: var(--sub); }
.appbox p { margin: 0; }
.appbox { border: 0; background: var(--card); border-radius: var(--card-r); padding: .3em .9em; }
/* 結果のいちばん上の、3つの入口。大きい1つ：結果の下と同じ、黄色の大きなボタン（.primary.big）。こちらは、動かない。
   その下に、わくだけの2つ（商品を見る・紙で数える）を、横に並べる */
.to-kaimono-top { margin: .7em 0 .7em; }
.to-kaimono-top .primary { width: 100%; margin: 0; }
.to-kaimono-sub { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; margin: 0 0 1.2em; }
.to-kaimono-sub .secondary { width: 100%; min-height: 3.5rem; margin: 0; padding: .35em .7em .35em .9em; font: inherit; font-weight: 700; cursor: pointer; }
.to-kaimono-sub .secondary small { font-size: .875em; }
/* 品目ごとの「これを買う」：わくだけの、小さなボタン（字の幅。押せる所の高さは 48px） */
.kau { margin: .1em 0 .2em; }
.kau .secondary { display: inline-flex; width: auto; min-height: 48px; margin: 0; padding: .1em 1em .1em 1.2em; font-size: .94em; }
/* アプリの案内は、文字のリンク（下線。押せる所の高さは 48px） */
.appbox a { display: inline-flex; align-items: center; min-height: 48px; margin-left: .3em; font-weight: 700; text-decoration: underline; }
.appbox a::after { content: "\00a0\203A"; }

/* 結果の下（アプリの公開のあと。w1_view.js の APP_KOUKAI）：ステップの区切りと、記号 */
.fin {
  display: flex; align-items: flex-start; gap: .5em; margin: 0; padding: .7em .9em;
  border-radius: var(--card-r); background: var(--ok-bg); color: var(--ok-ink); font-weight: 700;
}
.fin::before { content: "\2713"; flex: none; }
.fin p { margin: 0; }
.info { margin: .6em 0; padding: .8em .9em; border-radius: var(--card-r); background: var(--card); }
.info h3 { font-size: 1.18em; line-height: 1.5; margin: 0 0 .2em; }
.info p { margin: 0; color: var(--sub); font-size: .94em; }
.kigou { margin: .8em 0; padding: .8em .9em; border-radius: var(--card-r); background: var(--card); }
.kigou h3 { font-size: 1em; margin: 0; }
.kigou-code { margin: .1em 0; font-size: 2.1em; font-weight: 700; line-height: 1.4; letter-spacing: .08em; overflow-wrap: anywhere; }
.kigou-how { margin: 0; color: var(--sub); font-size: .94em; }
.next .primary { width: 100%; margin: .8em 0 1.1em; }
.next .secondary { margin: .8em 0 .2em; }

/* JavaScript が動かないときの表 */
.fallback-table thead th { background: var(--none-bg); }

/* 下の欄：トップページと同じ、墨の地 */
.foot { padding: 1.6em 12px 3em; border-top: 0; background: #0B0B0B; color: #BDB5A8; }
.foot li + li { border-top: 1px solid #34302C; }
.foot a { color: #EDE6DA; }

@media print {
  /* 紙は白黒。質問だけを刷るときも、地の色を出さない */
  body { background: #FFFFFF; }
  #questions .primary::before, #questions .primary::after,
  .next .primary.big::before, .next .primary.big::after { animation: none; }
}
