/* Tutor dock (spec 5) and the pointing overlay (spec 5.5). Dark, to sit on the story decks. */
.ls-tdock, .ls-tdock-pill, .ls-tdock-sheet, .ls-tdock-drawer, .ls-point-label {
    --tk-bg: #161b24;
    --tk-bg2: #1e2430;
    --tk-line: #3a4250;
    --tk-ink: #e6ebf5;
    --tk-muted: #b4bdcc;
    --tk-accent: #e5c07b;
    --tk-blue: #61afef;
    --tk-red: #e06c75;
    --tk-green: #98c379;
    --tk-font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* reserve space under the slide when the dock would cover it (set by tutor-dock.js) */
html.ls-tdock-reserve:not(.ls-tdock-phone) .reveal { height: calc(100% - var(--ls-tdock-space, 0px)) !important; }
/* phones read in Reveal's scroll view, where the viewport element scrolls: end it above the dock,
   so nothing scrolls underneath the bar or the task sheet */
html.ls-tdock-reserve.ls-tdock-phone .reveal-viewport.reveal-scroll { height: calc(100% - var(--ls-band, 0px) - var(--ls-tdock-space, 0px)) !important; }
html.ls-tdock-on.ls-tdock-phone .ls-export,
html.ls-tdock-on.ls-tdock-phone .ls-layers-btn,
html.ls-tdock-on.ls-tdock-phone #ls-admin-edit { display: none !important; }
html.ls-tdock-on.ls-tdock-phone.ls-tdock-show-layers .ls-layers-panel { z-index: 9600; }
html.ls-tdock-on:not(.ls-band) #part-footer { display: none; }   /* a phone's part label is in the top band (slide-base.css), clear of the dock */

.ls-tdock-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons */
.ls-tdock-btn { font: 600 14px/1.2 var(--tk-font); color: var(--tk-ink); background: var(--tk-bg2); border: 1px solid var(--tk-line);
    border-radius: 999px; padding: 8px 14px; cursor: pointer; white-space: nowrap; min-height: 36px; }
.ls-tdock-btn:hover { border-color: var(--tk-blue); }
.ls-tdock-btn:focus-visible, .ls-tdock-orb:focus-visible, .ls-tdock-mi:focus-visible, .ls-tdock-x:focus-visible { outline: 2px solid var(--tk-accent); outline-offset: 2px; }
.ls-tdock-btn.primary { background: var(--tk-accent); color: #1a1d24; border-color: var(--tk-accent); }
.ls-tdock-btn.primary:hover { background: #f0cf8f; }
.ls-tdock-btn.ghost { background: transparent; }
.ls-tdock-btn.danger { color: #ffd6da; border-color: rgba(224,108,117,0.6); background: rgba(224,108,117,0.12); }
.ls-tdock-btn.link { background: none; border: none; color: var(--tk-blue); text-decoration: underline; padding: 6px 8px; }
.ls-tdock-btn.small { padding: 6px 12px; font-size: 13.5px; min-height: 32px; }
.ls-tdock-btn[hidden] { display: none; }
@media (pointer: coarse) { .ls-tdock-btn, .ls-tdock-btn.small, .ls-tdock-mi { min-height: 44px; } }

/* ---------- idle pill */
.ls-tdock-pill { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 9500; display: flex; gap: 8px; align-items: center;
    background: rgba(22,27,36,0.94); border: 1px solid var(--tk-line); border-radius: 999px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    font-family: var(--tk-font); }
.ls-tdock-pill[hidden] { display: none; }
/* the platform's part footer ("Part N · name", parts.js) sits at the bottom centre: the pill and the dock stay above it */
html.ls-tdock-footer:not(.ls-tdock-phone) .ls-tdock-pill { bottom: 40px; }
html.ls-tdock-footer:not(.ls-tdock-phone) .ls-tdock { bottom: 38px; }

/* ---------- the dock */
.ls-tdock { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 9500; width: min(560px, calc(100vw - 300px));
    font-family: var(--tk-font); color: var(--tk-ink); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.ls-tdock[hidden] { display: none; }
.ls-tdock > * { pointer-events: auto; }
.ls-tdock-stack { display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.ls-tdock-stack > * { pointer-events: auto; }
.ls-tdock-bar { display: flex; align-items: center; gap: 10px; height: 56px; box-sizing: border-box; padding: 0 8px 0 8px;
    background: rgba(22,27,36,0.96); border: 1px solid var(--tk-line); border-radius: 16px; box-shadow: 0 10px 28px rgba(0,0,0,0.5); }
.ls-tdock-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.ls-tdock-label { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-tdock-subcap { font-size: 12.5px; color: var(--tk-muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ls-tdock-subcap:empty { display: none; }
.ls-tdock-ctls { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.ls-tdock[data-state="ended"] .ls-tdock-bar, .ls-tdock[data-state="error"] .ls-tdock-bar { height: auto; min-height: 56px; padding: 8px; flex-wrap: wrap; }
.ls-tdock[data-state="ended"] .ls-tdock-subcap, .ls-tdock[data-state="error"] .ls-tdock-subcap { -webkit-line-clamp: 4; }

/* the orb: its ring follows the mic (listening) or the tutor (speaking) */
.ls-tdock-orb { position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
    background: radial-gradient(circle at 35% 30%, #8fc8f5, var(--tk-blue) 55%, #2f6ea3); touch-action: none; }
.ls-tdock-ring { position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(97,175,239,0.7);
    transform: scale(calc(1 + var(--ls-tdock-level, 0) * 0.35)); transition: transform 90ms linear; pointer-events: none; }
.ls-tdock[data-state="speaking"] .ls-tdock-orb { background: radial-gradient(circle at 35% 30%, #f6dca8, var(--tk-accent) 55%, #a7822f); }
.ls-tdock[data-state="speaking"] .ls-tdock-ring { border-color: rgba(229,192,123,0.85); }
.ls-tdock[data-state="thinking"] .ls-tdock-orb { animation: ls-tdock-shimmer 1.1s ease-in-out infinite; }
.ls-tdock[data-state="your turn"] .ls-tdock-orb { opacity: 0.55; }
.ls-tdock[data-state="paused"] .ls-tdock-orb, .ls-tdock[data-state="ended"] .ls-tdock-orb, .ls-tdock[data-state="error"] .ls-tdock-orb { background: #4a5261; }
.ls-tdock[data-state="reconnecting"] .ls-tdock-ring, .ls-tdock[data-state="connecting"] .ls-tdock-ring { border-style: dashed; animation: ls-tdock-spin 2.4s linear infinite; }
.ls-tdock[data-state="connecting"] .ls-tdock-orb { animation: ls-tdock-breathe 1.8s ease-in-out infinite; }
.ls-tdock[data-state="push-to-talk"] .ls-tdock-ring { border-color: rgba(224,108,117,0.5); }
.ls-tdock[data-state="push-to-talk"].held .ls-tdock-ring, .ls-tdock[data-state="listening"][data-ptt-held] .ls-tdock-ring { border-color: var(--tk-red); border-width: 3px; }
@keyframes ls-tdock-shimmer { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
@keyframes ls-tdock-breathe { 0%, 100% { transform: scale(0.94); } 50% { transform: scale(1.04); } }
@keyframes ls-tdock-spin { to { transform: rotate(360deg); } }

/* captions: two lines above the bar */
.ls-tdock-caps { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px; background: rgba(13,16,23,0.88); border-radius: 12px;
    border: 1px solid rgba(58,66,80,0.7); }
.ls-tdock-caps:has(.ls-tdock-cap:empty + .ls-tdock-cap:empty) { display: none; }
.ls-tdock-cap { font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ls-tdock-cap:empty { display: none; }
.ls-tdock-cap.learner { color: var(--tk-muted); font-size: 13.5px; -webkit-line-clamp: 1; }
.ls-tdock.captions-off .ls-tdock-caps { display: none; }

.ls-tdock-board { align-self: center; background: rgba(13,16,23,0.92); border: 1px solid var(--tk-accent); border-radius: 10px; padding: 6px 14px;
    font-size: 18px; max-width: 100%; overflow-x: auto; }
.ls-tdock-board[hidden] { display: none; }

.ls-tdock-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ls-tdock-chips:empty { display: none; }
.ls-tdock-chip { display: flex; align-items: center; gap: 8px; background: rgba(22,27,36,0.96); border: 1px solid var(--tk-line); border-radius: 999px;
    padding: 4px 4px 4px 12px; font-size: 13.5px; box-shadow: 0 6px 18px rgba(0,0,0,0.4); max-width: 100%; }
.ls-tdock-chip-t { min-width: 0; }
.ls-tdock-x { background: none; border: none; color: var(--tk-muted); font-size: 18px; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.ls-tdock-x:hover { color: var(--tk-ink); background: var(--tk-bg2); }

/* the task card */
.ls-tdock-card { background: rgba(22,27,36,0.97); border: 1px solid var(--tk-accent); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.5); }
.ls-tdock-card[hidden] { display: none; }
.ls-tdock-card-kicker { font: 700 11.5px 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 2px; text-transform: uppercase; color: var(--tk-accent); }
.ls-tdock-card-prompt { font-size: 15.5px; line-height: 1.4; }
.ls-tdock-card-hint { font-size: 14px; color: #d8e6f7; background: rgba(97,175,239,0.12); border-radius: 8px; padding: 6px 10px; }
.ls-tdock-card-hint[hidden] { display: none; }
.ls-tdock-card-msg { font-size: 13.5px; color: var(--tk-muted); }
.ls-tdock-card-msg:empty { display: none; }
.ls-tdock-card-note { font-size: 13.5px; color: var(--tk-muted); flex: 1; }
.ls-tdock-cardin, .ls-tdock-typein { flex: 1 1 auto; min-width: 0; font: 15px var(--tk-font); color: var(--tk-ink); background: #0f131a; border: 1px solid var(--tk-line);
    border-radius: 10px; padding: 8px 10px; resize: vertical; }
.ls-tdock-cardin:focus, .ls-tdock-typein:focus { outline: 2px solid var(--tk-blue); outline-offset: 0; }
.ls-tdock-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ls-tdock-row.spread { justify-content: space-between; }
.ls-tdock-choices { display: flex; flex-wrap: wrap; gap: 6px; }

.ls-tdock-type { display: flex; gap: 6px; background: rgba(22,27,36,0.96); border: 1px solid var(--tk-line); border-radius: 12px; padding: 6px; }
.ls-tdock-type[hidden] { display: none; }

/* menu and drawer */
.ls-tdock-menu { position: absolute; right: 0; bottom: 64px; min-width: 260px; max-width: calc(100vw - 24px); max-height: 60vh; overflow: auto; background: var(--tk-bg);
    border: 1px solid var(--tk-line); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,0.55); display: flex; flex-direction: column; gap: 2px; }
.ls-tdock-menu[hidden] { display: none; }
.ls-tdock-mi { text-align: left; font: 14px var(--tk-font); color: var(--tk-ink); background: none; border: none; border-radius: 8px; padding: 9px 10px; cursor: pointer; }
.ls-tdock-mi:hover { background: var(--tk-bg2); }
.ls-tdock-mi[aria-pressed="true"] { color: var(--tk-accent); }
.ls-tdock-mrow { display: flex; align-items: center; gap: 4px; padding: 4px 10px; font-size: 14px; color: var(--tk-muted); flex-wrap: wrap; }
.ls-tdock-mrow .ls-tdock-mi { padding: 6px 8px; }
.ls-tdock-mtext { font-size: 14px; margin: 6px 8px; line-height: 1.4; }
.ls-tdock-drawer { position: fixed; right: 12px; top: 12px; bottom: 90px; width: min(380px, calc(100vw - 24px)); z-index: 9550; background: var(--tk-bg);
    border: 1px solid var(--tk-line); border-radius: 14px; padding: 10px 14px; overflow: auto; font-family: var(--tk-font); color: var(--tk-ink);
    box-shadow: 0 12px 32px rgba(0,0,0,0.55); }
.ls-tdock-drawer[hidden] { display: none; }
.ls-tdock-drawer h2 { font-size: 16px; margin: 0; }
.ls-tdock-drawer-list { margin: 8px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.ls-tdock-drawer-list li { margin-bottom: 6px; }

/* first-run sheet */
.ls-tdock-sheet { position: fixed; inset: 0; z-index: 9700; background: rgba(5,7,11,0.6); display: flex; align-items: center; justify-content: center; padding: 16px;
    font-family: var(--tk-font); color: var(--tk-ink); }
.ls-tdock-sheet[hidden] { display: none; }
.ls-tdock-sheet-card { background: var(--tk-bg); border: 1px solid var(--tk-line); border-radius: 16px; padding: 18px 20px; max-width: 480px; width: 100%;
    box-shadow: 0 18px 48px rgba(0,0,0,0.6); display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 32px); overflow: auto; }
.ls-tdock-sheet h2 { font-size: 19px; margin: 0; }
.ls-tdock-consent { font-size: 15px; line-height: 1.5; margin: 0; color: var(--tk-ink); }
.ls-tdock-sheet-msg { margin: 0; color: var(--tk-accent); font-size: 14px; }
.ls-tdock-audio { border: 1px solid var(--tk-line); border-radius: 12px; padding: 8px 12px 10px; margin: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.ls-tdock-audio legend { font-weight: 700; font-size: 14.5px; padding: 0 4px; }
.ls-tdock-audio label { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; min-height: 36px; }
.ls-tdock-audio input { accent-color: var(--tk-accent); width: 18px; height: 18px; }

/* ---------- self-paced try-this cards (spec F3): the task card alone, above the idle pill */
.ls-tdock[data-state="self"] .ls-tdock-bar, .ls-tdock[data-state="self"] .ls-tdock-caps, .ls-tdock[data-state="self"] .ls-tdock-menu,
.ls-tdock[data-state="self"] .ls-tdock-type, .ls-tdock[data-state="self"] .ls-tdock-chips { display: none; }
.ls-tdock[data-state="self"] { width: min(520px, calc(100vw - 300px)); }
html.ls-tdock-pill-on .ls-tdock[data-state="self"] { bottom: 66px; }
html.ls-tdock-pill-on.ls-tdock-footer:not(.ls-tdock-phone) .ls-tdock[data-state="self"] { bottom: 92px; }
.ls-tdock[data-state="self"] .ls-tdock-card { border-color: var(--tk-blue); }
.ls-tdock[data-state="self"] .ls-tdock-card-kicker { color: var(--tk-blue); }
.ls-tdock-choices .ls-tdock-btn.on { border-color: var(--tk-accent); background: rgba(229,192,123,0.2); color: var(--tk-ink); }
.ls-tdock-card.held { opacity: 0.94; }
.ls-tdock-card .ls-tdock-btn:disabled { cursor: default; opacity: 0.75; }
/* the widget's own result waits for the learner's commit or skip: deck widgets mark it data-try-result */
section[data-ls-try="pending"] [data-try-result] { visibility: hidden !important; }

/* ---------- phones: a full-width bar at the thumb, 56 px plus the safe area, 88 px while speaking */
html.ls-tdock-phone .ls-tdock, .ls-tdock.phone { left: 0; right: 0; bottom: 0; transform: none; width: 100%; gap: 4px; }
html.ls-tdock-phone .ls-tdock-bar { border-radius: 14px 14px 0 0; border-left: none; border-right: none; border-bottom: none; height: auto;
    min-height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding: 4px calc(10px + env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) calc(14px + env(safe-area-inset-left, 0px)); }
html.ls-tdock-phone .ls-tdock[data-state="speaking"] .ls-tdock-bar { min-height: calc(88px + env(safe-area-inset-bottom, 0px)); align-items: center; }
html.ls-tdock-phone .ls-tdock[data-state="speaking"] .ls-tdock-subcap { -webkit-line-clamp: 3; }
html.ls-tdock-phone .ls-tdock-orb { width: 48px; height: 48px; }
html.ls-tdock-phone .ls-tdock-caps { display: none; }
html.ls-tdock-phone .ls-tdock-stack { padding: 0 8px; }
html.ls-tdock-phone .ls-tdock-ctls .ls-tdock-btn { padding: 6px 10px; font-size: 13px; }
html.ls-tdock-phone .ls-tdock-ctls [data-act="ptt"], html.ls-tdock-phone .ls-tdock-ctls [data-act="type"] { display: none; }
html.ls-tdock-phone .ls-tdock-menu { right: 8px; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
html.ls-tdock-phone .ls-tdock[data-state="ended"] .ls-tdock-ctls, html.ls-tdock-phone .ls-tdock[data-state="error"] .ls-tdock-ctls { flex-wrap: wrap; }
html.ls-tdock-phone .ls-tdock-pill { left: auto; right: calc(12px + env(safe-area-inset-right, 0px)); transform: none; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
html.ls-tdock-phone.ls-tdock-pill-on .ls-tdock[data-state="self"] { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

/* ---------- a phone's task card (2026-10-04): a header line with the kicker, "I don't know", Skip and a fold button,
   then the question and the answer row at their natural height; folded, it is one line, the question cut short */
.ls-tdock-fold { display: none; }
html.ls-tdock-phone .ls-tdock-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 44px; column-gap: 4px; row-gap: 6px; align-items: center;
    padding: 4px 4px 10px 12px; max-height: 62vh; max-height: 62dvh; overflow: auto; overscroll-behavior: contain; }
html.ls-tdock-phone .ls-tdock-card[hidden] { display: none; }
html.ls-tdock-phone .ls-tdock-card > .ls-tdock-card-acts { display: contents; }
html.ls-tdock-phone .ls-tdock-card-kicker { grid-row: 1; grid-column: 1; align-self: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 10.5px; letter-spacing: 1.5px; }
html.ls-tdock-phone .ls-tdock-card-acts > [data-act^="hint"] { grid-row: 1; grid-column: 2; padding: 6px 12px; font-size: 13.5px; }
html.ls-tdock-phone .ls-tdock-card-acts > [data-act="skip"] { grid-row: 1; grid-column: 3; min-width: 44px; padding: 6px 8px; font-size: 13.5px; }
html.ls-tdock-phone .ls-tdock-fold { grid-row: 1; grid-column: 4; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0;
    border-radius: 10px; background: none; color: var(--tk-muted); cursor: pointer; }
html.ls-tdock-phone .ls-tdock-fold svg { transition: transform 150ms ease; }
html.ls-tdock-phone .ls-tdock-card:is(.folded) .ls-tdock-fold svg { transform: rotate(180deg); }
html.ls-tdock-phone .ls-tdock-card > :is(.ls-tdock-card-prompt, .ls-tdock-card-body, .ls-tdock-card-hint, .ls-tdock-card-msg) { grid-column: 1 / -1; min-width: 0; margin-right: 8px; }
html.ls-tdock-phone .ls-tdock-card-prompt { font-size: 15px; line-height: 1.35; }
html.ls-tdock-phone .ls-tdock-card-body .ls-tdock-choices { gap: 6px; }
html.ls-tdock-phone .ls-tdock-card-body .ls-tdock-btn { padding: 6px 14px; font-size: 14px; white-space: normal; text-align: left; }
html.ls-tdock-phone .ls-tdock-card-body .ls-tdock-row { flex-wrap: nowrap; }
html.ls-tdock-phone .ls-tdock-card-body .ls-tdock-row > .ls-tdock-btn { flex: none; white-space: nowrap; }
html.ls-tdock-phone .ls-tdock-card-note { flex: 1 1 auto; min-width: 0; }
html.ls-tdock-phone .ls-tdock-cardin { min-width: 0; font-size: 16px; }   /* 16 px: iOS zooms into a smaller box */
html.ls-tdock-phone .ls-tdock-btn:focus-visible, html.ls-tdock-phone .ls-tdock-fold:focus-visible { outline: 2px solid var(--tk-accent); outline-offset: -2px; }
/* folded: the question on one line beside the fold button; a tap anywhere opens it */
html.ls-tdock-phone .ls-tdock-card.folded { grid-template-columns: minmax(0, 1fr) 44px; padding: 0 4px 0 12px; overflow: hidden; cursor: pointer; }
html.ls-tdock-phone .ls-tdock-card.folded > :is(.ls-tdock-card-kicker, .ls-tdock-card-body, .ls-tdock-card-hint, .ls-tdock-card-msg),
html.ls-tdock-phone .ls-tdock-card.folded > .ls-tdock-card-acts > * { display: none; }
html.ls-tdock-phone .ls-tdock-card.folded > .ls-tdock-card-prompt { grid-row: 1; grid-column: 1; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
html.ls-tdock-phone .ls-tdock-card.folded > .ls-tdock-card-prompt::before { content: 'Try this: '; font-weight: 700; color: var(--tk-blue); }
html.ls-tdock-phone .ls-tdock[data-state]:not([data-state="self"]) .ls-tdock-card.folded > .ls-tdock-card-prompt::before { content: 'Your turn: '; color: var(--tk-accent); }
html.ls-tdock-phone .ls-tdock-card.folded > .ls-tdock-fold { grid-column: 2; }
html.ls-tdock-phone .ls-tdock[data-state="self"] { width: 100%; padding-bottom: env(safe-area-inset-bottom, 0px); }
html.ls-tdock-phone .ls-tdock[data-state="self"] .ls-tdock-stack { padding: 0 calc(8px + env(safe-area-inset-right, 0px)) 8px calc(8px + env(safe-area-inset-left, 0px)); }
/* the tutor's button is in the top band: the card sits on the bottom edge */
html.ls-tdock-phone.ls-tdock-pill-band .ls-tdock[data-state="self"] { bottom: 0; }
/* held sideways (the band floats): the card is no wider than the slide, between the side margins */
html.ls-band-float.ls-tdock-phone .ls-tdock[data-state="self"] { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, calc(100vw - 128px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))); }
html.ls-band-float.ls-tdock-phone .ls-tdock[data-state="self"] .ls-tdock-stack { padding: 0 0 6px; }
html.ls-band-float.ls-tdock-phone .ls-tdock-card { max-height: 70dvh; }

/* the transcript opens under a phone's top band, not beneath it */
html.ls-band .ls-tdock-drawer { top: calc(var(--ls-band, 0px) + 4px); }
html.ls-band.ls-band-float .ls-tdock-drawer { top: var(--ls-band-top, 8px); right: calc(60px + env(safe-area-inset-right, 0px)); left: auto; width: min(380px, calc(100vw - 128px)); }

/* ---------- the tutor's button in a phone's top band (tutor-dock.js placePill): one 44 px button, a microphone */
html.ls-band .ls-toolbar > .ls-tdock-pill { position: static; left: auto; right: auto; bottom: auto; transform: none; display: flex; gap: 0; padding: 0; margin: 0;
    background: none; border: 0; border-radius: 0; box-shadow: none; max-width: none; }
html.ls-band .ls-toolbar > .ls-tdock-pill[hidden] { display: none; }
html.ls-band .ls-toolbar > .ls-tdock-pill [data-act="type-start"] { display: none; }
html.ls-band .ls-toolbar > .ls-tdock-pill [data-act="start"] { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 8px; font-size: 0; color: transparent;
    background: var(--tk-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%231a1d24' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E") center / 22px no-repeat; }

/* ---------- a phone's ended or failed tutor: the reason and the buttons wrap across the full width, no orb, no typing */
html.ls-tdock-phone .ls-tdock:is([data-state="ended"], [data-state="error"]) .ls-tdock-bar { flex-wrap: wrap; align-items: flex-start; row-gap: 8px; box-sizing: border-box; width: 100%; }
html.ls-tdock-phone .ls-tdock:is([data-state="ended"], [data-state="error"]) .ls-tdock-orb { display: none; }
html.ls-tdock-phone .ls-tdock:is([data-state="ended"], [data-state="error"]) .ls-tdock-text { flex: 1 1 100%; }
html.ls-tdock-phone .ls-tdock:is([data-state="ended"], [data-state="error"]) .ls-tdock-ctls { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; }
html.ls-tdock-phone .ls-tdock:is([data-state="ended"], [data-state="error"]) .ls-tdock-type { display: none; }
@media (max-width: 819px) {
    .ls-tdock-pill { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 24px); }
    .ls-tdock-sheet { align-items: flex-end; padding: 0; }
    .ls-tdock-sheet-card { border-radius: 16px 16px 0 0; max-width: none; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
    .ls-tdock-drawer { left: 8px; right: 8px; width: auto; top: 8px; bottom: 100px; }
}

/* ---------- pointing ring and spotlight (LSDeck.point) */
.ls-point-ring { animation: ls-point-in 200ms ease-out, ls-point-pulse 700ms ease-in-out 200ms 1; }
.ls-point-ring.still { animation: ls-point-in 200ms ease-out; }
.ls-point-label { font: 600 13.5px var(--tk-font); color: #1a1d24; background: var(--tk-accent); border-radius: 8px; padding: 3px 9px; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.45); animation: ls-point-in 200ms ease-out; }
@keyframes ls-point-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ls-point-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

@media (prefers-reduced-motion: reduce) {
    .ls-point-ring, .ls-point-label, .ls-point-ring.still { animation: none; }
    .ls-tdock-orb, .ls-tdock-ring { animation: none !important; transition: none; }
}
@media print { .ls-tdock, .ls-tdock-pill, .ls-tdock-sheet, .ls-tdock-drawer, .ls-point-layer { display: none !important; } }
