/* Osmosis Spa: the spa ticket + answer panel and the spa scene inside the practice shell's stage. */
.os { position: absolute; inset: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 10px; padding: 8px 12px; }
.os-panel { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 2px; }
.os-ticket { padding: 6px 12px 8px; border-radius: var(--tlg-radius-lg); border: 2px dashed #b9a06a; background: #fffaf0; color: #2b2418; }
.os-ticket-k { margin: 0 0 2px; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps); color: #14706b; }
.os-given { margin: 0; display: grid; gap: 2px; }
.os-given div { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; font-size: 16px; line-height: 1.3; }
.os-given dt { font-weight: 700; color: #5c4f35; white-space: nowrap; }
.os-given dd { margin: 0; text-align: right; font-weight: 700; }
.os-eq { margin: 4px 0 0; font-size: 16px; font-weight: 700; color: #14706b; }
html[data-theme="dark"] .os-ticket { background: #2a2618; color: #f3ead2; border-color: #8a7748; }
html[data-theme="dark"] .os-given dt { color: #d9c9a3; }
html[data-theme="dark"] .os-ticket-k, html[data-theme="dark"] .os-eq { color: #7fd0c9; }

.os-ctl { display: flex; flex-direction: column; gap: 8px; }
.os-row-k { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.os-chips { display: grid; grid-template-columns: 1fr; gap: 6px; }
.os-chips--3 { grid-template-columns: repeat(3, 1fr); }
.os-chips--result { grid-template-columns: 1fr 1fr; gap: 8px; }
.os-col { display: grid; gap: 6px; align-content: start; }
.os-col-k { margin: 0; font-size: 16px; font-weight: 700; color: var(--tlg-text-muted); text-align: center; }
.os-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 44px; padding: 4px 6px; font-size: 16px; line-height: 1.15; border-radius: var(--tlg-radius-sm); white-space: normal; text-align: center; }
.os-chip-t { font-weight: 700; }
.os-chip-s { font-size: 16px; font-weight: 400; opacity: .85; }
.os-chip:disabled { cursor: default; }
.os-msg { margin: 0; min-height: 1.2em; font-size: 16px; font-weight: 700; color: var(--tlg-danger, #b42318); }
html[data-theme="dark"] .os-msg { color: #ffb4a8; }
.os-tip { margin: 0; font-size: 16px; color: var(--tlg-text-muted); }
.os-panel .pss-row { padding: 6px 10px; }
.os-panel .pss-note { font-size: 16px; }
.os-num .pn-key { min-height: 44px; }
.os-num .pn-input { font-size: 26px; padding: 2px 0; }
.os-num .pn { gap: 6px; }

.os-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.os-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; }
.os-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.os-wall { fill: url(#os-tiles); }
html[data-theme="dark"] .os-wall { fill: url(#os-tiles-dark); }
.os-scene.has-graph .os-shelf { display: none; }

/* the membrane close-up (scene units: x 392–712, y 14–300 of 720 × 620) */
.os-win { position: absolute; left: 54.4%; top: 2.3%; width: 44.5%; height: 46.2%; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
  background: #ffffff; border: 3px solid #18424a; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); color: #10202c; }
.os-win-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; padding: 1px 8px; background: #18424a; color: #ffffff; font-size: 16px; line-height: 1.35; }
.os-win-head span:last-child { text-align: right; }
.os-win-head b { font-size: 16px; white-space: nowrap; }
.os-win-head span { font-size: 16px; white-space: nowrap; }
.os-win-canvas { position: relative; flex: 1; min-height: 0; }
.os-win-canvas .ppe-canvas { position: absolute; inset: 0; }
.os-win-count { display: flex; justify-content: space-between; gap: 6px; padding: 2px 8px; font-size: 16px; line-height: 1.3; background: #eef6f7; border-top: 1px solid #c5d9dc; min-height: 25px; }
.os-wc { white-space: nowrap; }
.os-wc-net { font-weight: 700; color: #0f5f5b; }
.os-wc-wait { color: #3b4a56; }
.os-win-legend { display: flex; justify-content: space-between; gap: 6px; padding: 1px 8px 2px; font-size: 16px; line-height: 1.3; background: #eef6f7; }
.os-win-legend span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.os-lg { width: 14px; height: 14px; flex: none; }

.os-plaque { position: absolute; left: 2.5%; top: 41.5%; padding: 3px 10px; border-radius: 8px; background: #fbf3df; color: #3a2e14; border: 2px solid #c8a95b; font-size: 16px; line-height: 1.3; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); pointer-events: none; max-width: 52%; }
.os-badge { position: absolute; left: 2.5%; top: 47.2%; max-width: 50%; padding: 5px 12px; border-radius: 10px; font-size: 16px; font-weight: 700; line-height: 1.25; pointer-events: none;
  background: rgba(255, 255, 255, .94); color: #10202c; border: 2px solid #18424a; box-shadow: 0 3px 8px rgba(0, 0, 0, .2); animation: os-pop .3s ease-out; }
.os-badge--in { border-color: #1d6fa3; }
.os-badge--out { border-color: #b4532a; }
.os-graph { position: absolute; left: 1.5%; top: 2%; width: 51.5%; }
.os-graph-svg { display: block; width: 100%; height: auto; }
.os-avatar { width: 100%; height: 100%; display: block; }
.os-example-svg { display: block; width: 100%; height: auto; max-height: 460px; }

/* steam drifting up from the tub */
.os-steam ellipse { transform-box: fill-box; transform-origin: center; animation: os-steam 6s ease-in-out infinite; opacity: .0; }
.os-steam .os-steam-2 { animation-delay: -2s; }
.os-steam .os-steam-3 { animation-delay: -4s; }
@keyframes os-steam { 0% { transform: translateY(10px) scale(.7); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-70px) scale(1.25); opacity: 0; } }
@keyframes os-pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .os-steam ellipse { animation: none; opacity: .5; } .os-badge { animation: none; } }

@media (max-width: 1100px) { .os { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .os { position: static; grid-template-columns: 1fr; }
  .os-view { display: block; }
  .os-scene { width: 100% !important; height: auto !important; }
}
