/* The phone app remains the canonical interface. These rules only rearrange
   that same interface for laptop and desktop screens. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  body {
    min-width: 900px;
    overflow-x: hidden;
  }

  .app {
    min-height: 100vh;
    padding: 0 0 0 230px;
  }

  .topbar {
    min-height: 76px;
    padding: 17px 34px;
    box-shadow: 0 12px 42px rgba(39, 20, 61, 0.1);
  }

  .brand {
    font-size: 30px;
  }

  main {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 38px 46px 84px;
  }

  h1 {
    max-width: 920px;
    margin-top: 0;
    font-size: clamp(42px, 4vw, 62px);
  }

  h2 {
    font-size: 26px;
  }

  nav {
    left: 24px;
    right: auto;
    top: 100px;
    bottom: 24px;
    width: 182px;
    height: auto;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
    border-radius: 28px;
    box-shadow: 0 22px 70px rgba(45, 24, 69, 0.18);
  }

  nav button {
    min-height: 62px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 13px;
    border-radius: 19px;
    text-align: left;
  }

  nav button span {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    margin: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--purple) 10%, transparent);
    font-size: 19px;
  }

  nav button.active {
    background: color-mix(in srgb, var(--purple) 14%, var(--card));
    color: var(--purple);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--purple) 16%, transparent);
  }

  nav small {
    font-size: 13px;
  }

  .view.active {
    animation: desktop-view-in 240ms ease both;
  }

  @keyframes desktop-view-in {
    from { opacity: 0; transform: translateY(7px); }
  }

  #signed-in-home:not(.hidden) {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
    gap: 20px;
    align-items: stretch;
  }

  #signed-in-home > .payg-card,
  #signed-in-home > #home-plans-card {
    margin: 0;
  }

  #signed-in-home > .payg-card {
    min-height: 340px;
  }

  #signed-in-home > #first-use-card {
    grid-column: 1 / -1;
  }

  .payg-card .balance {
    font-size: 58px;
  }

  .featured-offers {
    margin-top: 30px;
  }

  .featured-offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tool {
    min-height: 170px;
  }

  .plans-view.active,
  .esim-view.active,
  #network.view.active,
  #account.view.active {
    max-width: 1180px;
  }

  .plans-hero {
    min-height: 230px;
    padding: 34px 38px;
  }

  .destination-picker,
  .plan-package-shell,
  .global-esim-card,
  .nearby-network-card {
    padding: 30px;
  }

  .popular-destination-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .plan-package-grid,
  .catalogue-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .global-esim-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .network-tools {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }

  #account-member:not(.hidden) {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
  }

  .account-profile-card { grid-column: span 7; }
  .account-balance-card { grid-column: span 5; }
  .account-shortcuts,
  .account-section-title,
  .account-list-card,
  .cashback-card,
  .account-settings-card,
  .connected-login-card,
  .account-menu,
  #logout,
  #account-member > footer { grid-column: 1 / -1; }
  .referral-card,
  .giveaway-card { grid-column: span 6; height: 100%; }

  .colour-style-grid,
  .wallpaper-grid {
    max-width: 560px;
  }

  .sheet {
    align-items: center;
    justify-content: center;
    padding: 30px;
  }

  .sheet-card {
    width: min(680px, 100%);
    max-height: calc(100dvh - 60px);
    border-radius: 30px;
    padding: 34px 30px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.34);
  }

  .checkout-card,
  .support-card {
    width: min(820px, 100%);
    min-height: 0;
    height: auto;
  }

  .support-messages {
    height: min(390px, 42dvh);
  }

  .auth-gateway {
    grid-template-columns: minmax(360px, 45%) minmax(500px, 1fr);
    grid-template-rows: 1fr;
  }

  .auth-gateway-brand::after {
    background: linear-gradient(90deg, transparent 58%, #171022 100%);
  }

  .auth-gateway-panel {
    display: grid;
    place-items: center;
    margin: 0;
    padding: 48px;
    border-width: 0 0 0 1px;
    border-radius: 0;
  }

  .auth-gateway-step {
    width: min(100%, 560px);
  }
}

@media (min-width: 1320px) and (hover: hover) and (pointer: fine) {
  .app { padding-left: 260px; }
  nav { left: max(28px, calc((100vw - 1540px) / 2)); width: 204px; }
  main { padding-left: 58px; padding-right: 58px; }
}

