/* Quiet, shared frame for short-lived Steeny flows: invitations, recovery,
   device approval and required client actions. */
*, *::before, *::after { box-sizing: border-box; }

html { min-height: 100%; color-scheme: dark; background: #0b0b0d; }
html.service-root { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }

body.service-page {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #0b0b0d;
  color: #f0edf4;
  font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
}

.service-page .aurora,
.service-page .blob,
.service-page .orb { display: none; }

.service-page .titlebar {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 58px;
  padding: 0 10px 0 24px;
  border: 0;
  border-bottom: 1px solid #1e1d22;
  background: #0b0b0d;
  -webkit-app-region: drag;
}

html:not(.desktop-client) .service-page .titlebar { display: none; }
.service-page .titlebar button { -webkit-app-region: no-drag; }
.service-page .tb-logo { font-size: 22px; line-height: 1; }
.service-page .titlebar-spacer { flex: 1; }
.service-page .recovery-window-controls { display: flex; gap: 4px; }
.service-page .wm-btn {
  display: grid;
  width: 40px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8f8a98;
  cursor: pointer;
}
.service-page .wm-btn:hover { background: #17171a; color: #f0edf4; }
.service-page .wm-btn.close:hover { background: #382024; color: #ffc5cb; }

.service-page .stage {
  position: relative;
  inset: auto;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(32px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  align-items: center;
  justify-content: center;
  overflow: visible;
}

html.desktop-client .service-page .stage {
  min-height: calc(100dvh - 58px);
  margin-top: 58px;
}

.service-page .card-wrap,
.service-page .service-shell {
  display: block;
  width: min(100%, 440px);
  height: auto;
  min-height: 0;
  margin: auto;
}

.service-page .card {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  animation: service-enter .28s ease-out both;
}

@keyframes service-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.service-page .auth-visual { display: none; }
.service-page .auth-card-content { margin: 0; padding: 0; overflow: visible; }

.service-page .auth-brand,
.service-page .service-brand,
.service-page .update-brand {
  display: flex;
  height: auto;
  margin: 0 0 56px;
  align-items: center;
  justify-content: flex-start;
}

.service-page .auth-brand .logo-text,
.service-page .service-brand,
.service-page .update-brand {
  color: #f0edf4;
  font-family: 'Comfortaa', 'Nunito', sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1;
  text-decoration: none;
}

.service-page .service-icon,
.service-page .invite-icon,
.service-page .glyph,
.service-page .status-icon,
.service-page .update-icon {
  display: flex;
  width: 48px;
  height: 48px;
  margin: 0 0 24px;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #9d84e8;
  font-size: 34px;
  font-weight: 400;
}

.service-page .service-icon svg,
.service-page .invite-icon svg,
.service-page .update-icon svg { width: 42px; height: 42px; stroke-width: 1.35; }
.service-page .status-icon.error,
.service-page .glyph.stop { background: transparent; color: #df777f; }
.service-page .glyph.ok,
.service-page .status-icon:not(.error) { background: transparent; color: #77c99a; }

.service-page .heading,
.service-page h1 {
  margin: 0;
  color: #f0edf4;
  font-family: 'Nunito', sans-serif;
  font-size: clamp(28px, 7vw, 34px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.18;
  text-align: left;
}

.service-page .subtitle,
.service-page .intro,
.service-page .lead {
  margin: 14px 0 28px;
  color: #aaa5b2;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
}

.service-page a { color: inherit; }
.service-page button,
.service-page input { font: inherit; }
.service-page button,
.service-page a,
.service-page input { -webkit-tap-highlight-color: transparent; }
.service-page a:focus-visible,
.service-page button:focus-visible,
.service-page input:focus-visible { outline: 2px solid #c3acf8; outline-offset: 3px; }

.service-page .button,
.service-page .btn-submit,
.service-page .submit,
.service-page .manual-link {
  display: flex;
  width: 100%;
  min-height: 48px;
  padding: 12px 22px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: #ae91f4;
  box-shadow: none;
  color: #18111f;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease;
}
.service-page .button:hover,
.service-page .btn-submit:hover,
.service-page .submit:hover,
.service-page .manual-link:hover { transform: none; background: #bba2f6; box-shadow: none; filter: none; }
.service-page .button:active,
.service-page .btn-submit:active,
.service-page .submit:active,
.service-page .manual-link:active { background: #9e7fe4; }

.service-page .button.secondary,
.service-page .secondary-action,
.service-page .logout button {
  background: transparent;
  color: #aaa5b2;
  box-shadow: none;
}
.service-page .button.secondary:hover,
.service-page .secondary-action:hover,
.service-page .logout button:hover { background: transparent; color: #f0edf4; }

.service-page .service-panel,
.service-page .playlist,
.service-page .device,
.service-page .recovery-note {
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 0;
  border-radius: 14px;
  background: #151518;
  color: #aaa5b2;
  text-align: left;
}

.service-page .service-label,
.service-page .playlist-label {
  margin: 0 0 5px;
  color: #85808c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.service-page .service-value,
.service-page .playlist-name {
  overflow: hidden;
  color: #f0edf4;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-page .playlist-owner,
.service-page .service-meta {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #aaa5b2;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.service-page .invite-owner-link { color: #c0a9f7; text-decoration: none; }
.service-page .invite-owner-link:hover { color: #d5c5fb; text-decoration: underline; }

.service-page .note,
.service-page .hint,
.service-page .code-hint,
.service-page .security-note {
  margin: 14px 0 0;
  color: #85808c;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
}

.service-page .code {
  margin: 22px 0 8px;
  color: #c8b5fa;
  font-family: 'Nunito', sans-serif;
  font-size: 44px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: .16em;
  line-height: 1.2;
  text-align: center;
}

.service-page .device-row {
  display: flex;
  gap: 18px;
  padding: 4px 0;
  justify-content: space-between;
  color: #f0edf4;
  font-size: 13px;
  line-height: 1.45;
}
.service-page .device-row span:first-child { color: #85808c; }
.service-page .device-row span:last-child { font-weight: 500; overflow-wrap: anywhere; text-align: right; }
.service-page .actions { display: flex; gap: 10px; margin-top: 24px; }
.service-page .actions .button { flex: 1; }
.service-page .service-warning {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #918b98;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
}
.service-page .home { margin-top: 24px; }

.device-service-page .service-shell { width: min(100%, 440px); }

.password-service-page .intro { margin-bottom: 26px; }
.password-service-page .hint { margin: -2px 0 20px; }
.password-service-page .logout { margin-top: 12px; text-align: center; }
.password-service-page .logout button { padding: 10px 16px; border: 0; cursor: pointer; }

.service-page .recovery-form { margin-top: 0; }
.service-page .field { margin-bottom: 18px; }
.service-page .field label,
.service-page .recovery-form > label {
  display: block;
  margin: 0 0 7px;
  color: #c9c4d0;
  font-size: 12px;
  font-weight: 500;
}
.service-page .input-wrap { position: relative; }
.service-page .input-wrap input,
.service-page .recovery-form > input[type='password'] {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #302e36;
  border-radius: 12px;
  outline: 0;
  background: #151518;
  color: #f0edf4;
  font-size: 15px;
  font-weight: 400;
}
.service-page .recovery-form > input[type='password'] { margin-bottom: 18px; }
.service-page .input-wrap input:focus,
.service-page .recovery-form > input[type='password']:focus {
  border-color: #8f73da;
  box-shadow: 0 0 0 3px rgba(174,145,244,.12);
}
.service-page .input-wrap input::placeholder { color: #6f6a76; }
.service-page .recovery-password-wrap input { padding-right: 44px; }
.service-page .toggle-pwd {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #85808c;
  cursor: pointer;
}
.service-page .toggle-pwd:hover { background: #222126; color: #d2cdd9; }

.service-page .footer { margin-top: 20px; color: #85808c; font-size: 13px; font-weight: 400; text-align: center; }
.service-page .footer-link { color: #b9a1f2; font-weight: 500; text-decoration: none; }
.service-page .footer-link:hover { color: #d0bef8; }
.service-page .recovery-note { margin-bottom: 24px; font-size: 13px; line-height: 1.6; }
.service-page .recovery-note strong { display: block; margin-bottom: 5px; color: #f0edf4; font-weight: 600; }
.service-page .recovery-error,
.service-page .error {
  margin: 0 0 20px;
  padding: 13px 15px;
  border: 0;
  border-radius: 12px;
  background: #271719;
  color: #f2a3aa;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.service-page .recovery-strength { display: flex; gap: 5px; margin-top: 9px; }
.service-page .recovery-strength span { height: 3px; flex: 1; border-radius: 2px; background: #242329; }
.service-page .recovery-field-hint { margin-top: 7px; color: #85808c; font-size: 11px; line-height: 1.5; }
.service-page .turnstile-wrap { display: flex; margin: 0 0 18px; justify-content: center; }

@media (max-width: 520px) {
  .service-page .stage {
    padding:
      max(24px, env(safe-area-inset-top))
      max(20px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
  }
  .service-page .auth-brand,
  .service-page .service-brand,
  .service-page .update-brand { margin-bottom: 44px; }
  .service-page .heading,
  .service-page h1 { font-size: 28px; }
}

@media (max-height: 620px) {
  .service-page .stage { align-items: flex-start; padding-block: 18px; }
  .service-page .auth-brand,
  .service-page .service-brand,
  .service-page .update-brand { margin-bottom: 32px; }
  .service-page .service-icon,
  .service-page .invite-icon,
  .service-page .glyph,
  .service-page .status-icon,
  .service-page .update-icon { margin-bottom: 16px; }
  .service-page .subtitle,
  .service-page .intro,
  .service-page .lead { margin-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .service-page .card { animation: none; }
  .service-page * { transition: none !important; }
}
