/* Psychological stress lesson. All rules scoped under .pss-* */
.pss-sc { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pss-note { font-size: 13px; color: var(--dim); text-align: center; max-width: 320px; }

/* ---------- the countdown ---------- */
.pss-game { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 14px 12px; border-radius: 22px;
  background: linear-gradient(180deg, var(--raised), var(--surface)); border: 2px solid var(--line-strong); }
.pss-hud { width: 100%; display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); }
.pss-hud b { color: var(--gold); font-family: var(--mono); font-size: 15px; margin-left: 4px; }
.pss-num { font: 700 56px/1 var(--mono); color: var(--text); letter-spacing: -1px; }
.pss-num.pss-ok { animation: pssPop .25s ease-out; }
@keyframes pssPop { 40% { transform: scale(1.08); color: var(--mint); } }
.pss-minus { font: 600 15px var(--sans); color: var(--violet-bright); }
.pss-clock { position: relative; width: 100%; height: 22px; border-radius: 11px; background: #0B1020; border: 1.5px solid var(--line); overflow: hidden; }
.pss-clock i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, #D85555, var(--gold)); }
.pss-clock span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 13px var(--mono); color: #0A0E1A; mix-blend-mode: normal; }
.pss-msg { min-height: 18px; font-size: 14px; font-weight: 700; color: #FF8A8A; text-align: center; }
.pss-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pss-o { min-height: 64px; border-radius: 16px; border: 2px solid var(--line-strong); background: var(--raised); color: var(--text); font: 700 22px var(--mono);
  box-shadow: 0 4px 0 rgba(0,0,0,.35); cursor: pointer; touch-action: manipulation; }
.pss-o:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.pss-o:disabled { opacity: .45; }

/* ---------- the scale ---------- */
.pss-scalew { width: 100%; max-width: 340px; }
.pss-scale { width: 100%; display: block; overflow: visible; }
.pss-post { fill: var(--line-strong); }
.pss-foot { fill: var(--line-strong); }
.pss-beam rect { fill: var(--violet); }
.pss-pin { fill: var(--gold); }
.pss-str { stroke: var(--line-strong); stroke-width: 1.5; fill: none; }
.pss-dish { fill: var(--violet-deep); stroke: var(--violet-bright); stroke-width: 1.5; }
.pss-pan-l .pss-blk { fill: rgba(216, 85, 85, .85); }
.pss-pan-r .pss-blk { fill: rgba(63, 214, 154, .8); }
.pss-bt { font: 700 13px var(--sans); fill: #0A0E1A; text-anchor: middle; }
.pss-cap { font: 700 13px var(--sans); fill: var(--dim); text-anchor: middle; }
.pss-res { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pss-r { font-size: 13px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--line); color: var(--dim); }
.pss-r.on { border-color: var(--gold); color: var(--text); }

/* ---------- the film ---------- */
.pss-films { width: 100%; max-width: 360px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pss-film { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); }
.pss-frame { position: relative; width: 100%; }
.pss-frame svg { width: 100%; display: block; }
.pss-frame b { position: absolute; left: 6px; top: 12px; font: 800 14px var(--sans); color: var(--gold); }
.pss-fr { fill: #0B1020; stroke: var(--line-strong); stroke-width: 1.5; }
.pss-hole { fill: var(--line-strong); }
.pss-play { fill: var(--violet-bright); }
.pss-line { font-size: 13px; line-height: 1.2; text-align: center; min-height: 48px; color: var(--text); }
.pss-meter { position: relative; width: 26px; height: 70px; border-radius: 8px; background: #0B1020; border: 1.5px solid var(--line); overflow: hidden; }
.pss-meter i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, #5FB8FF, #A9DCFF); }
.pss-film.pss-top { border-color: #5FB8FF; }

/* ---------- two hearts ---------- */
.pss-two { width: 100%; max-width: 360px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pss-p { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); }
.pss-p > b { font: 700 18px var(--serif); }
.pss-hr { display: flex; align-items: center; gap: 6px; }
.pss-hr svg { width: 30px; height: 27px; }
.pss-hr path { fill: #FF6B6B; animation: pssBeat .55s ease-in-out 6; transform-origin: 20px 20px; }
@keyframes pssBeat { 50% { transform: scale(1.15); } }
.pss-hr span { font: 700 20px var(--mono); color: #FF8A8A; }
.pss-think { font-size: 13px; text-align: center; color: var(--text); min-height: 32px; line-height: 1.2; }
.pss-vessel { width: 100%; max-width: 140px; overflow: visible; }
.pss-wall { stroke: #C0587A; stroke-width: 5; stroke-linecap: round; transition: transform .8s ease; }
.pss-w1 { transform: translateY(4px); } .pss-w2 { transform: translateY(-4px); }
.pss-open .pss-w1 { transform: translateY(-3px); }
.pss-open .pss-w2 { transform: translateY(3px); }
.pss-tight .pss-w1 { transform: translateY(9px); }
.pss-tight .pss-w2 { transform: translateY(-9px); }
.pss-cell { fill: #FF6B6B; animation: pssFlow 1.2s linear 3; }
@keyframes pssFlow { from { transform: translateX(-8px); opacity: .2; } 50% { opacity: 1; } to { transform: translateX(14px); opacity: .2; } }
.pss-open { border-color: var(--mint); }
.pss-tight { border-color: #FF8A8A; }

@media (max-height: 700px) {
  .pss-num { font-size: 46px; }
  .pss-game { padding: 10px 12px 8px; gap: 6px; }
  .pss-o { min-height: 56px; }
  .pss-meter { height: 52px; }
  .pss-line { min-height: 32px; }
}
