/* Positions tuned for the match1125 room: coach line top-left under the pane label (timer is top-right, feedback bottom-right).
 * ai.yoga.org practice engine — student-side panels. Uses the dusk tokens when present
 * (--d-gold, --d-line, --d-soft, --d-muted); falls back to plain values. Restyle freely in the design build:
 * the engine only needs these ids: #setup-panel #setup-list #setup-fix #setup-skip #calib-panel #calib-bar
 * #calib-note #coach-line, plus the existing #seen-pill #hold-pill #hold-secs #overlay #cam. */
.e-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; width: min(92%, 380px); padding: 18px 18px 16px; border-radius: 16px; background: rgba(7, 31, 24, 0.9); border: 1px solid var(--d-line, rgba(240,205,136,0.35)); color: var(--d-soft, #efe7d6); box-shadow: 0 18px 50px rgba(0,0,0,0.35); }
.e-panel[hidden] { display: none; }
.e-panel h3 { margin: 2px 0 10px; font: 400 1.25rem/1.25 var(--d-serif, Georgia, serif); color: var(--d-cream, #f6efe1); }
.e-eyebrow { margin: 0; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--d-gold, #f0cd88); }
.e-check { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.e-check li { position: relative; padding-left: 26px; font-size: 0.92rem; color: var(--d-muted, #b9c2b5); }
.e-check li::before { content: ""; position: absolute; left: 2px; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,170,90,0.85); }
.e-check li[data-ok="1"] { color: var(--d-soft, #efe7d6); }
.e-check li[data-ok="1"]::before { border-color: var(--d-gold, #f0cd88); background: var(--d-gold, #f0cd88); box-shadow: inset 0 0 0 3px rgba(7,31,24,0.9); }
.e-fix { margin: 6px 0 0; min-height: 1.3em; font-size: 0.95rem; color: var(--d-gold, #f0cd88); }
.e-small { margin: 8px 0 0; font-size: 0.78rem; color: var(--d-muted, #b9c2b5); }
.e-skip { margin-top: 12px; }
.e-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; }
.e-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--d-gold, #f0cd88); transition: width 0.2s linear; }
.e-coach { position: absolute; left: 12px; right: auto; top: 56px; bottom: auto; max-width: calc(100% - 130px); z-index: 3; margin: 0; padding: 9px 12px; border-radius: 10px; background: rgba(7, 31, 24, 0.88); border: 1px solid rgba(240,205,136,0.55); font-size: 0.95rem; color: var(--d-cream, #f6efe1); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.e-coach[hidden], .e-coach[data-merged="1"] { display: none !important; }
.e-coach[data-kind="cant"] { border-color: rgba(185,194,181,0.6); color: var(--d-soft, #efe7d6); }
.e-coach .nv { font-style: normal; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--d-muted, #b9c2b5); border: 1px solid rgba(185,194,181,0.45); border-radius: 99px; padding: 1px 7px; }
.d-seen[data-state="cant"], #seen-pill[data-state="cant"] { border-color: rgba(185,194,181,0.7); color: var(--d-soft, #efe7d6); }
.panel-open .d-seen, .panel-open .e-coach, .panel-open .d-distance, .panel-open #seen-pill, .panel-open .distance-banner, .panel-open .breathe-pill, .panel-open #hold-pill { display: none !important; }
.e-panel, .e-coach { z-index: 6; }
/* Phones: panels sit at the BOTTOM of the student pane, sized to content, so the face (upper part of the
 * picture) and the "You" label (top-left) stay clear. Checks become short chips; every check stays visible. */
@media (max-width: 520px) {
  .e-panel { top: auto; bottom: 8px; transform: translateX(-50%); width: calc(100% - 16px); max-height: calc(100% - 52px); overflow: auto; padding: 8px 10px 9px; border-radius: 12px; }
  .e-panel h3 { font-size: 0.9rem; margin: 0 0 5px; line-height: 1.2; }
  .e-eyebrow { display: none; }
  .e-check { display: flex; flex-wrap: wrap; gap: 4px 5px; margin: 0 0 5px; }
  .e-check li { font-size: 0; padding: 2px 7px 2px 18px; line-height: 1; border-radius: 99px; border: 1px solid rgba(255,170,90,0.5); }
  .e-check li[data-ok="1"] { border-color: rgba(240,205,136,0.45); }
  .e-check li::after { content: attr(data-short); font-size: 0.72rem; line-height: 1.35; }
  .e-check li::before { width: 8px; height: 8px; left: 6px; top: 50%; transform: translateY(-50%); border-width: 1.5px; }
  .e-fix { font-size: 0.8rem; line-height: 1.3; margin: 0; min-height: 0; }
  .e-small { font-size: 0.68rem; margin-top: 4px; line-height: 1.3; }
  .e-skip { margin-top: 6px; padding: 4px 12px; min-height: 32px; font-size: 0.8rem; }
  .e-coach { top: 44px; font-size: 0.84rem; padding: 6px 9px; left: 8px; max-width: calc(100% - 84px); }
}
#seen-pill[data-state="cant"] svg { display: none; }
.e-check li[data-ok="?"]::before { border-color: rgba(185,194,181,0.7); }
.e-check li[data-ok="?"] { border-color: rgba(185,194,181,0.35); }
/* Small phones: the instruction is the headline. Only checks that still need fixing show; the fix line and
 * "Start anyway" share a row, so the panel stays a short strip at the bottom of the picture. */
@media (max-width: 400px) {
  .e-panel h3 { display: none; }
  #setup-panel .e-check li[data-ok="1"] { display: none; }
  #setup-panel:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  #setup-panel .e-check { flex: 0 0 100%; margin: 0; }
  #setup-panel .e-check:empty { display: none; }
  #setup-panel .e-fix { flex: 1 1 150px; }
  #setup-panel .e-skip { margin: 0; flex: 0 0 auto; }
  #setup-panel .e-skip[hidden] { display: none; }
}
/* All sizes: panels anchor to the bottom of the picture so the face (upper part) stays visible. */
.e-panel { top: auto; bottom: 14px; transform: translateX(-50%); max-height: calc(100% - 60px); overflow: auto; }
@media (max-width: 520px) { .e-panel { bottom: 8px; max-height: calc(100% - 52px); } }
/* Breath pacer (2026-11-25): a quiet gold ring on the left edge of the student picture. Grows over the inhale
 * (~4 s), settles over the exhale (~6 s); dims while the hold is paused. Driven by the engine's "breath" events. */
.e-breath { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 5; width: auto; max-width: calc(100% - 28px); display: flex; flex-direction: column; align-items: flex-start; gap: 7px; pointer-events: none; }
.e-breath[hidden] { display: none; }
.e-ring { display: block; width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid rgba(240,205,136,0.85); background: radial-gradient(circle, rgba(240,205,136,0.24) 0%, rgba(240,205,136,0.06) 62%, rgba(7,31,24,0.35) 100%); box-shadow: 0 0 22px rgba(240,205,136,0.18); transform: scale(0.58); transition: transform var(--dur, 4000ms) cubic-bezier(0.45, 0, 0.55, 1), opacity 0.4s ease; }
.e-breath[data-phase="in"] .e-ring { transform: scale(1); }
.e-breath[data-phase="out"] .e-ring { transform: scale(0.58); }
.e-breath[data-phase="pause"] .e-ring { opacity: 0.4; transition: opacity 0.4s ease; }
.e-bl { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--d-gold, #f0cd88); text-shadow: 0 1px 6px rgba(0,0,0,0.65); white-space: normal; text-align: left; line-height: 1.25; max-width: 11.5rem; }
.e-bc { font-size: 0.68rem; color: var(--d-soft, #efe7d6); opacity: 0.85; text-shadow: 0 1px 6px rgba(0,0,0,0.65); min-height: 1em; white-space: nowrap; }
.e-breath[data-phase="pause"] .e-bl { color: var(--d-soft, #efe7d6); letter-spacing: 0.06em; text-transform: none; white-space: normal; text-align: center; }
.e-coach[data-kind="breath"], .e-coach[data-kind="aware"], .e-coach[data-kind="safety"] { font-family: var(--d-serif, Georgia, serif); font-size: 1.02rem; border-color: rgba(240,205,136,0.35); }
.e-coach[data-kind="aware"] > span, .e-coach[data-kind="breath"] > span { font-style: italic; }
.e-coach[data-kind="strain"] { border-color: rgba(240,205,136,0.8); }
@media (max-width: 520px) {
  .e-breath { left: 8px; width: auto; max-width: calc(100% - 16px); gap: 5px; }
  .e-ring { width: 46px; height: 46px; }
  .e-bl { font-size: 0.62rem; }
  .e-bc { font-size: 0.6rem; }
  .e-coach[data-kind="breath"], .e-coach[data-kind="aware"], .e-coach[data-kind="safety"] { font-size: 0.86rem; }
}
/* Phones: the face sits in the upper part of the picture, so the coach line moves to the BOTTOM of the
 * student picture (over the torso) and the short status pill moves up beside the "You" label. */
@media (max-width: 520px) {
  .e-coach { top: auto; bottom: 26px; left: 8px; right: 8px; max-width: none; }
  .room .pane.student #seen-pill { top: 10px; bottom: auto; left: 104px; right: 84px; width: auto; max-width: none; padding: 5px 8px; gap: 6px; border-radius: 9px; align-items: center; }
  .room .pane.student #seen-pill b { font-size: 0.72rem; line-height: 1.25; }
  .room .pane.student #seen-pill small { display: none; }
  .room .pane.student #seen-pill svg { width: 15px; height: 15px; flex: 0 0 auto; }
}
@media (max-width: 520px) { .e-breath { top: 46px; transform: none; } }
/* pacer contrast on bright rooms */
.e-ring { background: radial-gradient(circle, rgba(240,205,136,0.34) 0%, rgba(7,31,24,0.5) 58%, rgba(7,31,24,0.62) 100%); border-width: 2px; }
.e-bl, .e-bc { background: rgba(7,31,24,0.62); padding: 1px 7px; border-radius: 99px; }
.e-bc:empty { display: none; }
/* Practice length cards on the start panel (Short ~6 min / Full ~12 min, default Full) */
.e-length { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(100%, 440px); margin: 18px auto 16px; }
.e-len { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ic t" "ic m" "ic s"; column-gap: 12px; row-gap: 2px; align-items: center; text-align: left; padding: 14px 14px 13px; border-radius: 14px; border: 1px solid rgba(240,205,136,0.28); background: rgba(7,31,24,0.55); color: var(--d-soft, #efe7d6); cursor: pointer; font: inherit; transition: border-color .2s, background .2s, box-shadow .2s; }
.e-len svg { grid-area: ic; width: 26px; height: 26px; color: var(--d-gold, #f0cd88); opacity: 0.75; }
.e-len b { grid-area: t; font: 400 1.15rem/1.2 var(--d-serif, Georgia, serif); color: var(--d-cream, #f6efe1); }
.e-len .e-min { grid-area: m; font-size: 0.85rem; color: var(--d-gold, #f0cd88); }
.e-len small { grid-area: s; font-size: 0.76rem; color: var(--d-muted, #b9c2b5); }
.e-len:hover { border-color: rgba(240,205,136,0.55); }
.e-len[aria-checked="true"] { border-color: var(--d-gold, #f0cd88); background: rgba(240,205,136,0.1); box-shadow: inset 0 0 0 1px rgba(240,205,136,0.45), 0 8px 24px rgba(0,0,0,0.25); }
.e-len[aria-checked="true"] svg { opacity: 1; }
.e-len:focus-visible { outline: 2px solid var(--d-gold, #f0cd88); outline-offset: 2px; }
@media (max-width: 520px) {
  .e-length { gap: 8px; margin: 14px auto 12px; }
  .e-len { padding: 10px 10px 9px; column-gap: 8px; border-radius: 12px; }
  .e-len svg { width: 20px; height: 20px; }
  .e-len b { font-size: 1rem; }
  .e-len .e-min { font-size: 0.78rem; }
  .e-len small { font-size: 0.68rem; }
}
.e-len { align-content: start; grid-template-rows: auto auto 1fr; align-items: start; }
.e-len svg { align-self: center; grid-row: 1 / span 3; }

/* ======================= engine1125d: arriving room, breath reading, summary ======================= */
:root { --e-gold: #f0cd88; --e-cream: #f6efe1; --e-soft: #e6dfcd; --e-muted: #b9c6ae; --e-deep: #0a2419; --e-panel: rgba(9, 34, 24, 0.82); --e-line: rgba(240, 205, 136, 0.32); --e-lav: #cdbdf0; }
/* ---- start screen: dusk backdrop + featured card (copy left, guide right), mock "Daily desk" card pattern ---- */
#gate.prep-room { background: radial-gradient(ellipse at 70% 10%, rgba(255, 196, 140, 0.18), transparent 60%), linear-gradient(180deg, rgba(6, 22, 15, 0.45) 0%, rgba(6, 22, 15, 0.82) 62%, #071d14 100%), url(/ai/assets/sunset-background.jpg) center 30% / cover no-repeat, #081e15; }
#gate .room-prep.e-start { background: transparent; backdrop-filter: none; padding: 28px; overflow: auto; justify-content: center; }
.e-start-card { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); width: min(1040px, 100%); border-radius: 22px; overflow: hidden; border: 1px solid var(--e-line); background: linear-gradient(135deg, rgba(42, 74, 50, 0.92), rgba(12, 40, 27, 0.94)); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); text-align: left; }
.e-start-copy { padding: 40px 42px 30px; display: flex; flex-direction: column; align-items: flex-start; }
.e-start-copy .e-eyebrow { font-size: 0.72rem; letter-spacing: 0.16em; }
#gate .e-start-copy h2 { margin: 12px 0 10px; font-size: 44px; }
#gate .e-start-copy p { max-width: 470px; }
#gate .e-start-copy .e-length { margin: 18px 0 6px; width: 100%; max-width: 470px; }
#gate .e-start-copy #begin { margin-top: 18px; }
#gate .e-start-copy .button.secondary { margin-top: 10px; }
#gate .e-start-copy .prep-fine { text-align: left; }
.e-start-art { position: relative; margin: 0; min-height: 100%; }
.e-start-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 46% 30%; }
.e-start-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 42, 29, 0.55) 0%, transparent 28%), linear-gradient(0deg, rgba(6, 22, 15, 0.72) 0%, transparent 38%); }
.e-start-art figcaption { position: absolute; left: 22px; right: 22px; bottom: 18px; z-index: 1; font: italic 400 1.05rem/1.35 var(--serif, Georgia, serif); color: var(--e-lav); }
.e-start-art figcaption .e-eyebrow { display: block; font: 600 0.66rem/1.4 var(--sans, sans-serif); font-style: normal; color: var(--e-gold); margin-bottom: 2px; }
@media (max-width: 860px) {
  #gate .room-prep.e-start { padding: 14px; justify-content: flex-start; }
  .e-start-card { grid-template-columns: 1fr; border-radius: 18px; }
  .e-start-art { order: -1; height: 190px; min-height: 0; }
  .e-start-copy { padding: 18px 18px 18px; }
  #gate .e-start-copy h2 { font-size: 30px; margin: 8px 0 6px; }
  #gate .e-start-copy p { font-size: 13px; }
  #gate .e-start-copy .e-length { margin: 12px 0 2px; }
  #gate .e-start-copy #begin { margin-top: 12px; width: 100%; }
  #gate .e-start-copy .button.secondary { width: 100%; }
}
@media (max-width: 400px) { .e-start-art { height: 158px; } #gate .e-start-copy h2 { font-size: 27px; } }

/* ---- arriving (setup + calibration): guide video loop, caption card, frosted bottom card, what's coming strip ---- */
.room .pane.guide .e-guide-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 44% 30%; z-index: 1; background: #10301f; }
.room.e-prep .pane.guide #teacher-demo { visibility: hidden; }
.room.e-prep .pane.guide .pane-bottom { display: none; }
.room .pane.guide .pane-label { z-index: 3; }
.e-guide-cap { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3; padding: 14px 16px 12px; border-radius: 14px; background: linear-gradient(160deg, rgba(14, 44, 30, 0.86), rgba(8, 30, 21, 0.9)); border: 1px solid var(--e-line); backdrop-filter: blur(8px); color: var(--e-cream); }
.e-guide-cap b { display: block; margin: 3px 0 9px; font: 400 1.3rem/1.2 var(--serif, Georgia, serif); }
.e-stage { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.e-stage li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 7px; border-radius: 99px; border: 1px solid rgba(185, 198, 174, 0.3); font-size: 0.74rem; color: var(--e-muted); }
.e-stage li i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.e-stage li[data-state="now"] { color: var(--e-gold); border-color: rgba(240, 205, 136, 0.6); background: rgba(240, 205, 136, 0.08); }
.e-stage li[data-state="now"] i { background: var(--e-gold); box-shadow: 0 0 0 3px rgba(240, 205, 136, 0.2); animation: e-pulse 2.4s ease-in-out infinite; }
.e-stage li[data-state="done"] { color: var(--e-soft); border-color: rgba(240, 205, 136, 0.35); }
.e-stage li[data-state="done"] i { background: var(--e-gold); border-color: var(--e-gold); }
@keyframes e-pulse { 50% { box-shadow: 0 0 0 6px rgba(240, 205, 136, 0.05); } }
/* frosted bottom card on the student picture */
.e-panel.e-prep-card { left: 14px; right: 14px; width: auto; transform: none; bottom: 14px; padding: 14px 16px 13px; border-radius: 16px; background: var(--e-panel); backdrop-filter: blur(10px) saturate(1.1); border-color: var(--e-line); }
.e-prep-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.e-prep-ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--e-gold); background: rgba(240, 205, 136, 0.1); border: 1px solid rgba(240, 205, 136, 0.35); }
.e-prep-card h3 { margin: 1px 0 0; }
.e-check.e-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 9px; }
.e-chips li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 8px; border-radius: 99px; border: 1px solid rgba(185, 198, 174, 0.35); background: rgba(255, 255, 255, 0.03); font-size: 0.84rem; color: var(--e-muted); transition: border-color .35s, background .35s, color .35s; }
.e-chips li::before, .e-chips li::after { content: none !important; display: none !important; }
.e-chips li .e-ci { display: inline-grid; color: var(--e-muted); }
.e-chips li .e-ct { display: inline-grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; border: 1.5px solid rgba(185, 198, 174, 0.45); color: transparent; transition: all .35s; }
.e-chips li[data-ok="0"] { border-color: rgba(255, 176, 110, 0.55); color: var(--e-soft); }
.e-chips li[data-ok="0"] .e-ct { border-color: rgba(255, 176, 110, 0.75); }
.e-chips li[data-ok="1"] { border-color: rgba(240, 205, 136, 0.65); background: rgba(240, 205, 136, 0.1); color: var(--e-cream); }
.e-chips li[data-ok="1"] .e-ci { color: var(--e-gold); }
.e-chips li[data-ok="1"] .e-ct { background: var(--e-gold); border-color: var(--e-gold); color: #12301f; }
.e-prep-foot { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.e-prep-foot .e-fix { flex: 1 1 220px; margin: 0; }
.e-prep-foot .e-skip { margin: 0; }
.e-mic { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.e-mic-chip { padding: 6px 11px; border-radius: 99px; border: 1px solid rgba(205, 189, 240, 0.4); background: transparent; color: var(--e-lav); font: inherit; font-size: 0.78rem; }
.e-mic[aria-pressed="true"] { border-color: var(--e-lav); background: rgba(205, 189, 240, 0.14); color: #efe8ff; }
.e-mic:disabled { opacity: 0.6; }
.e-mic-note { margin: -4px 0 6px; }
/* calibration: big breath ring next to the arrive line */
.e-panel.e-calib:not([hidden]) { display: flex; align-items: center; gap: 18px; }
.e-calib-ring { position: relative; flex: 0 0 auto; width: 112px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.e-calib-ring .e-rw { width: 104px; height: 104px; }
.e-calib-text { flex: 1 1 auto; min-width: 0; }
.e-cr-l { min-height: 1.1em; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--e-lav); }
/* rings: gold = the target pace; soft lavender inner light = the person's own breath (only when it can be read) */
.e-rw { position: relative; display: grid; place-items: center; width: 64px; height: 64px; }
.e-rw .e-ring { width: 100%; height: 100%; }
.e-you { position: absolute; left: 50%; top: 50%; width: 70%; height: 70%; margin: -35% 0 0 -35%; border-radius: 50%; background: radial-gradient(circle, rgba(205, 189, 240, 0.85) 0%, rgba(205, 189, 240, 0.35) 55%, rgba(205, 189, 240, 0) 72%); transform: scale(var(--you, 0.3)); transition: transform 0.18s linear, opacity 0.5s ease; opacity: 0; pointer-events: none; }
[data-read="reading"] .e-you { opacity: 1; }
[data-read="heard"] .e-you { opacity: 0.45; animation: e-heard 3s ease-in-out infinite; }
@keyframes e-heard { 50% { transform: scale(0.6); } }
.e-calib-ring[data-phase="in"] .e-ring { transform: scale(1); }
.e-calib-ring[data-phase="out"] .e-ring, .e-calib-ring[data-phase="off"] .e-ring { transform: scale(0.58); }
.e-yl { font-size: 0.62rem; color: var(--e-lav); background: rgba(7, 31, 24, 0.62); padding: 1px 7px; border-radius: 99px; white-space: normal; text-align: left; line-height: 1.25; max-width: 11.5rem; }
.e-breath[data-read="cant"] .e-yl, .e-breath[data-read="warming"] .e-yl { color: var(--e-muted); }
.e-still { font-size: 0.6rem; color: var(--e-soft); background: rgba(7, 31, 24, 0.62); padding: 1px 7px; border-radius: 99px; white-space: nowrap; opacity: 0.85; }
.e-still b { font-weight: 400; letter-spacing: 1px; color: var(--e-gold); }
.e-still em { font-style: normal; color: rgba(185, 198, 174, 0.35); }
.e-breath { width: 110px; }
.e-breath .e-rw { width: 64px; height: 64px; }
/* what's coming strip (replaces the cue line while arriving) */
.room.e-prep #room-cue { display: none; }
.e-coming { min-width: 0; padding: 12px 0 10px; }
.e-coming-h { margin: 0 0 8px; display: flex; align-items: baseline; gap: 10px; }
.e-coming-meta { font-size: 0.8rem; color: var(--e-muted); }
.e-coming-row { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.e-coming-row li { position: relative; flex: 0 0 auto; width: 104px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(240, 205, 136, 0.2); background: #10301f; }
.e-coming-row img { display: block; width: 100%; height: 58px; object-fit: cover; object-position: 50% 28%; opacity: 0.92; }
.e-coming-row li i { position: absolute; left: 6px; top: 5px; font: 600 0.62rem/1 var(--sans, sans-serif); font-style: normal; color: #12301f; background: var(--e-gold); border-radius: 99px; padding: 2px 5px; }
.e-coming-row li span { display: block; padding: 5px 7px 6px; font-size: 0.68rem; line-height: 1.25; color: var(--e-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) {
  .e-guide-cap { left: 8px; right: 8px; bottom: 8px; padding: 8px 10px; border-radius: 11px; }
  .e-guide-cap .e-eyebrow { display: none; }
  .e-guide-cap b { font-size: 0.95rem; margin: 0 0 5px; }
  .e-stage li { font-size: 0.64rem; padding: 2px 7px 2px 5px; gap: 4px; }
  .e-panel.e-prep-card { left: 8px; right: 8px; bottom: 8px; padding: 9px 10px; border-radius: 12px; }
  .e-prep-head { display: none; }
  .e-check.e-chips { gap: 4px; margin: 0 0 6px; }
  .e-chips li { font-size: 0.7rem; padding: 3px 7px 3px 5px; gap: 4px; }
  .e-chips li .e-ci svg { width: 13px; height: 13px; }
  .e-chips li .e-ct { width: 14px; height: 14px; }
  .e-chips li .e-ct svg { width: 10px; height: 10px; }
  .e-mic-chip { font-size: 0.68rem; padding: 3px 8px; }
  .e-mic-chip svg { width: 12px; height: 12px; }
  .e-panel.e-calib:not([hidden]) { gap: 10px; }
  .e-calib-ring { width: 70px; }
  .e-calib-ring .e-rw { width: 62px; height: 62px; }
  .e-calib .e-small { display: none; }
  .e-calib h3 { font-size: 0.86rem; }
  .e-coming { padding: 6px 0 4px; }
  .e-coming-h { margin: 0 0 5px; }
  .e-coming-row li { width: 78px; }
  .e-coming-row img { height: 42px; }
  .e-coming-row li span { font-size: 0.6rem; padding: 3px 5px 4px; }
  .e-breath { width: 84px; }
  .e-breath .e-rw { width: 46px; height: 46px; }
  .e-yl, .e-still { font-size: 0.56rem; }
}
/* small phones: every chip stays visible (ticks are the point), labels shorten */
@media (max-width: 400px) {
  #setup-panel .e-check.e-chips li[data-ok="1"] { display: inline-flex; }
  .e-chips li { font-size: 0.64rem; }
}
/* ---- finish summary ---- */
.e-summary { margin: 26px auto 8px; text-align: left; max-width: 760px; }
.e-sum-h { text-align: center; margin-bottom: 12px; }
.e-sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.e-sum-card { display: flex; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--e-line); background: linear-gradient(150deg, rgba(42, 74, 50, 0.55), rgba(12, 40, 27, 0.6)); }
.e-sum-ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--e-gold); background: rgba(240, 205, 136, 0.1); border: 1px solid rgba(240, 205, 136, 0.35); }
.e-sum-card b { display: block; margin: 4px 0 3px; font: 400 1.15rem/1.25 var(--serif, Georgia, serif); color: var(--e-cream); }
.e-sum-card small { display: block; font-size: 0.8rem; line-height: 1.45; color: var(--e-muted); }
.e-sym { border-collapse: collapse; margin: 6px 0 4px; font-size: 0.84rem; color: var(--e-soft); }
.e-sym th { font-weight: 500; font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--e-muted); padding: 0 10px 3px 0; text-align: left; }
.e-sym td { padding: 2px 12px 2px 0; }
.e-sym tr.uneven td { color: var(--e-gold); }
.e-summary .e-small { text-align: center; }
@media (max-width: 620px) { .e-sum-grid { grid-template-columns: 1fr; } .e-sum-card { padding: 13px; } }
/* engine1125d phone fixes: eyebrows back where they label content; guide caption shrinks to the stage chips so the
 * guide's face stays visible; the arrive line stays readable during calibration on small phones */
@media (max-width: 520px) {
  .e-summary .e-eyebrow, .e-coming .e-eyebrow { display: inline; }
  .e-summary .e-sum-card .e-eyebrow { display: block; }
  .e-guide-cap { left: auto; right: 8px; bottom: 8px; padding: 5px 6px; background: rgba(8, 30, 21, 0.78); }
  .e-guide-cap b { display: none; }
  .e-calib-text .e-eyebrow { display: none; }
}
@media (max-width: 400px) {
  .e-panel.e-calib h3 { display: block; font-size: 0.82rem; margin: 0 0 4px; }
  .e-calib .e-fix { font-size: 0.74rem; }
  .e-breath .e-still { display: none; }
}
/* engine1125d phone compaction: passed checks shrink to icon + gold tick, the mic chip goes icon-only on small phones,
 * so the arriving card stays a short strip at the bottom of the picture (face stays clear) */
@media (max-width: 520px) {
  .e-chips li[data-ok="1"] .e-cl { display: none; }
  .e-chips li[data-ok="1"] { padding: 3px 4px; }
  .e-prep-foot { gap: 4px 6px; }
  .e-prep-foot .e-fix { flex: 1 1 100%; font-size: 0.76rem; }
  .e-prep-foot .e-skip { min-height: 28px; padding: 3px 10px; font-size: 0.74rem; }
}
@media (max-width: 400px) {
  .e-mic-chip .e-ml { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .e-mic-chip { padding: 4px 6px; }
  .e-prep-foot .e-fix { flex: 1 1 60%; }
  .e-coming-row li { width: 66px; }
  .e-coming-row img { height: 34px; }
  .e-coming-row li span { font-size: 0.56rem; }
  .e-coming-meta { font-size: 0.7rem; }
}
@media (max-width: 400px) { .e-chips li[data-ok="?"] .e-cl { display: none; } .e-chips li[data-ok="?"] { padding: 3px 4px; } }
.e-chips li .e-cs { display: none; }
@media (max-width: 400px) { .e-chips li[data-ok="0"] .e-cl { display: none; } .e-chips li[data-ok="0"] .e-cs { display: inline; } }
/* 375: one chip row (failing chips drop the icon, keep the short word), fix line full width, buttons small */
@media (max-width: 400px) {
  .e-check.e-chips { gap: 3px; flex-wrap: nowrap; overflow: hidden; }
  .e-chips li { font-size: 0.6rem; padding: 2px 4px; gap: 3px; flex: 0 0 auto; }
  .e-chips li[data-ok="0"] .e-ci { display: none; }
  .e-chips li .e-ct { width: 12px; height: 12px; }
  .e-chips li .e-ci svg { width: 12px; height: 12px; }
  .e-prep-foot .e-fix { flex: 1 1 100%; font-size: 0.72rem; line-height: 1.25; }
  .e-panel.e-prep-card { padding: 7px 8px; }
}

/* ---- engine1125f: live badges, fast wrong-side banner, step ticks ---- */
.e-badges { position: absolute; right: 12px; top: 64px; z-index: 7; pointer-events: none; }
.e-badges[hidden] { display: none; }
.e-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border-radius: 99px; background: rgba(9, 34, 24, 0.86); border: 1px solid rgba(240, 205, 136, 0.55); color: var(--e-cream); font: 600 0.78rem/1.2 var(--sans, system-ui, sans-serif); letter-spacing: 0.01em; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(205, 189, 240, 0.08); white-space: nowrap;
  opacity: 0; transform: translateY(-6px) scale(0.92); transition: opacity 0.32s ease, transform 0.42s cubic-bezier(.2, .9, .3, 1.2); }
.e-badge.in { opacity: 1; transform: none; }
.e-bdg-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7dea5, var(--e-gold) 60%, #c9a35c); color: #1d2a1f; flex: none; }
.e-badge .e-bdg-ic { box-shadow: 0 0 0 2px rgba(240, 205, 136, 0.22); }
.e-badge.in .e-bdg-ic { animation: e-bdg-glow 1.6s ease-out 1; }
@keyframes e-bdg-glow { 0% { box-shadow: 0 0 0 0 rgba(240, 205, 136, 0.55); } 100% { box-shadow: 0 0 0 9px rgba(240, 205, 136, 0); } }
.e-badges[data-motion="reduce"] .e-badge { transition: none; transform: none; }
.e-badges[data-motion="reduce"] .e-badge.in .e-bdg-ic { animation: none; }

.e-wrong { position: absolute; left: 12px; bottom: 80px; z-index: 7; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; background: rgba(22, 16, 36, 0.96); border: 1.5px solid var(--e-lav); color: var(--e-cream); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); max-width: min(360px, calc(100% - 24px)); animation: e-wr-in 0.22s ease-out 1; }
.e-wrong[hidden] { display: none; }
.e-wr-arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--e-gold); color: #1d2a1f; flex: none; }
.e-wrong[data-dir="right"] .e-wr-arrow svg { animation: e-wr-nudge-r 1.1s ease-in-out infinite; }
.e-wrong[data-dir="left"] .e-wr-arrow svg { animation: e-wr-nudge-l 1.1s ease-in-out infinite; }
.e-wr-t { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; min-width: 0; }
.e-wr-t b { font: 700 0.98rem/1.2 var(--sans, system-ui, sans-serif); color: var(--e-lav); }
.e-wr-t > span { font-size: 0.86rem; color: var(--e-cream); }
.e-wr-line { display: block; margin: 5px 0 0; padding: 5px 0 0; border-top: 1px solid rgba(205, 189, 240, 0.3); font: 400 0.86rem/1.35 var(--sans, system-ui, sans-serif); color: var(--e-cream); }
@keyframes e-wr-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes e-wr-nudge-r { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(3px); } }
@keyframes e-wr-nudge-l { 0%, 100% { transform: translateX(2px); } 50% { transform: translateX(-3px); } }
.wrong-side #seen-pill { display: none !important; }
.panel-open .e-wrong, .panel-open .e-badges { display: none !important; }

/* step ticks: the 15 progress bars become small rings; gold tick when the camera saw the shape, a dot for each badge */
#room #segs { gap: 5px; padding: 12px 0 13px; }
#room #segs i { position: relative; width: 16px; height: 16px; border-radius: 50%; background: transparent; border: 1.5px solid rgba(185, 198, 174, 0.38); box-sizing: border-box; transition: background 0.3s, border-color 0.3s; }
#room #segs i.active { border-color: rgba(240, 205, 136, 0.7); }
#room #segs i.now { border-color: var(--e-gold); box-shadow: 0 0 0 3px rgba(240, 205, 136, 0.16); }
#room #segs i[data-done="seen"] { background: var(--e-gold); border-color: var(--e-gold); }
#room #segs i[data-done="seen"]::after { content: ""; position: absolute; left: 4.4px; top: 2px; width: 3.6px; height: 7px; border: solid #1d2a1f; border-width: 0 1.8px 1.8px 0; transform: rotate(42deg); }
#room #segs i[data-done="skip"], #room #segs i[data-done="other"] { background: rgba(185, 198, 174, 0.18); }
#room #segs i[data-badges]::before { content: ""; position: absolute; right: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--e-lav); box-shadow: 0 0 0 1.5px var(--e-deep); }

.e-sum-badges { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--e-line); background: rgba(9, 34, 24, 0.55); text-align: left; }
.e-sum-badges ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.e-sum-badges li { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px; border-radius: 99px; border: 1px solid rgba(240, 205, 136, 0.45); background: rgba(240, 205, 136, 0.07); color: var(--e-cream); font-size: 0.82rem; }
.e-sum-badges li em { font-style: normal; color: var(--e-lav); font-weight: 700; }
@media (max-width: 520px) {
  .e-badge { font-size: 0.72rem; padding: 4px 9px 4px 4px; gap: 6px; }
  .e-bdg-ic { width: 20px; height: 20px; }
  .e-wrong { left: 8px; right: 8px; max-width: none; padding: 6px 10px 7px 6px; gap: 8px; align-items: flex-start; }
  .e-wr-arrow { width: 32px; height: 32px; }
  .e-wr-t b { font-size: 0.86rem; } .e-wr-t > span { font-size: 0.78rem; }
  .e-wr-line { font-size: 0.8rem; margin-top: 4px; padding-top: 4px; }
  #room #segs { gap: 3px; padding: 8px 0 9px; }
  #room #segs i { width: 13px; height: 13px; }
  #room #segs i[data-done="seen"]::after { left: 3.4px; top: 1.3px; width: 3px; height: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .e-badge { transition: none; transform: none; }
  .e-badge.in .e-bdg-ic, .e-wrong, .e-wr-arrow svg { animation: none !important; }
}

@media (max-width: 400px) {
  .e-wrong { padding: 5px 8px 6px 5px; gap: 7px; }
  .e-wr-arrow { width: 28px; height: 28px; }
  .e-wr-t b { font-size: 0.8rem; } .e-wr-t > span { font-size: 0.74rem; }
  .e-wr-line { font-size: 0.74rem; line-height: 1.3; }
}

/* ================= round 2026-11-27 (Raj t2170u) ================= */
/* first visit: what the camera is for, when it turns on */
#gate .e-why { list-style: none; margin: 14px 0 4px; padding: 0; display: grid; gap: 10px; max-width: 470px; }
#gate .e-why li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; font-size: 0.86rem; line-height: 1.45; color: var(--e-soft); }
#gate .e-why b { color: var(--e-cream); font-weight: 600; display: block; }
#gate .e-why-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--e-gold); border: 1px solid var(--e-line); background: rgba(240, 205, 136, 0.07); }
#gate .e-cam-need { margin: 8px 0 0; font-size: 0.78rem; color: var(--e-muted); }
/* camera help: denied / none / busy / tracking */
.e-cam-help { margin: 14px 0 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(240, 205, 136, 0.55); background: rgba(7, 31, 24, 0.75); max-width: 470px; width: 100%; }
.e-cam-help[hidden] { display: none; }
.e-cam-help h3 { margin: 0 0 6px; font: 400 1.3rem/1.25 var(--serif, Georgia, serif); color: var(--e-cream); }
.e-cam-help p { margin: 0 0 8px; font-size: 0.88rem; color: var(--e-soft); }
.e-cam-help ol { margin: 0 0 8px; padding-left: 20px; font-size: 0.88rem; color: var(--e-cream); display: grid; gap: 4px; }
.e-cam-help .e-ch-fine { font-size: 0.76rem; color: var(--e-muted); }
.e-cam-help .e-ch-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.e-cam-help .e-ch-btns .button { margin: 0 !important; }
#gate.e-has-help #begin, #gate.e-has-help .e-length, #gate.e-has-help .e-cam-need, #gate.e-has-help .e-start-copy > .button.secondary, #gate.e-has-help #gate-status { display: none; }
#gate .e-cam-help[data-kind] { scroll-margin: 20px; }
/* pre-permission demo (guide photos; labelled) */
.e-start-art.e-demo { display: flex; flex-direction: column; justify-content: center; min-height: 100%; background: radial-gradient(circle at 50% 35%, rgba(42, 74, 50, 0.55), rgba(6, 22, 15, 0.75)); }
.e-start-art.e-demo::after { display: none; }
.e-demo-stage { position: relative; flex: none; aspect-ratio: 4 / 3.3; width: 100%; }
.e-demo-you { position: absolute; inset: 0; overflow: hidden; }
.e-demo-guide { position: absolute; right: 10px; top: 10px; z-index: 3; width: 31%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 10px; border: 1.5px solid rgba(240, 205, 136, 0.75); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.e-demo-guide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.e-demo-guide .e-demo-tag { left: 5px; top: auto; bottom: 5px; font-size: 0.55rem; }
.e-mirror-guide, #teacher-demo, #guide-loop, .e-coming-row img { transform: scaleX(-1); }

.e-demo-you > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.e-demo-you .e-dy { opacity: 0; transition: opacity 0.45s ease; }
.e-demo[data-k="show"] .e-dy-c, .e-demo[data-k="wrong"] .e-dy-w, .e-demo[data-k="right"] .e-dy-r, .e-demo[data-k="lost"] .e-dy-r { opacity: 1; }
.e-demo[data-k="lost"] .e-demo-you > svg { filter: brightness(0.42) blur(1.5px); }
.e-dm { opacity: 0; transition: opacity 0.35s ease; fill: none; stroke-width: 3.5; }
.e-dm circle { fill: rgba(7, 31, 24, 0.7); stroke-width: 3; }
.e-dm-c, .e-dm-r { stroke: var(--e-gold); }
.e-dm-w { stroke: var(--e-lav); }
.e-demo[data-k="show"] .e-dm-c, .e-demo[data-k="wrong"] .e-dm-w, .e-demo[data-k="right"] .e-dm-r { opacity: 1; }
.e-demo-tag { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 2px 8px; border-radius: 99px; font: 600 0.62rem/1.6 var(--sans, sans-serif); letter-spacing: 0.12em; text-transform: uppercase; color: var(--e-cream); background: rgba(7, 31, 24, 0.78); border: 1px solid var(--e-line); }
.e-demo-card { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; font-size: 0.82rem; line-height: 1.3; color: var(--e-cream); background: rgba(7, 31, 24, 0.9); border: 1px solid rgba(240, 205, 136, 0.6); }
.e-demo-arrow { display: none; flex: none; color: var(--e-lav); }
.e-demo[data-k="wrong"] .e-demo-card { border-color: var(--e-lav); background: rgba(22, 16, 36, 0.94); }
.e-demo[data-k="wrong"] .e-demo-arrow { display: block; }
.e-demo[data-k="lost"] .e-demo-card { border-color: rgba(185, 194, 181, 0.7); }
.e-demo-hold { position: absolute; left: 8px; top: 40px; z-index: 2; width: 52px; height: 52px; border-radius: 50%; display: none; flex-direction: column; align-items: center; justify-content: center; color: var(--e-cream); background: rgba(7, 31, 24, 0.8); border: 2px solid var(--e-gold); }
.e-demo-hold b { font-size: 1rem; line-height: 1; } .e-demo-hold small { font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--e-muted); }
.e-demo[data-k="right"] .e-demo-hold { display: flex; }
.e-demo[data-k="lost"] .e-demo-hold { display: flex; opacity: 0.5; border-style: dashed; }
.e-start-art.e-demo figcaption { position: static; padding: 12px 16px 14px; font-size: 0.95rem; }
.e-demo-cap { display: block; min-height: 2.6em; }
.e-demo-ctl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; font: 400 0.75rem/1.3 var(--sans, sans-serif); font-style: normal; }
.e-demo-dots { display: flex; gap: 6px; }
.e-demo-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--e-gold); cursor: pointer; }
.e-demo-dots i.on { background: var(--e-gold); }
.e-demo-btn { background: transparent; border: 1px solid var(--e-line); color: var(--e-soft); border-radius: 99px; padding: 3px 10px; font-size: 0.72rem; cursor: pointer; }
.e-demo-fine { display: block; margin-top: 6px; font: 400 0.68rem/1.3 var(--sans, sans-serif); font-style: normal; color: var(--e-muted); }
@media (max-width: 860px) {
  .e-start-art.e-demo { height: auto; min-height: auto; justify-content: flex-start; }
  .e-demo-stage { aspect-ratio: auto; height: 220px; }
  .e-demo-guide { width: 26%; }
  .e-start-art.e-demo figcaption { padding: 9px 12px 10px; font-size: 0.86rem; }
  .e-demo-cap { min-height: 0; }
}
@media (max-width: 400px) { .e-demo-stage { height: 196px; } .e-demo-card { font-size: 0.74rem; padding: 5px 8px; } .e-demo-hold { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .e-demo-you .e-dy, .e-dm { transition: none; } }

/* room: Pause/Resume + paused card */
.room-controls #pause[aria-pressed="true"] { background: #3d5a2f; border-color: var(--e-gold); color: #fae8bc; }
.e-paused-card { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 9; width: min(92%, 380px); padding: 16px 18px; border-radius: 16px; background: rgba(7, 31, 24, 0.95); border: 1px solid rgba(240, 205, 136, 0.7); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); text-align: left; }
.e-paused-card[hidden] { display: none; }
.e-paused-card h3 { margin: 4px 0 6px; font: 400 1.35rem/1.2 var(--serif, Georgia, serif); color: var(--e-cream); }
.e-paused-card .e-pc-p { margin: 0 0 12px; font-size: 0.9rem; color: var(--e-soft); }
.e-pc-btns { display: flex; gap: 10px; } .e-pc-btns .button { flex: 1; margin: 0; }
.room.e-paused #cam, .room.e-paused #overlay { filter: brightness(0.55); }
.room.e-paused .e-coach, .room.e-paused .e-breath, .room.e-paused #hold-pill, .room.e-paused .e-wrong, .room.e-paused .e-badges { display: none !important; }
/* tracking dropped */
.e-track { position: absolute; left: 12px; bottom: 30px; z-index: 8; max-width: min(460px, calc(100% - 24px)); padding: 10px 14px; border-radius: 12px; background: rgba(9, 22, 18, 0.95); border: 1.5px solid rgba(185, 194, 181, 0.85); color: var(--e-cream); display: grid; gap: 2px; font-size: 0.92rem; }
.e-track[hidden] { display: none; }
.e-track b { font-weight: 600; } .e-track span { color: var(--e-soft); font-size: 0.85rem; }
.e-track[data-state="back"] { border-color: var(--e-gold); }
.room.e-track-lost .e-coach, .room.e-track-lost .e-wrong { display: none !important; }
/* listening window */
.e-listen { position: absolute; left: 12px; bottom: 30px; z-index: 9; width: min(420px, calc(100% - 24px)); padding: 12px 14px; border-radius: 14px; background: rgba(7, 31, 24, 0.96); border: 1.5px solid var(--e-gold); color: var(--e-cream); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.e-listen[hidden] { display: none; }
.e-lc-q { margin: 0; font: 400 1.2rem/1.25 var(--serif, Georgia, serif); }
.e-lc-voice { margin: 2px 0 6px; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--e-muted); }
.e-lc-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; font-size: 0.84rem; color: var(--e-soft); }
.e-lc-mic { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #10291c; background: var(--e-gold); }
.e-lc-mic svg { position: relative; z-index: 1; }
.e-lc-level { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--e-gold); opacity: 0.35; transform: scale(calc(1 + var(--lv, 0) * 0.5)); transition: transform 0.08s linear; }
.e-listen[data-state="opening"] .e-lc-mic, .e-listen[data-state="failed"] .e-lc-mic, .e-listen[data-state="tap-only"] .e-lc-mic { background: rgba(185, 194, 181, 0.5); }
.e-lc-taps { display: flex; flex-wrap: wrap; gap: 6px; }
.e-lc-taps button { flex: 1 1 auto; min-height: 36px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--e-line); background: #1d3c27; color: var(--e-cream); font-size: 0.82rem; cursor: pointer; }
.e-lc-taps .e-lc-stop { border-color: rgba(255, 170, 120, 0.8); }
.e-lc-x { margin-top: 6px; background: none; border: 0; color: var(--e-muted); font-size: 0.74rem; text-decoration: underline; cursor: pointer; padding: 2px 0; }
.room.e-listening .e-coach, .room.e-listening .e-badges { display: none !important; }
@media (max-width: 520px) {
  .e-track, .e-listen { left: 8px; right: 8px; bottom: 26px; width: auto; max-width: none; }
  .e-lc-q { font-size: 1.05rem; } .e-lc-taps button { font-size: 0.76rem; min-height: 34px; padding: 5px 6px; }
  .e-paused-card { bottom: 12px; }
}
/* finish: recap with sources, verified shutdown */
.e-recap { text-align: left; margin: 6px 0 10px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--e-line); background: rgba(9, 34, 24, 0.55); }
.e-rc-sec { margin-top: 12px; } .e-rc-sec:first-of-type { margin-top: 8px; }
.e-rc-sec ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.e-rc-sec li { display: flex; gap: 10px; align-items: baseline; font-size: 0.95rem; line-height: 1.4; color: var(--e-cream); }
.e-rc-none { margin: 6px 0 0; color: var(--e-soft); font-size: 0.92rem; }
.e-src { flex: none; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--e-line); color: var(--e-gold); white-space: nowrap; }
.e-src[data-src="you"] { color: var(--e-lav); border-color: rgba(205, 189, 240, 0.5); }
.e-src[data-src="general"] { color: var(--e-muted); border-color: rgba(185, 194, 181, 0.45); }
.e-rc-skip li { color: var(--e-soft); }
.e-more-sum { margin-top: 10px; text-align: left; } .e-more-sum > summary { cursor: pointer; color: var(--e-gold); font-size: 0.9rem; margin-bottom: 8px; }
.e-media-off { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 6px 0; font-size: 0.86rem; color: var(--e-soft); }
.e-media-off span { display: inline-flex; gap: 5px; align-items: center; } .e-media-off span[data-ok="1"] svg { color: var(--e-gold); } .e-media-off span[data-ok="0"] { color: #ffb38a; }
@media (max-width: 520px) { .e-rc-sec li { flex-direction: column; gap: 3px; } .e-recap { padding: 13px; } }
/* round 27: one instruction at a time (see round27-ui.js) */
#cue-body.e-cue-quiet { display: none; }
/* round 27: while paused, only the paused card speaks (no hold pill / coach line bleeding through behind it) */
#room.e-paused #hold-pill, #room.e-paused #seen-pill, #room.e-paused #coach-line, #room.e-paused #wrong-cue, #room.e-paused #track-cue { visibility: hidden; }
/* round 27: no "Hold complete" badge next to a wrong-side correction (one message at a time) */
#room:has(#wrong-cue:not([hidden])) #badge-tray { visibility: hidden; }

/* ======================= engine1127b: phone first-screen fix (Raj t2175u "can't get past the first screen") =======================
   The start card is a flex child of the fixed gate. With overflow:hidden it was allowed to shrink to the screen height,
   so on phones the Start button sat clipped inside a box that never scrolls. The card now keeps its full height and the
   gate itself scrolls (touch momentum on iOS), centring with auto margins so tall content never clips at the top. */
#gate .room-prep.e-start { justify-content: flex-start; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px)); }
#gate .room-prep.e-start > .e-start-card { flex: 0 0 auto; margin-top: auto; margin-bottom: auto; max-height: none; }
@media (max-width: 860px) { #gate .room-prep.e-start { padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px)); } }
/* engine1127b: one tracking-loss message at a time. The track card says it; the "seen" pill steps aside meanwhile. */
#room.e-track-lost #seen-pill { display: none !important; }
/* engine1127b: live badges never show during the closing words or next to the recap */
#room.e-closing #badge-tray, #room.finished #badge-tray, body.show-done #badge-tray, body.show-done .e-badges { display: none !important; }
/* engine1127c: a breath hint reads as a tip, not an error */
.e-yl[data-hint]:not([data-hint=""]) { color: var(--e-gold) !important; white-space: normal; max-width: 11.5rem; text-align: left; line-height: 1.25; }
/* engine1127c: beta training opt-in (No is the default; both buttons the same size and weight) */
.e-beta { width: 100%; max-width: 470px; margin: 16px 0 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--e-line); background: rgba(7, 31, 24, 0.55); }
.e-beta .e-eyebrow { font-size: 0.66rem; letter-spacing: 0.16em; color: var(--e-gold); margin: 0 0 4px; }
.e-beta-q { margin: 0 0 10px; font-size: 0.95rem; color: var(--e-cream); line-height: 1.4; }
.e-beta-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.e-beta-b { min-height: 44px; border-radius: 10px; border: 1px solid rgba(240, 205, 136, 0.45); background: #1d3c27; color: var(--e-cream); font: 600 0.95rem/1.2 var(--sans, sans-serif); cursor: pointer; }
.e-beta-b[aria-checked="true"] { border: 2px solid var(--e-gold); background: #2c4a31; }
.e-beta-note { margin: 8px 0 4px; font-size: 0.85rem; color: var(--e-soft); }
.e-beta-fine { margin: 0; font-size: 0.72rem; line-height: 1.45; color: var(--e-muted); }
.e-train-note { text-align: center; color: var(--e-cream); margin: 6px 0; }
.e-train-note[data-sent="1"] { color: var(--e-gold); }
@media (max-width: 860px) { #gate .e-start-copy .e-beta { margin: 12px 0 0; } }

.e-train-retry { margin-left: 6px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--d-gold, #f0cd88); background: rgba(240,205,136,0.12); color: var(--d-cream, #f6efe1); font: inherit; cursor: pointer; }

/* ---- intention picker (2026-11-27d) ---- */
.e-intent { width: 100%; max-width: 470px; margin: 16px 0 4px; }
.e-intent > .e-eyebrow { margin: 0 0 8px; }
.e-int-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.e-int { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; text-align: left; border-radius: 14px; border: 1px solid rgba(240,205,136,0.28); background: rgba(7,31,24,0.55); color: var(--d-soft, #efe7d6); cursor: pointer; font: inherit; min-height: 44px; transition: border-color .2s, background .2s, box-shadow .2s; }
.e-int-img { display: block; height: 62px; background: rgba(7,31,24,0.8); overflow: hidden; }
.e-int-img img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .2s; }
.e-int b { display: block; padding: 8px 12px 10px; font: 400 1.02rem/1.2 var(--d-serif, Georgia, serif); color: var(--d-cream, #f6efe1); }
.e-int:hover { border-color: rgba(240,205,136,0.55); }
.e-int[aria-checked="true"] { border-color: var(--d-gold, #f0cd88); background: rgba(240,205,136,0.1); box-shadow: inset 0 0 0 1px rgba(240,205,136,0.45), 0 8px 24px rgba(0,0,0,0.25); }
.e-int[aria-checked="true"] .e-int-img img { opacity: 1; }
.e-int[aria-checked="true"]::after { content: ""; position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--d-gold, #f0cd88) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23102b21' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat; }
.e-int:focus-visible { outline: 2px solid var(--d-gold, #f0cd88); outline-offset: 2px; }
.e-int-note { margin: 8px 2px 0; font-size: 0.9rem; line-height: 1.4; color: var(--d-muted, #b9c2b5); }
@media (max-width: 520px) { .e-int-img { height: 52px; } .e-int b { padding: 6px 10px 8px; font-size: 0.96rem; } .e-int-grid { gap: 8px; } .e-intent { margin: 12px 0 2px; } }
@media (min-width: 861px) { .e-int-img { height: 72px; } }
.e-done-intent { margin: 4px 0 8px; color: var(--d-muted, #b9c2b5); font-size: 0.98rem; }
.e-done-intent b { color: var(--d-gold, #f0cd88); font-weight: 600; }

/* ---- 2026-11-27e: Yes unavailable, guide reply card ---- */
.e-beta-b:disabled, .e-beta-b[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.e-feel-reply { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 90; width: min(92vw, 460px); margin: 0; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--d-gold, #f0cd88); background: rgba(10, 36, 28, 0.96); color: var(--d-cream, #f6efe1); font: italic 1.02rem/1.45 var(--d-serif, Georgia, serif); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.e-feel-reply[hidden] { display: none; }
.e-feel-reply .nv { display: block; margin-top: 6px; font: normal 0.7rem/1 var(--sans, sans-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--d-gold, #f0cd88); opacity: .85; }
/* beta recording problem line: readable, not the faint footer */
#cam-foot.e-rec-bad { color: var(--d-gold, #f0cd88); opacity: 1; font-weight: 600; white-space: normal; text-align: center; background: rgba(10, 36, 28, 0.92); border-radius: 10px; padding: 6px 10px; left: 10px; right: 10px; }


/* ======================= brand1128r15: cue cards sit below the tiles, not on the video ======================= */
/* Extra auto row: prep-cue + room-cue + what's coming + controls + bottom. Hidden rows collapse. */
.room.live-room { grid-template-rows: auto auto minmax(0, 1fr) auto auto auto auto; }
#prep-cue { min-width: 0; margin: 6px 0 0; padding: 0; border-radius: 16px; border: 1px solid var(--e-line); background: var(--e-panel, rgba(9, 34, 24, 0.88)); backdrop-filter: blur(10px) saturate(1.1); color: var(--e-cream, #f6efe1); }
#prep-cue[hidden], .room:not(.e-prep) #prep-cue { display: none !important; }
.room.e-prep #prep-cue:not([hidden]) { display: block; }
#prep-cue .e-guide-cap,
#prep-cue .e-panel.e-prep-card { position: relative !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; transform: none !important; width: auto !important; max-height: none !important; overflow: visible !important; margin: 0; padding: 10px 16px 12px; border: 0; border-radius: 0; background: transparent; backdrop-filter: none; box-shadow: none; }
#prep-cue .e-guide-cap { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding-bottom: 2px; }
#prep-cue .e-guide-cap .e-eyebrow { display: none; }
#prep-cue .e-guide-cap b { display: inline; margin: 0; font: 400 1.15rem/1.2 var(--serif, Georgia, serif); color: var(--e-cream, #f6efe1); }
#prep-cue .e-guide-cap[hidden] { display: none !important; }
#prep-cue .e-prep-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
#prep-cue .e-prep-ic { width: 30px; height: 30px; }
#prep-cue .e-prep-card h3 { margin: 1px 0 0; font-size: 1.15rem; color: var(--e-cream, #f6efe1); }
#prep-cue .e-check.e-chips { margin: 0 0 6px; }
/* The big in-card ring moved off the video with the card; the compact overlay on the You tile leads the pace. */
#prep-cue .e-calib-ring { display: none; }
#prep-cue .e-panel.e-calib:not([hidden]) { display: block; padding-top: 4px; }
#prep-cue .e-calib .e-bar { margin: 7px 0 6px; }
#prep-cue .e-calib .e-small { margin: 4px 0 0; font-size: 0.75rem; line-height: 1.35; color: var(--e-muted, #b9c6ae); }
#prep-cue .e-calib-text .e-eyebrow { display: block; margin: 0 0 2px; color: var(--e-gold, #f0cd88); }
#prep-cue .e-fix { color: var(--e-gold, #f0cd88); }
/* Compact gold ring in the lower-left of the You tile during arriving — clear of the face. */
.room.e-prep #breath-ring.e-breath { top: auto; left: 14px; bottom: 14px; transform: none; width: auto; max-width: calc(100% - 28px); }
.room.e-prep #breath-ring .e-rw { width: 52px; height: 52px; }
.room.e-prep #breath-ring .e-still { display: none; }
.room.e-prep .e-coming { padding: 8px 0 4px; }
.room.e-prep .e-coming-row img { height: 48px; }
/* At laptop height, drop the gold-ring legend so Pause/Skip stay on the first screen. */
@media (max-height: 820px) {
  #prep-cue .e-calib .e-small { display: none; }
  .room.e-prep .e-coming { padding: 6px 0 2px; }
  .room.e-prep .e-coming-row img { height: 42px; }
  .room.e-prep .e-coming-row li { width: 92px; }
  #prep-cue .e-guide-cap, #prep-cue .e-panel.e-prep-card { padding: 8px 14px 10px; }
}
@media (max-width: 520px) {
  #prep-cue { border-radius: 12px; margin-top: 6px; }
  #prep-cue .e-guide-cap, #prep-cue .e-panel.e-prep-card { padding: 8px 10px 9px; }
  #prep-cue .e-guide-cap b { font-size: 0.95rem; display: inline; }
  #prep-cue .e-prep-head { display: flex; }
  #prep-cue .e-prep-ic { display: none; }
  #prep-cue .e-prep-card h3, #prep-cue .e-calib h3 { font-size: 0.95rem; }
  #prep-cue .e-calib .e-small { display: none; }
  #prep-cue .e-calib-text .e-eyebrow { display: block; }
  .room.e-prep #breath-ring.e-breath { left: 8px; bottom: 8px; width: auto; max-width: calc(100% - 16px); }
  .room.e-prep .e-coming-row img { height: 36px; }
}

/* clips28: AI demo clip over the guide still (same crop + mirror as #teacher-demo) */
.room .pane.guide .e-teacher-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 42% 22%; transform: scaleX(-1); background: transparent; pointer-events: none; z-index: 2; }
.room.e-prep .pane.guide #teacher-clip, .room.e-mode .pane.guide #teacher-clip { display: none !important; }
@media (prefers-reduced-motion: reduce) { .room .pane.guide #teacher-clip { display: none !important; } }
/* talk28: speaking take sits over the silent loop; fades in/out; never in prep-only/mode views for the step clip */
.room .pane.guide .e-talk { opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.room .pane.guide .e-talk.on { opacity: 1; }
.room .pane.guide .e-teacher-clip.e-talk { display: block; }
.room.e-prep .pane.guide .e-teacher-clip.e-talk, .room.e-mode .pane.guide .e-teacher-clip.e-talk { display: none !important; }
@media (prefers-reduced-motion: reduce) { .room .pane.guide .e-talk { display: none !important; } }
