/* 共用布局轨道、标题与分段导航；不覆盖业务隐藏状态。 */
body.hd2d-preview #app-view .header-welcome,
body.hd2d-preview #app-view #home-mobile-goal,
body.hd2d-preview #app-view #home-header-goal {display:none!important}
body.hd2d-preview #app-view #today-workspace #tablet-streak-panel {display:none!important}
body.hd2d-preview #app-view #today-workspace .overview-column {display:grid;gap:18px;align-content:start}
body.hd2d-preview #app-view #today-workspace :is(.home-goal-panel,.home-insights) {padding:20px;border:1px solid var(--glass-edge);border-radius:12px;background:var(--glass-panel);box-shadow:var(--glass-highlight);backdrop-filter:var(--glass-blur);-webkit-backdrop-filter:var(--glass-blur)}
body.hd2d-preview #app-view #home-goal-slot .fg-savings {margin:0;padding:0;border:0;background:transparent;box-shadow:none;flex-wrap:wrap}
body.hd2d-preview #app-view #home-goal-slot .fg-savings-main {min-width:0;flex:1}
body.hd2d-preview #app-view #home-goal-slot .fg-savings-main strong {overflow-wrap:anywhere}
body.hd2d-preview #app-view #today-workspace .home-insights :is(.race-overview-panel,.streak-panel) {padding:0;border:0;background:transparent;box-shadow:none;backdrop-filter:none;margin:18px 0 0}
body.hd2d-preview #app-view #today-workspace .home-insights [hidden] {display:none!important}
body.hd2d-preview #app-view #today-workspace .overview-cheer,
body.hd2d-preview #app-view #today-workspace .overview-note,
body.hd2d-preview #app-view #home-overview-panel .eyebrow {display:none}
/* 四类分段导航使用同一视觉，文字使用已下载的小赖字体。 */
body.hd2d-preview #app-view :is(.family-rpg .rpg-nav,.family-rpg .wizard-steps,.parent-center-tabs,#rewards-view>.reward-tabs,.insight-tabs) {
  display:flex;align-items:stretch;gap:6px;padding:6px;margin:0 0 20px;
  border:1px solid var(--glass-line);border-radius:12px;background:var(--glass-tabs);box-shadow:none;
}
body.hd2d-preview #app-view :is(.family-rpg .rpg-nav,.family-rpg .wizard-steps,.parent-center-tabs,#rewards-view>.reward-tabs,.insight-tabs)>button {
  display:flex;flex:1;align-items:center;justify-content:center;min-width:0;min-height:48px;
  margin:0;padding:10px 12px;border:1px solid transparent;border-radius:8px;background:transparent;
  box-shadow:none;color:#e8f0f6;font:700 18px/1.45 "Xiaolai",sans-serif;white-space:normal;
}
body.hd2d-preview #app-view :is(.family-rpg .rpg-nav,.family-rpg .wizard-steps,.parent-center-tabs,#rewards-view>.reward-tabs,.insight-tabs)>button:is(.active,.is-active,[aria-current=step],[aria-pressed=true]) {
  background:var(--fg-action);border-color:var(--fg-action);color:var(--fg-action-ink);box-shadow:none;
}
body.hd2d-preview #app-view .family-rpg .wizard-mobile-progress {display:none}
/* 三个页面同样的图标标题与帮助按钮。 */
body.hd2d-preview #app-view :is(.unified-heading,.rpg-topline) {display:flex;align-items:center;gap:20px;min-height:56px;margin:0 0 22px;padding:0;border:0}
body.hd2d-preview #app-view :is(.page-title-lockup,.rpg-title-lockup) {display:flex;align-items:center;gap:12px;flex:none}
body.hd2d-preview #app-view :is(.page-emblem,.rpg-topline .rpg-adventure-emblem) {display:block;width:56px;height:56px;object-fit:contain;filter:drop-shadow(0 3px 5px #07183270)}
body.hd2d-preview #app-view :is(.unified-heading,.rpg-topline) h1 {font:700 28px/1.3 "Xiaolai",sans-serif;margin:0;color:#f4f7fc}
body.hd2d-preview #app-view :is(.unified-heading,.rpg-topline) .page-help-button {min-height:44px;min-width:70px;padding:8px 12px;margin-left:auto;border:1px solid #d9eaf05c;border-radius:8px;background:var(--fg-raised);color:#edf5fa;box-shadow:none;font:400 16px/1.4 "Xiaolai",sans-serif;white-space:nowrap}
body.hd2d-preview #app-view .unified-heading>.page-heading-actions {margin-left:auto}
body.hd2d-preview #app-view #rewards-view>.reward-rules {margin:0 0 16px}
body.hd2d-preview #app-view #weekly-review-view .wr-heading {flex-wrap:wrap;justify-content:flex-start}
body.hd2d-preview #app-view #weekly-review-view .wr-period {display:flex;align-items:center;gap:10px;margin:0;flex-wrap:nowrap}
body.hd2d-preview #app-view #weekly-review-view .wr-period>div {min-width:180px}
body.hd2d-preview #app-view #weekly-review-view .wr-period>.wr-chip {display:none}
body.hd2d-preview #app-view #weekly-review-view .wr-period>button {min-height:44px}
/* 查看宝箱和重复挑战为同级并排操作。 */
body.hd2d-preview #app-view .family-rpg .rpg-v11-actions>div {display:flex;align-items:stretch;gap:12px;flex-wrap:wrap}
body.hd2d-preview #app-view .family-rpg .rpg-v11-actions>div>button {flex:1;min-width:0;width:auto;margin:0;min-height:48px;white-space:nowrap}
body.hd2d-preview #app-view .family-rpg .rpg-v11-actions .rpg-v11-repeat {padding:10px 16px;border:1px solid #d9eaf05c;border-radius:8px;background:var(--fg-raised);color:#e9f5fa;font:700 18px/1.4 "Xiaolai",sans-serif}
body.hd2d-preview #app-view .family-rpg :is(.rpg-adventure-layout,.rpg-adventure-scene,.rpg-adventure-controls) {display:contents}
body.hd2d-preview #app-view .family-rpg .rpg-status-board {display:none}
body.hd2d-preview #app-view .family-rpg .rpg-mobile-experience {display:none}
body.hd2d-preview #app-view .family-rpg :is(.rpg-stage-health,.rpg-battle-health) {display:none}
body.hd2d-preview #app-view .family-rpg .rpg-chapter-title {display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}
body.hd2d-preview #app-view .family-rpg .rpg-round-complete {display:inline-flex;align-items:center;flex:none;min-height:26px;padding:3px 10px;border:1px solid #bce7d45c;border-radius:4px;background:#426D73;color:#d9f5df;font:500 12px/1.4 "Xiaolai",sans-serif;white-space:nowrap}
body.hd2d-preview #app-view .family-rpg .rpg-prepare-next {font-size:14px;min-height:36px;padding:4px 6px}
/* 日期统一进入标题行，分类独占下一行。 */
body.hd2d-preview #app-view #today-workspace .daily-filters .date-row {display:none!important}
body.hd2d-preview #app-view #today-workspace .daily-column {touch-action:pan-y pinch-zoom}
body.hd2d-preview #app-view #today-workspace .daily-filters {display:flex;gap:12px;align-items:center;margin:0 0 20px;min-width:0;order:3}
body.hd2d-preview #app-view #today-workspace .daily-filters .date-row {flex:none;min-height:0;margin:0;order:0}
body.hd2d-preview #app-view #today-workspace .daily-filters .date-control {width:176px;min-height:48px;padding:0;border-radius:8px}
body.hd2d-preview #app-view #today-workspace .daily-filters .date-step {flex:0 0 36px;width:36px;height:48px;min-height:48px}
body.hd2d-preview #app-view #today-workspace .daily-filters .date-picker-wrap {min-height:28px;height:28px}
body.hd2d-preview #app-view #today-workspace .daily-filters .date-mobile-context {height:24px}
body.hd2d-preview #app-view #today-workspace .daily-filters #date-mobile-weekday {display:none}
body.hd2d-preview #app-view #today-workspace .daily-filters #category-tabs {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex:1;min-width:0;margin:0;padding:0;gap:6px;order:0}
body.hd2d-preview #app-view #today-workspace .daily-filters #category-tabs button {min-width:0;min-height:52px;padding:6px;gap:5px;font-size:18px;white-space:nowrap}
body.hd2d-preview #app-view #today-workspace .daily-filters #category-tabs img {width:24px;height:24px}
@media(min-width:768px) and (orientation:landscape),(min-width:1025px) {
  body.hd2d-preview #app-view #today-workspace :is(.mobile-overview,#mobile-streak-button) {display:none!important}
  body.hd2d-preview #app-view #adventure-view .rpg-topline {min-height:44px;margin-bottom:12px}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-emblem {width:44px;height:44px}
  body.hd2d-preview #app-view #adventure-view .rpg-nav {padding:4px;margin-bottom:12px}
  body.hd2d-preview #app-view #adventure-view .rpg-nav>button {min-height:38px;padding:5px 10px;font-size:17px}
  body.hd2d-preview #app-view #adventure-view .rpg-v11-adventure>.rpg-page-heading {margin:0 0 12px;gap:10px}
  body.hd2d-preview #app-view #adventure-view .rpg-page-heading p {margin:4px 0;font-size:15px;line-height:1.4}
  body.hd2d-preview #app-view #adventure-view .rpg-page-heading h2 {margin:5px 0;font-size:23px;line-height:1.3}
  body.hd2d-preview #app-view #adventure-view .rpg-current-hp {display:none}
  body.hd2d-preview #app-view #adventure-view .rpg-hd-boss-name {display:flex;flex-direction:column;align-items:stretch;gap:6px;right:8%;bottom:4%;width:180px;max-width:42%;padding:9px 12px 7px;border:1px solid #8cc4da88;border-radius:2px;background:linear-gradient(110deg,#102234ed,#17384bc9);box-shadow:inset 3px 0 0 #83bdd4aa,0 5px 15px #06152766;clip-path:polygon(0 9px,9px 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%);pointer-events:none}
  body.hd2d-preview #app-view #adventure-view .rpg-hd-boss-name>span:first-child {font-size:14px;letter-spacing:1px;text-align:left;line-height:1.2}
  body.hd2d-preview #app-view #adventure-view .rpg-stage-health {display:grid;grid-template-columns:1fr auto auto;align-items:baseline;gap:4px;color:#c0d4df;font:400 11px/1.2 "Xiaolai",sans-serif}
  body.hd2d-preview #app-view #adventure-view .rpg-stage-health::before {content:"";grid-column:1/-1;height:6px;margin-bottom:1px;border:1px solid #ffc5ac77;background:repeating-linear-gradient(90deg,transparent 0,transparent 23%,#14283d99 24%,transparent 25%),linear-gradient(180deg,#ffc39a,#dc795f);background-color:#0c1c2c;background-size:100% 100%,calc(var(--battle-hp,1)*100%) 100%;background-repeat:no-repeat;box-shadow:0 0 8px #efaa7955;transform:skewX(-14deg)}
  body.hd2d-preview #app-view #adventure-view .rpg-stage-health.is-cleared::before {background:#0c1c2c;border-color:#8caaad66;box-shadow:none}
  body.hd2d-preview #app-view #adventure-view .rpg-stage-health strong {font:700 16px/1.2 "Xiaolai",sans-serif;color:#ffe1b2}
  body.hd2d-preview #app-view #adventure-view .rpg-stage-health.is-cleared {color:#d4e9dc}
  body.hd2d-preview #app-view #adventure-view .rpg-hd-stage {height:clamp(180px,calc(100dvh - 320px),400px);min-height:0}
  body.hd2d-preview #app-view #adventure-view .rpg-v11-actions {margin-top:10px}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-layout {display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px;align-items:stretch}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-scene {display:block;min-width:0}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-controls {display:flex;flex-direction:column;gap:14px;min-width:0;padding:18px;border:1px solid #b2dce969;border-radius:12px;background:var(--glass-controls);box-shadow:var(--glass-card-shadow)}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-controls .rpg-v11-summary {display:none}
  body.hd2d-preview #app-view #adventure-view .rpg-status-board {display:flex;flex-direction:column;order:-2;flex:1;gap:16px;min-height:0}
  body.hd2d-preview #app-view #adventure-view .rpg-status-board>header {display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:16px;letter-spacing:1px}
  body.hd2d-preview #app-view #adventure-view .rpg-status-indicator {display:flex;align-items:center;gap:5px;font:400 11px/1.4 "Xiaolai",sans-serif;letter-spacing:0;color:#c4e9dd}
  body.hd2d-preview #app-view #adventure-view .rpg-status-indicator::before {content:"";width:5px;height:5px;border-radius:50%;background:#b8e8d4;box-shadow:0 0 9px #a1edcf80}
  body.hd2d-preview #app-view #adventure-view .rpg-status-metrics {display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #c5e7ed25;border-bottom:1px solid #c5e7ed25;padding:12px 0}
  body.hd2d-preview #app-view #adventure-view .rpg-status-metrics> :is(div,button) {display:flex;flex-direction:column;align-items:center;gap:6px;padding:0;min-height:0;min-width:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#edf7ff}
  body.hd2d-preview #app-view #adventure-view .rpg-status-metrics>button {border-left:1px solid #c5e7ed25;color:#f3d494}
  body.hd2d-preview #app-view #adventure-view .rpg-status-metrics span {font:400 12px/1.4 "Xiaolai",sans-serif;color:#c0d4e3}
  body.hd2d-preview #app-view #adventure-view .rpg-status-metrics strong {font:700 28px/1.1 "Xiaolai",sans-serif}
  body.hd2d-preview #app-view #adventure-view .rpg-status-metrics small {font-size:13px;color:#b9d6e4}
  body.hd2d-preview #app-view #adventure-view .rpg-level-progress {display:grid;gap:7px}
  body.hd2d-preview #app-view #adventure-view .rpg-level-progress :is(header,footer) {display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#bdd8e5}
  body.hd2d-preview #app-view #adventure-view .rpg-level-progress header {letter-spacing:1px;color:#a1e5ef}
  body.hd2d-preview #app-view #adventure-view .rpg-xp-track {height:9px;overflow:hidden;border:1px solid #a4d6e866;background:#0b213680;transform:skewX(-12deg);box-shadow:inset 0 1px 4px #04122188}
  body.hd2d-preview #app-view #adventure-view .rpg-xp-track i {display:block;height:100%;width:var(--xp-progress);background:repeating-linear-gradient(90deg,transparent 0,transparent 18px,#16455f99 19px,transparent 20px),linear-gradient(180deg,#b9f1ed,#55afc6);box-shadow:0 0 10px #83e9ed99}
  body.hd2d-preview #app-view #adventure-view .rpg-status-board {gap:12px}
  body.hd2d-preview #app-view #adventure-view .rpg-status-weapon {display:grid;grid-template-columns:minmax(116px,1.3fr) minmax(0,1fr);grid-template-rows:auto auto;gap:6px 10px;align-items:center;align-content:center;flex:1}
  body.hd2d-preview #app-view #adventure-view .rpg-status-weapon-art {grid-column:1;grid-row:1/3;display:flex;align-items:center;justify-content:center;min-height:0;background:radial-gradient(ellipse,#9edbf038,transparent 70%)}
  body.hd2d-preview #app-view #adventure-view .rpg-status-weapon-art svg {width:100%;max-width:164px;height:112px;filter:drop-shadow(0 8px 8px #07192a70)}
  body.hd2d-preview #app-view #adventure-view .rpg-status-weapon-label {display:flex;flex-direction:column;gap:4px;min-width:0}
  body.hd2d-preview #app-view #adventure-view .rpg-status-weapon-label span {font-size:11px;color:#bed4e2}
  body.hd2d-preview #app-view #adventure-view .rpg-status-weapon-label strong {font-size:17px;overflow-wrap:anywhere}
  body.hd2d-preview #app-view #adventure-view .rpg-status-weapon>button {font-size:13px;min-height:36px;padding:6px 8px;border:1px solid #c5e7ed40;border-radius:8px;background:var(--fg-raised)}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-controls .rpg-v11-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;order:2}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-controls .rpg-v11-actions>div {display:contents}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-controls .rpg-v11-actions button {font-size:16px;padding:10px 6px;min-height:44px;align-self:stretch}
  body.hd2d-preview #app-view #adventure-view .rpg-v11-actions>[data-action="quick-weapons"] {display:none}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-controls .rpg-v11-goal {margin:0;font-size:15px}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-scene .rpg-hd-stage {height:100%;min-height:clamp(240px,calc(100dvh - 320px),400px)}
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-scene .rpg-inline-battle {height:100%}
  body.hd2d-preview:has(#app-view) #app-view {padding:18px}
  body.hd2d-preview:has(#app-view) #app-view .topbar {position:fixed;top:164px;left:18px;width:192px;display:block;min-height:0;margin:0;padding:0;z-index:12}
  body.hd2d-preview:has(#app-view) #app-view .brand-heading {position:fixed;top:12px;left:18px;width:192px;height:148px;min-height:148px;padding:6px}
  body.hd2d-preview:has(#app-view) #app-view .topbar .top-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
  body.hd2d-preview:has(#app-view) #app-view .topbar .header-resources {display:contents}
  body.hd2d-preview:has(#app-view) #app-view .topbar .current-child-context {display:none}
  body.hd2d-preview:has(#app-view) #app-view .topbar #current-parent-mode {font-size:10px;padding:1px 4px}
  body.hd2d-preview:has(#app-view) #app-view .topbar #child-switcher {max-width:100%}
  body.hd2d-preview:has(#app-view) #app-view .topbar .top-actions .balance {grid-column:auto;grid-row:1;display:grid;grid-template-columns:22px auto;align-items:center;align-content:center;justify-content:center;gap:2px 6px;min-width:0;min-height:44px;padding:2px;border:0;background:transparent;box-shadow:none}
  body.hd2d-preview:has(#app-view) #app-view .topbar .balance img {width:22px;height:22px;grid-column:1;grid-row:1}
  body.hd2d-preview:has(#app-view) #app-view .topbar .balance strong {font-size:16px}
  body.hd2d-preview:has(#app-view) #app-view .topbar .balance span {display:block;grid-column:1/-1;grid-row:2;font:400 11px/1.3 "Xiaolai",sans-serif;text-align:center;color:#dbe8ef}
  body.hd2d-preview:has(#app-view) #app-view .topbar #role-action {position:fixed;left:34px;bottom:20px;display:flex;align-items:center;justify-content:center;gap:7px;min-height:36px;width:160px;font:400 14px/1.4 "Xiaolai",sans-serif;white-space:nowrap;padding:6px 10px;border:0;background:transparent;backdrop-filter:none;box-shadow:none;border-radius:10px;color:#e1edf4;text-shadow:0 1px 4px #071a33}
  body.hd2d-preview:has(#app-view) #app-view .topbar #role-action::before {content:"";width:17px;height:17px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5e8f4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 6v6c0 4 4 7 8 9 4-2 8-5 8-9V6z'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") center/contain no-repeat}
  body.hd2d-preview:has(#app-view) #app-view .topbar #role-action:hover {color:white;background:#dceaf00d}
  body.hd2d-preview:has(#app-view) #app-view .page-nav {left:18px;top:var(--rail-nav-top,246px);width:192px;max-height:calc(100dvh - var(--rail-nav-top,246px) - 76px);overflow-y:auto}
  body.hd2d-preview:has(#app-view) #app-view .page-nav {gap:6px;padding:8px}
  body.hd2d-preview:has(#app-view) #app-view .page-nav button {min-height:52px;height:auto;padding:8px 16px}
  body.hd2d-preview:has(#app-view) #app-view :is(.page-shell,#today-workspace:not(.hidden)) {max-width:none;width:auto;margin:0 0 0 210px}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace:not(.hidden) {display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.85fr);gap:18px}
}
@media(min-width:768px) and (max-height:600px) and (orientation:landscape) {
  body.hd2d-preview:has(#app-view) #app-view .brand-heading {height:110px;min-height:110px;top:6px}
  body.hd2d-preview:has(#app-view) #app-view .topbar {top:118px}
  body.hd2d-preview:has(#app-view) #app-view .page-nav button {min-height:44px;padding:6px 16px}
}
@media(min-width:768px) and (max-height:740px) and (orientation:landscape) {
  body.hd2d-preview #app-view #adventure-view .rpg-adventure-controls {padding:12px;gap:10px}
  body.hd2d-preview #app-view #adventure-view .rpg-status-board {gap:8px}
  body.hd2d-preview #app-view #adventure-view .rpg-status-board>header {font-size:14px}
  body.hd2d-preview #app-view #adventure-view .rpg-status-metrics {padding:8px 0}
  body.hd2d-preview #app-view #adventure-view .rpg-status-metrics strong {font-size:24px}
  body.hd2d-preview #app-view #adventure-view .rpg-status-weapon {gap:4px}
  body.hd2d-preview #app-view #adventure-view .rpg-status-weapon-art svg {height:90px}
  body.hd2d-preview #app-view #adventure-view .rpg-level-progress {gap:5px}
}
@media(min-width:768px) and (max-width:1100px) {
  body.hd2d-preview:has(#app-view) #app-view #today-workspace:not(.hidden) {grid-template-columns:minmax(0,1fr)}
  body.hd2d-preview #app-view #today-workspace .overview-column {grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
/* 已有卡片边界承担分区，取消重复的内部分隔线。 */
body.hd2d-preview #app-view #today-workspace:not(.hidden) #home-goal-slot .fg-savings {border-bottom:0;padding-bottom:0}
body.hd2d-preview #app-view .family-rpg .rpg-v11-map-chapter:not([open])>summary {border-bottom:0}
body.hd2d-preview #app-view .family-rpg .rpg-v11-equipment>.rpg-v11-summary {border-top:0;padding-top:0}
/* 浮层挂在页面外层，单独统一面板、标题和选项的玻璃层次。 */
body.hd2d-preview.hd2d-preview .fg-savings-dialog {border-width:1px;background:var(--fg-panel);border-radius:12px;backdrop-filter:none;color:var(--fg-text)}
body.hd2d-preview.hd2d-preview .fg-savings-dialog header {position:static;background:transparent;padding:0;margin:0 0 8px}
body.hd2d-preview .fg-savings-dialog .fg-savings-option {background:var(--fg-raised);border:1px solid var(--fg-border);color:var(--fg-text);box-shadow:none;min-height:62px}
body.hd2d-preview .fg-savings-dialog .fg-savings-option:hover {background:#426D73;border-color:var(--fg-action)}
body.hd2d-preview .fg-savings-dialog .fg-savings-option>span:last-child {color:#f3d79f;font-size:14px}
body.hd2d-preview .fg-savings-dialog [data-clear] {background:transparent;border-color:#d1e7ed30;color:#cbdce8;font-size:14px}
body.hd2d-preview .fg-savings-dialog [data-close] {background:#d5e9f00d;border-color:#d1e7ed40}
body.hd2d-preview .family-rpg .rpg-rewards-preview {width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 48px);margin:0;padding:22px;border-radius:12px;background:var(--fg-panel);backdrop-filter:none;border:1px solid var(--fg-border);color:var(--fg-text)}
body.hd2d-preview .family-rpg .rpg-modal-backdrop:has(.rpg-rewards-preview) {align-items:center;padding:16px;background:#08142699;backdrop-filter:none}
body.hd2d-preview .family-rpg .rpg-rewards-preview>.rpg-v11-modal-heading {position:static;background:transparent;margin:0 0 20px;padding:0;box-shadow:none;border:0}
body.hd2d-preview .family-rpg .rpg-v11-panel>.rpg-v11-modal-heading {background:transparent}
body.hd2d-preview .planning-dialog .planning-actions {position:static;background:transparent;padding:16px 0 0}
body.hd2d-preview .family-rpg .rpg-rewards-preview h2 {font-size:22px}
body.hd2d-preview .family-rpg .rpg-rewards-preview .rpg-reward-group {margin:0 0 12px;padding:16px;background:var(--fg-raised);border:1px solid var(--fg-border);border-radius:8px;box-shadow:none}
body.hd2d-preview .family-rpg .rpg-rewards-preview .rpg-reward-group:last-child {margin-bottom:0}
body.hd2d-preview .family-rpg .rpg-rewards-preview .rpg-reward-group h3 {font-size:14px;color:#c4dce9;margin:0 0 14px}
body.hd2d-preview .family-rpg .rpg-rewards-preview .rpg-reward-item {font:400 17px/1.5 var(--font-ui);color:#f4e4b9;gap:10px}
/* 两端共用：上一天、日期、下一天、回今天。 */
  body.hd2d-preview #app-view #today-workspace .daily-page-heading {display:flex;align-items:center;flex-wrap:nowrap;gap:4px}
  body.hd2d-preview #app-view #today-workspace .daily-page-heading h1 {display:none}
  body.hd2d-preview #app-view #daily-heading-date-steps {display:flex;align-items:center;gap:2px;margin:0 auto 0 0;flex:none}
  body.hd2d-preview #app-view #today-workspace #daily-heading-date-steps #record-date-trigger {display:grid;flex:none;place-items:center;width:auto;min-height:44px;padding:0 3px;background:transparent;border:0;box-shadow:none;border-radius:8px;color:#edf6ff}
  body.hd2d-preview #app-view #daily-heading-date-steps #record-date-label {display:none}
  body.hd2d-preview #app-view #daily-heading-date-steps #date-mobile-number {display:block;white-space:nowrap;font:700 clamp(16px,4.6vw,20px)/1.3 "Xiaolai",sans-serif}
  body.hd2d-preview #app-view #daily-heading-date-steps .date-actions {position:static;flex-basis:auto;margin:0}
  body.hd2d-preview #app-view #daily-heading-date-steps .date-actions:not(.hidden) {display:flex}
  body.hd2d-preview #app-view #daily-heading-date-steps .date-return {min-width:0;min-height:44px;height:44px;padding:0 3px;border:0;border-radius:8px;background:transparent;box-shadow:none;white-space:nowrap;font:500 12px/1.3 "Xiaolai",sans-serif;color:#bbebe1}
  body.hd2d-preview #app-view #daily-heading-date-steps .date-step {display:flex;align-items:center;justify-content:center;flex:none;width:32px;height:44px;min-height:44px;padding:0;margin:0;border:0;border-radius:10px;background:transparent;box-shadow:none;color:#edf6ff}
  body.hd2d-preview #app-view #today-workspace #daily-heading-date-steps .date-step svg {position:static;transform:none;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  body.hd2d-preview #app-view #daily-heading-date-steps .date-step:hover {background:#d8eefa1c}
  body.hd2d-preview #app-view #daily-heading-date-steps .date-step:focus-visible {outline:2px solid #b9eae6;outline-offset:1px}
  body.hd2d-preview #app-view #today-workspace .daily-heading-actions {display:flex;flex:none;gap:4px}
  body.hd2d-preview #app-view #today-workspace .daily-heading-actions button {min-width:0;padding:6px;font-size:13px;white-space:nowrap}
@media(min-width:768px) {
  body.hd2d-preview #app-view #daily-heading-date-steps {gap:6px}
  body.hd2d-preview #app-view #daily-heading-date-steps #date-mobile-number {font-size:24px}
  body.hd2d-preview #app-view #daily-heading-date-steps .date-step {width:40px}
  body.hd2d-preview #app-view #daily-heading-date-steps .date-return {font-size:14px;padding:0 8px}
  body.hd2d-preview #app-view #today-workspace .daily-heading-actions {gap:8px}
  body.hd2d-preview #app-view #today-workspace .daily-heading-actions button {font-size:15px;padding:8px 12px}
}
@media(max-width:767px) {
  body.hd2d-preview #app-view #today-workspace:not(.hidden) {display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
  body.hd2d-preview #app-view #today-workspace .overview-column {display:none}
  body.hd2d-preview #app-view #today-workspace .mobile-overview {display:flex!important;order:4;margin:8px 0 12px}
  body.hd2d-preview #app-view #today-workspace #home-mobile-goal {display:block!important;order:9;margin:12px 0 0;border:1px solid #d9efed55;border-radius:8px;background:var(--fg-raised)}
  body.hd2d-preview #app-view #home-mobile-goal>summary {min-height:48px;padding:12px 16px;font-size:17px;cursor:pointer;list-style-position:inside}
  body.hd2d-preview #app-view #home-mobile-goal[open]>summary {border-bottom:1px solid var(--glass-line)}
  body.hd2d-preview #app-view #home-mobile-goal-body {padding:0 14px}
  body.hd2d-preview #app-view #home-mobile-goal-body .fg-savings {border:0;padding:14px 0}
  body.hd2d-preview #app-view #today-workspace #mobile-streak-button {display:inline-flex!important;order:10;grid-column:1/-1;justify-self:stretch;margin:0;min-height:48px;padding:12px 16px;justify-content:flex-start;border-radius:8px;font-size:17px}
  body.hd2d-preview #app-view #today-workspace #mobile-streak-button strong {font-size:17px}
  body.hd2d-preview #app-view #today-workspace .daily-filters {gap:6px;margin:6px 0 10px}
  body.hd2d-preview #app-view #today-workspace .daily-filters .date-row {display:none!important}
  body.hd2d-preview #app-view #today-workspace .daily-filters .date-control {width:88px;min-height:44px}
  body.hd2d-preview #app-view #today-workspace .daily-filters .date-step,
  body.hd2d-preview #app-view #today-workspace .daily-filters #date-mobile-badge {display:none}
  body.hd2d-preview #app-view #today-workspace .daily-filters #category-tabs img {width:16px;height:16px}
  body.hd2d-preview #app-view #today-workspace .daily-filters .date-center .date-picker-wrap {min-height:44px;height:44px}
  body.hd2d-preview #app-view #today-workspace .daily-filters .date-mobile-context {height:auto;min-height:0}
  body.hd2d-preview #app-view #today-workspace .daily-filters #date-mobile-number {font-size:15px}
  body.hd2d-preview #app-view #today-workspace .daily-filters #category-tabs {gap:4px}
  body.hd2d-preview #app-view #today-workspace .daily-filters #category-tabs button {min-height:44px;padding:4px 2px;font-size:16px;gap:2px}
  body.hd2d-preview #app-view #today-workspace :is(.home-goal-panel,.home-insights) {padding:16px}
  body.hd2d-preview #app-view :is(.page-emblem,.rpg-topline .rpg-adventure-emblem) {width:36px;height:36px}
  body.hd2d-preview #app-view :is(.unified-heading,.rpg-topline) {gap:10px;min-height:44px;margin-bottom:16px}
  body.hd2d-preview #app-view :is(.unified-heading,.rpg-topline) h1 {font-size:23px}
  body.hd2d-preview #app-view :is(.page-title-lockup,.rpg-title-lockup) {gap:8px}
  body.hd2d-preview #app-view :is(.family-rpg .rpg-nav,.family-rpg .wizard-steps,.parent-center-tabs,#rewards-view>.reward-tabs,.insight-tabs) {gap:3px;padding:4px;border-radius:12px}
  body.hd2d-preview #app-view :is(.family-rpg .rpg-nav,.family-rpg .wizard-steps,.parent-center-tabs,#rewards-view>.reward-tabs,.insight-tabs)>button {min-height:44px;padding:6px 4px;font-size:16px}
  body.hd2d-preview #app-view .family-rpg .wizard-steps {flex-wrap:wrap}
  body.hd2d-preview #app-view .family-rpg .wizard-steps>button {flex:1 1 40%}
  body.hd2d-preview #app-view .family-rpg .rpg-v11-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  body.hd2d-preview #app-view .family-rpg .rpg-v11-actions>div {display:contents}
  body.hd2d-preview #app-view .family-rpg .rpg-v11-actions button {width:100%;min-width:0;min-height:44px;font-size:16px;align-self:stretch;padding:10px 6px}
  body.hd2d-preview #app-view .family-rpg .rpg-v11-actions .rpg-v11-repeat {font-size:17px;padding:10px}
  body.hd2d-preview #app-view .family-rpg .rpg-v11-actions>[data-action="quick-weapons"] {width:100%}
  body.hd2d-preview #app-view .family-rpg .rpg-mobile-experience {display:block;margin:0 0 12px}
  body.hd2d-preview #app-view .family-rpg .rpg-mobile-experience .rpg-level-progress {display:grid;gap:7px}
  body.hd2d-preview #app-view .family-rpg .rpg-mobile-experience :is(header,footer) {display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#bdd8e5}
  body.hd2d-preview #app-view .family-rpg .rpg-mobile-experience header {color:#a1e5ef}
  body.hd2d-preview #app-view .family-rpg .rpg-mobile-experience .rpg-xp-track {height:9px;border:1px solid #a4d6e866;background:#0b213680;transform:skewX(-12deg);overflow:hidden}
  body.hd2d-preview #app-view .family-rpg .rpg-mobile-experience .rpg-xp-track i {display:block;height:100%;width:var(--xp-progress);background:linear-gradient(180deg,#b9f1ed,#55afc6)}
  body.hd2d-preview #app-view #weekly-review-view .wr-period {order:3;flex:1 1 100%;justify-content:center;flex-wrap:wrap;margin:0}
  body.hd2d-preview #app-view #weekly-review-view .wr-period>div {min-width:0}
  body.hd2d-preview #app-view #weekly-review-view .wr-period span {font-size:14px}
}
@media(max-width:389px) {
  body.hd2d-preview #app-view #today-workspace .daily-filters #category-tabs img {display:none}
  body.hd2d-preview #app-view #daily-heading-date-steps .date-step {width:26px}
  body.hd2d-preview #app-view #today-workspace .daily-heading-actions {gap:2px}
  body.hd2d-preview #app-view #today-workspace .daily-heading-actions button {padding:5px 4px;font-size:12px}
}
/* 概览卡内只留轻量切换，不再套一整条导航容器。 */
body.hd2d-preview #app-view #today-workspace .home-insights .insight-tabs {display:flex;gap:8px;width:auto;border:0;background:transparent;box-shadow:none;padding:0;margin:0 0 14px}
body.hd2d-preview #app-view #today-workspace .home-insights .insight-tabs>button {flex:none;min-height:36px;padding:5px 12px;font-size:16px;border-radius:8px}
body.hd2d-preview #app-view #today-workspace .home-insights .insight-tabs>button[aria-pressed=true] {background:var(--fg-action);border-color:var(--fg-action);color:var(--fg-action-ink)}
/* 主信息统一品牌字体；说明、时间、来源、备注不进行全局字体替换。 */
body.hd2d-preview {--font-ui:"Xiaolai","Microsoft YaHei UI",sans-serif;font-family:system-ui,"Microsoft YaHei UI",sans-serif;font-variant-numeric:tabular-nums}
body.hd2d-preview:not(.pixel-preview) {--page-help-font:"Xiaolai","Microsoft YaHei UI",sans-serif}
body.hd2d-preview :is(h1,h2,h3,h4,h5,h6,button,summary,legend,label,.task-title,.group-title,.rpg-hd-name,.reward-name) {font-family:var(--font-ui)}
body.hd2d-preview :is(input,select,textarea,.task-meta,.task-record-detail,.streak-rules,.streak-rules-hint,.rpg-status-metrics,.wr-stat-label,.fg-savings-main small) {font-family:system-ui,"Microsoft YaHei UI",sans-serif;font-variant-numeric:tabular-nums}
body.hd2d-preview .family-rpg .wizard-reward-section {margin-top:18px;padding:16px 0 4px;border-top:1px solid var(--glass-line)}
body.hd2d-preview .family-rpg .wizard-reward-section h4 {margin:0 0 12px;font-size:18px;color:#e7f4f4}
body.hd2d-preview .family-rpg .wizard-reward-section>.rpg-button {margin-top:8px}
body.hd2d-preview .family-rpg .wizard-reward-section.is-random h4 {color:#f1daa7}
