/* TERESA — THE TABLE (js/dialogue-scenes/scene-teresa-table.js). Room 304
   under the ceiling light: the round table, the placemat map, the pieces.
   The map sits above the strip; the readout beside it; the doors on top. */
#tzTable {
  position: fixed; inset: 0; z-index: 1000040; overflow: hidden; user-select: none;
  background: radial-gradient(ellipse 70% 60% at 48% 40%, #2a221c 0%, #15110e 70%, #0b0908 100%);
  font-family: 'Courier Prime', 'Courier New', Courier, monospace; color: #EBE6D8;
  opacity: 0; transition: opacity .6s ease;
}
#tzTable.tzt-in { opacity: 1; }
/* the frame keeps the stand's 1517 × 1037; it fits above the strip */
#tzTable .tzt-frame {
  position: absolute; left: 39%; top: calc(50% - 30px); transform: translate(-50%, -50%);
  width: min(62vw, calc((100vh - 330px) * 1517 / 1037)); aspect-ratio: 1517 / 1037;
  overflow: hidden; border-radius: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
#tzTable .tzt-full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#tzTable .tzt-map { transform-origin: 0 0; }
#tzTable .tzt-piece { position: absolute; transition: opacity .4s ease, left .6s cubic-bezier(.3,.7,.2,1), top .6s cubic-bezier(.3,.7,.2,1); filter: drop-shadow(2px 4px 3px rgba(0, 0, 0, 0.5)); }
#tzTable .tzt-piece img { display: block; width: 100%; height: auto; }
/* his and mine: the same steel, marked */
#tzTable .tzt-me::after, #tzTable .tzt-him::after, #tzTable .tzt-fore::after {
  content: ''; position: absolute; inset: -18%; border-radius: 50%; pointer-events: none;
}
#tzTable .tzt-me::after { box-shadow: 0 0 0 2px rgba(224, 196, 138, 0.95), 0 0 12px rgba(224, 196, 138, 0.6); }
#tzTable .tzt-him::after { box-shadow: 0 0 0 2px rgba(150, 20, 20, 0.95), 0 0 10px rgba(150, 20, 20, 0.5); }
#tzTable .tzt-fore::after { inset: -10% -40%; border-radius: 40%; box-shadow: 0 0 0 1px rgba(235, 230, 216, 0.6); }
#tzTable .tzt-watch::before {              /* he watches the corner you came out of */
  content: ''; position: absolute; left: 50%; top: 50%; width: 220%; height: 2px; transform-origin: 0 50%;
  transform: rotate(80deg); background: linear-gradient(90deg, rgba(150, 20, 20, 0.9), transparent);
}
#tzTable .tzt-shake { animation: tztShake .36s ease; }
@keyframes tztShake { 0%, 100% { margin-left: 0; } 25% { margin-left: -4px; } 60% { margin-left: 3px; } }
#tzTable .tzt-claim {
  position: absolute; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  border: 2px dashed rgba(120, 78, 20, 0.85); background: rgba(196, 168, 122, 0.2);
}
#tzTable .tzt-claim span { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); font-size: 10px; letter-spacing: 2px; color: #3a2a12; white-space: nowrap; }
#tzTable .tzt-line { position: absolute; height: 2px; transform-origin: 0 50%; background: rgba(139, 0, 0, 0.85); animation: tztLine .7s ease forwards; pointer-events: none; }
#tzTable .tzt-line.perfect { height: 3px; background: rgba(224, 196, 138, 0.95); }
@keyframes tztLine { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
#tzTable .tzt-tag {
  position: absolute; transform: translateY(-50%); font-size: 11px; letter-spacing: 1px; line-height: 1.5; color: #2a1d10;
  background: rgba(235, 230, 216, 0.92); border: 1px solid #8B0000; padding: 4px 7px; white-space: nowrap;
}
/* her hands at the map's edge */
#tzTable .tzt-hands { position: absolute; left: 50%; bottom: -40%; width: 34vw; transform: translateX(-50%); transition: bottom .5s ease, left .5s ease; pointer-events: none; opacity: .92; }
#tzTable .tzt-hands img { width: 100%; display: block; }
#tzTable .tzt-hands.tzt-h-left { left: 26%; bottom: 8%; }
#tzTable .tzt-hands.tzt-h-right { left: 58%; bottom: 8%; }
/* the readout */
#tzTable .tzt-side { position: absolute; right: 2%; top: 12%; width: min(300px, 24vw); background: rgba(16, 13, 11, 0.88); border: 1px solid rgba(142, 127, 127, 0.4); padding: 12px 14px; }
#tzTable .tzt-stamp { font-size: 10px; letter-spacing: 3px; color: #c4a87a; border: 1px solid rgba(196, 168, 122, 0.5); padding: 3px 8px; display: inline-block; margin-bottom: 10px; }
#tzTable .tzt-row { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed rgba(142, 127, 127, 0.4); padding: 6px 0; font-size: 12px; letter-spacing: 1px; }
#tzTable .tzt-row span { color: #b9ad9a; }
#tzTable .tzt-row b { font-weight: normal; text-align: right; }
#tzTable .tzt-row.ok b { color: #8fbf8a; }
#tzTable .tzt-row.bad b { color: #e07a6a; }
#tzTable .tzt-fear { margin-top: 16px; }
#tzTable .tzt-fear-k { font-size: 11px; letter-spacing: 2px; color: #b9ad9a; margin-bottom: 6px; }
#tzTable .tzt-fear-bar { position: relative; height: 10px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(142, 127, 127, 0.5); }
#tzTable .tzt-fear-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #6b8e3d, #8B0000); transition: width .6s ease; }
#tzTable .tzt-fear-break { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #EBE6D8; }
/* the needle and its two ends, as on the fight screen (combat-style.css's threat line) */
#tzTable .tzt-fear-needle { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1px; background: #EBE6D8; box-shadow: 0 0 4px rgba(0, 0, 0, 0.8); transition: left .6s ease; }
#tzTable .tzt-fear-ends { display: flex; justify-content: space-between; margin-top: 6px; }
#tzTable .tzt-fear-end { font-size: 9px; letter-spacing: 1.5px; padding: 1px 5px; border: 1px dashed; }
#tzTable .tzt-fear-end.brk { color: #8fbf8a; border-color: #4a7c59; }
#tzTable .tzt-fear-end.ovw { color: #e07a6a; border-color: #8B0000; }
#tzTable .tzt-fear-val { font-size: 18px; margin-top: 6px; }
#tzTable .tzt-fear-note { font-size: 12px; color: #c4a87a; margin-top: 2px; font-style: italic; }
/* the doors: her order in his words, one lit */
#tzTable .tzt-bar { position: absolute; left: 0; right: 0; top: 1.2%; text-align: center; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
#tzTable .tzt-bar.tzt-bar-in { opacity: 1; pointer-events: auto; }
#tzTable .tzt-prompt { font-size: 16px; margin-bottom: 8px; text-shadow: 0 1px 3px #000; }
#tzTable .tzt-doors { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 0 16px; }
#tzTable .tzt-door { font-family: inherit; font-size: 13px; letter-spacing: 2px; color: #EBE6D8; background: #3A3238; border: 1px solid #8E7F7F; padding: 7px 16px; cursor: pointer; }
#tzTable .tzt-door[disabled] { opacity: .35; cursor: default; }
#tzTable .tzt-door.tzt-lit { border-color: #c4a87a; animation: tztCall 1.4s ease-in-out infinite; }
@keyframes tztCall { 0%, 100% { box-shadow: 0 0 0 0 rgba(196, 168, 122, 0); } 50% { box-shadow: 0 0 14px 3px rgba(196, 168, 122, 0.5); } }
