/* Protein Origami: the work order + answer panel and the folding-studio scene inside the practice shell's stage. */
.po { position: absolute; inset: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; padding: 8px 12px; }
.po-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 2px; }
.po-ticket { padding: 8px 14px 10px; border-radius: var(--tlg-radius-lg); border: 2px dashed #c79a6b; background: #fff9f0; color: #2b2118; }
.po-ticket-k { margin: 0 0 4px; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps); color: #7a2f4e; }
.po-given { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 16px; line-height: 1.35; font-weight: 600; }
.po-note { margin: 8px 0 0; font-size: 16px; line-height: 1.3; color: #5b4630; font-style: italic; }
html[data-theme="dark"] .po-ticket { background: #2c2228; color: #f5e8ee; border-color: #9b6a7f; }
html[data-theme="dark"] .po-ticket-k { color: #f2a9c6; }
html[data-theme="dark"] .po-note { color: #e3cbb4; }

.po-field-k { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.po-chips { display: grid; grid-template-columns: 1fr; gap: 8px; }
.po-chips--3 { grid-template-columns: repeat(3, 1fr); }
.po-chips--2 { grid-template-columns: repeat(2, 1fr); }
.po-chip { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 6px 12px; font-size: 16px; line-height: 1.25;
  border-radius: var(--tlg-radius-md, 12px); white-space: normal; text-align: center; }
.po-chips:not(.po-chips--3):not(.po-chips--2) .po-chip { justify-content: flex-start; text-align: left; }
.po-chips--3 .po-chip, .po-chips--2 .po-chip { flex-direction: column; gap: 2px; padding: 6px 4px; }
.po-chip-ico { width: 28px; height: 28px; flex: none; fill: currentColor; opacity: .85; }
.po-chip:disabled { cursor: default; }
.po-chip:focus-visible { outline: 3px solid #b16a08; outline-offset: 2px; }
.po-msg { margin: 0; min-height: 1.2em; font-size: 16px; font-weight: 700; color: var(--tlg-danger, #b42318); }
html[data-theme="dark"] .po-msg { color: #ffb4a8; }

.po-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.po-scene { position: relative; width: 100%; aspect-ratio: 720 / 620; 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: none; }
.po-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; font-family: var(--tlg-font-body, system-ui, sans-serif); }
.po-svg text { fill: #2b2118; }
.po-wall { fill: url(#po-wall); }
html[data-theme="dark"] .po-wall { fill: url(#po-wall-dark); }
.po-piece.is-live { cursor: grab; }
.po-piece.is-live:active { cursor: grabbing; }

.po-tray rect, .po-legend rect, .po-gauge rect, .po-rbcbox rect { fill: #fffdf7; fill-opacity: .82; stroke: #8fae99; stroke-width: 2; }
.po-pill rect { fill: #ffffff; stroke: #5b4630; stroke-width: 2; }
.po-svg .po-pill text { fill: #241a14; }
.po-pill--ok rect { fill: #e3f6e8; stroke: #1f7a44; }
.po-svg .po-pill--ok text { fill: #145530; }
.po-pill--bad rect { fill: #fde7e4; stroke: #b42318; }
.po-svg .po-pill--bad text { fill: #8a1a10; }
.po-pill--warn rect { fill: #fff1d1; stroke: #a8650b; }
.po-svg .po-pill--warn text { fill: #6b3d00; }
.po-pill--note rect { fill: #7a2f4e; stroke: #4f1c32; }
.po-svg .po-pill--note text { fill: #ffffff; }
.po-pill--soft rect { fill: #fbf3df; stroke: #c8a95b; }

.po-example-svg { display: block; width: 100%; height: auto; max-height: 460px; }

@media (max-width: 1100px) { .po { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .po { position: static; grid-template-columns: 1fr; }
  .po-view { display: block; }
  .po-scene { width: 100% !important; touch-action: pan-y; }
}
.po-piece { touch-action: none; }

/* A small scene (a phone): the SVG labels would render under 16 px, so they are hidden and listed under the scene. */
.po-caps { display: none; }
.po--small .po-svg text, .po--small .po-svg .po-pill { display: none; }
.po--small .po-view { flex-direction: column; align-items: stretch; }
.po--small .po-caps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.po-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"] .po-caps li { background: #2c2228; border-color: #9b6a7f; color: #f5e8ee; }
