/* ゆで卵ガイド
 * スマホ縦画面（375px 前後）を基準に、1カラムで組む。
 * 無彩色＋卵の殻を思わせる淡いクリーム1色、広い余白、控えめな角丸（リカバリータッチと同じ考え方）。 */

:root {
  --bg: #f3efe7;          /* ページの地。卵の殻の色に寄せた淡いクリーム */
  --surface: #ffffff;
  --soft: #ece4d3;        /* チップ・ラベルの地 */
  --ink: #2a2521;
  --muted: #7a7168;
  --line: #e2dac8;
  --navy: #a9762c;        /* 主アクセント。ゆで卵の黄身を思わせる落ち着いた茶金 */
  --slate: #8c7350;
  --accent: var(--navy);
  --warn-soft: #fbf3e6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(42, 37, 33, .05), 0 6px 18px rgba(42, 37, 33, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* JSがhidden属性を付け外しして表示を切り替える要素が多いので、
 * .btn等の display 指定に負けないよう明示的に勝たせる（付けないとボタンが消えない事故になる） */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
               system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: .02em;
}

img { max-width: 100%; height: auto; }
a { color: var(--navy); }

/* --- ヘッダー --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-top, 0px));
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__home { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.site-header__brand { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
/* sology のロゴ（リカバリータッチと同じ画像・同じ大きさ） */
.brand-logo { display: block; height: 16px; width: auto; }
.brand-logo--large { height: 26px; margin: 0 auto; }
.site-header__title { font-size: 11px; font-weight: 500; letter-spacing: .06em; color: var(--muted); line-height: 1.4; }
.site-header__guide {
  flex: none;
  font-size: 12.5px; font-weight: 600; text-decoration: none;
  color: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 999px;
  padding: 5px 13px;
}

/* --- 画面 ------------------------------------------------------------- */
main { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }
.screen[hidden] { display: none; }

.crumb { margin: 0 0 14px; font-size: 13px; }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a::before { content: "← "; }

.home__title, .screen__title { margin: 0 0 8px; font-size: 20px; letter-spacing: .03em; }
.home__lead, .screen__lead { margin: 0 0 18px; color: var(--muted); }
.home__tagline { margin-top: 22px; font-size: 13px; color: var(--muted); }
.screen__back { margin: 26px 0 0; text-align: center; }

/* --- ①仕上がりカード --------------------------------------------------- */
.finish-grid { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.finish-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 18px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink);
  font-size: 17px; font-weight: 600;
}
.finish-card:active { background: var(--soft); }
.tick-list { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.tick-list li { padding-left: 18px; position: relative; margin-bottom: 8px; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--navy);
}

/* --- 検証前の仮の値 ----------------------------------------------------- */
.provisional-badge {
  display: inline-block;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--slate);
  background: var(--warn-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 6px;
}

/* --- 選択チップ（個数・サイズ・室温・冷蔵・仕上がり記録） --------------- */
.field-group { margin: 0 0 20px; }
.field-group__label { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 14px; font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.chip.is-selected { background: var(--navy); color: #fff; border-color: var(--navy); }

/* --- ボタン ------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-size: 15px; font-weight: 700;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--navy); color: #fff; border: 1px solid var(--navy);
  text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn--block { display: block; width: 100%; margin-top: 6px; }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--pill { padding: 8px 14px; font-size: 13px; }
.btn--small { padding: 7px 14px; font-size: 12.5px; margin-top: 10px; }
button.btn { font-family: inherit; }
button.btn:disabled { opacity: .4; cursor: not-allowed; }

/* --- ③今回の目安 -------------------------------------------------------- */
.estimate-list { margin: 0 0 6px; }
.estimate-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.estimate-list dt { color: var(--muted); font-size: 13px; }
.estimate-list dd { margin: 0; font-weight: 700; text-align: right; }
.field__note { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

.adjust-row { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.adjust-row__hint { font-size: 12.5px; color: var(--muted); flex: 1; }
.adjust-row__value { font-weight: 700; min-width: 64px; text-align: center; }

.panel { margin: 20px 0; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel--safety { background: var(--warn-soft); }
.panel__title { margin: 0 0 8px; font-size: 15px; }

/* --- ④⑤⑥ 加熱・タイマー ------------------------------------------------ */
.timer-clock {
  font-size: 56px; font-weight: 700; text-align: center;
  font-variant-numeric: tabular-nums;
  margin: 24px 0 8px;
  color: var(--navy);
}
.timer-clock.is-done {
  /* 完了後に押す「氷水に移す」「記録する」ボタンを押すまで、画面遷移で消えるまで点滅し続ける
   * （音・振動が端末の設定で出ないことがあるので、目でも気づけるようにする） */
  animation: timer-done 1s ease-in-out infinite;
}
@keyframes timer-done { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .timer-clock.is-done { animation: none; } }
.wake-note { text-align: center; font-size: 12.5px; color: var(--muted); min-height: 1.6em; }
.timer-status { text-align: center; font-weight: 700; color: var(--navy); margin: 0 0 12px; }
.field__note--warn { color: var(--ink); font-weight: 600; }

/* --- ⑧マイレシピ -------------------------------------------------------- */
.myrecipe-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.myrecipe-card { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.myrecipe-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.myrecipe-card__finish { font-weight: 700; font-size: 16px; }
.myrecipe-card p { margin: 2px 0; font-size: 13.5px; color: var(--muted); }
.myrecipe-card__next { color: var(--navy) !important; font-weight: 600; }
.myrecipe-empty { color: var(--muted); text-align: center; margin: 30px 0; }

.save-done { margin-top: 14px; text-align: center; font-size: 13.5px; }
.save-done a { margin-left: 8px; }

/* --- フッター・初回オーバーレイ ----------------------------------------- */
.site-footer { max-width: 640px; margin: 0 auto; padding: 30px 16px 40px; text-align: center; }
.site-footer__mark { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.disclaimer { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin: 6px 0; }
.site-footer__small { font-size: 11.5px; color: var(--muted); margin: 4px 0; }

.ack {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(42, 37, 33, .55);
}
.ack[hidden] { display: none; }
.ack__box {
  max-width: 420px; width: 100%; max-height: 86vh; overflow-y: auto;
  background: var(--surface); border-radius: 14px; padding: 22px 20px;
}
.ack__title { margin: 0 0 12px; font-size: 17px; line-height: 1.5; letter-spacing: .04em; }
.ack__safety { margin: 0 0 6px; font-weight: 700; font-size: 13.5px; }
.ack__safety-text { margin: 0 0 14px; font-size: 13px; line-height: 1.7; }
.ack__actions { margin-top: 16px; text-align: center; }
.ack__actions .btn { width: 100%; }
