/* Shared session conversation, response and presentation surfaces. */
.nb-tutor { position:relative; flex:1 1 auto; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.nb-tutor [hidden] { display:none!important; }
    .nb-tutor-sheet { position: absolute; z-index: 9; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
    .nb-sheet-paper {
        position: relative; background: rgba(255, 255, 255, 0.72);
        border: 1.5px solid rgba(34, 48, 58, 0.55); border-radius: 2px;
        box-shadow: 0 10px 26px rgba(34, 48, 58, 0.08);
        padding: 22px 26px 20px; transform: rotate(-0.5deg);
    }
    .nb-sheet-pin {
        position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
        width: 13px; height: 13px; border-radius: 50%; background: var(--brass);
        box-shadow: 0 2px 4px rgba(34, 48, 58, 0.25), inset -2px -2px 3px rgba(0, 0, 0, 0.18);
    }
    @keyframes nbPinDrop {
        0% { opacity: 0; transform: translateY(-18px) rotate(-2.4deg); }
        60% { opacity: 1; transform: translateY(3px) rotate(0.8deg); }
        100% { opacity: 1; transform: translateY(0) rotate(-0.5deg); }
    }
    @keyframes nbRowSketch {
        from { opacity: 0; transform: translateY(7px) rotate(-0.4deg) scale(0.97); }
        to { opacity: 1; transform: none; }
    }
    .nb-sheet-head {
        display: flex; align-items: baseline; justify-content: space-between;
        border-bottom: 1px solid rgba(34, 48, 58, 0.16);
        padding-bottom: 9px; margin-bottom: 14px;
    }
    .nb-sheet-kicker {
        font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
        letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass);
    }
    /* Plan rows on the sheet — TOPIC n, the title, and the red "we start
       here" pointer on the current one. */
    .nb-sheet-row {
        display: grid; grid-template-columns: 56px minmax(0, 1fr) auto;
        gap: 0 14px; align-items: baseline; padding: 8px 2px;
        border-bottom: 1px solid rgba(34, 48, 58, 0.1);
    }
    .nb-sheet-row.current {
        background: rgba(194, 64, 42, 0.05); margin: 0 -8px;
        padding-left: 10px; padding-right: 10px;
        border: 1px solid rgba(194, 64, 42, 0.45); border-radius: 2px;
    }
    .nb-sheet-row-index {
        font-family: var(--font-mono); font-size: 10px; font-weight: 500;
        letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
        white-space: nowrap;
    }
    .nb-sheet-row.current .nb-sheet-row-index { color: var(--brass); }
    .nb-sheet-row-title { font-family: var(--font-serif); font-size: 15.5px; color: var(--cream); }
    .nb-sheet-row-note { font-family: var(--font-serif); font-style: italic; font-size: 13px; color: var(--brass); white-space: nowrap; }
    .nb-sheet-schoolwork {
        display: grid; grid-template-columns: 96px minmax(0, 1fr);
        gap: 2px 12px; align-items: baseline;
        margin: 0 0 11px; padding: 0 2px 11px;
        border-bottom: 1.5px solid rgba(194, 64, 42, 0.35);
    }
    .nb-sheet-schoolwork-label {
        grid-row: 1 / span 2;
        font-family: var(--font-mono); font-size: 9px; font-weight: 500;
        letter-spacing: .14em; text-transform: uppercase; color: var(--brass);
    }
    .nb-sheet-schoolwork strong {
        font-family: var(--font-serif); font-size: 15.5px; line-height: 1.2;
        font-weight: 500; color: var(--cream);
    }
    .nb-sheet-schoolwork > span:last-child:not(.nb-sheet-schoolwork-label) {
        font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-3);
    }
    /* A practice problem on the sheet — the clean math form, written big so
       the student can read it while answering aloud. */
    .nb-sheet-problem {
        font-family: var(--font-serif); font-size: 1.35rem; color: var(--cream);
        text-align: center; padding: 6px 0 2px;
    }

    .nb-room-composer {
        position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
        z-index: 46; width: min(620px, calc(100% - 40px));
    }
    .nb-room-composer-row {
        display: flex; gap: 7px; align-items: center; width: 100%;
        padding: 5px 6px 5px 15px;
        background: var(--paper);
        border: 1px solid var(--hair-card-2);
        border-radius: 25px;
        box-shadow: var(--card-shadow);
        transition: border-color var(--t-fast) ease;
    }
    .nb-room-composer-row:focus-within { border-color: var(--ballpoint-dim); }
    .nb-orient-input {
        flex: 1; min-width: 0; padding: 10px 12px;
        border: 1px solid rgba(34, 48, 58, 0.35); border-radius: 3px;
        background: var(--paper); color: var(--paper-ink);
        font-family: var(--font-ui); font-size: 15px;
    }
    .nb-orient-input:focus { outline: none; border-color: var(--ballpoint); }
    .nb-orient-input-send {
        flex: none; background: var(--brass); color: var(--board); border: none;
        padding: 11px 18px; border-radius: 0; cursor: pointer;
        font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
        letter-spacing: 0.14em; text-transform: uppercase;
    }
    .nb-orient-input-send:hover:not(:disabled) { filter: brightness(1.07); }
    .nb-orient-input-send:disabled { opacity: 0.45; cursor: default; }
    .nb-room-composer .nb-orient-input {
        border: 0; background: transparent; padding: 9px 2px;
        font-size: 16px;               /* 16px: smaller zooms iOS Safari */
    }
    .nb-room-composer .nb-orient-input:focus { border-color: transparent; }
    .nb-room-composer .nb-orient-input-send {
        display: grid; place-items: center;
        width: 38px; height: 38px; padding: 0 0 2px;
        border-radius: 50%;
        font-family: var(--font-ui); font-size: 20px; line-height: 1;
        letter-spacing: 0; text-transform: none;
    }
    /* "Type instead" — the lesson player's control, docked bottom-right so
       the middle of the floor stays uncrowded (founder, 2026-08-18). */
    .nb-tutor-type-btn {
        position: absolute; right: 22px; bottom: 24px; z-index: 45;
        display: inline-flex; align-items: center; gap: 9px;
        padding: 10px 14px; cursor: pointer;
        background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(34, 48, 58, 0.22);
        border-radius: 3px; color: var(--ink-2);
        font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
        letter-spacing: 0.11em; text-transform: uppercase;
        transition: color 120ms ease, border-color 120ms ease;
    }
    .nb-tutor-type-btn svg {
        width: 20px; height: 20px; flex: none;
        fill: none; stroke: currentColor; stroke-width: 1.7;
        stroke-linecap: round; stroke-linejoin: round;
    }
    .nb-tutor-type-btn:hover { color: var(--cream); border-color: rgba(34, 48, 58, 0.45); }
    .nb-tutor-type-btn.is-active { color: var(--brass); border-color: var(--brass); }
    .nb-tutor.teaching .nb-tutor-type-btn { display: none; }
    .nb-visually-hidden {
        position: absolute; width: 1px; height: 1px; margin: -1px;
        padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
    }
    .bubble-refresh { animation: bubbleRefresh 0.34s ease-out; }
    @keyframes bubbleRefresh { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
    /* Arrival — Zeno POPS up at his center spot (overshoot from his feet). */
    .nb-tutor-live.arriving .nb-tutor-zeno-group { animation: tutorArrive 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; transform-origin: 50% 100%; }
    @keyframes tutorArrive {
        0% { opacity: 0; transform: translateY(18px) scale(0.55); }
        100% { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* The student's line — the one card left in the room (founder, 2026-08-18:
       Zeno's words lost their bubble; yours keep the white card so what YOU
       said is visibly a thing you handed him). Bottom middle, above the
       status strip, where the answering happens. */
    .nb-tutor-student-line {
        position: absolute; z-index: 12; left: 50%; transform: translateX(-50%);
        width: max-content; max-width: min(560px, calc(100% - 48px)); opacity: 0;
        transition: opacity 0.3s ease;
    }
    .speech-bubble {
        position: relative; padding: 12px 18px;
        font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.55;
    }
    .speech-bubble::before, .speech-bubble::after { content: none; }
    .student-bubble {
        display: block; max-width: 100%;
        background: var(--paper);
        border: 1px solid rgba(34, 48, 58, 0.14);
        border-radius: 16px 16px 4px 16px;
        box-shadow: 0 4px 14px rgba(34, 48, 58, 0.05);
        color: var(--paper-ink);
        padding: 14px 18px;
        font-size: 15.5px;
    }
    .student-bubble .speech-label {
        font-family: var(--font-ui); font-size: 11px; font-weight: 400;
        letter-spacing: 0.01em; text-transform: none;
        color: var(--paper-meta); margin-bottom: 5px;
    }
    .speech-label {
        font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500;
        letter-spacing: 0.2em; text-transform: uppercase;
        color: var(--paper-meta); margin-bottom: 4px;
    }
    .speech-text { color: inherit; word-wrap: break-word; }

    /* Status strip — the centered voice lane. Pause and Type live together in
       the separate right-edge utility strip until the lesson player takes over. */
    .nb-tutor-status-strip {
        position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
        z-index: 40; white-space: nowrap;
        display: flex; flex-direction: column; align-items: center; gap: 8px;
    }
    /* Hidden while a lesson is on the board: the embedded player carries its own
       status strip there (reality — the lesson is a full iframe, not placeholder
       content floating over the room). */
    .nb-tutor.teaching .nb-tutor-status-strip { display: none; }
    .status-bar {
        font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
        letter-spacing: 0.2em; text-transform: uppercase;
        color: var(--ink-3); text-align: center; min-height: 1.4rem;
    }
    .status-bar kbd {
        background: rgba(34, 48, 58, 0.06); border: 1px solid rgba(34, 48, 58, 0.25);
        border-radius: 2px; padding: 1px 6px;
        font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-body);
    }
    .status-bar.recording { color: var(--brass); font-weight: 600; }
    .status-bar.recording::before { content: "● "; color: var(--brass); animation: pulseDot 1s infinite; }
    .nb-tutor-break-btn {
        min-height: 36px; border: 1px solid rgba(34, 48, 58, 0.22);
        border-radius: 999px; padding: 7px 13px; background: rgba(255,255,255,.44);
        color: var(--ink-3); display: inline-flex; align-items: center; gap: 7px;
        font-family: var(--font-ui); font-size: 11.5px; cursor: pointer;
    }
    .nb-tutor-break-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .nb-tutor-break-btn .nb-tutor-resume-icon { display: none; fill: currentColor; stroke: none; }
    .nb-tutor-break-btn:hover { color: var(--ink-body); border-color: rgba(34, 48, 58, 0.48); }
    .nb-tutor-break-btn.is-resume { color: var(--brass); border-color: var(--brass); }
    .nb-tutor-break-btn.is-resume .nb-tutor-pause-icon { display: none; }
    .nb-tutor-break-btn.is-resume .nb-tutor-resume-icon { display: block; }
    .nb-tutor-break-btn:disabled { opacity: .45; cursor: default; }
    @keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

