/* apps/divination.css — 占卜屋（独立模块样式，全部 dv- 前缀，不依赖平台主题变暗） */
/* 内页恒浅色：只使用本文件根变量与平台 --accent/--panel 系，不随 html[data-theme] 变暗 */

.dv-page {
    --dv-accent: #7b5ea7;
    --dv-accent-deep: #5e4690;
    --dv-soft: #f3eef9;
    --dv-paper: #faf8fd;
    --dv-ink: #3d3350;
    --dv-muted: #8b82a3;
    --dv-line: rgba(123, 94, 167, 0.16);
    --dv-gold: #8a6d3b;
    background: var(--dv-paper);
}

.dv-page .screen-content {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 240px),
        var(--dv-paper);
}

/* ============ 通用 ============ */

.dv-intro {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 15px 16px;
    border: 1px solid rgba(123, 94, 167, 0.14);
    border-radius: 18px;
    background: linear-gradient(135deg, #f1ebfb, #fcfaff);
}

.dv-intro-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(145deg, #9d86d6, #6657ad);
    font-size: 24px;
    box-shadow: 0 7px 16px rgba(102, 87, 173, 0.22);
}

.dv-intro h2 {
    color: var(--dv-ink);
    font-size: 19px;
}

.dv-intro p {
    margin-top: 3px;
    color: var(--dv-muted);
    font-size: 11px;
    line-height: 1.6;
}

.dv-actor-row {
    margin-bottom: 10px;
    padding: 0 4px;
    color: var(--dv-muted);
    font-size: 11px;
}

.dv-actor-row strong {
    color: var(--dv-accent-deep);
}

.dv-sec {
    margin-bottom: 14px;
}

.dv-sec-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 2px 2px 9px;
    color: var(--dv-ink);
    font-size: 14px;
    font-weight: 600;
}

.dv-link-btn {
    padding: 3px 10px;
    border: 1px solid rgba(123, 94, 167, 0.25);
    border-radius: 999px;
    color: var(--dv-accent-deep);
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    font-size: 11px;
}

.dv-card-box {
    padding: 14px;
    border: 1px solid var(--dv-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 5px 16px rgba(70, 55, 100, 0.05);
}

.dv-hint {
    color: var(--dv-muted);
    font-size: 10px;
    line-height: 1.6;
}

.dv-hint-center {
    text-align: center;
}

.dv-btn {
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}

.dv-btn:active {
    transform: scale(0.97);
}

.dv-btn:disabled {
    cursor: wait;
    opacity: 0.55;
    transform: none;
}

.dv-primary-btn {
    padding: 11px 18px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 6px 14px rgba(11, 147, 246, 0.18);
}

.dv-ghost-btn {
    padding: 9px 15px;
    color: var(--dv-accent-deep);
    background: var(--dv-soft);
}

.dv-danger-btn {
    width: 100%;
    padding: 10px;
    color: #b03a32;
    background: #fbeae8;
    font-size: 12px;
}

.dv-empty {
    padding: 26px 14px;
    color: var(--dv-muted);
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

.dv-loading {
    padding: 20px 12px;
    color: var(--dv-muted);
    font-size: 11px;
    text-align: center;
    animation: dv-blink 1.1s ease-in-out infinite;
}

.dv-loading::before {
    content: '✦';
    display: inline-block;
    margin-right: 6px;
    animation: dv-spin 2.4s linear infinite;
}

.dv-no-actor {
    padding: 34px 22px;
    color: var(--dv-muted);
    font-size: 12px;
    line-height: 1.8;
    text-align: center;
}

/* 子页顶部导航（内容区内自画 ←） */

.dv-subnav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.dv-back-btn {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(123, 94, 167, 0.28);
    border-radius: 50%;
    color: var(--dv-accent-deep);
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    line-height: 1;
}

.dv-subnav-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--dv-ink);
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dv-subnav-note {
    color: var(--dv-muted);
    font-size: 10px;
}

/* ============ 签筒（每日一签） ============ */

.dv-sign-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    padding: 20px 16px 18px;
}

.dv-sign-jar {
    position: relative;
    width: 92px;
    height: 104px;
    cursor: default;
}

.dv-sign-jar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 44px;
    height: 16px;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, #8d74bd, #6d56a4);
    transform: translateX(-50%);
    box-shadow: 0 2px 5px rgba(90, 66, 140, 0.35);
}

.dv-sign-jar::after {
    content: '';
    position: absolute;
    inset: 15px 10px 0;
    border-radius: 26px 26px 14px 14px;
    background:
        radial-gradient(ellipse at 30% 22%, rgba(255, 255, 255, 0.55) 0 12%, transparent 13%),
        linear-gradient(180deg, rgba(186, 165, 226, 0.55), rgba(129, 105, 178, 0.34));
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 -7px 12px rgba(94, 70, 144, 0.18), 0 6px 14px rgba(90, 66, 140, 0.2);
}

.dv-stick {
    position: absolute;
    z-index: 1;
    bottom: 18px;
    width: 7px;
    height: 58px;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(90deg, #e8b26a, #f6dcae 45%, #e2a452);
    box-shadow: 0 1px 2px rgba(140, 90, 30, 0.28);
    transform: rotate(var(--rot, 0deg));
    transform-origin: 50% 92%;
}

.dv-sign-jar .dv-stick:nth-child(1) { left: 22px; --rot: -14deg; }
.dv-sign-jar .dv-stick:nth-child(2) { left: 33px; --rot: -6deg; }
.dv-sign-jar .dv-stick:nth-child(3) { left: 44px; --rot: 0deg; }
.dv-sign-jar .dv-stick:nth-child(4) { left: 55px; --rot: 7deg; }
.dv-sign-jar .dv-stick:nth-child(5) { left: 66px; --rot: 15deg; }

.dv-sign-jar.shake {
    animation: dv-shake 0.9s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.dv-sign-zone .dv-zone-title {
    color: var(--dv-ink);
    font-size: 16px;
    font-weight: 650;
}

.dv-shake-btn {
    padding: 11px 34px;
}

.dv-signed-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 8px 4px 4px;
    text-align: center;
}

.dv-signed-date {
    color: var(--dv-muted);
    font-size: 11px;
}

.dv-level-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.dv-level-shangshang { color: #7a5a12; background: #f6edd8; border-color: rgba(138, 109, 59, 0.35); }
.dv-level-shangji { color: #a33d2e; background: #f9e7e2; border-color: rgba(163, 61, 46, 0.3); }
.dv-level-zhongji { color: #9c6224; background: #f8efe0; border-color: rgba(156, 98, 36, 0.28); }
.dv-level-zhongping { color: #4f6586; background: #e9eff7; border-color: rgba(79, 101, 134, 0.25); }
.dv-level-xiaxia { color: #5d5568; background: #efeaf4; border-color: rgba(93, 85, 104, 0.3); }

.dv-signed-poem-line {
    color: var(--dv-ink);
    font-size: 14px;
    letter-spacing: 0.3em;
}

/* ============ 签文解读 ============ */

.dv-reading {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 18px;
}

.dv-poem-paper {
    padding: 18px 12px 14px;
    border: 1px solid rgba(138, 109, 59, 0.22);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 253, 246, 0.9), rgba(250, 246, 235, 0.9));
    text-align: center;
    box-shadow: inset 0 0 0 4px rgba(250, 246, 235, 0.4);
}

.dv-poem-line {
    display: block;
    margin: 8px 0;
    color: var(--dv-ink);
    font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
    font-size: 16px;
    letter-spacing: 0.35em;
    line-height: 1.9;
    text-indent: 0.35em;
}

.dv-reading-p {
    margin: 0;
    color: #5b5368;
    font-size: 13px;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(5px);
    white-space: pre-wrap;
    word-break: break-word;
}

.dv-reading-p.in {
    animation: dv-fade-in 0.5s ease forwards;
}

.dv-rp-head {
    color: var(--dv-accent-deep);
    font-size: 13px;
    font-weight: 600;
}

.dv-rp-note {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--dv-muted);
    background: var(--dv-soft);
    font-size: 11px;
}

.dv-rp-meaning,
.dv-rp-advice {
    padding-left: 10px;
    border-left: 2px solid #cdbfe9;
}

.dv-rp-advice {
    border-left-color: var(--dv-gold);
    color: #6d5a33;
    font-size: 12px;
}

.dv-rp-pos {
    color: var(--dv-accent-deep);
    font-size: 12px;
    font-weight: 700;
}

.dv-result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    color: var(--dv-muted);
    font-size: 10px;
}

/* ============ 塔罗 ============ */

.dv-flow-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 18px;
}

.dv-spread-options {
    display: flex;
    gap: 9px;
}

.dv-spread-card {
    flex: 1;
    padding: 12px 8px;
    border: 1.5px solid rgba(123, 94, 167, 0.18);
    border-radius: 15px;
    color: var(--dv-muted);
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.dv-spread-card small {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    opacity: 0.85;
}

.dv-spread-card.on {
    border-color: var(--dv-accent);
    color: var(--dv-accent-deep);
    background: var(--dv-soft);
    font-weight: 700;
}

.dv-spread-card:active {
    transform: scale(0.97);
}

.dv-question-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dv-question-box textarea {
    display: block;
    width: 100%;
    min-height: 58px;
    padding: 10px 12px;
    resize: vertical;
    border: 1px solid rgba(123, 94, 167, 0.28);
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
    color: var(--dv-ink);
    background: #fff;
    font: inherit;
    font-size: 13px;
    line-height: 1.6;
}

.dv-question-box textarea:focus {
    border-color: var(--dv-accent);
}

.dv-char-count {
    align-self: flex-end;
    color: #b3aac2;
    font-size: 10px;
}

.dv-char-count.over {
    color: #c0392b;
    font-weight: 700;
}

.dv-flow-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* 牌阵与翻牌 */

.dv-spread {
    display: flex;
    justify-content: center;
    gap: 11px;
}

.dv-card {
    width: 92px;
    height: 140px;
    flex: 0 0 92px;
    perspective: 600px;
}

.dv-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.45, 0.1, 0.3, 1);
}

.dv-card.dv-card-flip .dv-card-inner {
    transform: rotateY(180deg);
}

.dv-card-back,
.dv-card-face {
    position: absolute;
    inset: 0;
    border-radius: 13px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 7px 16px rgba(70, 55, 100, 0.18);
}

.dv-card-back {
    display: grid;
    place-items: center;
    border: 3px solid rgba(255, 255, 255, 0.65);
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.07) 0 6px, transparent 6px 12px),
        linear-gradient(160deg, #8d74bd, #5e4690);
    color: rgba(255, 255, 255, 0.9);
    font-size: 24px;
}

.dv-card-back::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
}

.dv-card-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 6px;
    box-sizing: border-box;
    background:
        radial-gradient(ellipse at 30% 18%, rgba(255, 255, 255, 0.28), transparent 55%),
        linear-gradient(165deg, #9d86d6, #6a53ad);
    color: #fff;
    text-align: center;
    transform: rotateY(180deg);
}

.dv-card-pos {
    font-size: 9px;
    letter-spacing: 0.12em;
    opacity: 0.85;
}

.dv-card-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.dv-card-ori {
    padding: 2px 9px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    font-size: 10px;
    opacity: 0.92;
}

.dv-card-ori.reversed {
    background: rgba(70, 40, 110, 0.4);
}

/* 单张时放大 */

.dv-spread-single .dv-card {
    width: 124px;
    height: 186px;
    flex-basis: 124px;
}

.dv-spread-single .dv-card-name {
    font-size: 20px;
}

/* 解读段逐个浮现 */

.dv-tarot-reading {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dv-saved-tag {
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 999px;
    color: #fff;
    background: #4f9d69;
    font-size: 10px;
    animation: dv-fade-in 0.4s ease both;
}

/* ============ 占卜手记（历史/详情） ============ */

.dv-record-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-bottom: 18px;
}

.dv-record-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--dv-line);
    border-radius: 15px;
    box-sizing: border-box;
    color: inherit;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(70, 55, 100, 0.045);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background 0.15s ease, transform 0.1s ease;
}

.dv-record-item:active {
    background: var(--dv-soft);
    transform: scale(0.99);
}

.dv-record-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 12px;
    color: var(--dv-accent-deep);
    background: var(--dv-soft);
    font-size: 18px;
}

.dv-record-main {
    flex: 1;
    min-width: 0;
}

.dv-record-title {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    color: var(--dv-ink);
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dv-record-snippet {
    margin-top: 3px;
    overflow: hidden;
    color: var(--dv-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dv-record-date {
    flex: 0 0 auto;
    color: #b3aac2;
    font-size: 10px;
}

.dv-record-chevron {
    flex: 0 0 auto;
    color: #c6bede;
    font-size: 14px;
}

.dv-mini .dv-record-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 14px;
}

.dv-mini .dv-record-title {
    font-size: 12px;
}

.dv-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.dv-detail-header .dv-record-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 21px;
}

.dv-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--dv-muted);
    font-size: 11px;
}

.dv-detail-meta strong {
    color: var(--dv-ink);
    font-size: 14px;
}

.dv-record-body {
    padding-bottom: 16px;
}

.dv-delete-row {
    margin-top: 6px;
}

.dv-gap {
    height: 10px;
}

/* ============ 占卜屋入口卡（首页中间导航） ============ */

.dv-entries {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.dv-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--dv-line);
    border-radius: 17px;
    box-sizing: border-box;
    color: inherit;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 14px rgba(70, 55, 100, 0.05);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: transform 0.1s ease, background 0.15s ease;
}

.dv-entry:active {
    transform: scale(0.99);
    background: var(--dv-soft);
}

.dv-entry-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #a08ad9, #6a53ad);
    box-shadow: 0 5px 12px rgba(102, 87, 173, 0.22);
    font-size: 21px;
}

.dv-entry-icon.alt {
    background: linear-gradient(145deg, #e6c07e, #c89a4a);
    box-shadow: 0 5px 12px rgba(200, 154, 74, 0.24);
}

.dv-entry-main {
    flex: 1;
    min-width: 0;
}

.dv-entry-title {
    color: var(--dv-ink);
    font-size: 14px;
    font-weight: 700;
}

.dv-entry-desc {
    margin-top: 2px;
    color: var(--dv-muted);
    font-size: 10.5px;
    line-height: 1.5;
}

.dv-entry-chevron {
    color: #c6bede;
    font-size: 15px;
}

/* ============ AI 细解 · 占卜师名片 + 解文（v1.1） ============ */

/* 名片 = button（点击召唤占卜师）。细金渐变边框：外层渐变底 + padding:1px 内层浅卡
   （border 渐变无法配圆角，双背景是既定技巧）。内页恒浅色，金系不随主题变暗。 */
.dv-diviner-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 14px;
    padding: 1px;
    border: 0;
    border-radius: 18px;
    box-sizing: border-box;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    background: linear-gradient(135deg, #dcbc6c, #a87c3c 40%, #ecd396 62%, #b48844);
    box-shadow: 0 6px 16px rgba(138, 109, 59, 0.18);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s ease;
}

/* 模块首个 :hover（交互反馈惯例原本只靠 :active，桌面悬停仍留一点微亮） */
.dv-diviner-card:hover {
    box-shadow: 0 8px 20px rgba(138, 109, 59, 0.3);
}

.dv-diviner-card:active {
    transform: scale(0.985);
}

.dv-diviner-card:disabled {
    cursor: wait;
    opacity: 0.92;
}

.dv-diviner-card:disabled:active {
    transform: none;
}

.dv-diviner-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 13px;
    border-radius: 17px;
    background: linear-gradient(180deg, #fdfbf6, #faf5ea);
}

.dv-diviner-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #ecd094, #b0853f);
    box-shadow: 0 4px 10px rgba(176, 133, 63, 0.32), inset 0 0 0 2px rgba(255, 255, 255, 0.6);
    font-size: 21px;
}

.dv-diviner-main {
    flex: 1;
    min-width: 0;
}

.dv-diviner-name {
    color: #6b5126;
    font-size: 13.5px;
    font-weight: 700;
}

.dv-diviner-motto {
    margin-top: 3px;
    color: #9a7f4d;
    font-size: 10.5px;
    line-height: 1.5;
}

.dv-diviner-sign {
    color: #c9a85e;
    font-size: 13px;
}

/* pending：占卜师正在观牌（呼吸光，任务进度在 📋 AI 任务中心） */
.dv-diviner-card:disabled .dv-diviner-avatar {
    animation: dv-glow 1.9s ease-in-out infinite;
}

@keyframes dv-glow {
    0%, 100% { box-shadow: 0 4px 10px rgba(176, 133, 63, 0.32), inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
    50% { box-shadow: 0 4px 18px rgba(176, 133, 63, 0.62), inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
}

/* 解文卡（AI 产出回填 / 详情回看共用）：信笺质感 + 署名头 */
.dv-ai-reading {
    margin-top: 14px;
    padding: 13px 15px 14px;
    border: 1px solid rgba(138, 109, 59, 0.2);
    border-radius: 18px;
    background: linear-gradient(180deg, #fdfbf4, #faf5e9);
    box-shadow: 0 5px 16px rgba(138, 109, 59, 0.08);
    animation: dv-fade-in 0.35s ease;
}

.dv-ai-reading-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    padding-bottom: 7px;
    border-bottom: 1px dashed rgba(138, 109, 59, 0.28);
}

.dv-ai-reading-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7a5c26;
    font-size: 11.5px;
    font-weight: 700;
}

.dv-ai-reading-time {
    flex: 0 0 auto;
    color: #b7a077;
    font-size: 10px;
}

.dv-ai-reading-p {
    margin: 8px 0 0;
    color: #4c4332;
    font-size: 12.5px;
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-word;
}

.dv-ai-reading-p:first-child {
    margin-top: 9px;
}

/* ============ toast ============ */

.dv-toast {
    position: fixed;
    left: 50%;
    bottom: 84px;
    z-index: 1200;
    padding: 10px 18px;
    border-radius: 12px;
    box-sizing: border-box;
    max-width: min(82vw, 340px);
    color: #fff;
    background: rgba(50, 42, 66, 0.92);
    font-size: 12.5px;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 8px 24px rgba(42, 35, 58, 0.28);
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.dv-toast-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ============ 关键帧（纯 CSS + class，headless 可等） ============ */

@keyframes dv-shake {
    0% { transform: translate(0, 0) rotate(0deg); }
    12% { transform: translate(-3px, 1px) rotate(-4deg); }
    26% { transform: translate(3px, -2px) rotate(5deg); }
    40% { transform: translate(-4px, 1px) rotate(-6deg); }
    54% { transform: translate(4px, 2px) rotate(6deg); }
    68% { transform: translate(-3px, -1px) rotate(-5deg); }
    82% { transform: translate(2px, 1px) rotate(4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes dv-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dv-blink {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@keyframes dv-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 330px) {
    .dv-card {
        width: 78px;
        height: 122px;
        flex-basis: 78px;
    }

    .dv-spread-single .dv-card {
        width: 108px;
        height: 164px;
        flex-basis: 108px;
    }
}

/* ── 子页让位：内容区自画 ← 承担返回，整条全局返回栏随子页形态隐藏 ──
   同 bookClub.css 先例（:has 声明式隐藏，免 JS 重复同步）：
   模块首页 data-dv-page="home" 保留全局返回键回桌面；其余子页整条让位。 */
.phone-screen:has(.dv-page[data-dv-page]:not([data-dv-page="home"])) #topBar {
    display: none !important;
}
