/* Sign-in screen for the live app. Black, white and steel, matching the app. */
body.max-locked .app, body.max-locked .scrim, body.max-locked .toast { display: none !important; }
.ma { position: fixed; inset: 0; z-index: 50; background: #0d0e10; color: #f4f4f5; display: flex; align-items: center; justify-content: center; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; }
.ma[hidden] { display: none; }
.ma-card { width: 100%; max-width: 400px; }
.ma-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.ma-logo svg { width: 34px; height: 40px; color: #fff; }
.ma-logo span { font-family: "Barlow Condensed", Poppins, sans-serif; font-weight: 700; font-size: 30px; letter-spacing: .04em; line-height: 1; }
.ma-logo small { display: block; font-family: Poppins, sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: #a9adb3; margin-top: 4px; }
.ma h1 { font-size: 28px; line-height: 1.15; margin: 0 0 10px; font-weight: 700; }
.ma p { color: #c9ccd1; font-size: 15px; line-height: 1.5; margin: 0 0 18px; }
.ma b { color: #fff; }
.ma label { display: block; font-size: 13px; font-weight: 600; color: #a9adb3; margin: 6px 0 6px; }
.ma input { width: 100%; box-sizing: border-box; min-height: 52px; border-radius: 14px; border: 1.5px solid #3a3d42; background: #17181b; color: #fff; font: inherit; font-size: 17px; padding: 12px 16px; }
.ma input:focus { outline: none; border-color: #c7ccd3; box-shadow: 0 0 0 3px rgba(199, 204, 211, .25); }
#ma-code { letter-spacing: .4em; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.ma-btn { width: 100%; min-height: 52px; margin-top: 14px; border-radius: 14px; border: 0; background: linear-gradient(180deg, #f4f5f7, #c9cdd3); color: #0d0e10; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.ma-btn:disabled { opacity: .6; cursor: default; }
.ma-btn.ghost { background: transparent; color: #f4f4f5; border: 1.5px solid #3a3d42; }
.ma-err { min-height: 20px; margin: 8px 0 0; color: #ff9b8f; font-size: 14px; }
.ma-note { font-size: 13px; color: #8d9198; margin-top: 14px; }
.ma-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.ma-link { background: none; border: 0; color: #e3e5e8; font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; cursor: pointer; }
.ma-link:disabled { color: #6c7077; text-decoration: none; }
.ma-legal { font-size: 12px !important; color: #8d9198 !important; margin-top: 28px !important; }
.ma-legal a { color: #c9ccd1; }
/* Add-to-home-screen steps (iPhone in Safari) */
.ma-steps { list-style: none; margin: 6px 0 18px; padding: 0; display: grid; gap: 10px; }
.ma-steps li { display: flex; gap: 14px; align-items: flex-start; background: #17181b; border: 1.5px solid #2a2c30; border-radius: 16px; padding: 14px 16px; font-size: 15px; line-height: 1.45; color: #e3e5e8; }
.ma-n { flex: 0 0 28px; height: 28px; border-radius: 50%; background: linear-gradient(180deg, #f4f5f7, #c9cdd3); color: #0d0e10; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.ma-ico { width: 20px; height: 20px; vertical-align: -4px; color: #fff; }
.ma-warn { background: #2a1f12; border: 1.5px solid #6b4a1f; color: #f3dcb8; border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; margin-bottom: 4px; }
.ma-warn b { color: #fff; }
#ma-url { margin-top: 14px; font-size: 14px; }
/* Fit the screen edge to edge on iPhone and Android.
   The header clears the status bar and camera; the + button, toasts and sheets clear the
   iPhone home bar and the Android gesture bar. */
body .bar { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
body .fab { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
body .toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
body .sheet { padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); }
.ma { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }
/* iPhone home-screen app: boot.js measures the real screen (--app-h) and how short iOS left the page (--ios-gap). */
html.ios-app { height: var(--app-h, 100%); overflow: hidden; background: #0d0e10; }
html.ios-app body { height: 100%; overflow: hidden; background: #0d0e10; }
html.ios-app .scrim, html.ios-app .ma { bottom: auto; height: var(--app-h, 100%); }
html.ios-app .toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px) - var(--ios-gap, 0px)); }
/* iOS blurs the strip under the status bar. A solid, sticky header is what it treats as the top bar,
   and the logo and name sit a little lower, clear of that strip. */
html.ios-app body .bar { position: sticky; top: 0; z-index: 20; background: #0e0f12; padding-top: calc(20px + env(safe-area-inset-top, 0px)); padding-bottom: 14px; }
/* Small phones: let the Up next title wrap to two lines instead of cutting off. */
body .dh-nt b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
