/* TSUMERU：食べたくなる暖かい色。クリームの地に、うすいギンガムのクロス、杉の曲げわっぱ、緑のバラン。
   差し色は トマトの赤・卵の黄・葉の緑・はちみつ色の木。丸ゴシックでやわらかく */
:root {
  --cream: #fff8ec; --paper: #fffdf8; --ink: #3a2a1e; --sub: #8a7564; --line: #efe2cf;
  --tomato: #e2533b; --tomato-d: #c23f29; --egg: #f6c445; --leaf: #4f8a3c; --leaf-l: #e7f2dc; --honey: #e7b878; --cedar: #d9a46a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; color: var(--ink); font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  background:
    linear-gradient(90deg, rgba(226, 83, 59, .05) 50%, transparent 0) 0 0 / 44px 44px,
    linear-gradient(rgba(226, 83, 59, .05) 50%, transparent 0) 0 0 / 44px 44px,
    var(--cream); }
button { font: inherit; color: inherit; cursor: pointer; }
.tm { min-height: 100vh; padding-bottom: 20px; }
/* 上：お店の名前とタブ */
.tm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px 6px; }
.tm-brand { display: flex; align-items: center; gap: 12px; }
.tm-mark { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 50% 42%, #fff 0 34%, transparent 35%), var(--tomato); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 6px 14px -6px rgba(194, 63, 41, .6); position: relative; }
.tm-mark::after { content: ""; position: absolute; left: 50%; top: 42%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #b3122d; }
.tm-brand b { display: block; font-family: "Fredoka", "Zen Maru Gothic", sans-serif; font-size: 26px; letter-spacing: .06em; color: var(--tomato); line-height: 1; }
.tm-brand small { font-size: 12px; color: var(--sub); font-weight: 700; }
.tm-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.tm-tabs button { border: 0; padding: 7px 16px; border-radius: 99px; background: none; font-weight: 700; font-size: 13px; color: var(--sub); }
.tm-tabs button.on { background: var(--leaf); color: #fff; }
/* 6つのステップの道のり */
.tm-steps { list-style: none; margin: 8px 24px 0; padding: 10px 14px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; border-radius: 99px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 10px 24px -18px rgba(90, 60, 30, .5); counter-reset: s; }
.tm-steps li { position: relative; }
.tm-steps li + li::before { content: ""; position: absolute; left: -12%; top: 22px; width: 24%; border-top: 2px dashed var(--honey); }
.tm-steps button { width: 100%; display: grid; justify-items: center; gap: 2px; border: 0; background: none; padding: 0; }
.tm-steps .d { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-weight: 900; color: var(--sub); background: var(--cream); box-shadow: inset 0 0 0 2px var(--line); }
.tm-steps .d svg { border-radius: 50%; }
.tm-steps b { font-size: 12px; color: var(--sub); }
.tm-steps .done .d { box-shadow: inset 0 0 0 2px var(--leaf); }
.tm-steps .done b { color: var(--leaf); }
.tm-steps .now .d { box-shadow: 0 0 0 3px var(--egg), inset 0 0 0 2px #fff; background: #fff4cf; color: var(--ink); }
.tm-steps .now b { color: var(--ink); }
/* 舞台：左 曲げわっぱ／まん中 カード／右 お会計 */
.tm-stage { position: relative; display: grid; grid-template-columns: minmax(380px, 1.05fr) minmax(360px, 1.1fr) 280px; gap: 22px; align-items: start; padding: 18px 24px 10px; }
.tm-left { display: grid; gap: 14px; }
/* 杉の曲げわっぱ：楕円・木目・ふちの厚み・緑のバラン */
.tm-box-wrap { position: relative; padding: 14px; border-radius: 50% / 46%; background:
    repeating-linear-gradient(90deg, rgba(150, 95, 45, .22) 0 2px, transparent 2px 9px, rgba(150, 95, 45, .12) 9px 10px, transparent 10px 17px),
    linear-gradient(180deg, #ecc289, #d29b5c);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -8px 14px rgba(110, 60, 20, .35), 0 24px 40px -18px rgba(110, 60, 20, .6); }
.tm-box { position: relative; aspect-ratio: 1.42; display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: 1fr 1fr .9fr; gap: 8px; padding: 14px 22px; border-radius: 50% / 46%; overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(160, 110, 60, .15) 0 1px, transparent 1px 7px), #f2d3a4; box-shadow: inset 0 6px 16px rgba(110, 60, 20, .35); }
.c1 { grid-column: 1; grid-row: 1 / 3; } .c2 { grid-column: 2 / 4; grid-row: 1; } .c3 { grid-column: 2; grid-row: 2; }
.c4 { grid-column: 3; grid-row: 2; } .c5 { grid-column: 1; grid-row: 3; } .c6 { grid-column: 2 / 4; grid-row: 3; }
.tm-c { position: relative; overflow: hidden; border: 0; padding: 0; border-radius: 14px; background: #f7e3c2; box-shadow: inset 0 3px 8px rgba(110, 60, 20, .25); }
.tm-c.now { box-shadow: inset 0 0 0 3px var(--egg), inset 0 3px 8px rgba(110, 60, 20, .25); }
.tm-n { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 0; font-size: 12px; font-weight: 700; color: #b48a5c; white-space: nowrap; }
.tm-c.full .tm-n { display: none; }
.tm-f { position: absolute; inset: 0; z-index: 1; overflow: hidden; border-radius: inherit; }
.tm-f svg { display: block; }
.tm-c.pop .tm-f { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.82); opacity: .3; } }
.baran { position: absolute; z-index: 3; width: 34px; height: 64px; pointer-events: none; background: linear-gradient(90deg, #2f7a2a, #5fb04b 50%, #2f7a2a); clip-path: polygon(0 100%, 8% 30%, 20% 70%, 32% 10%, 46% 64%, 58% 0, 70% 60%, 84% 20%, 100% 100%); opacity: .95; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.baran.b1 { left: calc(39% - 17px); top: 32%; } .baran.b2 { left: calc(39% - 17px); top: 66%; transform: rotate(90deg); }
/* AIにおまかせ */
.tm-ai { padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.tm-ai p { margin: 0 0 8px; font-weight: 900; color: var(--leaf); }
.tm-ai p::before { content: "✦ "; color: var(--egg); }
.tm-ai div { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-ai button { padding: 6px 14px; border: 0; border-radius: 99px; background: var(--leaf-l); color: var(--leaf); font-size: 13px; font-weight: 800; }
.tm-ai button.on, .tm-ai button:hover { background: var(--leaf); color: #fff; }
.tm-ai small { display: block; margin-top: 8px; font-size: 12px; line-height: 1.7; color: var(--sub); }
/* まん中：見出しと料理カード */
.tm-menu { display: grid; gap: 12px; }
#stepHead .no { margin: 0; display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 900; color: #fff; background: var(--tomato); }
#stepHead h2 { margin: 6px 0 2px; font-size: 30px; font-weight: 900; letter-spacing: .02em; }
#stepHead .hint { margin: 0 0 8px; font-size: 13px; color: var(--sub); }
#stepHead .nav { display: flex; gap: 8px; }
#stepHead .nav button { padding: 6px 14px; border: 0; border-radius: 99px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: 13px; font-weight: 700; }
#stepHead .nav button:disabled { opacity: .4; }
.tm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tm-cards.in-l { animation: inL .4s ease-out; } .tm-cards.in-r { animation: inR .4s ease-out; }
@keyframes inL { from { opacity: 0; transform: translateX(24px); } } @keyframes inR { from { opacity: 0; transform: translateX(-24px); } }
.tm-card { position: relative; display: grid; justify-items: center; gap: 6px; padding: 14px 10px 12px; border: 0; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 12px 24px -18px rgba(90, 60, 30, .5); transition: transform .2s, box-shadow .2s; }
.tm-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--egg), 0 16px 28px -16px rgba(90, 60, 30, .5); }
.tm-card.on { box-shadow: 0 0 0 3px var(--leaf), 0 16px 28px -16px rgba(79, 138, 60, .5); }
.tm-dish { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--line), 0 10px 16px -8px rgba(90, 60, 30, .45); }
.tm-dish svg { border-radius: 50%; }
.tm-dish b { color: #b9a896; font-size: 14px; }
.tm-nm { font-size: 14px; font-weight: 900; text-align: center; }
.tm-pr { display: flex; gap: 6px; align-items: baseline; font-weight: 900; color: var(--tomato); }
.tm-pr small { font-size: 11px; font-weight: 700; color: var(--sub); }
.tm-card em { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 11px; font-weight: 900; color: #fff; background: var(--leaf); padding: 1px 8px; border-radius: 99px; }
/* 右：お会計 */
.tm-bill { position: sticky; top: 16px; }
.bl-card { padding: 18px; border-radius: 22px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 20px 36px -24px rgba(90, 60, 30, .6); }
.bl-k { margin: 0; font-size: 12px; font-weight: 900; color: var(--tomato); letter-spacing: .1em; }
.bl-card h3 { margin: 2px 0 10px; font-size: 20px; }
.bl-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bl-lines li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.bl-lines .d { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
.bl-lines li.empty { color: #b9a896; }
.bl-lines b { font-weight: 800; }
.bl-kcal { display: grid; grid-template-columns: auto auto auto 1fr; align-items: baseline; gap: 4px; margin: 12px 0 0; font-size: 12px; color: var(--sub); }
.bl-kcal b { font-size: 18px; color: var(--ink); }
.bl-kcal i { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--leaf), var(--egg) 60%, var(--tomato)) 0 0 / calc(var(--p) * 1%) 100% no-repeat, #f1e6d6; }
.bl-total { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0; padding-top: 10px; border-top: 2px dotted var(--line); font-weight: 800; }
.bl-total b { font-size: 26px; color: var(--tomato); }
.bl-go { width: 100%; padding: 13px; border: 0; border-radius: 99px; font-weight: 900; color: #fff; background: var(--tomato); box-shadow: 0 5px 0 var(--tomato-d); }
.bl-go:disabled { background: #e4d6c4; box-shadow: 0 5px 0 #cdbca7; color: #fff; cursor: default; }
.bl-clear { width: 100%; margin-top: 10px; border: 0; background: none; font-size: 12px; color: var(--sub); text-decoration: underline; }
/* お箸 */
.tm-chop { position: absolute; left: 0; top: 0; z-index: 6; width: 220px; height: 120px; opacity: 0; pointer-events: none; transition: transform .7s cubic-bezier(.5, 0, .3, 1), opacity .25s; filter: drop-shadow(0 8px 6px rgba(60, 30, 10, .35)); }
.tm-chop svg { position: absolute; left: 0; top: 0; transform-origin: 100% 30%; transition: transform .15s; }
.tm-chop.pinch svg { transform: rotate(-3deg) scaleY(.92); }
.tm-bite { position: absolute; left: 6px; top: 34px; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; }
.tm-foot { margin: 0; padding: 4px 24px; font-size: 11px; color: var(--sub); }
/* 注文（受け取り時間） */
.tm-modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(58, 42, 30, .45); }
.tm-sheet { width: min(520px, 100%); padding: 22px; border-radius: 24px; background: var(--paper); box-shadow: 0 30px 60px -20px rgba(58, 42, 30, .6); }
.tm-sheet h3 { margin: 0; font-size: 22px; }
.tm-sheet .small { margin: 4px 0 12px; font-size: 12px; color: var(--sub); }
.tm-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.tm-slots button { display: grid; padding: 8px 4px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-weight: 900; }
.tm-slots button small { font-size: 10.5px; font-weight: 700; color: var(--sub); }
.tm-slots button.on { background: var(--egg); box-shadow: none; }
.tm-slots button:disabled { opacity: .35; text-decoration: line-through; }
.tm-name { display: grid; gap: 4px; margin: 14px 0 0; font-size: 12px; font-weight: 700; color: var(--sub); }
.tm-name input { padding: 10px 12px; border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 15px; background: #fff; }
.tm-sum { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0; font-size: 12.5px; }
.tm-sum b { font-size: 18px; color: var(--tomato); }
.tm-acts { display: flex; gap: 8px; }
.tm-acts button { flex: 1; padding: 12px; border: 0; border-radius: 99px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-weight: 900; }
.tm-sheet .primary, .tm-acts .primary { background: var(--tomato); color: #fff; box-shadow: 0 4px 0 var(--tomato-d); }
.tm-acts .primary:disabled { background: #e4d6c4; box-shadow: none; }
.tm-sheet.done { text-align: center; }
.tm-sheet.done .big { margin: 0; font-size: 22px; font-weight: 900; }
.tm-sheet.done .no { margin: 10px 0; font-size: 14px; } .tm-sheet.done .no b { font-size: 48px; color: var(--tomato); margin-left: 6px; }
.tm-sheet.done .primary { width: 100%; padding: 12px; border: 0; border-radius: 99px; font-weight: 900; margin-top: 10px; }
/* お店の画面 */
.tm-shop { display: grid; gap: 16px; padding: 18px 24px 30px; }
.tm-panel { padding: 18px; border-radius: 22px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.tm-panel h2 { margin: 0; font-size: 19px; }
.tm-panel .small { margin: 4px 0 10px; font-size: 12px; color: var(--sub); }
.tm-counts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tm-counts li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.tm-counts .d { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; }
.tm-counts b { font-size: 13px; } .tm-counts em { font-style: normal; font-size: 22px; font-weight: 900; color: var(--tomato); }
.tm-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.tm-table th { text-align: left; font-size: 11px; color: var(--sub); padding: 6px; border-bottom: 2px solid var(--line); }
.tm-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tm-table tr.given td { color: #b9a896; }
.tm-table button { padding: 4px 12px; border: 0; border-radius: 99px; background: var(--egg); font-weight: 800; font-size: 12px; white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 50; padding: 10px 18px; border-radius: 99px; font-size: 14px; font-weight: 700; color: #fff; background: var(--leaf); box-shadow: 0 10px 24px -10px rgba(79, 138, 60, .7); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* せまい画面：道のり → 曲げわっぱ → カード → お会計 */
@media (max-width: 1180px) { .tm-stage { grid-template-columns: 1fr 1fr; } .tm-bill { grid-column: 1 / -1; position: static; } }
@media (max-width: 760px) {
  .tm-stage { grid-template-columns: 1fr; padding: 14px 16px; }
  .tm-steps { margin: 8px 16px 0; border-radius: 22px; grid-template-columns: repeat(3, 1fr); row-gap: 10px; }
  .tm-steps li + li::before { display: none; }
  .tm-top { padding: 14px 16px 4px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .tm-chop, .tm-c.pop .tm-f, .tm-cards.in-l, .tm-cards.in-r { animation: none; transition: none; } }
/* 栄養：カードの小さな札と、お会計の栄養バランス欄 */
.tm-nut { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.tm-nut i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; color: var(--sub); background: var(--cream); }
.tm-nut i.v { color: var(--leaf); background: var(--leaf-l); }
.nt { margin: 12px 0 0; padding: 12px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.nt-k { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 8px; font-size: 12px; font-weight: 900; color: var(--leaf); letter-spacing: .06em; }
.nt-k em { font-style: normal; font-size: 24px; color: var(--ink); } .nt-k em small { font-size: 11px; margin-left: 2px; }
.nt-empty { margin: 0; font-size: 12px; color: var(--sub); line-height: 1.6; }
.nt-pfc { display: flex; height: 22px; border-radius: 8px; overflow: hidden; font-size: 10.5px; font-weight: 800; color: #fff; }
.nt-pfc i { font-style: normal; flex: calc(var(--w) * 1) 0 0; display: grid; place-items: center; white-space: nowrap; overflow: hidden; }
.nt-pfc .p { background: var(--tomato); } .nt-pfc .f { background: var(--egg); color: var(--ink); } .nt-pfc .c { background: var(--honey); color: var(--ink); }
.nt-goal { margin: 4px 0 8px; font-size: 10.5px; color: var(--sub); }
.nt-m { display: grid; grid-template-columns: 56px 1fr 62px; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; }
.nt-m i { position: relative; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--c, var(--leaf)) calc(var(--p) * 1%), #f1e6d6 0); }
.nt-m i::after { content: ""; position: absolute; left: calc(var(--g) * 1%); top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .5; }
.nt-m.ok { --c: var(--leaf); } .nt-m.ng { --c: var(--tomato); }
.nt-m b { text-align: right; } .nt-m.ng b { color: var(--tomato); }
.nt-adv { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.nt-adv li { position: relative; padding: 6px 8px 6px 26px; border-radius: 10px; font-size: 12px; line-height: 1.5; background: #fff4e6; }
.nt-adv li::before { content: "💡"; position: absolute; left: 7px; top: 5px; font-size: 12px; }
.nt-good { margin: 10px 0 0; padding: 6px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--leaf); background: var(--leaf-l); }
.nt-note { margin: 8px 0 0; font-size: 10px; line-height: 1.5; color: #a8957f; }
