/* 导航与家长待办：保留现有品牌、字体和 HD-2D 素材。 */
.date-mobile-face { display:none; }
.page-heading-actions { display:flex;align-items:center;gap:10px; }
body.hd2d-preview #app-view :is([data-page-help],.page-help-button) { min-height:44px;padding:8px 12px;border:1px solid #b5c3d644;border-radius:8px;background:transparent;color:#c6d8e9;font:500 15px/1.4 var(--page-help-font,system-ui,sans-serif);white-space:nowrap;box-shadow:none; }
@media(max-width:767px), (min-width:768px) and (max-width:1024px) and (orientation:portrait) {
 body.hd2d-preview #app-view :is(.daily-page-heading,.parent-center-heading,.secondary-page-heading) { display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px; }
 body.hd2d-preview #app-view :is(.daily-page-heading,.parent-center-heading) > div,
 body.hd2d-preview #app-view .page-heading-actions { display:contents; }
 body.hd2d-preview #app-view :is(.daily-page-heading,.parent-center-heading,.secondary-page-heading) [data-page-help] { grid-column:3;grid-row:1;justify-self:end; }
 body.hd2d-preview #app-view :is(.parent-center-heading,.secondary-page-heading) > :first-child { grid-column:1/3;grid-row:1;min-width:0; }
 body.hd2d-preview #app-view :is(#parent-account-adjustment,#parent-exit,.secondary-page-heading .page-heading-actions > :first-child) { grid-row:2;justify-self:start; }
 body.hd2d-preview #app-view #parent-exit { grid-column:2/4;justify-self:end; }
 body.hd2d-preview #app-view .reward-hero { align-items:flex-start;gap:12px; }
 body.hd2d-preview #app-view .rpg-topline { display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px; }
 body.hd2d-preview #app-view .rpg-topline .rpg-title-lockup { min-width:0; }
 body.hd2d-preview #app-view .rpg-topline .rpg-brand-orbit { display:none; }
 body.hd2d-preview #app-view .rpg-topline .page-help-button { grid-column:3;grid-row:1; }
 body.hd2d-preview #app-view .rpg-topline .rpg-close { grid-column:2;grid-row:1; }
}
@media(max-width:360px){
 body.hd2d-preview #app-view #today-workspace button.mobile-streak-button { padding:4px;gap:3px;font-size:12px; }
 body.hd2d-preview #app-view #today-workspace button.mobile-streak-button img { width:16px;height:16px; }
 body.hd2d-preview #app-view #today-workspace .date-center #date-mobile-number { font-size:16px;letter-spacing:0;white-space:nowrap; }
}
/* 横屏双栏中列采用两列分类，避免图标挤压文字和第四项溢出。 */
@media (min-width:768px) and (orientation:landscape), (min-width:1025px) {
 .hd2d-preview #today-workspace .category-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .hd2d-preview #today-workspace .category-tabs button { min-width:0;white-space:nowrap; }
 .hd2d-preview .header-welcome { display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;align-content:center;gap:12px;padding:16px 20px; }
 .hd2d-preview .header-welcome-planet { width:32px;height:32px;filter:none; }
 .hd2d-preview #header-welcome-message { margin:0;font-size:18px;line-height:1.5;color:#dce7f4;text-shadow:none;text-wrap:balance;overflow-wrap:anywhere; }
 .hd2d-preview #header-tutorial-slot { margin:0; }
 .hd2d-preview #header-tutorial-slot .fg-tutorial-entry { display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;border:1px solid #b5c3d633;border-radius:var(--tutorial-entry-radius,22px);background:#ffffff05;color:#b9cbdc;font:500 14px/1.4 system-ui,sans-serif; }
 .hd2d-preview #header-tutorial-slot .fg-tutorial-entry-icon { margin:0;width:18px;height:18px;font-size:13px; }
 .hd2d-preview #header-tutorial-slot .fg-tutorial-entry:hover { background:#ffffff0d;color:#e3f5f1;border-color:#86c9c077; }
}
.parent-center-tabs { padding-bottom:12px;border-bottom:2px solid #648caa; }
.hd2d-preview.parent-mode .parent-center-tabs button.active { background:#86e3d9;color:#17414d;border-color:#c4fff2;box-shadow:inset 0 -3px 0 #428a85; }
.parent-quick-actions { padding:12px 0;margin-top:0; }
.parent-quick-actions>span { grid-column:1/-1;color:#c6d8ed;font-size:15px; }
.parent-quick-actions button { text-align:left;box-shadow:none; }
#project-view:not(.mobile-editor-open) .project-editor { display:none; }
#project-view:not(.mobile-editor-open) .config-grid,#project-view:not(.mobile-reward-editor-open) .reward-config-grid { grid-template-columns:minmax(0,1fr); }
#project-view .settings-detail-editor { border-radius:18px;padding:18px;min-width:0;box-shadow:none; }
#project-new,#reward-create { white-space:nowrap;flex-shrink:0; }
.rpg-parent-embedded>.rpg-topline,.rpg-parent-embedded>.rpg-nav { display:none; }
.family-rpg .rpg-parent-embedded { padding:0;background:transparent;border:0;box-shadow:none; }
.family-rpg .rpg-current-hp { color:#e5d3ad;font-size:18px;margin:8px 0; }
.family-rpg .rpg-page-heading .rpg-button { min-height:44px;font-family:inherit; }
#nav-history,#nav-ledger,#nav-parent-rewards,#project-settings,#parent-todo,.mobile-parent-tools { display:none!important; }
.page-nav #nav-rewards { display:flex!important; }
.page-nav #nav-adventure.hidden { display:none!important; }
@media(max-width:767px){.page-nav:has(#nav-adventure.hidden) { grid-template-columns:repeat(3,minmax(0,1fr))!important; }}
.current-child-context { display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0; }
#current-parent-mode { color:#a9edda;font-size:14px; }
#child-switcher { min-height:44px;max-width:140px; }
.daily-page-heading { align-items:center;gap:8px; }
.daily-page-heading h1 { font-size:25px; }
.daily-page-heading>div,.parent-center-heading>div { display:flex;gap:8px;flex-wrap:wrap; }
.daily-page-heading button { min-height:44px; }
#today-summary { display:none; }
.task-operation-message { grid-column:1/-1;flex-basis:100%;margin:8px 0 0;color:#a5edd5;font-size:18px;overflow-wrap:anywhere; }
.task-inline-status { color:#c6eee1;min-height:44px;display:flex;align-items:center;font-size:17px;grid-column:1/-1;flex-basis:100%;width:100%; }
.task-record-detail { margin-top:8px; }
.task-record-detail summary { min-height:44px;display:flex;align-items:center;cursor:pointer; }
.task-record-detail p { overflow-wrap:anywhere; }
.task-card { flex-wrap:wrap; }
.hd2d-preview.parent-mode #today-workspace .task-card { background:linear-gradient(135deg,#203858,#162b48);border-color:#668ba7;color:#edf5ff; }
.hd2d-preview.parent-mode #today-workspace .task-card .task-title { color:#edf5ff; }
.hd2d-preview.parent-mode #today-workspace .task-card .task-meta,.hd2d-preview.parent-mode #today-workspace .task-card .task-value-label { color:#c6d9e8; }
.hd2d-preview.parent-mode #today-workspace .task-card input { background:#10243e;color:#edf5ff;border-color:#789eb6; }
.task-card button { min-height:44px; }
#today-completed-section>summary { cursor:pointer;min-height:44px; }
.parent-center-heading { flex-wrap:wrap; }
.parent-center-heading h1 { font-size:27px;overflow-wrap:anywhere; }
.parent-center-tabs,.parent-daily-actions { display:grid;gap:10px;margin:14px 0 20px; }
.parent-center-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); }
.parent-daily-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
.parent-center-tabs button,.parent-daily-actions button { min-height:48px;padding:10px 8px; }
#manage-view .rpg-parent-shortcut,#manage-view .parent-approval-heading,#manage-view .parent-todo-summary,#parent-reward-panel>.panel-heading { display:none; }
#manage-view .manage-grid { display:block; }
#manage-view .weekly-panel { display:none; }
#manage-view .parent-approval-panel,#manage-view .parent-todo-lane { background:transparent;border:0;padding:0;box-shadow:none; }
#manage-view .parent-todo-lane>.panel-heading .eyebrow { display:none; }
#manage-view #parent-checkin-panel>.panel-heading h2,
#manage-view .parent-reward-queue h3 { margin:0 0 9px;color:#dbe6ff;font-size:22px;font-weight:700;line-height:1.4; }
#manage-view .parent-reward-queues { gap:24px; }
#manage-view .reward-fulfill-card { display:grid;gap:14px;padding:18px; }
#manage-view .reward-fulfill-tags { display:flex;flex-wrap:wrap;gap:8px; }
#manage-view .reward-fulfill-tag { display:inline-flex;align-items:center;padding:5px 10px;border:1px solid #7896b5;border-radius:8px;background:#152b46;color:#dbe6ff;font-size:15px;line-height:1.4; }
#manage-view .reward-fulfill-tag.is-source { border-color:#5baba8;background:#173d46;color:#a9eddf; }
#manage-view .reward-fulfill-card>button { justify-self:start;min-height:44px; }
.hd2d-preview.parent-mode #manage-view>.page-heading::after { content:none!important; }
.todo-empty { padding:5px 0 14px;margin:0;color:#bdd0e6;border-bottom:1px solid #536b9655; }
#checkin-batch-bar { margin:0 0 12px;padding:10px; }
#project-view>.rpg-parent-shortcut { display:none; }
.reward-confirm-overlay { position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:12px;background:#071326c9; }
.reward-confirm-panel { background:linear-gradient(140deg,#203858,#172b49);color:#edf5ff;border:1px solid #7eafbc;border-radius:18px;width:min(540px,100%);max-height:calc(100dvh - 24px);overflow:auto;padding:22px; }
.reward-confirm-panel h2 { font-size:24px;margin:0 0 16px;overflow-wrap:anywhere; }
.reward-confirm-actions { display:grid;grid-template-columns:1fr;gap:10px;margin-top:18px; }
.reward-confirm-actions button { min-height:48px;font-size:18px; }
.reward-focused { outline:3px solid #8de5d8;outline-offset:4px; }
body:has(.reward-confirm-overlay) .page-nav { visibility:hidden; }
@media(max-width:767px){
 .hd2d-preview .topbar,.hd2d-preview.parent-mode .topbar { display:flex;flex-direction:column;align-items:stretch;gap:12px; }
 .hd2d-preview .brand-heading { position:relative;min-height:64px; }
 .hd2d-preview .brand-heading #welcome-message { display:none; }
 .hd2d-preview .top-actions { display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%; }
 .hd2d-preview .current-child-context { grid-column:1;grid-row:1;font-size:18px; }
 .hd2d-preview #role-action { grid-column:2;grid-row:1;justify-self:end;min-height:44px;font-size:18px; }
 .hd2d-preview #points-ledger { grid-column:1;grid-row:2; }
 .hd2d-preview #stars-ledger { grid-column:2;grid-row:2; }
 .hd2d-preview .top-actions .balance { display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;min-height:50px; }
 .hd2d-preview .top-actions .balance img { width:24px;height:24px; }
 #mobile-date-bar,.fg-tutorial-entry { display:none!important; }
 #mobile-streak-button { min-height:44px;margin:0 2px; }
 .daily-page-heading { flex-wrap:wrap;margin-bottom:14px; }
 .daily-page-heading h1 { margin:0; }
 .daily-page-heading>div { margin-left:auto; }
 .daily-page-heading button { padding:8px 10px;font-size:16px; }
 .date-row { flex-wrap:wrap;gap:8px; }
 .date-row .date-actions { position:static;flex-basis:100%;justify-content:center; }
 .date-row .date-return { min-height:44px;white-space:nowrap; }
 .hd2d-preview .daily-column .date-row { display:flex!important; }
 .hd2d-preview.parent-mode .top-actions #role-action { display:block!important; }
 .mobile-overview { display:flex!important;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 0!important;min-height:0!important; }
 .mobile-overview>div:not(:first-child):not(.mobile-race-track) { display:none!important; }
 #today-workspace .mobile-overview>.mobile-race-track { display:block!important;flex-basis:100%; }
 .mobile-overview>div:first-child { display:flex;align-items:center;gap:12px;width:100%; }
 #today-workspace .daily-column { min-width:0; }
 #today-workspace .mobile-streak-button { display:inline-flex!important;min-height:44px;margin:0 0 12px;justify-self:start; }
 .task-card .task-title { font-size:20px;overflow-wrap:anywhere; }
 .task-card .task-meta { font-size:15px; }
 .task-card .task-value-label { font-size:16px; }
 .task-card .checkin { font-size:18px;min-height:48px; }
 .parent-center-heading h1 { flex-basis:100%;font-size:25px; }
 .parent-center-heading>div button { min-height:44px;font-size:16px;padding:8px 10px; }
 .page-nav { grid-template-columns:repeat(4,minmax(0,1fr))!important; }
 .page-nav button { font-size:18px!important;min-height:48px; }
 .app-shell { padding-bottom:100px!important; }
}
@media(max-width:767px) and (min-height:500px){.reward-confirm-overlay { align-items:flex-end; }.reward-confirm-panel { border-radius:18px 18px 0 0; }}
@media(max-height:499px){.reward-confirm-overlay { align-items:center; }.reward-confirm-panel { max-height:calc(100dvh - 24px); }}

/* 奖励卡：名称、价格或来源、详情和操作分层留白，家长与孩子共用。 */
#rewards-view .pending-card { display:grid;gap:14px;padding:18px;min-width:0; }
#rewards-view .pending-card>h2 { margin:0;line-height:1.45;overflow-wrap:anywhere; }
#rewards-view .pending-card>p { margin:0;line-height:1.6;width:fit-content;max-width:100%;padding:5px 10px;border:1px solid #7593bb66;border-radius:8px;background:#173349;overflow-wrap:anywhere; }
#rewards-view .pending-card>details { min-width:0; }
#rewards-view .pending-card>details>summary { box-sizing:border-box;width:fit-content;max-width:100%;min-height:44px;padding:8px 12px;line-height:28px;border-radius:8px;background:#8fd8fa14;cursor:pointer; }
#rewards-view .pending-card>details>summary:focus-visible { outline:2px solid #a7f3e1;outline-offset:3px; }
#rewards-view .pending-card>details>p { margin:12px 0 0;line-height:1.7;overflow-wrap:anywhere; }
#rewards-view .pending-card>.reward-tabs { margin:0;gap:12px; }
#rewards-view .pending-card>.reward-tabs:empty { display:none; }
#reward-records>details { margin-top:20px; }
#reward-records>details>summary { box-sizing:border-box;min-height:44px;padding:8px 0;line-height:28px; }
#reward-records>details>div { display:grid;gap:14px;margin-top:12px; }
#reward-settings-list .project-row>div { flex:1;min-width:0; }
#reward-settings-list .project-row>span { flex:0 0 auto;white-space:nowrap; }

/* 2026-10-13：深空主题，仅调整表层，不改周回顾共用行轨道。 */
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) :is(.topbar,#today-workspace .daily-column,#history-view,#rewards-view,#project-view,#ledger-view,#manage-view) { background:var(--fg-panel);border-color:#b5c3d626;box-shadow:none; }
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) :is(#project-view,#ledger-view,#history-view,#rewards-view) :is(.panel,.config-panel,.settings-panel) { background:transparent;border:0;box-shadow:none; }
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) :is(#today-workspace .task-card,#rewards-view .pending-card,#history-view .history-card,.project-row,.ledger-row) { background:var(--fg-raised);border:1px solid #b5c3d626;box-shadow:none;color:var(--fg-text); }
.hd2d-preview :is(.muted,.task-meta,.eyebrow) { color:var(--fg-muted); }
.hd2d-preview { --panel-raised:var(--fg-raised);--action-primary:var(--fg-action);--text-muted:var(--fg-muted);--border-subtle:#52657c; }
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) #today-workspace .category-tabs button { background:#21334A;border-color:#b5c3d633;color:#EDF3FA;box-shadow:none; }
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) #today-workspace .category-tabs button.active { background:#86D7CD;border-color:#86D7CD;color:#102B31; }
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) #today-workspace .child-next-task { border-color:#86d7cd88;box-shadow:none; }
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) #rewards-view .pending-card button.reward-secondary-action { background:transparent;color:#EDF3FA;border:1px solid #b5c3d666; }
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) :is(button.primary,#today-workspace .task-card button.checkin,.reward-primary-action,#parent-record-task,#parent-select-reward) { background:var(--fg-action);border:1px solid var(--fg-action);color:#102B31;box-shadow:none; }
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) :is(button.ghost,.reward-secondary-action,#account-ledger-list button:not(.danger)) { background:transparent;color:var(--fg-text);border:1px solid #b5c3d666;box-shadow:none; }
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) #rewards-view .pending-card button.reward-goal-selected { background:#86d7cd16;color:var(--fg-action);border-color:#86d7cd55; }
.hd2d-preview:is(.parent-mode,:not(.parent-mode)) button.danger { background:#512D39;color:#FFD5D7;border-color:#D28A92; }
.hd2d-preview button:focus-visible,.hd2d-preview summary:focus-visible { outline:3px solid var(--fg-action);outline-offset:3px; }
.hd2d-preview button:disabled { opacity:.55;cursor:default; }
.hd2d-preview #account-ledger-list button { min-height:44px;padding:8px 12px;border-radius:10px;font:inherit; }
.hd2d-preview .parent-daily-actions button:is(.active,[aria-current='location']) { background:var(--fg-action);color:#102B31;border-color:var(--fg-action); }
.hd2d-preview details.monthly-archive-panel { margin:16px 0;padding:12px 0;border:0;border-top:1px solid #b5c3d633;background:transparent;box-shadow:none; }
.monthly-archive-panel>summary { min-height:44px;display:flex;align-items:center;cursor:pointer; }
#archive-scope { color:var(--fg-muted);line-height:1.6; }
/* 月度折叠区保留自身阅读留白，避免弱化面板后内容贴边。 */
body.hd2d-preview #app-view #history-view details.monthly-archive-panel { box-sizing:border-box;min-width:0;max-width:100%;padding:12px 16px;background:transparent;border:0;border-top:1px solid #b5c3d633;border-radius:0;box-shadow:none; }
body.hd2d-preview #app-view #history-view .monthly-archive-panel>summary { min-height:44px;padding:4px 0;line-height:1.5; }
body.hd2d-preview #app-view #history-view .monthly-archive-panel[open]>summary { margin-bottom:12px; }
body.hd2d-preview #app-view #history-view .monthly-archive-panel #archive-scope { overflow-wrap:anywhere; }
@media(max-width:767px){
 body.hd2d-preview #app-view #history-view details.monthly-archive-panel { padding:8px 12px; }
 body.hd2d-preview #app-view #history-view .monthly-archive-panel>.panel-heading { flex-wrap:wrap;gap:12px; }
 body.hd2d-preview #app-view #history-view .monthly-archive-panel>.panel-heading> * { min-width:0;max-width:100%; }
}
.reward-confirm-panel { position:relative;background:#21334A;border-color:#b5c3d655;box-shadow:0 16px 48px #0005; }
.reward-confirm-panel h2 { padding-right:44px; }
.reward-confirm-close { position:absolute;right:12px;top:12px;min-width:44px;min-height:44px;padding:0;background:transparent;color:#EDF3FA;border:1px solid #b5c3d666;border-radius:10px;font-size:26px; }
.reward-confirm-panel .reward-delivery-check { display:flex;align-items:center;gap:12px;min-height:48px;cursor:pointer;line-height:1.5; }
.reward-delivery-check input { flex:0 0 22px;width:22px;height:22px;min-height:22px;margin:0;accent-color:#86D7CD; }
.reward-delivery-check span { flex:1;min-width:0; }
.reward-confirm-actions { grid-template-columns:1fr 1fr; }
.hd2d-preview .fg-savings { background:var(--fg-panel);border-color:#b5c3d633;box-shadow:none; }
.hd2d-preview .fg-savings-main b { color:var(--fg-reward); }
.hd2d-preview .fg-savings button { background:transparent;color:var(--fg-text);border-color:#b5c3d666; }
.hd2d-preview .fg-savings-dialog,.hd2d-preview .fg-savings-dialog header { background:var(--fg-raised);color:var(--fg-text); }
/* 素材主题延迟加载；用应用容器权重确保本轮语义主题稳定生效。 */
body.hd2d-preview #app-view :is(.topbar,#today-workspace .daily-column,#history-view,#rewards-view,#project-view,#ledger-view,#manage-view) { background:#17253B;border-color:#b5c3d626;box-shadow:none; }
body.hd2d-preview #app-view :is(#today-workspace .task-card,#rewards-view .pending-card,#history-view .history-card,.project-row,.ledger-row) { background:var(--fg-raised);border:1px solid var(--fg-border);box-shadow:none;color:var(--fg-text); }
body.hd2d-preview #app-view #today-workspace .child-next-task { border-color:#86d7cd88;box-shadow:none; }
body.hd2d-preview #app-view #today-workspace .category-tabs button { background:#21334A;border-color:#b5c3d633;color:#EDF3FA;box-shadow:none; }
body.hd2d-preview #app-view #today-workspace .category-tabs button.active { background:#86D7CD;border-color:#86D7CD;color:#102B31; }
body.hd2d-preview #app-view :is(button.primary,#today-workspace .task-card button.checkin,.reward-primary-action) { background:#86D7CD;border-color:#86D7CD;color:#102B31;box-shadow:none; }
body.hd2d-preview #app-view #rewards-view .pending-card button.reward-secondary-action { background:transparent;color:#EDF3FA;border:1px solid #b5c3d666; }
body.hd2d-preview #app-view #rewards-view .pending-card button.reward-goal-selected { background:#86d7cd16;color:#86D7CD;border-color:#86d7cd55; }
body.hd2d-preview #app-view #weekly-review-view .wr-panel { background:#17253B;border-color:#b5c3d633;box-shadow:none; }
body.hd2d-preview #app-view #weekly-review-view .wr-hero { border-color:#b5c3d633; }
body.hd2d-preview #app-view #weekly-review-view .wr-hero em { color:#E7C780; }
@media(max-width:767px){
 .hd2d-preview:is(.parent-mode,:not(.parent-mode)) .topbar { position:relative;gap:6px;padding:10px 12px;background:transparent;border:0; }
 .hd2d-preview .brand-heading { min-height:44px;padding-right:110px!important; }
 .hd2d-preview .brand-heading .eyebrow,.hd2d-preview .brand-planet,.hd2d-preview .header-racer { display:none; }
 .hd2d-preview #site-title { display:flex;flex-wrap:wrap;gap:4px;line-height:1.15;font-size:22px;margin:0; }
 .hd2d-preview .top-actions { display:grid;grid-template-columns:1fr 1fr;gap:6px; }
 .hd2d-preview .top-actions #role-action { position:absolute;right:12px;top:10px;min-height:44px; }
 .hd2d-preview .top-actions .current-child-context { grid-column:1/-1;grid-row:1;min-height:24px; }
 .hd2d-preview .top-actions .balance { grid-row:2;min-height:44px;gap:6px;padding:6px 8px; }
 .hd2d-preview .fg-savings { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:8px 0;padding:10px; }
 .hd2d-preview .fg-savings-icon { display:none; }
 .hd2d-preview .fg-savings-main { min-width:0; }
 .hd2d-preview .fg-savings-actions { width:auto; }
 .hd2d-preview .fg-savings-main small { font-size:14px; }
 #today-workspace .mobile-overview { gap:6px; }
 .hd2d-preview:is(.parent-mode,:not(.parent-mode)) #today-workspace .mobile-race-track { height:64px;min-height:64px;border:0!important; }
 .hd2d-preview:is(.parent-mode,:not(.parent-mode)) #today-workspace .mobile-race-track.complete .mobile-race-flag { width:32px;height:32px;bottom:28px; }
 .hd2d-preview #today-workspace .daily-column { padding:12px; }
 .child-task-section { margin-top:14px; }
}

/* 家长编辑器：标题允许自然换行，并与右侧取消按钮保持独立空间。 */
/* 首页手机：用明确网格排头部；任务先于赛车概览，避免后加载主题覆盖。 */
@media(max-width:767px){
 body.hd2d-preview #app-view .topbar { display:grid;grid-template-columns:minmax(0,.85fr) repeat(2,minmax(0,1fr));align-items:center;gap:6px;padding:10px 12px;background:#17253B;border:0;box-shadow:none; }
 body.hd2d-preview #app-view .brand-heading { grid-column:1/3;grid-row:1;min-height:44px;padding:0!important; }
 body.hd2d-preview #app-view .top-actions { display:contents;position:static; }
 body.hd2d-preview #app-view #role-action { position:static;grid-column:3;grid-row:1;justify-self:stretch;padding:6px;min-height:44px;white-space:nowrap; }
 body.hd2d-preview #app-view .current-child-context { grid-column:1;grid-row:2;min-width:0;font-size:18px;line-height:1.3; }
 body.hd2d-preview #app-view .current-child-context strong { overflow-wrap:anywhere; }
 body.hd2d-preview #app-view #points-ledger { grid-column:2;grid-row:2; }
 body.hd2d-preview #app-view #stars-ledger { grid-column:3;grid-row:2; }
 body.hd2d-preview #app-view .top-actions .balance { min-height:44px;gap:4px;padding:4px;font-size:16px; }
 body.hd2d-preview #app-view .top-actions .balance img { width:20px;height:20px; }
 body.hd2d-preview #app-view #today-workspace .daily-column { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);gap:8px;padding:12px;background:#17253B;border:0; }
 body.hd2d-preview #app-view #today-workspace .daily-column> * { grid-column:1/-1;min-width:0; }
 body.hd2d-preview #app-view #savings-goal { order:1; }
 body.hd2d-preview #app-view .fg-savings { margin:0;padding:8px 0;border:0;background:transparent;gap:8px; }
 body.hd2d-preview #app-view .fg-savings-main { grid-template-columns:minmax(0,1fr) auto;gap:4px 8px; }
 body.hd2d-preview #app-view .fg-savings-main>small:first-child { display:none; }
 body.hd2d-preview #app-view .fg-savings-main strong { grid-column:1/-1;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.35; }
 body.hd2d-preview #app-view .fg-savings-main b { font-size:18px; }
 body.hd2d-preview #app-view .fg-savings-track { grid-column:1/-1;grid-row:3; }
 body.hd2d-preview #app-view .fg-savings-main>small:last-child { grid-column:2;grid-row:2;align-self:center;white-space:nowrap; }
 body.hd2d-preview #app-view .daily-page-heading { order:2;margin:4px 0 0;gap:6px; }
 body.hd2d-preview #app-view .daily-page-heading h1 { font-size:24px;line-height:1.35; }
 body.hd2d-preview #app-view #today-workspace .mobile-streak-button { order:3;grid-column:1;min-height:44px;margin:0;padding:6px;font-size:16px;gap:4px; }
 body.hd2d-preview #app-view #today-workspace .mobile-streak-button img { width:22px;height:22px; }
 body.hd2d-preview #app-view #today-workspace .date-row { order:3;grid-column:2/-1;display:flex!important;min-height:60px;margin:0;gap:8px;justify-content:flex-end;flex-wrap:wrap; }
 body.hd2d-preview #app-view #today-workspace .date-row button { min-height:44px;min-width:44px; }
 body.hd2d-preview #app-view #today-workspace .date-row .date-step { padding:0;width:44px;flex:0 0 44px;min-height:48px;border:0;border-radius:8px;background:transparent;box-shadow:none;display:grid;place-items:center;font-size:0; }
 body.hd2d-preview #app-view #today-workspace .date-row .date-step::after { content:'';width:9px;height:9px;border-top:2px solid #A9C8DB;border-right:2px solid #A9C8DB;transform:rotate(45deg); }
 body.hd2d-preview #app-view #today-workspace .date-row #previous-day::after { transform:rotate(-135deg); }
 body.hd2d-preview #app-view #today-workspace .date-row .date-step:active { background:#30435B; }
 body.hd2d-preview #app-view #today-workspace .date-row .date-control { width:100%;min-width:0;min-height:60px;padding:3px 0;border:1px solid #40536B;border-radius:8px;gap:0;background:var(--fg-input);box-shadow:none; }
 body.hd2d-preview #app-view #today-workspace .date-picker-wrap { min-width:0;flex:1;min-height:52px;padding:0;border:0;font-size:16px; }
 body.hd2d-preview #app-view #today-workspace #record-date-label { display:none; }
 body.hd2d-preview #app-view #today-workspace .date-mobile-face { display:grid;justify-items:center;gap:4px;white-space:nowrap;font-family:system-ui,sans-serif;line-height:1.25; }
 body.hd2d-preview #app-view #today-workspace #date-mobile-number { font-size:18px;font-weight:700;letter-spacing:.2px;font-variant-numeric:tabular-nums;color:#F2F6FA; }
 body.hd2d-preview #app-view #today-workspace .date-mobile-context { display:flex;align-items:center;gap:6px;font-size:11px;font-weight:500;color:#AFC0D1; }
 body.hd2d-preview #app-view #today-workspace #date-mobile-badge { padding:2px 6px;border-radius:4px;background:#86D7CD18;color:#A5E4D9;font-size:11px;line-height:1.2; }
 body.hd2d-preview #app-view #today-workspace .mobile-streak-button { align-self:start;margin:8px 0 0;max-width:100%;min-width:0; }
 body.hd2d-preview #app-view #today-summary { order:9; }
 body.hd2d-preview #app-view #today-workspace #category-tabs { order:4;margin:4px 0;padding:0;gap:6px;background:transparent; }
 body.hd2d-preview #app-view #today-workspace #category-tabs button { min-height:48px;padding:6px 4px;gap:4px;box-shadow:none; }
 body.hd2d-preview #app-view #today-workspace #category-tabs img { width:24px;height:24px; }
 body.hd2d-preview #app-view #today-workspace .child-next-section { order:5;margin-top:4px; }
 body.hd2d-preview #app-view #today-workspace .mobile-overview { order:6;margin:4px 0;gap:6px;padding:0!important; }
 body.hd2d-preview #app-view #today-workspace .mobile-overview>div:first-child { min-height:28px;padding:0;border:0;background:transparent; }
 body.hd2d-preview #app-view #today-workspace .mobile-race-track { height:64px;min-height:64px;border:0!important; }
 body.hd2d-preview #app-view #today-workspace .mobile-race-kart { width:58px;height:58px;bottom:2px; }
 body.hd2d-preview #app-view #today-workspace .child-pending-section { order:7; }
 body.hd2d-preview #app-view #today-workspace .child-completed-section { order:8; }
}
@media(max-width:767px){
 #project-view.mobile-editor-open .project-editor>.panel-heading,
 #project-view.mobile-reward-editor-open #reward-form>.panel-heading { align-items:flex-start;gap:16px;margin-bottom:14px; }
 #project-view.mobile-editor-open .project-editor>.panel-heading>div,
 #project-view.mobile-reward-editor-open #reward-form>.panel-heading>div { flex:1;min-width:0; }
 #project-view.mobile-editor-open .project-editor>.panel-heading h2,
 #project-view.mobile-reward-editor-open #reward-form>.panel-heading h3 { margin:0;line-height:1.45;overflow-wrap:anywhere; }
 #project-view.mobile-editor-open #project-list-back,
 #project-view.mobile-reward-editor-open #reward-list-back { flex:0 0 auto;white-space:nowrap; }
}
/* 两端共用日期控件；箭头按控件几何中心定位，不受字体基线影响。 */
body.hd2d-preview #app-view #today-workspace .date-center { flex:1;min-width:0;text-align:center;font-family:system-ui,sans-serif; }
body.hd2d-preview #app-view #today-workspace .date-center .date-picker-wrap { width:100%;min-height:30px;height:30px;padding:0;background:transparent;box-shadow:none;border-radius:6px; }
body.hd2d-preview #app-view #today-workspace .date-center .date-mobile-context { height:32px;justify-content:center;gap:6px;white-space:nowrap; }
body.hd2d-preview #app-view #today-workspace .date-center .date-actions { position:static;flex-basis:auto; }
body.hd2d-preview #app-view #today-workspace .date-center .date-return { min-height:32px;height:32px;min-width:64px;padding:0 4px;border:0;border-radius:6px;background:transparent;color:#A5E4D9;font:500 12px system-ui,sans-serif;box-shadow:none; }
body.hd2d-preview #app-view #today-workspace .date-center .date-return:hover { background:#86D7CD18; }
body.hd2d-preview #app-view #today-workspace .date-row .date-control { display:flex;align-items:center;gap:0;min-height:60px;padding:3px 0;border:1px solid #40536B;border-radius:8px;background:var(--fg-input);box-shadow:none; }
body.hd2d-preview #app-view #today-workspace .date-picker-wrap { display:grid;place-items:center;min-height:52px;border:0;padding:0 8px; }
body.hd2d-preview #app-view #today-workspace #record-date-label { display:none; }
body.hd2d-preview #app-view #today-workspace .date-mobile-face { display:grid;justify-items:center;gap:4px;white-space:nowrap;font-family:system-ui,sans-serif;line-height:1.25; }
body.hd2d-preview #app-view #today-workspace #date-mobile-number { font-size:18px;font-weight:700;letter-spacing:.2px;font-variant-numeric:tabular-nums;color:#F2F6FA;white-space:nowrap; }
body.hd2d-preview #app-view #today-workspace .date-mobile-context { display:flex;align-items:center;gap:6px;font-size:12px;font-weight:500;color:#AFC0D1; }
body.hd2d-preview #app-view #today-workspace #date-mobile-badge { padding:2px 6px;border-radius:4px;background:#86D7CD18;color:#A5E4D9;font-size:11px;line-height:1.2; }
body.hd2d-preview #app-view #today-workspace .date-row .date-step { position:relative;display:block;flex:0 0 44px;width:44px;height:52px;min-height:52px;padding:0;border:0;border-radius:8px;background:transparent;box-shadow:none; }
body.hd2d-preview #app-view #today-workspace .date-row .date-step::after { content:none; }
body.hd2d-preview #app-view #today-workspace .date-step svg { position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:24px;height:24px;fill:none;stroke:#A9C8DB;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
body.hd2d-preview #app-view #today-workspace .date-row .date-step:hover { background:#30435B; }
@media(min-width:768px){
 body.hd2d-preview #app-view #today-workspace .date-row .date-control { width:280px; }
 body.hd2d-preview #app-view #today-workspace .date-picker-wrap { flex:1;min-width:0; }
}

/* 账户区固定为身份/入口、两张余额卡两层，避免横屏宽度不足时随机折行。 */
body.hd2d-preview #app-view .topbar .top-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:10px 12px;min-width:0;width:100%;padding:12px 14px;background:transparent;border:0;box-shadow:none;backdrop-filter:none; }
body.hd2d-preview #app-view .topbar .current-child-context { grid-column:1;grid-row:1;display:flex;align-items:center;gap:6px 8px;min-height:44px;min-width:0;font-size:17px;line-height:1.4; }
body.hd2d-preview #app-view .topbar .current-child-context strong { overflow-wrap:anywhere;color:#EDF3FA; }
body.hd2d-preview #app-view .topbar #current-parent-mode { padding:3px 7px;border-radius:6px;background:#86d7cd14;color:#a4ded6;font:500 12px/1.4 system-ui,sans-serif;white-space:nowrap; }
body.hd2d-preview #app-view .topbar #current-parent-mode:empty { display:none; }
body.hd2d-preview #app-view .topbar #role-action { position:static;grid-column:2;grid-row:1;justify-self:end;min-height:44px;padding:8px 12px;border-radius:8px;border:1px solid var(--fg-border);background:transparent;color:#d6e4f1;font-size:16px;white-space:nowrap;box-shadow:none; }
body.hd2d-preview #app-view .topbar #points-ledger { grid-column:1;grid-row:2; }
body.hd2d-preview #app-view .topbar #stars-ledger { grid-column:2;grid-row:2; }
body.hd2d-preview #app-view .topbar .top-actions .balance { display:grid;grid-template-columns:30px minmax(0,1fr);grid-template-rows:auto auto;align-content:center;align-items:center;justify-content:normal;gap:3px 12px;min-width:0;min-height:74px;margin:0;padding:11px 14px;border:1px solid #9cbbd52e;border-radius:8px;background:var(--fg-raised);text-align:left;box-shadow:none; }
body.hd2d-preview #app-view .topbar .balance img { position:static;grid-column:1;grid-row:1/3;transform:none;width:30px;height:30px;object-fit:contain; }
body.hd2d-preview #app-view .topbar .balance strong { grid-column:2;grid-row:1;font:700 25px/1.1 system-ui,sans-serif;font-variant-numeric:tabular-nums;color:#f4f8fc;overflow-wrap:anywhere; }
body.hd2d-preview #app-view .topbar .balance span { grid-column:2;grid-row:2;font:500 12px/1.4 system-ui,sans-serif;color:#b5c9dc; }
body.hd2d-preview #app-view .topbar :is(.balance,#role-action):hover { border-color:#92c5d080;background-color:#304a65; }
@media(max-width:767px){
 body.hd2d-preview #app-view .topbar { grid-template-columns:minmax(0,1fr);gap:8px;padding:12px; }
 body.hd2d-preview #app-view .topbar .brand-heading { grid-column:1;grid-row:1;min-height:30px; }
 body.hd2d-preview #app-view .topbar .top-actions { grid-column:1;grid-row:2;position:static;gap:8px 10px;padding:0; }
 body.hd2d-preview #app-view .topbar #site-title { font-size:20px; }
 body.hd2d-preview #app-view .topbar .top-actions .balance { min-height:64px;padding:9px 12px;gap:2px 10px; }
 body.hd2d-preview #app-view .topbar .balance strong { font-size:23px; }
}
@media(max-width:360px){
 body.hd2d-preview #app-view .parent-center-tabs { gap:6px; }
 body.hd2d-preview #app-view .parent-center-tabs button { padding:10px 4px;font-size:15px;white-space:nowrap; }
 body.hd2d-preview #app-view .page-nav button { padding:8px 3px;gap:5px;font-size:15px!important;white-space:nowrap; }
 body.hd2d-preview #app-view .page-nav button img { width:20px;height:20px; }
}
