/* 睡前故事生成器 /tool/bedtime-story */

.bst-step { margin-bottom: 16px; }
.bst-step-t {
    font-size: 15px;
    font-weight: 700;
    color: var(--calc-text, #334155);
    margin: 0 0 8px;
}
.bst-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bst-chips button {
    padding: 9px 16px;
    border: 2px solid var(--calc-border, #e2e8f0);
    border-radius: 999px;
    background: #fff;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--calc-text, #334155);
    cursor: pointer;
    transition: all .15s;
}
.bst-chips button.is-active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4f46e5;
}
.bst-name {
    width: 100%;
    margin-top: 10px;
    padding: 11px 14px;
    border: 2px dashed var(--calc-border, #e2e8f0);
    border-radius: 12px;
    font-size: 14.5px;
    color: var(--calc-text, #334155);
    background: var(--calc-soft, #f8fafc);
    box-sizing: border-box;
}
.bst-name:focus { outline: none; border-color: #6366f1; background: #fff; }

.bst-go { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.bst-go .btn { flex: 1; min-width: 150px; }
.bst-status { font-size: 13.5px; color: var(--calc-muted, #64748b); margin: 10px 0 0; text-align: center; }
.bst-status.is-err { color: #d97706; }

/* 夜间故事卡（无论明暗模式都用柔和夜色） */
.bst-night {
    width: 100%;
    background: linear-gradient(160deg, #1e1b4b, #312e81 55%, #1e3a5f);
    border-radius: 16px;
    padding: 22px 20px;
    color: #e0e7ff;
    box-shadow: inset 0 0 40px rgba(99, 102, 241, .15);
}
.bst-empty {
    text-align: center;
    font-size: 17px;
    line-height: 2;
    color: #c7d2fe;
    padding: 30px 6px;
}
.bst-empty small { font-size: 13px; color: #a5b4fc; }

.bst-title {
    text-align: center;
    font-size: 21px;
    font-weight: 800;
    color: #fef3c7;
    margin: 0 0 14px;
    line-height: 1.6;
}
.bst-text p {
    font-size: 17.5px;
    line-height: 2.1;
    text-indent: 2em;
    margin: 0 0 12px;
    color: #e0e7ff;
    letter-spacing: .5px;
}
.bst-end {
    text-align: center;
    font-size: 14px;
    color: #a5b4fc;
    margin: 16px 0 14px;
}
.bst-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.bst-actions .btn { font-size: 14px; }

/* 收藏列表 */
.bst-fav-wrap { width: 100%; margin-top: 14px; }
.bst-fav-t { font-size: 15px; font-weight: 800; color: var(--calc-text, #334155); margin: 0 0 8px; }
.bst-fav-list { display: flex; flex-direction: column; gap: 6px; }
.bst-fav-item { display: flex; gap: 6px; align-items: center; }
.bst-fav-open {
    flex: 1;
    text-align: left;
    padding: 9px 12px;
    border: 1px solid var(--calc-border, #e2e8f0);
    border-radius: 10px;
    background: var(--calc-soft, #f8fafc);
    font-size: 14px;
    font-weight: 600;
    color: var(--calc-text, #334155);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bst-fav-open:hover { border-color: #6366f1; color: #4f46e5; }
.bst-fav-del {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--calc-muted, #94a3b8);
    font-size: 14px;
    cursor: pointer;
}
.bst-fav-del:hover { background: #fef2f2; color: #ef4444; }

.bst-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

[hidden] { display: none !important; }

.calc-result-body { position: relative; }

@media (max-width: 640px) {
    .bst-night { padding: 16px 14px; }
    .bst-text p { font-size: 16.5px; }
}

/* 深色模式 */
body.dark-mode .bst-chips button { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark-mode .bst-chips button.is-active { background: #1e1b4b; border-color: #818cf8; color: #a5b4fc; }
body.dark-mode .bst-name { background: #0f172a; border-color: #334155; color: #e2e8f0; }
body.dark-mode .bst-name:focus { border-color: #818cf8; background: #1e293b; }
body.dark-mode .bst-night { background: linear-gradient(160deg, #0f0d2e, #1e1b4b 55%, #0f2440); }
body.dark-mode .bst-fav-t { color: #e2e8f0; }
body.dark-mode .bst-fav-open { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark-mode .bst-fav-open:hover { border-color: #818cf8; color: #a5b4fc; }
body.dark-mode .bst-fav-del:hover { background: #2a0a0a; }
