/* Pointalk 教育家族 · 方向 C（纯白点阵笔记本）设计系统
 * 与指点（Pointalk）共享同一套视觉基因：
 *   - 细蓝钢笔墨色 #1B3B6F 为主，暖橙 #DC641E 为单一行动强调，亮蓝 #2563A8 与玉青 #1D8A7A 辅助状态
 *   - 纯白纸面微浮起 + 极淡蓝灰点阵 #DCE4EE（只在画板与原卷舞台）
 *   - 全站严格三级统一圆角：卡片 14px / 按钮 10px / 标签 6px
 *   - 品牌与板书采用书卷楷体层级，界面采用系统无衬线，利落弹性动效并尊重减少动态设置
 */
:root {
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --surface-subtle: #F5F7FA;
    --ink: #1B3B6F;
    --ink-2: #3F5B87;
    --muted: #7B8EA8;
    --line: #E3E9F1;
    --line-strong: #CBD6E6;
    --texture: #DCE4EE;
    --tone-1: #DC641E;
    --tone-1-soft: rgba(220, 100, 30, 0.1);
    --tone-2: #2563A8;
    --tone-2-soft: rgba(37, 99, 168, 0.09);
    --tone-3: #1D8A7A;
    --tone-3-soft: rgba(29, 138, 122, 0.1);
    --shadow-soft: 0 0 0 1px var(--line), 0 1px 3px rgba(27, 59, 111, 0.03), 0 14px 36px -18px rgba(27, 59, 111, 0.15);
    --shadow-sm: 0 1px 2px rgba(27, 59, 111, 0.04), 0 6px 18px -10px rgba(27, 59, 111, 0.14);
    --shadow-pop: 0 0 0 1px rgba(27, 59, 111, 0.14), 0 4px 12px rgba(27, 59, 111, 0.07), 0 24px 56px -14px rgba(27, 59, 111, 0.18);
    --r-card: 14px;
    --r-btn: 10px;
    --r-tag: 6px;
    --ease-pop: cubic-bezier(0.32, 1.32, 0.45, 1);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --hand: "LXGW WenKai Lite", "Kaiti SC", "STKaiti", serif;
    --font: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow: hidden;
}

button,
input,
a {
    font: inherit;
    color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid rgba(37, 99, 168, 0.65);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

/* ==================== 顶部克制蓝墨导航栏 ==================== */
.global-bar {
    position: relative;
    z-index: 40;
    height: 58px;
    padding: 0 20px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
}

.global-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 11px 0 9px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink-2);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: transform 0.18s var(--ease), border-color 0.18s, color 0.18s, box-shadow 0.18s;
}

.back-link:hover {
    color: var(--ink);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
    transform: translateX(-1px);
}

.bar-sep {
    width: 1px;
    height: 16px;
    background: var(--line);
    flex-shrink: 0;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.brand-mark {
    flex-shrink: 0;
}

.brand-mark .mark-ring {
    fill: none;
    stroke: var(--tone-2);
    stroke-width: 2.3;
}

.brand-mark .mark-tip {
    fill: var(--ink);
}

.brand-title {
    margin: 0;
    font-family: var(--hand);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--ink);
    white-space: nowrap;
}

.brand-en {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: var(--muted);
    white-space: nowrap;
}

/* 居中 Pointalk 风格分段切换器（三级圆角 btn） */
.step-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: var(--surface-subtle);
}

.step-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border: none;
    border-radius: calc(var(--r-btn) - 2px);
    background: transparent;
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.step-pill:hover {
    color: var(--ink);
}

.step-pill.is-active {
    background: var(--ink);
    color: #FFFFFF;
}

.step-idx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: var(--r-tag);
    font-size: 11px;
    font-weight: 600;
    background: rgba(27, 59, 111, 0.08);
    color: var(--ink);
}

.step-pill.is-active .step-idx {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--r-tag);
    font-size: 11px;
    font-weight: 600;
    background: rgba(27, 59, 111, 0.08);
    color: var(--ink);
}

.step-pill.is-active .step-badge {
    background: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
}

.step-arrow {
    display: inline-flex;
    color: var(--muted);
    opacity: 0.6;
}

.global-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.icon-pill-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s var(--ease);
}

.icon-pill-btn:hover {
    color: var(--ink);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

/* ==================== Vivic Live 流体混沌球 ==================== */
.fde-voice-slot {
    position: relative;
}

.fde-v-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px 0 7px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.22s var(--ease);
}

.fde-v-btn:hover:not(:disabled) {
    border-color: var(--tone-2);
    box-shadow: 0 4px 16px -6px rgba(27, 59, 111, 0.2);
    transform: translateY(-1px);
}

.fde-v-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.fde-v-btn.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #FFFFFF;
}

.chaos-orb {
    position: relative;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chaos-orb--sm {
    width: 18px;
    height: 18px;
}

.chaos-orb-core {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 28% 28%, #93c5fd 0%, transparent 52%),
        radial-gradient(circle at 74% 34%, #c084fc 0%, transparent 54%),
        radial-gradient(circle at 46% 78%, #38bdf8 0%, transparent 56%),
        linear-gradient(135deg, #2563eb 0%, #7c3aed 55%, #06b6d4 100%);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.72), 0 0 8px rgba(37, 99, 168, 0.28);
    animation: chaos-spin 7s linear infinite;
}

.chaos-orb-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid rgba(37, 99, 168, 0.3);
    opacity: 0;
    transition: opacity 0.25s;
}

.fde-v-btn.is-active .chaos-orb-core {
    animation: chaos-spin 2.2s linear infinite, chaos-pulse 1.5s ease-in-out infinite;
}

.fde-v-btn.is-active .chaos-orb-ring {
    opacity: 1;
    animation: chaos-ripple 1.8s ease-out infinite;
}

@keyframes chaos-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes chaos-pulse {
    0%, 100% { filter: brightness(1) saturate(1.05); }
    50% { filter: brightness(1.16) saturate(1.22); }
}

@keyframes chaos-ripple {
    0% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1.45); opacity: 0; }
}

.fde-v-bars {
    display: none;
    align-items: center;
    gap: 2px;
    height: 11px;
}

.fde-v-btn.is-active .fde-v-bars {
    display: inline-flex;
}

.fde-v-bars i {
    width: 2px;
    height: 100%;
    border-radius: 2px;
    background: #93c5fd;
    animation: v-bar 0.9s ease-in-out infinite;
}

.fde-v-bars i:nth-child(2) { animation-delay: 0.16s; }
.fde-v-bars i:nth-child(3) { animation-delay: 0.32s; }

@keyframes v-bar {
    0%, 100% { transform: scaleY(0.35); }
    50% { transform: scaleY(1); }
}

/* 混沌球悬浮知识卡（Pointalk pop-card 质感） */
.fde-v-pop {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 328px;
    max-width: calc(100vw - 24px);
    padding: 14px 16px;
    border-radius: var(--r-card);
    background: #FFFFFF;
    box-shadow: var(--shadow-pop);
    z-index: 80;
    transform-origin: top right;
    animation: pop-card-in 0.28s var(--ease-pop);
}

.fde-v-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.fde-v-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.fde-v-status {
    margin: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.45;
}

.fde-v-close {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: var(--r-tag);
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.fde-v-close:hover {
    background: var(--surface-subtle);
    color: var(--ink);
}

.fde-v-cap {
    margin: 7px 0 0;
    font-size: 13px;
    line-height: 1.55;
}

.fde-v-cap:empty {
    display: none;
}

.fde-v-user {
    color: var(--muted);
}

.fde-v-ai {
    color: var(--ink);
    font-weight: 500;
}

.fde-v-cards {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.fde-v-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

.fde-v-card-summary {
    margin: 0 0 8px;
    font-size: 12.5px;
    color: var(--ink-2);
}

.fde-v-link-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fde-v-link-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 8px;
    padding: 8px 11px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: #FFFFFF;
    text-decoration: none;
    transition: border-color 0.18s, background 0.18s, transform 0.18s var(--ease);
}

.fde-v-link-card:hover {
    border-color: var(--tone-2);
    background: var(--tone-2-soft);
    transform: translateY(-1px);
}

.fde-v-link-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
}

.fde-v-link-desc {
    grid-column: 1;
    font-size: 11.5px;
    color: var(--muted);
}

.fde-v-link-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
    font-size: 13px;
    color: var(--tone-2);
}

.fde-v-card-row {
    font-size: 12.5px;
    color: var(--ink-2);
    padding: 4px 0;
}

/* ==================== 可选轻量引导条 ==================== */
.onboarding-bar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--line);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: slide-down 0.22s var(--ease);
}

.onboarding-steps {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.guide-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border-radius: var(--r-card);
    border: 1px solid var(--line);
    background: #FFFFFF;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.guide-card:hover {
    border-color: var(--tone-2);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.guide-num {
    width: 24px;
    height: 24px;
    border-radius: var(--r-tag);
    background: var(--tone-2-soft);
    color: var(--ink);
    box-shadow: inset 0 0 0 1.2px rgba(27, 59, 111, 0.24);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.guide-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.guide-desc {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== Pointalk 家族按钮体系 ==================== */
.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 13px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.18s var(--ease);
}

.ui-btn:hover:not(:disabled) {
    border-color: rgba(27, 59, 111, 0.3);
    box-shadow: var(--shadow-sm);
    transform: translateY(-0.5px);
}

.ui-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.ui-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.ui-btn-sm {
    height: 31px;
    padding: 0 11px;
    font-size: 12.5px;
}

.ui-btn-ink {
    background: var(--ink);
    border-color: var(--ink);
    color: #FFFFFF;
}

.ui-btn-ink:hover:not(:disabled) {
    background: #152E59;
    border-color: #152E59;
    box-shadow: 0 6px 18px -8px rgba(27, 59, 111, 0.42);
}

.ui-btn[aria-pressed="true"] {
    background: var(--tone-2-soft);
    border-color: var(--tone-2);
    color: var(--tone-2);
}

.chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.18s var(--ease);
}

.chip-btn:hover {
    border-color: var(--line-strong);
    color: var(--ink);
}

.chip-btn.is-selected {
    background: var(--ink);
    border-color: var(--ink);
    color: #FFFFFF;
}

.chip-upload {
    border-style: dashed;
    border-color: var(--line-strong);
    color: var(--ink);
}

.chip-upload:hover {
    border-color: var(--tone-2);
    color: var(--tone-2);
    background: var(--tone-2-soft);
}

.text-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--r-tag);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.text-btn:hover {
    color: var(--ink);
    background: var(--surface-subtle);
}

.icon-close-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--r-tag);
    background: var(--surface-subtle);
    color: var(--ink-2);
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.icon-close-btn:hover {
    background: rgba(27, 59, 111, 0.1);
    color: var(--ink);
}

.local-privacy-note {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 9px;
    border-radius: var(--r-tag);
    background: var(--tone-3-soft);
    color: var(--tone-3);
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

/* ==================== 主体双视图容器 ==================== */
.app-main {
    height: calc(100vh - 58px);
    height: calc(100dvh - 58px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFFFFF;
}

.view-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    animation: fade-in 0.22s var(--ease);
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pop-card-in {
    from { opacity: 0; transform: scale(0.92) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 步骤一：智能切题工作区（对齐 Pointalk 导题台） ==================== */
.cut-toolbar {
    padding: 10px 20px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}

.toolbar-samples {
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 1px;
}

.toolbar-samples::-webkit-scrollbar {
    display: none;
}

.cut-workspace {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 356px;
    background: #FFFFFF;
}

.paper-pane {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-right: 1px solid var(--line);
}

.paper-bar {
    height: 46px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    background: #FFFFFF;
}

.paper-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.doc-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-note {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pager {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: var(--surface-subtle);
    flex-shrink: 0;
}

.pager-btn {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: var(--r-tag);
    background: transparent;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.pager-btn:hover:not(:disabled) {
    background: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

.pager-btn:disabled {
    opacity: 0.34;
    cursor: not-allowed;
}

.page-indicator {
    min-width: 44px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
}

/* 原卷预览舞台：Pointalk 方向 C 同款极淡蓝灰 22px 点阵笔记本底面 */
.paper-scroll {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 26px 24px 48px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #FFFFFF;
    background-image: radial-gradient(circle at 1px 1px, rgba(220, 228, 238, 0.92) 1.15px, transparent 1.45px);
    background-size: 22px 22px;
    background-position: 11px 11px;
}

.paper-stage {
    position: relative;
    display: inline-block;
    border-radius: var(--r-card);
    background: #FFFFFF;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.paper-stage.is-manual-crop {
    cursor: crosshair;
    touch-action: none;
    box-shadow: 0 0 0 2px var(--tone-2), 0 16px 38px -18px rgba(27, 59, 111, 0.24);
}

#pdf-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 可点击交互的自动切题框（钢笔亮蓝线 + 暖橙焦点强调） */
.auto-boxes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cut-box-overlay {
    position: absolute;
    border: 1.5px dashed rgba(37, 99, 168, 0.48);
    border-radius: var(--r-btn);
    background: rgba(37, 99, 168, 0.025);
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.paper-stage.is-manual-crop .cut-box-overlay {
    pointer-events: none;
}

.cut-box-overlay:hover,
.cut-box-overlay.is-active {
    border-style: solid;
    border-color: var(--tone-1);
    background: rgba(220, 100, 30, 0.055);
    box-shadow: 0 4px 16px -6px rgba(220, 100, 30, 0.22);
    z-index: 4;
}

.cut-box-badge {
    position: absolute;
    top: -11px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: var(--r-tag);
    background: #FFFFFF;
    border: 1px solid rgba(37, 99, 168, 0.32);
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.18s var(--ease);
}

.cut-box-overlay:hover .cut-box-badge,
.cut-box-overlay.is-active .cut-box-badge {
    background: var(--tone-1);
    border-color: var(--tone-1);
    color: #FFFFFF;
}

.cut-box-go {
    display: none;
    font-size: 10.5px;
    font-weight: 500;
}

.cut-box-overlay:hover .cut-box-go,
.cut-box-overlay.is-active .cut-box-go {
    display: inline;
}

.drag-rect {
    position: absolute;
    border: 2px solid var(--tone-2);
    background: rgba(37, 99, 168, 0.12);
    border-radius: var(--r-tag);
    pointer-events: none;
    z-index: 10;
}

.drag-rect-tip {
    position: absolute;
    right: 4px;
    bottom: -24px;
    padding: 2px 8px;
    border-radius: var(--r-tag);
    background: var(--ink);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.drop-overlay {
    position: absolute;
    inset: 16px;
    border-radius: var(--r-card);
    border: 2px dashed var(--tone-2);
    background: rgba(255, 255, 255, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
    pointer-events: none;
}

.drop-overlay-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}

/* 右侧已切题目列表（干净纯白讲义纸留白） */
.cuts-sidebar {
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
}

.drawer-handle {
    display: none;
}

.cuts-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cuts-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cuts-heading {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cuts-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: var(--r-tag);
    background: var(--tone-2-soft);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
}

.cuts-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.cuts-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cut-empty {
    padding: 36px 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-card);
}

.cut-card {
    border-radius: var(--r-card);
    border: 1px solid var(--line);
    background: #FFFFFF;
    padding: 11px 12px;
    transition: all 0.2s var(--ease);
    animation: fade-in 0.22s var(--ease);
}

.cut-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.cut-card.is-highlighted {
    border-color: var(--tone-1);
    box-shadow: 0 0 0 2px var(--tone-1-soft), var(--shadow-sm);
}

.cut-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 9px;
}

.cut-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.cut-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cut-tag {
    padding: 1px 7px;
    border-radius: var(--r-tag);
    background: var(--surface-subtle);
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.cut-tag.is-merged {
    background: var(--tone-1-soft);
    color: var(--tone-1);
}

.cut-tag.is-manual {
    background: var(--tone-2-soft);
    color: var(--tone-2);
}

.cut-card-ops {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.mini-op-btn {
    height: 24px;
    padding: 0 6px;
    border: none;
    border-radius: var(--r-tag);
    background: transparent;
    color: var(--muted);
    font-size: 11.5px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.mini-op-btn:hover:not(:disabled) {
    background: var(--surface-subtle);
    color: var(--ink);
}

.mini-op-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.mini-op-danger:hover:not(:disabled) {
    background: var(--tone-1-soft);
    color: var(--tone-1);
}

.mini-op-teach {
    color: var(--tone-2);
    font-weight: 600;
}

.mini-op-teach:hover {
    background: var(--tone-2-soft);
    color: var(--tone-2);
}

.cut-thumb-btn {
    display: block;
    width: 100%;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    background: #FFFFFF;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.18s;
}

.cut-thumb-btn:hover {
    border-color: var(--tone-2);
}

.cut-thumb-btn img {
    display: block;
    width: 100%;
    max-height: 118px;
    object-fit: contain;
    object-position: left top;
}

/* ==================== 步骤二：纯白点阵笔记白板与录制 ==================== */
.lesson-toolbar {
    min-height: 52px;
    padding: 8px 20px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.lesson-left,
.lesson-center,
.record-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.lesson-doc-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zoom-stepper {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: var(--surface-subtle);
}

.zoom-step-btn,
.zoom-reset-btn {
    height: 26px;
    border: none;
    border-radius: var(--r-tag);
    background: transparent;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.zoom-step-btn {
    width: 26px;
}

.zoom-reset-btn {
    min-width: 48px;
    padding: 0 6px;
    font-variant-numeric: tabular-nums;
}

.zoom-step-btn:hover,
.zoom-reset-btn:hover {
    background: #FFFFFF;
    color: var(--ink);
}

.paper-style-group {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: var(--surface-subtle);
}

.paper-style-btn {
    height: 26px;
    padding: 0 10px;
    border: none;
    border-radius: var(--r-tag);
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s var(--ease);
}

.paper-style-btn.is-active {
    background: #FFFFFF;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

/* Pointalk 方向 C 唯一暖橙强调按钮：开始录制（对标 Pointalk 举手按钮 #DC641E） */
.btn-record {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 15px;
    border-radius: var(--r-btn);
    border: none;
    background: var(--tone-1);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(27, 59, 111, 0.08), 0 10px 22px -8px rgba(220, 100, 30, 0.36);
    transition: transform 0.2s var(--ease-pop), background 0.18s, box-shadow 0.2s;
}

.btn-record:hover {
    background: #C85616;
    transform: translateY(-1px);
}

.btn-record:active {
    transform: scale(0.96);
}

.rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFFFFF;
}

.btn-record.is-recording {
    background: var(--ink);
    box-shadow: 0 6px 18px -6px rgba(27, 59, 111, 0.34);
}

.btn-record.is-recording .rec-dot {
    background: var(--tone-1);
    animation: rec-blink 1s ease-in-out infinite;
}

@keyframes rec-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.38; transform: scale(0.8); }
}

/* 讲题主体：左侧精简题单 + 右侧纯白点阵笔记白板 */
.lesson-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    position: relative;
}

.q-sidebar {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: #FFFFFF;
}

.q-sidebar-head {
    height: 44px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.q-head-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.q-total-pill {
    padding: 1px 7px;
    border-radius: var(--r-tag);
    background: var(--tone-2-soft);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink);
}

.q-sidebar-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.q-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: var(--r-btn);
    background: transparent;
    color: var(--ink-2);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s var(--ease);
}

.q-nav-item:hover {
    background: var(--surface-subtle);
    color: var(--ink);
}

.q-nav-item.is-active {
    background: var(--ink);
    color: #FFFFFF;
    font-weight: 600;
}

.q-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.q-rec-badge {
    padding: 1px 6px;
    border-radius: var(--r-tag);
    background: var(--tone-3-soft);
    color: var(--tone-3);
    font-size: 10.5px;
    font-weight: 600;
    flex-shrink: 0;
}

.q-nav-item.is-active .q-rec-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

.q-sidebar-foot {
    padding: 10px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.q-foot-btn {
    height: 31px;
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    background: #FFFFFF;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.16s;
}

.q-foot-btn:hover {
    border-color: var(--line-strong);
    color: var(--ink);
    background: var(--surface-subtle);
}

.q-foot-danger:hover {
    border-color: rgba(220, 100, 30, 0.32);
    background: var(--tone-1-soft);
    color: var(--tone-1);
}

.inline-popover {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 52px;
    padding: 10px;
    border-radius: var(--r-card);
    background: #FFFFFF;
    box-shadow: var(--shadow-pop);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 30;
    animation: pop-card-in 0.2s var(--ease-pop);
}

.rename-input {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line-strong);
    outline: none;
    font-size: 13px;
}

.rename-input:focus {
    border-color: var(--tone-2);
    box-shadow: 0 0 0 3px var(--tone-2-soft);
}

.popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.popover-item {
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: var(--r-btn);
    background: transparent;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
}

.popover-item:hover {
    background: var(--surface-subtle);
}

/* 中央纯白点阵笔记本大画布 */
.board-workspace {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #F5F7FA;
}

.board-viewport {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 22px 26px 96px;
    display: flex;
    align-items: flex-start;
}

.board-stage {
    position: relative;
    flex-shrink: 0;
    margin-inline: auto;
    border-radius: var(--r-card);
    background: #FFFFFF;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    touch-action: none;
}

.board-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

#board-base,
#board-ink {
    pointer-events: none;
}

#board-live {
    pointer-events: auto;
    cursor: crosshair;
}

.board-stage.is-pan #board-live {
    cursor: grab;
}

.board-stage.is-pan:active #board-live {
    cursor: grabbing;
}

.board-stage.is-text #board-live {
    cursor: text;
}

/* 左右轻盈切题悬浮按钮 */
.board-nav-fab {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    z-index: 15;
    transition: all 0.2s var(--ease);
}

.board-nav-fab:hover {
    color: var(--ink);
    border-color: var(--tone-2);
    box-shadow: var(--shadow-soft);
    transform: translateY(-50%) scale(1.05);
}

.board-nav-prev { left: 18px; }
.board-nav-next { right: 18px; }

/* 原位文字批注输入浮框（霞鹜文楷书卷板书感） */
.text-annot-box {
    position: fixed;
    z-index: 70;
    padding: 7px;
    border-radius: var(--r-card);
    border: 1px solid var(--tone-2);
    background: #FFFFFF;
    box-shadow: var(--shadow-pop);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pop-card-in 0.18s var(--ease-pop);
}

.text-annot-input {
    width: 240px;
    height: 32px;
    padding: 0 8px;
    border: none;
    outline: none;
    font-family: var(--hand);
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    background: transparent;
}

/* ==================== 底部悬浮工具栏（Pointalk 方向 C 卡片质感） ==================== */
.board-dock-wrap {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    max-width: calc(100% - 28px);
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shapes-popover {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: var(--r-card);
    background: #FFFFFF;
    box-shadow: var(--shadow-pop);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    transform-origin: bottom center;
    animation: pop-card-in 0.22s var(--ease-pop);
}

.shapes-popover .dock-btn {
    width: auto;
    height: 36px;
    padding: 0 11px;
    gap: 5px;
    font-size: 12.5px;
}

.board-dock {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: var(--r-card);
    background: #FFFFFF;
    box-shadow: var(--shadow-pop);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.dock-scroll-hint,
.zoom-in-label {
    display: none;
}

.board-dock::-webkit-scrollbar {
    display: none;
}

.dock-group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.dock-sep {
    width: 1px;
    height: 20px;
    background: var(--line);
    flex-shrink: 0;
    margin: 0 2px;
}

.dock-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--r-btn);
    background: transparent;
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s var(--ease);
}

.dock-btn:hover:not(:disabled) {
    background: var(--surface-subtle);
    color: var(--ink);
}

.dock-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dock-btn.is-active {
    background: var(--ink);
    color: #FFFFFF;
}

.swatch-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--sw);
    cursor: pointer;
    margin: 0 3px;
    transition: transform 0.18s var(--ease-pop), box-shadow 0.18s;
}

.swatch-btn:hover {
    transform: scale(1.14);
}

.swatch-btn.is-active {
    transform: scale(1.16);
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--sw);
}

.size-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--r-tag);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.16s;
}

.size-btn:hover {
    background: var(--surface-subtle);
}

.size-btn.is-active {
    background: var(--tone-2-soft);
    box-shadow: inset 0 0 0 1px rgba(27, 59, 111, 0.2);
}

.size-dot {
    border-radius: 50%;
    background: var(--ink);
}

.dock-text-btn {
    height: 32px;
    padding: 0 10px;
    border: none;
    border-radius: var(--r-btn);
    background: transparent;
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.dock-text-btn:hover {
    background: var(--surface-subtle);
    color: var(--ink);
}

.dock-text-danger:hover {
    background: var(--tone-1-soft);
    color: var(--tone-1);
}

/* ==================== 回放影院弹窗与提示 ==================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(27, 59, 111, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-sheet {
    width: 100%;
    max-width: 820px;
    border-radius: var(--r-card);
    background: #FFFFFF;
    box-shadow: var(--shadow-pop);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: pop-card-in 0.26s var(--ease-pop);
}

.modal-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.modal-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

.modal-meta {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--muted);
}

.modal-video-wrap {
    padding: 18px 22px;
    background: var(--surface-subtle);
}

#preview-video {
    display: block;
    width: 100%;
    max-height: 58vh;
    border-radius: var(--r-btn);
    background: #1B3B6F;
}

.modal-clips-strip {
    padding: 10px 22px 4px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.modal-clips-strip:empty {
    display: none;
}

.clip-chip {
    padding: 5px 12px;
    border-radius: var(--r-btn);
    border: 1px solid var(--line);
    background: #FFFFFF;
    font-size: 12px;
    color: var(--ink-2);
    cursor: pointer;
}

.clip-chip.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #FFFFFF;
}

.modal-foot {
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-foot-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast {
    position: fixed;
    left: 50%;
    top: 70px;
    transform: translateX(-50%);
    z-index: 120;
    padding: 8px 16px;
    border-radius: var(--r-tag);
    background: var(--ink);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-pop);
    max-width: calc(100vw - 32px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    animation: pop-card-in 0.2s var(--ease-pop);
}

.mobile-only {
    display: none;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(27, 59, 111, 0.24);
    backdrop-filter: blur(4px);
    z-index: 55;
}

/* ==================== 移动端（≤920px）Pointalk 平板/手机流畅适配 ==================== */
@media (max-width: 920px) {
    .mobile-only {
        display: inline-flex;
    }

    .desktop-only-inline,
    .brand-lockup,
    .bar-sep,
    .local-privacy-note,
    .lesson-doc-title,
    .board-nav-fab {
        display: none !important;
    }

    .global-bar {
        height: 54px;
        padding: 0 10px;
        grid-template-columns: auto 1fr auto;
        gap: 6px;
    }

    .back-link {
        height: 30px;
        padding: 0 9px 0 7px;
        font-size: 12px;
    }

    .back-link-text {
        display: none;
    }

    .back-link::after {
        content: "主站";
    }

    .step-switcher {
        justify-self: center;
    }

    .step-pill {
        height: 28px;
        padding: 0 9px;
        font-size: 12px;
        gap: 4px;
    }

    .step-idx {
        display: none;
    }

    .fde-v-label {
        display: none;
    }

    .fde-v-btn {
        padding: 0 7px;
        height: 32px;
    }

    .onboarding-steps {
        grid-template-columns: 1fr;
    }

    .cut-toolbar {
        padding: 8px 10px;
        gap: 8px;
    }

    .toolbar-samples {
        width: 100%;
    }

    .toolbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .toolbar-actions .ui-btn {
        flex: 1;
        height: 32px;
    }

    .cut-workspace {
        grid-template-columns: 1fr;
    }

    .paper-pane {
        border-right: none;
    }

    .paper-bar {
        padding: 0 10px;
        height: 42px;
    }

    .status-note {
        display: none;
    }

    .paper-scroll {
        padding: 12px 10px 84px;
    }

    .cuts-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 76vh;
        border-radius: var(--r-card) var(--r-card) 0 0;
        box-shadow: 0 -12px 40px rgba(27, 59, 111, 0.16);
        z-index: 60;
        transform: translateY(105%);
        transition: transform 0.28s var(--ease);
    }

    .cuts-sidebar.is-drawer-open {
        transform: translateY(0);
    }

    .drawer-handle {
        display: flex;
        justify-content: center;
        padding: 8px 0 2px;
    }

    .drawer-handle span {
        width: 36px;
        height: 4px;
        border-radius: 4px;
        background: var(--line-strong);
    }

    .mobile-cut-bar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        z-index: 45;
        padding: 7px 8px 7px 14px;
        border-radius: var(--r-card);
        background: #FFFFFF;
        box-shadow: var(--shadow-pop);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .mobile-sheet-trigger {
        border: none;
        background: transparent;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        font-size: 13px;
        font-weight: 500;
        color: var(--ink);
        cursor: pointer;
    }

    .mobile-sheet-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--tone-1);
    }

    .mobile-go-teach {
        height: 36px;
        padding: 0 16px;
        font-size: 13px;
        font-weight: 600;
    }

    .lesson-toolbar {
        padding: 6px 10px;
        gap: 6px;
    }

    .lesson-center {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }

    .record-controls #mic-label {
        display: none;
    }

    .lesson-body {
        grid-template-columns: 1fr;
    }

    .q-sidebar {
        position: fixed;
        left: 0;
        top: 54px;
        bottom: 0;
        width: 264px;
        max-width: 82vw;
        z-index: 60;
        box-shadow: 12px 0 36px rgba(27, 59, 111, 0.16);
        transform: translateX(-105%);
        transition: transform 0.26s var(--ease);
    }

    .q-sidebar.is-drawer-open {
        transform: translateX(0);
    }

    .board-viewport {
        padding: 12px 10px 84px;
    }

    .board-dock-wrap {
        bottom: max(10px, env(safe-area-inset-bottom));
        max-width: calc(100vw - 16px);
    }

    .board-dock {
        width: 100%;
        padding: 5px 8px;
        gap: 4px;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    .board-dock::-webkit-scrollbar {
        display: block;
        height: 4px;
    }

    .dock-scroll-hint {
        display: block;
        margin: 0 0 4px;
        padding: 2px 8px;
        border-radius: var(--r-btn);
        background: #FFFFFF;
        color: var(--ink);
        font-size: 11px;
    }

    #zoom-in {
        width: auto;
        padding-inline: 5px;
        white-space: nowrap;
    }

    .zoom-in-label {
        display: inline;
        font-size: 11px;
    }

    .dock-btn {
        width: 33px;
        height: 33px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
