/* 纸鸢春游 · 仅在本剧主动应用内置方案后启用。颜色/字体继续使用舞台美化变量。 */
.ctb-spring-kite { display: none; }
.ctb-spring-back-seal { display: none; }

#custom-theater-app[data-ctb-preset="spring-kite"] {
    --ct-ink: #344633;
    --ct-ink-soft: #647054;
    --ct-paper: #f5efd8;
    --ct-paper-soft: #faf6e7;
    --ct-blush: #dfc5bf;
    --ct-navy: #457635;
    --ct-line: rgba(69, 91, 51, .22);
    font-family: CTBSpringMing, "Songti SC", serif;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ct-background {
    background-color: #f8ebbd;
    background-image: var(--ctb-stage-bg-image);
    background-position: center top;
    transform: none;
    filter: none;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ct-background::after {
    background: linear-gradient(180deg, rgba(250,247,226,.02) 0, rgba(250,247,226,.08) 28%, rgba(250,247,226,.25) 68%, rgba(250,247,226,.5));
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-stage-screen { background: transparent; }
#custom-theater-app[data-ctb-preset="spring-kite"].ct-stage-mode .ct-topbar {
    z-index: 9;
    height: calc(148px + var(--ct-safe-top));
    align-items: start;
    grid-template-columns: 44px minmax(0,1fr) 44px;
    background: var(--ctb-topbar-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
}
#custom-theater-app[data-ctb-preset="spring-kite"].ct-stage-mode .ct-back {
    position: relative;
    pointer-events: auto;
    margin-top: 5px;
    width: 44px;
    height: 44px;
    box-sizing: border-box;
    padding: 0;
    border: 1px solid #975440;
    border-radius: 3px 1px 4px 2px;
    color: #975440;
    background: rgba(250,245,224,.88);
    box-shadow: none;
    transform: rotate(-4deg);
    transition: transform 120ms ease-out;
}
#custom-theater-app[data-ctb-preset="spring-kite"].ct-stage-mode .ct-back:active { transform: rotate(-4deg) scale(.95); }
#custom-theater-app[data-ctb-preset="spring-kite"].ct-stage-mode .ct-back.ctb-spring-back-ready { border-color: transparent; background: transparent; }
#custom-theater-app[data-ctb-preset="spring-kite"].ct-stage-mode .ct-back.ctb-spring-back-ready > svg { visibility: hidden; }
#custom-theater-app[data-ctb-preset="spring-kite"].ct-stage-mode .ct-back.ctb-spring-back-ready .ctb-spring-back-seal {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
#custom-theater-app[data-ctb-preset="spring-kite"].ct-stage-mode .ct-topbar-settings { display: none; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ct-topbar-title {
    position: absolute;
    top: calc(66px + var(--ct-safe-top));
    right: max(25px, calc(var(--ct-safe-right) + 25px));
    max-width: calc(100% - 152px - var(--ct-safe-left) - var(--ct-safe-right));
    text-align: right;
    color: var(--ctb-topbar-text);
    font: 400 clamp(20px, 5.2vw, 26px)/1.55 CTBSpringTitle, CTBSpringMing, serif;
    letter-spacing: .14em;
    overflow-wrap: anywhere;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    text-wrap: balance;
    text-shadow: 0 1px 6px #faf6e7, 0 0 18px #faf6e7;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctb-spring-title-settings {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 2px 0;
    border: 0;
    border-radius: 3px;
    color: inherit;
    background: transparent;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-align: inherit;
    text-shadow: inherit;
    overflow-wrap: anywhere;
    text-wrap: balance;
    pointer-events: auto;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
/* 演员条覆盖剧名：隐藏下面的入口，同时禁止误触与键盘进入被遮挡的按钮。 */
#custom-theater-app[data-ctb-preset="spring-kite"]:has(.ctf-cast-dock:not(.is-collapsed)) .ct-topbar-title { visibility: hidden; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-cast-dock {
    position: relative;
    z-index: 10;
    min-height: 116px;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-cast-toggle {
    width: 96px;
    min-height: 110px;
    padding: 0;
    margin-left: max(19px, calc(var(--ct-safe-left) + 19px));
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    border-radius: 7px;
    font: 400 11px/1.4 CTBSpringKai, serif;
    touch-action: manipulation;
    pointer-events: auto;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctb-spring-kite {
    display: block;
    width: 84px;
    height: 94px;
    object-fit: contain;
    transform-origin: 50% 75%;
    animation: ctb-spring-wind 7.6s cubic-bezier(.45,0,.55,1) infinite;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctb-spring-cast-label {
    position: relative;
    margin-top: -6px;
    padding: 2px 7px;
    color: #3c5833;
    background: rgba(250,247,226,.87);
    border-radius: 2px;
    font-size: 10px;
    letter-spacing: .1em;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-cast-toggle > i { display: none; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-stage-actors {
    position: absolute;
    top: 12px;
    left: max(116px, calc(var(--ct-safe-left) + 116px));
    right: max(15px, calc(var(--ct-safe-right) + 15px));
    max-height: 78px;
    padding: 10px 9px 7px;
    border: 1px solid rgba(69,91,51,.22);
    border-radius: 3px 14px 3px 14px;
    background: var(--ctb-actorbar-bg);
    box-shadow: 0 5px 18px rgba(58,81,42,.1);
    opacity: 1;
    transform: translateX(0);
    transform-origin: left center;
    transition: transform 220ms cubic-bezier(.23,1,.32,1), opacity 150ms ease-out;
    scrollbar-color: #97b365 transparent;
    pointer-events: auto;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-cast-dock.is-collapsed .ctf-stage-actors {
    max-height: 78px;
    padding: 10px 9px 7px;
    opacity: 0;
    transform: translateX(-12px);
    visibility: hidden;
    content-visibility: hidden;
    pointer-events: none;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-stage-actor { flex: 0 0 45px; width: 45px; gap: 5px; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-stage-actor > span:last-child { font-family: CTBSpringKai, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-stage-content {
    padding: 8px max(16px, calc(var(--ct-safe-right) + 16px)) calc(102px + var(--ct-safe-bottom)) max(16px, calc(var(--ct-safe-left) + 16px));
}
/* 宣纸淡化左右边沿，上下墨线的端点各有一只小纸鸢。 */
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-opening-scene {
    position: relative;
    overflow: visible;
    padding: 23px 0;
    background: linear-gradient(90deg, transparent, var(--ctb-opening-bg) 5%, var(--ctb-opening-bg) 95%, transparent);
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-opening-scene::before,
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-opening-scene::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 25px;
    background: url("assets/custom-theater-spring/ink-rule.svg") center / 100% 100% no-repeat;
    pointer-events: none;
    opacity: .78;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-opening-scene::before { top: 0; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-opening-scene::after { bottom: 0; transform: rotate(180deg); }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-opening-scene > header { padding: 7px 21px 10px; border: 0; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-opening-scene > header strong { font: 400 19px/1.5 CTBSpringTitle, serif; letter-spacing: .12em; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-opening-scene > header span { font: 400 9px/1.5 CTBSpringKai, serif; letter-spacing: .14em; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-opening-copy { padding: 8px 21px 12px; overflow-wrap: anywhere; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctb-spring-narration { display: block; text-indent: 2em; text-align: justify; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctb-spring-dialogue {
    display: block;
    margin: .85em 0;
    text-align: center;
    text-indent: 0;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctb-spring-dialogue::after,
#custom-theater-app[data-ctb-preset="spring-kite"] .ctb-spring-voice-text::after {
    content: "咪";
    display: inline-block;
    box-sizing: border-box;
    width: 1.32em;
    height: 1.38em;
    margin-left: .45em;
    border: 1px solid currentColor;
    border-radius: 2px 1px 3px 1px;
    box-shadow: inset 0 0 0 1px #faf6e7, inset 0 0 0 2px rgba(153,73,53,.4);
    color: #994935;
    background: #f5e3cb;
    font: 400 .72em/1.24 CTBSpringMing, serif;
    text-indent: 0;
    text-align: center;
    vertical-align: .04em;
    transform: rotate(-7deg);
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-voice-inline {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 1em auto;
    padding: 7px 10px;
    border-radius: 2px 9px 2px 9px;
    text-indent: 0;
    text-align: center;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-voice-inline-text { line-height: 1.9; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-voice-inline-main { justify-content: center; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-voice-inline-icon { color: #6b9136; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-voice-inline-hint { color: #705047; background: #efe2cc; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-director-note { border: 0; border-left: 2px solid #97b365; border-radius: 0; background: rgba(250,247,232,.94); }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-creative-notes { border-radius: 2px 12px 2px 12px; box-shadow: none; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-creative-notes summary strong { font: 400 14px/1.5 CTBSpringKai, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-creative-notes summary small { font: 400 10px/1.5 CTBSpringKai, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-creative-notes > div { font-size: 13px; line-height: 1.9; border-radius: 2px; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-film-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 27px;
    height: 29px;
    border: 1px solid #819463;
    border-radius: 1px;
    background: #f8f2df;
    color: #536e3e;
    transform: rotate(-5deg);
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-film-icon i { display: none; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-film-icon::after { content: "记"; font: 400 18px/1 CTBSpringMing, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-creative-notes summary > i { color: #647054; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-cg-module { box-shadow: none; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-cg-module > header strong { font: 400 14px/1.5 CTBSpringKai, serif; }
/* 画轴保留原生 details 的可访问性；展开内容以向下舒卷的方式显现。 */
#custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-block {
    position: relative;
    box-sizing: border-box;
    width: min(calc(100% - 12px), 520px);
    margin: 22px auto 16px;
    border: 0;
    border-left: 5px solid #d1d2ad;
    border-right: 5px solid #d1d2ad;
    border-radius: 1px;
    background: #f8f2df;
    box-shadow: 0 4px 12px rgba(71,81,40,.1), inset 0 0 20px rgba(154,140,86,.1);
    overflow: visible;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-block::before,
#custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-block::after {
    content: "";
    position: absolute;
    left: -12px;
    right: -12px;
    height: 9px;
    border: 1px solid rgba(69,91,51,.4);
    border-radius: 4px;
    background: linear-gradient(90deg, #537143 0 4%, #b4b88a 4.5%, #e4d8ac 9% 91%, #b4b88a 95.5%, #537143 96%);
    box-shadow: 0 2px 2px rgba(70,80,40,.12);
    pointer-events: none;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-block::before { top: -4px; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-block::after { bottom: -4px; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-block > summary { min-height: 44px; box-sizing: border-box; padding: 11px 12px; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-block > summary strong { font: 400 15px/1.5 CTBSpringKai, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-tag { border: 1px solid #a6ac7d; border-radius: 1px; background: #eef0d8; color: #4b6438; font: 400 10px/1.5 CTBSpringMing, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-content { padding: 8px 12px 20px; color: #344633; background: transparent; font-family: CTBSpringMing, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-block[open] > .ctmt-stage-content { animation: ctb-spring-scroll 260ms cubic-bezier(.23,1,.32,1); transform-origin: center top; }
/* 舞台内按钮统一为墨绿笺签；危险动作仍以赭红区分。 */
#custom-theater-app[data-ctb-preset="spring-kite"] :is(.ctf-stage-screen, .ctf-stage-settings) :is(button, input, textarea, select),
#custom-theater-app[data-ctb-preset="spring-kite"] .ctm-floating-bubble > small { font-family: CTBSpringKai, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] :is(.ctf-stage-screen, .ctf-stage-settings) button { transition: transform 120ms ease-out, background-color 150ms ease-out; }
#custom-theater-app[data-ctb-preset="spring-kite"] :is(.ctf-stage-screen, .ctf-stage-settings) button:active { transform: scale(.97); }
#custom-theater-app[data-ctb-preset="spring-kite"] :is(button, summary, [role="button"], textarea, select, input):focus-visible { outline: 2px solid #6b9136; outline-offset: 3px; }
#custom-theater-app[data-ctb-preset="spring-kite"] :is(.ctf-media-action, .ctf-mini-status button, .ctf-extras-panel > button, .ctf-bubble-card button, .ctf-editor-actions button, .ctf-stage-earlier button) {
    color: #3d5b30;
    border: 1px solid rgba(69,91,51,.3);
    border-radius: 2px 9px 2px 9px;
    background: #f9f5e8;
    box-shadow: none;
    font-family: CTBSpringKai, serif;
}
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-extras-panel { background: #f8f2df; border-color: #a2ad86; border-radius: 3px 12px 3px 12px; box-shadow: 0 8px 22px rgba(56,76,42,.18); }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-extras-panel > button strong { font: 400 14px/1.5 CTBSpringKai, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-extras-panel > button small { font-family: CTBSpringMing, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-extras-handle { width: 42px; height: 42px; color: #3c5833; border-color: #a2ad86; border-radius: 3px 12px 3px 12px; background: #f8f2df; box-shadow: 0 3px 9px rgba(56,76,42,.14); }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-composer-dock { backdrop-filter: none; -webkit-backdrop-filter: none; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-composer { gap: 7px; padding-top: 10px; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-composer textarea { min-height: 42px; border-radius: 2px 9px 2px 9px; border-color: #b3b894; font-size: 13px; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-composer textarea::placeholder { color: #72745c; opacity: 1; }
#custom-theater-app[data-ctb-preset="spring-kite"] :is(.ctf-receive, .ctf-send) { min-height: 42px; border-radius: 3px 9px 3px 9px; font: 400 15px/1 CTBSpringKai, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-receive { color: #456235; border: 1px solid #a2ad86; background: #eef0d8; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctm-floating-bubble { border: 1px solid #9aa47b; border-radius: 3px 14px 3px 14px; background: #4f703c; color: #fff9e8; box-shadow: 0 4px 12px rgba(56,76,42,.18); }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctm-floating-bubble > small { font-size: 10px; font-weight: 400; }
#custom-theater-app[data-ctb-preset="spring-kite"] :is(.ctf-actor-panel-card, .ctf-stage-settings, .ctf-turn-editor) { font-family: CTBSpringMing, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-actor-panel { top: 112px; max-height: calc(100% - 190px); overflow-y: auto; overscroll-behavior: contain; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-actor-panel-card { border-radius: 2px 15px 2px 15px; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-actor-facts > div { box-shadow: none; }
#custom-theater-app[data-ctb-preset="spring-kite"] :is(.ctf-settings-topbar, .ctmt-topbar) { background: #eef0d8; border-color: #b3b894; }
#custom-theater-app[data-ctb-preset="spring-kite"] :is(.ctf-settings-card, .ctf-settings-tile, .ctb-group, .ctb-global, .ctb-fonts) { background: #faf6e7; border-color: #b3b894; border-radius: 3px 12px 3px 12px; box-shadow: none; }
#custom-theater-app[data-ctb-preset="spring-kite"] :is(.ctf-stage-settings, .ctf-turn-editor, .ctmt-page) { background: #f5efd8; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-settings-topbar strong { font: 400 19px/1.5 CTBSpringTitle, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-stage-settings button { font-family: CTBSpringKai, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctb-actions button { min-height: 38px; padding: 0 5px; font-size: 11px; line-height: 1.4; white-space: nowrap; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctb-editor { font-family: Consolas, "Courier New", monospace; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-turn-editor textarea { background: #faf6e7; font-family: CTBSpringMing, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-bubble-card { border-color: #a2ad86; background: #f8f2df; border-radius: 3px 12px 3px 12px; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-bubble-card :is(button, textarea) { font-family: CTBSpringKai, serif; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-bubble-actions button.is-primary { color: #fff9e7; background: #457635; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-bubble-card [data-ctf-bubble-delete] { color: #8c493a; border-color: rgba(140,73,58,.3); }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-mini-status { border-color: #a2ad86; font-family: CTBSpringKai, serif; font-size: 11px; }
#custom-theater-app[data-ctb-preset="spring-kite"] .ctf-jump-capsule { border-radius: 3px 12px 3px 12px; }
@keyframes ctb-spring-wind {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(-5deg); }
    24% { transform: translate3d(2px, -4px, 0) rotate(1deg); }
    53% { transform: translate3d(-2px, -7px, 0) rotate(-2deg); }
    78% { transform: translate3d(1px, -2px, 0) rotate(3deg); }
}
@keyframes ctb-spring-scroll {
    from { opacity: .4; transform: translateY(-6px) scaleY(.97); }
    to { opacity: 1; transform: translateY(0) scaleY(1); }
}
@media (max-width: 350px) {
    #custom-theater-app[data-ctb-preset="spring-kite"] .ct-topbar-title { right: 18px; max-width: calc(100% - 134px); font-size: 22px; }
    #custom-theater-app[data-ctb-preset="spring-kite"] .ctf-stage-content { padding-left: 11px; padding-right: 11px; }
    #custom-theater-app[data-ctb-preset="spring-kite"] .ctf-opening-copy { padding-left: 17px; padding-right: 17px; }
}
@media (prefers-reduced-motion: reduce) {
    #custom-theater-app[data-ctb-preset="spring-kite"] .ctb-spring-kite,
    #custom-theater-app[data-ctb-preset="spring-kite"] .ctmt-stage-block[open] > .ctmt-stage-content { animation: none; }
    #custom-theater-app[data-ctb-preset="spring-kite"] :is(button, .ctf-stage-actors) { transition: none; }
}
