/* Keep the supplied bitmap skin, but give each list its own bounded viewport. */
@media (max-width:1050px), (max-height:700px) {
  #panel-overlay:has(#game-window:is([data-panel="bag"],[data-panel="pets"],[data-panel="equipment"])) {
    padding:calc(var(--ui-safe-top, 0px) + 8px) calc(var(--ui-safe-right, 0px) + 8px) calc(var(--ui-safe-bottom, 0px) + 8px) calc(var(--ui-safe-left, 0px) + 8px);
    align-items:center;
    justify-content:center;
    overflow:hidden;
  }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) {
    --iu:1px;
    --pu:1px;
    width:min(1050px, 100%);
    height:100%;
    max-width:100%;
    max-height:min(700px, 100%);
    min-height:0;
    background-size:100% 100%;
    background-position:center;
  }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) .window-header>div {
    left:17%;
    top:14px;
    width:22%;
    height:44px;
    background:none;
  }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) .window-header h1 {
    font-size:26px;
    letter-spacing:0;
    line-height:1.2;
  }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) #panel-close {
    top:17px;
    right:8px;
    width:58px;
    height:44px;
    min-width:44px;
    min-height:44px;
  }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) #panel-content {
    position:absolute;
    inset:74px 3% 16px;
    padding:0;
    overflow:hidden;
  }

  .inventory-art-layout.inventory-layout,
  .inventory-art-layout.inventory-layout:has(.potion-inventory-detail) {
    display:grid;
    grid-template-columns:minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-rows:40px minmax(0, 1fr);
    grid-template-areas:"categories categories" "items detail";
    gap:10px 16px;
    height:100%;
    min-height:0;
    padding:12px;
    border-radius:24px;
  }
  .inventory-art-layout::before { display:none; }
  .inventory-categories {
    grid-area:categories;
    position:static;
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:6px;
    min-width:0;
  }
  .inventory-categories .bag-tab[data-filter],
  .inventory-categories .bag-tab[data-filter].active {
    width:100%;
    height:40px;
    min-height:40px;
    margin:0;
    padding:3px 5px;
    justify-content:center;
    background:#edb500;
    border-radius:8px;
  }
  .inventory-categories .bag-tab[data-filter].active { background:#ffe3a0;box-shadow:inset 0 0 0 2px #edb500; }
  .inventory-categories .bag-tab .bag-tab-label,
  .inventory-categories .bag-tab.active .bag-tab-label {
    width:100%;
    margin:0;
    padding:0;
    font-size:15px;
    letter-spacing:0;
  }
  .inventory-art-layout .inventory-main {
    grid-area:items;
    min-height:0;
    padding:4px;
    overflow:hidden;
    background:#ffda82;
    border-radius:16px;
  }
  .inventory-art-layout .inventory-grid {
    flex:1 1 0;
    min-height:0;
    max-height:none;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    grid-auto-rows:116px;
    gap:6px;
    padding:6px;
    overflow:auto;
    overscroll-behavior:contain;
  }
  .inventory-art-layout .inventory-slot,
  .inventory-art-layout .inventory-slot.active { padding:8px 0 4px;gap:4px; }
  .inventory-art-layout .item-art { width:72px;height:72px; }
  .inventory-art-layout .inventory-item-name,
  html[lang="en"] .inventory-art-layout .inventory-item-name { font-size:13px;line-height:1.3;overflow-wrap:anywhere; }
  .inventory-art-layout .item-count { font-size:12px; }
  .inventory-art-layout .inventory-footer { min-height:36px;margin:0 2px;font-size:12px; }
  .inventory-art-layout .inventory-footer button { min-height:36px;padding:4px 10px;font-size:13px; }
  .inventory-art-layout .inventory-detail,
  .inventory-art-layout .inventory-detail.potion-inventory-detail {
    grid-area:detail;
    display:grid;
    grid-template-columns:96px minmax(0, 1fr);
    grid-template-rows:auto auto minmax(0, 1fr) auto;
    align-items:stretch;
    gap:5px 6px;
    width:100%;
    height:100%;
    min-height:0;
    padding:6px 8px 8px;
    overflow:hidden;
    border:0;
    border-radius:16px;
    background:#ffda82;
  }
  .inventory-art-layout .inventory-detail .inventory-selected-preview {
    grid-column:1;
    grid-row:1 / 3;
    width:96px;
    height:74px;
    margin:0;
  }
  .inventory-art-layout .inventory-detail .detail-art { width:70px;height:70px; }
  .inventory-art-layout .inventory-detail .inventory-selected-count {
    top:0;
    left:0;
    width:auto;
    height:24px;
    min-width:24px;
    max-width:96px;
    padding:2px 5px;
    font-size:13px;
    border-radius:8px;
  }
  .inventory-art-layout .inventory-detail .inventory-step { top:27px;width:30px;height:40px;min-width:30px;min-height:40px; }
  .inventory-art-layout .inventory-step.previous { left:0; }
  .inventory-art-layout .inventory-step.next { right:0; }
  .inventory-art-layout .inventory-detail .detail-name,
  html[lang="en"] .inventory-art-layout .inventory-detail .detail-name {
    grid-column:2;
    grid-row:1;
    align-self:end;
    min-width:0;
    margin:0;
    padding:6px 8px;
    font-size:18px;
    line-height:1.25;
  }
  .inventory-art-layout .inventory-detail .quality-tag { grid-column:2;grid-row:2;align-self:start;justify-self:center;font-size:12px;padding:3px 6px;margin:0; }
  .inventory-art-layout .inventory-detail .detail-facts {
    grid-column:1 / -1;
    grid-row:3;
    min-height:0;
    width:100%;
    padding:0 6px 0 2px;
    margin:0;
    gap:0;
    justify-content:flex-start;
    overflow:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-gutter:stable;
    font-size:13px;
  }
  .inventory-art-layout .inventory-detail .detail-facts>div { flex:none;display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1.2fr);gap:8px;align-items:start;min-height:28px;padding:4px 0;border-bottom-width:2px; }
  .inventory-art-layout .inventory-detail .detail-facts>div>:is(span,strong) { min-width:0;font-size:13px;line-height:1.4;white-space:normal;overflow-wrap:anywhere; }
  .inventory-art-layout .inventory-detail .detail-facts>.inventory-special-effect { grid-template-columns:minmax(0, 1fr);gap:3px; }
  .inventory-art-layout .inventory-detail .detail-facts .crop-icon { width:18px;height:18px; }
  .inventory-art-layout .inventory-detail .detail-actions { grid-column:1 / -1;grid-row:4;position:static;margin:0;padding:0;gap:6px;background:transparent; }
  .inventory-art-layout .inventory-detail .detail-actions button,
  html[lang="en"] .inventory-art-layout .detail-actions button { min-height:40px;padding:8px 5px;font-size:14px;line-height:1.3;overflow-wrap:anywhere; }

  .pet-layout {
    height:100%;
    min-height:0;
    padding:12px;
    grid-template-columns:minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-rows:108px minmax(0, 1fr);
    grid-template-areas:"roster detail" "workspace detail";
    gap:10px 16px;
    border-radius:24px;
  }
  .pet-layout::before { display:none; }
  .pet-roster { padding:0;border:0;gap:4px; }
  .pet-roster-art { width:54px;height:54px; }
  .pet-roster-item strong { font-size:15px; }
  .pet-roster-item small { font-size:11px; }
  .pet-roster-status { padding:1px 4px;font-size:10px; }
  .pet-detail { display:flex;min-height:0;gap:8px;padding:8px;background:#ffda82;border-radius:16px; }
  .pet-profile { display:grid;grid-template-columns:76px minmax(0, 1fr);grid-template-rows:auto auto;gap:4px 6px; }
  .pet-preview { grid-column:1;grid-row:1 / 3;width:76px;height:74px; }
  .pet-main-portrait { top:-3px;height:78px; }
  .pet-profile h2 { grid-column:2;align-self:end;font-size:19px;padding:6px 8px; }
  .pet-form { grid-column:2;align-self:start;justify-self:center;font-size:11px; }
  .pet-detail-scroll { min-height:0;overflow:auto;padding:0 4px 2px; }
  .pet-hunger-label,.pet-mutation-label { font-size:12px; }
  .pet-buff h3 { font-size:15px; }
  .pet-buff p { font-size:13px; }
  .pet-detail-actions { display:grid;grid-template-columns:minmax(0, 1.2fr) minmax(0, 1fr);gap:6px;padding:0; }
  .pet-detail-actions button { min-height:42px;font-size:14px;padding:6px; }
  .pet-detail-actions .pet-upgrade { display:flex;flex-direction:column;justify-content:center;gap:2px;font-size:12px;padding:4px; }
  .pet-upgrade strong { font-size:12px;gap:2px; }
  .pet-upgrade img { width:18px;height:18px; }
  .pet-workspace { min-height:0;gap:6px;padding:0;border:0;overflow:hidden; }
  .pet-tabs { gap:4px; }
  .pet-tabs button { min-height:40px;height:40px;padding:4px;font-size:14px;gap:4px; }
  .pet-tabs .crop-icon { width:22px;height:22px; }
  .pet-section-heading { padding:0 3px 4px; }
  .pet-section-heading h3 { font-size:14px; }
  .pet-section-heading>span { font-size:10px; }
  .pet-food-list,.pet-effect-list { flex:1 1 0;grid-template-columns:repeat(3, minmax(0, 1fr));min-height:0;max-height:none;gap:8px 4px;padding:4px;overflow:auto; }
  .pet-food-art { width:54px;height:54px; }
  .pet-food strong,.pet-effect strong { font-size:12px; }
  .pet-food small,.pet-effect small { font-size:10px; }
  .pet-feed-footer { padding:5px 2px 0;margin-top:4px;gap:6px; }
  .pet-feed-footer label { font-size:13px; }
  .pet-feed-footer input { width:58px;height:40px;font-size:16px; }
  .pet-feed-footer .pet-primary { min-width:72px;min-height:40px;padding:6px 12px;font-size:15px; }
  .pet-work-scroll { min-height:0;overflow:auto; }
  .pet-toggle,.pet-select { padding:8px 0;font-size:13px; }
  .pet-select select { font-size:13px; }
  .pet-empty { padding:8px 4px;font-size:12px; }
  .pet-empty>.crop-icon { width:38px;height:38px;margin-bottom:6px; }

  #game-window[data-panel="equipment"] { width:min(660px, 100%);max-width:100%;height:100%;max-height:min(520px, 100%);min-height:0;overflow:hidden; }
  #game-window[data-panel="equipment"] .window-header { min-height:54px;margin:0;padding:8px 14px;gap:8px; }
  #game-window[data-panel="equipment"] .window-header h1 { font-size:24px;letter-spacing:0; }
  #game-window[data-panel="equipment"] #panel-close { width:44px;height:44px;flex:none; }
  #game-window[data-panel="equipment"] #window-icon { width:30px;height:30px; }
  #game-window[data-panel="equipment"] #panel-content { min-height:0;padding:8px 16px 12px;overflow:hidden; }
  #game-window[data-panel="equipment"] .window-footer { display:none; }
  .equipment-layout { display:grid;grid-template-columns:minmax(0, 1fr);grid-template-rows:auto auto minmax(0, 1fr) auto;height:100%;min-height:0;gap:8px;justify-items:center; }
  .equipment-target { display:grid;grid-template-columns:60px minmax(0, 1fr);align-items:center;gap:10px;width:auto;max-width:100%; }
  .equipment-target>.equipment-icon { width:60px;height:60px; }
  .equipment-target strong { min-width:0;font-size:16px;white-space:normal;overflow-wrap:anywhere; }
  .equipment-target>.equipment-count { top:40px;left:32px;right:auto;font-size:12px; }
  .equipment-layout p { font-size:13px;line-height:1.4; }
  .equipment-slots { grid-template-columns:repeat(6, minmax(0, 1fr));align-content:center;align-items:center;gap:8px;min-height:0;max-width:100%;overflow:auto;padding:8px 3px;overscroll-behavior:contain; }
  .equipment-slot { width:100%;min-height:44px;max-height:84px;padding:5px; }
  .equipment-slot kbd { font-size:12px; }
  .equipment-count { font-size:12px; }
  .equipment-confirm { min-height:44px;max-width:100%;padding:6px 24px;font-size:16px; }
}

@media (max-width:700px) and (max-aspect-ratio:1/1) {
  #game-window:is([data-panel="bag"],[data-panel="pets"]) { max-height:100%;background-size:auto calc(100% - 30px);background-position:right bottom; }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) .window-header>div { left:16px;top:0;width:145px;height:72px;background:url("../assets/ui-user/bag-frame.png") 20% top / auto 360px no-repeat; }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) .window-header h1 { font-size:24px; }
  html[lang="en"] #game-window[data-panel="bag"] .window-header h1 { font-size:20px; }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) #panel-close { top:17px;right:4px;width:54px;height:44px; }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) #panel-content { inset:76px 10px 12px; }
  .inventory-art-layout.inventory-layout,
  .inventory-art-layout.inventory-layout:has(.potion-inventory-detail) { grid-template-columns:minmax(0, 1fr);grid-template-rows:40px minmax(0, .85fr) minmax(0, 1.15fr);grid-template-areas:"categories" "items" "detail";gap:8px;padding:8px;border-radius:20px; }
  .inventory-art-layout .inventory-grid { grid-auto-rows:105px;gap:4px;padding:4px; }
  .inventory-art-layout .item-art { width:62px;height:62px; }
  .inventory-art-layout .inventory-footer { min-height:30px;font-size:11px; }
  .inventory-art-layout .inventory-footer button { min-height:30px;font-size:12px; }
  .inventory-art-layout .inventory-detail { padding:5px 6px 6px; }
  .inventory-art-layout .inventory-detail .detail-name,
  html[lang="en"] .inventory-art-layout .inventory-detail .detail-name { font-size:16px;padding:5px 7px; }
  .inventory-art-layout .inventory-detail .detail-actions button { min-height:40px;font-size:13px; }
  .pet-layout { grid-template-columns:minmax(0, 1fr);grid-template-rows:84px minmax(144px, .7fr) minmax(0, 1.3fr);grid-template-areas:"roster" "detail" "workspace";gap:8px;padding:8px;border-radius:20px; }
  .pet-roster-item { gap:0; }
  .pet-roster-art { width:42px;height:42px; }
  .pet-roster-item strong { font-size:14px;line-height:1.2; }
  .pet-roster-item small { line-height:1.2; }
  .pet-roster-status { padding:0 4px;line-height:1.2; }
  .pet-detail { display:grid;grid-template-columns:76px minmax(0, 1fr);grid-template-rows:minmax(0, 1fr) auto;gap:6px;padding:6px; }
  .pet-profile { display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:0; }
  .pet-preview { width:58px;height:48px; }
  .pet-main-portrait { top:-3px;height:58px; }
  .pet-profile h2 { align-self:center;width:100%;font-size:14px;padding:4px 3px; }
  .pet-form { align-self:center;padding:1px 3px;font-size:10px; }
  .pet-detail-scroll { padding:0 3px; }
  .pet-vitals { padding-bottom:5px; }
  .pet-hunger-label,.pet-mutation-label { font-size:11px;gap:3px; }
  .pet-mutation-label { margin-top:4px; }
  .pet-detail progress { height:7px;margin-top:2px; }
  .pet-buff { padding-top:5px;border-top-width:2px; }
  .pet-buff h3 { font-size:13px;gap:3px; }
  .pet-buff h3 span,.pet-buff small { font-size:10px; }
  .pet-buff p { font-size:12px;line-height:1.4;margin:3px 0; }
  .pet-detail-actions { grid-column:1 / -1;grid-template-columns:minmax(0, 1.2fr) minmax(0, 1fr); }
  .pet-detail-actions .pet-upgrade { flex-direction:row;justify-content:space-between;flex-wrap:wrap; }
  .pet-tabs button { min-height:36px;height:36px;font-size:13px; }
  .pet-tabs .crop-icon { width:20px;height:20px; }
  .pet-section-heading { padding-bottom:3px;gap:2px; }
  .pet-section-heading h3 { font-size:13px; }
  .pet-section-heading>span { font-size:10px; }
  .pet-food-art { width:48px;height:48px; }
  .pet-feed-footer { padding-top:4px; }
  .pet-feed-footer .pet-primary { min-width:72px; }
  .equipment-slots { grid-template-columns:repeat(3, minmax(0, 1fr));max-width:280px; }
}

@media (max-height:500px) and (min-aspect-ratio:1/1) {
  #game-window:is([data-panel="bag"],[data-panel="pets"]) .window-header>div { top:0;height:44px; }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) .window-header h1 { font-size:22px; }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) #panel-close { top:2px;right:5px;width:54px; }
  #game-window:is([data-panel="bag"],[data-panel="pets"]) #panel-content { inset:48px 3% 10px; }
  .inventory-art-layout.inventory-layout,
  .inventory-art-layout.inventory-layout:has(.potion-inventory-detail) { padding:8px;gap:6px 12px;grid-template-rows:36px minmax(0, 1fr); }
  .inventory-categories .bag-tab[data-filter],
  .inventory-categories .bag-tab[data-filter].active { height:36px;min-height:36px; }
  .inventory-art-layout .inventory-grid { grid-auto-rows:104px; }
  .inventory-art-layout .item-art { width:62px;height:62px; }
  .inventory-art-layout .inventory-footer,
  .inventory-art-layout .inventory-footer button { min-height:28px; }
  .inventory-art-layout .inventory-detail .inventory-selected-preview { height:60px; }
  .inventory-art-layout .inventory-detail .detail-art { width:58px;height:58px; }
  .inventory-art-layout .inventory-detail .inventory-step { top:18px; }
  .inventory-art-layout .inventory-detail .detail-name { font-size:16px; }
  .pet-layout { padding:8px;grid-template-rows:88px minmax(0, 1fr);gap:6px 12px; }
  .pet-roster-art { width:40px;height:40px; }
  .pet-roster-item strong { font-size:14px; }
  .pet-detail { padding:6px;gap:5px; }
  .pet-profile { grid-template-columns:58px minmax(0, 1fr); }
  .pet-preview { width:58px;height:54px; }
  .pet-main-portrait { height:60px; }
  .pet-profile h2 { font-size:16px;padding:4px 8px; }
  .pet-tabs button { min-height:36px;height:36px; }
  .pet-section-heading h3 { font-size:13px; }
  .pet-food-art { width:44px;height:44px; }
  .pet-feed-footer { padding-top:3px;margin-top:2px; }
  .pet-feed-footer input,.pet-feed-footer .pet-primary { height:36px;min-height:36px; }
  #game-window[data-panel="equipment"] .window-header { min-height:48px;padding:3px 12px; }
  #game-window[data-panel="equipment"] .window-header h1 { font-size:20px; }
  #game-window[data-panel="equipment"] #panel-content { padding:4px 16px 8px; }
  .equipment-layout { gap:4px; }
  .equipment-target { grid-template-columns:44px minmax(0, 1fr); }
  .equipment-target>.equipment-icon { width:44px;height:44px; }
  .equipment-target>.equipment-count { top:26px;left:24px; }
  .equipment-slots { max-width:470px;padding:5px 3px; }
  .equipment-confirm { min-height:40px; }
}

/* With a story banner on a very short screen, trade vertical stacking for columns. */
@media (max-height:360px) and (min-aspect-ratio:1/1) {
  body[data-story-panel=true] #game-window:is([data-panel="bag"],[data-panel="pets"]) #panel-content { inset:44px 3% 8px; }
  body[data-story-panel=true] .inventory-art-layout.inventory-layout,
  body[data-story-panel=true] .inventory-art-layout.inventory-layout:has(.potion-inventory-detail) {
    grid-template-areas:"categories detail" "items detail";
    grid-template-rows:36px minmax(0, 1fr);
    gap:4px 10px;
    padding:6px;
  }
  body[data-story-panel=true] .inventory-categories { gap:3px; }
  body[data-story-panel=true] .inventory-categories .bag-tab .bag-tab-label,
  body[data-story-panel=true] .inventory-categories .bag-tab.active .bag-tab-label { font-size:12px; }
  body[data-story-panel=true] .inventory-art-layout .inventory-detail { gap:3px 5px;padding:4px 6px;grid-template-columns:76px minmax(0, 1fr); }
  body[data-story-panel=true] .inventory-art-layout .inventory-detail .inventory-selected-preview { width:76px;height:44px; }
  body[data-story-panel=true] .inventory-art-layout .inventory-detail .detail-art { width:44px;height:44px; }
  body[data-story-panel=true] .inventory-art-layout .inventory-detail .inventory-step { top:6px;height:36px;min-height:36px;width:26px;min-width:26px; }
  body[data-story-panel=true] .inventory-art-layout .inventory-detail .detail-name { font-size:14px;padding:3px 6px; }
  body[data-story-panel=true] .inventory-art-layout .inventory-detail .quality-tag { font-size:10px;padding:2px 4px; }
  body[data-story-panel=true] .inventory-art-layout .inventory-detail .detail-facts>div { min-height:24px;padding:3px 0; }
  body[data-story-panel=true] .inventory-art-layout .inventory-detail .detail-facts>div>:is(span,strong) { font-size:12px; }

  body[data-story-panel=true] .pet-layout {
    grid-template-columns:minmax(76px, .42fr) minmax(0, 1fr) minmax(0, .9fr);
    grid-template-rows:minmax(0, 1fr);
    grid-template-areas:"roster workspace detail";
    padding:6px;
    gap:6px;
  }
  body[data-story-panel=true] .pet-roster { grid-template-columns:minmax(0, 1fr);grid-template-rows:repeat(3, minmax(0, 1fr));gap:4px; }
  body[data-story-panel=true] .pet-roster-item { display:grid;grid-template-columns:34px minmax(0, 1fr);grid-template-rows:auto auto auto;align-content:center;gap:0 3px;padding:0; }
  body[data-story-panel=true] .pet-roster-art { grid-column:1;grid-row:1 / 4;width:34px;height:34px; }
  body[data-story-panel=true] .pet-roster-item strong { grid-column:2;font-size:12px;line-height:1.2; }
  body[data-story-panel=true] .pet-roster-item small { grid-column:2;font-size:10px;line-height:1.2; }
  body[data-story-panel=true] .pet-roster-status { grid-column:2;padding:0;font-size:9px;line-height:1.2; }
  body[data-story-panel=true] .pet-detail { min-height:0;gap:4px;padding:4px; }
  body[data-story-panel=true] .pet-profile { grid-template-columns:44px minmax(0, 1fr);gap:2px 4px; }
  body[data-story-panel=true] .pet-preview { width:44px;height:42px; }
  body[data-story-panel=true] .pet-main-portrait { top:-2px;height:46px; }
  body[data-story-panel=true] .pet-profile h2 { font-size:14px;padding:3px 6px; }
  body[data-story-panel=true] .pet-form { font-size:10px;padding:1px 4px; }
  body[data-story-panel=true] .pet-detail-actions { gap:4px; }
  body[data-story-panel=true] .pet-detail-actions button { min-height:40px;font-size:12px;padding:4px; }
  body[data-story-panel=true] .pet-detail-actions .pet-upgrade { font-size:11px;gap:1px; }
  body[data-story-panel=true] .pet-upgrade strong { font-size:11px; }
  body[data-story-panel=true] .pet-upgrade img { width:15px;height:15px; }
  body[data-story-panel=true] .pet-workspace { gap:4px; }
  body[data-story-panel=true] .pet-tabs { gap:2px; }
  body[data-story-panel=true] .pet-tabs button { height:34px;min-height:34px;padding:3px 2px;gap:2px;font-size:12px; }
  body[data-story-panel=true] .pet-tabs .crop-icon { width:18px;height:18px; }
  body[data-story-panel=true] .pet-section-heading { padding:0 2px 2px; }
  body[data-story-panel=true] .pet-section-heading h3 { display:none; }
  body[data-story-panel=true] .pet-food-list,
  body[data-story-panel=true] .pet-effect-list { grid-template-columns:repeat(2, minmax(0, 1fr));padding:2px;gap:4px; }
  body[data-story-panel=true] .pet-feed-footer { gap:4px;margin-top:2px;padding:2px 0 0; }
  body[data-story-panel=true] .pet-feed-footer label { font-size:12px; }
  body[data-story-panel=true] .pet-feed-footer input { width:48px; }
  body[data-story-panel=true] .pet-feed-footer .pet-primary { min-width:60px;padding:4px 8px;font-size:13px; }
}
