/* 定制剧场 · 《末日狂袭》舞台附属模块：剧情发展选项 + 薪火终端（紧凑版） */

/* ---------- 剧情发展选项 ---------- */
#custom-theater-app .ctf-mori-choices {
    box-sizing: border-box;
    width: min(100%, 560px);
    margin: 12px auto 0;
    padding: 9px 10px 8px;
    border: 1px solid rgba(49,56,68,.12);
    border-left: 3px solid var(--ct-navy, #465160);
    border-radius: 14px;
    background: rgba(251,248,244,.88);
    box-shadow: 6px 7px 16px rgba(70,62,56,.07), -4px -4px 12px rgba(255,255,255,.5);
}
#custom-theater-app .ctf-mori-choices header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 7px; }
#custom-theater-app .ctf-mori-choices header span { color: var(--ct-navy, #465160); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
#custom-theater-app .ctf-mori-choices header small { color: var(--ct-ink-soft, #6b7280); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#custom-theater-app .ctf-mori-choices ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
#custom-theater-app .ctf-mori-choice {
    box-sizing: border-box;
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    border: 1px solid rgba(49,56,68,.14);
    border-radius: 10px;
    color: var(--ct-ink, #313844);
    background: rgba(255,255,255,.62);
    text-align: left;
    font: inherit;
    font-size: 10.5px;
    line-height: 1.55;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
#custom-theater-app .ctf-mori-choice:active { transform: scale(.995); }
#custom-theater-app .ctf-mori-choice:hover:not(:disabled) { background: rgba(255,255,255,.9); border-color: rgba(70,81,96,.4); }
#custom-theater-app .ctf-mori-choice.is-selected { border-color: var(--ct-navy, #465160); background: rgba(70,81,96,.1); box-shadow: inset 0 0 0 1px var(--ct-navy, #465160); }
#custom-theater-app .ctf-mori-choice:disabled { cursor: default; opacity: .6; }
#custom-theater-app .ctf-mori-choice i {
    margin-top: 2px;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .08em;
    color: #fff;
    background: var(--ct-navy, #465160);
    white-space: nowrap;
}
#custom-theater-app .ctf-mori-choice.is-relation i { background: #9a6b68; }
#custom-theater-app .ctf-mori-choice.is-flavor i { background: #8a8f6e; }
#custom-theater-app .ctf-mori-choice span { min-width: 0; overflow-wrap: anywhere; }
#custom-theater-app .ctf-mori-choices footer { margin: 7px 0 0; display: flex; justify-content: flex-end; }
#custom-theater-app .ctf-mori-choice-go {
    min-height: 30px;
    padding: 0 11px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--ct-navy, #465160);
    font: inherit;
    font-size: 9.5px;
    font-weight: 700;
    cursor: pointer;
}
#custom-theater-app .ctf-mori-choice-go:disabled { opacity: .55; cursor: default; }
#custom-theater-app .ctf-mori-choices.is-past { opacity: .72; }
#custom-theater-app .ctf-mori-choices.is-past ol { gap: 4px; }
#custom-theater-app .ctf-mori-choices.is-past .ctf-mori-choice { min-height: 30px; padding: 4px 8px; font-size: 9.5px; }
#custom-theater-app .ctf-mori-choices.is-empty { padding-bottom: 9px; }
#custom-theater-app .ctf-mori-choices.is-empty header { margin-bottom: 0; }

/* ---------- 薪火终端 ---------- */
#custom-theater-app .ctf-mori-terminal,
#custom-theater-app .ctf-mori-terminal-missing {
    box-sizing: border-box;
    width: min(100%, 560px);
    margin: 10px auto 0;
    border: 1px solid rgba(49,56,68,.14);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(49,56,68,.96), rgba(70,81,96,.94));
    color: #e9e4dc;
    box-shadow: 6px 8px 18px rgba(40,44,52,.22);
}
#custom-theater-app .ctf-mori-terminal-missing { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 10px; opacity: .85; }
#custom-theater-app .ctf-mori-terminal-missing span,
#custom-theater-app .ctf-mori-logo {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(233,228,220,.12);
    color: #f3d9a6;
    font-size: 11px;
    font-weight: 700;
}
#custom-theater-app .ctf-mori-terminal-missing small { font-size: 8.5px; line-height: 1.5; color: rgba(233,228,220,.8); }
#custom-theater-app .ctf-mori-terminal summary {
    min-height: 38px;
    padding: 6px 10px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    list-style: none;
    cursor: pointer;
}
#custom-theater-app .ctf-mori-terminal summary::-webkit-details-marker { display: none; }
#custom-theater-app .ctf-mori-terminal summary strong { display: block; font-size: 10px; letter-spacing: .12em; }
#custom-theater-app .ctf-mori-terminal summary small { display: block; color: rgba(233,228,220,.72); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#custom-theater-app .ctf-mori-chips { display: flex; gap: 4px; }
#custom-theater-app .ctf-mori-chips em {
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 7.5px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .06em;
    color: #2b3039;
    background: #d9d3c8;
}
#custom-theater-app .ctf-mori-chips em.is-main { background: #a9c4e8; }
#custom-theater-app .ctf-mori-chips em.is-emergency { background: #f0d38a; }
#custom-theater-app .ctf-mori-chips em.is-private { background: #e8a9b6; }
#custom-theater-app .ctf-mori-chips em.is-off { opacity: .28; }
#custom-theater-app .ctf-mori-body { padding: 0 10px 10px; }
#custom-theater-app .ctf-mori-tabs { display: flex; gap: 4px; margin: 2px 0 8px; padding: 3px; border-radius: 8px; background: rgba(0,0,0,.18); }
#custom-theater-app .ctf-mori-tabs button {
    flex: 1 1 0;
    min-height: 26px;
    border: 0;
    border-radius: 6px;
    color: rgba(233,228,220,.7);
    background: transparent;
    font: inherit;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
}
#custom-theater-app .ctf-mori-tabs button.is-active { color: #2b3039; background: #e9e4dc; }
#custom-theater-app .ctf-mori-pane { display: grid; gap: 6px; }
#custom-theater-app .ctf-mori-pane[hidden] { display: none; }
#custom-theater-app .ctf-mori-task {
    position: relative;
    padding: 7px 9px 7px 11px;
    border-radius: 9px;
    background: rgba(233,228,220,.08);
    border-left: 3px solid #a9c4e8;
}
#custom-theater-app .ctf-mori-task.is-emergency { border-left-color: #f0d38a; }
#custom-theater-app .ctf-mori-task.is-private { border-left-color: #e8a9b6; }
#custom-theater-app .ctf-mori-task.is-empty { padding: 5px 9px 5px 11px; display: flex; align-items: center; justify-content: space-between; opacity: .55; }
#custom-theater-app .ctf-mori-task > span { display: block; font-size: 7.5px; letter-spacing: .12em; color: rgba(233,228,220,.65); }
#custom-theater-app .ctf-mori-task.is-empty > span { display: inline; }
#custom-theater-app .ctf-mori-task b { display: block; margin-top: 2px; font-size: 10.5px; color: #fff; }
#custom-theater-app .ctf-mori-task p { margin: 3px 0 0; font-size: 9px; line-height: 1.55; color: rgba(233,228,220,.92); overflow-wrap: anywhere; }
#custom-theater-app .ctf-mori-task p.is-criteria { color: #f3d9a6; }
#custom-theater-app .ctf-mori-task small { display: block; margin-top: 3px; font-size: 8px; line-height: 1.5; color: rgba(233,228,220,.62); overflow-wrap: anywhere; }
#custom-theater-app .ctf-mori-task small.is-penalty { color: #e8a9b6; }
#custom-theater-app .ctf-mori-task.is-done { opacity: .82; border-left-color: #8fcaa0; }
#custom-theater-app .ctf-mori-task.is-done b { color: #d8f0df; }
#custom-theater-app .ctf-mori-task-flag {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 4px;
    background: #8fcaa0;
    color: #1d2a22;
    font-size: 7.5px;
    letter-spacing: .08em;
    font-style: normal;
    font-weight: 700;
    vertical-align: 1px;
}
#custom-theater-app .ctf-mori-task small.is-reward { color: #cfe8c4; }
#custom-theater-app .ctf-mori-notice { margin: 2px 0 0; padding: 5px 8px; border-radius: 7px; background: rgba(243,217,166,.12); color: #f3d9a6; font-size: 8.5px; line-height: 1.5; }
#custom-theater-app .ctf-mori-counters { margin: 0; font-size: 7.5px; letter-spacing: .06em; color: rgba(233,228,220,.5); text-align: right; }
#custom-theater-app .ctf-mori-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 0; }
#custom-theater-app .ctf-mori-facts > div { padding: 5px 7px; border-radius: 7px; background: rgba(233,228,220,.08); min-width: 0; }
#custom-theater-app .ctf-mori-facts > div.is-wide { grid-column: 1 / -1; }
#custom-theater-app .ctf-mori-facts dt { font-size: 7.5px; letter-spacing: .1em; color: rgba(233,228,220,.6); }
#custom-theater-app .ctf-mori-facts dd { margin: 2px 0 0; font-size: 10px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#custom-theater-app .ctf-mori-bars { display: grid; gap: 4px; }
#custom-theater-app .ctf-mori-bar { display: grid; grid-template-columns: 26px minmax(0, 1fr) 24px; align-items: center; gap: 6px; font-size: 8px; }
#custom-theater-app .ctf-mori-bar span { color: rgba(233,228,220,.75); letter-spacing: .06em; }
#custom-theater-app .ctf-mori-bar i { display: block; height: 6px; border-radius: 3px; background: rgba(0,0,0,.25); overflow: hidden; }
#custom-theater-app .ctf-mori-bar i b { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #a9c4e8, #f3d9a6); }
#custom-theater-app .ctf-mori-bar em { font-style: normal; text-align: right; color: #fff; }
#custom-theater-app .ctf-mori-partners { padding: 6px 8px; border-radius: 8px; background: rgba(232,169,182,.1); }
#custom-theater-app .ctf-mori-partners > span { display: block; font-size: 7.5px; letter-spacing: .12em; color: #e8a9b6; }
#custom-theater-app .ctf-mori-partners > small { display: block; margin-top: 3px; font-size: 8.5px; color: rgba(233,228,220,.55); }
#custom-theater-app .ctf-mori-partners ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
#custom-theater-app .ctf-mori-partners li { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 999px; background: rgba(233,228,220,.12); font-size: 9px; color: #fff; }
#custom-theater-app .ctf-mori-partners li b { min-width: 14px; padding: 0 4px; border-radius: 999px; background: #e8a9b6; color: #2b3039; font-size: 8px; text-align: center; }

#custom-theater-app .ctf-mori-lock {
    display: grid;
    gap: 6px;
    padding: 8px 9px;
    border-radius: 10px;
    background: rgba(70, 81, 96, .06);
    font-size: 10px;
}
#custom-theater-app .ctf-mori-lock p { margin: 0; color: var(--ct-ink, #313844); }
#custom-theater-app .ctf-mori-lock label { display: inline-flex; align-items: center; gap: 6px; color: var(--ct-ink-soft, #6b7280); }
#custom-theater-app .ctf-section-title button[data-ctf-mori-reroll] {
    margin-left: auto;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(49,56,68,.16);
    border-radius: 8px;
    background: #fff;
    color: var(--ct-navy, #465160);
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}
#custom-theater-app .ctf-section-title button[data-ctf-mori-reroll]:disabled { opacity: .5; cursor: default; }
/* ---------- 终端内嵌的小队 / 基地 / 行囊页 ---------- */
#custom-theater-app .ctf-mori-tabs.is-five { gap: 2px; }
#custom-theater-app .ctf-mori-tabs.is-five button { min-height: 24px; padding: 0 2px; font-size: 8.5px; letter-spacing: .02em; white-space: nowrap; }
#custom-theater-app .ctf-mori-ledger-line { margin: 2px 0 0; font-size: 8px; letter-spacing: .04em; color: #f3d9a6; }
#custom-theater-app .ctf-mori-ledger { margin: 0; padding-left: 14px; font-size: 8px; line-height: 1.5; color: rgba(233,228,220,.7); }
#custom-theater-app .ctf-mori-hint { margin: 0; font-size: 7.5px; letter-spacing: .04em; color: rgba(233,228,220,.5); text-align: right; }
#custom-theater-app .ctf-mori-empty { margin: 0; padding: 8px; font-size: 9px; color: rgba(233,228,220,.55); text-align: center; }
/* 小队：只露出前三名，其余靠自身滚动查看；滚动条隐形，保留触控 / 滚轮 / 拖动 */
#custom-theater-app .ctf-mori-members {
    display: grid;
    gap: 5px;
    max-height: 178px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 14px), transparent);
    mask-image: linear-gradient(180deg, #000 calc(100% - 14px), transparent);
}
#custom-theater-app .ctf-mori-members::-webkit-scrollbar { width: 0; height: 0; display: none; }
#custom-theater-app .ctf-mori-member { padding: 6px 8px; border-radius: 8px; background: rgba(233,228,220,.08); border-left: 2px solid rgba(233,228,220,.18); }
#custom-theater-app .ctf-mori-member.is-user { border-left-color: #f3d9a6; }
#custom-theater-app .ctf-mori-member strong { display: block; font-size: 10.5px; color: #fff; }
#custom-theater-app .ctf-mori-member small,
#custom-theater-app .ctf-mori-member p,
#custom-theater-app .ctf-mori-member em { display: block; margin: 2px 0 0; font-size: 8px; line-height: 1.45; color: rgba(233,228,220,.72); font-style: normal; overflow-wrap: anywhere; }
#custom-theater-app .ctf-mori-member em { color: #e8a9b6; }
/* 基地 */
#custom-theater-app .ctf-mori-base-level { margin: 0; display: grid; gap: 2px; }
#custom-theater-app .ctf-mori-base-level b { font-size: 11px; color: #fff; }
#custom-theater-app .ctf-mori-base-level small { font-size: 8px; color: rgba(233,228,220,.65); }
#custom-theater-app .ctf-mori-res { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 0; }
#custom-theater-app .ctf-mori-res > div { min-width: 0; padding: 5px 6px; border-radius: 7px; background: rgba(233,228,220,.08); }
#custom-theater-app .ctf-mori-res dt { font-size: 7.5px; letter-spacing: .08em; color: rgba(233,228,220,.6); white-space: nowrap; }
#custom-theater-app .ctf-mori-res dd { margin: 2px 0 0; font-size: 11px; color: #fff; }
/* 行囊 */
#custom-theater-app .ctf-mori-zone span { display: block; margin-bottom: 3px; font-size: 7.5px; letter-spacing: .12em; color: rgba(233,228,220,.6); }
#custom-theater-app .ctf-mori-zone ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
#custom-theater-app .ctf-mori-zone li { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 7px; border-radius: 6px; background: rgba(233,228,220,.08); font-size: 9px; color: #fff; }
#custom-theater-app .ctf-mori-zone li > span { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#custom-theater-app .ctf-mori-zone li i { padding: 1px 4px; border-radius: 3px; font-size: 7px; font-style: normal; color: #2b3039; background: #f3d9a6; }
#custom-theater-app .ctf-mori-zone li b { font-size: 8.5px; color: rgba(233,228,220,.8); }
#custom-theater-app .ctf-mori-zone li.is-empty { opacity: .4; }
#custom-theater-app .ctf-mori-zone li.is-consumed { opacity: .5; text-decoration: line-through; }
#custom-theater-app .ctf-mori-zone li button { flex: 0 0 auto; min-height: 20px; padding: 0 7px; border: 0; border-radius: 5px; background: #f3d9a6; color: #2b3039; font: inherit; font-size: 8px; font-weight: 700; cursor: pointer; }
#custom-theater-app .ctf-mori-stock {
    min-height: 28px; border: 0; border-radius: 7px; background: #f3d9a6; color: #2b3039;
    font: inherit; font-size: 9.5px; font-weight: 700; cursor: pointer;
}

@media (max-width: 340px) {
    #custom-theater-app .ctf-mori-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #custom-theater-app .ctf-mori-terminal summary { grid-template-columns: 22px minmax(0, 1fr); }
    #custom-theater-app .ctf-mori-chips { grid-column: 2; justify-content: flex-start; }
    #custom-theater-app .ctf-mori-res { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #custom-theater-app .ctf-mori-tabs.is-five button { font-size: 8px; letter-spacing: 0; }
}
