/* Approved mobile preparation sheet: real skill and inventory nodes, without the world. */
#prep-dashboard, #combat-quick-access { display: none; }
body.mobile-layout #mobile-hero-growth > .hero-talents-panel { display: none; }
#prep-dashboard[hidden], #combat-quick-access[hidden] { display: none !important; }
body.preparation-dashboard #prep-dashboard {
  --prep-skill-size: 60px; --prep-padding-block: 10px; --prep-padding-inline: 12px;
  display: grid; grid-template-rows: 44px 44px minmax(0, 1fr); gap: 8px;
  /* Paint to the screen edges; only the content avoids the physical cutout. */
  position: fixed; inset: 0;
  box-sizing: border-box;
  padding: calc(var(--prep-padding-block) + var(--rd-safe-area-top, 0px)) calc(var(--prep-padding-inline) + var(--rd-safe-area-right, 0px)) calc(var(--prep-padding-block) + var(--rd-safe-area-bottom, 0px)) calc(var(--prep-padding-inline) + var(--rd-safe-area-left, 0px));
  z-index: 75; overflow: hidden;
  color: #f1e7cc; background: #162b2b; font: 12px/1.4 'Microsoft YaHei', sans-serif;
}
body.preparation-dashboard :is(#viewer, #overlay, #minimap-dock, #top-bar, #mobile-toolbar, #preparation-actions, #mobile-practice-toggle, #mobile-joystick, #mobile-move-zone, #mobile-attack, .mobile-attack-choice, #mobile-stop, #mobile-skill-upgrade, #item-active-dock, #player-hg-button) { visibility: hidden !important; pointer-events: none !important; }
#prep-dashboard * { box-sizing: border-box; }
#prep-dashboard button, #combat-quick-access button {
  min-height: 44px; min-width: 44px; border: 1px solid #657c6a; border-radius: 5px;
  padding: 6px 10px; font: inherit; color: #f1e7cc; background: #1d3432; cursor: pointer;
}
#prep-dashboard button:hover, #combat-quick-access button:hover { background: #2d4940; }
#prep-dashboard button:disabled, #combat-quick-access button:disabled { opacity: .5; cursor: not-allowed; }
#prep-dashboard button:focus-visible, #combat-quick-access button:focus-visible { outline: 2px solid #f3ce80; outline-offset: 2px; }
#prep-dashboard svg { width: 22px; height: 22px; vertical-align: middle; }
.prep-dashboard-header { display: flex; align-items: center; gap: 12px; min-width: 0; }
.prep-identity { display: flex; align-items: center; gap: 8px; min-width: 116px; }
.prep-identity img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
.prep-identity strong, .prep-identity span { display: block; }
.prep-identity strong { color: #ffe0a1; font-size: 12px; }
.prep-identity span { font-size: 11px; }
.prep-vitals { flex: 0 1 142px; min-width: 96px; display: grid; gap: 4px; }
.prep-vitals > div { height: 15px; position: relative; background: #152121; overflow: hidden; }
.prep-vitals span { position: absolute; height: 100%; background: #3b663d; }
.prep-vitals > div + div span { background: #315a75; }
.prep-vitals b { position: relative; display: block; text-align: center; font-size: 10px; line-height: 15px; font-variant-numeric: tabular-nums; }
.prep-core-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px 12px; flex: 1; min-width: 168px; margin: 0; font-size: 11px; }
.prep-core-stats div { display: flex; gap: 5px; white-space: nowrap; }
.prep-core-stats dt { color: #c3d1c1; }
.prep-core-stats dd { margin: 0; font-variant-numeric: tabular-nums; }
.prep-economy { margin-left: auto; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.prep-economy b { color: #f4ce7c; font-size: 16px; }
.prep-economy span { font-size: 11px; }
.prep-shortcuts { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
#prep-dashboard .prep-shortcuts button { padding: 5px 8px; font-size: 11px; white-space: nowrap; }
#prep-talent-pending { margin-left: 4px; padding: 2px; color: #222b20; background: #f1d18a; }
.prep-dashboard-body { display: grid; grid-template-columns: 176px minmax(188px, 1fr) 190px; grid-template-rows: minmax(0, 1fr); gap: 20px; min-height: 0; }
#prep-skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px 12px; min-height: 0; }
.prep-skill-cell { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 44px 0 18px; }
body.preparation-dashboard #prep-skills-grid .cmd-slot {
  display: block !important; position: relative !important; inset: auto !important; width: var(--prep-skill-size); height: var(--prep-skill-size);
  border: 1px solid #b39b60; border-radius: 5px; background: #1c3430; overflow: visible; pointer-events: auto; box-shadow: none;
}
#prep-skills-grid .cmd-slot img { width: 100%; height: 100%; border-radius: 4px; object-fit: cover; }
#prep-skills-grid .cmd-slot { flex-shrink: 0; }
#prep-skills-grid .cmd-slot .cmd-cd { border-radius: 4px; }
#prep-skills-grid .cmd-key { left: 5px; top: 2px; bottom: auto; transform: none; color: #f4ce7c; font-size: 11px; }
body.preparation-dashboard #prep-skills-grid .skill-learn-plus { display: flex; position: absolute; top: -44px; left: 50%; right: auto; transform: translateX(-50%); align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; padding: 0; border: 0; background: transparent; color: #f3ce80; font-size: 28px; box-shadow: none; }
body.preparation-dashboard #prep-skills-grid .skill-learn-plus[hidden] { display: none; }
.prep-skill-name { display: none; }
#prep-skills-grid .prep-skill-name { display: block; position: absolute; top: calc(100% + 4px); left: 50%; width: 92px; transform: translateX(-50%); text-align: center; color: #e5dcc2; font-size: 11px; white-space: nowrap; }
#prep-inventory-host { display: flex; align-items: flex-end; justify-content: center; min-width: 0; padding-bottom: 10px; }
#prep-inventory-host .console-center { display: flex !important; flex-direction: column; align-items: stretch; width: 100%; min-width: 0; max-width: 340px; gap: 8px; padding: 0; border: 0; background: transparent; }
#prep-inventory-host .inventory-sidebar { display: flex; flex-direction: row; align-self: end; min-width: 0; height: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; box-shadow: none; }
#prep-inventory-host :is(.inv-side-title, #auto-destroy-switch, #btn-toggle-corruption) { display: none; }
#prep-inventory-host #inventory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, auto); gap: 10px; width: 100%; }
#prep-inventory-host .inv-slot { width: 100%; height: auto; min-height: 56px; aspect-ratio: 1.15; border-radius: 5px; }
#prep-inventory-host .inv-slot img { max-width: 100%; max-height: 100%; }
.prep-next-round { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-width: 0; }
#prep-challenges { display: flex; flex-wrap: wrap; align-content: start; gap: 8px; }
#prep-challenge-count-control { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; gap: 4px; width: 100%; }
#prep-challenge-count-control[hidden] { display: none; }
#prep-challenge-summary { display: flex; align-items: center; padding: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#prep-challenges > button { flex: 1; padding: 6px; font-size: 12px; }
#prep-wave-panel { display: grid; gap: 8px; }
#prep-dashboard #prep-next-boss { position: static; inset: auto; transform: none; width: auto; max-width: none; padding: 0; border: 0; background: transparent; font-size: 12px; text-align: right; color: #f4ce7c; }
#prep-dashboard #btn-banner-start-wave { width: 100%; min-height: 58px; background: #345e3e; border-color: #a7bb80; font-size: 16px; font-weight: bold; }
body.mobile-layout #combat-quick-access { position: fixed; z-index: 60; top: var(--mobile-edge-top); left: calc(var(--mobile-edge-left) + var(--mobile-map-width) + 8px); display: flex; gap: 5px; }
body.mobile-layout #combat-quick-access button { width: 44px; height: 44px; padding: 3px 2px; white-space: normal; font-size: 11px; line-height: 14px; }
body.mobile-layout.mobile-panel-open #combat-quick-access { visibility: hidden; }
/* Keep the authored three-skill arc and every attack/item/teleport control unchanged. */
body.mobile-layout[data-mobile-active-count="2"] { --two-skill-main: 130px; --two-skill-inset: 16px; --combat-center-right: calc(var(--mobile-edge-right) + var(--hud-attack-center-right, 54px)); --combat-center-bottom: calc(var(--mobile-edge-bottom) + var(--hud-attack-center-bottom, 54px)); }
body.mobile-layout[data-mobile-active-count="2"] .command-grid > :is(#skill-slot-q, #skill-slot-w, #skill-slot-r)[data-mobile-active-index="0"] { right: calc(var(--combat-center-right) + var(--two-skill-main) - var(--mobile-skill-size) / 2); bottom: calc(var(--combat-center-bottom) + var(--two-skill-inset) - var(--mobile-skill-size) / 2); }
body.mobile-layout[data-mobile-active-count="2"] .command-grid > :is(#skill-slot-q, #skill-slot-w, #skill-slot-r)[data-mobile-active-index="1"] { right: calc(var(--combat-center-right) + var(--two-skill-inset) - var(--mobile-skill-size) / 2); bottom: calc(var(--combat-center-bottom) + var(--two-skill-main) - var(--mobile-skill-size) / 2); }
@media (max-width: 740px) {
  .prep-dashboard-body { grid-template-columns: 148px minmax(180px, 1fr) 174px; gap: 12px; }
  .prep-dashboard-header { gap: 8px; }
  .prep-identity { min-width: 96px; gap: 5px; }
  .prep-identity img { width: 26px; height: 26px; }
  .prep-core-stats { gap: 3px 6px; min-width: 168px; font-size: 10px; }
  .prep-core-stats div { gap: 3px; }
  .prep-economy b { font-size: 14px; }
  .prep-economy { gap: 7px; }
  #prep-inventory-host #inventory-grid { gap: 8px; }
  #prep-dashboard .prep-shortcuts button { padding: 4px 6px; }
}
@media (max-height: 340px) and (orientation: landscape) {
  body.preparation-dashboard #prep-dashboard { --prep-skill-size: 44px; --prep-padding-block: 6px; --prep-padding-inline: 8px; gap: 4px; }
  #prep-skills-grid { gap: 4px 12px; }
  .prep-skill-cell { padding-bottom: 12px; }
  #prep-skills-grid .prep-skill-name { font-size: 10px; top: calc(100% + 2px); }
  #prep-inventory-host .inv-slot { min-height: 44px; aspect-ratio: 1.35; }
  #prep-inventory-host { padding-bottom: 2px; }
  #prep-dashboard #btn-banner-start-wave { min-height: 50px; }
}
@media (min-height: 341px) and (max-height: 380px) {
  body.preparation-dashboard #prep-dashboard { --prep-skill-size: 52px; --prep-padding-block: 8px; gap: 6px; }
}
@media (max-width: 599px) and (orientation: landscape) {
  body.mobile-layout[data-mobile-active-count="2"] { --two-skill-main: 114px; --two-skill-inset: 14px; }
}
