:root {
  --bg: #fff7ef;
  --bg2: #ffffff;
  --card: #ffffff;
  --card2: #fff1e2;
  --bd: rgba(190, 90, 30, 0.14);
  --bd2: rgba(190, 90, 30, 0.32);
  --txt: #3a2317;
  --txt2: #6b5548;
  --txt3: #98816f;
  --neon: #ff4d2e;
  --neon2: #f07f12;
  --pink: #f43f8e;
  --cyan: #0d8fb8;
  --green: #12a05e;
  --violet: #9b4fd6;
  --grad: linear-gradient(135deg, #ff4d2e, #ff9330);
  --grad-soft: linear-gradient(135deg, rgba(255, 77, 46, 0.09), rgba(255, 147, 48, 0.09));
  --rad: 18px;
  --shadow-sm: 0 1px 3px rgba(120, 50, 10, 0.05), 0 2px 8px rgba(120, 50, 10, 0.04);
  --shadow-md: 0 4px 14px rgba(200, 80, 20, 0.1), 0 2px 5px rgba(120, 50, 10, 0.05);
  --shadow-brand: 0 4px 16px rgba(255, 77, 46, 0.28);
  --sans:
    "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN W4", "BIZ UDGothic",
    -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo,
    sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* 方眼はやめて、ふんわりした光だけ残す(線が多いと画面がうるさくなるため) */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 77, 46, 0.1), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(255, 147, 48, 0.1), transparent),
    radial-gradient(ellipse 50% 35% at 8% 30%, rgba(244, 63, 142, 0.05), transparent);
  padding-bottom: 310px;
}
button,
a,
.card,
.sp {
  touch-action: manipulation; /* ダブルタップ拡大と300ms遅延を防ぐ */
  -webkit-tap-highlight-color: transparent;
}
:where(button, a, .card, .sp):focus-visible {
  outline: 2.5px solid var(--neon);
  outline-offset: 2px;
  border-radius: 6px;
}
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px;
  position: relative;
  z-index: 1;
}

/* ふわふわ舞う背景デコ */
.bg-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-deco span {
  position: absolute;
  bottom: -30px;
  font-size: 17px;
  opacity: 0;
  animation: floatup linear infinite;
}
@keyframes floatup {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.2;
  }
  90% {
    opacity: 0.12;
  }
  100% {
    transform: translateY(-105vh) rotate(40deg);
    opacity: 0;
  }
}

/* ぷにぷに挙動 */
@keyframes boing {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.05, 0.93);
  }
  70% {
    transform: scale(0.97, 1.04);
  }
  100% {
    transform: scale(1);
  }
}
.card.boing {
  animation: boing 0.45s;
}
.card:active {
  transform: scale(0.96);
}
.mode:active,
.sug-chip:active,
.sp:active,
.q-btn:active {
  transform: scale(0.9);
}
@keyframes badgein {
  0% {
    transform: scale(0.3) rotate(-12deg);
  }
  60% {
    transform: scale(1.25) rotate(4deg);
  }
  100% {
    transform: scale(1);
  }
}
/* ×N のポップは「いま触った具材」だけ。再描画で全部のバッジが跳ねないよう .pop で限定する */
.qbadge.pop {
  animation: badgein 0.4s cubic-bezier(0.3, 1.6, 0.4, 1);
}
@keyframes pricepop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}
.d-price.pop {
  animation: pricepop 0.35s;
}

/* 叫び文字ポップ */
.word-pop {
  position: fixed;
  z-index: 120;
  font-weight: 900;
  pointer-events: none;
  font-size: 21px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow:
    0 2px 0 #fff,
    0 0 14px rgba(255, 255, 255, 0.85);
  animation: wordpop 1.1s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
.word-pop.big {
  font-size: 31px;
  animation-duration: 1.4s;
}
@keyframes wordpop {
  0% {
    transform: translate(-50%, 12px) scale(0.3) rotate(-6deg);
    opacity: 0;
  }
  25% {
    transform: translate(-50%, -6px) scale(1.18) rotate(2deg);
    opacity: 1;
  }
  60% {
    transform: translate(-50%, -14px) scale(1);
  }
  100% {
    transform: translate(-50%, -42px) scale(0.95);
    opacity: 0;
  }
}

/* 完成ボタン */
.done-btn {
  position: relative;
  overflow: hidden;
  margin-left: auto;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 11px 24px;
  font-weight: 900;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap; /* どの幅でも絶対に2行にしない */
  flex-shrink: 0;
  box-shadow: var(--shadow-brand);
  animation: donepulse 2.4s infinite;
  transition: box-shadow 0.25s;
}
.done-btn::after {
  /* きらっと走るシャイン */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 55%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: doneshine 2.4s infinite;
}
@keyframes doneshine {
  0%,
  55% {
    left: -80%;
  }
  90%,
  100% {
    left: 130%;
  }
}
@keyframes donepulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-brand);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 22px rgba(244, 81, 44, 0.45);
  }
}
@media (hover: hover) {
  .done-btn:hover {
    animation: none;
    transform: scale(1.07);
    box-shadow: 0 8px 26px rgba(244, 81, 44, 0.5);
  }
}
.done-btn:active {
  animation: none;
  transform: scale(0.92);
}

/* 完成診断への誘導吹き出し(具材2品以上で.showが付く) */
.done-hint {
  position: absolute;
  right: 14px;
  bottom: calc(100% + 12px);
  z-index: 60;
  max-width: 250px;
  padding: 10px 15px;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.5;
  color: #fff;
  background: var(--grad);
  border-radius: 16px;
  box-shadow: var(--shadow-brand);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  pointer-events: none;
  transition: 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
/* ===== ステップナビ(ダッシュボード内) ===== */
.step-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.step-nav::-webkit-scrollbar {
  display: none;
}
.sn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 32px; /* 親指で押せる高さ */
  padding: 0 9px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--txt3);
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid var(--bd);
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
}
.sn .sn-mark {
  font-size: 11px;
  min-width: 0;
}
.sn .sn-mark:empty {
  display: none;
}
.sn.done {
  color: #2da37a;
  background: rgba(45, 163, 122, 0.1);
  border-color: rgba(45, 163, 122, 0.35);
}
.sn.next {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(255, 77, 46, 0.35);
  animation: snpulse 1.6s infinite;
}
@keyframes snpulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
.sn-arrow {
  flex: none;
  color: var(--txt3);
  font-weight: 800;
  opacity: 0.5;
  padding: 0 1px;
}
.sn-left {
  flex: none;
  margin-left: auto;
  padding-left: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--neon2);
  white-space: nowrap;
}
@media (max-width: 400px) {
  .sn-left {
    display: none; /* 幅が足りない端末では「👉」チップだけで次を示す */
  }
}
/* 放置/復帰ナッジ: 完成診断の吹き出しと同じ見た目で左側に出す */
.nudge {
  position: absolute;
  left: 14px;
  bottom: calc(100% + 12px);
  z-index: 60;
  max-width: 270px;
  padding: 10px 15px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.5;
  text-align: left;
  color: #7a2445;
  background: #fff;
  border: 2px solid rgba(244, 63, 142, 0.45);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(230, 120, 120, 0.25);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.nudge::after {
  content: "";
  position: absolute;
  left: 36px;
  top: 100%;
  border: 8px solid transparent;
  border-top-color: #fff;
}
.nudge.show {
  opacity: 1;
  transform: none;
  animation: hintbob 2.2s 0.5s infinite;
}
.nudge[hidden] {
  display: none;
}
.done-hint::after {
  content: "";
  position: absolute;
  right: 36px;
  top: 100%;
  border: 8px solid transparent;
  border-top-color: #ff8730;
}
.done-hint.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  animation: hintbob 2.2s 0.5s infinite;
}
@keyframes hintbob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* 紙吹雪 */
.confetti {
  position: fixed;
  top: -24px;
  z-index: 200;
  pointer-events: none;
  animation: confall linear forwards;
}
@keyframes confall {
  0% {
    transform: translateY(0) rotate(0);
  }
  100% {
    transform: translateY(110vh) rotate(720deg);
  }
}

/* 完成モーダル */
.done-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  align-items: flex-start; /* 縦センターだと背の高い時に上端が切れて到達不能になるため */
  justify-content: center;
  overflow-y: auto; /* モーダルが画面より高い時はオーバーレイごとスクロールさせる */
  overscroll-behavior: contain;
  background: rgba(70, 35, 15, 0.45);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  padding: 20px;
}
.done-overlay.show {
  display: flex;
}
.done-card {
  background: #fffdf9;
  border-radius: 26px;
  max-width: 380px;
  width: 100%;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(80, 30, 5, 0.3);
  border: 1px solid rgba(255, 147, 48, 0.25);
  animation: cardpop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1);
  margin: auto; /* 収まる時は上下中央、収まらない時は上端から流してオーバーレイ側でスクロール */
}
@keyframes cardpop {
  0% {
    transform: scale(0.5) rotate(-3deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}
.done-title {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.done-type {
  font-weight: 900;
  font-size: 17px;
  margin: 10px 0 4px;
  color: var(--txt);
}
.done-stats {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--txt2);
  margin-bottom: 12px;
}
.done-review {
  text-align: left;
  background: var(--card2);
  border-radius: 16px;
  padding: 13px 15px;
  font-size: 12.5px;
  color: var(--txt2);
  line-height: 1.75;
}
.done-review p {
  margin: 4px 0;
}
.done-free {
  margin: 14px 0 4px;
  font-size: 13px;
  color: var(--txt);
  background: rgba(255, 147, 48, 0.12);
  border: 1.5px dashed rgba(240, 127, 18, 0.5);
  border-radius: 14px;
  padding: 11px;
}
.done-free b {
  color: var(--neon);
}
.done-follow {
  font-size: 11.5px;
  color: var(--txt2);
  margin: 10px 0 14px;
}
.done-card .tiktok {
  margin: 14px auto 0;
}
.done-close {
  background: none;
  border: 1.5px solid var(--bd2);
  color: var(--txt2);
  border-radius: 99px;
  padding: 10px 26px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s;
}
@media (hover: hover) {
  .done-close:hover {
    border-color: var(--neon);
    color: var(--neon);
  }
}

/* 画面シェイク(激辛) */
@keyframes shake {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-4px, 2px) rotate(-0.5deg);
  }
  40% {
    transform: translate(4px, -2px) rotate(0.5deg);
  }
  60% {
    transform: translate(-3px, 1px);
  }
  80% {
    transform: translate(3px, -1px);
  }
}
body.shake {
  animation: shake 0.45s;
}

/* ===== header ===== */
header {
  text-align: center;
  padding: 28px 0 10px;
}
.sys {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--txt3);
  text-transform: uppercase;
}
h1 {
  margin: 6px 0 4px;
  font-size: 35px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 12px rgba(255, 77, 46, 0.2));
}
.tag {
  color: var(--txt2);
  font-size: 13.5px;
}
.tag b {
  white-space: nowrap; /* 「カロ/リー」のように語の途中で折り返さない */
}
.tag b {
  color: var(--neon2);
}
/* STEP01: 1タップ=軽くひとつかみ の単位案内(ユーザーテストで読み飛ばされたため、ブロックで大きく出す) */
.unit-note {
  margin: 2px 0 14px;
  padding: 12px 14px 11px;
  background: linear-gradient(135deg, rgba(255, 236, 228, 0.95), rgba(255, 224, 236, 0.95));
  border: 2px solid rgba(244, 63, 142, 0.45);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(244, 63, 142, 0.14);
  animation: unitpop 0.7s 0.9s 2 ease-in-out;
}
.un-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.un-big {
  font-size: 16.5px;
  font-weight: 900;
  color: #c9245f;
  letter-spacing: 0.01em;
}
.un-eq {
  font-size: 18px;
  font-weight: 900;
  color: var(--neon);
}
.un-sub {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #8a3a55;
}
@keyframes unitpop {
  50% {
    transform: scale(1.025);
  }
}
/* ===== ファーストタッチCTA ===== */
.start-cta {
  display: block;
  margin: 16px auto 0;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--grad);
  border: none;
  border-radius: 99px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  animation: ctaPulse 2.2s ease-in-out infinite;
}
.start-cta small {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.92;
}
.start-cta:active {
  transform: scale(0.96);
}
.start-cta[hidden] {
  display: none;
}
/* transformを使わずshadowだけ脈動させる(要素の位置が動かないのでタップ判定も安定) */
@keyframes ctaPulse {
  0%,
  100% {
    box-shadow: var(--shadow-md);
  }
  50% {
    box-shadow: 0 6px 22px rgba(255, 77, 46, 0.42);
  }
}

/* ===== mode ===== */
.modes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 4px;
  flex-wrap: wrap;
}
.mode {
  border: 1.5px solid var(--bd);
  background: var(--card);
  color: var(--txt2);
  border-radius: 99px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}
@media (hover: hover) {
  .mode:hover {
    border-color: var(--bd2);
    transform: translateY(-1px);
  }
}
.mode.on {
  color: #fff;
  border-color: transparent;
  background: var(--grad);
  box-shadow: var(--shadow-brand);
}
.mode.on.diet {
  background: linear-gradient(135deg, #15b06a, #0d9aa8);
  color: #fff;
  box-shadow: 0 4px 16px rgba(21, 156, 93, 0.3);
}
.mode.on.beauty {
  background: linear-gradient(135deg, #8b2fd6, #f43f8e);
  box-shadow: 0 4px 16px rgba(139, 47, 214, 0.3);
}
/* ===== section ===== */
section {
  margin: 30px 0;
}
.sec-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.step {
  font-family: var(--mono);
  font-size: 10.5px;
  color: #fff;
  letter-spacing: 0.16em;
  background: var(--grad);
  border-radius: 99px;
  padding: 3px 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 77, 46, 0.22);
  flex: none;
}
h2 {
  margin: 0;
  font-size: 19.5px;
  font-weight: 900;
}
.sec-sub {
  font-size: 12.5px;
  color: var(--txt3);
  margin: 0 0 13px;
}

/* ===== cards grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 11px;
}
.grid.wide {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.card {
  position: relative;
  border: 1.5px solid var(--bd);
  background: var(--card);
  border-radius: var(--rad);
  padding: 13px 13px 11px;
  cursor: pointer;
  transition: 0.18s;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: var(--shadow-sm);
}
@media (hover: hover) {
  .card:hover {
    border-color: var(--bd2);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}
.card.sel {
  border-color: var(--neon);
  background: linear-gradient(160deg, rgba(255, 77, 46, 0.055), rgba(255, 147, 48, 0.075));
  box-shadow:
    0 0 0 1.5px rgba(255, 77, 46, 0.32),
    0 5px 16px rgba(255, 77, 46, 0.15);
}
.card .emoji {
  font-size: 24px;
  line-height: 1;
  height: 44px;
  display: flex;
  align-items: center;
}
.food-ic {
  width: 42px;
  height: 42px;
  display: block;
}
.card .nm {
  font-weight: 700;
  font-size: 14px;
  margin-top: 4px;
}
.card .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--txt2);
  margin-top: 2px;
}
.card .meta .kc {
  color: var(--neon2);
}
.card .meta .pr {
  color: var(--txt2);
  font-weight: 700;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.tg {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--bd);
  color: var(--txt2);
  background: rgba(255, 255, 255, 0.6);
}
.tg.eff {
  border-color: rgba(190, 90, 30, 0.12);
  color: var(--txt2);
  background: rgba(255, 147, 48, 0.08);
}
.reco {
  position: absolute;
  top: -7px;
  left: -4px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  display: none;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.card.reco-diet .reco {
  display: block;
  background: #eaf9f1;
  border-color: rgba(18, 160, 94, 0.3);
  color: var(--green);
}
.card.reco-beauty .reco {
  display: block;
  background: #fff1e4;
  border-color: rgba(255, 147, 48, 0.45);
  color: #d1521c;
}
.chk {
  position: absolute;
  top: 9px;
  right: 11px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1.5px solid var(--bd2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: 0.18s;
  background: #fff;
}
.card.sel .chk {
  background: var(--neon);
  border-color: var(--neon);
  color: #fff;
}

/* detail(説明は常時表示) */
.detail {
  display: block;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(190, 90, 30, 0.08);
  font-size: 11.5px;
  color: var(--txt2);
}
.detail .pfc {
  font-family: var(--mono);
  color: var(--txt3);
  font-size: 11px;
  margin-top: 3px;
}

/* ===== spice slider ===== */
.spice-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sp {
  flex: 1;
  min-width: 86px;
  text-align: center;
  border: 1.5px solid var(--bd);
  background: var(--card);
  border-radius: var(--rad);
  padding: 11px 6px;
  cursor: pointer;
  transition: 0.18s;
  box-shadow: var(--shadow-sm);
}
@media (hover: hover) {
  .sp:hover {
    border-color: var(--bd2);
    transform: translateY(-2px);
  }
}
.sp.sel {
  border-color: var(--neon);
  background: linear-gradient(160deg, rgba(255, 77, 46, 0.06), rgba(255, 147, 48, 0.08));
  box-shadow: 0 0 0 1.5px rgba(255, 77, 46, 0.32);
}
.sp .lv {
  font-weight: 900;
  font-size: 14px;
}
.sp .fire {
  font-size: 13px;
  letter-spacing: -2px;
}
.sp .nt {
  font-size: 10px;
  color: var(--txt3);
  margin-top: 2px;
}
.spice-info {
  margin-top: 10px;
  font-size: 12px;
  color: var(--txt2);
  border: 1.5px dashed var(--bd);
  border-radius: 12px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.5);
}

/* ===== suggestion panel ===== */
.suggest {
  border: 1.5px solid rgba(240, 127, 18, 0.38);
  background: linear-gradient(160deg, rgba(255, 147, 48, 0.08), rgba(244, 63, 142, 0.05));
  border-radius: var(--rad);
  padding: 15px 17px;
  margin: 22px 0;
  display: none;
  box-shadow: var(--shadow-sm);
}
.suggest.show {
  display: block;
}
.suggest h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--neon2);
}
.suggest p {
  margin: 0 0 9px;
  font-size: 12.5px;
  color: var(--txt2);
}
.sug-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sug-chip {
  border: 1.5px solid var(--bd2);
  background: #fff;
  color: var(--txt);
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s;
  box-shadow: var(--shadow-sm);
}
@media (hover: hover) {
  .sug-chip:hover {
    border-color: var(--neon2);
    color: var(--neon2);
    transform: translateY(-1px);
  }
}

/* ===== footer dashboard ===== */
.dash {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(255, 250, 243, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1.5px solid var(--bd);
  box-shadow: 0 -10px 34px rgba(120, 50, 10, 0.12);
}
.dash-in {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px calc(10px + env(safe-area-inset-bottom, 0px));
}
.dash-top {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}
.d-price {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--neon);
}
.d-price small {
  font-size: 12px;
  color: var(--txt3);
  font-weight: 400;
}
.d-kcal {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--neon2);
}
.d-kcal small,
.d-p small {
  font-size: 10px;
  color: var(--txt3);
}
.d-p {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--cyan);
}
.d-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 11px;
  color: var(--txt3);
  font-family: var(--mono);
  border: 1px solid var(--bd);
  border-radius: 99px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.6);
}
.pfc-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 7px;
  background: rgba(120, 50, 10, 0.08);
}
.pfc-bar div {
  transition: 0.3s;
}
.pb-p {
  background: var(--cyan);
}
.pb-f {
  background: var(--neon2);
}
.pb-c {
  background: var(--violet);
}
.dash-detail {
  display: none;
  max-height: 42vh;
  overflow: auto;
  border-top: 1.5px dashed var(--bd);
  margin-top: 9px;
  padding-top: 8px;
}
.dash.open .dash-detail {
  display: block;
}
.itm {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 3px 0;
  color: var(--txt2);
}
.itm b {
  color: var(--txt);
}
.itm .mono {
  font-family: var(--mono);
}
.itm.total {
  border-top: 1.5px solid var(--bd2);
  margin-top: 6px;
  padding-top: 7px;
  font-size: 13px;
}
.pfc-legend {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--txt3);
  margin-top: 4px;
  display: flex;
  gap: 12px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 3px;
}

/* reset */
.reset {
  display: block;
  margin: 30px auto 0;
  background: none;
  border: 1.5px solid var(--bd);
  color: var(--txt3);
  border-radius: 99px;
  padding: 10px 24px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s;
}
@media (hover: hover) {
  .reset:hover {
    border-color: var(--neon);
    color: var(--neon);
  }
}
.sns-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.sns-row .tiktok {
  margin: 0;
}
.done-card .sns-row {
  margin-top: 14px;
}
.tiktok {
  display: flex;
  width: fit-content;
  margin: 24px auto 0;
  align-items: center;
  gap: 8px;
  background: #161616;
  color: #fff;
  border-radius: 99px;
  padding: 12px 26px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
  transition: 0.18s;
}
@media (hover: hover) {
  .tiktok:hover {
    transform: scale(1.05);
  }
}
.tiktok svg {
  flex: none;
}
footer {
  margin-top: 26px;
  text-align: center;
  font-size: 10.5px;
  color: var(--txt3);
  font-family: var(--mono);
}

/* ===== qty stepper ===== */
.qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}
.q-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1.5px solid var(--bd2);
  background: var(--card2);
  color: var(--txt);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  font-family: inherit;
  transition: 0.15s;
}
@media (hover: hover) {
  .q-btn:hover {
    border-color: var(--neon);
    color: var(--neon);
  }
}
.qty .qn {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 14px;
  color: var(--neon2);
  min-width: 32px;
  text-align: center;
}
.qbadge {
  position: absolute;
  top: 8px;
  right: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--grad);
  border-radius: 99px;
  padding: 3px 10px;
  box-shadow: 0 2px 10px rgba(255, 77, 46, 0.45);
}

/* ===== my bowl (Canvas物理レンダリング・画面下部固定) ===== */
.bowl-stage {
  text-align: center;
  padding: 2px 0 0;
}
.bowl-wrap {
  position: relative;
  width: min(340px, calc(100vw - 24px));
  margin: 0 auto;
  aspect-ratio: 340/150;
}
.bowl-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.bowl-wrap.bump {
  animation: bowlBump 0.4s;
}
@keyframes bowlBump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.03) rotate(-0.6deg);
  }
  100% {
    transform: scale(1);
  }
}
.flyer {
  position: fixed;
  z-index: 100;
  font-size: 26px;
  pointer-events: none;
  transition:
    transform 0.55s cubic-bezier(0.3, -0.15, 0.25, 1),
    opacity 0.55s ease-in;
}
.heart-pop {
  position: fixed;
  z-index: 99;
  color: #f06292;
  font-size: 18px;
  pointer-events: none;
  animation: heartpop 0.7s ease-out forwards;
}
@keyframes heartpop {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    transform: translateY(-36px) scale(1.2);
    opacity: 0;
  }
}

/* シェアボタン */
.share-box {
  margin: 12px 0;
  padding: 12px 10px 8px;
  background: rgba(244, 63, 142, 0.06);
  border: 1.5px dashed rgba(244, 63, 142, 0.35);
  border-radius: 16px;
}
.share-label {
  font-size: 12.5px;
  color: #a1355e;
  font-weight: 800;
  margin: 0 0 9px;
}
.share-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.sb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 99px;
  padding: 11px 19px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
  transition: 0.15s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}
.sb:active {
  transform: scale(0.92);
}
.sb.x {
  background: #000;
}
.sb.ig {
  background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
}
.sb.pic {
  background: linear-gradient(45deg, #ff8a5c, #f4512c);
}
.sb.pic:disabled {
  opacity: 0.6;
  cursor: wait;
}
.sb svg {
  flex: none;
}
.share-msg {
  font-size: 11px;
  color: var(--green);
  min-height: 15px;
  margin-top: 6px;
}

/* ===== 折り返し(言葉切れ)対策 ===== */
h1,
h2,
.done-title,
.done-type,
.tag,
.sug-chip {
  text-wrap: balance;
}
.done-type {
  line-height: 1.5;
}

/* ===== motion配慮 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ===== mobile ===== */
@media (max-width: 480px) {
  .wrap {
    padding: 14px 12px;
  }
  .grid,
  .grid.wide {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }
  h1 {
    font-size: 26px;
  }
  h2 {
    font-size: 17.5px;
  }
  section {
    margin: 24px 0;
  }
  .card {
    padding: 11px 11px 10px;
  }
  .d-price {
    font-size: 22px;
  }
  .d-kcal,
  .d-p {
    font-size: 13px;
  }
  /* スマホは2段構成: 1段目=数値、2段目=大きな完成ボタン+内訳 */
  .dash-top {
    flex-wrap: wrap;
    gap: 8px 10px;
  }
  .done-btn {
    order: 9;
    flex: 1 1 62%;
    margin-left: 0;
    padding: 13px 18px;
    font-size: 16px;
    text-align: center;
  }
  .d-toggle {
    order: 10;
    margin-left: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }
  .d-p {
    margin-left: auto;
  }
  .mode {
    padding: 9px 16px;
    font-size: 13px;
  }
  body {
    padding-bottom: 330px;
  }
  /* タップしやすさ・読みやすさ(スマホ) */
  .food-ic {
    width: 46px;
    height: 46px;
  }
  .card .emoji {
    height: 48px;
  }
  .card .nm {
    font-size: 14.5px;
  }
  .card .meta {
    font-size: 11.5px;
  }
  .detail {
    font-size: 12px;
    line-height: 1.6;
  }
  .q-btn {
    width: 42px;
    height: 42px;
    font-size: 19px;
    border-radius: 12px;
  }
  .sug-chip {
    padding: 9px 14px;
    font-size: 12.5px;
  }
  .done-card {
    padding: 24px 16px 18px;
  }
  .sb {
    padding: 12px 18px;
    font-size: 13.5px;
  }
  footer {
    font-size: 11px;
    line-height: 1.8;
  }
}
@media (max-width: 360px) {
  .grid,
  .grid.wide {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .d-kcal small,
  .d-p small {
    display: none;
  }
}

/* ===== 友だちのボウル再現バナー(シェアURL経由) ===== */
.friend-banner {
  pointer-events: none;
  visibility: hidden; /* 非表示中はタブ移動・スクリーンリーダーからも隠す */
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 90;
  width: min(480px, calc(100vw - 24px));
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  background: var(--grad);
  border-radius: 18px;
  box-shadow: var(--shadow-brand);
  opacity: 0;
  transform: translate(-50%, -24px);
  transition: 0.45s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.friend-banner.show {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}
.fb-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.fb-btn {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #e8452a;
  background: #fff;
  border: none;
  border-radius: 99px;
  cursor: pointer;
}
.fb-btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

/* ===== ボウルタイプ図鑑 ===== */
.zukan-open {
  display: block;
  margin: 14px auto 0;
  padding: 10px 22px;
  font-size: 13.5px;
  font-weight: 800;
  color: #a1355e;
  background: rgba(244, 63, 142, 0.08);
  border: 1.5px dashed rgba(244, 63, 142, 0.4);
  border-radius: 99px;
  cursor: pointer;
}
.zukan-open.in-modal {
  margin-top: 12px;
}
.zukan-card {
  max-width: 520px;
}
.zukan-count {
  margin: 4px 0 12px;
  font-size: 13.5px;
  font-weight: 800;
  color: #a1355e;
}
.zukan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 2px;
}
@media (min-width: 480px) {
  .zukan-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.zk {
  padding: 10px 8px;
  text-align: center;
  background: #fff;
  border: 1.5px solid rgba(244, 63, 142, 0.18);
  border-radius: 14px;
}
.zk-emoji {
  font-size: 26px;
}
.zk-name {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.35;
}
.zk-hint {
  margin-top: 3px;
  font-size: 10px;
  color: var(--txt2);
  line-height: 1.4;
}
.zk.lock {
  background: #f6f2ef;
  border-style: dashed;
}
.zk.lock .zk-emoji {
  filter: grayscale(1);
  opacity: 0.55;
}
.zk.got {
  border-color: rgba(244, 63, 142, 0.45);
  box-shadow: 0 2px 10px rgba(244, 63, 142, 0.12);
}
.zukan-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--txt2);
}

/* ===== 前回復元トースト ===== */
.restore-toast {
  visibility: hidden; /* 非表示中はタブ移動・スクリーンリーダーからも隠す */
  position: fixed;
  bottom: calc(var(--dash-h, 300px) + 14px); /* 親指と視線がある下側に出す */
  left: 50%;
  z-index: 89;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  background: var(--grad);
  border-radius: 99px;
  box-shadow: var(--shadow-brand);
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: 0.4s cubic-bezier(0.2, 1.3, 0.4, 1);
  pointer-events: none;
}
.restore-toast.show {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.rt-btn {
  min-height: 36px;
  padding: 6px 13px;
  font-size: 11.5px;
  font-weight: 800;
  color: #e8452a;
  background: #fff;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== 図鑑シークレット枠 ===== */
.zk.secret {
  background: linear-gradient(135deg, #f7f0ff, #fff0f6);
  border-color: rgba(168, 106, 228, 0.35);
}
.zk.secret.got {
  border-color: rgba(168, 106, 228, 0.65);
  box-shadow: 0 2px 12px rgba(168, 106, 228, 0.22);
}

/* ===== 称号表示 ===== */
.done-rank {
  margin: 8px 0 2px;
  font-size: 13px;
  font-weight: 800;
  color: #7b3fb5;
}
.done-rank b {
  color: #5e2d91;
}

/* ===== ボウル対決 ===== */
.battle-box {
  margin: 12px 0;
  padding: 12px 12px 10px;
  background: linear-gradient(135deg, rgba(168, 106, 228, 0.08), rgba(244, 63, 142, 0.07));
  border: 1.5px dashed rgba(168, 106, 228, 0.45);
  border-radius: 16px;
  text-align: left;
}
.bt-head {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #5e2d91;
  text-align: center;
}
.bt-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 4px 2px;
  font-size: 12.5px;
  font-weight: 700;
}
.bt-label {
  color: #6b5a52;
}
.bt-me {
  color: #9b8880;
}
.bt-me.w {
  color: #e0356b;
  font-weight: 900;
}
.bt-vs {
  font-size: 10px;
  color: #b7a8a0;
}
.bt-them {
  color: #6b5a52;
}
.bt-verdict {
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  border-radius: 12px;
}
.bt-verdict.win {
  color: #b0335c;
  background: rgba(244, 63, 142, 0.12);
}
.bt-verdict.lose {
  color: #4a5a96;
  background: rgba(90, 110, 200, 0.12);
}
.bt-verdict.draw {
  color: #7b6a33;
  background: rgba(220, 180, 60, 0.15);
}

/* ===== きせかえ丼 ===== */
.skin-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 5;
  width: 40px;
  height: 40px;
  font-size: 18px;
  background: #fff;
  border: 1.5px solid rgba(244, 63, 142, 0.3);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(230, 120, 120, 0.18);
  cursor: pointer;
}
.bowl-stage {
  position: relative;
}
/* ===== 音声入力(🎤): ボウル左上のボタンと、ボウルの上に出る案内バー ===== */
.mic-btn {
  position: absolute;
  top: 6px;
  left: 8px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 13px 0 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  color: #a1355e;
  background: #fff;
  border: 1.5px solid rgba(244, 63, 142, 0.35);
  border-radius: 99px;
  box-shadow: 0 2px 8px rgba(230, 120, 120, 0.18);
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}
.mic-btn[hidden] {
  display: none; /* display:inline-flex が [hidden] に勝ってしまうのを防ぐ(非対応ブラウザで出さない) */
}
.mic-btn .mic-ic {
  font-size: 16px;
}
.mic-btn.on {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 0 0 0 rgba(255, 77, 46, 0.5);
  animation: micpulse 1.4s infinite;
}
.mic-btn.on .mic-ic {
  animation: micblink 1s infinite;
}
@keyframes micblink {
  50% {
    opacity: 0.35;
  }
}
@keyframes micpulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 77, 46, 0.55);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 77, 46, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 46, 0);
  }
}
.voice-bar {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% + 8px);
  z-index: 60;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  color: #7a2445;
  background: #fff;
  border: 1.5px solid rgba(244, 63, 142, 0.35);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(230, 120, 120, 0.22);
}
.voice-bar.show {
  display: flex;
}
.voice-msg {
  flex: 1;
}
.voice-interim {
  font-weight: 400;
  color: var(--txt3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
}
.voice-close {
  flex: none;
  width: 32px;
  height: 32px;
  font-size: 13px;
  color: var(--txt3);
  background: rgba(244, 63, 142, 0.08);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.skin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 2px;
}
.skin-item {
  font-family: inherit;
  cursor: pointer;
}
.skin-item.on {
  border-color: rgba(244, 63, 142, 0.7);
  box-shadow: 0 2px 12px rgba(244, 63, 142, 0.25);
}
.skin-item[disabled] {
  cursor: not-allowed;
}

/* ===== 診断モーダルの微調整ボタン ===== */
.done-adjust {
  display: block;
  margin: 8px auto 0;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  color: var(--txt2);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}

/* ===== 初回(何も入れていない)は見出し周りを畳む: 最初の具材カードを画面内に ===== */
body.pre-start .modes,
body.pre-start .suggest {
  display: none;
}
body.pre-start header {
  margin-bottom: 4px;
}
/* 初回は説明文を畳み、単位案内は1行に。最初の具材カードがダッシュボードの上に見える高さに収める */
body.pre-start #secIng > .sec-sub {
  display: none;
}
body.pre-start #secIng {
  margin-top: 12px;
}
body.pre-start .unit-note {
  padding: 8px 12px;
  margin-bottom: 8px;
  animation: none;
}
body.pre-start .unit-note .un-big {
  font-size: 13.5px;
}
body.pre-start .unit-note .un-eq {
  font-size: 14px;
}
body.pre-start .unit-note .un-sub {
  display: none;
}
/* 空のボウルは小さく、栄養バーは隠す(入れた瞬間に大きくなる) */
body.pre-start .dash .bowl-wrap {
  width: min(190px, calc(100vw - 24px));
}
body.pre-start .dash .pfc-bar,
body.pre-start .dash .pfc-legend {
  display: none;
}

/* ===== ボウル縮小(下スクロール中) ===== */
.bowl-wrap {
  transition: width 0.28s ease;
}
.dash.mini .bowl-wrap {
  width: min(190px, calc(100vw - 24px));
}
.dash.mini .mic-btn .mic-txt {
  display: none;
}
.dash.mini .mic-btn {
  padding: 0 10px;
}

/* ===== チラ見せ(ボウル上の吹き出し) ===== */
.tease {
  position: absolute;
  top: 6px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  max-width: calc(100% - 200px);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: #a1355e;
  background: #fff;
  border: 1.5px solid rgba(244, 63, 142, 0.35);
  border-radius: 99px;
  box-shadow: 0 2px 8px rgba(230, 120, 120, 0.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.tease-in {
  display: inline-block;
  animation: teasebob 2.4s infinite; /* 外側は動かさない(タップ判定を安定させる) */
}
.tease[hidden] {
  display: none;
}
@keyframes teasebob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}
@media (max-width: 400px) {
  .tease {
    max-width: calc(100% - 180px);
    font-size: 11px;
    padding: 6px 9px;
  }
}

/* ===== 具材グループのジャンプ帯(貼り付き) ===== */
.grp-nav {
  /* 具材リストの末尾に置き、リストを見ている間はダッシュボードの上(親指の届く位置)に貼り付く */
  position: sticky;
  bottom: calc(var(--dash-h, 300px) + 10px);
  z-index: 6;
  display: flex;
  gap: 6px;
  margin: 0 0 6px;
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255, 250, 243, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--bd);
  border-radius: 99px;
  box-shadow: 0 4px 14px rgba(230, 120, 120, 0.12);
}
.grp-nav::-webkit-scrollbar {
  display: none;
}
.grp-chip {
  flex: none;
  height: 36px;
  padding: 0 13px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--txt2);
  background: #fff;
  border: 1.5px solid var(--bd);
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
}
.grp-chip.on {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
}
.grp-h {
  margin: 14px 0 8px;
  font-weight: 700;
  color: var(--txt2);
}

/* ===== スマホ片手向けのダッシュボード圧縮 ===== */
.pfc-legend {
  display: none; /* 数値は「内訳」を開いたときだけ */
}
.dash.open .pfc-legend {
  display: flex;
}
@media (max-height: 720px) {
  .bowl-wrap {
    width: min(300px, calc(100vw - 24px)); /* 背の低い画面ではボウルを少し小さく */
  }
  .dash.mini .bowl-wrap,
  body.pre-start .dash .bowl-wrap {
    width: min(180px, calc(100vw - 24px));
  }
}

/* ===== こんなのあったらいいなBOX(アイデアBOX) ===== */
.idea {
  margin: 34px 0 10px;
  scroll-margin-top: 12px;
}
.idea-card {
  position: relative;
  background: var(--card);
  border: 1.5px solid rgba(240, 127, 18, 0.28);
  border-radius: 22px;
  padding: 26px 18px 18px;
  box-shadow: var(--shadow-sm);
}
/* 投函口: 意見箱らしさを出す上辺のスリット */
.idea-card::before {
  content: "";
  position: absolute;
  top: -1.5px;
  left: 50%;
  width: 92px;
  height: 9px;
  transform: translateX(-50%);
  background: var(--txt);
  border-radius: 0 0 9px 9px;
  opacity: 0.8;
}
.idea-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 6px;
}
.idea-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #d1521c;
  background: #fff1e4;
  border: 1px solid rgba(255, 147, 48, 0.45);
  border-radius: 99px;
  padding: 2px 10px;
}
.idea-sub {
  font-size: 12.5px;
  color: var(--txt2);
  margin: 0 0 14px;
}
.idea-form[hidden],
.idea-thanks[hidden] {
  display: none;
}
.idea-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.idea-cats {
  border: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.idea-cats legend {
  font-size: 12px;
  font-weight: 700;
  color: var(--txt2);
  margin-bottom: 7px;
  padding: 0;
}
.idea-cat {
  position: relative;
  cursor: pointer;
}
.idea-cat input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.idea-cat span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--txt2);
  background: var(--card2);
  border: 1.5px solid var(--bd);
  border-radius: 99px;
  transition: 0.15s;
}
.idea-cat input:checked + span {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  box-shadow: var(--shadow-brand);
}
.idea-cat input:focus-visible + span {
  outline: 2.5px solid var(--neon);
  outline-offset: 2px;
}
@media (hover: hover) {
  .idea-cat:hover input:not(:checked) + span {
    border-color: var(--neon2);
    color: var(--neon2);
  }
}
.idea-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--txt2);
  margin-bottom: 6px;
}
.idea-opt {
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--txt3);
  background: var(--card2);
  border-radius: 99px;
  vertical-align: 1px;
}
.idea-form .idea-name {
  display: block;
  width: 100%;
  max-width: 320px;
  margin-bottom: 12px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 16px; /* 16px未満だとiPhoneで入力時に勝手にズームされる */
  color: var(--txt);
  background: #fffdf9;
  border: 1.5px solid var(--bd2);
  border-radius: 12px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.idea-form .idea-name::placeholder {
  color: var(--txt3);
  font-size: 13.5px;
}
.idea-form .idea-name:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(255, 77, 46, 0.15);
}
.idea-form textarea {
  display: block;
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px; /* 16px未満だとiPhoneで入力時に勝手にズームされる */
  line-height: 1.6;
  color: var(--txt);
  background: #fffdf9;
  border: 1.5px solid var(--bd2);
  border-radius: 14px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.idea-form textarea::placeholder {
  color: var(--txt3);
  font-size: 13.5px;
}
.idea-form textarea:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(255, 77, 46, 0.15);
}
.idea-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.idea-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--txt3);
  font-variant-numeric: tabular-nums;
}
.idea-count.near {
  color: var(--neon);
  font-weight: 700;
}
.idea-send {
  padding: 11px 26px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: var(--grad);
  border: none;
  border-radius: 99px;
  cursor: pointer;
  box-shadow: var(--shadow-brand);
  transition: 0.15s;
}
.idea-send:active {
  transform: scale(0.95);
}
.idea-send:disabled {
  opacity: 0.6;
  cursor: wait;
}
.idea-msg {
  min-height: 0;
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
}
.idea-msg:empty {
  display: none;
}
.idea-msg.err {
  color: #d0342c;
}
.idea-note {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--txt3);
}
.idea-note a {
  color: var(--neon2);
}
.idea-thanks {
  text-align: center;
  padding: 10px 0 4px;
}
.idea-thanks:focus {
  outline: none;
}
.it-emoji {
  font-size: 38px;
  line-height: 1;
  animation: cardpop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.it-title {
  margin: 10px 0 4px;
  font-size: 17px;
  font-weight: 900;
  color: var(--neon);
}
.it-sub {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--txt2);
}
.idea-again {
  padding: 9px 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--txt2);
  background: none;
  border: 1.5px solid var(--bd2);
  border-radius: 99px;
  cursor: pointer;
}
@media (hover: hover) {
  .idea-again:hover {
    border-color: var(--neon);
    color: var(--neon);
  }
}
/* 完成モーダルからの入口 */
.done-idea {
  display: block;
  margin: 10px auto 0;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  color: #d1521c;
  background: rgba(255, 147, 48, 0.08);
  border: 1px solid rgba(255, 147, 48, 0.4);
  border-radius: 99px;
  cursor: pointer;
}
@media (max-width: 400px) {
  .idea-card {
    padding: 24px 14px 16px;
  }
  .idea-cat span {
    padding: 6px 11px;
    font-size: 12px;
  }
}

/* ===== 値段とカロリーのきほん(素のHTMLで読める案内。scripts/generate-home-guide.mjs が生成) ===== */
.guide {
  margin: 36px 0 10px;
  padding: 22px 18px 18px;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}
.guide h2 {
  font-size: 18px;
  text-wrap: balance;
}
.guide h3 {
  margin: 22px 0 8px;
  font-size: 14.5px;
  font-weight: 900;
  color: var(--txt);
}
.guide p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--txt2);
}
.guide-lead {
  margin-top: 8px !important;
}
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.guide-table th,
.guide-table td {
  padding: 8px 4px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid rgba(190, 90, 30, 0.1);
}
.guide-table tr:first-child th,
.guide-table tr:first-child td {
  border-top: none;
}
.guide-table th {
  width: 42%;
  font-weight: 700;
  color: var(--txt2);
}
.guide-table td {
  font-weight: 800;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}
.guide-table small,
.guide-examples small,
.guide-links small {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--txt3);
}
.guide-examples,
.guide-links {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.guide-examples li,
.guide-links li {
  padding: 10px 12px;
  font-size: 13px;
  background: var(--card2);
  border-radius: 12px;
  min-width: 0;
}
.guide-examples b {
  margin-right: 6px;
  color: #d1521c;
}
.guide-note {
  font-size: 12px !important;
}
.guide-links a {
  font-weight: 800;
  color: var(--neon);
}
.guide-faq {
  margin: 0;
}
.guide-faq dt {
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--txt);
}
.guide-faq dt::before {
  content: "Q. ";
  color: var(--neon);
}
.guide-faq dd {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--txt2);
}
