/* 姓名与资源共用一行；角色入口只调整尺寸，不改变认证与切换流程。 */
.brand-horizontal {display:none}
body.hd2d-preview #app-view .topbar #current-child-name {font:700 15px/1.4 "Xiaolai","Microsoft YaHei UI",sans-serif;white-space:nowrap;overflow-wrap:normal}
body.hd2d-preview #app-view .topbar .current-child-context:has(#child-switcher:not(.hidden)) #current-child-name {display:none}
body.hd2d-preview #app-view #ledger-view .page-heading-actions {display:flex;align-items:center;gap:8px}
body.hd2d-preview #app-view #ledger-view #parent-account-adjustment {font-size:14px;padding:8px 12px;min-height:40px}
body.hd2d-preview #app-view .parent-center-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:nowrap}
body.hd2d-preview #app-view .parent-center-heading h1 {flex:0 1 auto;min-width:0;white-space:nowrap;margin:0}
body.hd2d-preview #app-view .parent-center-heading>div {display:flex;align-items:center;gap:8px;flex:none;flex-wrap:nowrap}
body.hd2d-preview #app-view .parent-center-heading #parent-exit {font-size:13px;min-height:36px;padding:6px 10px;white-space:nowrap}
@media(min-width:768px) and (orientation:landscape),(min-width:1025px) {
  body.hd2d-preview:has(#app-view) #app-view .topbar {top:148px}
  body.hd2d-preview:has(#app-view) #app-view .topbar .top-actions {display:flex;justify-content:center;gap:8px;width:max-content;max-width:100%;margin:0 auto}
  body.hd2d-preview:where(:not(.pixel-preview)):has(#app-view) #app-view .topbar .top-actions {background:#142b4473;border-radius:8px}
  body.hd2d-preview:has(#app-view) #app-view .topbar .header-resources {display:grid;gap:0;min-width:0}
  body.hd2d-preview:has(#app-view) #app-view .topbar .current-child-context {display:flex;flex-direction:column;gap:2px;grid-column:1;grid-row:1;min-height:44px;min-width:0;justify-content:center;align-self:center;flex-wrap:nowrap}
  body.hd2d-preview:has(#app-view) #app-view .topbar #current-parent-mode {display:none}
  body.hd2d-preview:has(#app-view) #app-view .topbar .top-actions .balance {display:flex;justify-content:flex-start;gap:4px;padding:0;min-height:24px;grid-column:1;grid-row:auto}
  body.hd2d-preview:has(#app-view) #app-view .topbar #points-ledger {grid-column:1;grid-row:1}
  body.hd2d-preview:has(#app-view) #app-view .topbar #stars-ledger {grid-column:1;grid-row:2}
  body.hd2d-preview:has(#app-view) #app-view .topbar .balance img {width:16px;height:16px}
  body.hd2d-preview:has(#app-view) #app-view .topbar .balance strong {font-size:14px}
  body.hd2d-preview:has(#app-view) #app-view .topbar .balance span {font-size:10px}
  body.hd2d-preview:has(#app-view) #app-view .topbar #header-level {font-size:11px;color:#a8e2e8;white-space:nowrap}
  body.hd2d-preview:has(#app-view) #app-view .topbar #child-switcher {width:52px;min-width:0;font-size:13px;padding:4px 0}
}
@media(max-width:767px) {
  body.hd2d-preview #app-view .topbar #header-level {display:none}
  body.hd2d-preview #app-view .parent-center-heading h1 {font-size:22px}
  body.hd2d-preview #app-view .parent-center-heading [data-page-help] {min-height:36px;padding:6px 8px;font-size:13px}
  body.hd2d-preview:has(#app-view) #app-view .topbar {position:relative;grid-template-columns:clamp(70px,23vw,90px) auto minmax(0,1fr) auto;grid-template-rows:48px;gap:4px;padding:2px 8px;margin-bottom:8px}
  body.hd2d-preview:has(#app-view) #app-view .topbar .brand-heading {grid-column:1;grid-row:1;width:100%;height:48px;min-height:0;display:flex;align-items:center;padding:0!important;overflow:visible}
  body.hd2d-preview:has(#app-view) #app-view .brand-heading .brand-horizontal {display:block;width:100%;max-width:100%;height:48px;object-fit:contain;object-position:center;filter:drop-shadow(0 2px 3px #07182b80)}
  body.hd2d-preview:has(#app-view) #app-view .brand-heading>div {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  body.hd2d-preview:has(#app-view) #app-view .brand-heading::before,body.hd2d-preview:has(#app-view) #app-view .brand-heading::after {content:none}
  body.hd2d-preview:has(#app-view) #app-view .topbar .current-child-context {grid-column:2;grid-row:1;display:flex;min-height:40px;min-width:42px;gap:0;flex-wrap:nowrap}
  body.hd2d-preview #app-view .topbar #current-child-name {font-size:14px}
  body.hd2d-preview:has(#app-view) #app-view .topbar #current-parent-mode {display:none}
  body.hd2d-preview:has(#app-view) #app-view .topbar .header-resources {grid-column:3;grid-row:1;display:flex;justify-content:center;align-items:center;gap:4px;flex-wrap:nowrap;max-width:none}
  body.hd2d-preview:has(#app-view) #app-view .topbar .top-actions .balance {min-width:36px;min-height:40px;padding:4px 1px;gap:2px}
  body.hd2d-preview:has(#today-workspace:not(.hidden)) #app-view .topbar .top-actions .balance {min-height:40px;padding:4px 1px}
  body.hd2d-preview:has(#app-view) #app-view .topbar .balance img {width:16px;height:16px}
  body.hd2d-preview:has(#app-view) #app-view .topbar .balance strong {font-size:15px}
  body.hd2d-preview:has(#app-view) #app-view .topbar #role-action {grid-column:4;grid-row:1;position:static;min-height:34px;padding:4px 6px;font-size:12px;border-radius:8px;white-space:nowrap}
  body.hd2d-preview:has(#app-view) #app-view .topbar #child-switcher {font:700 14px/1.4 "Xiaolai",sans-serif;max-width:70px;min-height:32px;padding:3px}
  body.hd2d-preview #app-view #ledger-view .secondary-page-heading {display:flex;flex-wrap:wrap;align-items:center;gap:12px}
  body.hd2d-preview #app-view #ledger-view .page-heading-actions {margin-left:auto}
  body.hd2d-preview #app-view #today-workspace #home-mobile-goal>summary {display:flex;align-items:center;gap:8px;padding:10px 12px;min-height:44px;list-style:none}
  body.hd2d-preview #app-view #home-mobile-goal>summary::-webkit-details-marker {display:none}
  body.hd2d-preview #app-view #home-mobile-goal>summary::before {content:'▸';font-size:12px;flex:none}
  body.hd2d-preview #app-view #home-mobile-goal[open]>summary::before {transform:rotate(90deg)}
  body.hd2d-preview #app-view .mobile-goal-caption {font:700 14px/1.4 "Xiaolai",sans-serif;white-space:nowrap;flex:none}
  body.hd2d-preview #app-view .mobile-goal-progress {flex:1;min-width:24px;height:6px;border-radius:4px;background:#071d3866;overflow:hidden}
  body.hd2d-preview #app-view .mobile-goal-progress[hidden] {display:none}
  body.hd2d-preview #app-view .mobile-goal-progress i {display:block;width:var(--goal-progress,0%);height:100%;background:linear-gradient(90deg,#7acacb,#b4e6ca);border-radius:inherit}
  body.hd2d-preview #app-view #mobile-goal-status {font:400 12px/1.4 "Xiaolai",sans-serif;color:#efdaa7;white-space:nowrap;margin-left:auto}
  body.hd2d-preview #app-view #mobile-goal-count {font:400 12px/1.4 "Xiaolai",sans-serif;color:#d5ecef;white-space:nowrap}
  body.hd2d-preview #app-view #home-mobile-goal-body .fg-savings-caption,
  body.hd2d-preview #app-view #home-mobile-goal-body .fg-savings-main>b,
  body.hd2d-preview #app-view #home-mobile-goal-body .fg-savings-main>small:last-child,
  body.hd2d-preview #app-view #home-mobile-goal-body .fg-savings-track {display:none}
}
@media(min-width:768px) and (max-height:600px) and (orientation:landscape) {
  body.hd2d-preview:has(#app-view) #app-view .topbar {top:118px}
}
