/* Retained management layouts; the v2 frontend owns appearance. */
.settings-nav{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;gap:8px;padding:12px;margin:0 0 20px;background:var(--paper);border:1px solid var(--line);border-radius:12px;box-shadow:var(--polish-shadow)}
.settings-nav button{min-height:42px;border:1px solid transparent;border-radius:8px;padding:8px 15px;font-size:14px;background:transparent;color:var(--muted)}
.settings-nav button[aria-selected=true]{background:var(--accent-strong);color:#FFFFFF}
.settings-pane>.panel{margin:0 0 24px}.settings-pane :is(.model-video-editor,.deepseek-panel){margin-top:0}.settings-pane .panel{max-width:100%}
.settings-pane .settings-help{margin:0 0 16px;color:var(--muted);font-size:13px}
.calendar-month-control{max-width:190px}.calendar-heading{flex-wrap:wrap}.calendar-day-pick{display:block;min-height:30px;width:30px;border:0;background:transparent;border-radius:50%;padding:0;color:var(--ink);font-size:13px}
.calendar-day-pick:hover{background:var(--tile)}.calendar-cell.range-selected{background:var(--tint)}.calendar-cell.range-endpoint .calendar-day-pick{background:var(--accent-strong);color:#FFFFFF}
.calendar-range-help{font-size:13px;color:var(--muted);margin:10px 0}.calendar-range-status{min-height:24px;margin:14px 0 0;font-size:13px;color:var(--ui-strong)}
.calendar-bulk-form{margin-top:24px;border-top:1px solid var(--line);padding-top:12px}.calendar-bulk-form .field{margin-top:12px}.calendar-bulk-form h3{margin-top:8px}
.guard-panel,.gift-rules-panel{margin-top:28px}.guard-status-row{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}.guard-badge{display:inline-block;border:1px solid var(--line);border-radius:20px;padding:4px 10px;font-size:12px;color:var(--ui-strong);background:var(--tint)}
.guard-error{color:#527091}.dark .guard-error{color:#FF8FC8}.guard-history-form{margin-top:24px;padding-top:12px;border-top:1px solid var(--line)}
.gift-rule-row{border:1px solid var(--line);border-radius:8px;background:var(--paper);padding:16px;margin:15px 0}.gift-rule-row .form-grid{margin-top:12px}.gift-rule-row-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.gift-eligibility-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;margin:18px 0}.gift-eligibility-item{padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--tint)}.gift-eligibility-item strong{display:block;margin-bottom:7px}.gift-eligibility-item p{font-size:13px;margin:6px 0 0;color:var(--muted)}

@media(max-width:650px){.settings-nav{position:static}.calendar-heading{gap:10px}.calendar-day-pick{width:26px;min-height:26px}}
.site-footer{display:flex;justify-content:center;align-items:center;gap:10px;padding:16px 24px 64px;font-size:12.5px;line-height:1.6;color:var(--muted);background:var(--paper);border-top:1px solid var(--line)}
.site-footer a{color:var(--muted);text-decoration:none;border-bottom:1px dotted currentColor}
.site-footer a:hover{color:var(--ink)}
.gift-rule-picker{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:20px 0 12px}.gift-rule-picker>.field{flex:1;min-width:220px}.gift-rule-picker>button{min-height:44px}
.gift-rule-row>.field{margin-top:14px}.gift-rule-preview{display:grid;grid-template-columns:90px minmax(0,1fr);align-items:center;gap:16px;margin-top:18px;padding:14px;border-radius:8px;background:var(--tint)}.gift-rule-preview>img{display:block;width:90px;height:90px;object-fit:contain;background:var(--paper);border-radius:6px}.gift-rule-no-image{display:grid;place-items:center;min-height:90px;font-size:12px;color:var(--muted);text-align:center}.gift-rule-preview strong{font-size:14px;overflow-wrap:anywhere}.gift-rule-preview p{font-size:12px;line-height:1.7;margin:8px 0 12px}.gift-rule-preview button{min-height:40px}
@media(max-width:650px){.gift-rule-picker>.field{min-width:0;flex-basis:100%}.gift-rule-preview{grid-template-columns:68px minmax(0,1fr);gap:12px;padding:12px}.gift-rule-preview>img{width:68px;height:68px}.gift-rule-preview button{font-size:12px}.gift-rule-preview strong{font-size:13px}}
@media(max-width:600px){.site-footer{padding:14px 16px 58px;font-size:12px}}

.gift-cycle-summary{margin:20px 0;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--tint)}
.gift-cycle-summary h3{margin:0 0 14px}.gift-cycle-summary dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin:0}.gift-cycle-summary dl>div{min-width:0}.gift-cycle-summary dt{font-size:12px;color:var(--muted);margin-bottom:5px}.gift-cycle-summary dd{margin:0;font-size:14px;font-weight:600;overflow-wrap:anywhere}.gift-cycle-summary p:last-child{margin-bottom:0}.gift-cycle-review{padding:10px 12px;border-left:3px solid var(--ui-strong);background:var(--paper);border-radius:4px;color:var(--ui-strong)}.gift-cycle-table{margin-bottom:22px}.gift-cycle-table td{vertical-align:top}.guard-history-form input[type="datetime-local"]{min-width:0;width:100%}
@media(max-width:600px){.gift-cycle-summary{padding:14px}.gift-cycle-summary dl{grid-template-columns:1fr;gap:12px}}

.toolbox-guide-panel{position:fixed;z-index:90;right:20px;bottom:92px;width:min(360px,calc(100vw - 32px));max-height:calc(100dvh - 116px);overflow:auto;box-sizing:border-box;padding:16px 18px;background:#fff;border:1px solid #9ccfff;border-radius:16px;color:#29486e;box-shadow:0 8px 32px #315b8729;font-size:13px;line-height:1.65}
.toolbox-guide-panel[hidden]{display:none}.toolbox-guide-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:16px}.toolbox-guide-heading button{border:0;background:transparent;color:#476c97;font-size:24px;line-height:1;min-width:36px;min-height:36px;cursor:pointer}.toolbox-guide-panel p{margin:8px 0}.toolbox-guide-panel ul{padding-left:21px;margin:8px 0}.toolbox-guide-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 7px}.toolbox-guide-actions button{padding:7px 12px;border:1px solid #8ac5ff;border-radius:8px;background:#f0f8ff;color:#2566aa;cursor:pointer;min-height:36px}.toolbox-guide-actions button:first-child{background:#087dea;color:white}.toolbox-guide-panel small{font-size:12px;color:#6582a1}
.toolbox .toolbox-head #toolbox-guide-open{font-size:12px;min-height:32px;min-width:auto;padding:3px 7px;margin-left:auto;margin-right:6px;border:1px solid #bfdef8;border-radius:6px;background:#f4faff;color:#3e6e9e}
@media(max-width:650px){.toolbox-guide-panel{right:16px;bottom:86px;max-height:calc(100dvh - 112px);font-size:12px}}

/* 分步引导：遮罩避开需要操作的目标 */
.toolbox-guide-overlay[hidden]{display:none}.toolbox-guide-overlay{position:fixed;inset:0;z-index:9999;pointer-events:none}.guide-shade{position:fixed;background:rgba(10,22,38,.72);pointer-events:auto}.guide-spotlight{position:fixed;border:3px solid #84caff;border-radius:10px;box-shadow:0 0 0 2px #fff,0 0 20px #6dbbff;box-sizing:border-box;pointer-events:none}.guide-card{position:fixed;top:18px;left:50%;transform:translateX(-50%);width:min(390px,calc(100vw - 32px));max-height:45dvh;overflow:auto;box-sizing:border-box;padding:14px 16px;border:1px solid #9ccfff;border-radius:14px;background:#fff;color:#29486e;box-shadow:0 8px 30px #10283c66;font-size:14px;line-height:1.6;pointer-events:auto}.guide-card.guide-card-bottom{top:auto;bottom:18px}.guide-card p{margin:7px 0}.guide-card .guide-welcome{margin:0 0 5px;color:#1673c7;font-weight:700;font-size:14px;line-height:1.45}.guide-card .guide-progress{font-size:12px;color:#55799e}.guide-card small{font-size:12px;color:#6582a1}.guide-card button:focus-visible{outline:3px solid #1874d4;outline-offset:2px}@media(max-width:650px){.guide-card{font-size:13px;padding:12px 14px}.guide-card.guide-card-bottom{bottom:12px}}

/* 指引期间避免桌宠挡住高亮区域，不修改桌宠偏好 */
body.toolbox-guide-active :is(#pet,#pet-topics){visibility:hidden}

@media(max-height:500px){.guide-card{max-height:60dvh;padding:8px 14px;line-height:1.35}.guide-card p{margin:4px 0}.guide-card .guide-welcome{margin:0 0 3px}.toolbox-guide-actions{margin:6px 0 4px}}

/* 人设水泡与原人设区共享滚动区域；旧内容保留以便管理员切回。 */
#portfolio[data-persona-variant="pending"] > :is(#portfolio-background,.portfolio-body){visibility:hidden}
#portfolio[data-persona-variant="bubbles"] > :is(#portfolio-background,.portfolio-body){display:none!important}
#persona-bubbles-root[hidden]{display:none!important}

.account-currency {
 margin:20px 0;
 padding:clamp(16px,2vw,24px);
 border:1px solid var(--line);
 border-radius:14px;
 background:linear-gradient(135deg,var(--paper),var(--tint));
}
.account-currency .wallet-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.account-currency .wallet-heading h3,.account-currency h4 {margin:0;color:var(--ink)}
.account-currency .wallet-values {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr));gap:10px;margin:14px 0}
.wallet-values>div {min-width:0;padding:12px 15px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}
.wallet-values dt,.wallet-values small,.wallet-lot p,.wallet-empty,.wallet-rules {color:var(--muted)}
.wallet-values dt {font-size:13px}
.wallet-values dd {margin:4px 0 0;color:var(--ink);font-size:clamp(18px,2vw,23px);font-weight:700;font-variant-numeric:tabular-nums}
.wallet-values small {display:block;margin-top:3px;font-size:12px}
.account-currency .wallet-rules,.account-currency .wallet-empty {margin:5px 0 12px;font-size:13px;line-height:1.7}
.wallet-sources {border-top:1px solid var(--line);padding-top:3px}
.wallet-sources summary {cursor:pointer;padding:8px 0;color:var(--ink);font-size:14px;font-weight:600}
.wallet-sources summary:focus-visible {outline:2px solid var(--accent-strong);outline-offset:2px}
.account-currency .wallet-sources-table {width:100%;min-width:0;table-layout:fixed;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums}
.account-currency .wallet-sources-table :is(th,td) {text-align:right;padding:6px 5px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink)}
.account-currency .wallet-sources-table th:first-child {text-align:left}
.account-currency .wallet-sources-table thead th {font-size:12px;color:var(--muted);font-weight:500}
.wallet-batches {margin-top:8px}
.wallet-batches summary {color:var(--muted);font-size:13px}
.account-currency .wallet-lots {list-style:none;margin:0;padding:0}
.wallet-lot {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.wallet-lot:last-child {border-bottom:0}
.wallet-lot b {flex:none;font-variant-numeric:tabular-nums}
.wallet-lot-state {display:inline-block;margin-inline-start:8px;padding:1px 7px;border-radius:12px;color:var(--accent-strong);background:var(--paper);border:1px solid var(--line);font-size:11px}
.wallet-lot-state.is-ordinary {color:var(--muted);background:var(--tint)}
.account-currency .wallet-lot p {margin:4px 0 0;font-size:12px;line-height:1.6}
.wallet-more:not(:empty) {margin-top:10px}
@media(max-width:620px) {
 .account-currency {padding:14px}
 .account-currency .wallet-values {grid-template-columns:repeat(2,minmax(0,1fr))}
 .wallet-values>div:last-child:nth-child(3) {grid-column:1/-1}
}
