/* ========== 终末地抽卡规划（工业终端样板） ========== */

.gacha-planner-page.page-container {
    background-color: var(--color-canvas);
    background-image: var(--bg-canvas-grid);
    background-size: var(--bg-grid-size) var(--bg-grid-size);
}

.gacha-planner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-top: var(--bar-accent) solid var(--color-theme-bar);
}

.gp-card {
    border: 1px solid var(--line-hard);
    background: var(--color-card);
    padding: 0 18px 18px;
    position: relative;
}

.gp-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 -18px 12px;
    padding: 12px 18px 10px;
    border-bottom: 1px solid var(--line-ins);
    background: linear-gradient(
        90deg,
        var(--color-theme-bar) 0,
        var(--color-theme-bar) 4px,
        var(--color-surface-dim) 4px,
        var(--color-surface-dim) 100%
    );
}

.gp-card-head h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-ink);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

details.gp-rules {
    padding-bottom: 0;
}

details.gp-rules > summary.gp-card-head {
    list-style: none;
    cursor: pointer;
    margin-bottom: 0;
    user-select: none;
}

details.gp-rules > summary.gp-card-head::-webkit-details-marker {
    display: none;
}

details.gp-rules > summary.gp-card-head::after {
    content: "展开";
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-ink-muted);
}

details.gp-rules[open] > summary.gp-card-head::after {
    content: "收起";
}

details.gp-rules[open] > summary.gp-card-head {
    margin-bottom: 12px;
}

details.gp-rules[open] {
    padding-bottom: 18px;
}

.gp-summary-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-ink);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.gp-tag {
    display: inline-block;
    padding: 2px 8px;
    background: transparent;
    color: var(--color-ink);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.45;
    border: 1px solid var(--color-ink);
    flex-shrink: 0;
}

.gp-tag--inline {
    vertical-align: middle;
    margin-right: 2px;
}

.gp-col-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--color-ink);
    padding: 0 0 10px;
    border-bottom: 2px solid var(--color-theme);
}

.gp-note {
    font-size: 0.78rem;
    color: var(--color-ink-muted);
    line-height: 1.55;
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-ins);
}

.gp-card > .gp-note:last-of-type {
    margin-bottom: 8px;
}

.gp-card label {
    display: block;
    font-size: 0.78rem;
    color: var(--color-ink-muted);
    margin: 10px 0 5px;
}

.gp-card label:first-of-type {
    margin-top: 0;
}

.gp-checkbox {
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.gp-card input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line-hard);
    background: var(--color-card);
    color: var(--color-ink);
    font-size: 0.92rem;
    font-family: var(--font-mono);
}

.gp-card input[type="number"]:focus {
    outline: none;
    border-color: var(--color-ink);
    box-shadow: inset 0 0 0 1px var(--color-theme);
}

.gp-card input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
}

/* 主计算 CTA：与全站一致，默认浅黄强调、悬停黄底 */
.gp-primary {
    margin-top: 14px;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--btn-emphasis-border);
    background: var(--btn-emphasis-bg);
    color: var(--btn-emphasis-fg);
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gp-primary:hover {
    background: var(--btn-cta-bg);
    color: var(--btn-cta-fg);
    border-color: var(--btn-emphasis-border);
    transform: none;
}

.gp-primary:active {
    transform: none;
}

/* 结果区：终端读数 */
.gp-stats {
    margin-top: 12px;
    padding: 14px 14px 14px 16px;
    background: var(--color-ink);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    line-height: 1.65;
    min-height: 50px;
    border: 1px solid var(--color-ink);
    border-left: 4px solid var(--color-theme-bar);
    box-shadow: inset 0 0 0 1px rgba(46, 196, 182, 0.18);
}

.gp-stats:empty {
    display: none;
}

.gp-stats strong {
    color: var(--color-theme);
    font-weight: 700;
}

.gp-stats > div + div {
    margin-top: 8px;
}

/* 覆盖 JS 内联灰色说明字，保证黑底可读 */
.gp-stats [style*="color:#666"],
.gp-stats [style*="color: #666"],
.gp-stats [style*="color:#666666"],
.gp-stats [style*="color: #666666"] {
    color: rgba(255, 255, 255, 0.48) !important;
}

.gp-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 900px) {
    .gp-cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .gacha-planner {
        gap: 12px;
    }

    .gp-card {
        padding: 0 14px 14px;
    }

    .gp-card-head {
        margin: 0 -14px 10px;
        padding: 10px 14px 8px;
        background: linear-gradient(
            90deg,
            var(--color-theme-bar) 0,
            var(--color-theme-bar) 3px,
            var(--color-surface-dim) 3px,
            var(--color-surface-dim) 100%
        );
    }

    .gp-card-head h2 {
        font-size: 0.9rem;
    }

    .gp-col-title {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .gp-note {
        font-size: 0.74rem;
    }

    .gp-card label {
        font-size: 0.74rem;
    }

    .gp-primary {
        font-size: 0.8rem;
    }

    .gp-stats {
        font-size: 0.78rem;
        padding: 12px;
        box-shadow: none;
    }
}
