/* Food Test Diner: the order steps (left) and the diner test-counter scene (right) inside the practice shell's stage. */
.ftd { position: absolute; inset: 0; display: grid; grid-template-columns: 384px minmax(0, 1fr); gap: 12px; padding: 8px 12px; color: var(--tlg-text); }
.ftd-panel { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 2px; }
.ftd-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ftd-step { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 10px; border-radius: var(--tlg-radius-lg, 14px);
  background: #fff9f0; border: 2px solid #e7cfa9; color: #2b2118; }
.ftd-step[hidden], .ftd-summary[hidden], .ftd [hidden] { display: none !important; }
.ftd-step-k { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 800; color: #7d1f2b; }
.ftd-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #a8323e; color: #fff; font-size: 16px; }
.ftd-field { margin: 0; }
.ftd-field-k { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.ftd-chips { display: grid; gap: 6px; }
.ftd-chips--1 { grid-template-columns: 1fr; }
.ftd-chips--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ftd-chips--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ftd-chip { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 10px; font-size: 16px; line-height: 1.2; text-align: left;
  border-radius: 12px; white-space: normal; background: #ffffff; color: #2b2118; }
.ftd-chips--3 .ftd-chip { flex-direction: column; justify-content: center; text-align: center; gap: 2px; padding: 4px 4px; min-height: 58px; }
.ftd-chip .ftd-ico { width: 26px; height: 26px; flex: none; }
.ftd-chip[aria-checked="true"] { background: #a8323e; border-color: #a8323e; color: #fff; box-shadow: 0 0 0 3px #f4c3c8; }
.ftd-chip[aria-checked="true"] .ftd-ico { filter: drop-shadow(0 0 1.5px #fff); }
.ftd-chip:disabled { cursor: default; opacity: .62; }
.ftd-chip[aria-checked="true"]:disabled { opacity: .9; }
.ftd-chip:focus-visible, .ftd-switch:focus-visible, .ftd-run:focus-visible, .ftd-fresh:focus-visible { outline: 3px solid #b16a08; outline-offset: 2px; }
.ftd-reason .ftd-field-k { margin-top: 4px; }
.ftd-reason .ftd-chip { min-height: 40px; padding: 4px 10px; }

.ftd-heat { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 16px; font-weight: 700; cursor: pointer; }
.ftd-heat-ico .ftd-ico { width: 24px; height: 24px; display: block; }
.ftd-switch { appearance: none; -webkit-appearance: none; position: relative; width: 52px; height: 30px; margin: 0; flex: none; border-radius: 15px;
  background: #b7bec6; border: 2px solid #6b7680; cursor: pointer; transition: background .15s; }
.ftd-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0005; transition: left .15s; }
.ftd-switch:checked { background: #d9542a; border-color: #9c3412; }
.ftd-switch:checked::after { left: 24px; }
.ftd-switch:disabled { cursor: default; opacity: .65; }

.ftd-run { align-self: stretch; min-height: 46px; font-size: 17px; }
.ftd-muted { margin: 0; font-size: 16px; font-style: italic; color: #6a5440; }
.ftd-summary { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--tlg-radius-lg, 14px); background: #f3f6f8; border: 2px dashed #9fb0ba; color: #1f2933; }
.ftd-sum { flex: 1; margin: 0; font-size: 16px; line-height: 1.35; }
.ftd-fresh { flex: none; min-height: 44px; font-size: 16px; }
.ftd-obs { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 10px; border-radius: 10px; background: #ffffff; border: 2px solid #e7cfa9; font-size: 17px; min-height: 44px; }
.ftd-obs .ftd-ico { width: 30px; height: 30px; flex: none; }
.core-status { margin: 0; min-height: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.core-status:empty { display: none; }
.ftd-clues { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ftd-more { min-height: 40px; font-size: 16px; }
.ftd-clue { margin: 0; font-size: 16px; line-height: 1.35; }
.ftd-clue:empty { display: none; }

html[data-theme="dark"] .ftd-step { background: #2c2228; border-color: #7b5562; color: #f5e8ee; }
html[data-theme="dark"] .ftd-step-k { color: #f6aeb7; }
html[data-theme="dark"] .ftd-chip { background: #1e2530; color: #f1f4f7; }
html[data-theme="dark"] .ftd-chip[aria-checked="true"] { background: #c0414f; border-color: #c0414f; box-shadow: 0 0 0 3px #6d2730; }
html[data-theme="dark"] .ftd-muted { color: #e3cbb4; }
html[data-theme="dark"] .ftd-summary { background: #1e2530; border-color: #5d7180; color: #e8eef2; }
html[data-theme="dark"] .ftd-obs { background: #1e2530; border-color: #7b5562; color: #f1f4f7; }

/* the scene */
.ftd-view { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; }
.ftd-scene { position: relative; width: 100%; max-width: calc((100vh - 150px) * 640 / 600); aspect-ratio: 640 / 600; border-radius: var(--tlg-radius-lg, 14px);
  overflow: hidden; border: var(--tlg-border-width, 1px) solid var(--tlg-border); user-select: none; -webkit-user-select: none; }
.ftd-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; font-family: var(--tlg-font-body, system-ui, sans-serif); }
.ftd-wall { fill: url(#ftd-wall); }
.ftd-tiles { fill: url(#ftd-tile); }
html[data-theme="dark"] .ftd-wall { fill: url(#ftd-wall-d); }
html[data-theme="dark"] .ftd-tiles { fill: url(#ftd-tile-d); }
.ftd-svg text { font-size: 18px; fill: #2b2118; }
.ftd-svg .ftd-neon { font-size: 27px; font-weight: 800; fill: #ff6b7a; letter-spacing: .5px; font-style: italic; }
.ftd-svg .ftd-chalk-k { font-size: 17px; font-weight: 800; fill: #ffd98a; letter-spacing: 1.2px; }
.ftd-svg .ftd-chalk { font-size: 20px; font-weight: 700; fill: #f4f1e8; }
.ftd-svg .ftd-chalk--s { font-size: 18px; font-weight: 600; fill: #cfe3d6; }
.ftd-svg .ftd-cap { font-size: 16.5px; font-weight: 700; fill: #3b2a1c; }
.ftd-svg .ftd-lbl--dark { font-weight: 700; fill: #2b2118; }
html[data-theme="dark"] .ftd-svg .ftd-cap { fill: #f1e3cf; }
.ftd-bottle.is-live, .ftd-hot.is-live { cursor: pointer; }
.ftd-bottle.is-live:hover > g { filter: brightness(1.08); }
.ftd-tag rect { fill: #ffffff; stroke: #2b2118; stroke-width: 2; }
.ftd-svg .ftd-tag text { font-weight: 800; fill: #2b2118; }

.ftd-about { position: absolute; left: 14px; top: 14.5%; max-width: 64%; font-size: 16px; }
.ftd-about summary { display: inline-block; padding: 3px 12px; border-radius: 14px; background: #fffaf0e6; border: 1px solid #c8a95b; color: #5b4630; font-style: italic; cursor: pointer; list-style: none; }
.ftd-about summary::-webkit-details-marker { display: none; }
.ftd-about summary::before { content: 'ⓘ '; }
.ftd-about[open] { z-index: 3; }
.ftd-about p { position: absolute; left: 0; top: 40px; width: min(520px, 90vw); margin: 0; padding: 10px 14px; border-radius: 12px; background: #fffdf7; color: #2b2118; border: 2px solid #c8a95b;
  font-size: 16px; line-height: 1.4; box-shadow: 0 6px 18px #0003; }
.ftd-about summary:focus-visible { outline: 3px solid #b16a08; outline-offset: 2px; }

/* cause → effect card after Check (practice only) */
.ftd-why { position: absolute; left: 3%; right: 3%; top: 104px; z-index: 2; padding: 10px 14px 12px; border-radius: 14px; background: #fffdf7; color: #2b2118;
  border: 3px solid #a8650b; box-shadow: 0 8px 22px #0004; }
.ftd-why.is-ok { border-color: #1f7a44; }
.ftd-why-k { margin: 0 0 8px; font-size: 17px; font-weight: 800; color: #7d1f2b; }
.ftd-chain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.ftd-chain li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 10px; background: #fbf3df; border: 1px solid #c8a95b;
  font-size: 16px; line-height: 1.3; text-align: center; }
.ftd-chain li + li::before { content: '→'; position: absolute; left: -20px; top: 40%; font-size: 20px; font-weight: 800; color: #a8323e; }
.ftd-chain .ftd-ico { width: 34px; height: 34px; }
.ftd-why.is-in .ftd-chain li { animation: ftd-in .45s ease-out both; animation-delay: calc(var(--d) * .45s); }
@keyframes ftd-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html[data-theme="dark"] .ftd-why { background: #1e2530; color: #f1f4f7; }
html[data-theme="dark"] .ftd-why-k { color: #f6aeb7; }
html[data-theme="dark"] .ftd-chain li { background: #2c2228; border-color: #7b5562; }
html[data-theme="dark"] .ftd-chain li + li::before { color: #f6aeb7; }

.ftd-example-svg { position: static; display: block; width: 100%; height: auto; max-height: 360px; }
.ftd-example-svg text { font-size: 18px; }

/* captions for small scenes (phones): SVG labels would be under 16 px */
.ftd-caps { display: none; }
.ftd--small .ftd-svg text, .ftd--small .ftd-tag { display: none; }
.ftd--small .ftd-caps { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin: 8px 0 0; padding: 0; list-style: none; }
.ftd-caps li { font-size: 16px; line-height: 1.3; padding: 4px 10px; border-radius: 12px; background: #fbf3df; border: 1px solid #c8a95b; color: #2b2118; }
html[data-theme="dark"] .ftd-caps li { background: #2c2228; border-color: #9b6a7f; color: #f5e8ee; }
.ftd--small .ftd-chain { grid-template-columns: 1fr; gap: 6px; }
.ftd--small .ftd-chain li + li::before { content: none; }
.ftd--small .ftd-why { position: static; width: 100%; margin-top: 8px; box-sizing: border-box; }

@media (max-width: 1100px) { .ftd { grid-template-columns: 340px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .ftd { position: static; grid-template-columns: 1fr; }
  .ftd-panel { overflow: visible; }
  .ftd-scene { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ftd-why.is-in .ftd-chain li { animation: none; }
  .ftd-switch, .ftd-switch::after { transition: none; }
}

.ps-start-art .ftd-start-svg, .ftd-start-svg { display: block; width: 100%; height: auto; }
.ftd-start-svg text { font-size: 18px; fill: #2b2118; font-family: var(--tlg-font-body, system-ui, sans-serif); }
.ftd-start-svg .ftd-neon { font-size: 27px; font-weight: 800; fill: #ff6b7a; font-style: italic; }
.ftd-start-svg .ftd-chalk-k { font-size: 17px; font-weight: 800; fill: #ffd98a; letter-spacing: 1.2px; }
.ftd-start-svg .ftd-chalk { font-size: 20px; font-weight: 700; fill: #f4f1e8; }
.ftd-start-svg .ftd-chalk--s { font-size: 18px; font-weight: 600; fill: #cfe3d6; }
.ftd-start-svg .ftd-cap { font-size: 16.5px; font-weight: 700; fill: #3b2a1c; }
.ftd-start-svg .ftd-wall { fill: url(#ftd-wall); } .ftd-start-svg .ftd-tiles { fill: url(#ftd-tile); }
html[data-theme="dark"] .ftd-about summary { background: #2a2f3fe6; color: #e8d6bf; border-color: #7b5562; }
.ftd--small .ftd-about { top: 12%; }
