/* Organelle Repair Shop: the work-order panel + parts drawer (left) and the repair bench scene (right) inside the
   practice shell's stage. The scene is an SVG (viewBox 720 × 600) drawn at about 1:1 at 1366×768, so 16-unit text
   renders at 16 px. */
.ors { position: absolute; inset: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
.ors-panel { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 10px 12px; border-radius: var(--tlg-radius-lg);
  border: var(--tlg-border-width) solid var(--tlg-border); background: var(--tlg-surface); }
.ors-k { margin: 0; font-size: 16px; font-weight: var(--tlg-weight-bold); text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps); color: var(--ps-accent); }
html[data-theme="dark"] .ors-k { color: var(--tlg-text-muted); }
.ors-q { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.ors-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ors-step { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; padding: 6px 8px; border-radius: var(--tlg-radius-sm); background: var(--tlg-surface-2);
  font-size: 16px; line-height: 1.3; border: 2px solid transparent; }
.ors-step-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ps-accent); color: #fff; font-weight: 800; }
.ors-step.is-done { border-color: #2e8b57; }
.ors-step.is-done .ors-step-n { background: #2e8b57; }
.ors-sub { color: var(--tlg-text-muted); font-size: 16px; }

/* parts drawer */
.ors-drawer { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: var(--tlg-radius-sm);
  background: repeating-linear-gradient(0deg, #b98a57 0 2px, #c99a66 2px 72px); border: 2px solid #7d5532; }
html[data-theme="dark"] .ors-drawer { background: repeating-linear-gradient(0deg, #5e432a 0 2px, #6b4d31 2px 72px); border-color: #3e2a17; }
.ors-cubby { min-height: 64px; border-radius: 8px; background: rgba(60, 35, 10, .22); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .25); display: grid; }
.ors-tok { all: unset; box-sizing: border-box; display: grid; grid-template-rows: 34px auto; justify-items: center; align-content: center; gap: 2px; min-height: 64px; width: 100%; padding: 4px 4px 5px;
  border-radius: 8px; background: #fffaf2; color: #1d2433; border: 2px solid #c9b79c; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); cursor: grab; font-size: 16px; line-height: 1.1; font-weight: 700; text-align: center; }
.ors-tok:hover { border-color: var(--ps-accent); }
.ors-tok:focus-visible { outline: var(--tlg-focus-width) solid var(--tlg-focus); outline-offset: 2px; }
.ors-tok.is-picked { border-color: var(--ps-accent); box-shadow: 0 0 0 3px rgba(154, 59, 38, .35), 0 6px 12px rgba(0, 0, 0, .3); transform: translateY(-2px); }
.ors-tok.is-disabled { cursor: default; }
.ors-tok .ors-icon { width: 46px; height: 34px; pointer-events: none; overflow: visible; }
.ors-tok-t { min-width: 0; overflow-wrap: anywhere; }
.ors-tok.is-wrongpart { border-color: #c0392b; background: #fff1ef; }
.ors-tok.is-flying { transition: none; pointer-events: none; }
html .pdz-ghost.ors-tok { width: 140px !important; }

/* the bench scene */
.ors-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.ors-scene { position: relative; width: 720px; height: 600px; border-radius: var(--tlg-radius-lg); overflow: hidden; border: var(--tlg-border-width) solid var(--tlg-border);
  user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.ors-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ors-wallbg { fill: url(#ors-wall-l); }
html[data-theme="dark"] .ors-wallbg { fill: url(#ors-wall-d); }
.ors-pegdot { fill: rgba(120, 90, 50, .22); }
html[data-theme="dark"] .ors-pegdot { fill: rgba(0, 0, 0, .35); }
.ors-tools { stroke: #6b5a45; fill: #6b5a45; }
html[data-theme="dark"] .ors-benchtop { fill: url(#ors-bench-d); }
.ors-card { fill: rgba(255, 252, 245, .93); stroke: #8d6b48; stroke-width: 1.5; }
.ors-sz { font-size: 16px; font-weight: 600; fill: #1d2433; }
.ors-sz.is-me { font-weight: 800; text-decoration: underline; }
.ors-lbl { font-size: 16.5px; font-weight: 800; fill: #152033; paint-order: stroke; stroke: rgba(255, 255, 255, .92); stroke-width: 5px; stroke-linejoin: round; }
.ors-lbl.is-q { font-size: 20px; }
.ors-lbl.is-named { font-size: 16.5px; }
.ors-lead { fill: none; stroke: #152033; stroke-width: 1.4; opacity: .6; }
.ors-lead.is-point { stroke: #c0392b; stroke-width: 3; opacity: 1; stroke-dasharray: 6 4; }
.ors-ldot { fill: #152033; opacity: .7; }
.ors-pdot { fill: #c0392b; stroke: #fff; stroke-width: 2.5; }
.ors-qbg { fill: #fff3d6; stroke: #c0392b; stroke-width: 2.5; }
.ors-fxlbl { font-size: 18px; font-weight: 800; fill: #7a4b00; paint-order: stroke; stroke: #fff8d8; stroke-width: 4px; }

/* hotspots */
.ors-hot { cursor: pointer; outline: none; }
.ors-hit { fill: transparent; stroke: transparent; }
.ors-hit * { pointer-events: all; }
.ors-hit path[fill="none"] { pointer-events: stroke; }
.ors-halo { fill: none; stroke: #ffb703; stroke-width: 4; stroke-dasharray: 8 6; opacity: 0; pointer-events: none; }
.ors-halo * { fill: none; }
.ors-hot:hover .ors-halo, .ors-hot:focus-visible .ors-halo { opacity: 1; }
.ors-hot:focus-visible .ors-halo { stroke: #1d63d6; stroke-dasharray: none; stroke-width: 4; }
.ors-hot.is-dx .ors-halo { opacity: 1; stroke: #e2572b; stroke-dasharray: none; stroke-width: 5; }
.ors-hot.is-wrong .ors-halo { opacity: 1; stroke: #c0392b; stroke-dasharray: 3 5; }
.ors-hot.is-answer .ors-halo { opacity: 1; stroke: #2e8b57; stroke-dasharray: none; stroke-width: 5; }
.ors-hot.is-glow .ors-halo, .ors-hot.is-fixed .ors-halo { opacity: 1; stroke: #36c26a; stroke-dasharray: none; stroke-width: 5; }
.ors-part.is-broken > .ors-art { animation: ors-sputter 1.6s steps(1, end) infinite; }
.ors-part.is-sick > .ors-art { animation: ors-sputter 0.9s steps(1, end) infinite; }
@keyframes ors-sputter { 0% { opacity: .5; } 12% { opacity: .8; } 20% { opacity: .42; } 34% { opacity: .62; } 60% { opacity: .48; } 72% { opacity: .75; } }
.is-locked .ors-hot { cursor: default; }

/* repair bay, tooltip, thought bubble */
.ors-bay { position: absolute; left: 39.6%; top: 1.2%; width: 20.8%; height: 17.6%; border-radius: 18px; display: grid; grid-template-rows: auto 1fr; justify-items: center; z-index: 2;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .97), rgba(236, 242, 247, .94) 65%, rgba(196, 208, 220, .94)); border: 4px dashed #9a3b26; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.ors-bay-t { font-size: 16px; font-weight: 800; color: #6b2a1a; line-height: 1; padding-top: 4px; pointer-events: none; }
.ors-bay.is-over, html.pdz-armed .ors-bay { border-style: solid; box-shadow: 0 0 0 5px rgba(255, 183, 3, .55), 0 4px 10px rgba(0, 0, 0, .25); }
.ors-bay.is-full { border-style: solid; border-color: #2e8b57; }
.ors-bay-slot { display: grid; place-items: center; width: 100%; height: 100%; }
.ors-bay-slot .ors-tok { width: auto; min-height: 0; grid-template-rows: 1fr; padding: 2px 10px; border-radius: 12px; }
.ors-bay-slot .ors-tok .ors-icon { width: 48px; height: 40px; }
.ors-bay-slot .ors-tok-t { display: none; }
.ors-tip { z-index: 5; position: absolute; transform: translate(-50%, -100%); padding: 3px 10px; border-radius: 8px; background: #152033; color: #fff; font-size: 16px; font-weight: 700;
  white-space: nowrap; pointer-events: none; z-index: 3; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.ors-labels.is-gone { opacity: 0; transition: opacity .4s; }
.ors-bubble { position: absolute; left: 50%; top: 20.5%; transform: translateX(-50%); max-width: 60%; padding: 8px 14px; border-radius: 18px; background: #fff; color: #1d2433;
  border: 2.5px solid #6b7785; font-size: 17px; font-weight: 700; line-height: 1.25; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); animation: ors-pop .25s ease-out; z-index: 2; }
@keyframes ors-pop { from { transform: translateX(-50%) scale(.85); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

/* name-it options */
.ors-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ors-opts--type { grid-template-columns: minmax(0, 1fr); }
.ors-opt { display: grid; grid-template-rows: 36px auto; justify-items: center; align-content: center; gap: 4px; min-height: 76px; padding: 6px 6px; border-radius: var(--tlg-radius-sm); font-size: 16px; font-weight: 700;
  text-align: center; line-height: 1.15; background: var(--tlg-surface-2); color: var(--tlg-text); border: 2px solid var(--tlg-border-strong); cursor: pointer; min-width: 0; }
.ors-opts--type .ors-opt { grid-template-rows: none; grid-template-columns: 80px 1fr; justify-items: start; text-align: left; align-items: center; min-height: 76px; }
.ors-opt .ors-icon { width: 48px; height: 36px; overflow: visible; }
.ors-opt-t { min-width: 0; overflow-wrap: anywhere; }
.ors-opt .ors-thumb { width: 80px; height: 64px; }
.ors-opt[aria-checked="true"] { border-color: var(--ps-accent); box-shadow: 0 0 0 3px rgba(154, 59, 38, .3); background: #fff6ee; color: #1d2433; }
html[data-theme="dark"] .ors-opt[aria-checked="true"] { background: #4a2a20; color: #fff; }
.ors-opt.is-ok { border-color: #2e8b57; box-shadow: 0 0 0 3px rgba(46, 139, 87, .35); }
.ors-opt.is-ok .ors-opt-t::after { content: " ✓"; color: #2e8b57; }
.ors-opt.is-bad { border-color: #c0392b; }
.ors-opt.is-bad .ors-opt-t::after { content: " ✗"; color: #c0392b; }
.ors-opt:disabled { cursor: default; opacity: 1; }
.ors-msg { margin: 0; min-height: 1.2em; font-size: 16px; font-weight: 700; color: var(--tlg-danger, #b42318); }
html[data-theme="dark"] .ors-msg { color: #ffb4a8; }

.ors-svg.ors-example-svg { position: static; display: block; width: 100%; height: auto; max-height: 460px; }
.ors-ex-halo { fill: none; stroke: #e2572b; stroke-width: 5; }
.ors-ex-bay { fill: rgba(255, 255, 255, .95); stroke: #2e8b57; stroke-width: 4; }
.ors-ex-bayt { font-size: 18px; font-weight: 800; fill: #6b2a1a; }
.ors-lbl.ors-ex-lbl { font-size: 22px; }
.ors-ex-arrow { fill: none; stroke: #9a3b26; stroke-width: 4; stroke-dasharray: 8 6; marker-end: none; }
.ors-svg.ors-start-svg { position: static; display: block; width: 100%; height: 100%; pointer-events: none; border-radius: inherit; }

@media (prefers-reduced-motion: reduce) { .ors-part.is-broken > .ors-art, .ors-part.is-sick > .ors-art { animation: none; opacity: .55; } .ors-labels.is-gone { opacity: 0; transition: opacity .4s; }
.ors-bubble { animation: none; } }
@media (max-width: 1100px) { .ors { grid-template-columns: 260px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .ors { position: static; grid-template-columns: 1fr; }
  .ors-view { display: block; }
}
