/* Powers of Ten Elevator: the rider's order + elevator controls and the Scale Tower lobby inside the practice shell's stage. */
.pt { position: absolute; inset: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; padding: 8px 12px; }
.pt-panel { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 2px; }

/* the order ticket */
.pt-ticket { padding: 8px 14px 10px; border-radius: var(--tlg-radius-lg, 14px); border: 2px solid #c9963a; background: #fbf6e6; color: #1e2440; box-shadow: inset 0 0 0 3px #fbf6e6, inset 0 0 0 4px #e3cf98; }
.pt-ticket-k { margin: 0; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps, .08em); color: #2f3d7a; }
.pt-ticket-h { margin: 0 0 4px; font-size: 19px; line-height: 1.25; }
.pt-given { margin: 4px 0 0; font-size: 26px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pt--multiply .pt-given, .pt--divide .pt-given { font-size: 22px; }
.pt-rule { margin: 4px 0 0; font-size: 16px; font-weight: 600; color: #4a4f6a; }
.pt-unit { margin: 4px 0 0; font-size: 16px; font-weight: 700; color: #2f3d7a; }
html[data-theme="dark"] .pt-ticket { background: #1d2340; color: #eef0ff; border-color: #c9963a; box-shadow: inset 0 0 0 3px #1d2340, inset 0 0 0 4px #6b5a2a; }
html[data-theme="dark"] .pt-ticket-k { color: #f0d27e; }
html[data-theme="dark"] .pt-rule { color: #c9cdf0; }
html[data-theme="dark"] .pt-unit { color: #dfe3ff; }

/* controls */
.pt-ctl { display: flex; flex-direction: column; gap: 10px; }
.pt-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.pt-field legend { padding: 0; margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--tlg-text, #172c38); }
.pt-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pt-pick, .pt-step {
  font: inherit; color: #1e2440; cursor: pointer; border-radius: 12px; position: relative;
  background: linear-gradient(#fdf8ea, #efe2bd); border: 2px solid #a8781f; box-shadow: 0 3px 0 #7a5216; touch-action: manipulation;
}
.pt-pick { display: flex; align-items: baseline; justify-content: center; gap: 6px; min-height: 60px; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.pt-pick-v { font-size: 22px; font-weight: 800; overflow-wrap: anywhere; }
.pt-pick-u { font-size: 18px; font-weight: 700; }
.pt-pick[aria-pressed="true"] { background: linear-gradient(#fff3c4, #ffd76a); border-color: #2f3d7a; box-shadow: 0 0 0 3px #2f3d7a inset, 0 3px 0 #1e2a5a; }
.pt-pick[aria-pressed="true"]::after {
  content: '✓'; position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 16px; font-weight: 900; line-height: 1; color: #ffffff; background: #2f3d7a; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.pt-pick:hover:not(:disabled), .pt-step:hover:not(:disabled) { border-color: #2f3d7a; }
.pt-pick:active:not(:disabled), .pt-step:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #7a5216; }

.pt-coef { display: flex; align-items: center; gap: 10px; }
.pt-stepper { display: flex; align-items: center; gap: 8px; }
.pt-num { height: 56px; font: inherit; font-size: 28px; font-weight: 800; text-align: center; border-radius: 10px; border: 2px solid #3a444c; background: #10181d; color: #ffd76a; font-variant-numeric: tabular-nums; box-shadow: inset 0 3px 6px rgba(0, 0, 0, .45); }
.pt-num::placeholder { color: #6f7b84; font-weight: 600; font-size: 20px; }
.pt-num--coef { width: 140px; }
.pt-num--exp { width: 96px; }
.pt-num::-webkit-outer-spin-button, .pt-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pt-num { -moz-appearance: textfield; appearance: textfield; }
.pt-times { font-size: 26px; font-weight: 800; color: var(--tlg-text, #172c38); }
.pt-step { width: 56px; height: 56px; border-radius: 50%; font-size: 22px; font-weight: 900; line-height: 1; display: grid; place-items: center; }
.pt-tip { margin: 6px 0 0; font-size: 16px; color: var(--tlg-text-muted, #4b5d68); }
.pt :focus-visible { outline: 3px solid #b16a08; outline-offset: 2px; }
.pt button:disabled, .pt input:disabled { cursor: default; }
.pt.is-locked .pt-pick:not([aria-pressed="true"]) { opacity: .6; }
.pt.is-locked .pt-step { opacity: .55; }
html[data-theme="dark"] .pt-pick, html[data-theme="dark"] .pt-step { background: linear-gradient(#3a3320, #2a2516); color: #fbf3dc; border-color: #c9963a; box-shadow: 0 3px 0 #000; }
html[data-theme="dark"] .pt-pick[aria-pressed="true"] { background: linear-gradient(#5a4a1a, #3d3210); border-color: #ffd76a; box-shadow: 0 0 0 3px #ffd76a inset; }
html[data-theme="dark"] .pt-pick[aria-pressed="true"]::after { color: #1e2440; background: #ffd76a; }

.pt-msg { margin: 0; min-height: 1.2em; font-size: 16px; font-weight: 700; color: var(--tlg-danger, #b42318); }
html[data-theme="dark"] .pt-msg { color: #ffb4a8; }
.pt-about { font-size: 16px; line-height: 1.4; }
.pt-about summary { cursor: pointer; font-weight: 700; }
.pt-about p { margin: 4px 0 0; }

/* the lobby */
.pt-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.pt-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; }
.pt-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pt-wall { fill: url(#pt-g-wall); }
html[data-theme="dark"] .pt-wall { fill: url(#pt-g-wall-d); }

.pt-t { font-family: var(--tlg-font-body, system-ui, sans-serif); }
.pt-t-head { font-size: 19px; font-weight: 900; letter-spacing: .1em; fill: #f0d27e; }
.pt-t-row { font-size: 18px; font-weight: 800; fill: #d7dfe5; font-variant-numeric: tabular-nums; }
.pt-t-ground { fill: #ffd76a; }
.pt-t-dial { font-size: 18px; font-weight: 900; fill: #3a2a08; }
.pt-t-led { font-size: 18px; font-weight: 800; fill: #ffd76a; letter-spacing: .03em; }
.pt-t-plate { font-size: 18px; font-weight: 900; fill: #3a2a08; }
.pt-t-cap { font-size: 18px; font-weight: 800; fill: #ffffff; }
.pt-t-coin { font-size: 30px; font-weight: 900; fill: #3a434a; }
.pt-t-coin.pt-t-light { fill: #fff6b0; }
.pt-t-cap2 { font-size: 17.5px; font-weight: 700; fill: #d7eef5; }
.pt-t-k { font-size: 18px; font-weight: 900; letter-spacing: .06em; fill: #2f3d7a; }
.pt-t-entry { font-size: 24px; font-weight: 900; fill: #1e2440; font-variant-numeric: tabular-nums; }
.pt-t-eq { font-size: 19px; font-weight: 800; fill: #7a1d12; font-variant-numeric: tabular-nums; }
.pt-t-note { font-size: 18px; font-weight: 700; fill: #d7eef5; }
.pt-t-digit { font-size: 26px; font-weight: 900; fill: #1e2440; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }
.pt-t-stripidle { font-size: 18px; font-weight: 700; fill: #8b96a0; }
.pt-ring { fill: rgba(127, 214, 160, .18); stroke: #7fd6a0; stroke-width: 3; stroke-dasharray: 7 5; }

/* briefing example + start art text */
.pt-t-exh { font-size: 24px; font-weight: 800; fill: #f0d27e; }
.pt-t-exd { font-size: 34px; font-weight: 900; fill: #1e2440; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }
.pt-t-exs { font-size: 20px; font-weight: 800; fill: #d7eef5; }
.pt-t-exa { font-size: 28px; font-weight: 900; fill: #ffffff; }
.pt-t-start { font-size: 30px; font-weight: 900; fill: #f0d27e; }
.pt-example-svg { display: block; width: 100%; height: auto; max-height: 460px; }
.pt-start-svg { display: block; width: 100%; height: 100%; }

/* reveal badge (right column, under the entry plate) */
.pt-badge { position: absolute; left: 67.2%; right: 1.4%; top: 44.5%; max-height: 36%; overflow: hidden; padding: 6px 10px; border-radius: 10px; font-size: 16px; font-weight: 700; line-height: 1.3; pointer-events: none;
  background: rgba(255, 255, 255, .97); color: #10202c; border: 3px solid #2f3d7a; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); animation: pt-pop .25s ease-out; }
.pt-badge.is-ok { border-color: #1f7a45; }
.pt-badge.is-bad { border-color: #b42318; }
.pt-badge.is-ride { border-color: #c9963a; }
@keyframes pt-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) { .pt-badge { animation: none; } .pt-pick:active:not(:disabled), .pt-step:active:not(:disabled) { transform: none; } }
@media (max-width: 1100px) { .pt { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .pt { position: static; grid-template-columns: 1fr; }
  .pt-panel { overflow: visible; }
  .pt-view { display: block; order: -1; }
  .pt-scene { width: 100% !important; }
  .pt-badge { left: 2%; right: 2%; top: auto; bottom: 2%; max-height: 45%; }
}
