/* The web Jukebox: the desktop window's app.css, then only this. A browser tab
   has its own frame, so the window's title-bar buttons, resize edges and slim
   drag bar go; the account card stands alone (the service sign-ins and guest
   mode live in the apps). */
body.web #rz, body.web .rz, body.web .wbtn, body.web .wgap, body.web #dragbar { display: none !important; }
body.web #strip .who { cursor: default; }

/* Signed out, the web plays as a guest; the Jukebox sign-in opens from Settings
   and Cancel goes back to listening. Signed in with no service, the chooser has
   no Jukebox sign-in (round 2 F). */
body.web #chooseMaro { display: none !important; }

/* Phones: the page is the whole screen, notch and home bar included. */
body.web #body { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom));
  padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
body.web.narrow #body { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: max(6px, env(safe-area-inset-bottom));
  padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); }
@supports (height: 100dvh) { html, body { height: 100dvh; } }
body.web input, body.web textarea { user-select: text; }


/* Touch screens: a tap is not a hover, so no tooltips popping up under fingers. */
@media (hover: none) { body.web #tip { display: none !important; } }

/* Guests: Sign in sits next to Settings (signed in, it is gone). */
#webSignin { height: 30px; margin-right: 4px; }
body.web:not(.web-out) #webSignin { display: none !important; }

/* Sign-in (and the first-run chooser) is its own page: the player and the top
   bar step aside, Back (or Esc) returns to them. */
body.web.web-gate #player, body.web.web-gate #strip { display: none !important; }
body.web #gateCancel { display: none !important; }
#gateHead { display: none; }
body.web.web-gate #gateHead { display: flex; align-self: stretch; align-items: center; min-height: 40px; padding: 0 24px; margin-bottom: 8px; }
body.web.web-gate #gateHead #gateBack { gap: 8px; }
body.web.web-gate #gate { padding-top: 16px; }
body.web.narrow.web-gate #gateHead { padding: 0 12px; }

/* The guest dialogs (the jam name, the jam's end): the window's tile, square. */
#webDialog { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px;
  background: rgba(0,0,0,.6); opacity: 0; transition: opacity .16s var(--ease-out); }
#webDialog.on { opacity: 1; }
#webDialog.out { opacity: 0; }
#webDialog .wd-card { width: min(100%, 400px); display: flex; flex-direction: column; gap: 12px; padding: 24px;
  background: var(--raise); border: 1px solid var(--line); border-radius: 0; box-shadow: 0 18px 48px rgba(0,0,0,.55);
  transform: translateY(6px); transition: transform .2s var(--ease-out); }
#webDialog.on .wd-card { transform: none; }
#webDialog .wd-title { color: var(--fg); font-size: 16px; font-weight: 700; letter-spacing: -.045em; overflow-wrap: anywhere; }
#webDialog .wd-pfp { display: block; width: 64px; height: 64px; margin-bottom: 12px; border-radius: 50%; object-fit: cover; }
#webDialog .wd-title b { color: var(--accent); font-weight: 700; }
#webDialog .wd-text { color: var(--t2); font-size: 12px; line-height: 1.55; }
#webDialog .wd-input { height: 34px; width: 100%; box-sizing: border-box; font-size: 13px; }
#webDialog .wd-err { color: var(--soft); font-size: 12px; }
#webDialog .wd-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
@media (max-width: 420px) { #webDialog .wd-acts .m-btn { flex: 1 1 0; } }
/* A guest dialog is the one thing on screen: no toast peeking out behind it. */
body:has(#webDialog) #toast { visibility: hidden; }
