/* P5X timeline styles entrypoint. Keep import order aligned with the old monolithic cascade. */
/* Generated bundle from apps/p5x-timeline/styles.css. Keep source files as the editable cascade; run npm run timeline:styles when imports change. */

/* === styles-base.css === */
/* Base shell and shared controls */
/* 🔥 1. 彻底禁止字号调整 🔥 */
@font-face {
    font-family: "TimelineHan";
    src: url("../p5x-cover/fonts/SourceHanSansSC-Heavy.woff2") format("woff2");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

html { -webkit-text-size-adjust: none; text-size-adjust: none; }

/* --- 基础样式 --- */
:root {
    --p5-red: #d32f2f;
    --p5-black: #000;
    --p5-yellow: #fbc02d;
    --p5-blue: #26c6da;
    --p5-gray: #f0f0f0;
    --preview-canvas-width: 1380px;
    --preview-content-width: 1340px;
    --preview-note-width: 190px;
}
body { background-color: #111; font-family: "Microsoft YaHei", "TimelineHan", sans-serif; color: #fff; margin: 0; padding: 20px; display: flex; gap: 20px; justify-content: center; height: 100vh; overflow: hidden; }

.console { width: 500px; background: #333; border-right: 4px solid var(--p5-red); display: flex; flex-direction: column; height: 95vh; box-shadow: 10px 0 20px rgba(0,0,0,0.8); z-index: 100; }
.console-head { background: var(--p5-red); padding: 10px; text-align: center; font-weight: bold; font-style: italic; letter-spacing: 1px; }
.console-body { flex: 1; overflow-y: auto; padding: 15px; scrollbar-width: thin; }

/* 米妮大扫除：旧版 sec-title 已经被底部的黑底白字样式接管，这里留空防止冲突！ */
.row { margin-bottom: 8px; }
label { display: block; font-size: 11px; color: #aaa; margin-bottom: 2px; }
input, select, textarea { width: 100%; background: #444; border: 1px solid #555; color: white; padding: 5px; box-sizing: border-box; font-size: 12px; }
select#w-potential.is-auto:disabled {
    color: var(--p5-yellow);
    border-color: rgba(251,192,45,0.46);
    background: linear-gradient(180deg, #3b3522, #28251d);
    opacity: 1;
    cursor: not-allowed;
}
option.qishi-recommended-option,
option.zhouka-recommended-option {
    background: #3a2f16;
    color: #ffcf62;
    font-weight: 900;
}
.wonder-weapon-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px;
    gap: 4px;
}
.wonder-weapon-grid.has-engraving {
    grid-template-columns: minmax(0, 1.1fr) 70px minmax(0, 0.9fr);
}
.wonder-weapon-grid select[hidden] {
    display: none;
}
textarea { height: 50px; resize: vertical; font-family: inherit; }

.btn-group { display: flex; gap: 5px; margin-top: 5px; }
.btn { flex: 1; padding: 6px; cursor: pointer; font-size: 12px; border: none; color: white; font-weight: bold; }
.btn-add { background: #444; border: 1px dashed #888; color: #ccc; } .btn-add:hover { background: #555; color: #fff; border-color: #fff; }
.btn-del { background: #500; border: 1px solid #800; color: #faa; max-width: 60px;} .btn-del:hover { background: #800; color: #fff; }
.btn-save { background: #1976d2; border: 1px solid #0d47a1; color: #e3f2fd; } .btn-save:hover { background: #0d47a1; color: #fff; }
/* 导出按钮通用底座 */
.btn-export {
    font-size: 16px;
    padding: 12px;
    width: 100%;
    border: 2px dashed #000;
    font-weight: 900;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 5px 5px 0 #000;
}

/* 黄色导出专属外观 */
.btn-export {
    background: var(--p5-yellow);
    color: #000;
    transform: rotate(-1deg);
}
.btn-export:hover {
    background: #fff;
    border-color: var(--p5-red);
    color: var(--p5-red);
    transform: rotate(1deg) scale(1.05);
}

.console-bottom-actions {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #555;
}

.console-bottom-actions .btn-bug {
    margin-bottom: 0;
}

.canvas-area { flex: 1; background: #333; padding: 20px; overflow: auto; display: flex; justify-content: center; align-items: flex-start; position: relative; }

.timeline-locate-toast {
    position: absolute;
    top: 18px;
    left: 50%;
    z-index: 1002;
    max-width: min(520px, calc(100% - 48px));
    padding: 8px 14px;
    border: 1px solid rgba(251,192,45,0.86);
    border-radius: 8px;
    background: rgba(10,10,10,0.92);
    box-shadow: 0 14px 32px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.08);
    color: #fff8cb;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -8px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.timeline-locate-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* === styles-preview-core.css === */
/* Preview canvas, header, team cards, arsenal and calculator */
/* 🔥 2. 画布核心样式重置 🔥 */
.canvas {
    /* --- 1. 骨架 (一定要保留，不然排版会乱！) --- */
    width: var(--preview-canvas-width);
    flex: 0 0 var(--preview-canvas-width);
    min-height: 1300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transform-origin: top left;

    /* 给画布本身加一点点投影，让它像一张真正的白纸放在桌面上 */
    box-shadow: 0 0 20px rgba(0,0,0,0.1);

    /* --- 2. 皮肤：涩谷霓虹 (Shibuya Glitch) --- */
    background-color: #181818;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(211, 47, 47, 0.03) 10px,
            rgba(211, 47, 47, 0.03) 20px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 5px,
            rgba(0, 0, 0, 0.02) 5px,
            rgba(0, 0, 0, 0.02) 15px
        );
    background-size: 100% 100%;
}

/* 💥 从960变成1160 (永远比canvas少40px的内边距)！ */
.layout-block { width: var(--preview-content-width); margin-bottom: 20px; position: relative; z-index: 10; box-sizing: border-box; }
.watermark-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#wm-text { font-size: 60px; font-weight: 900; color: #000; opacity: 0.08; transform: rotate(-30deg); white-space: nowrap; text-transform: uppercase; font-family: Impact, sans-serif; }

.header-area { padding-top: 40px; display: flex; flex-direction: column; align-items: center; width: 100%; margin-bottom: 50px;}
.ransom-title-box {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ransom-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    color: white;
    background: #000;
    font-weight: 900;
    font-size: 36px;
    border: 3px solid #fff;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.8);
    font-family: "Impact", "TimelineHan", sans-serif;
    line-height: 1;
    min-width: 40px;
}
.ransom-char:nth-child(3n+1) { transform: rotate(-3deg); background: #000; }
.ransom-char:nth-child(3n+2) { transform: rotate(2deg); background: var(--p5-red); border-color: #000; color: #fff; }
.ransom-char:nth-child(3n+3) { transform: rotate(-1deg); background: #fff; border-color: #000; color: #000; }
/* ========================================= */
/* 🕵️‍♀️ TARGET INTEL 战术情报带 (取代旧副标题) */
/* ========================================= */
.target-intel-ribbon {
    display: grid;
    grid-template-columns: minmax(330px, 390px) minmax(300px, 1fr) minmax(300px, 380px);
    align-items: center;
    gap: 18px;
    min-height: 92px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.08), transparent 36%),
        linear-gradient(180deg, #252629 0%, #111214 100%);
    border: 3px solid #050505;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.56);
    margin-bottom: 25px;
    position: relative;
    box-sizing: border-box;
    padding: 12px 16px 12px 76px;
    overflow: hidden;
}

.target-intel-ribbon::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 58px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), transparent 40%),
        repeating-linear-gradient(45deg, var(--p5-red), var(--p5-red) 10px, #050505 10px, #050505 20px);
    z-index: 1;
    border-right: 3px solid #050505;
}

.intel-left, .intel-center, .intel-right {
    position: relative;
    z-index: 2;
}

.intel-left {
    display: flex;
    gap: 8px;
    min-width: 0;
    align-self: center;
    align-items: stretch;
    width: auto;
}

.intel-tag {
    --intel-accent: rgba(255,255,255,0.48);
    flex: 1 1 0;
    min-width: 0;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    padding: 8px 11px;
    font-family: "Microsoft YaHei", "TimelineHan", sans-serif;
    white-space: nowrap;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.16);
    border-left: 5px solid var(--intel-accent);
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.12)),
        rgba(7, 8, 10, 0.82);
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.34),
        0 6px 12px rgba(0,0,0,0.24) !important;
}

.intel-tag span {
    display: block;
    min-width: 0;
}

.intel-tag::before { display: none; }

.intel-tag-label {
    color: rgba(255,255,255,0.52);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.4px;
    line-height: 1;
}

.intel-tag-value {
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.58);
}

.version-tag {
    --intel-accent: var(--p5-red);
    flex: 0 0 88px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.12)),
        linear-gradient(180deg, #b91e28, #701017) !important;
}

.mode-tag {
    --intel-accent: #ffffff;
    flex: 1.05 1 132px;
}

.env-tag {
    --intel-accent: var(--p5-yellow);
    flex: 1.05 1 136px;
    background:
        linear-gradient(180deg, rgba(255,194,64,0.18), rgba(0,0,0,0.12)),
        rgba(20, 16, 5, 0.86) !important;
}

.env-tag .intel-tag-label {
    color: rgba(255,224,112,0.72);
}

.env-tag .intel-tag-value {
    color: var(--p5-yellow);
    font-size: 14px;
}

.intel-center {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.target-label {
    font-size: 12px;
    color: var(--p5-red);
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 2px;
    font-family: "Impact", sans-serif;
}

.target-name {
    font-size: 42px;
    font-weight: 900;
    color: #fff;
    text-shadow: 3px 3px 0 var(--p5-red), -2px -2px 0 #000;
    line-height: 1;
    letter-spacing: 4px;
}

.intel-right {
    display: flex;
    gap: 10px;
    width: 380px; /* 🔥米妮扩容：必须和左边保持绝对对称！ */
    justify-content: flex-end;
}

.radar-box {
    background: #222;
    border: 2px solid #444;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 140px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.radar-title {
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.weak-title { color: #ff5252; border-bottom: 1px solid #ff5252; padding-bottom: 2px; }
.resist-title { color: #90caf9; border-bottom: 1px solid #90caf9; padding-bottom: 2px; }

.radar-icons {
    display: flex;
    gap: 6px;
    align-items: center;
    min-height: 24px;
}

.radar-empty {
    color: #666;
    font-size: 12px;
    font-style: italic;
    font-weight: bold;
}

.radar-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(1px 1px 1px #000);
}

.team-container { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; width: 100%; flex-wrap: wrap; align-content: center; }
.team-section { width: 100%; display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; transform: none; /* 🌍 停止地震！回归平稳的站立面 */ }
.team-section.reserves { flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 2px dashed #ccc; }
/* 💥 终极撕裂风：倾斜外框 + 内部空间反转（绝对不伤学妹的脸！） */
.card { width: 175px; height: 250px; background: #222; border: none !important; position: relative; flex-shrink: 0; box-shadow: 6px 6px 0 var(--p5-red); margin-bottom: 15px; transform: skewX(-6deg); overflow: hidden; border-radius: 0; transition: all 0.2s ease; }
.card.wonder { background: #200; box-shadow: 6px 6px 0 var(--p5-red); }
/* Navi 卡片解除黑框封印，融入整体风格 */
.card.navi { background: #222; box-shadow: 6px 6px 0 var(--p5-blue); margin-left: 40px; }

/* 卡片悬停：框放大，阴影加厚，整体动感拉满 */
.card:hover { transform: scale(1.05) translateY(-5px) skewX(-6deg); z-index: 100; box-shadow: 10px 10px 0 #000; }

/* 关键魔法：容器反向倾斜并放大，完美抵消掉外框的变形！ */
.card-img-wrap { width: 100%; height: 100%; overflow: hidden; background: #444; display: flex; align-items: center; justify-content: center; transform: skewX(6deg) scale(1.15); transform-origin: center; }
.card-img { width: 100%; height: 100%; object-fit: cover; }
.ph-text { font-size: 40px; color: #666; font-weight: bold; opacity: 0.5; }
/* 💥 迷你平行四边形：完美贴合卡片边缘，白色硬描边 + 普通黑阴影 */
.card-name { position: absolute; top: 5px; left: -5px; background: #000; color: white; padding: 4px 12px; font-size: 16px; font-weight: bold; transform: none; border: 2px solid white !important; z-index: 5; box-shadow: 4px 4px 0 rgba(0,0,0,0.5); white-space: nowrap; }

.card:not(.reserve-summary-card) .card-name {
    --nameplate-height: 35px;
    top: 8px;
    left: 5px;
    right: 5px;
    align-items: center;
    width: auto;
    max-width: none;
    min-height: var(--nameplate-height);
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid transparent !important;
    border-radius: 11px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.09), transparent 34%, rgba(255,255,255,0.05)) padding-box,
        linear-gradient(180deg, rgba(255,255,255,0.08), transparent 54%, rgba(0,0,0,0.22)) padding-box,
        linear-gradient(0deg, color-mix(in srgb, var(--card-accent, var(--p5-red)) 14%, rgba(4,5,6,0.78)), color-mix(in srgb, var(--card-accent, var(--p5-red)) 14%, rgba(4,5,6,0.78))) padding-box,
        linear-gradient(135deg, rgba(255,255,255,0.92), color-mix(in srgb, var(--card-accent, var(--p5-red)) 92%, #fff) 32%, color-mix(in srgb, var(--card-accent, var(--p5-red)) 78%, #05070c) 72%, rgba(255,255,255,0.60)) border-box !important;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.08),
        inset 0 -10px 18px rgba(0,0,0,0.28),
        0 5px 0 rgba(0,0,0,0.58),
        0 0 18px color-mix(in srgb, var(--card-accent, var(--p5-red)) 52%, transparent);
    backdrop-filter: blur(7px) saturate(1.18);
}

.card:not(.wonder):not(.reserve-summary-card) .card-name {
    --nameplate-level-slot: 39px;
    display: grid;
    grid-template-columns: var(--nameplate-level-slot) minmax(0, 1fr);
    column-gap: 5px;
    padding: 0 10px 0 7px;
}

.card.has-card-name-attr:not(.wonder):not(.reserve-summary-card) .card-name {
    grid-template-columns: var(--nameplate-level-slot) minmax(0, 1fr) 20px;
    padding-right: 5px;
}

.card.wonder .card-name {
    display: flex;
    justify-content: flex-start;
    padding: 0 12px 0 16px;
}

.card:not(.wonder):not(.reserve-summary-card) .card-name::before {
    content: none;
    display: none;
}

.card-level-badge {
    display: inline-flex;
    justify-self: center;
    align-items: center;
    justify-content: center;
    height: 21px;
    min-width: 28px;
    padding: 0 5px;
    box-sizing: border-box;
    color: rgba(255,255,255,0.92);
    font-size: 9.5px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    text-shadow: 0 2px 3px rgba(0,0,0,0.92);
    border: 1px solid color-mix(in srgb, var(--card-accent, var(--p5-red)) 68%, rgba(255,255,255,0.58));
    border-radius: 8px;
    background:
        radial-gradient(circle at 35% 18%, rgba(255,255,255,0.34), transparent 32%),
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(0,0,0,0.28)),
        color-mix(in srgb, var(--card-accent, var(--p5-red)) 22%, rgba(0,0,0,0.48));
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.24),
        0 3px 6px rgba(0,0,0,0.40),
        0 0 8px color-mix(in srgb, var(--card-accent, var(--p5-red)) 42%, transparent);
}

.card-level-badge[data-level-value="100"] {
    min-width: 36px;
    padding-inline: 5px;
    font-size: 8.5px;
}

.card:not(.wonder):not(.reserve-summary-card) .card-name::after {
    content: "";
    display: none;
}

.card-name-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255,255,255,0.98);
    font-family: "Microsoft YaHei UI", "TimelineHan", "Microsoft YaHei", sans-serif;
    font-size: 12.8px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-align: left;
    align-self: center;
    text-shadow: none;
    transform: none;
}

.card-name-attr-icon {
    justify-self: end;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    padding: 1px;
    object-fit: contain;
    border: 1px solid color-mix(in srgb, var(--card-accent, var(--p5-red)) 66%, rgba(255,255,255,0.58));
    border-radius: 7px;
    background:
        radial-gradient(circle at 34% 22%, rgba(255,255,255,0.34), transparent 34%),
        rgba(4,5,8,0.38);
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.22),
        0 2px 5px rgba(0,0,0,0.46),
        0 0 8px color-mix(in srgb, var(--card-accent, var(--p5-red)) 36%, transparent);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.72));
}

.reserve-summary-card .card-name-attr-icon {
    display: none !important;
}

/* ✅ 7.5 回归纯CSS整容版：全员白框风格 + 瘦身 */

.card-info {
    position: absolute;
    bottom: 6px;
    right: 6px;
    z-index: 2;

    /* 保持右下角堆叠结构 */
    display: flex;
    flex-direction: column; /* 上下排列 */
    align-items: flex-end;  /* 靠右对齐 */
    gap: 2px; /* 上下间距缩得非常小，紧凑！ */
}

/* ✅ 双子专属：恢复旧版规整的右上角角标 */
.card-identity-band {
    --card-identity-size: 18px;
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 56px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--card-identity-size);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.card-identity-band.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.card-star-rank {
    display: block;
    height: var(--card-identity-size);
    width: auto;
    max-width: 112px;
    object-fit: contain;
    transform: translateY(-1px);
    filter:
        drop-shadow(0 4px 3px rgba(0,0,0,0.74))
        drop-shadow(0 0 5px rgba(255,255,255,0.24));
}

.twin-badge-box {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 8;
    display: none;
    align-items: center;
    gap: 0;
    padding: 2px 3px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16), transparent 55%),
        rgba(0, 0, 0, 0.50);
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.24),
        0 3px 6px rgba(0,0,0,0.36);
    pointer-events: none;
}

.twin-skill-icon {
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    padding: 1px;
    object-fit: contain;
    background:
        radial-gradient(circle at 34% 26%, rgba(255,255,255,0.20), transparent 33%),
        rgba(5, 6, 8, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.42),
        0 2px 4px rgba(0,0,0,0.38);
}

.twin-skill-icon + .twin-skill-icon {
    margin-left: -4px;
}

/* ============================= */
/* 队友管理栏：按旧版逻辑重新规整 */
/* ============================= */
.team-member-box {
    border-top: 1px dashed #444;
    margin-top: 8px;
    padding-top: 8px;
}

.team-member-box:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.team-member-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.team-member-title {
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.team-member-order {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.team-member-order-label {
    color: var(--p5-yellow);
    font-size: 11px;
    font-weight: bold;
    margin: 0;
    white-space: nowrap;
}

.team-member-order-select {
    width: 48px !important;
    text-align: center;
    padding: 5px 4px;
}

.team-member-order-reserve {
    gap: 7px;
    padding: 3px 4px 3px 7px;
    border-left: 3px solid var(--p5-red);
    background:
        linear-gradient(110deg, transparent 0%, transparent 42%, rgba(255,255,255,0.12) 50%, transparent 58%, transparent 100%),
        linear-gradient(180deg, rgba(255,255,255,0.045), rgba(0,0,0,0.16)),
        rgba(8,9,11,0.56);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -1px 0 rgba(0,0,0,0.55),
        0 4px 10px rgba(0,0,0,0.24);
}

.team-member-order-reserve .team-member-order-label {
    color: var(--p5-yellow);
    text-shadow: 0 1px 2px rgba(0,0,0,0.86);
}

.team-member-order-static {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 25px;
    padding: 0 10px;
    box-sizing: border-box;
    cursor: default;
    border: 1px solid rgba(255,255,255,0.18);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.03) 48%, rgba(0,0,0,0.26) 100%),
        rgba(18,19,22,0.88);
    color: #f1f1f1;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 3px rgba(0,0,0,0.86);
    box-shadow:
        0 3px 0 rgba(0,0,0,0.62),
        inset 0 1px 0 rgba(255,255,255,0.18),
        inset 0 0 0 1px rgba(0,0,0,0.25);
}

.team-member-row {
    margin-top: 4px;
}

.team-member-row-label {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 2px;
}

.team-member-row-label-accent {
    color: var(--p5-yellow);
    font-weight: bold;
}

.team-member-main-select {
    width: 100%;
}

.team-member-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.twin-select-row {
    flex-direction: column;
    gap: 4px;
    background: #330000;
    padding: 4px;
    border-radius: 4px;
    border: 1px solid rgba(211, 47, 47, 0.35);
}

/* --- 上层：宙卡与启示 (CSS整容成白框) --- */
.insp-box {
    display: flex;
    gap: 3px;
    align-items: center;
    margin-bottom: 0; /* 抵消掉原有的 margin */
}

.insp-tag {
    /* 1. 去掉原来的斜切和颜色 */
    transform: none;
    border: none;

    /* 2. 换上"7.3版"的高级白框皮肤 */
    /* 按照老大要求：7.1标准的透明度 (0.2) */
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #fff !important;
    text-shadow: 1px 1px 0 #000;
    font-weight: bold;
    font-family: "Microsoft YaHei", "TimelineHan", sans-serif;

    /* 💥 字号提升到 12px，框体 padding 增加 */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    font-size: 12px;
    padding: 2px 8px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}


/* --- 下层：意识与武器 (瘦身版) --- */
.icon-tag { object-fit: contain; filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.5)); }

/* 💥 图标养胖计划：回到 26px 黄金尺寸 */
.rank-icon { width: 26px; height: 26px; }
.mod-icon { width: 26px; height: 26px; }

.rank-weapon-box {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    justify-content: flex-end;
    align-items: center;

    /* 🔥 新增：半透明底框核心逻辑 */
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

.arsenal-box { width: 100%; background: #1a1a1a; border: 2px solid #fff; box-shadow: 8px 8px 0 var(--p5-red); padding: 15px 30px; color: white; display: flex; align-items: center; gap: 24px; box-sizing: border-box; }
.ars-title {
    font-size: 32px;
    font-weight: 900;
    font-style: italic;
    color: var(--p5-red);
    line-height: 0.9;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 180px;
    /* ✅ 核心修改：加了右边距，把它往左挤 */
    margin-right: 0;
    font-family: "Impact", sans-serif; /* 确保字体硬朗 */
}
.ars-title-img {
    display: block;
    width: 156px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.ars-level-stack {
    flex: 0 0 auto;
    width: 48px;
    min-height: 78px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 6px 4px;
    box-sizing: border-box;
    position: relative;
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 15%, rgba(255,255,255,0.13), transparent 44%),
        linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.13),
        0 6px 13px rgba(0,0,0,0.34);
}
.ars-level-stack::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
}
.ars-level-stack.is-active {
    background:
        radial-gradient(circle at 50% 15%, rgba(255,255,255,0.22), transparent 44%),
        linear-gradient(180deg, rgba(211,47,47,0.24), rgba(255,255,255,0.03));
}
.ars-level-stack.is-max::before {
    border-color: transparent;
    background: linear-gradient(
        135deg,
        #fff7ff 0%,
        #ff9cd8 13%,
        #a8efff 28%,
        #fff8b8 43%,
        #8fffe0 58%,
        #bba8ff 76%,
        #ffffff 100%
    ) border-box;
    -webkit-mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}
.ars-level-twins,
.ars-level-rank {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}
.ars-level-twins {
    border: 2px solid rgba(255,255,255,0.8);
    background: #090909;
    box-shadow: 0 2px 6px rgba(0,0,0,0.45);
}
.ars-level-twins.is-muted {
    filter: grayscale(1) brightness(0.68);
    opacity: 0.48;
    border-color: rgba(255,255,255,0.28);
}
.ars-level-stack.is-active .ars-level-twins {
    filter: none;
    opacity: 1;
    border-color: rgba(255,255,255,0.9);
}
.ars-level-stack.is-max .ars-level-twins {
    padding: 2px;
    border: 0;
    background: linear-gradient(
        135deg,
        #fff7ff 0%,
        #ff9cd8 13%,
        #a8efff 28%,
        #fff8b8 43%,
        #8fffe0 58%,
        #bba8ff 76%,
        #ffffff 100%
    );
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.9),
        0 0 13px rgba(168,239,255,0.45),
        0 2px 7px rgba(0,0,0,0.5);
}
.ars-level-rank {
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.58));
}
.ars-divider {
    width: 3px;
    height: 60px;
    transform: none;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.38)),
        #ffffff;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.45),
        0 0 14px rgba(211,47,47,0.24);
}
.ars-content {
    flex: 1;
    min-width: 0;
    align-self: stretch;
    position: relative;
    display: grid;
    grid-template-columns: minmax(128px, 1.05fr) repeat(3, minmax(138px, 1fr));
    gap: 14px;
    padding: 5px 4px;
    box-sizing: border-box;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.ars-content::after {
    content: none;
}
.ars-item {
    min-width: 0;
    position: relative;
    display: grid;
    grid-template-rows: 14px 23px 18px;
    gap: 6px;
    padding: 3px 4px 4px 10px;
    box-sizing: border-box;
    overflow: hidden;
    border-left: 1px solid rgba(255,255,255,0.11);
    background: transparent;
}
.ars-item:first-child {
    border-left: 0;
}
.ars-item-weapon {
    grid-template-rows: 14px minmax(47px, 1fr);
}
.ars-head,
.ars-name-row,
.ars-sub {
    min-width: 0;
}
.ars-head {
    display: flex;
    align-items: flex-end;
}
/* 强制不换行 */
.ars-label {
    font-size: 10px;
    line-height: 1;
    color: rgba(180,190,210,0.78);
    letter-spacing: 0;
    white-space: nowrap;
}
.ars-name-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(211,47,47,0.62);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.ars-val {
    min-width: 0;
    display: flex;
    align-items: center;
    color: #fff;
    padding-bottom: 1px;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.72);
}
.ars-name-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ars-sub {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    overflow: hidden;
}
.ars-sub-empty {
    visibility: hidden;
}
.ars-weapon-main {
    min-width: 0;
    display: grid;
    grid-template-rows: 23px 22px;
    gap: 6px;
    align-items: stretch;
}
.ars-weapon-name-row {
    min-width: 0;
    justify-content: space-between;
    gap: 8px;
    padding-right: 2px;
}
.ars-weapon-name-row .ars-val {
    min-width: 0;
}
.ars-weapon-sub-row {
    min-width: 0;
    display: block;
    align-items: center;
}
.ars-weapon-sub-row .ars-sub {
    min-width: 0;
}
.ars-weapon-mod-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.58));
}
.ars-mask-name-row {
    min-width: 0;
    justify-content: space-between;
    gap: 8px;
    padding-right: 2px;
}
.ars-mask-name-row .ars-val {
    min-width: 0;
}
.ars-mask-attr-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.58));
}
.engraving-mini {
    min-width: 0;
    max-width: 100%;
    height: 18px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    padding: 0 6px 0 3px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    border-left: 2px solid var(--weapon-accent, rgba(211,47,47,0.9));
    border-radius: 2px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), transparent 58%),
        rgba(20,22,25,0.88);
    color: rgba(238,242,248,0.9);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.22);
}
.engraving-mini-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55));
}
.engraving-mini-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.skill-mini {
    min-width: 0;
    max-width: calc(50% - 2px);
    height: 18px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    padding: 0 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid color-mix(in srgb, var(--skill-accent, #7a828e) 44%, rgba(255,255,255,0.16));
    border-radius: 2px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.13), transparent 58%),
        color-mix(in srgb, var(--skill-accent, #7a828e) 32%, rgba(20,22,25,0.9));
    color: rgba(255,255,255,0.92);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.2),
        0 1px 3px rgba(0,0,0,0.22);
}
.skill-mini:only-child {
    max-width: 100%;
}

.note-wrap { display: none; } .note-box { width: 100%; background: #1a1a1a; border: 2px solid #fff; padding: 15px 20px; color: #eee; font-size: 14px; line-height: 1.6; box-shadow: 8px 8px 0 var(--p5-red); position: relative; box-sizing: border-box; text-align: left; } .note-box::before { content: "NOTE"; position: absolute; top: -12px; left: 10px; background: var(--p5-red); color: #fff; padding: 0 5px; font-size: 12px; font-weight: bold; }

.calc-board {
    width: 100%;
    background: #fff;
    border: 2px solid #050505;
    box-shadow: 7px 7px 0 rgba(0,0,0,0.42);
    box-sizing: border-box;
}
.calc-row {
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    min-height: 64px;
    border-bottom: 2px solid #050505;
    background: #fff;
}
.calc-row:last-child { border-bottom: 0; }
.calc-head {
    width: auto;
    min-width: 0;
    background: #050505;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-weight: 900;
    font-size: 12px;
    text-align: center;
    line-height: 1.1;
    padding: 8px 12px;
    overflow: hidden;
    border-left: 6px solid var(--p5-red);
}
.calc-head-def { border-left-color: var(--p5-red); }
.calc-head-crit { border-left-color: var(--p5-red); }
.calc-board .calc-head,
.calc-board .res-val {
    letter-spacing: 0 !important;
}
.calc-type {
    color: rgba(255,255,255,0.88);
    font-size: 10px;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-weight: 800;
    line-height: 1;
}
.calc-head-pen .calc-type { color: var(--p5-red); }
.calc-head-crit .calc-type { color: var(--p5-yellow); }
.calc-title {
    max-width: 100%;
    color: #fff;
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.12;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calc-body {
    min-width: 0;
    padding: 8px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 16px;
    align-items: center;
    background: #fff;
}
.calc-formula {
    min-width: 0;
    font-size: 12px;
    color: #202020;
    line-height: 1.45;
}
.calc-equation {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    color: #171717;
    font-weight: 900;
}
.calc-eq-label {
    padding: 2px 5px;
    background: #050505;
    color: #fff;
    font-size: 10px;
    line-height: 1;
}
.calc-op {
    color: var(--p5-red);
    font-weight: 900;
}
.calc-equation strong {
    font-size: 15px;
    color: #000;
}
.calc-eq-sub {
    margin-left: 6px;
    padding-left: 8px;
    border-left: 1px solid #d7d7d7;
    color: #555;
    font-size: 11px;
    font-weight: 800;
}
.calc-ledger {
    display: grid;
    gap: 2px;
}
.calc-ledger-line {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    color: #202020;
}
.calc-ledger-label {
    color: #4f4f4f;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.calc-ledger-formula {
    min-width: 0;
    color: #111;
    font-size: 12px;
    font-weight: 700;
}
.calc-ledger-formula strong {
    font-size: inherit;
    font-weight: 900;
}
.calc-source-block {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    margin-top: 4px;
}
.calc-source-title {
    color: #666;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}
.calc-source-list {
    display: block;
    min-width: 0;
    color: #5a5a5a;
    font-size: 11px;
    line-height: 1.75;
}
.calc-source-item {
    display: flex;
    min-width: 0;
    max-width: 210px;
    align-items: baseline;
    justify-content: flex-start;
    gap: 6px;
    padding: 3px 6px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #f7f7f7;
    color: #252525;
    font-size: 11px;
    line-height: 1.25;
}
.calc-source-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calc-source-val {
    flex: 0 0 auto;
    color: var(--p5-red);
    font-family: Impact, "Microsoft YaHei", sans-serif;
    font-size: 12px;
    font-weight: 900;
}
.calc-source-list-def .calc-source-val { color: #111; }
.calc-source-list-crit .calc-source-val { color: #d99a00; }
.calc-source-text {
    display: inline;
    overflow-wrap: anywhere;
}
.calc-source-fragment.is-unused,
.calc-source-group.is-unused .calc-source-owner {
    color: #8a8a8a;
}
.calc-source-fragment.is-unused {
    font-weight: 800;
}
.calc-source-empty {
    color: #777;
    font-size: 11px;
    font-weight: 700;
}
.calc-result {
    min-width: 0;
    min-height: 44px;
    box-sizing: border-box;
    padding: 4px 0 4px 12px;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    background: transparent;
    border: 0;
    border-left: 4px solid #111;
    box-shadow: none;
}
.calc-result-def { border-left-color: #111; }
.calc-result-pen { border-left-color: var(--p5-red); }
.calc-result-crit { border-left-color: var(--p5-yellow); }
.res-label {
    font-size: 10px;
    color: #383838;
    font-weight: 900;
    line-height: 1.1;
}
.res-val {
    font-size: 27px;
    font-weight: 900;
    color: #111;
    font-family: Impact, "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
    position: relative;
    z-index: 2;
    text-shadow: none;
}
.res-char-name { position: absolute; right: 0; bottom: -5px; font-size: 40px; color: rgba(0,0,0,0.1); font-weight: 900; pointer-events: none; z-index: 1; white-space: nowrap; font-family: "Microsoft YaHei"; }

/* === styles-timeline-actions.css === */
/* Timeline table, action chips, pickers and action editor rows */
.timeline-wrap {
    width: 100%;
    border: 2px solid #000;
    background: #fff;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.3);
    box-sizing: border-box;

    /* 🔥 米妮新增：把水印锁死在这里！🔥 */
    position: relative;   /* 设为定位基准 */
    overflow: hidden;     /* 防止旋转后的水印边角溢出 */
}
table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
thead th { background: #000; color: #fff; padding: 10px; border-right: 1px solid #444; border-bottom: 4px solid var(--p5-red); font-style: italic; }
.th-wonder { color:#ffcbcb; background:#2a0000; } .th-teammate { color:#fff; }
tbody tr { border-bottom: 1px solid #ccc; height: auto; } tbody tr:nth-child(even) { background-color: #f9f9f9; }
td {
    padding: 8px 5px !important;
    vertical-align: top;
    border-right: 1px solid #eee;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
td.note-text { color: #000; font-weight: bold; }
td.cell-turn { background: #222; color: var(--p5-yellow); font-family: Impact; font-size: 24px; text-align: center; vertical-align: middle; width: 50px; border-right: 3px solid #000; }

.tl-unlock-warning-row {
    height: 11px;
}

td.tl-unlock-warning-cell {
    height: 11px;
    padding: 0 !important;
    border-right: 0;
    border-bottom: 1px solid #080808;
    background: #080808;
    line-height: 0;
    vertical-align: middle;
    cursor: pointer;
}

.tl-unlock-warning-line {
    display: block;
    width: 100%;
    height: 10px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.62), rgba(255,42,58,0.24), rgba(0,0,0,0.62)),
        repeating-linear-gradient(135deg, #050505 0 12px, #ff2436 12px 23px, #050505 23px 35px);
    box-shadow:
        0 0 8px rgba(255,36,54,0.34),
        inset 0 1px 0 rgba(255,255,255,0.24),
        inset 0 -1px 0 rgba(0,0,0,0.72);
}

.tl-turn-row.is-post-unlock-phase > td:not(.cell-turn),
.tl-buff-row.is-post-unlock-phase > td {
    background:
        linear-gradient(180deg, rgba(255,238,238,0.92), rgba(255,250,250,0.88));
}

.tl-turn-row.is-post-unlock-phase > td.cell-turn {
    background:
        linear-gradient(180deg, #fff2f2 0%, #fffafa 100%);
    color: #7e1010;
    border-left: 3px solid #ff2436;
    box-shadow:
        inset 0 0 0 1px rgba(255,36,54,0.20),
        inset 6px 0 0 rgba(255,36,54,0.10);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.85);
}

.action-chip {
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 1px 4px;
    margin-bottom: 2px;
    font-weight: bold;
    color: #333;
    font-size: 8px;
    line-height: 1.35;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
}

.action-chip.type-switch { background: #e3f2fd; color: #0d47a1; border-color: #90caf9; }
.action-chip.type-skill { background: #fff3e0; color: #e65100; border-color: #ffcc80; }
.action-chip.type-hl { background: #fce4ec; color: #880e4f; border-color: #f48fb1; }
.action-chip.type-navi { background: #e0f2f1; color: #00695c; border-color: #80cbc4; }
.action-chip.type-p3 { background: #f3e5f5; color: #4a148c; border-color: #ce93d8; }

.chip-main {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.action-chip.has-target .chip-main {
    flex: 1 1 0;
}

.chip-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.chip-text-compact {
    display: none;
}

.action-chip.is-compact-action .chip-text-full {
    display: none;
}

.action-chip.is-compact-action .chip-text-compact {
    display: inline;
}

.chip-target {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    flex: 0 0 auto;
    min-width: max-content;
    margin-left: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.chip-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    min-width: 12px;
    color: #888;
    font-family: Arial, sans-serif;
    text-align: center;
}

.target-span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    max-width: none;
    background: rgba(0,0,0,0.1);
    padding: 0 4px;
    border-radius: 3px;
    font-size: 9px;
    box-sizing: border-box;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
} /* 对象字号 */

.turn-edit-box {
    background: #252525;
    padding: 12px;
    border-left: 4px solid var(--p5-yellow);
    margin-bottom: 12px;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.turn-edit-box.is-turn-located {
    animation: consoleTurnLocated 1.45s ease;
}

.turn-edit-box.is-turn-copied,
.turn-edit-box.is-turn-pasted {
    border-left-color: var(--p5-yellow);
    box-shadow:
        0 0 0 1px rgba(251,192,45,0.26),
        0 0 18px rgba(251,192,45,0.18),
        inset 0 0 0 1px rgba(255,255,255,0.06);
}

.char-action-row.is-actor-located {
    animation: consoleTurnLocated 1.45s ease;
}

@keyframes consoleTurnLocated {
    0% {
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
        outline: 0 solid rgba(251,192,45,0);
    }
    18%,
    72% {
        box-shadow: 0 0 0 2px rgba(251,192,45,0.86), 0 0 24px rgba(251,192,45,0.24), inset 0 0 0 1px rgba(255,255,255,0.10);
        outline: 2px solid rgba(251,192,45,0.50);
    }
    100% {
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
        outline: 0 solid rgba(251,192,45,0);
    }
}

.turn-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #444;
    margin-bottom: 8px;
    padding-bottom: 6px;
}

.turn-head-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

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

.turn-title {
    color: var(--p5-yellow);
    font-weight: bold;
    margin: 0;
    padding: 0;
    border: none;
    font-size: 13px;
    line-height: 1;
}

.char-action-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
    padding: 8px 8px 10px;
    border-bottom: 1px dashed #333;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
}

.char-action-row.note-row {
    background: transparent;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 0;
}

.char-row-top {
    display: grid;
    grid-template-columns: 88px auto;
    align-items: center;
    gap: 10px;
}

.char-row-tools {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.char-name-lbl {
    font-size: 11px;
    color: #aaa;
    font-weight: bold;
    line-height: 1;
    display: block;
    width: 88px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-list-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action-select-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin-top: 0;
    align-items: stretch;
    background: #2f2f2f;
    border: 1px solid #444;
    padding: 4px;
    border-radius: 4px;
    box-sizing: border-box;
    overflow: visible;
}

.action-select-wrapper.is-picker-open {
    z-index: 1200;
}

.action-select-wrapper.is-target-picker-open {
    z-index: 1210;
}

.action-select-wrapper.auto-generated {
    border-color: rgba(244,58,58,0.34);
    background:
        linear-gradient(90deg, rgba(244,58,58,0.12), rgba(0,0,0,0.08)),
        #2f2f2f;
}

.action-select-wrapper.auto-generated .action-tools-row {
    opacity: 0.72;
}

.action-select-wrapper.has-second-target {
    grid-template-columns: minmax(0, 1fr);
}

.action-main-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px 30px;
    gap: 4px;
    align-items: center;
    min-width: 0;
}

.action-select-wrapper.has-second-target .action-main-row {
    grid-template-columns: minmax(0, 1fr) 104px 104px 30px;
}

.action-select-wrapper.has-no-target .action-main-row {
    grid-template-columns: minmax(0, 1fr) 30px;
}

.action-tools-trigger {
    width: 30px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.12)),
        rgba(18,19,22,0.82);
    color: #bfc4ce;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 3px 7px rgba(0,0,0,0.18);
    transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.action-tools-trigger:hover,
.action-select-wrapper.is-tools-open .action-tools-trigger {
    color: #fff;
    border-color: rgba(251,192,45,0.46);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.10)),
        rgba(55,47,28,0.82);
}

.action-tools-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    position: absolute;
    top: calc(100% + 5px);
    right: 4px;
    z-index: 40;
    width: min(420px, calc(100% - 8px));
    min-width: 0;
    padding: 6px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.12);
    border-left: 3px solid var(--p5-red);
    border-radius: 5px;
    background:
        linear-gradient(110deg, transparent 0%, transparent 44%, rgba(255,255,255,0.10) 52%, transparent 60%, transparent 100%),
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.16)),
        rgba(18,19,22,0.96);
    box-shadow:
        0 9px 20px rgba(0,0,0,0.46),
        5px 5px 0 rgba(0,0,0,0.34),
        inset 0 1px 0 rgba(255,255,255,0.10);
}

.action-select-wrapper {
    row-gap: 0;
}

.action-select-wrapper .action-tools-row {
    max-height: none;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    overflow: visible;
    pointer-events: none;
    transform: translateY(-4px);
    transition:
        opacity 120ms ease,
        transform 140ms ease,
        visibility 120ms ease;
}

.action-select-wrapper.is-tools-open .action-tools-row {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.action-select-wrapper .act-sel {
    display: none;
}

.action-picker-btn {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 0 8px 0 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16px;
    align-items: center;
    column-gap: 3px;
    border: 1px solid #5a5a5a;
    border-radius: 4px;
    background:
        linear-gradient(135deg, transparent calc(100% - 24px), rgba(255, 54, 30, 0.25) calc(100% - 24px)),
        #3a3a3a;
    color: #e9e9e9;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    position: relative;
}

.action-picker-label {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.action-picker-btn::after {
    content: "⌄";
    justify-self: end;
    color: #bbb;
    font-size: 14px;
    line-height: 1;
}

.action-picker-btn:hover,
.action-picker-btn.is-open {
    color: #fff;
    border-color: var(--p5-red);
    background:
        linear-gradient(135deg, transparent calc(100% - 24px), rgba(255, 54, 30, 0.42) calc(100% - 24px)),
        #424242;
}

.action-picker-btn.has-value {
    border-color: rgba(255, 54, 30, 0.75);
}

.action-picker-layer {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1600;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045), rgba(0,0,0,0.12)),
        #1f2024;
    border: 1px solid rgba(255,255,255,0.12);
    border-left: 4px solid var(--p5-red);
    border-radius: 8px;
    box-shadow:
        0 22px 46px rgba(0,0,0,0.58),
        inset 0 0 0 1px rgba(255,255,255,0.035);
    box-sizing: border-box;
}

.action-picker-filterbar {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 1px;
    scrollbar-width: none;
}

.action-picker-filterbar::-webkit-scrollbar {
    display: none;
}

.action-picker-filter {
    height: 27px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.08)),
        #18191e;
    color: #d7d9df;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.action-picker-filter b {
    min-width: 16px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.09);
    color: #b8bbc4;
    font-size: 10px;
    font-weight: 900;
}

.action-picker-filter:hover,
.action-picker-filter:focus {
    border-color: rgba(251,192,45,0.38);
    color: #fff;
    outline: none;
}

.action-picker-filter.is-active {
    border-color: rgba(255,54,30,0.74);
    background:
        linear-gradient(90deg, rgba(255,54,30,0.38), rgba(255,54,30,0.10)),
        #251719;
    color: #fff;
}

.action-picker-search {
    height: 34px;
    width: 100%;
    padding: 0 11px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.06)),
        #101115;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    outline: none;
}

.action-picker-search:focus {
    border-color: var(--p5-red);
    box-shadow: 0 0 0 2px rgba(255,54,30,0.16);
}

.action-picker-list {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 3px;
}

.action-picker-group {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 7px 0 4px;
    padding: 5px 7px;
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid rgba(251,192,45,0.72);
    border-radius: 5px;
    background:
        linear-gradient(90deg, rgba(251,192,45,0.10), transparent 54%),
        #23242a;
    color: #ffd875;
    font-size: 11px;
    font-weight: 900;
}

.action-picker-group b {
    min-width: 20px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(0,0,0,0.24);
    color: #d8d8d8;
    font-size: 10px;
    font-weight: 900;
}

.action-picker-item {
    width: 100%;
    min-height: 36px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    margin: 2px 0;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.08)),
        rgba(255,255,255,0.025);
    color: #f0f0f0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    white-space: normal;
    overflow-wrap: anywhere;
}

.action-picker-item-body {
    min-width: 0;
    display: flex;
    align-items: center;
}

.action-picker-item-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-picker-item-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), transparent 58%),
        #111;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.34);
}

.action-picker-item-icon.empty {
    opacity: 0.32;
}

.action-picker-item-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.62));
}

.action-picker-item:hover,
.action-picker-item:focus {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.06)),
        rgba(255,255,255,0.065);
    border-color: rgba(251,192,45,0.32);
    outline: none;
}

.action-picker-item.is-selected {
    background:
        linear-gradient(90deg, rgba(255,54,30,0.58), rgba(255,54,30,0.18)),
        #3a2020;
    border-color: rgba(255,123,104,0.72);
    color: #fff;
}

.action-picker-item.is-disabled,
.action-picker-item:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    color: #a5a5a5;
    border-color: rgba(255,255,255,0.04);
    background: rgba(255,255,255,0.018);
}

.action-picker-item.is-disabled:hover,
.action-picker-item.is-disabled:focus,
.action-picker-item:disabled:hover,
.action-picker-item:disabled:focus {
    border-color: rgba(255,255,255,0.04);
    background: rgba(255,255,255,0.018);
    outline: none;
}

.action-picker-item.is-priority {
    background: linear-gradient(90deg, rgba(255, 192, 64, 0.18), rgba(255, 54, 30, 0.08));
    border-color: rgba(255, 204, 92, 0.55);
    color: #fff4be;
    box-shadow: inset 3px 0 0 rgba(255, 204, 92, 0.8);
}

.action-picker-item.is-priority:hover,
.action-picker-item.is-priority:focus {
    background: linear-gradient(90deg, rgba(255, 204, 92, 0.24), rgba(255, 54, 30, 0.12));
    border-color: rgba(255, 220, 120, 0.75);
}

.action-picker-empty {
    padding: 16px 8px;
    color: #888;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 640px) {
    .action-picker-layer {
        border-radius: 7px;
    }

    .action-picker-item {
        min-height: 38px;
    }
}

.team-member-char-picker {
    position: relative;
    overflow: visible;
}

.team-member-char-source,
.navi-picker-source,
.mask-picker-source,
.mask-skill-picker-source {
    display: none;
}

.navi-picker-control,
.mask-picker-control {
    min-width: 0;
    position: relative;
    overflow: visible;
}

.team-member-char-picker.has-level-option,
.navi-picker-control.has-level-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    align-items: stretch;
    gap: 4px;
}

.card-level-select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    height: 36px;
    box-sizing: border-box;
    padding: 0 8px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.16)),
        #303033;
    color: #f4f4f4;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.card-level-select[hidden] {
    display: none !important;
}

.mask-skill-picker-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 36px;
    align-items: stretch;
    gap: 4px;
    margin-top: 2px;
    overflow: visible;
}

.mask-inherent-skill-control {
    min-width: 0;
    height: 36px;
    min-height: 36px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 6px;
    box-sizing: border-box;
    padding: 0 8px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--mask-inherent-accent, #7a828e) 44%, rgba(255,255,255,0.16));
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10), transparent 58%),
        color-mix(in srgb, var(--mask-inherent-accent, #7a828e) 22%, #2b2b2b);
    color: rgba(255,255,255,0.88);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.mask-inherent-skill-control:not(.has-value) {
    border-color: rgba(255,255,255,0.12);
    background: #303030;
    color: rgba(255,255,255,0.46);
}

.mask-inherent-attr {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
}

.mask-inherent-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mask-skill-control {
    min-width: 0;
    height: 36px;
    position: relative;
    overflow: visible;
}

.mask-skill-control .char-picker-btn {
    height: 36px;
    min-height: 36px;
}

.team-member-char-picker.is-picker-open,
.navi-picker-control.is-picker-open,
.mask-picker-control.is-picker-open,
.mask-skill-picker-row.is-picker-open,
.mask-skill-control.is-picker-open {
    z-index: 1300;
}

.mask-skill-custom-input {
    width: 100%;
    box-sizing: border-box;
}

.char-picker-btn {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    padding: 6px 28px 6px 10px;
    border: 1px solid #5a5a5a;
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.08)),
        #3a3a3a;
    color: #e9e9e9;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    text-align: left;
}

.char-picker-btn::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #bbb;
    transform: translateY(-40%);
}

.char-picker-btn:hover,
.char-picker-btn.is-open {
    border-color: var(--p5-red);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.08)),
        #424242;
}

.char-picker-btn.has-value {
    border-color: rgba(255,54,30,0.72);
}

.char-picker-btn-main,
.char-picker-btn-meta {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-picker-btn-main {
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.char-picker-btn-meta {
    max-width: 108px;
    color: #aaa;
    font-size: 10px;
    font-weight: 700;
    justify-self: end;
}

.navi-picker-btn {
    border-color: rgba(38,198,218,0.45);
}

.navi-picker-btn.has-value {
    border-color: rgba(38,198,218,0.78);
}

.navi-picker-btn:hover,
.navi-picker-btn.is-open {
    border-color: #26c6da;
}

.mask-picker-btn {
    border-color: rgba(211,47,47,0.48);
}

.mask-picker-btn.has-value {
    border-color: var(--mask-picker-accent, rgba(211,47,47,0.78));
}

.mask-picker-btn:hover,
.mask-picker-btn.is-open {
    border-color: var(--mask-picker-accent, var(--p5-red));
}

.mask-skill-picker-btn {
    min-height: 36px;
    padding-top: 0;
    padding-bottom: 0;
    border-color: rgba(255,255,255,0.14);
}

.mask-skill-picker-btn.has-value {
    border-color: var(--mask-skill-accent, rgba(211,47,47,0.78));
}

.mask-skill-picker-btn:hover,
.mask-skill-picker-btn.is-open {
    border-color: var(--mask-skill-accent, var(--p5-red));
}

.character-picker-layer {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1700;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
    background: #202020;
    border: 1px solid #5d5d5d;
    border-left: 3px solid var(--p5-red);
    border-radius: 6px;
    box-shadow:
        0 18px 38px rgba(0,0,0,0.52),
        inset 0 0 0 1px rgba(255,255,255,0.04);
    box-sizing: border-box;
}

.navi-picker-layer {
    grid-template-rows: auto minmax(0, 1fr);
    gap: 7px;
    padding: 7px;
    border-left-color: #26c6da;
}

.mask-picker-layer {
    grid-template-rows: auto minmax(0, 1fr);
    border-left-color: var(--p5-red);
}

.mask-skill-picker-layer {
    grid-template-rows: auto minmax(0, 1fr);
    border-left-color: var(--p5-yellow);
}

.mask-picker-filterbar {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 7px;
    margin-bottom: 1px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.10)),
        #181818;
}

.mask-picker-filter {
    width: 100%;
    height: 29px;
    min-width: 0;
    padding: 0 28px 0 9px;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 4px;
    appearance: none;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.12)),
        #2c2c2c;
    color: #eeeeee;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    outline: none;
}

.mask-picker-filterbar::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 22px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255,255,255,0.66);
    pointer-events: none;
}

.mask-picker-filter:focus {
    border-color: rgba(255,54,30,0.68);
    box-shadow: 0 0 0 2px rgba(255,54,30,0.14);
}

.character-picker-search {
    height: 30px;
    width: 100%;
    padding: 0 9px;
    background: #111;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}

.character-picker-search:focus {
    border-color: var(--p5-red);
    box-shadow: 0 0 0 2px rgba(255,54,30,0.16);
}

.navi-picker-search:focus {
    border-color: #26c6da;
    box-shadow: 0 0 0 2px rgba(38,198,218,0.16);
}

.character-picker-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 44px;
    gap: 7px;
    align-items: end;
    padding: 7px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.10)),
        #181818;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.character-picker-filter-field {
    position: relative;
    min-width: 0;
    display: grid;
    gap: 2px;
}

.character-picker-filter-label {
    color: #a7a7a7;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    padding-left: 1px;
}

.character-picker-filter {
    width: 100%;
    height: 28px;
    min-width: 0;
    padding: 0 24px 0 8px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    appearance: none;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.12)),
        #2c2c2c;
    color: #eeeeee;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    outline: none;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 1px 0 rgba(0,0,0,0.24);
}

.character-picker-filter-field::after {
    content: "";
    position: absolute;
    right: 9px;
    bottom: 10px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255,255,255,0.66);
    pointer-events: none;
}

.character-picker-filter:hover,
.character-picker-filter:focus {
    border-color: rgba(255,255,255,0.30);
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.075), rgba(0,0,0,0.10)),
        #333;
}

.character-picker-filter-field.is-filtered .character-picker-filter {
    border-color: rgba(255,54,30,0.68);
    background:
        linear-gradient(180deg, rgba(255,54,30,0.14), rgba(0,0,0,0.12)),
        #302322;
}

.character-picker-filter-field.is-filtered .character-picker-filter-label {
    color: #ffcf62;
}

.character-picker-filter-reset {
    align-self: end;
    width: 44px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.12)),
        #282828;
    color: #d7d7d7;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 1px 0 rgba(0,0,0,0.24);
}

.character-picker-filter-reset:hover {
    border-color: rgba(255,54,30,0.72);
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255,54,30,0.14), rgba(0,0,0,0.12)),
        #302322;
}

.character-picker-list {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
}

.character-picker-group {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 6px 0 3px;
    padding: 4px 6px;
    background: #202020;
    color: #ffcf62;
    font-size: 11px;
    font-weight: 900;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.character-picker-recommended-group {
    color: #ffffff;
    background:
        linear-gradient(90deg, rgba(255,54,30,0.34), rgba(255,207,98,0.10)),
        #271b1b;
    border-bottom-color: rgba(255,207,98,0.32);
}

.navi-picker-group {
    color: #8fefff;
}

.mask-picker-group {
    color: #ffcf62;
}

.mask-skill-picker-group {
    color: #ffcf62;
}

.character-picker-item {
    width: 100%;
    min-height: 42px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 76px 58px 34px;
    align-items: center;
    gap: 8px;
    padding: 5px 7px 5px 5px;
    margin: 1px 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #f0f0f0;
    font-size: 12px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.navi-picker-item {
    min-height: 44px;
    grid-template-columns: 34px minmax(0, 1fr) 82px;
}

.mask-picker-item {
    min-height: 44px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
}

.mask-skill-picker-item {
    min-height: 38px;
    grid-template-columns: 34px minmax(0, 1fr);
}

.mask-skill-icon-slot {
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-picker-item:hover,
.character-picker-item:focus,
.character-picker-item.is-active {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.14);
    outline: none;
}

.character-picker-item.is-selected {
    background:
        linear-gradient(90deg, rgba(255,54,30,0.24), rgba(255,255,255,0.04)),
        rgba(255,255,255,0.05);
    border-color: var(--character-row-color, var(--p5-red));
    box-shadow: inset 3px 0 0 var(--character-row-color, var(--p5-red));
}

.character-picker-item.is-recommended {
    background:
        linear-gradient(90deg, rgba(255,54,30,0.14), rgba(255,207,98,0.05)),
        rgba(255,255,255,0.03);
    border-color: rgba(255,207,98,0.18);
    box-shadow: inset 3px 0 0 #ffcf62;
}

.character-picker-item.is-recommended:hover,
.character-picker-item.is-recommended:focus,
.character-picker-item.is-recommended.is-active {
    background:
        linear-gradient(90deg, rgba(255,54,30,0.26), rgba(255,207,98,0.09)),
        rgba(255,255,255,0.07);
    border-color: rgba(255,207,98,0.38);
}

.character-picker-item.is-recommended.is-selected {
    border-color: var(--character-row-color, var(--p5-red));
    box-shadow:
        inset 3px 0 0 #ffcf62,
        inset 6px 0 0 var(--character-row-color, var(--p5-red));
}

.character-picker-avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--character-avatar-color, var(--p5-red));
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10), transparent 58%),
        #111;
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.42),
        0 2px 4px rgba(0,0,0,0.32);
}

.character-picker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-picker-avatar-empty {
    color: #777;
    font-size: 12px;
    font-weight: 900;
    border-color: rgba(255,255,255,0.12);
}

.mask-picker-avatar img {
    padding: 2px;
    object-fit: contain;
    box-sizing: border-box;
}

.mask-picker-avatar-empty {
    border-color: rgba(255,255,255,0.16);
}

.character-picker-star-wrap,
.character-picker-attrs {
    display: flex;
    align-items: center;
}

.character-picker-star-wrap {
    justify-content: center;
    min-width: 0;
}

.character-picker-star {
    display: block;
    height: 13px;
    max-width: 78px;
    object-fit: contain;
    filter:
        drop-shadow(0 2px 2px rgba(0,0,0,0.75))
        drop-shadow(0 0 3px rgba(255,255,255,0.22));
}

.character-picker-star-empty,
.character-picker-attr-empty {
    color: #777;
    font-size: 10px;
    font-weight: 900;
}

.character-picker-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-weight: 900;
}

.character-picker-name.is-muted {
    color: #aaa;
}

.character-picker-role {
    min-width: 0;
    color: #bbb;
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.character-picker-attrs {
    justify-content: flex-end;
    gap: 3px;
}

.character-picker-attr-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.62));
}

.mask-picker-attr-badge {
    min-width: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid color-mix(in srgb, var(--mask-picker-accent, var(--p5-red)) 64%, #ffffff 8%);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.08)),
        color-mix(in srgb, var(--mask-picker-accent, var(--p5-red)) 28%, #101010);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.mask-picker-attr-badge.is-icon-only {
    width: 28px;
    min-width: 28px;
    height: 24px;
    padding: 0;
}

.mask-picker-attr-badge.is-empty,
.mask-picker-attr-badge.is-custom {
    border-color: rgba(255,255,255,0.12);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.12)),
        #282828;
    color: #cfcfcf;
}

.mask-picker-attr-icon {
    width: 15px;
    height: 15px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.62));
}

.character-picker-empty {
    padding: 16px 8px;
    color: #888;
    font-size: 12px;
    text-align: center;
}

.action-select-wrapper .target-sel,
.action-select-wrapper .target-sel-2 {
    position: absolute;
    width: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.target-picker-control {
    position: relative;
    display: block;
    min-width: 0;
}

.target-picker-control-second,
.action-select-wrapper .target-sel-2 {
    display: none;
}

.action-select-wrapper.has-no-target .target-sel,
.action-select-wrapper.has-no-target .target-sel-2,
.action-select-wrapper.has-no-target .target-picker-control {
    display: none;
}

.action-select-wrapper.has-second-target .target-sel-2,
.action-select-wrapper.has-second-target .target-picker-control-second {
    display: block;
}

.target-picker-btn {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 2px 22px 2px 8px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.10)),
        #2d3034;
    color: #f1f1f1;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 2px 0 0 rgba(255,255,255,0.18), inset 0 1px 0 rgba(255,255,255,0.04);
}

.target-picker-btn::after {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    width: 0;
    height: 0;
    transform: translateY(-35%);
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 5px solid #cfcfcf;
}

.target-picker-btn:hover,
.target-picker-btn:focus,
.target-picker-btn.is-open {
    border-color: rgba(255,54,30,0.48);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.075), rgba(0,0,0,0.08)),
        #33363b;
    color: #fff;
    outline: none;
}

.target-picker-btn[data-target-kind="boss"] {
    box-shadow: inset 2px 0 0 rgba(255,54,30,0.72), inset 0 1px 0 rgba(255,255,255,0.04);
}

.target-picker-btn[data-target-kind="boss"]::after {
    border-top-color: #ff7b68;
}

.target-picker-btn[data-target-kind="add"],
.target-picker-btn[data-target-kind="add-legacy"] {
    box-shadow: inset 2px 0 0 rgba(251,192,45,0.68), inset 0 1px 0 rgba(255,255,255,0.04);
}

.target-picker-btn[data-target-kind="add"]::after,
.target-picker-btn[data-target-kind="add-legacy"]::after {
    border-top-color: #ffd875;
}

.target-picker-main,
.target-picker-meta {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.target-picker-main {
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.target-picker-meta {
    display: none;
}

.target-picker-btn[data-target-kind="boss"] .target-picker-meta {
    color: #ff8a78;
}

.target-picker-btn[data-target-kind="add"] .target-picker-meta,
.target-picker-btn[data-target-kind="add-legacy"] .target-picker-meta {
    color: #ffd875;
}

.target-picker-btn:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.target-picker-layer {
    position: fixed;
    z-index: 2400;
    max-height: min(330px, calc(100vh - 26px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,54,30,0.16), transparent 38%),
        linear-gradient(180deg, #25262c, #131417);
    box-shadow:
        0 18px 36px rgba(0,0,0,0.48),
        0 0 0 1px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

.target-picker-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    padding: 4px 5px 7px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.target-picker-title b {
    min-width: 0;
    color: #ff8a78;
    font-size: 10px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.target-picker-list {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
}

.target-picker-item {
    width: 100%;
    min-height: 34px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin: 2px 0;
    padding: 6px 7px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.08)),
        rgba(255,255,255,0.025);
    color: #f0f0f0;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.target-picker-kind {
    min-width: 0;
    padding: 3px 5px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    color: #d8d8d8;
    font-size: 10px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.target-picker-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.target-picker-item[data-kind="boss"] .target-picker-kind {
    background: rgba(255,54,30,0.14);
    color: #ff9a8a;
}

.target-picker-item[data-kind="add"] .target-picker-kind,
.target-picker-item[data-kind="add-legacy"] .target-picker-kind {
    background: rgba(251,192,45,0.12);
    color: #ffd875;
}

.target-picker-item:hover,
.target-picker-item:focus {
    border-color: rgba(251,192,45,0.34);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.06)),
        rgba(255,255,255,0.07);
    outline: none;
}

.target-picker-item.is-selected {
    border-color: rgba(255,123,104,0.72);
    background:
        linear-gradient(90deg, rgba(255,54,30,0.58), rgba(255,54,30,0.18)),
        #3a2020;
    color: #fff;
}

.action-select-wrapper .move-btn:not(.action-tool-btn),
.action-select-wrapper .action-del:not(.action-tool-btn) {
    width: 24px;
    min-width: 24px;
    max-width: 24px;
    height: 24px;
    padding: 0;
    justify-self: stretch;
    align-self: stretch;
    line-height: 1;
}

/* 自定义技能这一整行，严格按“上面一行”的列宽关系来 */
.action-select-wrapper .custom-skill-row {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 96px 80px;
    gap: 4px;
    margin-top: 2px;
    align-items: center;
    min-width: 0;
}

.action-select-wrapper .custom-act-input {
    display: block;
    width: 100% !important;
    min-width: 0;
    margin: 0;
    background: #444;
    border: 1px solid #666;
    color: white;
    box-sizing: border-box;
}

.action-select-wrapper .custom-attr-sel {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
}

.action-select-wrapper .custom-scope-sel {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.action-select-wrapper.is-custom .custom-skill-row {
    display: grid;
}

.action-del {
    background: #500;
    color: #fff;
    border: 1px solid #700;
    width: 24px;
    min-width: 24px;
    cursor: pointer;
    height: 24px;
    border-radius: 3px;
    font-weight: bold;
    line-height: 1;
}

.mini-btn-add {
    background: #2f2f2f;
    color: #ccc;
    border: 1px dashed #666;
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    font-size: 10px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    justify-self: end;
}
.mini-btn-add:hover {
    background: #3a3a3a;
    color: #fff;
    border-color: #aaa;
}

.mini-btn-copy-all,
.mini-btn-paste-all {
    width: auto;
    min-width: 66px;
    max-width: none;
    font-size: 10px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    line-height: 1.2;
    user-select: none;
}

.mini-btn-copy-all {
    background: #2d3035;
    color: #ddd;
    border: 1px solid #555;
}

.mini-btn-paste-all {
    background: #302d24;
    color: #f1ddb3;
    border: 1px solid #665635;
}

.mini-btn-copy-all:hover,
.mini-btn-paste-all:hover {
    color: #fff;
    border-color: #aaa;
    background: #3a3a3a;
}

.console-buff-panel {
    min-height: 16px;
    padding: 2px 0 0;
}

.turn-note-input {
    min-height: 54px;
    resize: vertical;
}

.footer { margin-top: auto; background: #000; color: #fff; padding: 15px; text-align: center; border-top: 4px solid var(--p5-red); position: relative; z-index: 10; width: 100%; display: grid; gap: 6px; line-height: 1.5; }
.footer-signature {
    display: grid;
    gap: 6px;
    justify-items: start;
    min-width: 0;
    margin: 0;
    text-align: left;
}

.footer-line { font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }

.footer-brand-mark {
    position: absolute;
    right: 20px;
    top: 50%;
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: 16px;
    box-sizing: border-box;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.08), transparent 34%) padding-box,
        linear-gradient(180deg, rgba(11, 3, 16, 0.90), rgba(2, 2, 5, 0.96)) padding-box,
        linear-gradient(180deg, #bd62ff 0%, #8d36ff 34%, #ff2c55 68%, #ff1936 100%) border-box;
    border: 2px solid transparent;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -10px 18px rgba(0, 0, 0, 0.30),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 16px rgba(174, 79, 255, 0.18),
        0 0 18px rgba(255, 35, 64, 0.16);
    transform: translateY(-50%);
}

.footer-brand-mark::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    pointer-events: none;
}

.footer-brand-rose {
    position: relative;
    z-index: 1;
    width: 58px;
    height: 58px;
    display: block;
    background: linear-gradient(180deg, #bd62ff 0%, #8d36ff 34%, #ff2c55 68%, #ff1936 100%);
    filter:
        drop-shadow(0 0 10px rgba(174, 79, 255, 0.64))
        drop-shadow(0 6px 10px rgba(0, 0, 0, 0.34))
        drop-shadow(0 1px 0 rgba(255, 35, 64, 0.42));
    mask: url("../../img/堇团首页素材/UI/p5_meigui_xza_violet.png") center / contain no-repeat;
    -webkit-mask: url("../../img/堇团首页素材/UI/p5_meigui_xza_violet.png") center / contain no-repeat;
}
.top-bar { display: flex; gap: 5px; margin-bottom: 10px; border-bottom: 1px solid #555; padding-bottom: 10px; }

.mini-tool-btn {
    min-height: 24px;
    padding: 0 9px;
    cursor: pointer;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.08)),
        #2a2b2e;
    color: #d4d6da;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    user-select: none;
}
.mini-tool-btn:hover {
    color: #fff;
    border-color: rgba(251,192,45,0.45);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.075), rgba(0,0,0,0.06)),
        #343538;
}

.turn-paste-btn {
    color: #ffe0a6;
    border-color: rgba(251,192,45,0.24);
    background:
        linear-gradient(180deg, rgba(251,192,45,0.08), rgba(0,0,0,0.08)),
        #2b2821;
}

.turn-delete-btn {
    color: #ffcdc7;
    border-color: rgba(255,80,66,0.28);
    background:
        linear-gradient(180deg, rgba(255,80,66,0.09), rgba(0,0,0,0.10)),
        #302020;
}

.move-btn {
    cursor: pointer;
    padding: 0 6px;
    font-size: 12px;
    color: #bbb;
    background: #333;
    border: 1px solid #555;
    border-radius: 3px;
    margin-right: 0;
    min-width: 24px;
    height: 24px;
    line-height: 1;
}
.move-btn:hover {
    color: #fff;
    border-color: #fff;
    background: #555;
}

.calc-char-block { background: #1e1e1e; border: 1px solid #444; border-left: 3px solid var(--p5-blue); padding: 8px; margin-top: 8px; }
.calc-char-head { display: flex; justify-content: space-between; color: var(--p5-blue); font-weight: bold; border-bottom: 1px dashed #444; margin-bottom: 5px; padding-bottom: 2px; }
.calc-mod-title { color: #888; font-size: 11px; text-transform: uppercase; border-bottom: 1px solid #444; margin-bottom: 5px; padding-bottom: 2px; }

/* === styles-mobile.css === */
/* Mobile layout */
/* ========================================= */
/* 📱 手机端适配 V5.2 (无Zoom版) */
/* ========================================= */
@media screen and (max-width: 1100px) {
    body {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
        padding: 0;
        gap: 0;
        background-color: #1a1a1a;
    }

    .canvas-area {
        order: 1;
        width: 100%;
        height: 40vh;
        background: #333;
        border-bottom: 2px solid var(--p5-red);
        padding: 0;
        /* 允许四周有空白，让Transform正常显示 */
        overflow: auto;
        position: relative;
        display: block;
    }

    .zoom-controls {
        display: flex !important;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 9999;
        gap: 5px;
        background: rgba(0,0,0,0.5);
        padding: 5px;
        border-radius: 20px;
    }
    .zoom-controls button {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        border: 1px solid #fff;
        background: #000;
        color: #fff;
        font-size: 14px;
        padding: 0;
        cursor: pointer;
    }

    .canvas {
        /* 🔥 3. 关键：移除 margin，完全靠 transform 定位 */
        margin: 0;
        box-shadow: none;
        /* 米妮解除隐身：直接显示，不要搞什么透明度渐变啦！ */
        opacity: 1;
        transition: none;
    }

    .console {
        order: 2;
        width: 100%;
        height: 60vh;
        border-right: none;
        border-top: none;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        box-shadow: 0 -4px 10px rgba(0,0,0,0.5);
        z-index: 999;
    }
    .console-head { font-size: 12px; padding: 8px; background: #222; border-bottom: 1px solid #444; }
    .console-body { flex: 1; overflow-y: auto; padding: 15px; padding-bottom: 80px; }
    .btn, .btn-add, .btn-del, select, input { min-height: 40px; font-size: 14px; }
    .watermark-layer { display: none; }
}

/* === styles-console-polish.css === */
/* Console typography, interaction polish and modals */
/* ========================================= */
/* 🎭 1. 字体与排版优化 (Typography)       */
/* ========================================= */
/* 🌟 恢复原汁原味的 P5X 灵魂字体！ */
.console-head, .sec-title, .btn, .turn-title,
.calc-head, .res-val, .ars-title {
font-family: "Impact", "Microsoft YaHei", sans-serif !important;
font-weight: 900 !important;
text-transform: uppercase;
letter-spacing: 1px; /* 恢复紧凑有力的间距 */
}

/* 所有的输入框文字也硬朗一点 */
input, select, textarea {
font-family: "Microsoft YaHei", sans-serif;
font-weight: bold;
}

/* 给 section 标题加一个黑底白字斜切的效果 (米妮还原的旧版精致版) */
.sec-title {
background: #000;
color: #fff !important;
padding: 5px 10px;
font-size: 13px;
font-weight: bold;
transform: none;
border: none !important;
box-shadow: 2px 2px 0 var(--p5-red);
display: inline-block;
margin-top: 25px;
margin-bottom: 15px;
}
.sec-title::before { display: none; }

/* ========================================= */
/* ⚡ 2. 动态交互反馈 (Juicy Interaction)   */
/* ========================================= */
/* 按钮通用动效：悬停变色 + 略微倾斜 */
.btn {
transition: all 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
position: relative;
overflow: hidden;
}

/* 悬停时：轻微放大，阴影变深 */
.btn:hover {
transform: scale(1.02) skewX(-5deg);
box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
z-index: 10;
}

/* 点击瞬间：缩小 */
.btn:active {
transform: scale(0.95) skewX(-5deg);
box-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}

/* 输入框获得焦点时：红框高亮 + 抖动效果 */
input:focus, select:focus, textarea:focus {
outline: none;
border-color: var(--p5-red);
background: #2a2a2a;
box-shadow: 0 0 8px rgba(211, 47, 47, 0.6);
animation: text-shake 0.3s ease-in-out;
}

@keyframes text-shake {
0% { transform: translateX(0); }
25% { transform: translateX(2px); }
50% { transform: translateX(-2px); }
75% { transform: translateX(1px); }
100% { transform: translateX(0); }
}

/* ========================================= */
/* ✂️ 3. 撕裂与裁切感 (仅保留底部和控制台) */
/* ========================================= */
/* ❌ 这里删掉了 .card 的切角代码，让阴影回归！❌ */

/* 画布底部锯齿（保留） */
.canvas {
position: relative;
padding-bottom: 0px;
}

/* 控制台边缘锯齿装饰（保留） */
.console {
border-right: none;
position: relative;
}
.console::after {
content: "";
position: absolute;
top: 0; right: 0; bottom: 0; width: 6px;
background:
    linear-gradient(135deg, var(--p5-red) 25%, transparent 25%) -3px 0,
    linear-gradient(225deg, var(--p5-red) 25%, transparent 25%) -3px 0,
    linear-gradient(315deg, var(--p5-red) 25%, transparent 25%),
    linear-gradient(45deg, var(--p5-red) 25%, transparent 25%);
background-size: 6px 12px;
background-color: #222;
}


/* ========================================= */
/* 🚑 紧急修复：立绘框 & 行动轴 */
/* ========================================= */

/* 2. 行动轴样式统一收口
   这里只保留图标样式，避免后面的重复规则再次覆盖前面的时间轴布局 */
.action-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
    margin-bottom: 0;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3));
    flex-shrink: 0;
}

    /* 面具小头像样式 */
    .mask-icon-mini {
width: 23px;
height: 23px;
object-fit: contain;
vertical-align: middle;
margin-right: 7px; /* 跟文字拉开一点点距离 */
padding: 2px;
box-sizing: border-box;
border: 1px solid var(--mask-accent, rgba(211,47,47,0.9));
border-radius: 2px;
background:
    linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.02)),
    color-mix(in srgb, var(--mask-bg, #d32f2f) 30%, #050505);
box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.72),
    0 0 0 1px rgba(255,255,255,0.08),
    0 2px 4px rgba(0,0,0,0.48);
filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.56));
flex: 0 0 auto;
}

.mask-icon-mini-custom {
display: inline-flex;
align-items: center;
justify-content: center;
color: #eee;
font-size: 11px;
font-weight: 900;
line-height: 1;
}



/* 🐛 BUG 反馈按钮外观（按照老大指示，黑底红字） */
.btn-bug {
    font-size: 16px;
    padding: 12px;
    width: 100%;
    border: 2px solid var(--p5-red); /* 换成红边 */
    font-weight: 900;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 5px 5px 0 #000;
    background: #000;  /* 黑底 */
    color: var(--p5-red); /* 红字 */
    transform: rotate(-1deg);
}
.btn-bug:hover {
    background: var(--p5-red); /* 悬停换红底 */
    border-color: #000;
    color: #000; /* 悬停换黑字 */
    transform: rotate(1deg) scale(1.05);
    box-shadow: 5px 5px 0 #000;
}

/* 🐛 BUG 弹窗样式（全部红色化，且字体放大！！！） */
.bug-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); z-index: 9999; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(3px); }
.bug-modal-box { background: #111; border: 4px solid var(--p5-red); box-shadow: 8px 8px 0 #000; width: 450px; max-width: 90%; transform: none; padding: 2px; }

.bug-modal-header { background: var(--p5-red); color: #000; font-family: "Impact", "Microsoft YaHei", sans-serif; font-size: 24px; font-weight: 900; text-align: center; padding: 12px; letter-spacing: 2px; }

.bug-modal-body { padding: 25px; background: #222; }

.bug-modal-body label { color: var(--p5-red); font-size: 16px; font-weight: bold; margin-bottom: 8px; display: block; }

.bug-input, .bug-textarea {
    width: 100%;
    background: #000;
    border: 2px solid #555;
    border-left: 6px solid var(--p5-red);
    color: #fff;
    padding: 12px;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
    margin-bottom: 20px;
    font-size: 18px;
}

.bug-textarea { height: 150px; resize: none; }

.bug-input:focus, .bug-textarea:focus {
    outline: none;
    border-color: var(--p5-red);
    box-shadow: 0 0 10px rgba(235, 33, 41, 0.5);
}

.bug-modal-tip {
    margin-top: -6px;
    margin-bottom: 18px;
    padding: 10px 12px;
    background: #161616;
    border: 1px dashed #555;
    color: #bbb;
    font-size: 13px;
    line-height: 1.6;
}

.bug-modal-link {
    color: var(--p5-yellow);
    font-weight: bold;
    text-decoration: none;
}

.bug-modal-link:hover {
    color: #fff;
    text-decoration: underline;
}

.bug-modal-footer { display: flex; gap: 10px; padding: 20px; background: #1a1a1a; border-top: 1px dashed #444; }

.btn-bug-cancel, .btn-bug-submit {
    flex: 1;
    padding: 12px;
    font-weight: 900;
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transform: none;
    transition: 0.2s;
}

.btn-bug-cancel { background: #555; color: #fff; }
.btn-bug-cancel:hover { background: #777; }

.btn-bug-submit { background: var(--p5-red); color: #000; }
.btn-bug-submit:hover { background: #fff; color: var(--p5-red); box-shadow: 3px 3px 0 var(--p5-red); }

.btn-bug-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.timeline-preflight-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(3px);
}

.timeline-preflight-box {
    width: min(620px, 94vw);
    max-height: min(680px, 88vh);
    display: flex;
    flex-direction: column;
    border: 3px solid var(--p5-red);
    background: #141414;
    box-shadow: 8px 8px 0 #000, 0 24px 60px rgba(0, 0, 0, 0.45);
}

.timeline-preflight-header {
    padding: 13px 18px;
    background: var(--p5-red);
    color: #050505;
    font-family: Impact, "Microsoft YaHei", sans-serif;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    text-align: center;
}

.timeline-preflight-body {
    min-height: 0;
    padding: 18px;
    background: #202124;
}

.timeline-preflight-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(251, 192, 45, 0.26);
    background: rgba(251, 192, 45, 0.08);
    color: #f4f4f4;
    font-size: 12px;
    font-weight: 800;
}

.timeline-preflight-summary strong {
    margin-right: 4px;
    color: var(--p5-yellow);
}

.timeline-preflight-summary span {
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #dfe2e8;
}

.timeline-preflight-list {
    max-height: min(430px, 52vh);
    overflow: auto;
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-right: 4px;
}

.timeline-preflight-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
}

.timeline-preflight-item.is-error {
    border-color: rgba(255, 80, 66, 0.38);
    background: rgba(255, 80, 66, 0.08);
}

.timeline-preflight-item.is-warning {
    border-color: rgba(251, 192, 45, 0.34);
    background: rgba(251, 192, 45, 0.07);
}

.timeline-preflight-item.is-fixed {
    border-color: rgba(38, 198, 218, 0.3);
    background: rgba(38, 198, 218, 0.07);
}

.timeline-preflight-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.34);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.timeline-preflight-item-text b {
    display: block;
    color: #fff;
    font-size: 13px;
}

.timeline-preflight-item-text p {
    margin: 4px 0 0;
    color: #c9cdd5;
    font-size: 12px;
    line-height: 1.45;
}

.timeline-preflight-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px dashed rgba(255, 255, 255, 0.16);
    background: #181818;
}

.timeline-preflight-btn {
    min-width: 116px;
    min-height: 36px;
    border: 0;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.timeline-preflight-btn.is-muted {
    background: #4a4d52;
    color: #fff;
}

.timeline-preflight-btn.is-muted:hover {
    background: #656a72;
}

.timeline-preflight-btn.is-primary {
    background: var(--p5-red);
    color: #050505;
}

.timeline-preflight-btn.is-primary:hover {
    background: #fff;
    color: var(--p5-red);
    box-shadow: 3px 3px 0 var(--p5-red);
}

.share-modal-box {
    width: 600px;
}

.share-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

.share-modal-body .bug-input {
    margin-bottom: 16px;
}

.share-textarea {
    height: 110px;
    resize: vertical;
}

@media (max-width: 640px) {
    .share-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Submission / feedback modal refresh */
.bug-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 18%, rgba(220, 32, 40, 0.18), transparent 30%),
        rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(5px);
}

.bug-modal-box,
.share-modal-box {
    width: min(560px, 94vw);
    max-height: min(88vh, 760px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--p5-red);
    border-bottom-width: 7px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.045), rgba(255,255,255,0) 34%),
        #161616;
    box-shadow:
        10px 10px 0 #000,
        0 24px 70px rgba(0, 0, 0, 0.62);
    padding: 0;
}

.share-modal-box {
    width: min(680px, 94vw);
}

.bug-modal-header,
.share-modal-header {
    position: relative;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.92) 0 24px, transparent 24px),
        repeating-linear-gradient(135deg, rgba(0,0,0,0.16) 0 10px, transparent 10px 20px),
        var(--p5-red);
    color: #050505;
    font-family: Impact, "Microsoft YaHei", sans-serif;
    font-size: clamp(21px, 4vw, 28px);
    font-weight: 900;
    letter-spacing: 2px;
    text-align: center;
    text-shadow: none;
}

.bug-modal-header::after,
.share-modal-header::after {
    content: "";
    position: absolute;
    right: -34px;
    top: 0;
    width: 120px;
    height: 100%;
    background: rgba(0, 0, 0, 0.22);
    transform: skewX(-24deg);
}

.bug-modal-body,
.share-modal-body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0)),
        #1e1e1e;
}

.bug-modal-body label,
.share-modal-body label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 7px;
    color: #ff5159;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.bug-modal-body label::before,
.share-modal-body label::before {
    content: "";
    width: 7px;
    height: 13px;
    background: var(--p5-red);
    box-shadow: 2px 2px 0 #000;
    transform: skewX(-12deg);
    flex: 0 0 auto;
}

.bug-input,
.bug-textarea,
.share-modal-body .bug-input {
    width: 100%;
    min-height: 52px;
    margin: 0 0 17px;
    border: 1px solid rgba(255,255,255,0.18);
    border-left: 6px solid var(--p5-red);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.14)),
        #050505;
    color: #fff;
    padding: 12px 15px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 1px 0 rgba(255,255,255,0.04);
    font-family: "Microsoft YaHei", "TimelineHan", sans-serif;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.bug-textarea {
    min-height: 150px;
    resize: vertical;
}

.share-textarea {
    min-height: 118px;
}

.bug-input::placeholder,
.bug-textarea::placeholder {
    color: rgba(255,255,255,0.42);
}

.bug-input:focus,
.bug-textarea:focus {
    outline: none;
    border-color: var(--p5-red);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 0 0 3px rgba(220, 32, 40, 0.22),
        0 12px 26px rgba(0,0,0,0.22);
}

.share-form-grid {
    gap: 0 16px;
}

.bug-modal-tip {
    margin: 2px 0 0;
    padding: 13px 14px;
    border: 1px dashed rgba(255,255,255,0.2);
    border-left: 5px solid rgba(220,32,40,0.85);
    border-radius: 6px;
    background: rgba(0,0,0,0.24);
    color: rgba(255,255,255,0.78);
    font-size: 13px;
    line-height: 1.7;
}

.bug-modal-link {
    color: var(--p5-yellow);
    font-weight: 900;
    text-decoration: none;
}

.bug-modal-link:hover {
    color: #fff;
    text-decoration: underline;
}

.bug-modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 16px 20px 20px;
    background: #171717;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-bug-cancel,
.btn-bug-submit {
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 12px 14px;
    font-family: "Microsoft YaHei", "TimelineHan", sans-serif;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.18s ease;
}

.btn-bug-cancel {
    background: #4e4e4e;
    color: #fff;
}

.btn-bug-cancel:hover {
    background: #666;
    transform: translateY(-1px);
}

.btn-bug-submit {
    background: var(--p5-red);
    color: #060606;
}

.btn-bug-submit:hover {
    background: #fff;
    color: var(--p5-red);
    box-shadow: 3px 3px 0 var(--p5-red);
    transform: translateY(-1px);
}

.btn-bug-submit:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@media (max-width: 640px) {
    .bug-modal-overlay {
        padding: 12px;
    }

    .bug-modal-body,
    .share-modal-body {
        padding: 18px;
    }

    .bug-modal-footer {
        grid-template-columns: 1fr;
    }
}

/* === styles-console-panels.css === */
/* Console panels and form refinements */
/* ========================================= */
    /* 🎭 V5.0 动态推演 UI 框架 (完全独立) */
    /* ========================================= */

    /* 1. 攻略图下层 BUFF 栏 (彻底解放高度，引入网格矩阵) */
    .tl-buff-row {
        background-color: #151515 !important; /* 稍微调亮一点点，不那么死黑 */
        /* 删掉原来的 height: 18px，让它根据内容自动撑开高度 */
    }
    .tl-buff-row.hidden {
        display: none;
    }
    .tl-buff-cell {
        padding: 4px 6px !important; /* 上下左右都给足呼吸空间 */
        font-size: 10px !important;
        color: #777;
        border-right: 1px solid #333 !important;
        vertical-align: middle;
        font-family: "Impact", "Microsoft YaHei", sans-serif;
    }

    .tl-status-strip {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
        min-height: 26px;
        padding: 2px;
        border-radius: 6px;
        background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(0,0,0,0.10));
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035);
        overflow: hidden;
    }

    .tl-status-strip.muted {
        opacity: 0.42;
        filter: grayscale(24%);
    }

    .tl-status-chip {
        min-width: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        height: 22px;
        padding: 0 6px;
        border-radius: 5px;
        background: rgba(15,15,15,0.88);
        border: 1px solid rgba(255,255,255,0.08);
        color: #f3f3f3;
        font-family: "Microsoft YaHei", Arial, sans-serif;
        line-height: 1;
        white-space: nowrap;
    }

    .tl-status-chip b {
        color: #a7a7a7;
        font-size: 9px;
        font-style: normal;
        font-weight: 900;
        letter-spacing: 0;
    }

    .tl-status-chip strong {
        min-width: 0;
        color: #fff;
        font-size: 12px;
        font-weight: 900;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tl-status-chip.hl {
        border-color: rgba(243,89,249,0.35);
        box-shadow: inset 0 -2px 0 rgba(243,89,249,0.28);
    }

    .tl-status-chip.hl strong { color: #f359f9; }
    .tl-status-chip.hl.full strong { color: #ff94ff; text-shadow: 0 0 8px rgba(243,89,249,0.45); }

    .tl-status-chip.cd {
        border-color: rgba(255,54,30,0.28);
        box-shadow: inset 0 -2px 0 rgba(255,54,30,0.20);
    }

    .tl-status-chip.cd strong { color: #ff674f; }
    .tl-status-chip.cd.ready {
        border-color: rgba(26,188,156,0.35);
        box-shadow: inset 0 -2px 0 rgba(26,188,156,0.26);
    }
    .tl-status-chip.cd.ready strong { color: #1abc9c; }

    .tl-status-chip.sp {
        border-color: rgba(251,192,45,0.30);
        box-shadow: inset 0 -2px 0 rgba(251,192,45,0.22);
    }

    .tl-status-chip.sp strong { color: #fbc02d; }
    .tl-status-chip.sp.ready strong { color: #1abc9c; }
    .tl-status-chip.sp.warn strong { color: #fbc02d; }
    .tl-status-chip.sp.bad strong { color: #ff674f; }

    .tl-status-chip.skills {
        gap: 2px;
        padding-right: 4px;
        border-color: rgba(255,255,255,0.10);
        min-width: 70px;
    }

    .tl-status-chip.skills i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 15px;
        height: 14px;
        padding: 0 2px;
        border-radius: 3px;
        background: rgba(255,255,255,0.08);
        color: #aaa;
        font-size: 8px;
        font-style: normal;
        font-weight: 900;
    }

    .tl-status-chip.skills i.ready {
        background: #fbc02d;
        color: #111;
    }

    /* 🌟 米妮的 P5X 赛博矩阵风格化 (V6.1 终极自适应防切割版) */
    .buff-matrix {
        display: grid;
        /* 🔥 重新分配比例：第1/2格给大点，HL短小给少点 */
        grid-template-columns: 37% 39% 24%;
        row-gap: 3px;
        column-gap: 3px;
        text-align: left;
        padding-top: 2px;
    }
    .bm-cell {
        background: rgba(20, 20, 20, 0.9); /* 🌌 回归暗夜：极深的黑灰底色 */
        border: none !important;
        border-bottom: 2px solid var(--p5-red) !important; /* 警戒线风格底边 */
        padding: 4px; /* 增加呼吸感 */
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: "Impact", "Microsoft YaHei", sans-serif;
        color: #fff;
        transform: skewX(-15deg); /* 外框保持凌厉的切角 */
        box-shadow: 3px 3px 0 rgba(0,0,0,0.8);
        overflow: hidden;
        white-space: nowrap;
    }
    /* ⚖️ 核心修正：文字反向倾斜，保持横平竖直，绝对清晰！ */
    .bm-label, .bm-val {
        transform: skewX(15deg);
        display: inline-block;
    }
    .bm-label {
        color: #aaa; /* 标签用亮灰色 */
        margin-right: 6px;
        font-size: 10px; /* 字号恢复正常可读范围 */
        font-style: italic;
    }
    .bm-val {
        font-weight: bold;
        font-size: 13px; /* 放大数值 */
        color: #fff;
    }
    .bm-val.hl { color: #f359f9; text-shadow: 1px 1px 0 #000; }
    .bm-val.ready { color: #1abc9c; text-shadow: 1px 1px 0 #000; }
    .bm-val.cd { color: #ff361e; }

    /* 技能子弹匣倒计时 */
    .sk-blk {
        display: inline-block;
        background: #222;
        color: #888;
        border: 1px solid #444;
        padding: 0 3px;
        margin-right: 2px;
        font-size: 10px;
        text-align: center;
        min-width: 12px;
        transform: skewX(15deg); /* 配合父级的-15deg进行反向拉直！ */
    }
    .sk-blk.ready {
        background: #fbc02d;
        color: #000;
        border-color: #fbc02d;
        box-shadow: 1px 1px 0 #d32f2f;
        font-weight: 900;
    }

    /* 2. 控制台行动结算面板 */
    .console-buff-panel {
        display: none;
        margin-top: 6px;
        padding: 0;
        background: transparent;
        border: 0;
        color: #e8e8e8;
        font-family: "Microsoft YaHei", "Consolas", monospace;
        font-size: 11px;
    }

    .sim-console-panel {
        display: grid;
        gap: 7px;
        padding: 7px;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.10)),
            #17181b;
        border: 1px solid rgba(255,255,255,0.10);
        border-left: 3px solid var(--p5-red);
        border-radius: 10px;
        box-shadow: 0 10px 18px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(255,255,255,0.02);
    }

    .sim-summary-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
        gap: 5px;
    }

    .sim-summary-card {
        min-width: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 6px;
        row-gap: 2px;
        align-items: end;
        padding: 5px 6px;
        background: rgba(255,255,255,0.045);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 8px;
    }

    .sim-summary-card.hl { border-color: rgba(243, 89, 249, 0.28); }
    .sim-summary-card.navi,
    .sim-summary-card.skill,
    .sim-summary-card.futaba { border-color: rgba(26, 188, 156, 0.24); }
    .sim-summary-card.fuuka { border-color: rgba(251, 192, 45, 0.26); }
    .sim-summary-card.bad { border-color: rgba(255, 54, 30, 0.46); }

    .sim-summary-label {
        color: #9a9a9a;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0;
    }

    .sim-summary-card strong {
        min-width: 0;
        color: #fff;
        font-size: 11px;
        line-height: 1.15;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sim-summary-card em {
        grid-column: 1 / -1;
        justify-self: start;
        font-style: normal;
        font-size: 10px;
        color: #bdbdbd;
    }

    .sim-summary-card em.good,
    .sim-action-line em.good { color: #55d98b; }
    .sim-summary-card em.bad,
    .sim-action-line em.bad { color: #ff674f; }
    .sim-summary-card em.neutral,
    .sim-action-line em.neutral { color: #a9a9a9; }

    .sim-action-ledger {
        display: grid;
        gap: 5px;
    }

    .sim-console-panel.is-collapsed .sim-action-ledger {
        display: none;
    }

    .sim-detail-toggle {
        justify-self: end;
        padding: 3px 8px;
        border: 1px solid rgba(255,255,255,0.14);
        border-radius: 999px;
        background: rgba(0,0,0,0.22);
        color: #d8d8d8;
        font-size: 10px;
        font-weight: 800;
        line-height: 1.2;
        cursor: pointer;
    }

    .sim-detail-toggle:hover {
        border-color: rgba(251,192,45,0.42);
        color: #fff;
        background: rgba(251,192,45,0.10);
    }

    .sim-action-item {
        min-width: 0;
        padding: 6px;
        background: rgba(0,0,0,0.18);
        border: 1px solid rgba(255,255,255,0.07);
        border-radius: 8px;
    }

    .sim-action-title {
        display: flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
        padding-bottom: 4px;
        margin-bottom: 4px;
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }

    .sim-action-title span {
        flex: 0 0 auto;
        padding: 1px 5px;
        color: #111;
        background: #fbc02d;
        border-radius: 999px;
        font-size: 9px;
        font-weight: 900;
        line-height: 1.45;
    }

    .sim-action-title strong {
        min-width: 0;
        color: #f4f4f4;
        font-size: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sim-action-target {
        flex: 0 1 auto;
        min-width: 0;
        color: #9cc9ff;
        font-size: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sim-action-lines {
        display: grid;
        gap: 4px;
    }

    .sim-action-line {
        min-width: 0;
        display: grid;
        grid-template-columns: 34px minmax(0, auto) auto minmax(0, 1fr);
        align-items: center;
        gap: 5px;
        color: #d9d9d9;
        line-height: 1.35;
    }

    .sim-action-line.muted {
        grid-template-columns: 34px minmax(0, 1fr);
        color: #858585;
    }

    .sim-line-label {
        color: #aaa;
        font-size: 9px;
        font-weight: 900;
    }
    .sim-line-label.hl { color: #f359f9; }
    .sim-line-label.navi { color: #1abc9c; }
    .sim-line-label.fuuka { color: #fbc02d; }
    .sim-line-label.note { color: #fbc02d; }

    .sim-action-line strong,
    .sim-action-line em {
        min-width: 0;
        font-size: 10px;
        font-style: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sim-event-list {
        min-width: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
    }

    .sim-event-pill {
        max-width: 100%;
        padding: 1px 5px;
        border-radius: 999px;
        background: rgba(255,255,255,0.08);
        color: #cfcfcf;
        font-size: 9px;
        line-height: 1.45;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sim-event-pill.good {
        background: rgba(85, 217, 139, 0.14);
        color: #75e79f;
    }

    .sim-event-pill.bad {
        background: rgba(255, 103, 79, 0.14);
        color: #ff806c;
    }

    .sim-event-pill.navi {
        background: rgba(26, 188, 156, 0.14);
        color: #55d9c1;
    }

/* Final console-only polish */
:root {
    --console-surface-1: #171717;
    --console-surface-2: #1f1f1f;
    --console-surface-3: #262626;
    --console-border: rgba(255, 255, 255, 0.08);
    --console-border-soft: rgba(255, 255, 255, 0.04);
    --console-shadow-lg: 0 22px 46px rgba(0, 0, 0, 0.42);
    --console-shadow-md: 0 12px 24px rgba(0, 0, 0, 0.20);
    --console-control-gap: 8px;
    --console-compact-col: 72px;
}

.console {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent 86px),
        linear-gradient(155deg, rgba(211,47,47,0.14), transparent 34%),
        linear-gradient(180deg, #252525 0%, #151515 100%);
    border-left: 1px solid var(--console-border-soft);
    box-shadow: var(--console-shadow-lg), 0 6px 14px rgba(0, 0, 0, 0.28);
    border-radius: 20px 0 0 20px;
    overflow: hidden;
}

.console-head {
    display: flex;
    align-items: center;
    min-height: 48px;
    box-sizing: border-box;
    padding: 11px 18px;
    text-align: left;
    color: #fff;
    font-family: "Arial Black", "Microsoft YaHei", sans-serif !important;
    font-size: 20px;
    font-style: normal;
    font-weight: 900 !important;
    line-height: 1;
    letter-spacing: 0.8px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.24);
    background: linear-gradient(135deg, #f55454 0%, var(--p5-red) 58%, #8c1616 100%);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.12);
    position: relative;
}

.console-head::after {
    content: none;
}

.console-compact-tools {
    display: grid;
    grid-template-columns: 30px 30px 1px repeat(5, minmax(0, 1fr));
    gap: 5px;
    align-items: center;
    max-height: 0;
    padding: 0 12px;
    border-bottom: 0 solid rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.12)),
        #151516;
    box-shadow: 0 8px 18px rgba(0,0,0,0);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: max-height 0.18s ease, padding 0.18s ease, opacity 0.14s ease, transform 0.18s ease, box-shadow 0.18s ease, border-bottom-width 0.18s ease;
}

.console.is-compact-tools-visible .console-compact-tools {
    max-height: 42px;
    padding-top: 7px;
    padding-bottom: 7px;
    border-bottom-width: 1px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.32);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.compact-tool-btn {
    width: 100%;
    min-width: 0;
    height: 27px;
    padding: 0 7px;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 7px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.08)),
        #242529;
    color: #e6e6e6;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease, opacity 0.14s ease, transform 0.14s ease;
}

.compact-tool-btn:hover:not(:disabled) {
    border-color: rgba(251,192,45,0.52);
    background:
        linear-gradient(180deg, rgba(251,192,45,0.08), rgba(0,0,0,0.06)),
        #2c2b25;
    color: #fff;
    transform: translateY(-1px);
}

.compact-tool-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.compact-tool-btn:disabled {
    cursor: default;
    opacity: 0.36;
}

.compact-history-btn {
    padding: 0;
    color: var(--p5-yellow);
    font-size: 18px;
    font-family: "Segoe UI Symbol", "Microsoft YaHei", sans-serif;
}

.compact-tool-btn.is-active {
    border-color: rgba(26,188,156,0.62);
    background:
        linear-gradient(180deg, rgba(26,188,156,0.12), rgba(0,0,0,0.08)),
        #1f302d;
    color: #9ff5dc;
}

.compact-tool-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.12);
}

.console-body {
    padding: 16px 16px 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.018), transparent 180px);
    scrollbar-color: var(--p5-red) #151515;
}

.console-body::-webkit-scrollbar {
    width: 10px;
}

.console-body::-webkit-scrollbar-track {
    background: #121212;
}

.console-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f65a5a 0%, var(--p5-red) 100%);
    border: 1px solid #0c0c0c;
}

.top-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--console-control-gap);
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid var(--console-border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(0,0,0,0.08)), var(--console-surface-1);
    box-shadow: var(--console-shadow-md), inset 0 0 0 1px rgba(255,255,255,0.02);
}

.top-bar .btn {
    width: 100%;
    min-width: 0;
}

#btn-toggle-buff {
    grid-column: auto;
    margin-left: 0 !important;
}

.btn-locate-turn {
    border-color: rgba(251,192,45,0.64) !important;
    color: var(--p5-yellow) !important;
}

.btn-locate-turn:hover {
    border-color: var(--p5-yellow) !important;
    background: linear-gradient(180deg, rgba(251,192,45,0.12), rgba(0,0,0,0.08)), #3a3320;
    color: #fff !important;
}

.console-bottom-actions {
    margin-top: 26px;
    padding: 16px 14px 14px;
    border-top: 1px solid #555;
    border: 1px solid var(--console-border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.08)), #151515;
    box-shadow: var(--console-shadow-md), inset 0 0 0 1px rgba(255,255,255,0.02);
}

input,
select,
textarea {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.08)), #232323;
    border: 1px solid var(--console-border);
    border-radius: 12px;
    padding: 8px 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), inset 0 0 0 1px rgba(0,0,0,0.15);
}

input::placeholder,
textarea::placeholder {
    color: #8b8b8b;
}

input:focus,
select:focus,
textarea:focus {
    background: #292929;
    border-color: rgba(211,47,47,0.82);
    box-shadow: 0 0 0 1px rgba(211,47,47,0.16), 0 0 12px rgba(211,47,47,0.20);
    animation: none;
}

.console-body select:not([multiple]):not(.character-picker-filter):not(.mask-picker-filter):not(.target-picker-source):not(.team-member-char-source):not(.navi-picker-source):not(.mask-picker-source):not(.mask-skill-picker-source) {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    background-image:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.08)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23fbc02d' d='M0 0h8L4 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 14px center;
    background-size: 100% 100%, 8px 5px;
}

.console-body select:not([multiple]):not(.character-picker-filter):not(.mask-picker-filter):not(.target-picker-source):not(.team-member-char-source):not(.navi-picker-source):not(.mask-picker-source):not(.mask-skill-picker-source):focus {
    background-image:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.08)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23fbc02d' d='M0 0h8L4 5z'/%3E%3C/svg%3E");
}

select option:not(.qishi-recommended-option):not(.zhouka-recommended-option) {
    background-image: none !important;
    background-color: #2b2b2b;
    color: #fff;
}

.btn-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: var(--console-control-gap);
}

.btn {
    padding: 9px 12px;
    border: 1px solid var(--console-border);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.04);
}

.btn-add {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.08)), #353535;
    border-style: solid;
    color: #e8e8e8;
}

.btn-del {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.10)), #4c1212;
    border-color: rgba(255,150,150,0.22);
    color: #ffd1d1;
    width: 100%;
    max-width: none;
}

.btn-save {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.08)), #1a69ba;
}

.btn-share {
    font-size: 16px;
    padding: 12px;
    width: 100%;
    border: 2px solid #000;
    font-weight: 900;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 5px 5px 0 #000;
    background: var(--p5-red);
    color: #fff;
    transform: rotate(2deg);
}
.btn-share:hover {
    background: #fff;
    border-color: var(--p5-red);
    color: var(--p5-red);
    transform: rotate(-2deg) scale(1.05);
    box-shadow: 5px 5px 0 #000;
}

.btn-export,
.btn-share,
.btn-bug {
    border-radius: 16px;
    box-shadow: 0 16px 30px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.16);
}

.btn-export:hover,
.btn-bug:hover {
    transform: translateY(-2px) scale(1.01);
}

.btn-share:hover {
    transform: rotate(-2deg) translateY(-2px) scale(1.03);
}

.sec-title {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    box-shadow: none;
    padding: 0;
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: 2px;
}

.sec-title::before {
    display: block;
    content: "";
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--p5-yellow), var(--p5-red));
    box-shadow: 3px 3px 0 #000;
    transform: rotate(-7deg);
}

.sec-title::after {
    content: "";
    display: block;
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.18), transparent);
}

#team-list,
#mask-list,
#timeline-editors,
#pen-custom-container,
#crit-custom-container {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.08)), #181818;
    border: 1px solid var(--console-border);
    border-radius: 16px;
    padding: 10px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.row,
.team-member-row,
.console-stack,
.console-grid-1,
.console-grid-2,
.console-grid-3 {
    width: 100%;
}

.console-stack {
    display: grid;
    gap: var(--console-control-gap);
}

.console-grid-1,
.console-grid-2,
.console-grid-3 {
    display: grid;
    gap: var(--console-control-gap);
    align-items: center;
}

.console-grid-1 {
    grid-template-columns: minmax(0, 1fr);
}

.console-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.console-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.console-grid-3-compact {
    grid-template-columns: var(--console-compact-col) minmax(0, 1fr) minmax(0, 1fr);
}

.boss-config-row {
    display: grid;
    grid-template-columns: var(--console-compact-col) minmax(0, 1fr) 36px;
    gap: var(--console-control-gap);
    align-items: center;
}

.boss-config-row.has-boss-b {
    grid-template-columns: var(--console-compact-col) minmax(0, 1fr) 36px minmax(0, 1fr);
}

.boss-config-row #inp-ver {
    text-align: center;
}

.boss-control {
    position: relative;
    display: block;
    min-width: 0;
}

.boss-control[hidden],
.boss-control .boss-select[hidden],
.boss-control .boss-custom-input[hidden] {
    display: none !important;
}

.boss-control .boss-select,
.boss-control .boss-custom-input {
    height: 34px;
    min-height: 34px;
    padding: 0 30px 0 12px;
    font-weight: 800;
}

.boss-control.is-custom .boss-custom-input {
    border-color: rgba(251,192,45,0.70);
    box-shadow:
        inset 3px 0 0 rgba(251,192,45,0.85),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.boss-add-btn {
    width: 36px;
    height: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(251,192,45,0.48);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.10)),
        rgba(251,192,45,0.08);
    color: var(--p5-yellow);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
}

.boss-add-btn:hover {
    border-color: rgba(251,192,45,0.78);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.075), rgba(0,0,0,0.08)),
        rgba(251,192,45,0.14);
    color: #fff;
}

.boss-add-btn.is-remove {
    border-color: rgba(255,54,30,0.45);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.12)),
        rgba(255,54,30,0.12);
    color: #ff9a8f;
}

.console-grid-2-label {
    grid-template-columns: 92px minmax(0, 1fr);
}

.console-grid-align-end {
    align-items: end;
}

.console-stack > *,
.console-grid-1 > *,
.console-grid-2 > *,
.console-grid-3 > * {
    min-width: 0;
}

.console-grid-3-compact #inp-ver {
    text-align: center;
}

.console-body > .row,
.console-body > .btn-group {
    box-sizing: border-box;
    padding-inline: 10px;
}

.team-member-box {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 10px;
    padding-top: 10px;
}

#wonder-control-anchor.is-card-located,
.navi-control-group.is-card-located,
.team-member-box.is-card-located {
    outline: 2px solid rgba(251,192,45,0);
    outline-offset: 3px;
    animation: consoleCardLocated 1.35s ease;
}

@keyframes consoleCardLocated {
    0%,
    100% {
        outline-color: rgba(251,192,45,0);
    }
    18%,
    72% {
        outline-color: rgba(251,192,45,0.64);
    }
}

.team-member-title {
    color: #fff;
    letter-spacing: 0.5px;
}

.team-member-main-select,
.team-member-grid-2 > * {
    min-width: 0;
}

.team-member-grid-2 {
    gap: var(--console-control-gap);
}

.team-member-order-select {
    width: var(--console-compact-col) !important;
}

.twin-select-row {
    background: linear-gradient(180deg, rgba(211,47,47,0.12), rgba(0,0,0,0.08)), #241414;
    border: 1px solid rgba(211,47,47,0.24);
    border-radius: 12px;
    padding: 6px;
    box-sizing: border-box;
    overflow: hidden;
}

.twin-select-row .team-member-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    box-sizing: border-box;
}

.twin-select-row select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.inspiration-select {
    text-align: left;
    text-align-last: left;
}

.action-select-wrapper {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.08)), #252525;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    padding: 5px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.015);
}

.move-btn,
.action-del {
    border-radius: 8px;
}

.mini-btn-add {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.06)), #282828;
    border: 1px dashed rgba(255,255,255,0.22);
    border-radius: 10px;
    color: #dddddd;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.18);
}

.mini-btn-add:hover {
    background: #353535;
}

.calc-console-section {
    position: relative;
    margin-top: 10px;
    padding: 9px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(211,47,47,0.10) 0 18%, transparent 18% 100%),
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.16)),
        #151515;
    border: 1px solid rgba(255,255,255,0.10);
    border-left: 3px solid var(--p5-red);
    border-radius: 8px;
    box-shadow: 4px 5px 0 rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.035);
}

.calc-section-pen {
    border-left-color: var(--p5-blue);
    background:
        linear-gradient(135deg, rgba(38,198,218,0.09) 0 18%, transparent 18% 100%),
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.16)),
        #151515;
}

.calc-section-crit {
    border-left-color: var(--p5-yellow);
    background:
        linear-gradient(135deg, rgba(251,192,45,0.08) 0 18%, transparent 18% 100%),
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.16)),
        #151515;
}

.calc-mod-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 0 6px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: #f4f4f4;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.8px;
}

.calc-mod-title span {
    color: inherit;
}

.calc-mod-title small {
    color: rgba(255,255,255,0.48);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.calc-mod-title-def span { color: #f2f2f2; }
.calc-mod-title-pen span { color: var(--p5-blue); }
.calc-mod-title-crit span { color: var(--p5-yellow); }

.calc-boss-def-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 125px 34px;
    gap: 5px;
    align-items: center;
    margin-bottom: 6px;
}

.calc-boss-def-row::after {
    content: "";
    grid-column: 3;
    width: 34px;
    height: 34px;
}

.calc-boss-def-row label {
    grid-column: 1;
    height: 34px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.028), rgba(0,0,0,0.08)),
        rgba(0,0,0,0.18);
    margin: 0;
    color: rgba(255,255,255,0.56);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.calc-main-value {
    grid-column: 2;
    width: 125px !important;
    min-width: 125px;
    height: 34px;
    padding: 0 8px;
    border-color: rgba(251,192,45,0.42);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.08)),
        rgba(0,0,0,0.34);
    appearance: textfield;
    color: var(--p5-yellow) !important;
    font-weight: 900;
    text-align: center;
}

.calc-main-value::-webkit-outer-spin-button,
.calc-main-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    display: none;
    margin: 0;
}

.calc-main-value[type="number"] {
    -moz-appearance: textfield;
}

#buff-list-def,
.calc-char-block > div[id^="buff-list-"] {
    display: grid;
    gap: 4px;
}

#pen-custom-container,
#crit-custom-container {
    display: grid;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.calc-char-block {
    position: relative;
    margin-top: 0;
    padding: 9px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.12)),
        #1a1a1a;
    border: 1px solid rgba(255,255,255,0.10);
    border-left: 3px solid var(--p5-blue);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

#crit-custom-container .calc-char-block {
    border-left-color: var(--p5-yellow);
}

.calc-char-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.calc-char-select {
    min-width: 0;
    height: 34px;
    padding: 0 30px 0 10px;
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(38,198,218,0.24);
    border-radius: 6px;
    color: var(--p5-blue);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

#crit-custom-container .calc-char-select {
    border-color: rgba(251,192,45,0.24);
    color: var(--p5-yellow);
}

.calc-char-remove,
.calc-buff-remove {
    flex: 0 0 auto;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255,80,66,0.28) !important;
    border-radius: 7px;
    background:
        linear-gradient(180deg, rgba(255,80,66,0.08), rgba(0,0,0,0.10)),
        #261919 !important;
    color: #ffb8b0 !important;
    font-family: Impact, sans-serif;
    font-size: 0 !important;
    font-weight: 900 !important;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    margin-left: 0 !important;
    position: relative;
}

.calc-char-remove::before,
.calc-buff-remove::before {
    content: "×";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -52%);
    font-size: 16px;
    line-height: 1;
}

.calc-char-remove:hover,
.calc-buff-remove:hover {
    color: #fff;
    border-color: rgba(255,80,66,0.70) !important;
    background:
        linear-gradient(180deg, rgba(255,80,66,0.22), rgba(0,0,0,0.10)),
        #3a2020 !important;
    box-shadow: 2px 2px 0 #000;
}

.calc-buff-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 125px 34px;
    gap: 5px;
    align-items: center;
    min-width: 0;
}

.calc-buff-row:has(.buff-name[style*="block"]) {
    grid-template-columns: minmax(88px, 0.70fr) minmax(70px, 0.30fr) 125px 34px;
}

.calc-buff-row.auto-generated {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 125px 34px;
    gap: 5px !important;
    align-items: center !important;
}

.calc-buff-row.auto-generated:has(.calc-auto-unused-btn) {
    grid-template-columns: minmax(0, 1fr) 72px 48px 34px;
}

.calc-buff-row .buff-sel {
    grid-column: 1;
}

.calc-buff-row .buff-val {
    grid-column: 2;
}

.calc-buff-row .calc-auto-unused-btn {
    grid-column: 2;
}

.calc-buff-row .calc-buff-remove {
    grid-column: 3;
}

.calc-buff-row:has(.calc-auto-unused-btn) .buff-val {
    grid-column: 2;
}

.calc-buff-row:has(.calc-auto-unused-btn) .calc-auto-unused-btn {
    grid-column: 3;
}

.calc-buff-row:has(.calc-auto-unused-btn) .calc-buff-remove {
    grid-column: 4;
}

.calc-buff-row:has(.buff-name[style*="block"]) .buff-name {
    grid-column: 2;
}

.calc-buff-row:has(.buff-name[style*="block"]) .buff-val {
    grid-column: 3;
}

.calc-buff-row:has(.buff-name[style*="block"]) .calc-auto-unused-btn {
    grid-column: 3;
}

.calc-buff-row:has(.buff-name[style*="block"]) .calc-buff-remove {
    grid-column: 4;
}

.calc-buff-row:has(.buff-name[style*="block"]):has(.calc-auto-unused-btn) .buff-val {
    grid-column: 3;
}

.calc-buff-row:has(.buff-name[style*="block"]):has(.calc-auto-unused-btn) .calc-auto-unused-btn {
    grid-column: 4;
}

.calc-buff-row:has(.buff-name[style*="block"]):has(.calc-auto-unused-btn) .calc-buff-remove {
    grid-column: 5;
}

.calc-buff-row .buff-sel,
.calc-buff-row .buff-name {
    min-width: 0;
    height: 34px;
    box-sizing: border-box;
    padding: 0 30px 0 10px;
    line-height: 1.2;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.08)), #202020;
    color: #e9e9e9;
    font-size: 11px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.calc-buff-row .buff-sel,
.calc-char-select {
    appearance: none;
    background-image:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.08)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23fbc02d' d='M0 0h8L4 5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 0 0, right 14px center !important;
    background-size: 100% 100%, 8px 5px !important;
}

.calc-buff-row.auto-generated .buff-sel {
    border-color: rgba(251,192,45,0.42);
    background:
        linear-gradient(90deg, rgba(251,192,45,0.10), transparent 58%),
        #1f1f1f;
    color: #ffe28a;
}

.calc-buff-row .buff-name {
    padding-inline: 8px;
}

.calc-buff-row .buff-val {
    width: 125px !important;
    min-width: 125px;
    height: 34px;
    box-sizing: border-box;
    flex: 0 0 125px;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid rgba(251,192,45,0.55);
    background: rgba(0,0,0,0.34);
    color: var(--p5-yellow);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.calc-buff-row:has(.calc-auto-unused-btn) .buff-val {
    width: 72px !important;
    min-width: 72px;
    flex-basis: 72px;
}

.calc-buff-row .buff-sel,
.calc-buff-row .buff-name,
.calc-buff-row .buff-val,
.calc-auto-unused-btn,
.calc-buff-remove {
    align-self: stretch;
}

.calc-buff-row-def .buff-val {
    border-color: rgba(211,47,47,0.52);
    color: #ffb5b5;
}

.calc-buff-row-pen .buff-val {
    border-color: rgba(38,198,218,0.52);
    color: #9ff5ff;
}

.calc-button-row {
    margin-top: 7px;
}

.calc-add-btn,
.calc-wide-add {
    border-radius: 8px;
    border-color: rgba(255,255,255,0.16);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.12)),
        #2b2b2b;
    color: #efefef;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 3px 3px 0 rgba(0,0,0,0.20);
}

.calc-add-btn::before,
.calc-wide-add::before {
    content: "+";
    margin-right: 6px;
    color: var(--p5-red);
    font-weight: 900;
}

.calc-wide-add {
    width: 100%;
    margin-top: 8px;
}

.calc-del-btn {
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(211,47,47,0.20), rgba(0,0,0,0.18)), #3a1111;
    border-color: rgba(255,105,105,0.26);
    color: #ffcaca;
}

.calc-buff-row .buff-val::-webkit-outer-spin-button,
.calc-buff-row .buff-val::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-buff-row .buff-val[type="number"] {
    -moz-appearance: textfield;
}

.calc-auto-unused-btn {
    flex: 0 0 auto;
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 34px;
    min-height: 34px;
    box-sizing: border-box;
    padding: 0 6px;
    border: 1px solid rgba(251,192,45,0.68);
    border-radius: 7px;
    background: rgba(251,192,45,0.08);
    color: #fbc02d;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.calc-buff-row.is-unused .calc-auto-unused-btn {
    border-color: rgba(160,160,160,0.72);
    background: rgba(255,255,255,0.06);
    color: #d0d0d0;
}

@media screen and (max-width: 1100px) {
    .console {
        border-radius: 0;
    }

    .top-bar,
    .console-bottom-actions,
    #team-list,
    #mask-list,
    #timeline-editors,
    #pen-custom-container,
    #crit-custom-container {
        border-radius: 14px;
    }
}

.console-leyuan-qr-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(251,192,45,0.22);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(211,47,47,0.12), transparent 56%),
        #171717;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.console-leyuan-qr-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.console-leyuan-qr-title {
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.console-leyuan-qr-subtitle {
    color: #cfcfcf;
    font-size: 11px;
    font-weight: 700;
}

.console-leyuan-qr-notice {
    grid-column: 1 / -1;
    display: grid;
    gap: 7px;
    margin-top: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.72);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.75;
}

.console-leyuan-qr-notice p {
    margin: 0;
}

.console-leyuan-qr-highlight {
    color: #ff5f98;
    font-weight: 900;
    text-shadow: 0 0 12px rgba(255, 58, 120, 0.42);
}

.console-leyuan-qr-img {
    width: 108px;
    height: 108px;
    display: block;
    justify-self: end;
    background: #fff;
    border: 3px solid #fff;
    border-radius: 8px;
    object-fit: cover;
}

.timeline-legal-panel {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(211, 47, 47, 0.24);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(211, 47, 47, 0.10), rgba(0, 0, 0, 0.12)), #1a1a1a;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
    color: #e7e7e7;
}

.timeline-legal-title {
    margin: 0;
    font-size: 13px;
    letter-spacing: 2px;
    color: #ffd6dc;
}

.timeline-legal-panel p {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.9;
    color: #cfcfcf;
}

.timeline-legal-panel a {
    color: #ffd76c;
    font-weight: 700;
    text-decoration: none;
}

.timeline-legal-panel a:hover {
    text-decoration: underline;
}

/* === styles-preview-polish.css === */
/* Preview poster visual polish */
/* ========================================= */
/* Preview polish pass: strategy poster skin */
/* ========================================= */
#capture-target.canvas {
    background-color: #111214;
    background-image:
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,0.025) 1px, transparent 1px),
        repeating-linear-gradient(135deg, transparent 0 12px, rgba(211,47,47,0.035) 12px 24px),
        radial-gradient(circle at 8% 4%, rgba(211,47,47,0.20), transparent 28%),
        linear-gradient(180deg, #18191b 0%, #0f1012 100%);
    background-size: 34px 34px, 34px 34px, auto, auto, auto;
    box-shadow:
        0 20px 52px rgba(0,0,0,0.34),
        inset 0 0 0 1px rgba(255,255,255,0.05);
    overflow: hidden;
}

#capture-target.canvas::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0 58%, rgba(211,47,47,0.18) 58% 61%, transparent 61%),
        radial-gradient(circle at 94% 8%, rgba(251,192,45,0.12), transparent 22%);
    opacity: 0.78;
}

#capture-target > * {
    position: relative;
    z-index: 1;
}

#capture-target .header-area {
    padding-top: 32px;
    margin-bottom: 42px !important;
}

#capture-target .ransom-title-box {
    width: var(--preview-content-width);
    position: relative;
    overflow: visible;
    justify-content: flex-start;
    align-items: center;
    gap: 4px 5px;
    padding: 18px 220px 18px 24px;
    margin-bottom: 0;
    box-sizing: border-box;
    border: 3px solid #050505;
    background:
        linear-gradient(180deg, #f8f8f6 0%, #e5e5df 100%);
    box-shadow:
        10px 10px 0 rgba(0,0,0,0.72),
        inset 0 -7px 0 rgba(0,0,0,0.12);
}

#capture-target .ransom-title-box::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 0;
    width: 12px;
    background: var(--p5-red);
    box-shadow: 1px 0 0 rgba(255,255,255,0.10);
}

#capture-target .ransom-title-box::after {
    content: none;
}

#capture-target .ransom-char {
    position: relative;
    z-index: 2;
    min-width: 36px;
    padding: 5px 9px;
    font-size: 32px;
    border-width: 2px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.78);
}

#capture-target .title-code-logo {
    position: absolute;
    right: 2px;
    top: 50%;
    z-index: 3;
    display: block;
    width: 232px;
    max-height: 126px;
    height: auto;
    object-fit: contain;
    transform: translateY(-50%);
    filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.3));
}

#capture-target .layout-block {
    margin-bottom: 18px;
}

#capture-target #card-container-wrapper {
    margin-top: 2px;
    margin-bottom: 26px;
}

#capture-target .team-section {
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 22px;
}

#capture-target .team-section.reserves {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 2px dashed rgba(255,255,255,0.24);
}

#capture-target .card {
    --card-accent: var(--p5-red);
    width: 190px;
    height: 270px;
    isolation: isolate;
    overflow: hidden;
    transform: none;
    border: 3px solid #050505 !important;
    background: #0d0e10;
    box-shadow:
        7px 8px 0 var(--card-accent),
        14px 16px 0 rgba(0,0,0,0.52),
        0 18px 32px rgba(0,0,0,0.38) !important;
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease;
}

#capture-target .card:hover {
    z-index: 30;
    transform: translateY(-7px);
    filter: brightness(1.05) saturate(1.06);
}

#capture-target .card:active {
    transform: translateY(-3px) scale(0.995);
}

#capture-target .card.wonder {
    --card-accent: var(--p5-red);
}

#capture-target .card.navi {
    --card-accent: var(--p5-blue);
}

#capture-target .card.max-rank-frame:not(.wonder) {
    border-color: transparent !important;
    border-image: linear-gradient(
        135deg,
        #fff7ff 0%,
        #ff9cd8 13%,
        #a8efff 28%,
        #fff8b8 43%,
        #8fffe0 58%,
        #bba8ff 76%,
        #ffffff 100%
    ) 1 !important;
}

#capture-target .card::before,
#capture-target .card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

#capture-target .card::before {
    z-index: 1;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.14), transparent 24%, transparent 72%, rgba(0,0,0,0.18)),
        linear-gradient(90deg, rgba(255,255,255,0.06), transparent 24%, transparent 78%, rgba(0,0,0,0.16));
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.13);
}

#capture-target .card::after {
    content: none;
}

#capture-target .card-img-wrap {
    position: relative;
    z-index: 0;
    transform: none;
    background:
        linear-gradient(180deg, #26282b, #0f1012);
}

#capture-target .card-img {
    filter: saturate(1.08) contrast(1.05);
}

#capture-target .card-name {
    top: 10px;
    left: -6px;
    z-index: 4;
    max-width: calc(100% - 18px);
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 14px 6px;
    border: none !important;
    border-radius: 0 2px 2px 0;
    background: var(--card-accent) !important;
    color: #fff;
    font-size: 16px;
    line-height: 1.08;
    letter-spacing: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.88);
    box-shadow:
        5px 5px 0 rgba(0,0,0,0.74),
        0 0 14px rgba(0,0,0,0.36);
}

#capture-target .card:not(.reserve-summary-card) .card-name {
    --nameplate-height: 34px;
    top: 9px;
    left: 5px;
    right: 5px;
    align-items: center;
    width: auto;
    max-width: none;
    min-height: var(--nameplate-height);
    box-sizing: border-box;
    border: 1px solid transparent !important;
    border-radius: 11px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.09), transparent 34%, rgba(255,255,255,0.05)) padding-box,
        linear-gradient(180deg, rgba(255,255,255,0.08), transparent 54%, rgba(0,0,0,0.22)) padding-box,
        linear-gradient(0deg, color-mix(in srgb, var(--card-accent) 14%, rgba(4,5,6,0.78)), color-mix(in srgb, var(--card-accent) 14%, rgba(4,5,6,0.78))) padding-box,
        linear-gradient(135deg, rgba(255,255,255,0.92), color-mix(in srgb, var(--card-accent) 92%, #fff) 32%, color-mix(in srgb, var(--card-accent) 78%, #05070c) 72%, rgba(255,255,255,0.60)) border-box !important;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.08),
        inset 0 -10px 18px rgba(0,0,0,0.28),
        0 5px 0 rgba(0,0,0,0.58),
        0 0 18px color-mix(in srgb, var(--card-accent) 52%, transparent);
    backdrop-filter: blur(7px) saturate(1.18);
}

#capture-target .card:not(.wonder):not(.reserve-summary-card) .card-name {
    --nameplate-level-slot: 39px;
    display: grid;
    grid-template-columns: var(--nameplate-level-slot) minmax(0, 1fr);
    column-gap: 5px;
    padding: 0 10px 0 7px;
}

#capture-target .card.has-card-name-attr:not(.wonder):not(.reserve-summary-card) .card-name {
    grid-template-columns: var(--nameplate-level-slot) minmax(0, 1fr) 20px;
    padding-right: 5px;
}

#capture-target .card.wonder .card-name {
    display: flex;
    justify-content: flex-start;
    padding: 0 12px 0 16px;
}

#capture-target .card:not(.wonder):not(.reserve-summary-card) .card-name::before {
    content: none;
    display: none;
}

#capture-target .card-level-badge {
    display: inline-flex;
    justify-self: center;
    align-items: center;
    justify-content: center;
    height: 21px;
    min-width: 28px;
    padding: 0 5px;
    box-sizing: border-box;
    color: rgba(255,255,255,0.92);
    font-size: 9.5px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    text-shadow: 0 2px 3px rgba(0,0,0,0.92);
    border: 1px solid color-mix(in srgb, var(--card-accent) 68%, rgba(255,255,255,0.58));
    border-radius: 8px;
    background:
        radial-gradient(circle at 35% 18%, rgba(255,255,255,0.34), transparent 32%),
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(0,0,0,0.28)),
        color-mix(in srgb, var(--card-accent) 22%, rgba(0,0,0,0.48));
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.24),
        0 3px 6px rgba(0,0,0,0.40),
        0 0 8px color-mix(in srgb, var(--card-accent) 42%, transparent);
}

#capture-target .card-level-badge[data-level-value="100"] {
    min-width: 36px;
    padding-inline: 5px;
    font-size: 8.5px;
}

#capture-target .card:not(.wonder):not(.reserve-summary-card) .card-name::after {
    content: "";
    display: none;
}

#capture-target .card-name-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255,255,255,0.98);
    font-family: "Microsoft YaHei UI", "TimelineHan", "Microsoft YaHei", sans-serif;
    font-size: 12.8px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-align: left;
    align-self: center;
    text-shadow: none;
    transform: none;
}

#capture-target .card-name-attr-icon {
    justify-self: end;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    padding: 1px;
    object-fit: contain;
    border: 1px solid color-mix(in srgb, var(--card-accent) 66%, rgba(255,255,255,0.58));
    border-radius: 7px;
    background:
        radial-gradient(circle at 34% 22%, rgba(255,255,255,0.34), transparent 34%),
        rgba(4,5,8,0.38);
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.22),
        0 2px 5px rgba(0,0,0,0.46),
        0 0 8px color-mix(in srgb, var(--card-accent) 36%, transparent);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.72));
}

#capture-target .reserve-summary-card .card-name-attr-icon {
    display: none !important;
}

#capture-target .card-info {
    left: 6px;
    right: 6px;
    bottom: 7px;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px;
    align-items: center;
    gap: 4px;
    min-height: 42px;
    padding: 5px 6px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.16);
    border-top: 2px solid var(--card-accent);
    border-radius: 3px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.10), transparent 34%, rgba(255,255,255,0.04)),
        linear-gradient(180deg, rgba(255,255,255,0.08), transparent 58%),
        rgba(4,5,6,0.82);
    box-shadow:
        0 7px 15px rgba(0,0,0,0.34),
        inset 0 0 0 1px rgba(0,0,0,0.34);
    overflow: hidden;
}

#capture-target .card-info-bottom {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 25px 46px;
    align-items: center;
    gap: 4px;
    min-width: 0;
    min-height: 30px;
}

#capture-target .card-meta-icons {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 25px;
    height: 30px;
    box-sizing: border-box;
    padding: 2px 1px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 3px;
    background:
        radial-gradient(circle at 72% 68%, rgba(255,255,255,0.16), transparent 34%),
        rgba(0,0,0,0.36);
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.26),
        0 3px 7px rgba(0,0,0,0.18);
}

#capture-target .card-meta-icon {
    width: 21px;
    height: 24px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.74));
}

#capture-target .card-attr-icons {
    display: none;
}

#capture-target .card-attr-icon {
    width: 15px;
    height: 15px;
}

#capture-target .insp-box {
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    min-width: 0;
    height: 30px;
}

#capture-target .insp-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    height: 28px;
    padding: 0 4px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 3px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), transparent 62%),
        rgba(255,255,255,0.10) !important;
    color: #fff !important;
    font-size: 11px;
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 3px rgba(0,0,0,0.86);
    box-shadow: none;
}

#capture-target .rank-weapon-box {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 46px;
    height: 30px;
    box-sizing: border-box;
    padding: 2px;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin-left: 0;
    margin-top: 0;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 3px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10), transparent 56%),
        rgba(0,0,0,0.36);
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.24),
        0 3px 7px rgba(0,0,0,0.18);
    backdrop-filter: none;
}

#capture-target .icon-tag {
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.76));
}

#capture-target .rank-icon,
#capture-target .mod-icon {
    width: 21px;
    height: 22px;
}

#capture-target .team-section.reserves:empty,
#capture-target .team-section.reserves.is-empty {
    display: none;
}

#capture-target .navi-reserve-stack {
    display: contents;
}

#capture-target .navi-reserve-stack.has-reserve {
    --navi-stack-accent: var(--p5-blue);
    width: 196px;
    height: 276px;
    flex: 0 0 196px;
    display: grid;
    grid-template-rows: 196px 72px;
    gap: 8px;
    margin-left: 40px;
    margin-bottom: 15px;
    position: relative;
    isolation: isolate;
    overflow: visible;
    box-shadow:
        7px 8px 0 var(--navi-stack-accent),
        14px 16px 0 rgba(0,0,0,0.52),
        0 18px 32px rgba(0,0,0,0.38);
    transition: transform 0.18s ease, filter 0.18s ease;
}

#capture-target .navi-reserve-stack.has-reserve:hover {
    z-index: 30;
    transform: translateY(-7px);
    filter: brightness(1.05) saturate(1.06);
}

#capture-target .navi-reserve-stack.has-reserve .card:hover,
#capture-target .navi-reserve-stack.has-reserve .card:active {
    transform: none;
    filter: none;
}

#capture-target .navi-reserve-stack.has-reserve .card.navi {
    width: 190px;
    height: 190px;
    margin-left: 0;
    margin-bottom: 0;
    box-shadow: none !important;
}

#capture-target .navi-reserve-stack.has-reserve .card.navi .card-info {
    bottom: 6px;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card {
    width: 196px;
    height: 72px;
    margin: 0;
    padding: 6px 8px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-rows: 24px 28px;
    column-gap: 8px;
    row-gap: 4px;
    align-items: stretch;
    transform: none;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.18) !important;
    border-image: none !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.10), transparent 38%),
        linear-gradient(180deg, rgba(31,33,37,0.96), rgba(9,10,12,0.96));
    box-shadow: none !important;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card::before {
    background: linear-gradient(90deg, rgba(255,255,255,0.08), transparent 38%, rgba(0,0,0,0.16));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card::after {
    content: none;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .card-img-wrap {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 56px;
    height: 56px;
    align-self: center;
    position: relative;
    z-index: 2;
    transform: none;
    box-sizing: border-box;
    border: 2px solid var(--card-accent);
    border-radius: 4px;
    background:
        radial-gradient(circle at 50% 18%, rgba(255,255,255,0.14), transparent 42%),
        #15171b;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.20),
        0 3px 8px rgba(0,0,0,0.32);
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card.max-rank-frame .card-img-wrap {
    padding: 2px;
    border: 0 !important;
    background:
        linear-gradient(
        135deg,
        #fff7ff 0%,
        #ff9cd8 13%,
        #a8efff 28%,
        #fff8b8 43%,
        #8fffe0 58%,
        #bba8ff 76%,
        #ffffff 100%
        );
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-sizing: border-box;
    border-radius: 2px;
    background: #15171b;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .ph-text {
    font-size: 22px;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .card-name {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    z-index: 2;
    top: auto;
    left: auto;
    display: flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    height: 24px;
    padding: 0 7px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.16) !important;
    border-radius: 3px;
    background:
        linear-gradient(110deg, transparent 0%, transparent 38%, rgba(255,255,255,0.22) 46%, transparent 55%, transparent 100%),
        linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.05) 42%, rgba(0,0,0,0.18) 100%),
        rgba(10,12,16,0.78) !important;
    box-shadow:
        0 6px 12px rgba(0,0,0,0.34),
        inset 0 1px 0 rgba(255,255,255,0.26),
        inset 0 -1px 0 rgba(0,0,0,0.42),
        inset 0 0 0 1px rgba(255,255,255,0.12);
    justify-content: space-between;
    gap: 6px;
    color: #fff !important;
    font-size: 12px;
    line-height: 1;
    text-shadow:
        0 1px 2px rgba(0,0,0,0.90),
        0 0 8px rgba(0,0,0,0.56);
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .card-name-text {
    flex: 0 1 auto;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    font-size: 9.8px;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .reserve-summary-attr-icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-left: auto;
    object-fit: contain;
    filter:
        drop-shadow(0 1px 2px rgba(0,0,0,0.86))
        drop-shadow(0 0 4px rgba(255,255,255,0.18));
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .reserve-summary-level-badge {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    transform: none;
    width: 100%;
    height: 11px;
    padding: 0 2px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.34) 38%,
        rgba(0,0,0,0.82) 100%
    );
    color: rgba(255,255,255,0.82);
    font-size: 8.2px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.94);
    box-shadow: 0 -1px 3px rgba(0,0,0,0.20);
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .reserve-summary-level-badge[data-level-value="100"] {
    min-width: 0;
    font-size: 7.7px;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .card-info {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    z-index: 2;
    left: auto;
    right: auto;
    bottom: auto;
    min-height: 0;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    align-items: stretch;
    overflow: hidden;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .insp-box {
    height: 28px;
    gap: 3px;
    align-items: stretch;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .insp-tag {
    height: 28px;
    padding: 0 4px;
    font-size: 9px;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .card-info-bottom {
    display: block;
    min-height: 0;
    height: 28px;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .card-meta-icons,
#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .card-identity-band,
#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .twin-badge-box {
    display: none !important;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .rank-weapon-box {
    width: 50px;
    height: 28px;
    padding: 2px;
    gap: 2px;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .rank-icon,
#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .mod-icon {
    width: 21px;
    height: 22px;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .card-info {
    display: none !important;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .reserve-summary-details {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    z-index: 2;
    display: flex;
    width: 112px;
    height: 28px;
    gap: 4px;
    align-items: stretch;
    overflow: hidden;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .reserve-summary-insp {
    display: flex;
    flex: 0 0 58px;
    width: 58px;
    min-width: 0;
    height: 28px;
    gap: 3px;
    align-items: stretch;
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .reserve-summary-insp-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 27.5px;
    width: 27.5px;
    min-width: 0;
    height: 28px;
    padding: 0 4px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 3px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), transparent 62%),
        rgba(255,255,255,0.10);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 3px rgba(0,0,0,0.86);
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .reserve-summary-icons {
    display: flex;
    flex: 0 0 50px;
    width: 50px;
    height: 28px;
    box-sizing: border-box;
    padding: 2px;
    justify-content: center;
    align-items: center;
    gap: 2px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 3px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10), transparent 56%),
        rgba(0,0,0,0.36);
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.24),
        0 3px 7px rgba(0,0,0,0.18);
}

#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .reserve-summary-icons .rank-icon,
#capture-target .navi-reserve-stack.has-reserve .reserve-summary-card .reserve-summary-icons .mod-icon {
    width: 21px;
    height: 22px;
    flex: 0 0 auto;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.76));
}

#capture-target .twin-badge-box {
    top: 13px;
    right: 12px;
    z-index: 5;
    padding: 2px 3px;
    border-color: rgba(255,255,255,0.28);
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.24),
        0 3px 6px rgba(0,0,0,0.36);
}

#capture-target .twin-skill-icon {
    width: 22px;
    height: 22px;
}

#target-intel-wrapper {
    gap: 12px !important;
    margin-bottom: 20px !important;
}

#capture-target .target-intel-ribbon {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.08), transparent 38%),
        linear-gradient(180deg, #242527 0%, #111214 100%);
    box-shadow: 9px 9px 0 rgba(0,0,0,0.55);
}

#capture-target .intel-tag {
    border-radius: 6px;
}

#capture-target .radar-box {
    border-radius: 4px;
}

#capture-target .target-label {
    letter-spacing: 1.4px;
}

#capture-target .target-name {
    text-shadow: 3px 3px 0 #000;
}

#capture-target .calc-board {
    border: 2px solid #050505;
    background: #fff;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
}

#capture-target .calc-row {
    min-height: 64px;
    border-bottom: 2px solid #1b1b1b;
}

#capture-target .calc-head {
    position: relative;
    overflow: hidden;
    padding-left: 12px;
    background: #050505;
    color: #fff;
    font-size: 12px;
    letter-spacing: 0 !important;
    text-shadow: 2px 2px 0 #000;
}

#capture-target .calc-head::before {
    content: none;
}

#capture-target .calc-body {
    background: #fff;
}

#capture-target .res-val {
    text-shadow: none;
    -webkit-text-stroke: 0;
    letter-spacing: 0 !important;
    filter: none;
}

#capture-target .res-val[style*="--p5-yellow"] {
    color: #eea900 !important;
    -webkit-text-stroke: 0;
}

#capture-target .timeline-wrap {
    border: 3px solid #050505;
    background:
        linear-gradient(180deg, #f5f5f0 0%, #e8e8e2 100%);
    box-shadow:
        10px 10px 0 rgba(0,0,0,0.62),
        inset 0 0 0 1px rgba(255,255,255,0.7);
}

#capture-target #timeline-table {
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    table-layout: fixed;
}

#capture-target #timeline-table thead th:first-child,
#capture-target td.cell-turn {
    width: 58px !important;
}

#capture-target #timeline-table thead th:last-child,
#capture-target td.note-text {
    width: var(--preview-note-width) !important;
}

#capture-target #timeline-table thead th {
    position: relative;
    overflow: hidden;
    padding: 11px 7px;
    border-right: 1px solid rgba(255,255,255,0.16);
    border-bottom: 4px solid var(--p5-red);
    background: #050505;
    color: #fff;
    font-size: 13px;
    font-style: normal;
    letter-spacing: 0.3px;
    text-align: center;
    text-shadow: 2px 2px 0 #000;
}

#capture-target #timeline-table .timeline-header-name {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-style: normal;
    text-align: center;
}

#capture-target #timeline-table thead th::before {
    content: none;
}

#capture-target #timeline-table thead th::after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 10px;
    right: 10px;
    bottom: -5px;
    height: 2px;
    background: var(--p5-yellow);
}

#capture-target #timeline-table .th-wonder {
    color: #fff;
    background: #050505;
}

#capture-target #timeline-table .th-wonder::before {
    content: none;
}

#capture-target #timeline-table tbody tr {
    border-bottom: 0;
}

#capture-target #timeline-table tbody tr:nth-child(even) {
    background: transparent;
}

#capture-target #timeline-table td {
    padding: 7px 6px !important;
    border-right: 1px solid rgba(0,0,0,0.14);
    border-bottom: 1px solid rgba(0,0,0,0.16);
    background: rgba(255,255,255,0.82);
    color: #121212;
}

#capture-target #timeline-table .tl-turn-row.is-post-unlock-phase > td:not(.cell-turn),
#capture-target #timeline-table .tl-buff-row.is-post-unlock-phase > td {
    background:
        linear-gradient(180deg, rgba(255,241,241,0.94), rgba(255,255,255,0.84));
}

#capture-target #timeline-table .tl-turn-row.is-post-unlock-phase > td.note-text {
    background:
        linear-gradient(180deg, rgba(255,222,222,0.54), rgba(255,255,255,0.84));
    border-left-color: rgba(255,36,54,0.42);
}

#capture-target #timeline-table .tl-turn-row.is-post-unlock-phase > td.cell-turn {
    background:
        linear-gradient(180deg, #fff2f2 0%, #fffafa 100%);
    color: #7e1010;
    border-left: 3px solid #ff2436;
    box-shadow:
        inset 0 0 0 1px rgba(255,36,54,0.22),
        inset 7px 0 0 rgba(255,36,54,0.12);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.86);
}

#capture-target #timeline-table td[data-turn-id] {
    cursor: pointer;
    transition: background 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}

#capture-target #timeline-table td[data-turn-id].is-turn-hover {
    background:
        linear-gradient(180deg, rgba(255,248,203,0.96), rgba(255,255,255,0.88));
    box-shadow: inset 0 0 0 2px rgba(251,192,45,0.42);
}

#capture-target #timeline-table td[data-unit-id].is-actor-hover {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,241,241,0.90));
    box-shadow:
        inset 0 0 0 2px rgba(255,54,30,0.58),
        0 0 16px rgba(255,54,30,0.16);
}

#capture-target #timeline-table td:not(.cell-turn):not(.note-text):empty {
    background:
        repeating-linear-gradient(135deg, rgba(0,0,0,0.035) 0 7px, transparent 7px 15px),
        rgba(255,255,255,0.42);
}

#capture-target #timeline-table .tl-turn-row.is-post-unlock-phase > td:not(.cell-turn):not(.note-text):empty {
    background:
        repeating-linear-gradient(135deg, rgba(255,36,54,0.055) 0 7px, transparent 7px 15px),
        linear-gradient(180deg, rgba(255,241,241,0.88), rgba(255,255,255,0.76));
}

#capture-target #timeline-table td[data-turn-id].is-turn-hover:empty {
    background:
        linear-gradient(180deg, rgba(255,248,203,0.96), rgba(255,255,255,0.88));
}

#capture-target #timeline-table td[data-unit-id].is-actor-hover:empty {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,241,241,0.90));
}

#capture-target #timeline-table .tl-unlock-warning-row {
    height: 12px;
}

#capture-target #timeline-table td.tl-unlock-warning-cell {
    height: 12px;
    padding: 0 !important;
    border-right: 0;
    border-bottom: 1px solid #050505;
    background: #050505;
    cursor: pointer;
}

#capture-target #timeline-table td.tl-unlock-warning-cell.is-turn-hover {
    background: #050505;
    box-shadow: inset 0 0 0 1px rgba(251,192,45,0.40);
}

#capture-target .tl-unlock-warning-line {
    height: 11px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.64), rgba(255,42,58,0.26), rgba(0,0,0,0.64)),
        repeating-linear-gradient(135deg, #050505 0 13px, #ff2436 13px 25px, #050505 25px 38px);
    box-shadow:
        0 0 9px rgba(255,36,54,0.36),
        inset 0 1px 0 rgba(255,255,255,0.24),
        inset 0 -1px 0 rgba(0,0,0,0.72);
}

#capture-target td.cell-turn {
    width: 58px;
    border-right: 4px solid #050505;
    background:
        linear-gradient(90deg, var(--p5-red) 0 7px, transparent 7px),
        #050505;
    color: #fff;
    font-size: 26px;
    letter-spacing: 0.5px;
    text-shadow: none;
}

#capture-target #timeline-table td.cell-turn.is-turn-hover,
#capture-target #timeline-table.is-locate-guide td.cell-turn {
    background:
        linear-gradient(90deg, rgba(211,47,47,0.92) 0 7px, transparent 7px),
        linear-gradient(180deg, rgba(255,248,203,0.96), rgba(255,255,255,0.88));
    box-shadow: inset 0 0 0 2px rgba(251,192,45,0.42);
    color: #121212;
}

#capture-target td.note-text {
    background:
        linear-gradient(180deg, rgba(251,192,45,0.20), rgba(255,255,255,0.82));
    color: #191919;
    border-left: 2px solid rgba(211,47,47,0.40);
}

#capture-target .action-chip {
    position: relative;
    min-height: 24px;
    margin-bottom: 4px;
    padding: 3px 5px 3px 8px;
    border: 1px solid rgba(0,0,0,0.16);
    border-left: 3px solid #555;
    border-radius: 3px;
    background:
        linear-gradient(180deg, #ffffff 0%, #ecece8 100%);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.13);
    color: #171717;
    font-size: 9px;
    line-height: 1.3;
    gap: 5px;
    overflow: visible;
    letter-spacing: 0;
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "TimelineHan", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

#capture-target .action-chip.type-skill { border-left-color: #f57c00; }
#capture-target .action-chip.type-hl { border-left-color: #d735d9; }
#capture-target .action-chip.type-switch { border-left-color: #1976d2; }
#capture-target .action-chip.type-navi { border-left-color: #00a895; }
#capture-target .action-chip.type-p3 { border-left-color: #7b3fc6; }

#capture-target .action-chip.type-hl {
    min-height: 24px;
    overflow: visible;
    border-color: rgba(211,47,47,0.20);
    border-left-width: 3px;
    border-left-color: var(--hl-attr-color, #d735d9);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.90) 0%, rgba(238,232,239,0.86) 100%);
}

#capture-target .action-chip.type-hl::before {
    content: none;
    position: absolute;
    inset: -12px -18px;
    z-index: 0;
    pointer-events: none;
    background-image: var(--weak-chip-bg);
    background-size: cover;
    background-position: center;
    opacity: 0.34;
    filter: saturate(1.12) contrast(1.06);
}

#capture-target .action-chip.type-hl .chip-weak-bg {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.34;
    filter: saturate(1.12) contrast(1.06);
    pointer-events: none;
    clip-path: inset(0 round 3px);
}

#capture-target .action-chip.type-hl::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.58), rgba(255,246,255,0.24));
    border-radius: 3px;
}

#capture-target .action-chip.type-hl .chip-main,
#capture-target .action-chip.type-hl .chip-target {
    position: relative;
    z-index: 1;
}

#capture-target .chip-main {
    flex: 0 1 auto;
    min-width: max-content;
    overflow: visible;
    gap: 3px;
}

#capture-target .chip-target {
    flex: 0 0 auto;
    gap: 2px;
    min-width: max-content;
}

#capture-target .action-icon {
    width: 13px;
    height: 13px;
    margin-right: 0;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,0.18));
}

#capture-target .chip-text {
    font-weight: 800;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

#capture-target .chip-arrow {
    color: var(--p5-red);
    font-weight: 800;
    width: 11px;
    min-width: 11px;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

#capture-target .target-span {
    min-width: 38px;
    max-width: none;
    min-height: 16px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #111;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

#capture-target .tl-buff-row {
    background: #101112 !important;
}

#capture-target .tl-buff-cell {
    padding: 5px 5px !important;
    border-right: 1px solid rgba(255,255,255,0.08) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.18)),
        #101112 !important;
}

#capture-target .tl-status-strip {
    min-height: 30px;
    flex-wrap: nowrap;
    gap: 3px;
    padding: 3px 4px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 3px;
    background:
        linear-gradient(90deg, rgba(211,47,47,0.16), transparent 32%),
        #17191b;
}

#capture-target .tl-status-chip {
    flex: 0 1 auto;
    min-width: 0;
    height: 22px;
    gap: 2px;
    padding: 0 4px;
    border-radius: 3px;
    background: #070707;
    box-shadow:
        inset 0 -2px 0 rgba(255,255,255,0.06),
        1px 1px 0 rgba(0,0,0,0.48);
}

#capture-target .tl-status-chip.sp,
#capture-target .tl-status-chip.cd,
#capture-target .tl-status-chip.hl {
    min-width: 32px;
}

#capture-target .tl-status-chip b {
    color: #d0d0d0;
    font-size: 8px;
}

#capture-target .tl-status-chip strong {
    font-size: 11px;
}

#capture-target .tl-status-chip.skills {
    min-width: 0;
    gap: 2px;
    padding: 0 3px;
}

#capture-target .tl-status-chip.skills i {
    min-width: 12px;
    height: 13px;
    padding: 0 1px;
    font-size: 8px;
}

#capture-target .note-box {
    border: 3px solid #050505;
    border-left: 10px solid var(--p5-red);
    background:
        linear-gradient(90deg, rgba(211,47,47,0.12) 0 22%, transparent 22%),
        #f4f4ef;
    color: #151515;
    box-shadow: 9px 9px 0 rgba(0,0,0,0.52);
}

#capture-target .note-box::before {
    top: -14px;
    left: 16px;
    background: #050505;
    color: var(--p5-yellow);
    letter-spacing: 1px;
}

#capture-target .footer {
    width: var(--preview-content-width);
    margin-top: 4px;
    margin-bottom: 18px;
    min-height: 96px;
    padding: 18px 108px 18px 54px;
    box-sizing: border-box;
    border-top: 2px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.72);
}

#capture-target .footer-brand-mark {
    right: 22px;
    width: 82px;
    height: 82px;
    border-radius: 18px;
}

#capture-target .footer-brand-rose {
    width: 62px;
    height: 62px;
}

/* === styles-status-row.css === */
/* Timeline status row */
/* Softer timeline status row: keep the data, fold it into the paper-like preview. */
.tl-buff-row {
    background-color: rgba(238, 236, 226, 0.72) !important;
}

.tl-buff-cell {
    color: #5c5c54;
    border-right-color: rgba(0,0,0,0.12) !important;
}

.tl-status-strip {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 5px;
    min-height: 24px;
    padding: 2px 3px;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.58), rgba(232,229,216,0.54));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.48);
}

.tl-status-chip {
    flex: 1 1 0;
    min-width: 48px;
    max-width: 66px;
    box-sizing: border-box;
    height: 19px;
    padding: 0 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.46);
    border-color: rgba(0,0,0,0.12);
    color: #202020;
}

.tl-status-chip b {
    color: #5e5e5a;
}

.tl-status-chip strong {
    color: #171717;
    font-size: 11px;
}

.tl-status-chip.hl {
    background: rgba(243,89,249,0.10);
    border-color: rgba(142,52,150,0.22);
    box-shadow: none;
}

.tl-status-chip.hl strong {
    color: #9e2ca5;
}

.tl-status-chip.hl.full strong {
    color: #bf37c9;
    text-shadow: none;
}

.tl-status-chip.cd {
    background: rgba(255,54,30,0.08);
    border-color: rgba(177,57,42,0.20);
    box-shadow: none;
}

.tl-status-chip.cd strong {
    color: #af3d31;
}

.tl-status-chip.cd.ready {
    background: rgba(26,188,156,0.13);
    border-color: rgba(26,128,113,0.24);
    box-shadow: none;
}

.tl-status-chip.cd.ready strong,
.tl-status-chip.sp.ready strong {
    color: #117c70;
}

.tl-status-chip.sp {
    background: rgba(251,192,45,0.14);
    border-color: rgba(162,119,18,0.22);
    box-shadow: none;
}

.tl-status-chip.sp strong,
.tl-status-chip.sp.warn strong {
    color: #8b6810;
}

.tl-status-chip.sp.bad strong {
    color: #af3d31;
}

.tl-status-chip.skills {
    min-width: 48px;
    max-width: 66px;
    padding: 0 5px;
    justify-content: center;
    border-color: rgba(0,0,0,0.12);
}

.tl-status-chip.skills i {
    background: rgba(0,0,0,0.07);
    color: #555;
    min-width: 13px;
    height: 13px;
    padding: 0 1px;
}

.tl-status-chip.skills i.ready {
    background: rgba(251,192,45,0.46);
    color: #262018;
}

#capture-target .tl-buff-row {
    background: transparent !important;
}

#capture-target .tl-buff-cell {
    padding: 4px 5px !important;
    border-right: 1px solid rgba(0,0,0,0.12) !important;
    border-bottom: 1px solid rgba(0,0,0,0.12) !important;
    background:
        linear-gradient(180deg, rgba(248,247,240,0.82), rgba(232,229,216,0.78)) !important;
}

#capture-target .tl-status-strip {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    min-height: 26px;
    gap: 3px;
    padding: 3px 4px;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 3px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.50), rgba(232,229,216,0.42));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.42);
}

#capture-target .tl-status-chip {
    flex: 1 1 0;
    min-width: 46px;
    max-width: 62px;
    box-sizing: border-box;
    height: 18px;
    padding: 0 4px;
    background: rgba(255,255,255,0.56);
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    color: #202020;
}

#capture-target .tl-status-chip b {
    color: #5a5a55;
}

#capture-target .tl-status-chip strong {
    color: #171717;
    font-size: 10px;
}

#capture-target .tl-status-chip.hl {
    background: rgba(243,89,249,0.10);
    border-color: rgba(142,52,150,0.22);
}

#capture-target .tl-status-chip.hl strong {
    color: #9e2ca5;
}

#capture-target .tl-status-chip.hl.full strong {
    color: #bf37c9;
    text-shadow: none;
}

#capture-target .tl-status-chip.cd {
    background: rgba(255,54,30,0.08);
    border-color: rgba(177,57,42,0.20);
}

#capture-target .tl-status-chip.cd strong {
    color: #af3d31;
}

#capture-target .tl-status-chip.cd.ready {
    background: rgba(26,188,156,0.13);
    border-color: rgba(26,128,113,0.24);
}

#capture-target .tl-status-chip.cd.ready strong,
#capture-target .tl-status-chip.sp.ready strong {
    color: #117c70;
}

#capture-target .tl-status-chip.sp {
    background: rgba(251,192,45,0.14);
    border-color: rgba(162,119,18,0.22);
}

#capture-target .tl-status-chip.sp strong,
#capture-target .tl-status-chip.sp.warn strong {
    color: #8b6810;
}

#capture-target .tl-status-chip.sp.bad strong {
    color: #af3d31;
}

#capture-target .tl-status-chip.skills {
    min-width: 46px;
    max-width: 62px;
    padding: 0 4px;
    justify-content: center;
    border-color: rgba(0,0,0,0.12);
}

#capture-target .tl-status-chip.skills i {
    background: rgba(0,0,0,0.07);
    color: #555;
    min-width: 12px;
    height: 12px;
    padding: 0 1px;
}

#capture-target .tl-status-chip.skills i.ready {
    background: rgba(251,192,45,0.46);
    color: #262018;
}

/* === styles-editor-polish.css === */
/* Timeline editor visual pass and late overrides */
/* Timeline editor visual pass: calm the control surface without changing behavior. */
#timeline-editors {
    display: grid;
    gap: 10px;
    padding: 10px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025), rgba(0,0,0,0.08)),
        #171719;
    border-color: rgba(255,255,255,0.10);
    border-radius: 12px;
}

#timeline-editors .turn-edit-box {
    margin: 0;
    padding: 10px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.08)),
        #202124;
    border: 1px solid rgba(255,255,255,0.10);
    border-left: 3px solid rgba(251,192,45,0.88);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.035);
}

#timeline-editors .turn-edit-box.is-turn-copied,
#timeline-editors .turn-edit-box.is-turn-pasted {
    border-color: rgba(251,192,45,0.42);
    border-left-color: var(--p5-yellow);
    box-shadow:
        0 0 0 1px rgba(251,192,45,0.18),
        0 0 18px rgba(251,192,45,0.14),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

#timeline-editors .turn-head {
    min-height: 30px;
    margin: 0 0 10px;
    padding: 0 0 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#timeline-editors .turn-head-left,
#timeline-editors .turn-head-right {
    gap: 5px;
}

#timeline-editors .turn-head-right {
    justify-content: flex-end;
}

#timeline-editors .turn-title {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 2px 0 0;
    color: var(--p5-yellow);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-shadow: 0 1px 0 #000;
}

#timeline-editors .turn-move-btn,
#timeline-editors .mini-tool-btn,
#timeline-editors .move-btn,
#timeline-editors .action-del {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.13);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.08)),
        #2a2b2e;
    color: #d4d6da;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    cursor: pointer;
    user-select: none;
    transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

#timeline-editors .turn-move-btn,
#timeline-editors .action-select-wrapper .move-btn:not(.action-tool-btn),
#timeline-editors .action-select-wrapper .action-del:not(.action-tool-btn) {
    width: 26px;
    min-width: 26px;
    max-width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

#timeline-editors .turn-head-left .turn-move-btn {
    position: relative;
    overflow: hidden;
    border-color: rgba(255,255,255,0.16);
    background:
        linear-gradient(115deg, transparent 0%, transparent 40%, rgba(255,255,255,0.14) 48%, transparent 58%, transparent 100%),
        linear-gradient(180deg, rgba(255,255,255,0.095), rgba(255,255,255,0.018) 46%, rgba(0,0,0,0.24) 100%),
        #282a2e;
    color: #eef1f5;
    border-radius: 6px;
    box-shadow:
        0 3px 0 rgba(0,0,0,0.36),
        inset 0 1px 0 rgba(255,255,255,0.18),
        inset 0 -1px 0 rgba(0,0,0,0.46);
}

#timeline-editors .turn-move-icon {
    position: relative;
    width: 13px;
    height: 13px;
    display: block;
    color: currentColor;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.72));
}

#timeline-editors .turn-move-icon::before,
#timeline-editors .turn-move-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
}

#timeline-editors .turn-move-icon::before {
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    border-radius: 1px 0 0 0;
    top: 1px;
    transform: translateX(-50%) rotate(45deg);
}

#timeline-editors .turn-move-icon::after {
    width: 2px;
    height: 7px;
    top: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, currentColor, rgba(255,255,255,0.58));
}

#timeline-editors .turn-move-btn-down .turn-move-icon {
    transform: rotate(180deg);
}

#timeline-editors .mini-tool-btn {
    min-height: 26px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

#timeline-editors .turn-insert-btn {
    color: #e5e5e5;
}

#timeline-editors .turn-copy-btn {
    color: #d9dce2;
    border-color: rgba(255,255,255,0.14);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.08)),
        #272a2f;
}

#timeline-editors .turn-paste-btn {
    color: #ffe0a6;
    border-color: rgba(251,192,45,0.24);
    background:
        linear-gradient(180deg, rgba(251,192,45,0.06), rgba(0,0,0,0.08)),
        #2b2821;
}

#timeline-editors .turn-delete-btn,
#timeline-editors .action-del {
    color: #ffcdc7;
    border-color: rgba(255,80,66,0.28);
    background:
        linear-gradient(180deg, rgba(255,80,66,0.09), rgba(0,0,0,0.10)),
        #302020;
}

#timeline-editors .turn-move-btn:hover,
#timeline-editors .mini-tool-btn:hover,
#timeline-editors .move-btn:hover {
    color: #fff;
    border-color: rgba(251,192,45,0.45);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.075), rgba(0,0,0,0.06)),
        #343538;
}

#timeline-editors .turn-head-left .turn-move-btn:hover {
    color: #fff8d7;
    border-color: rgba(251,192,45,0.54);
    background:
        linear-gradient(115deg, transparent 0%, transparent 38%, rgba(255,255,255,0.18) 48%, transparent 60%, transparent 100%),
        linear-gradient(180deg, rgba(251,192,45,0.12), rgba(255,255,255,0.035) 48%, rgba(0,0,0,0.20) 100%),
        #343230;
    transform: translateY(-1px);
}

#timeline-editors .turn-delete-btn:hover,
#timeline-editors .action-del:hover {
    color: #fff;
    border-color: rgba(255,80,66,0.70);
    background:
        linear-gradient(180deg, rgba(255,80,66,0.20), rgba(0,0,0,0.10)),
        #3a2020;
}

#timeline-editors .turn-paste-btn:hover {
    border-color: rgba(251,192,45,0.62);
    background:
        linear-gradient(180deg, rgba(251,192,45,0.13), rgba(0,0,0,0.08)),
        #363020;
}

#timeline-editors .char-action-row {
    gap: 7px;
    margin: 0 0 8px;
    padding: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.024), rgba(0,0,0,0.07)),
        #1b1c1f;
    border: 1px solid rgba(255,255,255,0.075);
    border-left: 2px solid rgba(255,54,30,0.55);
    border-radius: 8px;
}

#timeline-editors .char-action-row:last-child {
    margin-bottom: 0;
}

#timeline-editors .char-action-row.note-row {
    padding: 8px;
    background: rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.07) !important;
    border-left: 2px solid rgba(255,255,255,0.16) !important;
}

#timeline-editors .char-row-top {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

#timeline-editors .char-row-tools {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

#timeline-editors .char-name-lbl {
    width: auto;
    min-width: 0;
    color: #c5c8ce;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

#timeline-editors .mini-btn-add {
    width: auto;
    min-width: 98px;
    max-width: none;
    height: 28px;
    padding: 0 14px;
    justify-self: end;
    border: 1px solid rgba(255,54,30,0.52);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.075), rgba(0,0,0,0.10)),
        linear-gradient(90deg, rgba(255,54,30,0.34), rgba(255,54,30,0.10)),
        #2b2020;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.24),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

#timeline-editors .mini-btn-copy-all,
#timeline-editors .mini-btn-paste-all {
    width: auto;
    min-width: 68px;
    max-width: none;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
}

#timeline-editors .mini-btn-copy-all {
    border: 1px solid rgba(255,255,255,0.14);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.08)),
        #272a2f;
    color: #d9dce2;
}

#timeline-editors .mini-btn-paste-all {
    border: 1px solid rgba(251,192,45,0.22);
    background:
        linear-gradient(180deg, rgba(251,192,45,0.06), rgba(0,0,0,0.08)),
        #2b2821;
    color: #ffe0a6;
}

#timeline-editors .mini-btn-add:hover,
#timeline-editors .mini-btn-copy-all:hover,
#timeline-editors .mini-btn-paste-all:hover {
    color: #fff;
    border-color: rgba(251,192,45,0.48);
    background: #2e3034;
}

#timeline-editors .mini-btn-add:hover {
    border-color: rgba(255,54,30,0.78);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.09), rgba(0,0,0,0.08)),
        linear-gradient(90deg, rgba(255,54,30,0.54), rgba(255,54,30,0.18)),
        #362020;
}

#timeline-editors .char-action-row.is-group-copied {
    border-color: rgba(251,192,45,0.42);
    box-shadow:
        0 0 0 1px rgba(251,192,45,0.18),
        inset 0 1px 0 rgba(255,255,255,0.035);
}

#timeline-editors .action-list-container {
    gap: 6px;
}

#timeline-editors .action-select-wrapper {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 6px;
    row-gap: 0;
    padding: 6px;
    align-items: stretch;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.032), rgba(0,0,0,0.09)),
        #25262a;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

#timeline-editors .action-select-wrapper:hover {
    border-color: rgba(255,255,255,0.18);
}

#timeline-editors .action-select-wrapper.is-tools-open {
    z-index: 45;
    border-color: rgba(251,192,45,0.34);
    box-shadow:
        0 0 0 1px rgba(251,192,45,0.10),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

#timeline-editors .action-select-wrapper.has-second-target {
    grid-template-columns: minmax(0, 1fr);
}

#timeline-editors .action-main-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px 32px;
    gap: 6px;
    align-items: center;
    min-width: 0;
}

#timeline-editors .action-select-wrapper.has-second-target .action-main-row {
    grid-template-columns: minmax(0, 1fr) 108px 108px 32px;
}

#timeline-editors .action-select-wrapper.has-no-target .action-main-row {
    grid-template-columns: minmax(0, 1fr) 32px;
}

#timeline-editors .action-select-wrapper.has-no-target .target-sel,
#timeline-editors .action-select-wrapper.has-no-target .target-sel-2 {
    display: none;
}

#timeline-editors .action-tools-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    min-width: 0;
    padding: 6px;
    border-top-width: 1px;
}

#timeline-editors .action-select-wrapper.is-tools-open .action-tools-row {
    border-top-color: rgba(255,255,255,0.12);
}

#timeline-editors .action-tools-trigger {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 18px;
}

#timeline-editors .action-tool-btn {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 24px;
    min-height: 24px;
    padding: 0 5px;
    border: 1px solid rgba(255,255,255,0.075);
    border-radius: 5px;
    background: rgba(255,255,255,0.035);
    color: #aeb3bd;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

#timeline-editors .action-select-wrapper .action-tools-row .action-tool-btn {
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-self: stretch;
    align-self: stretch;
}

#timeline-editors .action-tool-btn:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.20);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.04)),
        rgba(255,255,255,0.075);
}

#timeline-editors .action-tools-row .action-tool-btn:nth-child(-n+3) {
    border-color: rgba(165,176,196,0.12);
    background: rgba(90,100,118,0.13);
    color: #c4c9d2;
}

#timeline-editors .action-tools-row .move-btn {
    border-color: rgba(38,198,218,0.12);
    background: rgba(38,198,218,0.055);
    color: #a9c5cc;
}

#timeline-editors .action-clear-btn {
    color: #e9d19b;
    border-color: rgba(251,192,45,0.18);
    background: rgba(251,192,45,0.055);
}

#timeline-editors .action-del.action-tool-btn {
    color: #e7b8b2;
    border-color: rgba(255,80,66,0.16);
    background: rgba(255,80,66,0.055);
}

#timeline-editors .action-select-wrapper.is-copied {
    border-color: rgba(251,192,45,0.55);
    box-shadow:
        0 0 0 1px rgba(251,192,45,0.22),
        inset 0 1px 0 rgba(255,255,255,0.03);
}

#timeline-editors .action-picker-btn,
#timeline-editors .action-select-wrapper .target-sel,
#timeline-editors .action-select-wrapper .target-sel-2,
#timeline-editors .custom-act-input,
#timeline-editors .custom-attr-sel,
#timeline-editors .custom-scope-sel,
#timeline-editors .turn-note-input {
    height: 32px;
    min-height: 32px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.10)),
        #2b2c30;
    color: #f0f0f0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

#timeline-editors .action-picker-btn {
    display: grid;
    align-items: center;
    justify-content: flex-start;
    grid-template-columns: minmax(0, 1fr) 16px;
    padding: 0 8px 0 10px;
    column-gap: 3px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

#timeline-editors .target-picker-btn {
    height: 32px;
    min-height: 32px;
    padding: 3px 24px 3px 9px;
    border-radius: 6px;
}

#timeline-editors .target-picker-main {
    font-size: 12px;
    line-height: 1;
}

#timeline-editors .action-picker-btn::after {
    color: #c3c5ca;
}

#timeline-editors .action-picker-btn.has-value {
    border-color: rgba(255,255,255,0.16);
    box-shadow: inset 3px 0 0 rgba(255,54,30,0.72), inset 0 1px 0 rgba(255,255,255,0.035);
}

#timeline-editors .action-picker-btn:hover,
#timeline-editors .action-picker-btn.is-open,
#timeline-editors .target-sel:hover,
#timeline-editors .target-sel-2:hover,
#timeline-editors .custom-act-input:focus,
#timeline-editors .custom-attr-sel:focus,
#timeline-editors .custom-scope-sel:focus,
#timeline-editors .turn-note-input:focus {
    color: #fff;
    border-color: rgba(251,192,45,0.42);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.08)),
        #303136;
    outline: none;
}

#timeline-editors .action-select-wrapper .target-sel,
#timeline-editors .action-select-wrapper .target-sel-2 {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    padding: 0 24px 0 8px;
    font-size: 12px;
    font-weight: 800;
}

#timeline-editors .action-select-wrapper .target-picker-source {
    width: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
}

#timeline-editors .action-select-wrapper.has-second-target .target-sel,
#timeline-editors .action-select-wrapper.has-second-target .target-sel-2 {
    width: 108px;
    min-width: 108px;
    max-width: 108px;
}

#timeline-editors .action-select-wrapper .custom-skill-row {
    gap: 5px;
    margin-top: 0;
    padding-top: 5px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

#timeline-editors .custom-act-input {
    padding: 0 9px;
}

#timeline-editors .custom-attr-sel {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
}

#timeline-editors .turn-note-input {
    width: 100%;
    height: auto;
    min-height: 56px;
    padding: 8px;
    resize: vertical;
    line-height: 1.45;
}

#timeline-editors .console-buff-panel {
    margin-top: 0;
    padding: 0;
}

#timeline-editors .sim-console-panel {
    gap: 7px;
    padding: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.028), rgba(0,0,0,0.08)),
        #151619;
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 2px solid rgba(255,54,30,0.58);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

#timeline-editors .sim-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 5px;
}

#timeline-editors .sim-summary-card {
    min-height: 42px;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 6px;
    padding: 6px 7px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.075);
    border-radius: 6px;
}

#timeline-editors .sim-summary-card.hl { border-color: rgba(185,73,188,0.22); }
#timeline-editors .sim-summary-card.navi,
#timeline-editors .sim-summary-card.skill,
#timeline-editors .sim-summary-card.futaba { border-color: rgba(38,198,218,0.18); }

#timeline-editors .sim-summary-label {
    color: #a0a4aa;
    font-size: 9px;
    letter-spacing: 0.4px;
}

#timeline-editors .sim-summary-card strong {
    font-size: 11px;
    font-weight: 900;
}

#timeline-editors .sim-summary-card em {
    font-size: 10px;
    font-weight: 800;
}

#timeline-editors .sim-detail-toggle {
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.045);
    border-color: rgba(255,255,255,0.11);
    color: #cfd2d8;
}

#timeline-editors .sim-action-ledger {
    gap: 5px;
}

#timeline-editors .sim-action-item {
    padding: 7px;
    background: rgba(0,0,0,0.16);
    border: 1px solid rgba(255,255,255,0.065);
    border-radius: 6px;
}

#timeline-editors .sim-action-title {
    gap: 6px;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom-color: rgba(255,255,255,0.07);
}

#timeline-editors .sim-action-title span {
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--p5-yellow);
    color: #161616;
    font-size: 9px;
    font-weight: 900;
}

#timeline-editors .sim-action-title strong,
#timeline-editors .sim-action-target,
#timeline-editors .sim-action-line strong,
#timeline-editors .sim-action-line em {
    font-size: 10px;
}

@media (max-width: 680px) {
    #timeline-editors {
        padding: 8px;
    }

    #timeline-editors .turn-edit-box {
        padding: 8px;
    }

    #timeline-editors .turn-head {
        align-items: flex-start;
    }

    #timeline-editors .char-row-top {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    #timeline-editors .char-row-tools {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-content: stretch;
    }

    #timeline-editors .mini-btn-add,
    #timeline-editors .mini-btn-copy-all,
    #timeline-editors .mini-btn-paste-all {
        width: 100%;
        min-width: 0;
        padding: 0 8px;
    }

    #timeline-editors .action-select-wrapper,
    #timeline-editors .action-select-wrapper.has-second-target {
        grid-template-columns: minmax(0, 1fr);
    }

    #timeline-editors .action-main-row,
    #timeline-editors .action-select-wrapper.has-second-target .action-main-row {
        grid-template-columns: minmax(0, 1fr) 88px 32px;
    }

    #timeline-editors .action-select-wrapper.has-no-target .action-main-row {
        grid-template-columns: minmax(0, 1fr) 32px;
    }

    #timeline-editors .action-select-wrapper.has-second-target .target-sel-2 {
        grid-column: 1 / 4;
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    #timeline-editors .action-select-wrapper.has-second-target .target-picker-control-second {
        grid-column: 1 / 4;
        width: 100%;
    }

    #timeline-editors .action-tools-trigger {
        grid-column: 3;
        grid-row: 1;
    }

    #timeline-editors .action-select-wrapper .target-sel,
    #timeline-editors .action-select-wrapper.has-second-target .target-sel {
        width: 88px;
        min-width: 88px;
        max-width: 88px;
    }

    #timeline-editors .action-tools-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.sim-hl-summary,
.sim-navi-summary {
    min-width: 0;
    width: 100%;
}

.sim-hl-summary {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border: 1px solid rgba(243,89,249,0.18);
    border-radius: 6px;
    background: rgba(243,89,249,0.055);
    box-sizing: border-box;
    overflow: hidden;
}

.sim-hl-summary .sim-summary-label {
    color: #e68cf0;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.3px;
}

.sim-summary-value {
    min-width: 64px;
    max-width: 148px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.20);
    color: #f2f2f2;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
}

.sim-hl-path-node {
    min-width: 18px;
    color: #f2f2f2;
    line-height: 1.35;
}

.sim-hl-path-node.is-reset {
    min-width: 20px;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(255,80,66,0.18);
    color: #ff8a7d;
}

.sim-hl-path-link {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-top: 1px solid rgba(255,255,255,0.46);
    border-right: 1px solid rgba(255,255,255,0.46);
    transform: rotate(45deg);
    opacity: 0.76;
}

.sim-summary-sources {
    min-width: 0;
    color: #d7d7d7;
    font-size: 10px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sim-navi-summary {
    display: grid;
    grid-template-columns: minmax(78px, 0.82fr) minmax(74px, 0.74fr) minmax(128px, 1.36fr);
    gap: 5px;
}

.sim-navi-summary-cell {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    padding: 6px 7px;
    border: 1px solid rgba(38,198,218,0.15);
    border-radius: 6px;
    background: rgba(38,198,218,0.055);
}

.sim-navi-summary-cell span {
    min-width: 0;
    color: #99adb4;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-navi-summary-cell strong {
    min-width: 0;
    color: #f0f7f7;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-navi-summary-cell.good strong {
    color: #56e18f;
}

.sim-navi-summary-cell.bad strong {
    color: #ff7667;
}

.sim-navi-summary-cell.skills strong {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
}

.sim-navi-summary-cell.skills i {
    min-width: 0;
    padding: 2px 3px;
    border-radius: 4px;
    background: rgba(0,0,0,0.20);
    color: #dce2e2;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sim-navi-summary-cell.skills i.good {
    background: rgba(50,207,125,0.16);
    color: #56e18f;
}

.sim-character-mechanic,
.tl-character-mechanic {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.sim-character-mechanics-row {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 5px;
}

.sim-character-mechanics-row .sim-character-mechanic {
    width: 100%;
    max-width: 100%;
}

.tl-character-mechanics-row {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 4px;
    margin-top: 3px;
    min-height: 26px;
    overflow: hidden;
}

.tl-character-mechanics-row.placeholder {
    visibility: hidden;
    pointer-events: none;
}

.tl-character-mechanics-row .tl-character-mechanic {
    margin-top: 0;
}

.sim-character-mechanic {
    width: 100%;
    padding: 6px 7px;
    border: 1px solid rgba(255,205,64,0.16);
    border-radius: 6px;
    background:
        linear-gradient(90deg, rgba(255,205,64,0.055), rgba(38,198,218,0.045)),
        rgba(0,0,0,0.12);
    box-sizing: border-box;
}

.sim-character-mechanic.suwa {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 5px;
    overflow: visible;
}

.tl-character-mechanic.suwa {
    flex-wrap: nowrap;
    overflow: hidden;
}

.sim-character-mechanic.minami {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 5px;
    overflow: visible;
}

.tl-character-mechanic.minami {
    flex-wrap: nowrap;
    overflow: hidden;
}

.sim-character-mechanic.narumi {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 5px;
    overflow: visible;
}

.tl-character-mechanic.narumi {
    flex-wrap: nowrap;
    overflow: hidden;
}

.sim-character-mechanic.aigis {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 5px;
    overflow: visible;
}

.tl-character-mechanic.aigis {
    flex-wrap: nowrap;
    overflow: hidden;
}

.sim-character-mechanic.kotone-dance {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 5px;
    overflow: visible;
}

.tl-character-mechanic.kotone-dance {
    flex-wrap: nowrap;
    overflow: hidden;
}

.sim-character-mechanic .suwa-mechanic-chip,
.sim-character-mechanic .minami-mechanic-chip,
.sim-character-mechanic .narumi-mechanic-chip,
.sim-character-mechanic .aigis-mechanic-chip,
.sim-character-mechanic .kotone-crystal-chip,
.sim-character-mechanic .suwa-mechanic-process,
.sim-character-mechanic .minami-mechanic-process,
.sim-character-mechanic .narumi-mechanic-process,
.sim-character-mechanic .aigis-mechanic-process,
.sim-character-mechanic .kotone-crystal-process {
    height: 24px;
    min-height: 24px;
    box-sizing: border-box;
}

.suwa-mechanic-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(82px, 82px) minmax(0, 1fr);
    align-items: center;
    gap: 5px;
}

.suwa-layer-row {
    grid-template-columns: repeat(var(--suwa-stack-count, 1), minmax(82px, 82px)) minmax(0, 1fr);
}

.suwa-layer-row:has(.suwa-mechanic-chip:nth-child(2)) {
    --suwa-stack-count: 3;
}

.suwa-layer-row .suwa-mechanic-chip {
    width: 68px;
    justify-content: center;
}

.sim-character-mechanic.suwa .suwa-layer-row .suwa-mechanic-chip.flow {
    width: 74px;
    padding-left: 5px;
    padding-right: 7px;
}

.suwa-mechanic-chip {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 23px;
    padding: 0 6px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    background: rgba(0,0,0,0.20);
    color: #f5f5f5;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1;
    white-space: nowrap;
}

.suwa-mechanic-chip img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex: 0 0 auto;
}

.suwa-mechanic-chip b {
    color: #aeb6bd;
    font-size: 9px;
    font-weight: 900;
}

.suwa-mechanic-chip strong {
    min-width: 0;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    overflow: visible;
    text-overflow: clip;
}

.suwa-mechanic-chip.ready {
    border-color: rgba(255,205,64,0.34);
    background: rgba(255,205,64,0.12);
}

.suwa-mechanic-chip.ready strong {
    color: #ffd95a;
}

.suwa-mechanic-chip.inactive {
    opacity: 0.48;
}

.suwa-mechanic-chip.bad {
    border-color: rgba(255,84,68,0.34);
    background: rgba(255,84,68,0.12);
}

.suwa-mechanic-chip.bad strong {
    color: #ff8a7d;
}

.minami-mechanic-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(54px, 54px) minmax(0, 1fr);
    align-items: center;
    gap: 5px;
}

.minami-mechanic-chip {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 42px;
    height: 23px;
    padding: 0 6px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    background: rgba(0,0,0,0.20);
    color: #f5f5f5;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1;
    white-space: nowrap;
}

.minami-mechanic-chip img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex: 0 0 auto;
}

.minami-mechanic-chip b {
    color: #aeb6bd;
    font-size: 9px;
    font-weight: 900;
}

.minami-mechanic-chip strong {
    min-width: 0;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    overflow: visible;
    text-overflow: clip;
}

.narumi-mechanic-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(96px, max-content) minmax(0, 1fr);
    align-items: center;
    gap: 5px;
}

.narumi-mechanic-chip {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 90px;
    height: 23px;
    padding: 0 6px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    background: rgba(0,0,0,0.20);
    color: #f5f5f5;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1;
    white-space: nowrap;
}

.narumi-mechanic-chip img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex: 0 0 auto;
}

.narumi-mechanic-chip b {
    color: #aeb6bd;
    font-size: 9px;
    font-weight: 900;
}

.narumi-mechanic-chip strong {
    min-width: 0;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    overflow: visible;
    text-overflow: clip;
}

.aigis-mechanic-row {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.aigis-mechanic-chip {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 54px;
    height: 23px;
    padding: 0 6px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    background: rgba(0,0,0,0.20);
    color: #f5f5f5;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1;
    white-space: nowrap;
}

.aigis-mechanic-chip img {
    width: 15px;
    height: 15px;
    object-fit: contain;
    flex: 0 0 auto;
}

.aigis-mechanic-chip strong {
    min-width: 0;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    overflow: visible;
    text-overflow: clip;
}

.kotone-crystal-row {
    min-width: 0;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 5px;
}

.kotone-crystal-chip {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto;
    min-width: 62px;
    height: 23px;
    padding: 0 7px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    background: rgba(0,0,0,0.20);
    color: #f5f5f5;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1;
    white-space: nowrap;
}

.kotone-crystal-chip.active {
    border-color: rgba(42,214,183,0.32);
    background: rgba(42,214,183,0.12);
}

.kotone-crystal-chip.state {
    min-width: 58px;
    border-color: rgba(255,205,64,0.18);
    background: rgba(255,205,64,0.09);
}

.kotone-crystal-chip img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex: 0 0 auto;
}

.kotone-crystal-chip b {
    color: #aeb6bd;
    font-size: 9px;
    font-weight: 900;
}

.kotone-crystal-chip strong {
    min-width: 0;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    overflow: visible;
    text-overflow: clip;
}

.kotone-crystal-process {
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    min-height: 23px;
    height: auto;
    padding: 3px 7px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 5px;
    background: rgba(255,255,255,0.045);
    color: #f0f0f0;
    overflow: visible;
    white-space: nowrap;
}

.kotone-crystal-process b {
    flex: 0 0 auto;
    color: #9fb7bf;
    font-size: 9px;
    font-weight: 900;
}

.kotone-crystal-process-route {
    min-width: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    color: #f4f4f4;
    font-size: 10px;
    font-weight: 900;
    overflow: visible;
    white-space: nowrap;
}

.kotone-crystal-process-node {
    min-width: 14px;
    line-height: 1.2;
    text-align: center;
}

.kotone-crystal-process-link {
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-top: 1px solid rgba(255,255,255,0.46);
    border-right: 1px solid rgba(255,255,255,0.46);
    transform: rotate(45deg);
    opacity: 0.75;
}

.kotone-crystal-process strong {
    min-width: 0;
    color: #dfe8ea;
    font-size: 9px;
    font-weight: 800;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.kotone-crystal-process-sources {
    transform-origin: left center;
}

.minami-mechanic-process {
    min-width: 74px;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    padding: 0 7px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 5px;
    background: rgba(255,255,255,0.045);
    color: #f0f0f0;
    overflow: visible;
    white-space: nowrap;
}

.minami-mechanic-process b {
    flex: 0 0 auto;
    color: #9fb7bf;
    font-size: 9px;
    font-weight: 900;
}

.minami-process-route {
    min-width: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    color: #f4f4f4;
    font-size: 10px;
    font-weight: 900;
    overflow: visible;
    white-space: nowrap;
}

.minami-process-node {
    min-width: 14px;
    line-height: 1.2;
    text-align: center;
}

.minami-process-link {
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-top: 1px solid rgba(255,255,255,0.46);
    border-right: 1px solid rgba(255,255,255,0.46);
    transform: rotate(45deg);
    opacity: 0.75;
}

.minami-mechanic-process strong {
    min-width: 0;
    color: #dfe8ea;
    font-size: 9px;
    font-weight: 800;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.minami-process-sources {
    transform-origin: left center;
}

.narumi-mechanic-process {
    min-width: 74px;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    padding: 0 7px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 5px;
    background: rgba(255,255,255,0.045);
    color: #f0f0f0;
    overflow: visible;
    white-space: nowrap;
}

.narumi-mechanic-process b {
    flex: 0 0 auto;
    color: #9fb7bf;
    font-size: 9px;
    font-weight: 900;
}

.narumi-process-route {
    min-width: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    color: #f4f4f4;
    font-size: 10px;
    font-weight: 900;
    overflow: visible;
    white-space: nowrap;
}

.narumi-process-node {
    min-width: 14px;
    line-height: 1.2;
    text-align: center;
}

.narumi-process-link {
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-top: 1px solid rgba(255,255,255,0.46);
    border-right: 1px solid rgba(255,255,255,0.46);
    transform: rotate(45deg);
    opacity: 0.75;
}

.narumi-mechanic-process strong {
    min-width: 0;
    color: #dfe8ea;
    font-size: 9px;
    font-weight: 800;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.narumi-process-sources {
    transform-origin: left center;
}

.aigis-process-row {
    min-width: 0;
}

.aigis-mechanic-process {
    min-width: 74px;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    min-height: 23px;
    height: auto;
    padding: 3px 7px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 5px;
    background: rgba(255,255,255,0.045);
    color: #f0f0f0;
    overflow: visible;
    white-space: nowrap;
}

.aigis-mechanic-process b {
    flex: 0 0 auto;
    color: #9fb7bf;
    font-size: 9px;
    font-weight: 900;
}

.aigis-process-route {
    min-width: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    color: #f4f4f4;
    font-size: 10px;
    font-weight: 900;
    overflow: visible;
    white-space: nowrap;
}

.aigis-process-node {
    min-width: 14px;
    line-height: 1.2;
    text-align: center;
}

.aigis-process-link {
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-top: 1px solid rgba(255,255,255,0.46);
    border-right: 1px solid rgba(255,255,255,0.46);
    transform: rotate(45deg);
    opacity: 0.75;
}

.aigis-mechanic-process strong {
    min-width: 0;
    color: #dfe8ea;
    font-size: 9px;
    font-weight: 800;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.aigis-process-sources {
    transform-origin: left center;
}

.sim-character-mechanic.narumi {
    padding: 5px 6px;
    border-color: rgba(255,86,129,0.13);
    border-radius: 7px;
    background:
        linear-gradient(90deg, rgba(255,86,129,0.055), rgba(255,205,64,0.035)),
        rgba(0,0,0,0.10);
}

.sim-character-mechanic.narumi .narumi-mechanic-row {
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.sim-character-mechanic.narumi .narumi-mechanic-chip {
    width: auto;
    min-width: 92px;
    height: 26px;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 6px;
    border-color: rgba(255,86,129,0.16);
    background: rgba(0,0,0,0.18);
}

.sim-character-mechanic.narumi .narumi-mechanic-process {
    height: 26px;
    min-height: 26px;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 6px;
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    overflow: hidden;
}

.sim-character-mechanic.narumi .narumi-process-route {
    min-height: 18px;
    padding-top: 0;
    padding-bottom: 0;
}

.sim-character-mechanic.narumi .narumi-process-sources {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-character-mechanic.aigis {
    padding: 5px 6px;
    border-color: rgba(117,197,255,0.14);
    border-radius: 7px;
    background:
        linear-gradient(90deg, rgba(117,197,255,0.055), rgba(255,74,58,0.035)),
        rgba(0,0,0,0.10);
}

.sim-character-mechanic.aigis .aigis-mechanic-row {
    gap: 6px;
}

.sim-character-mechanic.aigis .aigis-mechanic-chip {
    width: auto;
    min-width: 58px;
    height: 26px;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 6px;
    border-color: rgba(117,197,255,0.16);
    background: rgba(0,0,0,0.18);
}

.sim-character-mechanic.aigis .aigis-mechanic-process {
    height: 26px;
    min-height: 26px;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 6px;
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    overflow: hidden;
}

.sim-character-mechanic.aigis .aigis-process-route {
    min-height: 18px;
    padding-top: 0;
    padding-bottom: 0;
}

.sim-character-mechanic.aigis .aigis-process-sources {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-character-mechanic.kotone-dance {
    padding: 5px 6px;
    border-color: rgba(42,214,183,0.14);
    border-radius: 7px;
    background:
        linear-gradient(90deg, rgba(42,214,183,0.050), rgba(255,205,64,0.035)),
        rgba(0,0,0,0.10);
}

.sim-character-mechanic.kotone-dance .kotone-crystal-row {
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.sim-character-mechanic.kotone-dance .kotone-crystal-chip {
    height: 26px;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 6px;
    border-color: rgba(42,214,183,0.16);
    background: rgba(0,0,0,0.18);
}

.sim-character-mechanic.kotone-dance .kotone-crystal-chip.state {
    border-color: rgba(255,205,64,0.16);
    background: rgba(255,205,64,0.08);
}

.sim-character-mechanic.kotone-dance .kotone-crystal-process {
    min-width: 0;
    max-width: 100%;
    height: 26px;
    min-height: 26px;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 6px;
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    overflow: hidden;
}

.sim-character-mechanic.kotone-dance .kotone-crystal-process-route {
    min-height: 18px;
    padding-top: 0;
    padding-bottom: 0;
}

.sim-character-mechanic.kotone-dance .kotone-crystal-process-sources {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suwa-mechanic-process {
    min-width: 74px;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    min-height: 23px;
    height: auto;
    padding: 3px 7px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 5px;
    background: rgba(255,255,255,0.045);
    color: #f0f0f0;
    overflow: visible;
    white-space: nowrap;
}

.suwa-mechanic-process b {
    flex: 0 0 auto;
    color: #9fb7bf;
    font-size: 9px;
    font-weight: 900;
}

.suwa-process-route {
    min-width: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    color: #f4f4f4;
    font-size: 10px;
    font-weight: 900;
    overflow: visible;
    white-space: nowrap;
}

.suwa-process-node {
    min-width: 14px;
    line-height: 1.2;
    text-align: center;
}

.suwa-process-link {
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-top: 1px solid rgba(255,255,255,0.46);
    border-right: 1px solid rgba(255,255,255,0.46);
    transform: rotate(45deg);
    opacity: 0.75;
}

.suwa-mechanic-process strong {
    min-width: 0;
    color: #dfe8ea;
    font-size: 9px;
    font-weight: 800;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.suwa-process-sources {
    transform-origin: left center;
}

.sim-character-mechanic.suwa {
    padding: 5px 6px;
    border-color: rgba(255,205,64,0.11);
    border-radius: 7px;
    background:
        linear-gradient(90deg, rgba(255,205,64,0.045), rgba(38,198,218,0.035)),
        rgba(0,0,0,0.10);
}

.sim-character-mechanic.suwa .suwa-layer-row {
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.sim-character-mechanic.suwa .suwa-layer-row:has(.suwa-mechanic-chip:nth-child(2)) {
    grid-template-columns: repeat(3, max-content) minmax(0, 1fr);
}

.sim-character-mechanic.suwa .suwa-layer-row .suwa-mechanic-chip {
    width: auto;
    min-width: 78px;
    height: 26px;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 6px;
    border-color: rgba(255,205,64,0.13);
    background: rgba(0,0,0,0.18);
}

.sim-character-mechanic.suwa .suwa-layer-row .suwa-mechanic-chip.flow {
    width: auto;
    min-width: 88px;
    padding-left: 7px;
    padding-right: 9px;
}

.sim-character-mechanic.suwa .suwa-mechanic-process {
    height: 26px;
    min-height: 26px;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 6px;
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    overflow: hidden;
}

.sim-character-mechanic.suwa .suwa-process-route {
    min-height: 18px;
    padding-top: 0;
    padding-bottom: 0;
}

.sim-character-mechanic.suwa .suwa-process-sources {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Console mechanism ledger rows must keep chip/process frames aligned. */
.sim-character-mechanic .suwa-mechanic-chip,
.sim-character-mechanic .minami-mechanic-chip,
.sim-character-mechanic .narumi-mechanic-chip,
.sim-character-mechanic .aigis-mechanic-chip,
.sim-character-mechanic .kotone-crystal-chip,
.sim-character-mechanic .suwa-mechanic-process,
.sim-character-mechanic .minami-mechanic-process,
.sim-character-mechanic .narumi-mechanic-process,
.sim-character-mechanic .aigis-mechanic-process,
.sim-character-mechanic .kotone-crystal-process {
    height: 24px;
    min-height: 24px;
    box-sizing: border-box;
    padding-top: 0;
    padding-bottom: 0;
    align-items: center;
}

.sim-character-mechanic .suwa-process-route,
.sim-character-mechanic .minami-process-route,
.sim-character-mechanic .narumi-process-route,
.sim-character-mechanic .aigis-process-route,
.sim-character-mechanic .kotone-crystal-process-route {
    min-height: 18px;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}

@media (max-width: 560px) {
    .suwa-mechanic-process strong {
        font-size: 8px;
    }
}

.tl-character-mechanic {
    justify-content: center;
    margin-top: 3px;
    min-height: 26px;
    padding: 3px 4px;
    border: 1px solid rgba(0,0,0,0.09);
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.46), rgba(232,229,216,0.34));
    box-sizing: border-box;
}

.tl-character-mechanic.placeholder {
    visibility: hidden;
    pointer-events: none;
}

.tl-character-mechanic .suwa-mechanic-chip {
    height: 18px;
    gap: 3px;
    padding: 0 4px;
    border-color: rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.48);
    color: #202020;
}

.tl-character-mechanic .suwa-mechanic-chip.bad {
    flex: 0 0 auto;
}

.tl-character-mechanic .suwa-mechanic-chip img {
    width: 12px;
    height: 12px;
}

.tl-character-mechanic .suwa-mechanic-chip b {
    color: #5a5a55;
    font-size: 8px;
}

.tl-character-mechanic .suwa-mechanic-chip strong {
    color: #171717;
    font-size: 10px;
}

.tl-character-mechanic .suwa-mechanic-chip.ready {
    background: rgba(255,205,64,0.22);
    border-color: rgba(162,119,18,0.20);
}

.tl-character-mechanic .suwa-mechanic-chip.ready strong {
    color: #8b6810;
}

.tl-character-mechanic .suwa-mechanic-chip.bad {
    background: rgba(255,84,68,0.11);
    border-color: rgba(177,57,42,0.20);
}

.tl-character-mechanic .suwa-mechanic-chip.bad strong {
    color: #af3d31;
}

.tl-character-mechanic .minami-mechanic-chip {
    height: 18px;
    gap: 3px;
    width: 38px;
    padding: 0 4px;
    border-color: rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.48);
    color: #202020;
}

.tl-character-mechanic .minami-mechanic-chip img {
    width: 12px;
    height: 12px;
}

.tl-character-mechanic .minami-mechanic-chip b {
    color: #5a5a55;
    font-size: 8px;
}

.tl-character-mechanic .minami-mechanic-chip strong {
    color: #171717;
    font-size: 10px;
}

.tl-character-mechanic .narumi-mechanic-chip {
    height: 18px;
    gap: 3px;
    width: 82px;
    padding: 0 4px;
    border-color: rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.48);
    color: #202020;
}

.tl-character-mechanic .narumi-mechanic-chip img {
    width: 12px;
    height: 12px;
}

.tl-character-mechanic .narumi-mechanic-chip b {
    color: #5a5a55;
    font-size: 8px;
}

.tl-character-mechanic .narumi-mechanic-chip strong {
    color: #171717;
    font-size: 10px;
}

.tl-character-mechanic .aigis-mechanic-chip {
    height: 18px;
    gap: 3px;
    width: 40px;
    padding: 0 4px;
    border-color: rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.48);
    color: #202020;
}

.tl-character-mechanic .aigis-mechanic-chip img {
    width: 13px;
    height: 13px;
}

.tl-character-mechanic .aigis-mechanic-chip strong {
    color: #171717;
    font-size: 10px;
}

.tl-character-mechanic .kotone-crystal-chip {
    height: 18px;
    gap: 3px;
    min-width: 46px;
    padding: 0 4px;
    border-color: rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.48);
    color: #202020;
}

.tl-character-mechanic .kotone-crystal-chip.state {
    min-width: 42px;
}

.tl-character-mechanic .kotone-crystal-chip.active {
    border-color: rgba(26,132,115,0.22);
    background: rgba(42,214,183,0.18);
}

.tl-character-mechanic .kotone-crystal-chip img {
    width: 12px;
    height: 12px;
}

.tl-character-mechanic .kotone-crystal-chip b {
    color: #5a5a55;
    font-size: 8px;
}

.tl-character-mechanic .kotone-crystal-chip strong {
    color: #171717;
    font-size: 10px;
}

#timeline-editors .sim-console-panel {
    gap: 6px;
}

#timeline-editors .sim-hl-summary,
#timeline-editors .sim-navi-summary-cell {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

@media (max-width: 430px) {
    .sim-hl-summary {
        grid-template-columns: auto auto;
    }

    .sim-summary-sources {
        grid-column: 1 / -1;
    }

    .sim-navi-summary {
        grid-template-columns: 1fr;
    }
}
