/* Planet Recipe Kitchen: recipe controls beside the kitchen scene, inside the practice shell's stage. */
.prk { position: absolute; inset: 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 12px; padding: 8px 12px; color: var(--tlg-text, #172c38); }
.prk-panel { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow-y: auto; padding: 2px 4px 2px 2px; }
.prk :focus-visible { outline: 3px solid #b16a08; outline-offset: 2px; }
.prk button { font: inherit; touch-action: manipulation; }
.prk button:disabled, .prk input:disabled { cursor: default; }

.prk-row { margin: 0; min-width: 0; }
.prk-label { display: block; margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.prk-info { margin: 0; padding: 8px 12px; border-radius: 12px; font-size: 18px; font-weight: 800; background: #eef0fb; color: #22266a; border: 2px dashed #9da3d8; }
html[data-theme="dark"] .prk-info { background: #1e2150; color: #dfe2ff; border-color: #5a60a8; }

/* number steppers */
.prk-num { display: flex; align-items: center; gap: 6px; }
.prk-step { flex: none; width: 44px; height: 44px; font-size: 26px !important; font-weight: 800; line-height: 1; cursor: pointer; border-radius: 10px; color: var(--tlg-text, #172c38);
  background: var(--tlg-surface, #fff); border: 2px solid var(--tlg-border, #a5b6c1); box-shadow: 0 2px 0 rgba(0, 0, 0, .08); }
.prk-step:hover:not(:disabled) { border-color: #33388a; }
.prk-step:disabled { opacity: .4; }
.prk-input { width: 72px; height: 46px; font: inherit; font-size: 24px; font-weight: 800; text-align: center; padding: 0 6px; border-radius: 10px;
  border: 2px solid var(--tlg-border, #a5b6c1); background: var(--tlg-surface, #fff); color: var(--tlg-text, #172c38); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.prk-input::-webkit-outer-spin-button, .prk-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.prk-input:focus { border-color: #33388a; }
.prk-unit { font-size: 17px; font-weight: 700; color: var(--tlg-text-muted, #4b5d68); }
.prk-numrow.is-fixed .prk-input { background: #fff6d6; border-color: #c9a227; border-style: dashed; color: #4a3800; opacity: 1; }
.prk-numrow { display: flex; align-items: center; gap: 8px; }
.prk-numrow .prk-label { flex: none; width: 84px; margin: 0; line-height: 1.15; }
.prk-given { display: block; font-size: 16px; font-weight: 800; color: #7a5c00; }
html[data-theme="dark"] .prk-given { color: #ffd76a; }
html[data-theme="dark"] .prk-numrow.is-fixed .prk-input { background: #3a3110; color: #ffe9a0; border-color: #b8952a; }

/* choices */
.prk-opts { display: grid; gap: 6px; }
.prk-choice--jars .prk-opts { grid-template-columns: 1fr 1fr; }
.prk-choice--three .prk-opts { grid-template-columns: 1fr 1fr 1fr; }
.prk-opt { display: flex; align-items: center; gap: 6px; min-height: 46px; padding: 6px 10px; border-radius: 12px; cursor: pointer; text-align: left; font-size: 16px !important; font-weight: 700; line-height: 1.25;
  color: var(--tlg-text, #172c38); background: var(--tlg-surface, #fff); border: 2px solid var(--tlg-border, #a5b6c1); box-shadow: 0 2px 0 rgba(0, 0, 0, .08); }
.prk-choice--three .prk-opt { justify-content: center; text-align: center; }
.prk-opt:hover:not(:disabled) { border-color: #33388a; }
.prk-opt.is-on { border-color: #33388a; background: #e8eaff; box-shadow: inset 0 0 0 2px #33388a; }
.prk-opt.is-on::before { content: '●'; color: #33388a; font-size: 14px; }
html[data-theme="dark"] .prk-opt.is-on { background: #262a66; border-color: #9ea6ff; box-shadow: inset 0 0 0 2px #9ea6ff; }
html[data-theme="dark"] .prk-opt.is-on::before { color: #c5caff; }
.prk-opt-i { flex: none; width: 40px; height: 26px; margin-left: -4px; }
.prk-choice--jars .prk-opt { padding: 4px 8px; gap: 4px; }
.prk-choice--big .prk-opt { min-height: 64px; font-size: 18px !important; }
.prk-choice--big .prk-opt-i { width: 64px; height: 40px; }
.prk-choice--cards .prk-opt { min-height: 44px; padding: 4px 10px; line-height: 1.2; }
.prk-opt.is-right { border-color: #2e8b57; background: #e6f6ec; color: #134b2b; }
.prk-opt.is-wrong { border-color: #b42318; border-style: dashed; background: #fdecea; color: #7a160e; }
html[data-theme="dark"] .prk-opt.is-right { background: #143c26; color: #c9f5d8; border-color: #4fbf7f; }
html[data-theme="dark"] .prk-opt.is-wrong { background: #4a1612; color: #ffd2cc; border-color: #ff8a7a; }
.prk-opt-m { font-weight: 900; }
.prk-opt:disabled { opacity: 1; }
.prk.is-locked .prk-opt:not(.is-on):not(.is-right):not(.is-wrong) { opacity: .6; }

/* steps: recipe card + tray */
.prk-steps { display: flex; flex-direction: column; gap: 4px; }
.prk-chain { list-style: none; margin: 0 0 4px; padding: 6px; border-radius: 14px; background: #fffaf0; border: 2px solid #d8c7a0; display: grid; gap: 4px; }
html[data-theme="dark"] .prk-chain { background: #2a2418; border-color: #6e5d3a; }
.prk-slot { display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 2px 4px; border-radius: 10px; border: 2px solid transparent; }
.prk-slot.is-empty { border: 2px dashed #c9b991; }
.prk-slot.is-ok { border-color: #2e8b57; } .prk-slot.is-bad { border-color: #b42318; border-style: dashed; }
.prk-slot-n { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #33388a; color: #fff; font-weight: 900; font-size: 16px; }
.prk-slot-t { flex: 1; min-width: 0; font-size: 16px; line-height: 1.25; }
.prk-slot.is-empty .prk-slot-t { color: var(--tlg-text-muted, #4b5d68); font-style: italic; }
.prk-slot-m { flex: none; font-size: 22px; font-weight: 900; width: 30px; text-align: center; }
.prk-slot.is-ok .prk-slot-m { color: #1d6b40; } .prk-slot.is-bad .prk-slot-m { color: #b42318; }
html[data-theme="dark"] .prk-slot.is-ok .prk-slot-m { color: #8fe0ad; } html[data-theme="dark"] .prk-slot.is-bad .prk-slot-m { color: #ffb4a8; }
.prk-mini { flex: none; width: 40px; height: 40px; border-radius: 9px; font-size: 18px !important; font-weight: 800; cursor: pointer; color: var(--tlg-text, #172c38); background: var(--tlg-surface, #fff); border: 2px solid var(--tlg-border, #a5b6c1); }
.prk-mini:disabled { opacity: .35; }
.prk-tray { display: grid; gap: 6px; }
.prk-card { min-height: 46px; padding: 6px 10px; border-radius: 12px; text-align: left; cursor: pointer; font-size: 16px !important; font-weight: 600; line-height: 1.25;
  color: #1d2340; background: linear-gradient(#fdfbff, #eceefd); border: 2px solid #8f96d6; box-shadow: 0 2px 0 rgba(51, 56, 138, .25); }
.prk-card:hover:not(:disabled) { border-color: #33388a; }
html[data-theme="dark"] .prk-card { color: #e8eaff; background: linear-gradient(#2c3070, #22265a); border-color: #6a71c8; }
.prk-tray-done { margin: 0; font-size: 16px; font-style: italic; color: var(--tlg-text-muted, #4b5d68); }

/* tools + status */
.prk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prk-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.prk-choice--inline { display: flex; align-items: center; gap: 8px; }
.prk-choice--inline > .prk-label { flex: none; width: 84px; margin: 0; line-height: 1.15; }
.prk-choice--inline .prk-opts { flex: 1; }
.prk-badge.is-clue { border-color: #2f6fb5; }
.prk-badge.is-msg { border-color: #33388a; }
.prk-btn { min-height: 44px; padding: 6px 14px; border-radius: 10px; cursor: pointer; font-size: 16px !important; font-weight: 800; color: #22266a; background: #eef0fb; border: 2px solid #8f96d6; }
.prk-btn:hover:not(:disabled) { border-color: #33388a; }
.prk-btn:disabled { opacity: .45; }
html[data-theme="dark"] .prk-btn { color: #e3e6ff; background: #23275e; border-color: #6a71c8; }
.prk-status { margin: 0; font-size: 16px; line-height: 1.35; }
.prk-status:empty { display: none; }
.prk-about { font-size: 16px; line-height: 1.4; flex-basis: auto; }
.prk-about[open] { flex-basis: 100%; }
.prk-about summary { cursor: pointer; font-weight: 700; }
.prk-about p { margin: 4px 0 0; }

/* the kitchen scene */
.prk-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.prk-scene { position: relative; width: 100%; aspect-ratio: 720 / 620; border-radius: var(--tlg-radius-lg, 14px); overflow: hidden; border: var(--tlg-border-width, 1px) solid var(--tlg-border, #a5b6c1); user-select: none; -webkit-user-select: none; touch-action: none; }
.prk-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; color: #3b4652; }
.prk-wall { fill: #ece6f6; }
.prk-tiles rect { fill: #f6f2fc; stroke: #d6cde8; stroke-width: 1; }
.prk-counter { fill: #8f6a4b; }
.prk-cab rect { fill: #a37c5a; stroke: #6d4d32; stroke-width: 1.5; }
html[data-theme="dark"] .prk-wall { fill: #1c1d33; }
html[data-theme="dark"] .prk-tiles rect { fill: #23253f; stroke: #34375a; }
html[data-theme="dark"] .prk-counter { fill: #4a3a2c; }
html[data-theme="dark"] .prk-cab rect { fill: #5a4636; stroke: #2e231a; }
html[data-theme="dark"] .prk-svg { color: #c9cfe0; }

.prk-t, .prk-svg text { font-family: var(--tlg-font-body, system-ui, sans-serif); }
.prk-banner { font-size: 26px; font-weight: 800; fill: #f6e7b8; letter-spacing: .02em; }
.prk-cap { font-size: 18px; font-weight: 700; fill: #2f3550; }
.prk-cap--b { font-weight: 800; }
.prk-cap--warn { fill: #b23a0a; font-weight: 800; }
.prk-frost-t { fill: #1f5a8c; font-weight: 800; }
.prk-tick { font-size: 18px; font-weight: 700; fill: #2f3550; }
.prk-tick--on { font-weight: 900; fill: #b42318; }
.prk-tickline { stroke: #3b4652; fill: none; }
.prk-big { font-size: 30px; font-weight: 900; fill: #2f3550; }
html[data-theme="dark"] .prk-cap, html[data-theme="dark"] .prk-tick, html[data-theme="dark"] .prk-big { fill: #e2e5f5; }
html[data-theme="dark"] .prk-cap--warn { fill: #ffab7a; }
html[data-theme="dark"] .prk-frost-t { fill: #9fd2ff; }
html[data-theme="dark"] .prk-tick--on { fill: #ff9d8f; }
html[data-theme="dark"] .prk-tickline { stroke: #c9cfe0; }
.prk-disk .prk-cap { fill: #fff3dc; paint-order: stroke; stroke: #3a2614; stroke-width: 4px; }
.prk-disk .prk-tick { fill: #fff3dc; paint-order: stroke; stroke: #3a2614; stroke-width: 4px; }
.prk-disk .prk-frost-t { fill: #d8f0ff; stroke: #10304d; }
.prk-disk .prk-tickline { stroke: #fff3dc; }
.prk-disk-hint { font-size: 18px; font-weight: 800; fill: #ffffff; paint-order: stroke; stroke: #3a2614; stroke-width: 4px; font-style: italic; }
.prk-pill rect { fill: #ffffff; stroke: #2b2f6e; stroke-width: 2.5; }
.prk-pill-t { font-size: 18px; font-weight: 800; fill: #1d2340; }
.prk-marker-tri { fill: #ffd35a; stroke: #111; stroke-width: 2; }
.prk-marker.is-hl .prk-pill rect { stroke: #d9480f; stroke-width: 3.5; }
.prk.prk--recipe:not(.is-locked) .prk-disk { cursor: pointer; }
.prk-star { fill: #fff; animation: prk-twinkle 3s ease-in-out infinite; }
.prk-sunglow { animation: prk-glow 2.6s ease-in-out infinite; transform-origin: 50px 496px; }
@keyframes prk-twinkle { 50% { opacity: .35; } }
@keyframes prk-glow { 50% { opacity: .7; } }

.prk-jar-tag { font-size: 18px; font-weight: 900; fill: #2b2418; letter-spacing: .06em; }
.prk-jar-halo { fill: #ffe27a; opacity: .55; }
.prk-jar.is-off { opacity: .45; }
.prk-pill--off rect { fill: #fdecea; stroke: #b42318; }
.prk-pill--off .prk-pill-t { fill: #7a160e; }
.prk-jar.is-ok .prk-jar-halo { fill: #8fe0ad; opacity: .8; }
.prk-jar.is-need .prk-jar-halo { fill: none; stroke: #b42318; stroke-width: 3; stroke-dasharray: 6 4; opacity: 1; }
.prk-jar.is-bad > rect:nth-of-type(2) { stroke: #b42318; stroke-width: 3; stroke-dasharray: 6 4; }
.prk-tk-k { font-size: 18px; font-weight: 900; fill: #8a2a22; letter-spacing: .08em; }
.prk-tk-big { font-size: 28px; font-weight: 900; fill: #1d2340; }
.prk-tk-big--sm { font-size: 21px; }
.prk-tk-sub { font-size: 18px; font-weight: 700; fill: #3d4560; }
.prk-gauge-tube { fill: #ffffff; stroke: #59636d; stroke-width: 2; }
html[data-theme="dark"] .prk-gauge-tube { fill: #2c2f45; stroke: #9aa4b8; }
.prk-dial { fill: #fbfcfd; stroke: #59636d; stroke-width: 1.5; }
.prk-tank-t { font-size: 20px; font-weight: 900; fill: #ffffff; }
.prk-bowl-t { font-size: 18px; font-weight: 800; fill: #1d2340; }
.prk-ghost { stroke: #59636d; }
html[data-theme="dark"] .prk-ghost { stroke: #c9cfe0; }
.prk-warn-t { font-size: 30px; font-weight: 900; fill: #5a3a00; }
.prk-board .prk-bpanel { fill: #fffaf0; stroke: #b9a988; stroke-width: 2; }
.prk-board .prk-bpanel.is-empty { fill: #fffaf0; fill-opacity: .6; stroke-dasharray: 7 5; }
html[data-theme="dark"] .prk-board .prk-bpanel { fill: #2a2418; stroke: #8a7a55; }
.prk-board .prk-bnum { fill: #33388a; }
.prk-num-t { font-size: 18px; font-weight: 900; fill: #ffffff; }
.prk-panel-t { font-size: 18px; font-weight: 800; fill: #1d2340; }
.prk-panel-t--empty { font-style: italic; font-weight: 600; fill: #6b6450; }
html[data-theme="dark"] .prk-panel-t { fill: #f2ead2; }
.prk-ok circle { fill: #2e8b57; stroke: #fff; stroke-width: 2; }
.prk-bad rect { fill: #b42318; stroke: #fff; stroke-width: 2; }

/* reveal badge */
.prk-badge { position: absolute; left: 2%; right: 2%; top: 1.5%; padding: 7px 12px; border-radius: 10px; font-size: 17px; font-weight: 700; line-height: 1.3; pointer-events: none;
  background: rgba(255, 255, 255, .97); color: #10202c; border: 3px solid #2e8b57; box-shadow: 0 3px 8px rgba(0, 0, 0, .2); animation: prk-pop .25s ease-out; }
.prk-badge.is-bad { border-color: #b42318; }
.prk-badge.is-run { border-color: #33388a; }
@keyframes prk-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* briefing example + start art */
.prk-ex { display: block; width: 100%; height: auto; max-height: 460px; }
.prk-ex-t { font-size: 22px; font-weight: 800; fill: #ffffff; font-family: var(--tlg-font-body, system-ui, sans-serif); }
.prk-ex-c { font-size: 20px; font-weight: 600; fill: #dfe2ff; font-style: italic; font-family: var(--tlg-font-body, system-ui, sans-serif); }

@media (prefers-reduced-motion: reduce) { .prk-badge, .prk-star, .prk-sunglow { animation: none; } }
@media (max-width: 1100px) { .prk { grid-template-columns: 340px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .prk { position: static; grid-template-columns: 1fr; }
  .prk-panel { overflow: visible; }
  .prk-view { display: block; order: -1; }
  .prk-scene { width: 100% !important; }
}
