/* Sweet Shift Saga v4.5.0.3 — Sweetfolio layout & spacing repair
   Keeps the v4.5.0.2 visual identity, but fixes screen structure, sizing,
   alignment, responsive placement, card detail anchoring and pack opening. */

/* ---------- Full-screen structure ---------- */
#screen-cards.card-collection-screen.active {
  height:100svh !important;
  min-height:100svh !important;
  overflow:hidden !important;
  display:grid !important;
  grid-template-rows:auto auto minmax(0,1fr) !important;
  align-content:stretch !important;
}
#screen-cards .card-collection-topbar {
  position:relative !important;
  top:auto !important;
  width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}
#screen-cards .card-collection-tabs {
  position:relative !important;
  top:auto !important;
  width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  display:grid !important;
  grid-template-columns:repeat(6,minmax(96px,148px)) !important;
  justify-content:center !important;
  align-items:end !important;
  gap:8px !important;
  padding:22px 16px 10px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scrollbar-width:none;
}
#screen-cards .card-collection-tabs::-webkit-scrollbar { display:none; }
#screen-cards .card-tab {
  width:100% !important;
  min-width:96px !important;
  min-height:40px !important;
  margin:0 !important;
  box-sizing:border-box !important;
  display:grid !important;
  place-items:center !important;
  white-space:nowrap !important;
  line-height:1 !important;
}
#screen-cards .card-collection-content {
  width:min(1240px,calc(100vw - 32px)) !important;
  height:100% !important;
  min-height:0 !important;
  margin:0 auto !important;
  padding:18px 0 42px !important;
  box-sizing:border-box !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain;
  scroll-padding-top:16px;
  scrollbar-gutter:stable;
}
#screen-cards .card-collection-content:focus { outline:none !important; }

/* ---------- Top bar ---------- */
#screen-cards .card-collection-topbar {
  min-height:86px !important;
  padding:10px 18px !important;
  grid-template-columns:52px minmax(0,1fr) 118px !important;
  gap:13px !important;
  align-items:center !important;
}
#screen-cards .cards-back-button {
  width:48px !important;
  height:48px !important;
  margin:0 !important;
}
#screen-cards .card-album-title-block {
  min-width:0 !important;
  align-content:center !important;
  gap:2px !important;
}
#screen-cards .card-album-title-block h1,
#screen-cards .card-album-title-block span,
#screen-cards .card-album-title-block small {
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
#screen-cards .card-album-progress-pill {
  width:118px !important;
  min-width:118px !important;
  min-height:50px !important;
  padding:7px 10px !important;
  box-sizing:border-box !important;
}
#screen-cards .card-collection-topbar::after {
  bottom:-13px !important;
  pointer-events:none !important;
}

/* ---------- Shared spacing ---------- */
#screen-cards .card-panel,
#screen-cards .card-overview-hero,
#screen-cards .card-list-head,
#screen-cards .card-packs-head,
#screen-cards .album-rewards-intro,
#screen-cards .exclusive-intro,
#screen-cards .archive-intro,
#screen-cards .completion-reward-copy {
  margin-left:0 !important;
  margin-right:0 !important;
  box-sizing:border-box !important;
}
#screen-cards .card-panel { padding:16px !important; }
#screen-cards .card-panel + .card-panel { margin-top:14px !important; }
#screen-cards .card-list-head,
#screen-cards .card-packs-head,
#screen-cards .album-rewards-intro,
#screen-cards .exclusive-intro,
#screen-cards .archive-intro {
  min-height:96px !important;
  margin-bottom:14px !important;
  padding:17px 19px !important;
  align-items:center !important;
}
#screen-cards .card-list-head > div:first-child,
#screen-cards .card-packs-head > div:first-child,
#screen-cards .album-rewards-intro > div:first-child,
#screen-cards .exclusive-intro > div:first-child,
#screen-cards .archive-intro > div:first-child {
  min-width:0 !important;
}
#screen-cards .card-list-head p,
#screen-cards .card-packs-head p,
#screen-cards .album-rewards-intro p,
#screen-cards .exclusive-intro p,
#screen-cards .archive-intro p {
  max-width:760px !important;
}
#screen-cards .card-panel > header {
  min-height:44px !important;
  margin:0 0 12px !important;
  align-items:center !important;
}

/* ---------- Album overview ---------- */
#screen-cards .card-overview-hero {
  min-height:248px !important;
  margin-top:2px !important;
  padding:30px 26px 22px !important;
  grid-template-columns:minmax(0,1fr) 210px !important;
  gap:26px !important;
  align-items:center !important;
}
#screen-cards .album-overview-copy {
  min-width:0 !important;
  gap:9px !important;
}
#screen-cards .album-overview-copy h2 { margin:0 !important; }
#screen-cards .album-overview-copy p { margin:0 !important; }
#screen-cards .album-overview-stats {
  display:grid !important;
  grid-template-columns:repeat(3,minmax(105px,132px)) !important;
  justify-content:start !important;
  gap:9px !important;
}
#screen-cards .album-overview-stats span {
  width:auto !important;
  min-width:0 !important;
  min-height:52px !important;
  box-sizing:border-box !important;
}
#screen-cards .album-overview-actions {
  margin-top:2px !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
}
#screen-cards .album-overview-actions button {
  min-width:112px !important;
  min-height:38px !important;
  padding:7px 12px !important;
}
#screen-cards .album-overview-emblem {
  width:210px !important;
  min-width:0 !important;
  justify-self:end !important;
}
#screen-cards .album-overview-emblem img {
  width:176px !important;
  max-height:214px !important;
  object-fit:contain !important;
}
#screen-cards .card-overview-columns {
  margin-top:14px !important;
  grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr) !important;
  gap:14px !important;
  align-items:start !important;
}
#screen-cards .album-category-row {
  grid-template-columns:minmax(118px,150px) minmax(90px,1fr) 44px !important;
  gap:10px !important;
  margin:9px 0 !important;
}
#screen-cards .vault-overview {
  min-width:0 !important;
}
#screen-cards .vault-overview button,
#screen-cards .duplicate-vault-panel button {
  width:100% !important;
  margin-top:8px !important;
}
#screen-cards .recent-cards { margin-top:14px !important; }
#screen-cards .recent-card-row {
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:8px !important;
}
#screen-cards .recent-card-row button {
  min-height:64px !important;
  padding:7px !important;
}

/* ---------- Card list ---------- */
#screen-cards .card-list-filters {
  flex:0 0 auto !important;
  max-width:420px !important;
  gap:6px !important;
}
#screen-cards .card-list-filters button {
  min-width:72px !important;
  min-height:34px !important;
  padding:6px 10px !important;
}
#screen-cards .album-card-grid {
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(145px,1fr)) !important;
  gap:12px !important;
  align-items:stretch !important;
}
#screen-cards .album-card-slot {
  width:100% !important;
  min-width:0 !important;
  min-height:226px !important;
  margin:0 !important;
  padding:9px !important;
  box-sizing:border-box !important;
}
#screen-cards .album-card-art,
#screen-cards .album-card-back {
  width:100% !important;
  height:122px !important;
  flex:0 0 122px !important;
}
#screen-cards .album-card-slot > strong {
  width:100% !important;
  min-height:28px !important;
  display:grid !important;
  place-items:center !important;
  line-height:1.15 !important;
}

/* ---------- Packs and shop ---------- */
#screen-cards .pack-total {
  flex:0 0 auto !important;
  min-width:96px !important;
}
#screen-cards .owned-card-packs,
#screen-cards .card-shop-grid {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:12px !important;
}
#screen-cards .owned-card-pack {
  min-width:0 !important;
  min-height:102px !important;
  padding:10px !important;
  grid-template-columns:60px minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;
  gap:5px 9px !important;
  align-items:center !important;
}
#screen-cards .owned-card-pack img {
  grid-row:1 / 3 !important;
  width:58px !important;
  height:74px !important;
}
#screen-cards .owned-card-pack > div {
  min-width:0 !important;
}
#screen-cards .owned-card-pack > div strong,
#screen-cards .owned-card-pack > div small {
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
#screen-cards .owned-card-pack button {
  grid-column:2 !important;
  width:100% !important;
  min-height:32px !important;
  padding:5px 8px !important;
}
#screen-cards .card-shop-pack {
  min-width:0 !important;
  min-height:254px !important;
  padding:12px 10px !important;
  justify-content:flex-start !important;
}
#screen-cards .card-shop-pack img {
  width:86px !important;
  height:108px !important;
  margin-bottom:2px !important;
}
#screen-cards .card-shop-pack button {
  width:100% !important;
  margin-top:auto !important;
}
#screen-cards .card-special-offers article {
  min-height:78px !important;
  grid-template-columns:minmax(0,1fr) auto 118px !important;
  gap:14px !important;
  padding:12px 14px !important;
}
#screen-cards .card-special-offers article > div {
  min-width:0 !important;
}
#screen-cards .card-special-offers article > b {
  white-space:nowrap !important;
}
#screen-cards .card-special-offers article > button {
  width:118px !important;
  min-width:118px !important;
}

/* ---------- Rewards track ---------- */
#screen-cards .album-reward-track {
  width:100% !important;
  box-sizing:border-box !important;
  grid-template-columns:repeat(12,132px) !important;
  gap:12px !important;
  padding:26px 12px 18px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scroll-snap-type:x proximity;
  scrollbar-gutter:stable;
}
#screen-cards .album-reward-step {
  width:132px !important;
  min-width:132px !important;
  min-height:198px !important;
  padding:9px !important;
  scroll-snap-align:center;
  box-sizing:border-box !important;
}
#screen-cards .album-reward-line {
  left:66px !important;
  right:66px !important;
  top:47px !important;
}
#screen-cards .album-reward-step button {
  width:100% !important;
  min-height:32px !important;
  margin-top:auto !important;
}
#screen-cards .completion-reward-copy {
  min-height:118px !important;
  margin-top:14px !important;
  padding:16px 18px !important;
  grid-template-columns:96px minmax(0,1fr) !important;
  gap:16px !important;
}

/* ---------- Exclusives ---------- */
#screen-cards .exclusive-card-grid {
  grid-template-columns:repeat(auto-fill,minmax(190px,1fr)) !important;
  gap:12px !important;
}
#screen-cards .exclusive-card {
  min-width:0 !important;
  min-height:260px !important;
  padding:12px !important;
  box-sizing:border-box !important;
}
#screen-cards .exclusive-card-art {
  width:126px !important;
  height:144px !important;
}

/* ---------- Archive ---------- */
#screen-cards .archive-layout {
  grid-template-columns:210px minmax(0,1fr) !important;
  gap:14px !important;
  align-items:start !important;
}
#screen-cards .archive-album-list,
#screen-cards .archive-album-view {
  min-width:0 !important;
  padding:12px !important;
  box-sizing:border-box !important;
}
#screen-cards .archive-album-list {
  position:sticky !important;
  top:0 !important;
  max-height:calc(100svh - 235px) !important;
  overflow-y:auto !important;
}
#screen-cards .archive-album-list button {
  width:100% !important;
  min-height:54px !important;
  padding:9px 10px !important;
}
#screen-cards .archive-album-view > header {
  min-height:58px !important;
  margin-bottom:12px !important;
}
#screen-cards .archive-card-grid {
  grid-template-columns:repeat(auto-fill,minmax(145px,1fr)) !important;
}
#screen-cards .archive-empty {
  min-height:calc(100svh - 250px) !important;
  padding:28px !important;
  box-sizing:border-box !important;
}

/* ---------- Card detail popup ---------- */
#screen-cards .card-detail-panel {
  padding:20px !important;
  overflow:auto !important;
}
#screen-cards .card-detail-card {
  position:relative !important;
  width:min(930px,calc(100vw - 44px)) !important;
  height:auto !important;
  min-height:0 !important;
  aspect-ratio:3 / 2 !important;
  max-height:calc(100svh - 40px) !important;
  margin:auto !important;
  padding:118px 76px 66px !important;
  grid-template-columns:minmax(240px,300px) minmax(0,1fr) !important;
  align-items:center !important;
  gap:30px !important;
  overflow:hidden !important;
}
#screen-cards .card-detail-card::before {
  top:49px !important;
}
#screen-cards .card-detail-close {
  position:absolute !important;
  top:46px !important;
  right:38px !important;
  width:66px !important;
  height:66px !important;
  margin:0 !important;
}
#screen-cards .card-detail-art {
  width:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  height:330px !important;
}
#screen-cards .card-detail-copy {
  min-width:0 !important;
  align-content:center !important;
  gap:8px !important;
}
#screen-cards .card-detail-copy h2 {
  margin:0 !important;
  line-height:1.05 !important;
}
#screen-cards .card-detail-copy p {
  margin:2px 0 !important;
  max-height:142px !important;
  overflow-y:auto !important;
}
#screen-cards .card-detail-copy > div {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px !important;
}
#screen-cards .card-detail-copy > div span {
  min-width:0 !important;
  text-align:center !important;
}

/* ---------- Pack opening ---------- */
#screen-cards .card-pack-opening {
  padding:18px !important;
  overflow:auto !important;
}
#screen-cards .card-pack-opening-stage {
  width:min(1120px,calc(100vw - 36px)) !important;
  height:auto !important;
  min-height:0 !important;
  aspect-ratio:3 / 2 !important;
  max-height:calc(100svh - 36px) !important;
  margin:auto !important;
  padding:112px 70px 62px !important;
  grid-template-rows:142px minmax(0,1fr) 52px !important;
  align-content:stretch !important;
  gap:9px !important;
  overflow:hidden !important;
}
#screen-cards .card-pack-opening-head {
  top:47px !important;
  width:60% !important;
  min-width:0 !important;
}
#screen-cards .card-pack-close {
  top:43px !important;
  right:40px !important;
  width:64px !important;
  height:64px !important;
}
#screen-cards .card-pack-opening-art {
  align-self:center !important;
  width:112px !important;
  height:138px !important;
  margin:0 !important;
}
#screen-cards .card-pack-results {
  width:100% !important;
  min-height:0 !important;
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(120px,142px)) !important;
  justify-content:center !important;
  align-content:center !important;
  align-items:stretch !important;
  gap:10px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:4px !important;
  box-sizing:border-box !important;
}
#screen-cards .pack-result-card {
  width:100% !important;
  min-width:0 !important;
  min-height:210px !important;
  max-height:222px !important;
  box-sizing:border-box !important;
}
#screen-cards .pack-result-card > div {
  height:110px !important;
}
#screen-cards .card-pack-done {
  align-self:end !important;
  justify-self:center !important;
  min-width:210px !important;
  min-height:46px !important;
  margin:0 !important;
}

/* ---------- Profile & inventory ---------- */
#screen-cards .profile-card-collection,
.profile-card-collection {
  margin:10px 0 !important;
  padding:10px 12px !important;
}
.profile-card-collection > div:first-child {
  grid-template-columns:minmax(0,1fr) auto auto !important;
  gap:8px !important;
}
.inventory-card-packs-section {
  margin-top:12px !important;
  padding-top:12px !important;
}
.inventory-card-pack-stack {
  display:grid !important;
  grid-template-columns:repeat(4,58px) minmax(110px,1fr) !important;
  align-items:center !important;
  gap:8px !important;
}
.inventory-card-pack-stack button {
  width:100% !important;
  margin:0 !important;
}

/* ---------- Tablet ---------- */
@media(max-width:900px){
  #screen-cards .card-collection-tabs {
    justify-content:start !important;
    grid-template-columns:repeat(6,124px) !important;
  }
  #screen-cards .card-overview-hero {
    grid-template-columns:minmax(0,1fr) 165px !important;
    gap:18px !important;
  }
  #screen-cards .album-overview-emblem { width:165px !important; }
  #screen-cards .album-overview-emblem img { width:150px !important; }
  #screen-cards .card-overview-columns { grid-template-columns:1fr !important; }
  #screen-cards .recent-card-row { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
  #screen-cards .owned-card-packs,
  #screen-cards .card-shop-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  #screen-cards .archive-layout { grid-template-columns:1fr !important; }
  #screen-cards .archive-album-list {
    position:relative !important;
    max-height:none !important;
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr)) !important;
  }

  #screen-cards .card-detail-card {
    width:min(520px,calc(100vw - 28px)) !important;
    height:min(780px,calc(100svh - 28px)) !important;
    aspect-ratio:auto !important;
    padding:142px 58px 72px !important;
    grid-template-columns:1fr !important;
    grid-template-rows:250px minmax(0,1fr) !important;
    gap:14px !important;
    overflow:auto !important;
  }
  #screen-cards .card-detail-card::before { top:61px !important; }
  #screen-cards .card-detail-close {
    top:61px !important;
    right:31px !important;
    width:60px !important;
    height:60px !important;
  }
  #screen-cards .card-detail-art { height:250px !important; }
  #screen-cards .card-detail-copy { align-content:start !important; }
  #screen-cards .card-detail-copy p { max-height:none !important; }

  #screen-cards .card-pack-opening-stage {
    width:min(700px,calc(100vw - 24px)) !important;
    height:min(720px,calc(100svh - 24px)) !important;
    aspect-ratio:auto !important;
    padding:110px 48px 54px !important;
    grid-template-rows:120px minmax(0,1fr) 48px !important;
    overflow:hidden !important;
  }
  #screen-cards .card-pack-opening-head { top:49px !important; }
  #screen-cards .card-pack-close { top:48px !important;right:28px !important;width:58px !important;height:58px !important; }
  #screen-cards .card-pack-opening-art { width:96px !important;height:118px !important; }
  #screen-cards .card-pack-results {
    grid-template-columns:repeat(auto-fit,minmax(108px,132px)) !important;
    align-content:start !important;
  }
  #screen-cards .pack-result-card { min-height:192px !important;max-height:206px !important; }
  #screen-cards .pack-result-card > div { height:96px !important; }
}

/* ---------- Phone / narrow window ---------- */
@media(max-width:620px){
  #screen-cards.card-collection-screen.active {
    grid-template-rows:72px 54px minmax(0,1fr) !important;
  }
  #screen-cards .card-collection-topbar {
    min-height:72px !important;
    height:72px !important;
    padding:7px 8px !important;
    grid-template-columns:44px minmax(0,1fr) 78px !important;
    gap:7px !important;
  }
  #screen-cards .cards-back-button { width:42px !important;height:42px !important; }
  #screen-cards .card-album-progress-pill {
    width:78px !important;
    min-width:78px !important;
    min-height:42px !important;
    padding:4px 6px !important;
  }
  #screen-cards .card-collection-topbar::after { display:none !important; }
  #screen-cards .card-collection-tabs {
    height:54px !important;
    padding:8px !important;
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
  }
  #screen-cards .card-tab {
    flex:0 0 auto !important;
    width:auto !important;
    min-width:78px !important;
    min-height:36px !important;
  }
  #screen-cards .card-collection-content {
    width:calc(100vw - 12px) !important;
    padding:10px 0 28px !important;
    scrollbar-gutter:auto;
  }
  #screen-cards .card-list-head,
  #screen-cards .card-packs-head,
  #screen-cards .album-rewards-intro,
  #screen-cards .exclusive-intro,
  #screen-cards .archive-intro {
    min-height:0 !important;
    padding:13px !important;
    align-items:flex-start !important;
    gap:10px !important;
  }
  #screen-cards .card-overview-hero {
    min-height:0 !important;
    padding:27px 14px 15px !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
  }
  #screen-cards .album-overview-emblem { display:none !important; }
  #screen-cards .album-overview-stats {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:6px !important;
  }
  #screen-cards .album-overview-stats span {
    min-height:46px !important;
    padding:6px !important;
  }
  #screen-cards .album-overview-actions {
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    width:100% !important;
  }
  #screen-cards .album-overview-actions button {
    min-width:0 !important;
    width:100% !important;
    padding:6px !important;
  }
  #screen-cards .album-category-row {
    grid-template-columns:100px minmax(70px,1fr) 38px !important;
    gap:6px !important;
  }
  #screen-cards .recent-card-row { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  #screen-cards .card-list-filters { max-width:none !important;justify-content:flex-start !important; }
  #screen-cards .card-list-filters button { min-width:64px !important; }
  #screen-cards .album-card-grid,
  #screen-cards .archive-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:7px !important; }
  #screen-cards .album-card-slot { min-height:198px !important;padding:7px !important; }
  #screen-cards .album-card-art,
  #screen-cards .album-card-back { height:106px !important;flex-basis:106px !important; }
  #screen-cards .owned-card-packs,
  #screen-cards .card-shop-grid { grid-template-columns:1fr !important; }
  #screen-cards .owned-card-pack { grid-template-columns:54px minmax(0,1fr) !important; }
  #screen-cards .card-special-offers article {
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:8px !important;
  }
  #screen-cards .card-special-offers article > button {
    grid-column:1 / -1 !important;
    width:100% !important;
  }
  #screen-cards .completion-reward-copy {
    grid-template-columns:72px minmax(0,1fr) !important;
    padding:12px !important;
  }
  #screen-cards .exclusive-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:7px !important; }
  #screen-cards .exclusive-card { min-height:230px !important;padding:8px !important; }
  #screen-cards .exclusive-card-art { width:106px !important;height:126px !important; }

  #screen-cards .card-detail-panel { padding:4px !important; }
  #screen-cards .card-detail-card {
    width:min(450px,calc(100vw - 8px)) !important;
    height:calc(100svh - 8px) !important;
    max-height:none !important;
    padding:126px 42px 58px !important;
    grid-template-rows:214px minmax(0,1fr) !important;
    gap:10px !important;
  }
  #screen-cards .card-detail-card::before { top:54px !important;font-size:.52rem !important; }
  #screen-cards .card-detail-close { top:53px !important;right:23px !important;width:52px !important;height:52px !important; }
  #screen-cards .card-detail-art { height:214px !important; }
  #screen-cards .card-detail-copy { overflow-y:auto !important; }
  #screen-cards .card-detail-copy > div { grid-template-columns:1fr !important; }

  #screen-cards .card-pack-opening { padding:4px !important; }
  #screen-cards .card-pack-opening-stage {
    width:min(480px,calc(100vw - 8px)) !important;
    height:calc(100svh - 8px) !important;
    max-height:none !important;
    padding:112px 34px 50px !important;
    grid-template-rows:96px minmax(0,1fr) 46px !important;
  }
  #screen-cards .card-pack-opening-head { top:53px !important;width:58% !important; }
  #screen-cards .card-pack-close { top:51px !important;right:20px !important;width:50px !important;height:50px !important; }
  #screen-cards .card-pack-opening-art { width:78px !important;height:94px !important; }
  #screen-cards .card-pack-results {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:6px !important;
    padding:3px !important;
  }
  #screen-cards .pack-result-card { min-height:178px !important;max-height:none !important;padding:6px !important; }
  #screen-cards .pack-result-card > div { height:88px !important; }
  #screen-cards .card-pack-done { min-width:180px !important;min-height:42px !important; }

  .inventory-card-pack-stack {
    grid-template-columns:repeat(4,52px) !important;
  }
  .inventory-card-pack-stack button {
    grid-column:1 / -1 !important;
  }
}

@media(max-height:720px) and (min-width:901px){
  #screen-cards .card-detail-card {
    width:min(820px,calc(100vw - 40px)) !important;
    padding:102px 68px 56px !important;
  }
  #screen-cards .card-detail-card::before { top:42px !important; }
  #screen-cards .card-detail-close { top:39px !important;right:34px !important;width:58px !important;height:58px !important; }
  #screen-cards .card-detail-art { height:290px !important; }
  #screen-cards .card-pack-opening-stage {
    width:min(940px,calc(100vw - 32px)) !important;
    padding:100px 62px 52px !important;
    grid-template-rows:118px minmax(0,1fr) 44px !important;
  }
  #screen-cards .card-pack-opening-head { top:42px !important; }
  #screen-cards .card-pack-close { top:39px !important;right:34px !important;width:56px !important;height:56px !important; }
  #screen-cards .card-pack-opening-art { width:92px !important;height:112px !important; }
  #screen-cards .pack-result-card { min-height:184px !important;max-height:196px !important; }
  #screen-cards .pack-result-card > div { height:92px !important; }
}
