/* 定制剧场 · 场记选角 / 剧本编辑 / 演出框架（仅限剧场 overlay） */
#custom-theater-app .ct-topbar-settings {
    min-width: 44px;
    height: 34px;
    padding: 0 7px;
    border: 1px solid rgba(49, 56, 68, 0.16);
    border-radius: 12px;
    color: var(--ct-ink);
    background: rgba(255, 250, 243, 0.64);
    font: 700 10px/1 "Microsoft YaHei", sans-serif;
    letter-spacing: .06em;
    cursor: pointer;
    touch-action: manipulation;
}

#custom-theater-app .ct-topbar-settings[hidden],
#custom-theater-app [hidden] {
    display: none !important;
}

#custom-theater-app .ct-source-picker {
    display: grid;
    gap: 12px;
}

#custom-theater-app .ct-source-loading,
#custom-theater-app .ct-source-error,
#custom-theater-app .ctf-flow-loading,
#custom-theater-app .ctf-flow-error {
    box-sizing: border-box;
    width: 100%;
    padding: 18px;
    border: 1px solid rgba(49, 56, 68, .14);
    border-radius: 16px;
    color: var(--ct-ink-soft);
    background: rgba(255, 252, 247, .78);
    text-align: center;
    font-size: 12px;
    line-height: 1.7;
}

#custom-theater-app .ct-source-error,
#custom-theater-app .ctf-flow-error {
    color: #744c4c;
    border-color: rgba(116, 76, 76, .24);
    background: rgba(255, 243, 240, .88);
}

#custom-theater-app .ct-source-error strong,
#custom-theater-app .ctf-flow-error strong {
    display: block;
    color: #623e3e;
    font-size: 14px;
}

#custom-theater-app .ct-source-error p,
#custom-theater-app .ctf-flow-error p { margin: 5px 0; }
#custom-theater-app .ct-source-error code,
#custom-theater-app .ctf-flow-error code { font: 10px/1.4 "Courier New", monospace; }

#custom-theater-app .ctf-picker-block {
    padding: 14px;
    border: 1px solid rgba(49, 56, 68, .13);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(255, 252, 247, .88), rgba(237, 226, 216, .78));
    box-shadow: 7px 7px 16px rgba(90, 77, 66, .08), -5px -5px 15px rgba(255, 255, 255, .45);
}

#custom-theater-app .ctf-picker-heading,
#custom-theater-app .ctf-group-label,
#custom-theater-app .ctf-preset-box > div:first-child {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

#custom-theater-app .ctf-picker-heading > div,
#custom-theater-app .ctf-section-title > div { min-width: 0; }

#custom-theater-app .ctf-picker-heading span,
#custom-theater-app .ctf-flow-hero > span,
#custom-theater-app .ctf-role-head span,
#custom-theater-app .ctf-stage-empty > span,
#custom-theater-app .ctf-actor-panel-card header span,
#custom-theater-app .ctf-stage-settings header span {
    display: block;
    margin-bottom: 3px;
    color: #9a6b68;
    font: 700 9px/1.2 "Courier New", monospace;
    letter-spacing: .15em;
}

#custom-theater-app .ctf-picker-heading strong {
    display: block;
    font-size: 14px;
    letter-spacing: .05em;
}

#custom-theater-app .ctf-picker-heading small,
#custom-theater-app .ctf-group-label span {
    color: var(--ct-ink-soft);
    font-size: 10px;
    line-height: 1.45;
}

#custom-theater-app .ctf-director-select {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    color: var(--ct-ink-soft);
    font-size: 11px;
}

#custom-theater-app .ctf-director-select select,
#custom-theater-app .ctf-form-grid select,
#custom-theater-app .ctf-form-grid input,
#custom-theater-app .ctf-wide-field input,
#custom-theater-app .ctf-wide-field textarea,
#custom-theater-app .ctf-role-card input,
#custom-theater-app .ctf-role-card textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid rgba(49, 56, 68, .18);
    border-radius: 11px;
    outline: 0;
    color: var(--ct-ink);
    background: rgba(255, 253, 249, .8);
    font: 12px/1.65 inherit;
    box-shadow: inset 2px 2px 5px rgba(92, 80, 70, .05);
}

#custom-theater-app .ctf-director-select select,
#custom-theater-app .ctf-form-grid select,
#custom-theater-app .ctf-form-grid input,
#custom-theater-app .ctf-wide-field input,
#custom-theater-app .ctf-role-card input {
    min-height: 43px;
    padding: 8px 10px;
}

#custom-theater-app .ctf-wide-field textarea,
#custom-theater-app .ctf-role-card textarea {
    display: block;
    min-height: 96px;
    padding: 10px 11px;
    resize: vertical;
}

#custom-theater-app .ctf-picker-note {
    margin: 9px 0 12px;
    padding: 8px 10px;
    border-left: 3px solid #c88782;
    color: #665b56;
    background: rgba(244, 206, 206, .28);
    font-size: 10px;
    line-height: 1.6;
}

#custom-theater-app .ctf-actor-group { margin-top: 8px; }
#custom-theater-app .ctf-group-label { margin-bottom: 8px; }
#custom-theater-app .ctf-group-label strong { font-size: 11px; }

#custom-theater-app .ctf-actor-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

#custom-theater-app .ctf-actor-choice {
    position: relative;
    min-width: 0;
    min-height: 60px;
    padding: 8px 31px 8px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(49, 56, 68, .13);
    border-radius: 13px;
    background: rgba(255, 252, 248, .68);
    cursor: pointer;
    touch-action: manipulation;
}

#custom-theater-app .ctf-actor-choice.is-checked {
    border-color: rgba(154, 107, 104, .48);
    background: rgba(247, 221, 216, .72);
    box-shadow: 0 5px 13px rgba(105, 72, 69, .08);
}

#custom-theater-app .ctf-actor-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

#custom-theater-app .ctf-choice-avatar,
#custom-theater-app .ctf-role-avatar,
#custom-theater-app .ctf-stage-avatar,
#custom-theater-app .ctf-panel-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(49, 56, 68, .12);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #697585, #3f4957);
    font-family: "Microsoft YaHei", sans-serif;
    font-weight: 700;
}

#custom-theater-app .ctf-choice-avatar { width: 38px; height: 38px; font-size: 13px; }
#custom-theater-app .ctf-choice-avatar img,
#custom-theater-app .ctf-role-avatar img,
#custom-theater-app .ctf-stage-avatar img,
#custom-theater-app .ctf-panel-avatar img { width: 100%; height: 100%; object-fit: cover; }

#custom-theater-app .ctf-choice-copy { min-width: 0; }
#custom-theater-app .ctf-choice-copy strong,
#custom-theater-app .ctf-choice-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#custom-theater-app .ctf-choice-copy strong { font-size: 11px; }
#custom-theater-app .ctf-choice-copy small { margin-top: 4px; color: var(--ct-ink-soft); font-size: 8px; }

#custom-theater-app .ctf-checkmark {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 15px;
    height: 15px;
    border: 1px solid rgba(49, 56, 68, .3);
    border-radius: 50%;
    transform: translateY(-50%);
}

#custom-theater-app .ctf-actor-choice input:checked ~ .ctf-checkmark {
    border-color: #a66f6b;
    background: #a66f6b;
    box-shadow: inset 0 0 0 3px #f5e8df;
}

#custom-theater-app .ctf-other-toggle {
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed rgba(49, 56, 68, .24);
    border-radius: 11px;
    color: var(--ct-ink);
    background: rgba(255, 252, 248, .42);
    font: 700 10px/1.4 inherit;
    cursor: pointer;
}

#custom-theater-app .ctf-other-toggle span { color: var(--ct-ink-soft); font-size: 9px; }
#custom-theater-app .ctf-other-list { margin-top: 8px; }
#custom-theater-app .ctf-picker-empty { grid-column: 1 / -1; padding: 12px; color: var(--ct-ink-soft); background: rgba(255,255,255,.38); font-size: 10px; line-height: 1.6; text-align: center; }

#custom-theater-app .ct-flow-view,
#custom-theater-app [data-ct-flow-host] { min-height: 100%; }

#custom-theater-app .ctf-script-screen {
    box-sizing: border-box;
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 0 0 26px;
}

#custom-theater-app .ctf-flow-hero {
    position: relative;
    margin-bottom: 14px;
    padding: 16px 17px 17px;
    overflow: hidden;
    border: 1px solid rgba(49, 56, 68, .15);
    border-radius: 19px;
    background: linear-gradient(145deg, rgba(249, 245, 240, .94), rgba(225, 215, 207, .88));
    box-shadow: 9px 9px 20px rgba(78, 67, 60, .09), -7px -7px 20px rgba(255,255,255,.46);
}

#custom-theater-app .ctf-flow-hero::after {
    content: "";
    position: absolute;
    right: -19px;
    top: -32px;
    width: 92px;
    height: 92px;
    border: 13px solid rgba(193, 126, 121, .13);
    border-radius: 50%;
}

#custom-theater-app .ctf-flow-hero h2 { margin: 0; font-size: 23px; letter-spacing: .13em; }
#custom-theater-app .ctf-flow-hero p { max-width: 42em; margin: 8px 0 0; color: var(--ct-ink-soft); font-size: 10px; line-height: 1.65; }
#custom-theater-app .ctf-flow-hero button {
    min-height: 34px;
    margin-top: 12px;
    padding: 0 11px;
    border: 1px solid rgba(49, 56, 68, .17);
    border-radius: 10px;
    color: var(--ct-ink);
    background: rgba(255,255,255,.45);
    font: 700 9px/1 inherit;
    cursor: pointer;
}

#custom-theater-app .ctf-script-form { display: grid; gap: 14px; }
#custom-theater-app .ctf-script-section {
    padding: 15px;
    border: 1px solid rgba(49, 56, 68, .14);
    border-radius: 19px;
    background: rgba(247, 241, 234, .9);
    box-shadow: 7px 7px 16px rgba(73, 62, 55, .07), -5px -5px 16px rgba(255,255,255,.38);
}

#custom-theater-app .ctf-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

#custom-theater-app .ctf-section-title > span {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: var(--ct-navy);
    font: 700 10px/1 "Courier New", monospace;
}

#custom-theater-app .ctf-section-title strong,
#custom-theater-app .ctf-section-title small { display: block; }
#custom-theater-app .ctf-section-title strong { font-size: 14px; letter-spacing: .06em; }
#custom-theater-app .ctf-section-title small { margin-top: 3px; color: var(--ct-ink-soft); font-size: 9px; }

#custom-theater-app .ctf-wide-field,
#custom-theater-app .ctf-form-grid label,
#custom-theater-app .ctf-role-card > label { display: grid; gap: 6px; color: var(--ct-ink-soft); font-size: 10px; }

#custom-theater-app .ctf-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
#custom-theater-app .ctf-role-card {
    min-width: 0;
    padding: 12px;
    display: grid;
    gap: 10px;
    border: 1px solid rgba(49, 56, 68, .12);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,.56), rgba(233, 225, 216, .66));
}

#custom-theater-app .ctf-role-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
#custom-theater-app .ctf-role-avatar { width: 44px; height: 44px; }
#custom-theater-app .ctf-role-head > div { min-width: 0; }
#custom-theater-app .ctf-role-head strong,
#custom-theater-app .ctf-role-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#custom-theater-app .ctf-role-head strong { font-size: 12px; }
#custom-theater-app .ctf-role-head small { margin-top: 2px; color: var(--ct-ink-soft); font-size: 8px; }

#custom-theater-app .ctf-source-card { padding: 9px; border-left: 3px solid rgba(70,81,96,.42); background: rgba(70,81,96,.06); }
#custom-theater-app .ctf-source-card span { color: var(--ct-ink-soft); font-size: 8px; font-weight: 700; letter-spacing: .08em; }
#custom-theater-app .ctf-source-card p { margin: 4px 0 0; color: #5c5652; font-size: 9px; line-height: 1.55; }

#custom-theater-app .ctf-option-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
#custom-theater-app .ctf-radio-card { min-width: 0; cursor: pointer; }
#custom-theater-app .ctf-radio-card input { position: absolute; opacity: 0; }
#custom-theater-app .ctf-radio-card span { min-height: 39px; display: grid; place-items: center; border: 1px solid rgba(49,56,68,.15); border-radius: 11px; background: rgba(255,255,255,.5); font-size: 10px; font-weight: 700; }
#custom-theater-app .ctf-radio-card input:checked + span { color: #fff; border-color: var(--ct-navy); background: var(--ct-navy); box-shadow: 0 5px 12px rgba(70,81,96,.18); }
#custom-theater-app [data-ctf-custom-style],
#custom-theater-app [data-ctf-custom-language] { margin-top: 10px; }

#custom-theater-app .ctf-preset-box { margin-bottom: 11px; padding: 11px; border: 1px solid rgba(49,56,68,.12); border-radius: 13px; background: rgba(255,255,255,.38); }
#custom-theater-app .ctf-preset-box strong { font-size: 11px; }
#custom-theater-app .ctf-preset-box button { padding: 4px 8px; border: 0; border-radius: 8px; color: #76514e; background: rgba(244,206,206,.52); font: 700 9px/1.4 inherit; cursor: pointer; }
#custom-theater-app .ctf-preset-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
#custom-theater-app .ctf-preset-chips span { max-width: 100%; padding: 4px 7px; overflow: hidden; border-radius: 7px; color: #4e5660; background: rgba(70,81,96,.09); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
#custom-theater-app .ctf-preset-empty { margin-top: 7px; color: var(--ct-ink-soft); font-size: 9px; line-height: 1.5; }

#custom-theater-app .ctf-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
#custom-theater-app .ctf-switch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
#custom-theater-app .ctf-switch-grid > label { min-width: 0; padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid rgba(49,56,68,.12); border-radius: 12px; background: rgba(255,255,255,.4); }
#custom-theater-app .ctf-switch-grid strong,
#custom-theater-app .ctf-switch-grid small { display: block; }
#custom-theater-app .ctf-switch-grid strong { font-size: 10px; }
#custom-theater-app .ctf-switch-grid small { margin-top: 3px; color: var(--ct-ink-soft); font-size: 7px; line-height: 1.4; }
#custom-theater-app .ctf-switch-grid input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: #a66f6b; }

#custom-theater-app .ctf-script-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
#custom-theater-app .ctf-script-actions button {
    min-height: 48px;
    border: 1px solid rgba(49,56,68,.17);
    border-radius: 14px;
    color: var(--ct-ink);
    background: rgba(248,242,235,.92);
    font: 800 12px/1 inherit;
    cursor: pointer;
}
#custom-theater-app .ctf-script-actions button.is-primary { color: #fff; border-color: var(--ct-navy); background: var(--ct-navy); box-shadow: 0 8px 18px rgba(70,81,96,.18); }
#custom-theater-app .ctf-script-actions button:disabled { opacity: .58; cursor: wait; }
#custom-theater-app .ctf-deferred-note { margin: -5px 4px 0; color: var(--ct-ink-soft); font-size: 8px; line-height: 1.5; text-align: center; }

/* 演出框架 */
#custom-theater-app.ct-stage-mode .ct-edge-toggle { display: none; }
#custom-theater-app.ct-stage-mode .ct-main {
    box-sizing: border-box;
    overflow: hidden;
    padding: calc(var(--ct-safe-top) + 54px) 0 0;
}
#custom-theater-app.ct-stage-mode .ct-flow-view,
#custom-theater-app.ct-stage-mode [data-ct-flow-host] { position: relative; height: 100%; min-height: 0; }
#custom-theater-app .ctf-stage-screen { position: relative; height: 100%; min-height: 0; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(239,232,224,.7), rgba(246,240,233,.93)); }

#custom-theater-app .ctf-cast-dock { flex: 0 0 auto; border-bottom: 1px solid rgba(49,56,68,.12); background: rgba(244,238,231,.88); box-shadow: 0 7px 16px rgba(59,52,47,.06); }
#custom-theater-app .ctf-cast-toggle { width: 100%; min-height: 31px; padding: 4px max(25px, calc(var(--ct-safe-right) + 25px)) 4px max(25px, calc(var(--ct-safe-left) + 25px)); display: flex; align-items: center; justify-content: space-between; border: 0; color: var(--ct-ink-soft); background: transparent; font: 700 9px/1 inherit; cursor: pointer; }
#custom-theater-app .ctf-cast-toggle i { width: 7px; height: 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
#custom-theater-app .ctf-cast-dock.is-collapsed .ctf-cast-toggle i { transform: rotate(-135deg); }
#custom-theater-app .ctf-stage-actors { box-sizing: border-box; max-width: 100%; padding: 5px max(25px, calc(var(--ct-safe-right) + 25px)) 10px max(25px, calc(var(--ct-safe-left) + 25px)); display: flex; gap: 11px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; touch-action: pan-x; transition: max-height .2s ease, opacity .2s ease, padding .2s ease; }
#custom-theater-app .ctf-stage-actors::-webkit-scrollbar { display: none; }
#custom-theater-app .ctf-cast-dock.is-collapsed .ctf-stage-actors { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; pointer-events: none; }
#custom-theater-app .ctf-stage-actor { flex: 0 0 48px; width: 48px; padding: 0; display: grid; justify-items: center; gap: 4px; border: 0; color: var(--ct-ink); background: transparent; font: 700 8px/1.2 inherit; cursor: pointer; touch-action: manipulation; }
#custom-theater-app .ctf-stage-avatar { width: 39px; height: 39px; border: 2px solid rgba(255,255,255,.76); box-shadow: 0 3px 9px rgba(49,56,68,.15); }
#custom-theater-app .ctf-stage-actor > span:last-child { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* overflow-anchor 关掉：迟到的字体/美化回流时浏览器锚定会自己改 scrollTop 并触发 scroll 事件，
   会被误认成用户滑动而放开 JS 里的贴底闩锁；贴底与保位都改由 production-flow 明确接管。 */
#custom-theater-app .ctf-stage-content { flex: 1 1 auto; min-height: 0; box-sizing: border-box; overflow-y: auto; overflow-anchor: none; padding: 24px max(25px, calc(var(--ct-safe-right) + 25px)) calc(102px + var(--ct-safe-bottom)) max(25px, calc(var(--ct-safe-left) + 25px)); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
#custom-theater-app .ctf-stage-content::-webkit-scrollbar { width: 0; height: 0; display: none; background: transparent; }
#custom-theater-app .ctf-stage-empty { box-sizing: border-box; width: min(100%, 520px); margin: 0 auto; padding: 24px 18px; border: 1px solid rgba(49,56,68,.12); border-radius: 21px; background: linear-gradient(145deg, rgba(247,247,247,.92), rgba(222,220,218,.82)); box-shadow: 11px 11px 25px rgba(75,68,62,.12), -9px -9px 24px rgba(255,255,255,.68), inset 1px 1px 0 rgba(255,255,255,.7); text-align: center; }
#custom-theater-app .ctf-stage-empty strong { display: block; margin-top: 12px; font-size: 16px; letter-spacing: .07em; }
#custom-theater-app .ctf-stage-empty p { margin: 8px auto 0; max-width: 30em; color: var(--ct-ink-soft); font-size: 10px; line-height: 1.65; }
#custom-theater-app .ctf-stage-empty.is-generating { border-color: rgba(154,107,104,.24); }
#custom-theater-app .ctf-stage-empty.is-generating .ctf-empty-clapper i { animation: ctf-clapper-roll 1.05s ease-in-out infinite; }
#custom-theater-app .ctf-stage-empty.is-error { background: linear-gradient(145deg, rgba(255,247,244,.94), rgba(231,218,215,.84)); }
#custom-theater-app .ctf-stage-empty code { display: block; margin-top: 9px; color: #987b77; font: 8px/1.4 "Courier New", monospace; overflow-wrap: anywhere; }
#custom-theater-app .ctf-stage-error-detail { max-width: 420px; margin: 12px auto 0; padding: 0 11px 10px; border: 1px solid rgba(70,81,96,.13); border-radius: 12px; background: rgba(255,255,255,.38); text-align: left; }
#custom-theater-app .ctf-stage-error-detail summary { min-height: 34px; display: flex; align-items: center; color: var(--ct-ink); font-size: 9px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
#custom-theater-app .ctf-stage-error-detail p { margin: 3px 0 0; max-width: none; color: #685d5a; font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
#custom-theater-app .ctf-stage-quality-issues { margin: 8px 0 0; padding: 8px 0 0 16px; border-top: 1px dashed rgba(112,89,83,.18); color: #7f4842; font-size: 9px; line-height: 1.55; }
#custom-theater-app .ctf-stage-quality-issues li + li { margin-top: 4px; }
#custom-theater-app .ctf-stage-error-detail code { margin-top: 7px; padding-top: 7px; border-top: 1px dashed rgba(112,89,83,.18); }
#custom-theater-app .ctf-stage-recovery { margin-top: 13px; display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
#custom-theater-app .ctf-stage-recovery button { min-height: 36px; padding: 0 12px; border: 1px solid rgba(70,81,96,.18); border-radius: 11px; color: #fff; background: var(--ct-navy); font: 800 9px/1 inherit; cursor: pointer; }
#custom-theater-app .ctf-stage-recovery button[data-ctf-open-api-settings] { color: var(--ct-ink); background: rgba(255,255,255,.62); }
#custom-theater-app .ctf-stage-recovery button[data-ctf-copy-diagnostic] { color: #735f5c; background: transparent; border-style: dashed; }
#custom-theater-app .ctf-stage-recovery button:disabled { opacity: .55; cursor: wait; }
#custom-theater-app .ctf-stream-progress { max-width: 430px; margin: 13px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
#custom-theater-app .ctf-stream-progress span { padding: 5px 8px; border: 1px solid rgba(70,81,96,.13); border-radius: 999px; color: #665d59; background: rgba(255,255,255,.48); font: 700 8px/1.25 "Courier New", monospace; }
#custom-theater-app .ctf-live-opening { box-sizing: border-box; width: min(100%, 560px); margin: 0 auto 14px; overflow: hidden; border: 1px solid rgba(154,107,104,.24); border-radius: 18px; background: rgba(251,248,244,.9); box-shadow: 8px 10px 22px rgba(75,68,62,.09); }
#custom-theater-app .ctf-live-opening > header { padding: 12px 15px 10px; border-bottom: 1px solid rgba(49,56,68,.09); background: rgba(241,231,225,.68); }
#custom-theater-app .ctf-live-opening > header span { display: block; color: #9a6b68; font: 700 8px/1.2 "Courier New", monospace; letter-spacing: .15em; }
#custom-theater-app .ctf-live-opening > header strong { display: block; margin-top: 4px; font-size: 13px; }
#custom-theater-app .ctf-live-opening > footer { padding: 8px 14px 10px; border-top: 1px dashed rgba(70,81,96,.12); color: var(--ct-ink-soft); font-size: 8px; line-height: 1.5; }
#custom-theater-app .ctf-stream-budget { max-width: 430px; margin: 10px auto 0; padding: 0 10px 9px; border: 1px solid rgba(70,81,96,.13); border-radius: 12px; background: rgba(255,255,255,.36); text-align: left; }
#custom-theater-app .ctf-stream-budget summary { min-height: 34px; display: flex; align-items: center; color: var(--ct-ink); font-size: 9px; font-weight: 800; line-height: 1.45; cursor: pointer; touch-action: manipulation; }
#custom-theater-app .ctf-stream-budget ul { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
#custom-theater-app .ctf-stream-budget li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 8px; padding-top: 5px; border-top: 1px dashed rgba(70,81,96,.12); font-size: 8px; line-height: 1.4; }
#custom-theater-app .ctf-stream-budget li span { min-width: 0; overflow-wrap: anywhere; }
#custom-theater-app .ctf-stream-budget li b { color: #76514e; font-family: "Courier New", monospace; }
#custom-theater-app .ctf-stream-budget li small { grid-column: 1 / -1; color: var(--ct-ink-soft); }
#custom-theater-app .ctf-stream-budget > p { margin: 7px 0 0; max-width: none; font-size: 8px; text-align: left; }
#custom-theater-app .ctf-partial-draft { max-width: 460px; margin: 12px auto 0; padding: 0 10px 10px; border: 1px solid rgba(154,107,104,.25); border-radius: 12px; background: rgba(255,255,255,.42); text-align: left; }
#custom-theater-app .ctf-partial-draft summary { min-height: 36px; display: flex; align-items: center; color: #76514e; font-size: 9px; font-weight: 850; line-height: 1.45; cursor: pointer; touch-action: manipulation; }
#custom-theater-app .ctf-partial-draft pre { max-height: 260px; margin: 4px 0 9px; padding: 9px; overflow: auto; border-radius: 9px; color: #514a47; background: rgba(247,241,234,.82); font: 9px/1.7 inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
#custom-theater-app .ctf-partial-draft > button { min-height: 34px; padding: 0 11px; border: 1px solid rgba(112,89,83,.22); border-radius: 10px; color: #76514e; background: rgba(255,255,255,.68); font: 800 9px/1 inherit; cursor: pointer; }
@keyframes ctf-clapper-roll { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(-26deg); } }
#custom-theater-app .ctf-empty-clapper { position: relative; width: 72px; height: 50px; margin: 17px auto 0; }
#custom-theater-app .ctf-empty-clapper b { position: absolute; inset: 13px 0 0; border-radius: 4px; background: #55606e; box-shadow: 4px 5px 8px rgba(49,56,68,.18); }
#custom-theater-app .ctf-empty-clapper i { position: absolute; z-index: 2; left: -2px; top: 4px; width: 76px; height: 13px; border-radius: 3px; background: repeating-linear-gradient(128deg, #4b5664 0 13px, #ece6df 13px 25px); transform: rotate(-7deg); transform-origin: left bottom; }

/* 历史正文分批载入条：进入舞台只渲染最新几条，往上滚时按批补齐。 */
#custom-theater-app .ctf-stage-earlier { box-sizing: border-box; width: min(100%, 560px); margin: 0 auto 14px; padding: 11px 13px; display: grid; justify-items: center; gap: 6px; border: 1px dashed rgba(49,56,68,.18); border-radius: 15px; background: rgba(252,249,245,.72); text-align: center; }
#custom-theater-app .ctf-stage-earlier button { min-height: 34px; padding: 0 14px; border: 1px solid rgba(70,81,96,.18); border-radius: 11px; color: var(--ct-ink); background: rgba(255,255,255,.7); font: 800 9px/1 inherit; cursor: pointer; touch-action: manipulation; }
#custom-theater-app .ctf-stage-earlier button:disabled { opacity: .55; cursor: progress; }
#custom-theater-app .ctf-stage-earlier small { color: var(--ct-ink-soft); font-size: 8px; line-height: 1.55; }

#custom-theater-app .ctf-opening-scene { box-sizing: border-box; width: min(100%, 560px); margin: 0 auto; overflow: hidden; border: 1px solid rgba(49,56,68,.12); border-radius: 21px; background: rgba(251,248,244,.9); box-shadow: 11px 13px 27px rgba(75,68,62,.11), -8px -8px 22px rgba(255,255,255,.58); }
#custom-theater-app .ctf-opening-scene > header { padding: 14px 16px 12px; border-bottom: 1px solid rgba(49,56,68,.09); background: linear-gradient(145deg, rgba(238,231,224,.72), rgba(255,255,255,.48)); }
#custom-theater-app .ctf-opening-scene > header span { display: block; color: #9a6b68; font: 700 9px/1.2 "Courier New", monospace; letter-spacing: .15em; }
#custom-theater-app .ctf-opening-scene > header strong { display: block; margin-top: 5px; font-size: 15px; letter-spacing: .07em; }
#custom-theater-app .ctf-opening-copy { padding: 17px 17px 19px; color: #403c39; font-size: 12px; line-height: 1.9; }
#custom-theater-app .ctf-opening-copy p { margin: 0 0 1.2em; }
#custom-theater-app .ctf-opening-copy p:last-child { margin-bottom: 0; }
#custom-theater-app .ctf-note-readings { margin-top: 9px; display: grid; gap: 7px; }
#custom-theater-app .ctf-note-readings section { padding: 8px; border-radius: 9px; background: rgba(255,255,255,.56); }
#custom-theater-app .ctf-note-readings strong,
#custom-theater-app .ctf-note-audit > strong { color: #76514e; font-size: 9px; }
#custom-theater-app .ctf-note-readings p { margin-top: 4px; }
#custom-theater-app .ctf-note-audit { margin-top: 9px; padding-top: 8px; border-top: 1px dashed rgba(49,56,68,.14); }
#custom-theater-app .ctf-note-audit ul { margin: 6px 0 0; padding-left: 18px; }
#custom-theater-app .ctf-note-preset-audit { margin-top: 10px; padding-top: 9px; border-top: 1px dashed rgba(49,56,68,.14); }
#custom-theater-app .ctf-note-preset-audit > strong { color: #76514e; font-size: 9px; }
#custom-theater-app .ctf-note-preset-audit ol { margin: 7px 0 0; padding: 0; display: grid; gap: 7px; list-style: none; }
#custom-theater-app .ctf-note-preset-audit li { padding: 8px 9px; border-radius: 9px; background: rgba(255,255,255,.58); }
#custom-theater-app .ctf-note-preset-audit li.is-partial,
#custom-theater-app .ctf-note-preset-audit li.is-not-met { background: rgba(255,239,224,.72); }
#custom-theater-app .ctf-note-preset-audit li header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
#custom-theater-app .ctf-note-preset-audit li header b { color: #554b48; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
#custom-theater-app .ctf-note-preset-audit li header em { flex: 0 0 auto; color: #52705a; font-size: 8px; font-style: normal; }
#custom-theater-app .ctf-note-preset-audit li.is-partial header em,
#custom-theater-app .ctf-note-preset-audit li.is-not-met header em { color: #9a5b4e; }
#custom-theater-app .ctf-note-preset-audit li p { margin-top: 5px; overflow-wrap: anywhere; }
#custom-theater-app .ctf-note-preset-audit li p span { margin-right: 5px; color: #9a6b68; font-size: 8px; font-weight: 800; }
#custom-theater-app .ctf-note-coverage,
#custom-theater-app .ctf-note-metrics { margin-top: 8px !important; padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.48); font-size: 8px; line-height: 1.55; }
#custom-theater-app .ctf-note-coverage.is-complete { color: #52705a; }
#custom-theater-app .ctf-note-coverage.is-incomplete { color: #945148; background: rgba(255,233,229,.7); }
#custom-theater-app .ctf-media-cue { box-sizing: border-box; width: min(100%,560px); margin: 11px auto 0; padding: 10px 12px; border: 1px solid rgba(49,56,68,.11); border-radius: 13px; color: var(--ct-ink-soft); background: rgba(255,255,255,.48); font-size: 9px; line-height: 1.6; }
#custom-theater-app .ctf-media-cue summary { color: var(--ct-ink); font-weight: 800; cursor: pointer; }
#custom-theater-app .ctf-media-cue p { margin: 7px 0 0; }

#custom-theater-app .ctf-creative-notes { box-sizing: border-box; width: min(100%, 520px); margin: 15px auto 0; border: 1px solid rgba(49,56,68,.11); border-radius: 16px; background: rgba(244,242,240,.9); box-shadow: 7px 7px 16px rgba(70,62,56,.08), -5px -5px 15px rgba(255,255,255,.5); }
#custom-theater-app .ctf-creative-notes summary { min-height: 46px; padding: 7px 11px; display: grid; grid-template-columns: 33px minmax(0,1fr) auto; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
#custom-theater-app .ctf-creative-notes summary::-webkit-details-marker { display: none; }
#custom-theater-app .ctf-creative-notes summary strong { font-size: 11px; }
#custom-theater-app .ctf-creative-notes summary small { color: var(--ct-ink-soft); font-size: 8px; }
#custom-theater-app .ctf-film-icon { width: 29px; height: 24px; display: grid; grid-template-columns: 6px 1fr 6px; gap: 2px; padding: 3px; box-sizing: border-box; border-radius: 5px; background: var(--ct-navy); }
#custom-theater-app .ctf-film-icon i { border-radius: 2px; background: repeating-linear-gradient(180deg, #eee 0 3px, transparent 3px 6px); }
#custom-theater-app .ctf-film-icon i:nth-child(2) { background: rgba(255,255,255,.75); }
#custom-theater-app .ctf-creative-notes > div { margin: 0 10px 10px; padding: 10px; border-radius: 11px; color: var(--ct-ink-soft); background: rgba(255,255,255,.5); font-size: 9px; line-height: 1.65; }
#custom-theater-app .ctf-creative-notes p { margin: 0; }

/* User 在「接收」时发出的本幕指示 */
#custom-theater-app .ctf-director-note { box-sizing: border-box; width: min(100%, 560px); margin: 17px auto 9px; padding: 10px 13px; border: 1px solid rgba(49,56,68,.12); border-left: 3px solid rgba(154,107,104,.55); border-radius: 5px 15px 15px 5px; background: rgba(252,249,245,.82); }
/* 眉头小字仅命中直接子级 span，避免污染 <p> 里的台词 .ctf-dialogue */
#custom-theater-app .ctf-director-note > span { display: block; color: #9a6b68; font: 700 8px/1.2 "Courier New", monospace; letter-spacing: .16em; }
#custom-theater-app .ctf-director-note p { margin: 6px 0 0; color: #4a4441; font-size: 11px; line-height: 1.75; overflow-wrap: anywhere; }

/* 已有正文后的接收失败提示：只追加在末尾，不覆盖已保存的幕 */
#custom-theater-app .ctf-scene-hold { box-sizing: border-box; width: min(100%, 560px); margin: 14px auto 0; padding: 13px; border: 1px solid rgba(138,75,70,.24); border-radius: 16px; background: rgba(250,242,240,.9); text-align: center; }
#custom-theater-app .ctf-scene-hold > span { display: block; color: #9a6b68; font: 700 9px/1.2 "Courier New", monospace; letter-spacing: .15em; }
#custom-theater-app .ctf-scene-hold > strong { display: block; margin-top: 7px; font-size: 13px; letter-spacing: .05em; }
#custom-theater-app .ctf-scene-hold > p { margin: 6px auto 0; max-width: 420px; color: var(--ct-ink-soft); font-size: 9px; line-height: 1.7; }

#custom-theater-app .ctf-actor-panel { position: absolute; z-index: 9; top: 70px; left: max(25px, calc(var(--ct-safe-left) + 25px)); right: max(25px, calc(var(--ct-safe-right) + 25px)); }
#custom-theater-app .ctf-actor-panel-card { width: min(100%, 500px); margin: 0 auto; overflow: hidden; border: 1px solid rgba(49,56,68,.14); border-radius: 20px; background: rgba(241,240,239,.97); box-shadow: 14px 16px 34px rgba(45,42,39,.22), -7px -7px 20px rgba(255,255,255,.58); }
#custom-theater-app .ctf-actor-panel-card header { padding: 12px 13px; display: grid; grid-template-columns: 48px minmax(0,1fr) 34px; align-items: center; gap: 9px; border-bottom: 1px solid rgba(49,56,68,.1); }
#custom-theater-app .ctf-panel-avatar { width: 46px; height: 46px; }
#custom-theater-app .ctf-actor-panel-card header strong,
#custom-theater-app .ctf-actor-panel-card header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#custom-theater-app .ctf-actor-panel-card header strong { font-size: 14px; }
#custom-theater-app .ctf-actor-panel-card header small { margin-top: 3px; color: var(--ct-ink-soft); font-size: 9px; }
#custom-theater-app .ctf-actor-panel-card header button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--ct-ink); background: rgba(49,56,68,.07); font-size: 17px; cursor: pointer; }
#custom-theater-app .ctf-actor-facts { margin: 0; padding: 13px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
#custom-theater-app .ctf-actor-facts > div { min-width: 0; min-height: 58px; padding: 9px; box-sizing: border-box; border-radius: 12px; background: rgba(255,255,255,.56); box-shadow: inset 1px 1px 0 rgba(255,255,255,.7); }
#custom-theater-app .ctf-actor-facts dt { color: #9a6b68; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
#custom-theater-app .ctf-actor-facts dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 10px; line-height: 1.5; }
#custom-theater-app .ctf-actor-facts.is-hidden-mind > div:last-child { grid-column: 1 / -1; }
#custom-theater-app .ctf-actor-panel-card footer { padding: 8px 12px 11px; display: flex; align-items: center; justify-content: center; gap: 15px; }
#custom-theater-app .ctf-actor-panel-card footer button { width: 34px; height: 29px; border: 1px solid rgba(49,56,68,.12); border-radius: 9px; color: var(--ct-ink); background: rgba(255,255,255,.55); font-size: 18px; cursor: pointer; }
#custom-theater-app .ctf-actor-panel-card footer button:disabled { opacity: .25; }
#custom-theater-app .ctf-actor-panel-card footer span { color: var(--ct-ink-soft); font: 9px/1 "Courier New", monospace; }

/* 本场剧目设置 · 全屏页（与小手机主屏幕等大） */
#custom-theater-app .ctf-stage-settings { position: absolute; z-index: 30; left: 0; right: 0; bottom: 0; top: calc(-1 * (var(--ct-safe-top) + 54px)); display: flex; flex-direction: column; background: var(--ct-paper, #efe9e2); }
#custom-theater-app .ctf-settings-topbar { flex: 0 0 auto; box-sizing: border-box; min-height: calc(54px + var(--ct-safe-top)); padding: var(--ct-safe-top) max(12px, var(--ct-safe-right)) 0 max(12px, var(--ct-safe-left)); display: grid; grid-template-columns: 46px minmax(0,1fr) 46px; align-items: center; border-bottom: 1px solid rgba(49,56,68,.1); background: linear-gradient(180deg, rgba(240,230,220,.97), rgba(240,230,220,.86)); }
#custom-theater-app .ctf-settings-topbar > div { min-width: 0; text-align: center; }
#custom-theater-app .ctf-settings-topbar strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; letter-spacing: .14em; }
#custom-theater-app .ctf-stage-settings .ctf-settings-back { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--ct-ink); background: rgba(255,250,243,.5); font-size: 0; cursor: pointer; touch-action: manipulation; }
#custom-theater-app .ctf-settings-back svg { width: 22px; height: 22px; }
#custom-theater-app .ctf-settings-topbar-blank { width: 44px; height: 44px; }
#custom-theater-app .ctf-settings-body { flex: 1 1 auto; min-height: 0; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px max(18px, calc(var(--ct-safe-right) + 18px)) calc(24px + var(--ct-safe-bottom)) max(18px, calc(var(--ct-safe-left) + 18px)); scrollbar-width: none; -ms-overflow-style: none; }
#custom-theater-app .ctf-settings-body::-webkit-scrollbar { width: 0; height: 0; display: none; background: transparent; }
#custom-theater-app .ctf-settings-form { display: grid; gap: 11px; }
#custom-theater-app .ctf-settings-card { padding: 13px; border: 1px solid rgba(49,56,68,.13); border-radius: 17px; background: rgba(247,241,234,.92); box-shadow: 6px 6px 14px rgba(73,62,55,.06), -4px -4px 13px rgba(255,255,255,.38); }
#custom-theater-app .ctf-settings-card-head { margin-bottom: 10px; }
#custom-theater-app .ctf-settings-card-head strong { display: block; font-size: 13px; letter-spacing: .05em; }
#custom-theater-app .ctf-settings-card-head small { display: block; margin-top: 3px; color: var(--ct-ink-soft); font-size: 9px; line-height: 1.5; }
#custom-theater-app .ctf-settings-switches { display: grid; gap: 8px; }
#custom-theater-app .ctf-settings-switches > label { min-width: 0; padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid rgba(49,56,68,.12); border-radius: 12px; background: rgba(255,255,255,.4); cursor: pointer; }
#custom-theater-app .ctf-settings-switches strong { display: block; font-size: 11px; }
#custom-theater-app .ctf-settings-switches small { display: block; margin-top: 3px; color: var(--ct-ink-soft); font-size: 8px; line-height: 1.45; }
#custom-theater-app .ctf-settings-switches input { flex: 0 0 auto; width: 19px; height: 19px; accent-color: #a66f6b; }
#custom-theater-app .ctf-settings-tiles { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
#custom-theater-app .ctf-settings-tile { min-width: 0; min-height: 66px; padding: 11px 12px; display: grid; align-content: center; gap: 5px; text-align: left; border: 1px solid rgba(49,56,68,.15); border-radius: 15px; color: var(--ct-ink); background: linear-gradient(145deg, rgba(255,255,255,.6), rgba(233,225,216,.7)); box-shadow: 5px 5px 12px rgba(73,62,55,.07), -4px -4px 11px rgba(255,255,255,.42); cursor: pointer; touch-action: manipulation; }
#custom-theater-app .ctf-settings-tile strong { font-size: 12px; letter-spacing: .05em; }
#custom-theater-app .ctf-settings-tile small { color: var(--ct-ink-soft); font-size: 8px; line-height: 1.45; }
#custom-theater-app .ctf-settings-note { margin: 10px 2px 0; color: var(--ct-ink-soft); font-size: 8px; line-height: 1.55; text-align: center; }
#custom-theater-app .ctf-custom-theme-editor { margin-top: 11px; padding: 11px; display: grid; gap: 9px; border: 1px solid rgba(49,56,68,.12); border-radius: 13px; background: rgba(255,255,255,.35); }
#custom-theater-app .ctf-custom-theme-editor[hidden] { display: none; }
#custom-theater-app .ctf-custom-theme-editor .ctf-wide-field { margin: 0; }
#custom-theater-app .ctf-custom-theme-editor textarea[data-ctf-theme-code] { min-height: 188px; tab-size: 2; white-space: pre; overflow: auto; font-family: Consolas, "SFMono-Regular", monospace; font-size: 9px; line-height: 1.55; }
#custom-theater-app .ctf-theme-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
#custom-theater-app .ctf-theme-file-button,
#custom-theater-app .ctf-theme-actions button { position: relative; box-sizing: border-box; min-height: 38px; padding: 0 10px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(49,56,68,.16); border-radius: 10px; color: var(--ct-ink); background: rgba(255,255,255,.62); font: 700 9px/1 inherit; cursor: pointer; }
#custom-theater-app .ctf-theme-file-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#custom-theater-app .ctf-theme-file-note,
#custom-theater-app .ctf-theme-status { margin: 0; color: var(--ct-ink-soft); font-size: 8px; line-height: 1.5; overflow-wrap: anywhere; }
#custom-theater-app .ctf-theme-status { padding: 8px 9px; border-radius: 9px; background: rgba(255,255,255,.48); }
#custom-theater-app .ctf-theme-status.is-valid { color: #416c4c; background: rgba(224,242,226,.72); }
#custom-theater-app .ctf-theme-status.is-error { color: #9a4d49; background: rgba(255,232,229,.78); }
#custom-theater-app .ctf-theme-preview { overflow: hidden; border: 1px solid var(--ctm-custom-border, rgba(86,67,69,.16)); border-radius: var(--ctm-custom-radius, 18px); color: var(--ctm-custom-text, #302a2b); background: var(--ctm-custom-app-bg, #eee8df); box-shadow: var(--ctm-custom-shadow, 0 10px 28px rgba(74,54,57,.1)); font-family: var(--ctm-custom-font-family, inherit); }
#custom-theater-app .ctf-theme-preview header { min-height: 36px; padding: 0 10px; display: grid; grid-template-columns: 24px minmax(0,1fr) 24px; align-items: center; border-bottom: 1px solid var(--ctm-custom-border, rgba(86,67,69,.16)); background: var(--ctm-custom-header-bg, #f7f0e9); text-align: center; }
#custom-theater-app .ctf-theme-preview header i { width: 20px; height: 20px; border-radius: var(--ctm-custom-avatar-radius, 50%); background: var(--ctm-custom-accent, #8d5f68); }
#custom-theater-app .ctf-theme-preview header strong { font-size: 9px; }
#custom-theater-app .ctf-theme-preview header span { color: var(--ctm-custom-muted, #8d7f7d); font-size: 8px; }
#custom-theater-app .ctf-theme-preview > div { min-height: 105px; padding: 11px; display: flex; flex-direction: column; gap: 7px; }
#custom-theater-app .ctf-theme-preview p { max-width: 72%; margin: 0; padding: 7px 9px; border-radius: var(--ctm-custom-bubble-radius, 18px); font-size: 8px; line-height: 1.45; }
#custom-theater-app .ctf-theme-preview p.is-received { align-self: flex-start; color: var(--ctm-custom-received-text, #302a2b); background: var(--ctm-custom-received-bubble, #fffaf6); }
#custom-theater-app .ctf-theme-preview p.is-sent { align-self: flex-end; color: var(--ctm-custom-sent-text, #fff); background: var(--ctm-custom-sent-bubble, #8d5f68); }
#custom-theater-app .ctf-theme-preview footer { min-height: 36px; padding: 0 8px 0 11px; display: flex; align-items: center; justify-content: space-between; color: var(--ctm-custom-muted, #8d7f7d); border-top: 1px solid var(--ctm-custom-border, rgba(86,67,69,.16)); background: var(--ctm-custom-composer-bg, #f4eee8); font-size: 8px; }
#custom-theater-app .ctf-theme-preview footer b { padding: 6px 9px; border-radius: 9px; color: var(--ctm-custom-accent-contrast, #fff); background: var(--ctm-custom-accent, #8d5f68); font-size: 8px; }
#custom-theater-app .ctf-theme-help { color: var(--ct-ink-soft); font-size: 8px; line-height: 1.55; }
#custom-theater-app .ctf-theme-help summary { min-height: 30px; display: flex; align-items: center; cursor: pointer; }
#custom-theater-app .ctf-theme-help code { display: block; padding: 9px; overflow-wrap: anywhere; border-radius: 8px; color: #66565a; background: rgba(240,230,220,.72); font: 8px/1.6 Consolas, monospace; }
/* 剧目 / 简讯记忆 */
#custom-theater-app details.ctf-memory-reference-card { padding: 0; overflow: hidden; }
#custom-theater-app .ctf-memory-reference-summary { box-sizing: border-box; min-height: 61px; margin: 0; padding: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#custom-theater-app .ctf-memory-reference-summary::-webkit-details-marker { display: none; }
#custom-theater-app .ctf-memory-reference-summary > span { min-width: 0; }
#custom-theater-app .ctf-memory-reference-summary > em { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; color: #855f5c; font-style: normal; }
#custom-theater-app .ctf-memory-reference-summary > em b { font-size: 8px; font-weight: 800; }
#custom-theater-app .ctf-memory-reference-summary > em i { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .18s ease; }
#custom-theater-app details.ctf-memory-reference-card[open] .ctf-memory-reference-summary > em b { font-size: 0; }
#custom-theater-app details.ctf-memory-reference-card[open] .ctf-memory-reference-summary > em b::after { content: "收起"; font-size: 8px; }
#custom-theater-app details.ctf-memory-reference-card[open] .ctf-memory-reference-summary > em i { transform: rotate(-135deg); }
#custom-theater-app .ctf-memory-reference-body { padding: 0 13px 13px; border-top: 1px solid rgba(49,56,68,.08); }
#custom-theater-app details.ctf-memory-reference-card:not([open]) > .ctf-memory-reference-body { display: none; }
#custom-theater-app .ctf-memory-reference-body > .ctf-scene-reference-grid { padding-top: 12px; }
#custom-theater-app .ctf-scene-reference-grid { align-items: end; }
#custom-theater-app .ctf-scene-reference-value { margin: 0; min-height: 36px; display: flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px dashed rgba(49,56,68,.2); border-radius: 11px; color: var(--ct-ink-soft); background: rgba(255,255,255,.42); font-size: 10px; }
#custom-theater-app .ctf-scene-reference-value b { margin: 0 4px; color: #8a5c58; font-size: 13px; }
#custom-theater-app .ctf-settings-hint { margin: 10px 0 0; padding: 9px 10px; border-radius: 11px; color: var(--ct-ink-soft); background: rgba(255,255,255,.46); font-size: 8px; line-height: 1.7; }
#custom-theater-app .ctf-brief-reference-head { margin-top: 13px; padding-top: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; border-top: 1px dashed rgba(49,56,68,.16); }
#custom-theater-app .ctf-brief-reference-head strong { display: block; font-size: 12px; letter-spacing: .05em; }
#custom-theater-app .ctf-brief-reference-head small { display: block; margin-top: 3px; color: var(--ct-ink-soft); font-size: 8px; line-height: 1.5; }
#custom-theater-app .ctf-brief-reference-head > span { flex: 0 0 auto; padding: 5px 7px; border-radius: 9px; color: #855f5c; background: rgba(166,111,107,.1); font-size: 8px; white-space: nowrap; }
#custom-theater-app .ctf-brief-reference-list { margin-top: 8px; border-top: 1px solid rgba(49,56,68,.1); }
#custom-theater-app .ctf-brief-reference-row { min-width: 0; min-height: 54px; padding: 7px 0; display: grid; grid-template-columns: 34px minmax(70px,1fr) 58px 15px auto; align-items: center; gap: 7px; border-bottom: 1px solid rgba(49,56,68,.1); }
#custom-theater-app .ctf-brief-reference-avatar { width: 32px; height: 32px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: #8a6e6a; font-size: 10px; }
#custom-theater-app .ctf-brief-reference-avatar img { width: 100%; height: 100%; object-fit: cover; }
#custom-theater-app .ctf-brief-reference-person { min-width: 0; }
#custom-theater-app .ctf-brief-reference-person strong,
#custom-theater-app .ctf-brief-reference-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#custom-theater-app .ctf-brief-reference-person strong { font-size: 10px; }
#custom-theater-app .ctf-brief-reference-person small { margin-top: 3px; color: var(--ct-ink-soft); font-size: 8px; }
#custom-theater-app .ctf-brief-reference-row label { min-width: 0; }
#custom-theater-app .ctf-brief-reference-row input { box-sizing: border-box; width: 100%; min-height: 36px; padding: 0 6px; border: 1px solid rgba(49,56,68,.18); border-radius: 10px; outline: 0; color: var(--ct-ink); background: rgba(255,255,255,.72); font: 11px/1 inherit; text-align: center; }
#custom-theater-app .ctf-brief-reference-row input:focus { border-color: #a66f6b; box-shadow: 0 0 0 2px rgba(166,111,107,.12); }
#custom-theater-app .ctf-brief-reference-unit { color: var(--ct-ink-soft); font-size: 8px; }
#custom-theater-app .ctf-brief-reference-row button { min-height: 34px; padding: 0 8px; border: 1px solid rgba(166,111,107,.22); border-radius: 10px; color: #855f5c; background: rgba(255,255,255,.58); font: 700 8px/1 inherit; cursor: pointer; touch-action: manipulation; white-space: nowrap; }
#custom-theater-app .ctf-brief-reference-empty { margin-top: 8px; padding: 11px; border-radius: 10px; color: var(--ct-ink-soft); background: rgba(255,255,255,.4); font-size: 9px; line-height: 1.55; text-align: center; }
#custom-theater-app .ctf-memory-reference-card .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#custom-theater-app .ctf-settings-subhead { margin-bottom: 11px; display: flex; align-items: center; gap: 10px; }
#custom-theater-app .ctf-settings-subhead button { flex: 0 0 auto; min-height: 34px; padding: 0 11px; border: 1px solid rgba(49,56,68,.17); border-radius: 11px; color: var(--ct-ink); background: rgba(255,255,255,.55); font: 700 10px/1 inherit; cursor: pointer; }
#custom-theater-app .ctf-settings-subhead strong { display: block; font-size: 13px; }
#custom-theater-app .ctf-settings-subhead small { display: block; margin-top: 2px; color: var(--ct-ink-soft); font-size: 8px; }
#custom-theater-app .ctf-settings-edit { width: 100%; min-height: 43px; margin-top: 12px; border: 0; border-radius: 12px; color: #fff; background: var(--ct-navy); font: 800 11px/1 inherit; cursor: pointer; }

/* 场景 CG / 语音台词模块 */
#custom-theater-app .ctf-media-module { box-sizing: border-box; width: min(100%, 560px); margin: 13px auto 0; padding: 12px 13px; border: 1px solid rgba(49,56,68,.12); border-radius: 16px; background: rgba(248,245,241,.9); box-shadow: 7px 7px 16px rgba(70,62,56,.07), -5px -5px 14px rgba(255,255,255,.45); }
#custom-theater-app .ctf-media-module > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#custom-theater-app .ctf-media-module > header span { display: block; margin-bottom: 2px; color: #9a6b68; font: 700 9px/1.2 "Courier New", monospace; letter-spacing: .15em; }
#custom-theater-app .ctf-media-module > header strong { display: block; font-size: 12px; letter-spacing: .05em; }
#custom-theater-app .ctf-cg-heading { min-width: 0; }
#custom-theater-app .ctf-cg-heading small,
#custom-theater-app .ctf-cg-disclosure small { display: block; margin-top: 4px; color: var(--ct-ink-soft); font: 700 8px/1.35 inherit; letter-spacing: .02em; }
#custom-theater-app .ctf-cg-disclosure small b,
#custom-theater-app .ctf-cg-disclosure small i { color: inherit; font: inherit; }
#custom-theater-app .ctf-cg-disclosure { flex: 1 1 auto; min-width: 0; min-height: 36px; padding: 2px 0; display: flex; align-items: center; gap: 10px; border: 0; outline: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#custom-theater-app .ctf-cg-disclosure > div { min-width: 0; flex: 1 1 auto; }
#custom-theater-app .ctf-cg-disclosure > em { flex: 0 0 auto; width: 8px; height: 8px; margin-right: 2px; border-right: 1.6px solid var(--ct-ink-soft); border-bottom: 1.6px solid var(--ct-ink-soft); transform: rotate(45deg); transition: transform .18s ease; }
#custom-theater-app .ctf-cg-module.is-cg-expanded .ctf-cg-disclosure > em { transform: rotate(-135deg); }
#custom-theater-app .ctf-cg-disclosure:focus-visible { border-radius: 8px; box-shadow: 0 0 0 2px rgba(154,107,104,.58); }
#custom-theater-app .ctf-media-action { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid rgba(70,81,96,.18); border-radius: 11px; color: #fff; background: var(--ct-navy); font: 800 10px/1 inherit; cursor: pointer; touch-action: manipulation; }
#custom-theater-app .ctf-media-action:disabled { opacity: .55; cursor: wait; }
#custom-theater-app .ctf-media-status { margin: 9px 0 0; color: var(--ct-ink-soft); font-size: 9px; line-height: 1.6; }
#custom-theater-app .ctf-media-status.is-error { color: #8a4b46; }
#custom-theater-app .ctf-mini-status { box-sizing: border-box; width: min(100%, 560px); min-height: 36px; margin: 11px auto 0; padding: 7px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(49,56,68,.1); color: var(--ct-ink-soft); font-size: 9px; line-height: 1.5; }
#custom-theater-app .ctf-mini-status.is-pending span::before { content: ''; width: 7px; height: 7px; margin-right: 7px; display: inline-block; border: 1.5px solid rgba(77,112,103,.28); border-top-color: var(--ct-accent); border-radius: 50%; vertical-align: -1px; animation: ctf-mini-spin .8s linear infinite; }
#custom-theater-app .ctf-mini-status.is-warning { color: #8a5b50; }
#custom-theater-app .ctf-mini-status button { flex: 0 0 auto; min-height: 30px; padding: 6px 10px; border: 1px solid rgba(49,56,68,.13); border-radius: 999px; color: var(--ct-ink); background: rgba(255,255,255,.74); font: 800 9px/1 inherit; cursor: pointer; touch-action: manipulation; }
@keyframes ctf-mini-spin { to { transform: rotate(360deg); } }
#custom-theater-app .ctf-cg-prompt { margin-top: 9px; padding: 8px 10px; border: 1px solid rgba(49,56,68,.1); border-radius: 11px; color: var(--ct-ink-soft); background: rgba(255,255,255,.5); font-size: 9px; line-height: 1.6; }
#custom-theater-app .ctf-cg-prompt summary { color: var(--ct-ink); font-weight: 800; cursor: pointer; }
#custom-theater-app .ctf-cg-prompt p { margin: 7px 0 0; overflow-wrap: anywhere; }
#custom-theater-app .ctf-cg-gallery { margin-top: 10px; display: grid; gap: 9px; }
#custom-theater-app .ctf-cg-gallery[hidden] { display: none; }
#custom-theater-app .ctf-cg-figure { margin: 0; overflow: hidden; border: 1px solid rgba(49,56,68,.14); border-radius: 13px; background: rgba(255,255,255,.5); }
#custom-theater-app .ctf-cg-figure img { display: block; width: 100%; height: auto; }
#custom-theater-app .ctf-cg-figure figcaption { padding: 7px 9px; color: var(--ctb-narration-color, #68615d); font-size: 9px; line-height: 1.4; background: rgba(251,248,244,.92); }
/* 正文内嵌语音台词条（与微信线下模式同思路：台词原位替换成可点击播放的语音条） */
#custom-theater-app .ctf-voice-inline { position: relative; max-width: 100%; margin: 1px; padding: 2px 9px 3px 7px; display: inline-flex; flex-direction: column; align-items: stretch; box-sizing: border-box; vertical-align: middle; border: 1px solid rgba(154,107,104,.34); border-radius: 11px; background: linear-gradient(145deg, rgba(244,206,206,.32), rgba(255,255,255,.5)); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#custom-theater-app .ctf-voice-inline-main { min-width: 0; display: inline-flex; align-items: center; }
#custom-theater-app .ctf-voice-inline-icon { flex: 0 0 auto; display: inline-block; margin-right: 5px; color: #9a6b68; font-size: 11px; transform: translateY(-1px); }
#custom-theater-app .ctf-voice-inline-text { min-width: 0; color: #5c4340; font-weight: 600; overflow-wrap: anywhere; }
#custom-theater-app .ctf-voice-inline-hint { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 7px; color: #76514e; background: rgba(244,206,206,.55); font-size: 8px; font-weight: 700; white-space: nowrap; }
#custom-theater-app .ctf-voice-inline-translation { display: none; margin: 5px 1px 1px; padding: 6px 3px 3px; border-top: 1px solid rgba(154,107,104,.2); color: #655a57; font-size: .88em; font-weight: 500; line-height: 1.55; overflow-wrap: anywhere; }
#custom-theater-app .ctf-voice-inline-translation > span { display: block; margin-bottom: 2px; color: #9a6b68; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
#custom-theater-app .ctf-voice-inline.is-translation-open .ctf-voice-inline-translation { display: block; }
#custom-theater-app .ctf-voice-inline-audio { display: none; }
#custom-theater-app .ctf-voice-inline.is-loading { opacity: .62; cursor: progress; }
#custom-theater-app .ctf-voice-inline.is-loading .ctf-voice-inline-icon { animation: ctf-voice-blink 1s ease-in-out infinite; }
#custom-theater-app .ctf-voice-inline.is-error { border-color: rgba(138,75,70,.5); background: linear-gradient(145deg, rgba(228,180,175,.3), rgba(255,255,255,.5)); }
#custom-theater-app .ctf-voice-inline.is-error .ctf-voice-inline-hint { color: #8a4b46; background: rgba(228,180,175,.42); }
#custom-theater-app .ctf-voice-inline.is-playing { border-color: rgba(154,107,104,.62); background: linear-gradient(145deg, rgba(244,206,206,.58), rgba(255,255,255,.6)); box-shadow: 0 2px 8px rgba(154,107,104,.2); }
#custom-theater-app .ctf-voice-inline.is-playing .ctf-voice-inline-icon { animation: ctf-voice-blink .8s ease-in-out infinite; }
#custom-theater-app .ctf-voice-inline:focus-visible { outline: 2px solid rgba(163,102,98,.72); outline-offset: 2px; }
#custom-theater-app .ctf-language-translation-note { margin: 8px 2px 0; color: var(--ct-ink-soft); font-size: 8px; line-height: 1.55; }
@keyframes ctf-voice-blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
    #custom-theater-app .ctf-voice-inline .ctf-voice-inline-icon { animation: none; }
    #custom-theater-app .ctf-cg-disclosure > em { transition: none; }
}

/* 底部功能坞：接收 / 输入 / 发送；输入框独占中间弹性空间 */
#custom-theater-app .ctf-composer-dock { position: absolute; z-index: 8; left: 0; right: 0; bottom: 0; box-sizing: border-box; border-top: 1px solid rgba(49,56,68,.11); background: rgba(240,235,229,.94); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); }
#custom-theater-app .ctf-composer { box-sizing: border-box; padding: 9px max(13px, calc(var(--ct-safe-right) + 13px)) calc(9px + var(--ct-safe-bottom)) max(13px, calc(var(--ct-safe-left) + 13px)); display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: end; gap: 7px; }
#custom-theater-app .ctf-composer textarea { box-sizing: border-box; width: 100%; min-height: 39px; max-height: 92px; padding: 9px 10px; resize: none; border: 1px solid rgba(49,56,68,.15); border-radius: 13px; outline: 0; color: var(--ct-ink); background: rgba(255,255,255,.74); font: 11px/1.55 inherit; }
#custom-theater-app .ctf-receive,
#custom-theater-app .ctf-send { min-height: 39px; padding: 0 10px; border: 0; border-radius: 12px; font: 800 10px/1 inherit; cursor: pointer; }
#custom-theater-app .ctf-receive { color: #6d4a47; background: rgba(244,206,206,.55); border: 1px solid rgba(154,107,104,.3); }
#custom-theater-app .ctf-receive:disabled { opacity: .55; }
#custom-theater-app .ctf-send { color: #fff; background: var(--ct-navy); }
#custom-theater-app .ctf-send:disabled { opacity: .55; }

/* 更多功能悬浮侧边按钮：悬在输入框上方、贴左边框；
   is-idle（10 秒无操作）时收拢进左边框并半透明，不遮挡正文阅读 */
#custom-theater-app .ctf-extras-dock { position: absolute; left: 0; bottom: 100%; margin-bottom: 10px; z-index: 9; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-left: max(8px, var(--ct-safe-left)); transition: opacity .3s ease, transform .3s ease; }
#custom-theater-app .ctf-extras-dock.is-idle { opacity: .34; transform: translateX(-58%); }
#custom-theater-app .ctf-extras-handle { width: 38px; height: 38px; border: 1px solid rgba(49,56,68,.16); border-radius: 13px; background: rgba(251,248,244,.92); box-shadow: 0 6px 16px rgba(75,68,62,.18); color: var(--ct-ink); font-size: 17px; font-weight: 600; line-height: 1; cursor: pointer; transition: transform .18s ease; }
#custom-theater-app .ctf-extras-dock.is-open .ctf-extras-handle { transform: rotate(45deg); }
#custom-theater-app .ctf-extras-panel { display: grid; gap: 7px; box-sizing: border-box; width: min(230px, 62vw); max-height: min(232px, calc(100dvh - var(--ct-safe-top) - var(--ct-safe-bottom) - 118px)); padding: 9px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; border: 1px solid rgba(49,56,68,.13); border-radius: 15px; background: rgba(251,248,244,.96); box-shadow: 0 14px 30px rgba(75,68,62,.22); }
#custom-theater-app .ctf-extras-panel::-webkit-scrollbar { display: none; }
#custom-theater-app .ctf-extras-panel[hidden] { display: none; }
#custom-theater-app .ctf-extras-panel > button { min-height: 44px; padding: 7px 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1px solid rgba(49,56,68,.13); border-radius: 13px; background: rgba(255,255,255,.72); color: var(--ct-ink); text-align: left; cursor: pointer; }
#custom-theater-app .ctf-extras-panel > button:disabled { opacity: .55; cursor: default; }
#custom-theater-app .ctf-extras-panel > button strong { font-size: 11px; letter-spacing: .08em; }
#custom-theater-app .ctf-extras-panel > button small { color: var(--ct-ink-soft); font-size: 8px; line-height: 1.4; }

/* 多选操作栏（多选模式下替换整个输入区） */
#custom-theater-app .ctf-select-bar { box-sizing: border-box; padding: 10px max(13px, calc(var(--ct-safe-right) + 13px)) calc(10px + var(--ct-safe-bottom)) max(13px, calc(var(--ct-safe-left) + 13px)); display: flex; align-items: center; gap: 8px; }
#custom-theater-app .ctf-select-bar span { flex: 1; font-size: 10px; font-weight: 700; color: var(--ct-ink-soft); }
#custom-theater-app .ctf-select-bar button { min-height: 36px; padding: 0 13px; border: 1px solid rgba(49,56,68,.15); border-radius: 11px; background: rgba(255,255,255,.72); color: var(--ct-ink); font: 800 10px/1 inherit; cursor: pointer; }
#custom-theater-app .ctf-select-bar button:disabled { opacity: .5; cursor: default; }
#custom-theater-app .ctf-select-bar button.is-danger { color: #8a4b46; border-color: rgba(138,75,70,.4); background: rgba(228,180,175,.28); }
#custom-theater-app .ctf-select-bar button.is-primary { color: #fff; border: 0; background: var(--ct-navy); }

#custom-theater-app .ctf-director-select select:focus-visible,
#custom-theater-app .ctf-actor-choice:focus-within,
#custom-theater-app .ctf-wide-field input:focus-visible,
#custom-theater-app .ctf-wide-field textarea:focus-visible,
#custom-theater-app .ctf-role-card input:focus-visible,
#custom-theater-app .ctf-role-card textarea:focus-visible,
#custom-theater-app .ctf-script-actions button:focus-visible,
#custom-theater-app .ctf-stage-actor:focus-visible,
#custom-theater-app .ctf-composer textarea:focus-visible,
#custom-theater-app .ctf-extras-handle:focus-visible,
#custom-theater-app .ctf-receive:focus-visible,
#custom-theater-app .ctf-send:focus-visible,
#custom-theater-app [data-ctf-turn-bubble]:focus-visible {
    outline: 2px solid rgba(163, 102, 98, .72);
    outline-offset: 2px;
}

/* 舞台单元包装：长按目标与多选勾选框 */
#custom-theater-app .ctf-turn { position: relative; }
#custom-theater-app .ctf-turn.is-selectable { padding-left: 30px; }
#custom-theater-app .ctf-turn-select { position: absolute; left: 0; top: 8px; z-index: 3; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; cursor: pointer; }
#custom-theater-app .ctf-turn-select input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
#custom-theater-app .ctf-turn-select i { width: 17px; height: 17px; border: 2px solid rgba(154,107,104,.55); border-radius: 50%; background: rgba(255,255,255,.85); transition: background .15s ease, border-color .15s ease; }
#custom-theater-app .ctf-turn-select input:checked + i { border-color: #9a6b68; background: radial-gradient(circle at center, #9a6b68 0 5px, rgba(255,255,255,.9) 6px); }
#custom-theater-app [data-ctf-turn-bubble] { cursor: pointer; }
#custom-theater-app .ctf-opening-scene { -webkit-touch-callout: none; }
#custom-theater-app .ctf-director-note[data-ctf-turn-bubble] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: pan-y; }
#custom-theater-app .ctf-turn .ctf-opening-copy,
#custom-theater-app .ctf-turn .ctf-opening-scene { -webkit-user-select: none; user-select: none; }
#custom-theater-app .ctf-turn.is-selectable .ctf-opening-scene,
#custom-theater-app .ctf-turn.is-selectable .ctf-director-note { pointer-events: none; }

/* 长按互动菜单 */
#custom-theater-app .ctf-bubble-menu-layer { position: absolute; inset: 0; z-index: 12; }
#custom-theater-app .ctf-bubble-menu-layer[hidden] { display: none; }
#custom-theater-app .ctf-bubble-backdrop { position: absolute; inset: 0; background: rgba(45,38,33,.34); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
#custom-theater-app .ctf-bubble-card { position: absolute; left: 50%; bottom: calc(24px + var(--ct-safe-bottom)); transform: translateX(-50%); box-sizing: border-box; width: min(320px, calc(100% - 34px)); padding: 13px; display: grid; gap: 8px; border: 1px solid rgba(49,56,68,.14); border-radius: 19px; background: rgba(251,248,244,.98); box-shadow: 0 17px 38px rgba(45,38,33,.28); }
#custom-theater-app .ctf-bubble-card > header { display: grid; gap: 1px; padding: 0 2px 3px; }
#custom-theater-app .ctf-bubble-card > header span { color: #9a6b68; font-size: 8px; font-weight: 800; letter-spacing: .32em; }
#custom-theater-app .ctf-bubble-card > header strong { font-size: 12px; letter-spacing: .06em; }
#custom-theater-app .ctf-bubble-card > button { min-height: 44px; padding: 8px 11px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1px solid rgba(49,56,68,.12); border-radius: 13px; background: rgba(255,255,255,.8); color: var(--ct-ink); text-align: left; cursor: pointer; }
#custom-theater-app .ctf-bubble-card > button strong { font-size: 11px; letter-spacing: .08em; }
#custom-theater-app .ctf-bubble-card > button small { color: var(--ct-ink-soft); font-size: 8px; line-height: 1.45; }
#custom-theater-app .ctf-bubble-card > button.ctf-bubble-cancel { min-height: 38px; align-items: center; justify-content: center; background: rgba(238,231,224,.72); font-weight: 800; font-size: 10px; }
#custom-theater-app .ctf-bubble-card .ctf-bubble-hint { margin: 0 2px; color: var(--ct-ink-soft); font-size: 9px; line-height: 1.6; }
#custom-theater-app .ctf-bubble-card textarea { box-sizing: border-box; width: 100%; padding: 9px 10px; resize: vertical; border: 1px solid rgba(49,56,68,.15); border-radius: 12px; outline: 0; color: var(--ct-ink); background: rgba(255,255,255,.85); font: 11px/1.6 inherit; }
#custom-theater-app .ctf-bubble-actions { display: flex; gap: 8px; }
#custom-theater-app .ctf-bubble-actions button { flex: 1; min-height: 38px; border: 1px solid rgba(49,56,68,.15); border-radius: 12px; background: rgba(255,255,255,.78); color: var(--ct-ink); font: 800 10px/1 inherit; cursor: pointer; }
#custom-theater-app .ctf-bubble-actions button.is-primary { color: #fff; border: 0; background: var(--ct-navy); }

/* 正文编辑页（与设置页同级的整屏浮层） */
#custom-theater-app .ctf-turn-editor { position: absolute; inset: 0; z-index: 13; display: flex; flex-direction: column; background: rgba(246,240,233,.99); }
#custom-theater-app .ctf-turn-editor[hidden] { display: none; }
#custom-theater-app .ctf-editor-body { flex: 1; min-height: 0; box-sizing: border-box; padding: 11px max(13px, calc(var(--ct-safe-right) + 13px)) calc(11px + var(--ct-safe-bottom)) max(13px, calc(var(--ct-safe-left) + 13px)); display: flex; flex-direction: column; gap: 9px; }
#custom-theater-app .ctf-editor-actions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
#custom-theater-app .ctf-editor-actions.is-user-message { grid-template-columns: minmax(0,1fr); }
#custom-theater-app .ctf-editor-actions button { min-height: 52px; padding: 8px 9px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; border: 1px solid rgba(49,56,68,.13); border-radius: 13px; background: rgba(255,255,255,.74); color: var(--ct-ink); text-align: left; cursor: pointer; }
#custom-theater-app .ctf-editor-actions button:disabled { opacity: .55; cursor: progress; }
#custom-theater-app .ctf-editor-actions button strong { font-size: 11px; letter-spacing: .1em; }
#custom-theater-app .ctf-editor-actions button small { color: var(--ct-ink-soft); font-size: 7.5px; line-height: 1.45; }
#custom-theater-app .ctf-editor-textarea { flex: 1; min-height: 120px; box-sizing: border-box; width: 100%; padding: 11px 12px; resize: none; border: 1px solid rgba(49,56,68,.15); border-radius: 15px; outline: 0; color: var(--ct-ink); background: rgba(255,255,255,.82); font: 11px/1.85 inherit; }
#custom-theater-app .ctf-editor-textarea[readonly] { opacity: .68; }
#custom-theater-app .ctf-editor-note { margin: 0; color: var(--ct-ink-soft); font-size: 8.5px; line-height: 1.6; }

@media (max-width: 520px) {
    #custom-theater-app .ctf-role-grid { grid-template-columns: 1fr; }
    #custom-theater-app .ctf-switch-grid { grid-template-columns: 1fr; }
}

@media (max-width: 350px) {
    #custom-theater-app .ctf-actor-list { grid-template-columns: 1fr; }
    #custom-theater-app .ctf-form-grid { grid-template-columns: 1fr; }
    #custom-theater-app .ctf-option-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #custom-theater-app .ctf-script-section { padding: 12px; }
    #custom-theater-app .ctf-settings-tiles { grid-template-columns: 1fr; }
    #custom-theater-app .ctf-brief-reference-head { align-items: flex-start; flex-direction: column; }
    #custom-theater-app .ctf-brief-reference-row { grid-template-columns: 30px minmax(64px,1fr) 50px 12px; gap: 5px; }
    #custom-theater-app .ctf-brief-reference-row button { grid-column: 2 / -1; justify-self: end; min-height: 30px; }
    #custom-theater-app .ctf-composer { gap: 5px; }
    #custom-theater-app .ctf-receive,
    #custom-theater-app .ctf-send { padding: 0 7px; }
    #custom-theater-app .ctf-extras-handle { width: 34px; height: 34px; }
}

@media (max-height: 620px), (orientation: landscape) and (max-height: 520px) {
    #custom-theater-app .ctf-stage-avatar { width: 34px; height: 34px; }
    #custom-theater-app .ctf-stage-actor { flex-basis: 43px; width: 43px; }
    #custom-theater-app .ctf-stage-actors { padding-top: 2px; padding-bottom: 6px; }
    #custom-theater-app .ctf-stage-content { padding-top: 12px; }
    #custom-theater-app .ctf-stage-empty { padding-top: 14px; padding-bottom: 14px; }
    #custom-theater-app .ctf-empty-clapper { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    #custom-theater-app .ctf-cast-toggle i,
    #custom-theater-app .ctf-extras-dock,
    #custom-theater-app .ctf-extras-handle,
    #custom-theater-app .ctf-stage-actors { transition: none; }
    #custom-theater-app .ctf-stage-empty.is-generating .ctf-empty-clapper i { animation: none; }
}

@media (prefers-contrast: more) {
    #custom-theater-app .ctf-picker-block,
    #custom-theater-app .ctf-script-section,
    #custom-theater-app .ctf-role-card,
    #custom-theater-app .ctf-stage-empty,
    #custom-theater-app .ctf-actor-panel-card { border-color: rgba(28,31,36,.52); }
    #custom-theater-app .ctf-picker-note { color: #332f2c; }
}

/* ============================================================
 * 舞台美化（剧目开演界面专属）：--ctb-* 变量消费
 * 变量由 custom-theater-stage-beautify.js 写到 #custom-theater-app 内联样式；
 * 未设置时全部回退到出厂视觉，与美化功能上线前完全一致。
 * ============================================================ */
#custom-theater-app.ct-stage-mode .ct-topbar { background: var(--ctb-topbar-bg, linear-gradient(180deg, rgba(240,230,220,.97), rgba(240,230,220,.79) 76%, rgba(240,230,220,0))); }
#custom-theater-app.ct-stage-mode .ct-topbar-title { color: var(--ctb-topbar-text, var(--ct-ink)); }
#custom-theater-app.ct-stage-mode .ct-back { color: var(--ctb-topbar-text, var(--ct-ink)); background: var(--ctb-topbar-btn-bg, rgba(255,250,243,.42)); }
#custom-theater-app.ct-stage-mode .ct-topbar-settings { color: var(--ctb-topbar-text, var(--ct-ink)); background: var(--ctb-topbar-btn-bg, rgba(255,250,243,.64)); }
#custom-theater-app .ctf-actor-panel-card { border: var(--ctb-actorpanel-border, 1px solid rgba(49,56,68,.14)); border-radius: var(--ctb-actorpanel-radius, 20px); background: var(--ctb-actorpanel-bg, rgba(241,240,239,.97)); box-shadow: var(--ctb-actorpanel-shadow, 14px 16px 34px rgba(45,42,39,.22), -7px -7px 20px rgba(255,255,255,.58)); }
#custom-theater-app .ctf-actor-panel-card header { border-bottom: var(--ctb-actorpanel-divider, 1px solid rgba(49,56,68,.1)); }
#custom-theater-app .ctf-panel-avatar { width: var(--ctb-actorpanel-avatar-size, 46px); height: var(--ctb-actorpanel-avatar-size, 46px); border-radius: var(--ctb-actorpanel-avatar-radius, 50%); }
#custom-theater-app .ctf-actor-panel-card header span { color: var(--ctb-actorpanel-kicker-color, #9a6b68); }
#custom-theater-app .ctf-actor-panel-card header strong { color: var(--ctb-actorpanel-name-color, inherit); font-family: var(--ctb-actorpanel-text-font, var(--ctb-dialogue-font, inherit)); font-size: var(--ctb-actorpanel-name-size, 14px); }
#custom-theater-app .ctf-actor-panel-card header small { color: var(--ctb-actorpanel-sub-color, var(--ct-ink-soft)); font-family: var(--ctb-actorpanel-text-font, var(--ctb-dialogue-font, inherit)); font-size: var(--ctb-actorpanel-sub-size, 9px); }
#custom-theater-app .ctf-actor-panel-card header button { color: var(--ctb-actorpanel-close-color, var(--ct-ink)); background: var(--ctb-actorpanel-close-bg, rgba(49,56,68,.07)); }
#custom-theater-app .ctf-actor-facts > div { border: var(--ctb-actorpanel-cell-border, none); border-radius: var(--ctb-actorpanel-cell-radius, 12px); background: var(--ctb-actorpanel-cell-bg, rgba(255,255,255,.56)); }
#custom-theater-app .ctf-actor-facts dt { color: var(--ctb-actorpanel-label-color, #9a6b68); font-family: var(--ctb-actorpanel-label-font, var(--ctb-narration-font, inherit)); font-size: var(--ctb-actorpanel-label-size, 8px); }
#custom-theater-app .ctf-actor-facts dd { color: var(--ctb-actorpanel-text-color, inherit); font-family: var(--ctb-actorpanel-text-font, var(--ctb-dialogue-font, inherit)); font-size: var(--ctb-actorpanel-text-size, 10px); }
#custom-theater-app .ctf-actor-panel-card footer button { border: var(--ctb-actorpanel-pager-btn-border, 1px solid rgba(49,56,68,.12)); color: var(--ctb-actorpanel-pager-btn-color, var(--ct-ink)); background: var(--ctb-actorpanel-pager-btn-bg, rgba(255,255,255,.55)); }
#custom-theater-app .ctf-actor-panel-card footer > span { color: var(--ctb-actorpanel-pager-color, var(--ct-ink-soft)); }
#custom-theater-app .ctf-stage-screen { background: var(--ctb-stage-bg-image, none) center / cover no-repeat, var(--ctb-stage-bg, linear-gradient(180deg, rgba(239,232,224,.7), rgba(246,240,233,.93))); color: var(--ctb-stage-text, var(--ct-ink)); }
#custom-theater-app .ctf-cast-dock { border-bottom: var(--ctb-actorbar-border, 1px solid rgba(49,56,68,.12)); background: var(--ctb-actorbar-bg, rgba(244,238,231,.88)); box-shadow: var(--ctb-actorbar-shadow, 0 7px 16px rgba(59,52,47,.06)); }
#custom-theater-app .ctf-cast-toggle { color: var(--ctb-actorbar-toggle-color, var(--ct-ink-soft)); }
#custom-theater-app .ctf-stage-actors { gap: var(--ctb-actorbar-gap, 11px); }
#custom-theater-app .ctf-stage-avatar { width: var(--ctb-actorbar-avatar-size, 39px); height: var(--ctb-actorbar-avatar-size, 39px); border: var(--ctb-actorbar-avatar-border, 2px solid rgba(255,255,255,.76)); border-radius: var(--ctb-actorbar-avatar-radius, 50%); box-shadow: var(--ctb-actorbar-avatar-shadow, 0 3px 9px rgba(49,56,68,.15)); }
#custom-theater-app .ctf-stage-actor > span:last-child { color: var(--ctb-actorbar-name-color, var(--ct-ink)); font-size: var(--ctb-actorbar-name-size, 8px); }
#custom-theater-app .ctf-opening-scene { border: var(--ctb-opening-border, 1px solid rgba(49,56,68,.12)); border-radius: var(--ctb-opening-radius, 21px); background: var(--ctb-opening-bg, rgba(251,248,244,.9)); box-shadow: var(--ctb-opening-shadow, 11px 13px 27px rgba(75,68,62,.11), -8px -8px 22px rgba(255,255,255,.58)); }
#custom-theater-app .ctf-opening-scene > header { background: var(--ctb-opening-header-bg, linear-gradient(145deg, rgba(238,231,224,.72), rgba(255,255,255,.48))); }
#custom-theater-app .ctf-opening-scene > header span { color: var(--ctb-opening-kicker-color, #9a6b68); }
#custom-theater-app .ctf-opening-scene > header strong { color: var(--ctb-opening-title-color, inherit); }
#custom-theater-app .ctf-opening-copy { color: var(--ctb-narration-color, #403c39); font-family: var(--ctb-narration-font, inherit); font-size: var(--ctb-narration-size, 12px); line-height: var(--ctb-narration-line, 1.9); }
/* 旁白 / 台词字体同时作用于 User 发出的导演消息（DIRECTOR · USER 卡） */
#custom-theater-app .ctf-director-note p { color: var(--ctb-narration-color, #4a4441); font-family: var(--ctb-narration-font, inherit); font-size: var(--ctb-narration-size, 11px); line-height: var(--ctb-narration-line, 1.75); }
#custom-theater-app .ctf-opening-copy .ctf-dialogue,
#custom-theater-app .ctf-director-note .ctf-dialogue { font-family: var(--ctb-dialogue-font, inherit); font-size: var(--ctb-dialogue-size, inherit); font-weight: var(--ctb-dialogue-weight, inherit); color: var(--ctb-dialogue-color, inherit); }
#custom-theater-app .ctf-voice-inline { border: var(--ctb-voice-border, 1px solid rgba(154,107,104,.34)); background: var(--ctb-voice-bg, linear-gradient(145deg, rgba(244,206,206,.32), rgba(255,255,255,.5))); }
#custom-theater-app .ctf-voice-inline-text { font-family: var(--ctb-dialogue-font, inherit); font-size: var(--ctb-dialogue-size, inherit); color: var(--ctb-dialogue-color, #5c4340); font-weight: var(--ctb-dialogue-weight, 600); }
#custom-theater-app .ctf-creative-notes { border: var(--ctb-notes-border, 1px solid rgba(49,56,68,.11)); background: var(--ctb-notes-bg, rgba(244,242,240,.9)); }
#custom-theater-app .ctf-creative-notes summary strong { color: var(--ctb-notes-title-color, inherit); }
#custom-theater-app .ctf-creative-notes > div { color: var(--ctb-notes-text-color, var(--ct-ink-soft)); }
#custom-theater-app .ctf-cg-module { border: var(--ctb-cg-border, 1px solid rgba(49,56,68,.12)); border-radius: var(--ctb-cg-radius, 16px); background: var(--ctb-cg-bg, rgba(248,245,241,.9)); }
#custom-theater-app .ctf-cg-module > header strong { color: var(--ctb-cg-title-color, inherit); }
#custom-theater-app .ctf-cg-figure { border-radius: var(--ctb-cg-image-radius, 13px); }
#custom-theater-app .ctf-composer-dock { background: var(--ctb-composer-bg, rgba(240,235,229,.94)); border-top: var(--ctb-composer-border, 1px solid rgba(49,56,68,.11)); }
#custom-theater-app .ctf-composer textarea { background: var(--ctb-composer-input-bg, rgba(255,255,255,.74)); color: var(--ctb-composer-input-color, var(--ct-ink)); }
#custom-theater-app .ctf-send { background: var(--ctb-send-bg, var(--ct-navy)); color: var(--ctb-send-color, #fff); }

/* 舞台美化面板（设置页子视图） */
#custom-theater-app .ctb-panel { display: grid; gap: 10px; }
#custom-theater-app .ctb-group { border: 1px solid rgba(49,56,68,.13); border-radius: 15px; background: rgba(247,241,234,.92); }
#custom-theater-app .ctb-group summary { min-height: 44px; padding: 8px 13px; display: flex; flex-direction: column; justify-content: center; gap: 2px; cursor: pointer; list-style: none; }
#custom-theater-app .ctb-group summary::-webkit-details-marker { display: none; }
#custom-theater-app .ctb-group summary strong { font-size: 12px; letter-spacing: .05em; }
#custom-theater-app .ctb-group summary small { color: var(--ct-ink-soft); font-size: 8px; }
#custom-theater-app .ctb-fields { padding: 0 13px 12px; display: grid; gap: 8px; }
#custom-theater-app .ctb-field span { display: block; margin-bottom: 4px; color: var(--ct-ink-soft); font-size: 9px; font-weight: 700; }
#custom-theater-app .ctb-field input { box-sizing: border-box; width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid rgba(49,56,68,.18); border-radius: 10px; outline: 0; color: var(--ct-ink); background: rgba(255,253,249,.8); font: 10px/1.5 "Courier New", monospace; }
#custom-theater-app .ctb-global { padding: 13px; border: 1px solid rgba(154,107,104,.3); border-radius: 15px; background: rgba(247,241,234,.95); }
#custom-theater-app .ctb-global > header { margin-bottom: 9px; }
#custom-theater-app .ctb-global > header strong { display: block; font-size: 13px; letter-spacing: .05em; }
#custom-theater-app .ctb-global > header small { display: block; margin-top: 3px; color: var(--ct-ink-soft); font-size: 9px; line-height: 1.5; }
#custom-theater-app .ctb-fonts { overflow: hidden; border: 1px solid rgba(70,81,96,.26); border-radius: 15px; background: rgba(247,241,234,.95); }
#custom-theater-app .ctb-fonts > summary { min-height: 58px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; touch-action: manipulation; }
#custom-theater-app .ctb-fonts > summary::-webkit-details-marker { display: none; }
#custom-theater-app .ctb-fonts > summary strong { display: block; font-size: 13px; letter-spacing: .05em; }
#custom-theater-app .ctb-fonts > summary small { display: block; margin-top: 3px; color: var(--ct-ink-soft); font-size: 9px; line-height: 1.5; }
#custom-theater-app .ctb-fonts > summary i { flex: 0 0 auto; color: #76514e; font: 18px/1 inherit; transition: transform .18s ease; }
#custom-theater-app .ctb-fonts[open] > summary i { transform: rotate(180deg); }
#custom-theater-app .ctb-fonts > summary:focus-visible { outline: 2px solid #9a6b68; outline-offset: -3px; }
#custom-theater-app .ctb-fonts-body { padding: 0 13px 13px; }
#custom-theater-app .ctb-font-pickers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
#custom-theater-app .ctb-font-pickers label { min-width: 0; padding: 9px; display: grid; gap: 5px; border: 1px solid rgba(49,56,68,.14); border-radius: 11px; background: rgba(255,253,249,.72); }
#custom-theater-app .ctb-font-pickers label > span { font-size: 10px; font-weight: 760; }
#custom-theater-app .ctb-font-pickers select { box-sizing: border-box; width: 100%; min-height: 37px; padding: 0 8px; border: 1px solid rgba(49,56,68,.18); border-radius: 9px; outline: 0; color: var(--ct-ink); background: #fff; font: 10px/1.2 inherit; }
#custom-theater-app .ctb-font-pickers select:focus { border-color: #9a6b68; box-shadow: 0 0 0 2px rgba(154,107,104,.12); }
#custom-theater-app .ctb-font-pickers small { color: var(--ct-ink-soft); font-size: 7px; line-height: 1.45; }
#custom-theater-app .ctb-fonts-boundary { margin: 9px 2px 0; color: var(--ct-ink-soft); font-size: 8px; line-height: 1.55; text-align: center; }
@media (max-width: 390px), (max-height: 620px) {
    #custom-theater-app .ctb-font-pickers { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    #custom-theater-app .ctb-fonts > summary i { transition: none; }
}
#custom-theater-app .ctb-global .ctb-fields { padding: 0 0 11px; }
#custom-theater-app .ctb-editor { box-sizing: border-box; width: 100%; padding: 10px; resize: vertical; border: 1px solid rgba(49,56,68,.2); border-radius: 12px; outline: 0; color: #3d3a37; background: rgba(255,253,249,.86); font: 10px/1.7 "Courier New", monospace; white-space: pre; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
#custom-theater-app .ctb-editor::-webkit-scrollbar { width: 0; height: 0; display: none; }
#custom-theater-app .ctb-editor-error { margin: 8px 0 0; color: #8a4b46; font-size: 9px; line-height: 1.55; }
#custom-theater-app .ctb-actions { margin-top: 10px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
#custom-theater-app .ctb-actions button,
#custom-theater-app .ctb-save-row button,
#custom-theater-app .ctb-scheme-actions button { min-height: 36px; padding: 0 8px; border: 1px solid rgba(70,81,96,.2); border-radius: 10px; color: var(--ct-ink); background: rgba(255,255,255,.62); font: 700 10px/1 inherit; cursor: pointer; touch-action: manipulation; }
#custom-theater-app .ctb-actions button[data-ctb-save-scheme] { color: #fff; border-color: var(--ct-navy); background: var(--ct-navy); }
#custom-theater-app .ctb-save-row { margin-top: 9px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 7px; }
#custom-theater-app .ctb-save-row input { box-sizing: border-box; min-height: 36px; padding: 0 10px; border: 1px solid rgba(49,56,68,.2); border-radius: 10px; outline: 0; color: var(--ct-ink); background: rgba(255,253,249,.86); font: 11px/1.4 inherit; }
#custom-theater-app .ctb-schemes { margin-top: 11px; padding-top: 11px; border-top: 1px dashed rgba(49,56,68,.16); }
#custom-theater-app .ctb-schemes > label span { display: block; margin-bottom: 4px; color: var(--ct-ink-soft); font-size: 9px; font-weight: 700; }
#custom-theater-app .ctb-schemes select { box-sizing: border-box; width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid rgba(49,56,68,.2); border-radius: 10px; outline: 0; color: var(--ct-ink); background: rgba(255,253,249,.86); font: 11px/1.4 inherit; }
#custom-theater-app .ctb-scheme-actions { margin-top: 7px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
#custom-theater-app .ctb-note { margin: 2px 2px 0; color: var(--ct-ink-soft); font-size: 8px; line-height: 1.55; text-align: center; }
@media (max-width: 350px) {
    #custom-theater-app .ctb-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
