/* 平板竖屏共用 PC 身份侧栏，正文采用单列触控布局。 */
@media(min-width:600px) and (max-width:1024px) and (orientation:portrait) {
  body.hd2d-preview:has(#app-view) #app-view {padding:16px;--tablet-rail:168px;--tablet-offset:186px}
  body.hd2d-preview:has(#app-view) #app-view .topbar {position:fixed;top:158px;left:16px;width:var(--tablet-rail);display:block;min-height:0;margin:0;padding:0;z-index:12}
  body.hd2d-preview:has(#app-view) #app-view .topbar .brand-heading {position:fixed;inset:12px auto auto 16px;width:var(--tablet-rail);height:144px;min-height:0;padding:0!important;border:0;background:transparent;box-shadow:none}
  body.hd2d-preview:has(#app-view) #app-view .brand-heading .brand-emblem {display:block;position:static;width:100%;height:144px;object-fit:contain;filter:drop-shadow(0 4px 8px #091c3c80)}
  body.hd2d-preview:has(#app-view) #app-view .brand-heading :is(.brand-horizontal,.brand-planet,.header-racer) {display:none!important}
  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 #tutorial-entry {display:none}
  body.hd2d-preview:has(#app-view) #app-view .topbar .top-actions {display:flex;justify-content:center;align-items:center;flex-wrap:nowrap;gap:10px;width:max-content;max-width:100%;margin:0 auto;padding:0;border:0;background:transparent;box-shadow:none;backdrop-filter:none}
  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 .current-child-context {display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:48px;min-width:0}
  body.hd2d-preview:has(#app-view) #app-view .topbar #current-child-name {font-size:14px}
  body.hd2d-preview:has(#app-view) #app-view .topbar #header-level {font:400 11px/1.4 system-ui,sans-serif;color:#a8e2e8;white-space:nowrap}
  body.hd2d-preview:has(#app-view) #app-view .topbar #header-level:not(.hidden) {display:block}
  body.hd2d-preview:has(#app-view) #app-view .topbar #current-parent-mode {display:none}
  body.hd2d-preview:has(#app-view) #app-view .topbar #child-switcher {width:54px;min-width:0;font-size:13px;padding:4px 0}
  body.hd2d-preview:has(#app-view) #app-view .topbar .header-resources {display:grid;grid-template-columns:minmax(0,1fr);gap:0;min-width:0}
  body.hd2d-preview:has(#app-view) #app-view .topbar .header-resources #points-ledger {grid-column:1;grid-row:1}
  body.hd2d-preview:has(#app-view) #app-view .topbar .header-resources #stars-ledger {grid-column:1;grid-row:2}
  body.hd2d-preview:has(#app-view) #app-view .topbar .top-actions .balance {display:flex;flex:none;align-items:center;justify-content:flex-start;gap:4px;min-width:0;min-height:24px!important;padding:0!important;border:0;border-radius:0;background:transparent;box-shadow:none;white-space:nowrap}
  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 {display:inline;font:400 10px/1.4 system-ui,sans-serif}
  body.hd2d-preview:has(#app-view) #app-view .topbar #role-action {position:fixed;inset:auto auto 20px 20px;display:flex!important;align-items:center;justify-content:center;min-height:36px;height:36px;width:160px;margin:0;padding:6px 10px;border:0;background:transparent;box-shadow:none;font:400 14px/1.4 "Xiaolai",sans-serif}
  body.hd2d-preview:has(#app-view) #app-view :is(#mobile-parent-tools,#mobile-date-bar,.left-rail-decor) {display:none!important}
  body.hd2d-preview:has(#app-view) #app-view .page-nav {position:fixed;left:16px;top:var(--rail-nav-top,222px);bottom:auto;width:var(--tablet-rail);max-height:calc(100dvh - var(--rail-nav-top,222px) - 76px);overflow-y:auto;display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:12px;z-index:12}
  body.hd2d-preview:has(#app-view) #app-view .page-nav button {display:flex;flex:none;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;width:100%;min-height:52px;padding:8px 14px;font-size:17px}
  body.hd2d-preview:has(#app-view) #app-view .page-nav button.hidden {display:none}
  body.hd2d-preview:has(#app-view) #app-view .page-nav button img {width:26px;height:26px}
  body.hd2d-preview:has(#app-view) #app-view .page-nav :is(#nav-history,#nav-ledger,#nav-parent-rewards) {display:none}
  body.hd2d-preview:has(#app-view) #app-view .page-nav #nav-rewards {display:flex}
  body.hd2d-preview:has(#app-view) #app-view :is(.page-shell,#today-workspace:not(.hidden)) {width:auto;max-width:none;margin:0 0 0 var(--tablet-offset)}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace:not(.hidden) {display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace .daily-column {min-width:0}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace .overview-column {display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace :is(#home-mobile-goal,#mobile-streak-button) {display:none!important}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace .home-insights .insight-tabs {display:none}
  body.hd2d-preview:has(#app-view) #app-view #home-overview-panel {display:none!important}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace #streak-panel {margin:0;padding:0}
  body.hd2d-preview:has(#app-view) #app-view #streak-panel .eyebrow {display:block;margin-top:0;font:700 18px/1.4 "Xiaolai",sans-serif}
  body.hd2d-preview:has(#app-view) #app-view #home-goal-slot .fg-savings {display:flex;flex-wrap:wrap;align-items:center;gap:12px}
  body.hd2d-preview:has(#app-view) #app-view #home-goal-slot .fg-savings-icon {display:block}
  body.hd2d-preview:has(#app-view) #app-view #home-goal-slot .fg-savings-main {display:grid;grid-template-columns:minmax(0,1fr);flex:1 1 180px;min-width:140px}
  body.hd2d-preview:has(#app-view) #app-view #home-goal-slot .fg-savings-main>:is(small,strong,b,.fg-savings-track) {display:block;grid-column:1;grid-row:auto}
  body.hd2d-preview:has(#app-view) #app-view #home-goal-slot .fg-savings-actions {display:flex;flex:none;gap:8px;flex-wrap:wrap}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace #daily-heading-date-steps #date-mobile-number {font-size:18px}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace .daily-title-lockup {gap:8px}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace .daily-title-lockup img {width:40px;height:40px}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace .daily-title-lockup h1 {font-size:24px}
  body.hd2d-preview:has(#app-view) #app-view :is(.unified-heading,.rpg-topline) h1 {font-size:24px}
  body.hd2d-preview:has(#app-view) #app-view :is(.page-emblem,.rpg-topline .rpg-adventure-emblem) {width:40px;height:40px}
  body.hd2d-preview:has(#app-view) #app-view #today-workspace .daily-heading-actions button {padding:6px 8px;font-size:13px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view {padding:18px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-topline {margin-bottom:12px;min-height:44px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-adventure-emblem {width:40px;height:40px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-nav {margin-bottom:14px;padding:4px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-nav>button {min-height:42px;padding:6px;font-size:17px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-v11-adventure>.rpg-page-heading {display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;margin-bottom:12px;gap:8px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-v11-adventure>.rpg-page-heading>div:first-child {flex:1;min-width:0}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-v11-adventure>.rpg-page-heading>div:last-child:not(:first-child) {flex:none}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-v11-adventure>.rpg-page-heading .rpg-text-button {font-size:13px;white-space:nowrap}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-page-heading p {margin:4px 0;font-size:14px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-page-heading h2 {margin:4px 0;font-size:23px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-current-hp {display:none}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-adventure-layout {display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-adventure-scene {display:block;min-width:0}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-adventure-scene .rpg-hd-stage {height:clamp(260px,33dvh,360px);min-height:0}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-hd-boss-name {display:flex;flex-direction:column;align-items:stretch;gap:5px;right:6%;bottom:4%;width:160px;max-width:43%;padding:8px 10px;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 8px,8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%)}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-hd-boss-name>span:first-child {font-size:13px;line-height:1.2}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view :is(.rpg-stage-health,.rpg-battle-health) {display:grid}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-stage-health {grid-template-columns:1fr auto auto;align-items:baseline;gap:4px;color:#c0d4df;font:400 11px/1.2 "Xiaolai",sans-serif}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-stage-health::before {content:"";grid-column:1/-1;height:7px;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(-12deg)}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-stage-health strong {font:700 16px/1.2 "Xiaolai",sans-serif;color:#ffe1b2}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-stage-health.is-cleared::before {background:#0c1c2c;border-color:#8caaad66;box-shadow:none}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-adventure-controls {display:flex;flex-direction:column;gap:12px;min-width:0;padding:14px;border:1px solid var(--glass-line);border-radius:12px;background:var(--glass-card);box-shadow:var(--glass-card-shadow)}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-adventure-controls :is(.rpg-v11-summary,.rpg-mobile-experience) {display:none}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-v11-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;order:2}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-v11-actions>div {display:contents}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-v11-actions button {min-width:0;min-height:44px;margin:0;padding:8px;font-size:17px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-board {display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.3fr) minmax(0,1.1fr);gap:12px;align-items:center;order:0}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-board>header {display:flex;grid-column:1/-1;justify-content:space-between;align-items:center;font:700 16px/1.3 "Xiaolai",sans-serif}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-indicator {font-size:11px;font-weight:400;color:#bce3d3}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-metrics {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-metrics>:is(div,button) {display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;min-height:0;padding:0;border:0;background:transparent;box-shadow:none;color:#edf7ff}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-metrics span {font:400 10px/1.3 system-ui,sans-serif;white-space:nowrap;color:#c0d4e3}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-metrics strong {font-size:24px;line-height:1.1;white-space:nowrap}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-metrics small {font-size:10px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-level-progress {display:grid;gap:6px;min-width:0}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-level-progress :is(header,footer) {display:flex;justify-content:space-between;gap:6px;font:400 10px/1.4 system-ui,sans-serif;color:#bdd8e5}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-level-progress footer {flex-wrap:wrap}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-xp-track {height:9px;overflow:hidden;border:1px solid #a4d6e866;background:#0b213680;transform:skewX(-12deg)}
  body.hd2d-preview:has(#app-view) #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)}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-weapon {display:grid;grid-template-columns:minmax(64px,1fr) minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:4px 6px;min-width:0}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-weapon-art {grid-column:1;grid-row:1/3;min-width:0;background:radial-gradient(ellipse,#9edbf038,transparent 70%)}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-weapon-art svg {display:block;width:100%;height:76px;filter:drop-shadow(0 6px 7px #07192a70)}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-weapon-label {display:flex;flex-direction:column;gap:4px;min-width:0}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-weapon-label span {font-size:10px;color:#bed4e2}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-weapon-label strong {font-size:14px;overflow-wrap:anywhere}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-status-weapon>button {min-height:32px;padding:4px 6px;font-size:12px;border:1px solid var(--glass-line);border-radius:8px}
  body.hd2d-preview:has(#app-view) #app-view #adventure-view .rpg-v11-goal {margin:0;font-size:13px}
}
