/* Smooth Jazz Blast 2.6.0 — website production/mobile/auth/subscription layer */
:root{--sjb-nav-h:78px;--sjb-touch:44px}
html{min-height:100%;background:#070310;overflow-x:hidden;text-size-adjust:100%;-webkit-text-size-adjust:100%}
body{min-height:100%;min-height:100dvh;overflow-x:hidden;overscroll-behavior-y:none}
button,input,select,textarea{font:inherit}
button,a,input,select{min-height:var(--sjb-touch)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #4edcff;outline-offset:3px}
.shell{width:min(100%,760px);margin-inline:auto;padding-inline:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));padding-bottom:calc(var(--sjb-nav-h) + env(safe-area-inset-bottom) + 24px)}
.screen{min-width:0;max-width:100%}
.bottom-nav{position:fixed!important;left:50%!important;right:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;width:min(680px,calc(100vw - 16px))!important;min-height:68px;z-index:70;grid-template-columns:repeat(4,minmax(0,1fr));padding:7px max(7px,env(safe-area-inset-right)) 7px max(7px,env(safe-area-inset-left))!important}
.bottom-nav button{min-width:0;min-height:54px;touch-action:manipulation}
.setting-row,.volume-row{min-height:62px;gap:12px}
.setting-row>span,.volume-row>span{min-width:0}
.setting-row input[type="checkbox"]{appearance:none;-webkit-appearance:none;position:relative;flex:0 0 54px;width:54px;height:30px;min-height:30px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(0,0,0,.42);box-shadow:inset 0 2px 8px rgba(0,0,0,.45);cursor:pointer;transition:.2s ease}
.setting-row input[type="checkbox"]::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 3px 10px rgba(0,0,0,.45);transition:transform .2s ease}
.setting-row input[type="checkbox"]:checked{background:linear-gradient(135deg,#a84cff,#ff9f31);border-color:rgba(255,211,109,.65)}
.setting-row input[type="checkbox"]:checked::after{transform:translateX(24px)}
.setting-row input[type="checkbox"]:disabled{opacity:.45;cursor:not-allowed}
.settings-panel{max-width:calc(100vw - 16px)!important;scroll-padding-top:88px;scroll-padding-bottom:32px}
.settings-panel .panel-head{align-items:center}
.settings-panel select{max-width:155px;min-height:44px}
.playlist-song-info p{white-space:pre-line;line-height:1.6}

/* First-entry authentication experience */
.auth-entry-banner{display:none;margin:0 0 14px;padding:18px;border-radius:24px;text-align:center;background:radial-gradient(circle at 50% 0,rgba(255,211,109,.18),transparent 50%),linear-gradient(145deg,rgba(68,24,113,.9),rgba(9,4,21,.96));border:1px solid rgba(255,211,109,.25)}
.auth-entry-banner img{width:82px;height:82px;border-radius:22px;object-fit:cover;box-shadow:0 14px 40px rgba(0,0,0,.4)}
.auth-entry-banner h1{margin:10px 0 6px;font-family:Georgia,serif;font-size:clamp(28px,7vw,44px)}
.auth-entry-banner p{max-width:520px;margin:0 auto;color:var(--muted);line-height:1.6}
.auth-entry-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:14px}
.auth-entry-actions button{padding:12px 18px;border-radius:14px;font-weight:950}
.auth-entry-guest{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);color:#fff}
body.auth-entry-active{overflow:hidden!important}
body.auth-entry-active .topbar,body.auth-entry-active .bottom-nav{display:none!important}
body.auth-entry-active .shell{height:100dvh;overflow-y:auto;overscroll-behavior:contain;padding:calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 20px)!important}
body.auth-entry-active .screen{display:none!important}
body.auth-entry-active #accountScreen{display:block!important;animation:none!important}
body.auth-entry-active #accountScreen .auth-entry-banner{display:block}
body.auth-entry-active #accountScreen .account-hero{display:none}
body.auth-entry-active #accountScreen{max-width:760px;margin:auto}
body.auth-entry-active .account-auth-layout{margin-top:0}
body.auth-entry-active .app-legal-footer{display:none}

/* Subscription */
.subscribe-card{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.85fr);gap:18px;align-items:center;margin-top:18px;padding:22px;border-radius:26px;background:radial-gradient(circle at 0 0,rgba(78,220,255,.15),transparent 45%),linear-gradient(145deg,rgba(49,17,89,.88),rgba(8,3,20,.94));border:1px solid rgba(255,211,109,.22)}
.subscribe-card::after{content:"♫";position:absolute;right:-10px;top:-34px;font-size:130px;color:rgba(255,255,255,.035);transform:rotate(12deg);pointer-events:none}
.subscribe-copy small{color:var(--gold);font-size:8px;font-weight:950;letter-spacing:1.6px}
.subscribe-copy h2{margin:5px 0 7px;font:700 clamp(24px,5vw,34px)/1.05 Georgia,serif}
.subscribe-copy p{margin:0;color:var(--muted);font-size:11px;line-height:1.6}
.subscribe-form{position:relative;z-index:1;display:grid;gap:9px}
.subscribe-input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.subscribe-form input[type="email"]{width:100%;min-width:0;padding:12px 14px;border-radius:13px;border:1px solid rgba(255,255,255,.17);background:rgba(0,0,0,.34);color:#fff}
.subscribe-form button{padding:11px 16px;border-radius:13px;background:linear-gradient(135deg,#a84cff,#ff9f31);color:#fff;font-weight:950;white-space:nowrap}
.subscribe-form button:disabled{opacity:.55}
.subscribe-consent{display:flex;align-items:flex-start;gap:8px;color:var(--muted);font-size:8px;line-height:1.45}
.subscribe-consent input{min-height:18px;width:18px;flex:0 0 18px;margin-top:1px}
.subscribe-message{min-height:18px;margin:0;font-size:9px;font-weight:800}
.subscribe-message[data-state="success"]{color:var(--green)}
.subscribe-message[data-state="error"]{color:#ff8eab}

@media(max-width:700px){
 .topbar{grid-template-columns:1fr auto!important;gap:8px}.brand{grid-column:1/-1;grid-row:1;justify-self:center}.topbar-audio-actions{grid-row:2}.top-economy{grid-row:2;justify-self:end}
 .hero-card{padding-top:94px!important}.hero-host-chip{top:12px!important;right:12px!important}.hero-sax{top:62px!important;right:10px!important;width:112px!important;height:112px!important}
 .hero-copy{padding-right:0!important}.hero-copy p{max-width:58%}
 .subscribe-card{grid-template-columns:1fr}
}
@media(max-width:520px){
 :root{--sjb-nav-h:72px}
 .shell{padding-inline:8px;padding-right:8px}
 .topbar{margin:8px!important;padding:10px!important;border-radius:20px!important}
 .brand div{display:none}.brand-mark{width:48px!important;height:48px!important}
 .icon-btn,.economy-pill{min-width:44px!important}
 .hero-card{min-height:auto!important;padding:90px 14px 16px!important}.hero-copy p{max-width:100%;padding-right:96px}.hero-sax{top:72px!important;width:94px!important;height:94px!important}.hero-actions{margin-top:18px!important}
 .home-studio-heading{gap:8px}.home-studio-heading strong{white-space:nowrap}
 .account-form-card,.cloud-benefits{padding:16px!important}
 .auth-tabs{grid-template-columns:1fr 1fr}.auth-tabs button{padding-inline:6px}
 .subscribe-card{padding:18px 14px}.subscribe-input-row{grid-template-columns:1fr}.subscribe-form button{width:100%}
 .settings-panel{top:0!important;right:0!important;bottom:0!important;width:100vw!important;max-width:100vw!important;border-radius:0!important;padding-bottom:calc(32px + env(safe-area-inset-bottom))!important}
 .settings-panel .panel-head{padding-top:calc(18px + env(safe-area-inset-top))}
 .friend-code-card,.playlist-song-card,.studio-host{min-width:0}
}
@media(max-width:380px){.hero-copy p{padding-right:0}.hero-sax{opacity:.34}.top-economy .wallet-pill{max-width:102px}.setting-row b,.volume-row b{font-size:10px}}
@media(orientation:landscape) and (max-height:520px){body.auth-entry-active .shell{padding-top:8px!important}.auth-entry-banner{padding:12px}.auth-entry-banner img{width:56px;height:56px}.auth-entry-banner h1{font-size:25px}.account-auth-layout{grid-template-columns:1fr 1fr!important}.cloud-benefits{display:none}.settings-panel{top:4px!important;bottom:4px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* =====================================================================
   Smooth Jazz Blast — Website Mouse / Trackpad Repair
   ===================================================================== */

/* Normal website pages must remain vertically scrollable. */
html,
body {
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

/* Do not leave the document locked after auth or settings closes. */
body:not(.auth-entry-active):not(.settings-open) {
  overflow-y: auto !important;
  touch-action: pan-y pinch-zoom !important;
}

/*
 * Desktop trackpads must be able to scroll while the pointer is over
 * the game board. Pointer tile dragging remains available.
 */
@media (hover: hover) and (pointer: fine) {
  .board,
  .game-screen .board {
    touch-action: pan-y pinch-zoom !important;
    overscroll-behavior: auto !important;
    cursor: grab;
  }

  .board.is-dragging {
    cursor: grabbing;
  }

  .tile {
    touch-action: manipulation !important;
  }
}

/*
 * Touchscreen devices retain full swipe control for the match board.
 */
@media (hover: none), (pointer: coarse) {
  .board,
  .game-screen .board {
    touch-action: none !important;
  }
}

/* Scrollable overlays support mouse wheels and trackpads. */
.settings-panel,
body.auth-entry-active .shell,
.world-map,
.leaderboard-list,
.modal {
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

/* Avoid invisible layers intercepting desktop pointer input. */
.settings-scrim[hidden],
.modal[hidden],
.character-dialogue[hidden],
.reward-reveal[hidden] {
  display: none !important;
  pointer-events: none !important;
}


/* =====================================================================
   Smooth Jazz Blast — Auth Entry Vertical Alignment
   Moves login safely below the browser/device top edge.
   ===================================================================== */

body.sjb-auth-entry-visible {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.sjb-auth-entry-layout {
  position: relative !important;

  /*
   * Comfortable desktop placement while remaining responsive to
   * shorter browser windows.
   */
  margin-top: clamp(72px, 10vh, 132px) !important;
  margin-bottom: calc(
    128px + env(safe-area-inset-bottom, 0px)
  ) !important;

  scroll-margin-top: calc(
    72px + env(safe-area-inset-top, 0px)
  ) !important;

  box-sizing: border-box !important;
}

/* Avoid parent alignment rules pinning the auth experience to the top. */
body.sjb-auth-entry-visible main,
body.sjb-auth-entry-visible .app-shell,
body.sjb-auth-entry-visible .shell,
body.sjb-auth-entry-visible .auth-entry-screen,
body.sjb-auth-entry-visible .auth-entry-wrapper {
  align-items: flex-start !important;
  overflow: visible !important;
}

/* Standard laptops and tablets */
@media (max-width: 1024px) {
  .sjb-auth-entry-layout {
    margin-top: clamp(64px, 9vh, 104px) !important;
  }
}

/* Phones */
@media (max-width: 700px) {
  .sjb-auth-entry-layout {
    width: calc(100% - 24px) !important;
    max-width: 100% !important;

    margin-top: calc(
      46px + env(safe-area-inset-top, 0px)
    ) !important;

    margin-right: auto !important;
    margin-left: auto !important;

    margin-bottom: calc(
      112px + env(safe-area-inset-bottom, 0px)
    ) !important;
  }
}

/* Very small phones */
@media (max-width: 430px) {
  .sjb-auth-entry-layout {
    width: calc(100% - 16px) !important;

    margin-top: calc(
      34px + env(safe-area-inset-top, 0px)
    ) !important;
  }
}

/* Short laptop windows and landscape phones */
@media (max-height: 760px) and (min-width: 701px) {
  .sjb-auth-entry-layout {
    margin-top: 48px !important;
  }
}

@media (max-height: 560px) {
  .sjb-auth-entry-layout {
    margin-top: calc(
      24px + env(safe-area-inset-top, 0px)
    ) !important;
  }
}


/* =====================================================================
   Smooth Jazz Blast — Direct Unified Authentication Layout
   Exact selectors only. Does not target the game shell.
   ===================================================================== */

/*
 * The signed-out account section is now the single main authentication
 * container. The intro banner spans both existing columns.
 */
body.auth-entry-active #signedOutAccount.account-auth-layout {
  width: min(calc(100% - 28px), 760px) !important;
  max-width: 760px !important;

  margin:
    clamp(42px, 6vh, 78px)
    auto
    calc(96px + env(safe-area-inset-bottom, 0px)) !important;

  padding: 18px !important;

  display: grid !important;
  grid-template-columns:
    minmax(0, 1.18fr)
    minmax(250px, .82fr) !important;
  align-items: stretch !important;
  gap: 16px !important;

  border: 1px solid rgba(255, 211, 109, .22) !important;
  border-radius: 28px !important;

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(168, 76, 255, .2),
      transparent 48%
    ),
    linear-gradient(
      145deg,
      rgba(39, 15, 67, .94),
      rgba(8, 4, 24, .97)
    ) !important;

  box-shadow:
    0 30px 90px rgba(0, 0, 0, .48),
    inset 0 1px 0 rgba(255, 255, 255, .05) !important;

  backdrop-filter: blur(22px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.12) !important;

  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Intro is now the header of this exact authentication container. */
body.auth-entry-active
#signedOutAccount.account-auth-layout
#authEntryBanner.auth-entry-banner {
  grid-column: 1 / -1 !important;

  width: 100% !important;
  max-width: none !important;

  margin: 0 !important;
  padding: 20px 22px 22px !important;

  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 0 !important;

  background: transparent !important;
  box-shadow: none !important;

  box-sizing: border-box !important;
}

/* Keep the logo balanced within the unified header. */
body.auth-entry-active
#authEntryBanner.auth-entry-banner > img {
  width: 72px !important;
  height: 72px !important;
  object-fit: contain !important;
  margin-bottom: 10px !important;
}

/* Intro heading and explanation. */
body.auth-entry-active
#authEntryBanner.auth-entry-banner h1 {
  margin: 0 0 8px !important;
  line-height: 1.05 !important;
}

body.auth-entry-active
#authEntryBanner.auth-entry-banner p {
  max-width: 620px !important;
  margin: 0 auto !important;
}

/* Continue as Guest is the only header action. */
body.auth-entry-active
#authEntryBanner .auth-entry-actions {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  margin-top: 16px !important;
}

body.auth-entry-active
#authEntryBanner #entryGuest.auth-entry-guest {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;

  min-width: 220px !important;
  min-height: 50px !important;

  margin: 0 !important;
  padding: 12px 22px !important;

  border: 1px solid rgba(78, 220, 255, .32) !important;
  border-radius: 15px !important;

  background:
    linear-gradient(
      135deg,
      rgba(168, 76, 255, .3),
      rgba(78, 220, 255, .15)
    ) !important;

  color: var(--text, #fffaf0) !important;
  font-weight: 850 !important;
  letter-spacing: .025em !important;

  cursor: pointer !important;
  touch-action: manipulation !important;
}

/* Preserve the two existing lower cards without another outer shell. */
body.auth-entry-active
#signedOutAccount > .account-form-card,
body.auth-entry-active
#signedOutAccount > .cloud-benefits {
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;

  margin: 0 !important;

  border-color: rgba(255, 255, 255, .11) !important;
  border-radius: 20px !important;

  box-sizing: border-box !important;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .035),
    0 16px 36px rgba(0, 0, 0, .2) !important;
}

/*
 * The ordinary account hero is unnecessary while the entry gate is open.
 * This targets that exact account-screen element only.
 */
body.auth-entry-active
#accountScreen > .account-hero {
  display: none !important;
}

/* Ensure the entry page can scroll naturally. */
body.auth-entry-active {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.auth-entry-active #accountScreen {
  overflow: visible !important;
  min-height: 100dvh !important;
}

/* Tablet and phone layout. */
@media (max-width: 720px) {
  body.auth-entry-active #signedOutAccount.account-auth-layout {
    width: calc(100% - 18px) !important;

    margin-top:
      calc(22px + env(safe-area-inset-top, 0px)) !important;

    padding: 12px !important;

    grid-template-columns: 1fr !important;
    gap: 12px !important;

    border-radius: 23px !important;
  }

  body.auth-entry-active
  #signedOutAccount.account-auth-layout
  #authEntryBanner.auth-entry-banner {
    grid-column: 1 !important;
    padding: 18px 12px 20px !important;
  }

  body.auth-entry-active
  #authEntryBanner.auth-entry-banner > img {
    width: 66px !important;
    height: 66px !important;
  }

  body.auth-entry-active
  #authEntryBanner #entryGuest.auth-entry-guest {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.auth-entry-active
  #signedOutAccount > .account-form-card,
  body.auth-entry-active
  #signedOutAccount > .cloud-benefits {
    height: auto !important;
  }
}

/* Very small phones. */
@media (max-width: 430px) {
  body.auth-entry-active #signedOutAccount.account-auth-layout {
    width: calc(100% - 12px) !important;
    padding: 8px !important;
    border-radius: 20px !important;
  }

  body.auth-entry-active
  #signedOutAccount.account-auth-layout
  #authEntryBanner.auth-entry-banner {
    padding-right: 8px !important;
    padding-left: 8px !important;
  }

  body.auth-entry-active
  #authEntryBanner.auth-entry-banner h1 {
    font-size: clamp(2rem, 11vw, 2.8rem) !important;
  }
}

/* Short laptop windows. */
@media (max-height: 720px) and (min-width: 721px) {
  body.auth-entry-active #signedOutAccount.account-auth-layout {
    margin-top: 24px !important;
  }

  body.auth-entry-active
  #signedOutAccount.account-auth-layout
  #authEntryBanner.auth-entry-banner {
    padding-top: 14px !important;
    padding-bottom: 16px !important;
  }

  body.auth-entry-active
  #authEntryBanner.auth-entry-banner > img {
    width: 58px !important;
    height: 58px !important;
  }
}

