/* Responsive operation sizes and one scrolling surface for the party editor. */
@media(max-width:680px){
  .game-ui .app-header nav.primary-nav {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:visible;gap:2px}
  .game-ui .app-header nav.primary-nav .nav-button {grid-column:span 2;padding-inline:4px;min-width:0;min-height:44px}
  .game-ui .app-header nav.primary-nav .nav-button:nth-child(n+4) {grid-column:span 3}
  .game-ui .app-header nav.primary-nav .nav-button strong {font-size:12px}
}
#member-live-frame { min-height:0; overflow:hidden; }
.game-party-page .member-editor { overflow:visible; }
.game-ui.game-party-page .member-methods button,.game-ui.game-party-page #member-close,.game-ui.game-party-page #party-add-next { min-height:44px; }
.game-ui .app-header .brand { display:inline-flex; align-items:center; gap:.25em; min-height:44px; }
@media(max-width:900px) {
  body button,body summary,body .text-button,body .quiet,body .primary,
  .game-party-page .member-methods button,.game-party-page #member-close,
  .homunculus-picker .homunculus-rank-filters button,.homunculus-picker .profile-tabs button,
  dialog.user-templates button,.filter-dialog #filter-close,#basket-open,.app-header #about { min-height:44px; min-width:44px; }
  body input:not([type=checkbox]):not([type=radio]):not([type=hidden]),body select,body textarea { font-size:16px; }
  button,summary { scroll-margin-block:64px 16px; }
  .homunculus-rank-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
  .homunculus-picker .homunculus-rank-filters button { padding:8px 6px; text-align:center; }
  .homunculus-picker .profile-tabs button { padding-block:10px; }
  .filter-dialog #filter-close,.hom-roster-close { padding:8px 12px; }
  .hom-roster-tools button,.hom-roster-tools summary,.party-presets-tools button,.party-presets-tools summary { min-height:44px; white-space:normal; }
  .hom-roster-menu>div,.party-presets-menu-content { max-width:calc(100vw - 32px); }
  .filter-option-panel .discovery-option { min-height:44px; }
  .game-ui .app-header #about,.game-ui .hom-editor-heading button,.game-ui .hom-editor-heading summary,
  .game-ui .hom-roster-use,.game-ui #editor-add,.game-ui .build-complete-bar button,
  .game-ui .loadout-actions button,.game-ui .editor-tools-menu>summary { min-height:44px; min-width:44px; }
}
@media(max-width:680px) {
  .hom-editor-header { margin-bottom:12px; }
  .hom-editor-heading { gap:8px 10px; padding-bottom:10px; }
  .hom-editor-heading>div { min-width:100px; }
  .hom-editor-header .library-status { margin-top:7px; }
  body.has-hom-roster:not(.roster-open) .character-slots { gap:8px; padding:10px 12px; margin-bottom:10px; }
  body.has-hom-roster:not(.roster-open) .character-card { flex-wrap:nowrap; gap:8px; }
  body.has-hom-roster:not(.roster-open) #character-card-open { flex:1 1 auto; min-width:0; width:auto; gap:10px; padding:9px 10px; }
  body.has-hom-roster:not(.roster-open) #character-card-open .homunculus-portrait { width:52px; height:62px; flex-basis:52px; }
  body.has-hom-roster:not(.roster-open) .character-card-name { font-size:16px; }
  body.has-hom-roster:not(.roster-open) #character-details-open { flex:0 0 auto; max-width:100px; padding:8px 5px; font-size:12px; white-space:normal; }
  body.has-hom-roster:not(.roster-open) #character-settings:not([open]) { display:none; }
  body.has-hom-roster:not(.roster-open) .slot-counters { gap:5px 12px; padding-top:3px; }
  .build-complete-bar { padding:8px 0; margin:0 0 8px; gap:8px; }
  .build-complete-bar>div { flex:1 1 130px; }
  .build-complete-bar button { flex:1 1 145px; }
  .game-party-page.member-focused .formation-board { position:static; padding:6px; }
  .game-party-page.member-focused .game-slot,.game-party-page.member-focused .game-slot.empty { min-height:76px; padding:3px; }
  .game-party-page.member-focused .slot-art { height:34px; }
  .game-party-page.member-focused .formation-hint { display:none; }
  .game-party-page.member-focused .party-stage { gap:10px; }
  .game-party-page.member-focused .member-editor { padding:8px; }
  .game-party-page.member-focused .member-editor>.editor-heading { position:sticky; top:0; z-index:8; background:var(--paper); padding:7px 0; margin:0 0 6px; border-bottom:1px solid var(--line); }
  .game-party-page.member-focused .member-editor>.editor-heading h2 { font-size:16px; margin:0; min-width:0; overflow-wrap:anywhere; }
  .game-party-page .member-methods { gap:6px; margin-bottom:8px; }
  .game-party-page .member-methods button { padding:8px; font-size:12px; }
  .game-party-page #member-close { padding:8px; font-size:12px; }
  .embedded-party #main { padding:8px 8px 24px; }
  .embedded-party .embedded-editor-status { padding:7px 8px; }
  .embedded-party #editor-nav { gap:6px; }
  .embedded-party #editor-nav #editor-add,.embedded-party #editor-nav #open-system-presets { flex:1 1 100px; padding:8px; font-size:12px; }
  .embedded-party #editor-nav #open-user-templates { padding:8px; font-size:12px; }
  .embedded-party #catalog-heading { scroll-margin-top:0; }
}
@media(max-height:500px) {
  .game-party-page.member-focused .member-editor>.editor-heading { position:static; }
}
/* Acquisition checks are a direct destination beside the skill loadout. */
.game-ui #editor-nav #view-progress { color:var(--ink); background:var(--tint); font-weight:650; box-shadow:inset 0 0 0 1px var(--control); }
.game-ui #editor-nav #view-progress[aria-pressed=true] { color:var(--accent); border-bottom-color:var(--accent); }
.game-ui #editor-nav #view-progress:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
@media(max-width:600px) {
  .game-ui #editor-nav .editor-view-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; flex:1 0 100%; }
  .game-ui #editor-nav .editor-view-buttons button { min-height:44px; min-width:0; white-space:normal; }
}
