/* CastedIn sign-in page */
:root {
  --ink: #1b1530; --purple: #6941c6; --purple-dark: #5530b0; --gold: #f1c75b; --text: #1d1b26; --muted: #6b6878;
  --line: #ddd8ea; --bg: #f3f1f9; --error: #b42318;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; --display: "Anek Telugu", var(--font);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); }

.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 1fr); }

/* left: the stage */
.stage {
  position: relative; overflow: hidden; color: #fff; padding: 40px 56px;
  display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(800px 420px at 85% -5%, rgba(105,65,198,.6), transparent 65%),
    radial-gradient(700px 400px at -10% 110%, rgba(184,134,11,.32), transparent 60%),
    var(--ink);
}
.brand { position: absolute; top: 32px; left: 56px; display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand span { font: 700 26px/1 var(--display); font-stretch: 92%; letter-spacing: -0.01em; }
.stage h1 { margin: 0; max-width: 11ch; font: 700 clamp(44px, 6vw, 76px)/0.98 var(--display); font-stretch: 85%; letter-spacing: -0.02em; position: relative; z-index: 1; }
.lede { margin: 18px 0 0; max-width: 40ch; color: #cdc5ea; font-size: 17px; position: relative; z-index: 1; }

/* the credits roll */
.credits {
  position: absolute; right: 48px; top: 0; bottom: 0; width: 230px; overflow: hidden;
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.credits ul { list-style: none; margin: 0; padding: 0; text-align: right; animation: roll 36s linear infinite; }
.credits li { padding: 9px 0; font: 600 20px/1.2 var(--display); font-stretch: 90%; color: rgba(255,255,255,.22); }
.credits li:nth-child(3n+1) span { color: rgba(241,199,91,.75); }
@keyframes roll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) { .credits ul { animation: none; } }

/* right: the form */
.panel { display: grid; place-items: center; padding: 32px 24px; }
.card { width: min(420px, 100%); background: #fff; border-radius: 16px; padding: 8px 28px 28px;
  box-shadow: 0 1px 2px rgba(27,21,48,.06), 0 18px 40px -20px rgba(27,21,48,.35); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin: 0 -28px 22px; }
.tabs button { border: 0; background: none; padding: 16px 8px 14px; font: 600 15px var(--font); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--purple); border-bottom-color: var(--purple); }
.card h2 { margin: 0 0 16px; font: 700 28px/1.1 var(--display); font-stretch: 90%; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
label small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: 16px var(--font); color: var(--text);
  border: 1px solid #cfc9de; border-radius: 10px; background: #fff; }
input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(105,65,198,.18); }
.pw { position: relative; display: block; }
.pw input { padding-right: 70px; }
.show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 3px; border: 0; background: none; color: var(--purple); font: 600 13px var(--font); padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.show:hover { background: #f1ecfc; }
.primary { width: 100%; margin-top: 6px; padding: 13px; border: 0; border-radius: 10px; background: var(--purple); color: #fff; font: 600 16px var(--font); cursor: pointer; }
.primary:hover { background: var(--purple-dark); }
.primary:disabled { opacity: .6; cursor: progress; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(105,65,198,.45); outline-offset: 2px; }
.error { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: #fef3f2; color: var(--error); font-size: 14px; }
.closed { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

/* phones: the stage becomes a short banner */
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .stage { padding: 76px 20px 28px; }
  .brand { top: 20px; left: 20px; }
  .brand img { width: 36px; height: 36px; }
  .brand span { font-size: 22px; }
  .stage h1 { font-size: 40px; max-width: 14ch; }
  .lede { font-size: 15px; margin-top: 10px; }
  .panel { place-items: start center; padding: 0 16px 32px; margin-top: -14px; }
  .card { padding: 4px 20px 22px; }
  .tabs { margin: 0 -20px 18px; }
}

.lead-small { margin: -6px 0 16px; color: var(--muted); }
.code-input { font: 600 26px/1 var(--font) !important; letter-spacing: .5em; text-align: center; padding: 14px !important; }
.code-links { display: flex; justify-content: space-between; margin: 14px 0 0; }
.linkbtn { border: 0; background: none; color: var(--purple); font: 600 14px var(--font); cursor: pointer; padding: 4px 0; }
.linkbtn:hover { text-decoration: underline; }

/* forgot password, experience, waiting */
.forgot-row { margin: -6px 0 10px; text-align: right; }
.exp { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; margin: 4px 0 14px; }
.exp legend { padding: 0 6px; font-weight: 700; font-size: 14px; }
.exp-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.exp-opt { position: relative; margin: 0; cursor: pointer; }
.exp-opt input { position: absolute; opacity: 0; pointer-events: none; }
.exp-opt span { display: grid; gap: 2px; height: 100%; padding: 10px 12px; border: 1.5px solid #cfc9de; border-radius: 10px; font-weight: 600; }
.exp-opt small { font-weight: 400; color: var(--muted); font-size: 12px; }
.exp-opt input:checked + span { border-color: var(--purple); background: #f4effd; box-shadow: 0 0 0 3px rgba(105,65,198,.12); }
.exp-opt input:focus-visible + span { outline: 3px solid rgba(105,65,198,.45); outline-offset: 2px; }
select { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: 16px var(--font); color: var(--text);
  border: 1px solid #cfc9de; border-radius: 10px; background: #fff; }
select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(105,65,198,.18); }
.exp-row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.exp-how { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #f6f4fb; color: var(--muted); font-size: 13px; }
#phNote.ok { color: #067647; }
.wait { text-align: center; }
.wait-ico { font-size: 40px; margin: 14px 0 4px; }
.wait-list { list-style: none; margin: 0 0 12px; padding: 0; text-align: left; display: grid; gap: 8px; }
.wait-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.wait-list small { display: block; color: var(--muted); }
.pill { flex: none; padding: 3px 10px; border-radius: 999px; font: 600 12px var(--font); background: #fef0c7; color: #93370d; }
.pill.ok { background: #dcfae6; color: #067647; }
.pill.no { background: #fee4e2; color: #b42318; }
.wait-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
@media (max-width: 420px) { .exp-pick { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }

.in-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -6px 0 12px; }
.keep { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; font-size: 14px; cursor: pointer; }
.keep input { width: 18px; height: 18px; margin: 0; accent-color: var(--purple); }
.welcome { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #f6f4fb; }
.welcome b { display: block; }
.welcome small { color: var(--muted); }

/* ===== Messages and the two-step "Create account" (verify mobile, then details) ===== */
.flash { margin: 18px 0 0; padding: 11px 14px; border-radius: 10px; background: #dcfae6; color: #067647; font-weight: 600; font-size: 14px; transition: opacity .5s; }
.flash::before { content: "\2713"; margin-right: 8px; }
.flash.fade { opacity: 0; }
.up-steps { display: flex; gap: 6px; list-style: none; margin: -4px 0 16px; padding: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.up-steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #f6f4fb; }
.up-steps span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e4def2; color: var(--muted); font-size: 12px; flex: none; }
.up-steps li.on { color: var(--purple); background: #f1ecfc; }
.up-steps li.on span { background: var(--purple); color: #fff; }
.up-steps li.done { color: #067647; background: #ecfdf3; }
.up-steps li.done span { background: #12b76a; color: #fff; font-size: 0; }
.up-steps li.done span::before { content: "\2713"; font-size: 12px; }
.inline-send { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.inline-send input { margin-top: 0; flex: 1; min-width: 0; }
.inline-send .code-input { font-size: 20px !important; letter-spacing: .35em; padding: 10px !important; }
.send-btn { flex: none; padding: 0 16px; border: 1.5px solid var(--purple); border-radius: 10px; background: #fff; color: var(--purple); font: 600 14px var(--font); cursor: pointer; }
.send-btn:hover { background: #f4effd; }
.send-btn:disabled { opacity: .6; cursor: progress; }
#phoneCodeRow .code-links { margin: -6px 0 12px; }
.phone-ok { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 11px 14px; border-radius: 10px; background: #ecfdf3; color: #067647; font-size: 14px; }
.phone-ok .linkbtn { margin-left: auto; }
.up-rest { border: 0; margin: 0; padding: 0; min-width: 0; transition: opacity .2s; }
.up-rest:disabled { opacity: .45; }
.up-rest:disabled input, .up-rest:disabled select { background: #f6f4fb; cursor: not-allowed; }
.opt { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.primary:disabled { opacity: .5; cursor: not-allowed; }

/* country code + number, confirm password */
.inline-send .cc { flex: none; width: 108px; margin-top: 0; padding: 0 8px; border: 1.5px solid var(--line, #d8d3e6); border-radius: 10px; background: #fff;
  font: 600 14.5px var(--font); color: inherit; cursor: pointer; }
.inline-send .cc:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(105,65,198,.18); }
.inline-send .cc:disabled { background: #f6f4fb; cursor: default; }
.pw-match.bad { color: #b42318; font-weight: 600; }
.pw-match.ok { color: #067647; font-weight: 600; }
input.mismatch { border-color: #f04438 !important; box-shadow: 0 0 0 3px rgba(240,68,56,.15) !important; }
@media (max-width: 420px) { .inline-send { flex-wrap: wrap; } .inline-send .cc { width: 116px; padding: 0 4px; font-size: 14px; } .inline-send input[name=mobile] { flex: 1 1 140px; } .inline-send #phoneSend { flex: 1 0 100%; padding: 10px; } }

/* ===== Compact: sign in and create account fit on one screen ===== */
.auth { min-height: 100vh; min-height: 100dvh; }  /* fits one screen; if it can't (small screen, zoom, keyboard) the page scrolls */
.panel { place-items: start center; padding: 14px 24px; align-content: center; }
.card { width: min(540px, 100%); padding: 4px 26px 20px; }
.tabs { margin: 0 -26px 14px; }
.tabs button { padding: 13px 8px 11px; }
.card h2 { font-size: 22px; margin: 0 0 10px; }
label { margin-bottom: 10px; font-size: 13.5px; }
label small { margin-top: 3px; font-size: 12px; }
input, select { margin-top: 4px; padding: 9px 12px; font-size: 15px; border-radius: 9px; }
.inline-send { margin-top: 4px; }
.inline-send .cc { height: auto; }
.send-btn { padding: 0 14px; font-size: 13.5px; }
.primary { padding: 11px; font-size: 15.5px; margin-top: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.row2 > label[hidden] { display: none; }
.row2:has(> #idLabel:not([hidden])) { grid-template-columns: 1fr 1fr; }
.exp { padding: 8px 12px 2px; margin: 2px 0 10px; }
.exp-pick { margin-bottom: 8px; gap: 8px; }
.exp-opt span { padding: 7px 10px; font-size: 13.5px; }
.exp-opt small { font-size: 11.5px; line-height: 1.3; }
.phone-ok { padding: 8px 12px; margin-bottom: 10px; }
#phoneCodeRow .code-links { margin: -4px 0 8px; }
.inline-send .code-input { font-size: 18px !important; padding: 8px !important; }
.flash { margin: 14px 0 0; padding: 9px 12px; }
.in-row { margin: -2px 0 10px; }
.stage h1 { font-size: clamp(40px, 5vw, 64px); }
@media (max-height: 760px) and (min-width: 821px) { .stage h1 { font-size: clamp(36px, 4.4vw, 54px); } .lede { font-size: 15.5px; } }
@media (max-width: 820px) {
  .auth { height: auto; min-height: 100dvh; }
  .stage { padding: 62px 20px 22px; }
  .stage h1 { font-size: 30px; }
  .lede { display: none; }
  .panel { overflow: visible; align-content: start; padding: 0 12px 20px; }
  .card { padding: 2px 16px 16px; }
  .tabs { margin: 0 -16px 12px; }
}
@media (max-width: 340px) { .row2 { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .exp-pick { grid-template-columns: 1fr 1fr; } .row2 { gap: 0 8px; } .pw input { padding-right: 52px; } .show { padding: 6px; font-size: 12px; } }

/* ===== Narrower card, smaller boxes ===== */
.card { width: min(460px, 100%); padding: 2px 22px 18px; border-radius: 14px; transition: width .2s; }
.card:has(#formUp[hidden]) { width: min(380px, 100%); }   /* sign in, forgot password, waiting */
.tabs { margin: 0 -22px 12px; }
.tabs button { padding: 11px 8px 9px; font-size: 14px; }
.card h2 { font-size: 20px; margin: 0 0 8px; }
label { font-size: 13px; margin-bottom: 9px; }
input, select { padding: 7px 11px; font-size: 14px; border-radius: 8px; margin-top: 3px; }
.inline-send { margin-top: 3px; gap: 6px; }
.inline-send .cc { width: 100px; font-size: 13.5px; }
.send-btn { padding: 0 11px; font-size: 13px; border-radius: 8px; }
.pw input { padding-right: 56px; }
.show { margin-top: 1px; padding: 5px 8px; font-size: 12.5px; }
.primary { padding: 9px; font-size: 15px; border-radius: 8px; }
.keep, .linkbtn { font-size: 13px; }
.keep input { width: 16px; height: 16px; }
.exp-opt span { padding: 6px 9px; }
.code-input { font-size: 20px !important; padding: 8px !important; }

/* "I'm new" (fresher) details */
.exp-new { display: grid; gap: 2px; }
.exp-new[hidden] { display: none; }
.fr-lab { font-weight: 600; font-size: 13px; margin: 6px 0 5px; }
.fr-lab small { font-weight: 400; color: var(--muted); }
.fr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.fr-chips label, .fr-seg label { position: relative; margin: 0; cursor: pointer; }
.fr-chips input, .fr-seg input { position: absolute; opacity: 0; pointer-events: none; }
.fr-chips span { display: inline-block; padding: 5px 10px; border: 1.5px solid #cfc9de; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: #fff; }
.fr-small span { padding: 4px 9px; font-size: 12px; }
.fr-chips input:checked + span { border-color: var(--purple); background: var(--purple); color: #fff; }
.fr-chips input:focus-visible + span, .fr-seg input:focus-visible + span { outline: 3px solid rgba(105,65,198,.45); outline-offset: 2px; }
.fr-seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid #cfc9de; border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.fr-seg2 { grid-template-columns: 1fr 1fr; }
.fr-seg span { display: block; text-align: center; padding: 7px 4px; font-size: 12.5px; font-weight: 600; border-left: 1px solid #e4dff0; }
.fr-seg label:first-child span { border-left: 0; }
.fr-seg input:checked + span { background: #f4effd; color: var(--purple); box-shadow: inset 0 -2px 0 var(--purple); }
.exp-new textarea { width: 100%; resize: vertical; min-height: 52px; font: inherit; font-size: 14px; padding: 8px 10px; border: 1.5px solid #cfc9de; border-radius: 10px; }
.exp-new label small.opt { display: inline; color: var(--muted); font-weight: 400; }
.exp-new textarea { margin-top: 4px; }
/* "details saved" popup */
.saved-pop { border: 0; border-radius: 16px; padding: 22px 22px 18px; width: min(92vw, 380px); box-shadow: 0 20px 60px rgba(30,20,60,.3); text-align: center; }
.saved-pop::backdrop { background: rgba(20,14,40,.45); }
.saved-pop .sp-ico { width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%; background: #e7f6ee; color: #1a8a4a; display: grid; place-items: center; font-size: 28px; font-weight: 700; }
.saved-pop h2 { margin: 0 0 4px; font-size: 19px; }
.saved-pop p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.saved-pop ul { list-style: none; margin: 0 0 14px; padding: 10px 12px; background: #f6f4fb; border-radius: 10px; text-align: left; font-size: 13px; display: grid; gap: 4px; }
.saved-pop ul b { color: #333; }
.saved-pop button { width: 100%; }

/* compact fresher block */
.exp-new .row2 label { margin-bottom: 7px; }
.fr-lab { margin: 2px 0 4px; font-size: 12.5px; }
.fr-chips { gap: 5px; margin-bottom: 7px; }
.fr-chips span { padding: 3px 9px; font-size: 12px; border-width: 1px; }
.fr-small span { padding: 2px 8px; font-size: 11.5px; }
.fr-more { border: 0; background: none; color: var(--purple); font: 600 12px var(--font); cursor: pointer; padding: 3px 4px; }
.fr-more:hover { text-decoration: underline; }
.exp-new label { font-size: 12.5px; }
.exp-new input, .exp-new select { padding: 6px 10px; font-size: 13.5px; }
.exp-new #frTrainBox { margin-bottom: 7px; }
.exp-opt small { display: none; }
.exp-opt span { padding: 6px 10px; text-align: center; }
.exp-pick { margin-bottom: 6px; }
.exp { padding: 6px 12px 0; }

/* ===== Create account in two steps: each fits on one screen ===== */
.up-step { display: block; margin-top: 2px; font: 600 12px var(--font); color: var(--purple); letter-spacing: 0; }
.up-back { display: none; margin: -2px 0 8px; font-size: 12.5px; }
#formUp[data-step="1"] .exp { display: none; }
#formUp[data-step="2"] > :not(h2):not(#upRest):not(.error):not(#upBtn):not(.up-back) { display: none !important; }
#formUp[data-step="2"] #upRest > :not(.exp) { display: none !important; }
#formUp[data-step="2"] .up-back { display: inline-block; }
#formUp[data-step="2"] .exp { margin-top: 0; }
#formUp[data-step="2"] .exp legend { display: none; }
#formUp { position: relative; }
#formUp[data-step="2"] .up-back { position: absolute; top: 4px; right: 0; margin: 0; }
#formUp[data-step="2"] .fr-small { flex-wrap: nowrap; gap: 4px; }
#formUp[data-step="2"] .fr-small span { padding: 2px 7px; font-size: 11px; }
#formUp[data-step="2"] .exp-new .row2 label { margin-bottom: 5px; }
#formUp[data-step="2"] .exp-pick { margin-bottom: 4px; }
@media (max-height: 620px) and (min-width: 821px) { .panel { padding: 6px 24px; } .card { padding-bottom: 12px; } .tabs button { padding: 9px 8px 7px; } .card h2 { margin-bottom: 6px; } }

/* "I'm new / I've worked in films" on step 1, below the passwords */
#formUp .exp-q { margin: 2px 0 6px; font-size: 13px; }
#formUp .exp-pick { margin-bottom: 12px; gap: 10px; }
#formUp .exp-opt span { padding: 10px 12px; text-align: left; gap: 3px; border-radius: 12px; }
#formUp .exp-opt b { font-size: 14.5px; }
#formUp .exp-opt small { display: block; font-size: 11.5px; line-height: 1.3; }
#formUp[data-step="2"] .exp { border: 0; padding: 0; margin: 0 0 8px; }
.card:has(#formUp:not([hidden])) { width: min(440px, 100%); }
#formUp[data-step="1"] #upBtn { display: none; }
#formUp .exp-q small { font-weight: 400; color: var(--muted); font-size: 12px; }
#formUp .exp-opt span { padding: 12px 14px; }
#formUp .exp-opt:hover span { border-color: var(--purple); }

/* ===== One page: the fresher / work form opens in a popup ===== */
#formUp .exp-pick { margin-bottom: 4px; }
.career-pop { border: 0; border-radius: 16px; padding: 16px 20px 18px; width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  overflow: auto; box-shadow: 0 24px 70px rgba(27,21,48,.35); color: var(--text); }
.career-pop::backdrop { background: rgba(20,14,40,.55); backdrop-filter: blur(2px); }
.cp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cp-head h3 { margin: 0; font: 700 19px/1.2 var(--display); }
.cp-head small { color: var(--muted); font-size: 12.5px; }
.cp-x { border: 0; background: #f3f0fa; color: var(--muted); width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; flex: none; }
.cp-x:hover { background: #e9e3f7; color: var(--text); }
.career-pop .exp { border: 0; padding: 0; margin: 0 0 6px; min-width: 0; }
.career-pop .primary { margin-top: 4px; }
.career-pop .error { margin: 4px 0 8px; }
.career-pop .fr-small { gap: 4px; }
#upRest:disabled .exp-opt { cursor: not-allowed; }
#phoneNote.need { color: #b42318; font-weight: 600; animation: needShake .35s; }
@keyframes needShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
#phVerify { background: var(--purple); color: #fff; }
#phVerify:hover { background: var(--purple-dark); }
.wait-live { margin: -4px 0 10px; font-size: 12.5px; color: var(--muted); }
.wait-live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #12b76a; animation: livePulse 1.4s infinite; }
@keyframes livePulse { 50% { opacity: .25; } }
.stage-copy { position: absolute; left: 56px; bottom: 18px; margin: 0; font-size: 12px; color: rgba(255,255,255,.55); }
@media (max-width: 820px) { .stage-copy { display: none; } }

/* ===== Phones in "desktop site" mode, tablets held upright: same stacked layout as phones, page scrolls ===== */
@media (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100dvh; }
  .stage { padding: 80px 32px 34px; justify-content: flex-end; }
  .brand { top: 22px; left: 32px; }
  .stage h1 { font-size: 46px; max-width: 14ch; }
  .stage-copy { display: none; }
  .panel { align-content: start; padding: 0 24px 32px; margin-top: -14px; }
}
html { overflow-x: hidden; }
body { overflow: visible; }

/* ===== Phones and upright tablets: the credits roll becomes a strip of roles moving sideways under the headline ===== */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .auth { grid-template-rows: auto 1fr; }
  .stage { justify-content: flex-end; }
  .credits { position: static; inset: auto; width: auto; height: auto; margin: 16px -20px 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
  .credits ul { display: flex; width: max-content; gap: 22px; text-align: left; animation: rollx 30s linear infinite; }
  .credits li { padding: 0; font-size: 16px; white-space: nowrap; color: rgba(255,255,255,.35); }
}
@keyframes rollx { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== "Mobile number verified" popup ===== */
.ok-pop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(27,21,48,.45); padding: 16px; animation: okfade .15s ease; }
.ok-pop[hidden] { display: none; }
.ok-pop div { background: #fff; border-radius: 18px; padding: 26px 26px 22px; max-width: 340px; width: 100%; text-align: center; box-shadow: 0 24px 60px -20px rgba(27,21,48,.6); }
.ok-pop .ok-tick { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%; background: #e7f8ee; color: #12924a; font: 700 30px/1 var(--font); }
.ok-pop h2 { margin: 0 0 6px; font: 700 21px var(--display); color: var(--ink, #1b1530); }
.ok-pop p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }
.ok-pop button { width: 100%; }
@keyframes okfade { from { opacity: 0; } to { opacity: 1; } }

/* ===== Phones: app-style layout. Hero fills the top, the form sits in a sheet with rounded top corners,
   big touch targets, 16px text (no zoom on iPhone), page scrolls when the form is long ===== */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  html, body { background: var(--ink); }
  .auth { min-height: 100dvh; grid-template-rows: 1fr auto; background: var(--ink); }
  .stage { min-height: 230px; padding: calc(78px + env(safe-area-inset-top)) 22px 50px; justify-content: flex-end; }
  .brand { top: calc(22px + env(safe-area-inset-top)); left: 22px; }
  .brand img { width: 40px; height: 40px; }
  .brand span { font-size: 24px; }
  .stage h1 { font-size: clamp(34px, 9.5vw, 44px); line-height: 1; max-width: 12ch; }
  .lede { display: block; font-size: 14.5px; margin-top: 10px; color: #cdc5ea; max-width: 34ch; }
  .credits { margin: 18px -22px 0; }
  .credits li { font-size: 15px; }
  .panel { display: block; margin-top: -26px; padding: 0; position: relative; z-index: 2; }
  .card, .card:has(#formUp[hidden]), .card:has(#formUp:not([hidden])) { width: 100%; max-width: none; box-sizing: border-box; border-radius: 26px 26px 0 0; margin: 0;
    padding: 4px 22px calc(26px + env(safe-area-inset-bottom)); box-shadow: 0 -14px 34px -16px rgba(0,0,0,.55); overflow: hidden; }
  .card::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 3px; background: #ddd8ea; margin: 8px auto 2px; }
  .tabs { margin: 0 -22px 18px; }
  .tabs button { padding: 14px 8px 13px; font-size: 16px; }
  .card h2 { font-size: 26px; margin: 0 0 14px; }
  label { font-size: 14.5px; margin-bottom: 14px; }
  input, select { min-height: 50px; padding: 12px 14px; font-size: 16px !important; border-radius: 12px; }
  .primary { min-height: 52px; font-size: 17px; border-radius: 14px; }
  .send-btn { min-height: 50px; border-radius: 12px; }
}
@media (max-width: 380px) { .stage h1 { font-size: 32px; } .card { padding-left: 16px; padding-right: 16px; } .tabs { margin: 0 -16px 16px; } }

/* ===== Phones: the roles roll upwards down the right side of the purple area (fills the empty right side) ===== */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .stage { position: relative; overflow: hidden; }
  .credits { position: absolute; top: calc(74px + env(safe-area-inset-top)); right: 16px; bottom: 40px; left: auto; width: 40%; height: auto; margin: 0;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
  .credits ul { display: block; width: auto; text-align: right; animation: roll 34s linear infinite; }
  .credits li { padding: 7px 0; font-size: 16px; white-space: normal; color: rgba(255,255,255,.28); }
  .stage h1, .lede { max-width: 58%; position: relative; z-index: 1; }
  .stage h1 { font-size: clamp(30px, 8.6vw, 44px); }
  .lede { font-size: 14px; }
}
@media (min-width: 600px) and (max-width: 1180px) { .credits { width: 34%; } .stage h1, .lede { max-width: 62%; } }

/* ===== Phones: a more compact sign-in form (normal-sized, not zoomed) ===== */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .stage { min-height: 0; padding-top: calc(70px + env(safe-area-inset-top)); padding-bottom: 42px; }
  .stage h1 { font-size: clamp(28px, 7.6vw, 38px); }
  .lede { font-size: 13.5px; line-height: 1.45; margin-top: 8px; }
  .credits li { font-size: 14.5px; padding: 6px 0; }
  .card { padding-left: 20px; padding-right: 20px; }
  .tabs { margin: 0 -20px 14px; }
  .tabs button { padding: 11px 8px 10px; font-size: 15px; }
  .card h2 { font-size: 21px; margin: 0 0 10px; }
  label { font-size: 13.5px; margin-bottom: 11px; }
  input, select { min-height: 44px; padding: 9px 12px; border-radius: 10px; }
  .primary { min-height: 46px; font-size: 16px; border-radius: 12px; }
  .send-btn { min-height: 44px; border-radius: 10px; }
}
@media (max-width: 380px) { .card { padding-left: 16px; padding-right: 16px; } .tabs { margin: 0 -16px 14px; } }

/* ===== Phones: smaller still ===== */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .card { padding-left: 18px; padding-right: 18px; }
  .card::before { width: 36px; height: 4px; margin: 7px auto 0; }
  .tabs { margin: 0 -18px 12px; }
  .tabs button { padding: 9px 8px 8px; font-size: 14px; }
  .card h2 { font-size: 18px; margin: 0 0 8px; }
  label { font-size: 12.5px; margin-bottom: 9px; }
  input, select { min-height: 40px; padding: 7px 11px; font-size: 15px !important; border-radius: 9px; }
  .primary { min-height: 42px; font-size: 15px; border-radius: 10px; }
  .send-btn { min-height: 40px; font-size: 14px; border-radius: 9px; }
  .row-between, .remember, .forgot { font-size: 13px; }
  .hint, .field-note, small { font-size: 12px; }
}

/* ===== Phones: purple area only as tall as its content, the white form fills the rest (no big empty purple space) ===== */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .auth { grid-template-rows: auto 1fr; background: #fff; }
  .stage { justify-content: flex-start; padding-top: calc(76px + env(safe-area-inset-top)); padding-bottom: 46px; }
  .panel { background: #fff; }
  .card { min-height: 100%; }
  .credits { top: calc(16px + env(safe-area-inset-top)); bottom: 30px; right: 14px; width: 38%; }
  .credits li { font-size: 13.5px; padding: 5px 0; color: rgba(255,255,255,.22); }
  .credits li:nth-child(3n+1) span { color: rgba(241,199,91,.6); }
}

/* ===== Phones: space at the top of the white sheet, Sign in / Create account as a rounded switch ===== */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .card { padding-top: 14px; }
  .card::before { margin: 10px auto 18px; }
  .tabs { margin: 0 0 18px; padding: 4px; gap: 4px; border: 0; border-radius: 14px; background: #f1eef8; }
  .tabs button { padding: 10px 8px; margin: 0; border: 0; border-radius: 10px; font-size: 14.5px; color: #6b6585; transition: background .15s, color .15s; }
  .tabs button[aria-selected="true"] { background: #fff; color: var(--purple); box-shadow: 0 1px 3px rgba(27,21,48,.12), 0 4px 12px -6px rgba(27,21,48,.25); }
}

/* ===== Phones: the white sheet is only as tall as the form (no empty white space below the button);
   the purple area takes the rest with its text centred. More space under the Sign in / Create account switch. ===== */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .auth { grid-template-rows: 1fr auto; background: var(--ink); }
  .stage { justify-content: center; }
  .card { min-height: 0; }
  .panel { background: transparent; }
  .tabs { margin-bottom: 26px; gap: 6px; }
}

/* ===== Phones & installed app (final): the same look as the computer page, stacked —
   dark purple area with the big heading and the roles rolling upwards on the right,
   then a light lavender area with the same white floating card (straight tabs with a purple underline) ===== */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  html, body { background: #f3f1f9; }
  .auth { min-height: 100dvh; grid-template-rows: auto 1fr; background: #f3f1f9; }
  .stage { position: relative; overflow: hidden; min-height: 0; justify-content: flex-start;
    padding: calc(72px + env(safe-area-inset-top)) 20px 26px; }
  .brand { top: calc(18px + env(safe-area-inset-top)); left: 20px; gap: 10px; }
  .brand img { width: 36px; height: 36px; }
  .brand span { font-size: 22px; }
  .stage h1 { font-size: clamp(30px, 9vw, 40px); line-height: .98; max-width: 7.5ch; }
  .lede { display: block; font-size: 13px; line-height: 1.45; margin-top: 10px; max-width: 58%; color: #cdc5ea; }
  .credits { position: absolute; top: 0; bottom: 0; right: 16px; left: auto; width: 42%; height: auto; margin: 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
            mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent); }
  .credits ul { display: block; width: auto; text-align: right; animation: roll 36s linear infinite; }
  .credits li { padding: 6px 0; font: 600 15px/1.2 var(--display); font-stretch: 90%; white-space: nowrap;
    background: none; border: 0; border-radius: 0; color: rgba(255,255,255,.22); }
  .credits li:nth-child(3n+1) span { color: rgba(241,199,91,.75); }
  .stage h1, .lede { position: relative; z-index: 1; }
  .panel { display: block; margin: 0; padding: 18px 14px calc(18px + env(safe-area-inset-bottom)); background: #f3f1f9; border-radius: 0; }
  .card, .card:has(#formUp[hidden]), .card:has(#formUp:not([hidden])) { width: 100%; max-width: 460px; min-height: 0; margin: 0 auto;
    box-sizing: border-box; border-radius: 16px; padding: 6px 20px 20px; overflow: visible;
    box-shadow: 0 1px 2px rgba(27,21,48,.06), 0 18px 40px -18px rgba(27,21,48,.28); }
  .card::before { display: none; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 -20px 16px; padding: 0; background: none;
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .tabs button, .tabs button[aria-selected="true"] { margin: 0 0 -1px; padding: 13px 8px 11px; border: 0; border-bottom: 3px solid transparent;
    border-radius: 0; background: none; box-shadow: none; font-size: 15px; color: var(--muted); }
  .tabs button[aria-selected="true"] { color: var(--purple); border-bottom-color: var(--purple); }
  .card h2 { font-size: 22px; margin: 0 0 12px; }
  label { font-size: 13.5px; margin-bottom: 12px; }
  input, select { min-height: 44px; font-size: 16px !important; border-radius: 10px; }
  .primary { min-height: 46px; font-size: 16px; border-radius: 12px; }
}
@media (max-height: 700px) and (max-width: 820px) { .lede { display: none; } .stage { padding-bottom: 22px; } }
@media (max-width: 380px) {
  .credits { width: 36%; right: 12px; }
  .credits li { font-size: 13px; }
  .stage h1 { font-size: 30px; }
  .panel { padding-left: 10px; padding-right: 10px; }
  .card, .card:has(#formUp[hidden]), .card:has(#formUp:not([hidden])) { padding-left: 16px; padding-right: 16px; }
  .tabs { margin-left: -16px; margin-right: -16px; }
  .row-between, .remember, .forgot { font-size: 12.5px; white-space: nowrap; }
}
/* ===== Footer under the sign-in card (phones and the installed app): the same footer as the main site ===== */
html, body { max-width: 100%; overflow-x: hidden; }
.m-foot { display: none; }
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .auth, .stage, .panel { max-width: 100vw; }
  .panel { display: flex; flex-direction: column; min-width: 0; }
  .card, .card:has(#formUp[hidden]), .card:has(#formUp:not([hidden])) { max-width: min(460px, 100%); margin-bottom: 22px; }
  .row-between, .remember, .forgot { white-space: normal; flex-wrap: wrap; }
  .m-foot { display: block; box-sizing: border-box; margin: auto -14px calc(-18px - env(safe-area-inset-bottom));
    padding: 30px 22px calc(22px + env(safe-area-inset-bottom)); color: #d9d4ea; text-align: left;
    background: radial-gradient(520px 260px at 0% 0%, rgba(105,65,198,.5), transparent 70%),
                radial-gradient(420px 220px at 100% 100%, rgba(184,134,11,.18), transparent 70%), #1d1533; }
  .mf-logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 12px; }
  .mf-logo b { font: 700 22px/1 var(--display); font-stretch: 92%; }
  .mf-brand p { margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: #c9c2de; }
  .mf-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13px; line-height: 1.45; color: #b8b0d0; }
  .mf-facts li { position: relative; padding-left: 22px; }
  .mf-facts li::before { content: "\2713"; position: absolute; left: 0; color: #f1c75b; font-weight: 700; }
  .mf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 18px; margin-top: 26px; }
  .mf-col { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; min-width: 0; }
  .mf-col h4 { margin: 0 0 3px; color: #fff; font-size: 12.5px; letter-spacing: .8px; text-transform: uppercase; }
  .mf-col a, .mf-col button { color: #c9c2de; text-decoration: none; font: 400 14px/1.3 var(--font, inherit); background: none; border: 0; padding: 0;
    margin: 0; min-height: 0; width: auto; cursor: pointer; text-align: left; box-shadow: none; }
  .mf-col a:active, .mf-col button:active { color: #f1c75b; }
  .mf-data { margin: 26px 0 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; line-height: 1.6; color: #9d95b8; }
  .mf-bottom { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12.5px; line-height: 1.55; }
  .mf-bottom b { color: #fff; }
  .mf-rights { color: #9d95b8; }
}
@media (max-width: 380px) { .m-foot { margin-left: -10px; margin-right: -10px; } }
.legal-pop { border: 0; border-radius: 18px; padding: 0; width: min(620px, calc(100vw - 24px)); max-height: min(720px, calc(100dvh - 24px));
  box-shadow: 0 30px 80px -20px rgba(20,14,40,.6); color: #1b1530; }
.legal-pop[open] { display: flex; flex-direction: column; }
.legal-pop::backdrop { background: rgba(20,14,40,.55); }
.lp-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 12px; border-bottom: 1px solid #e6e1f0; }
.lp-head h3 { margin: 0; font: 700 20px var(--display, inherit); }
.lp-x { width: 36px; height: 36px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: #ece8f5; color: #3b3355; font-size: 22px; line-height: 1; cursor: pointer; }
.lp-body { padding: 16px 22px 22px; overflow-y: auto; font-size: 14.5px; line-height: 1.65; }
.lp-body p { margin: 0 0 12px; }
.lp-body ul, .lp-body ol { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 8px; }
/* Phone footer, compact: Explore, For members and Help & legal side by side, smaller text, less height */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .m-foot { padding: 20px 16px calc(14px + env(safe-area-inset-bottom)); }
  .mf-logo { margin-bottom: 8px; gap: 8px; }
  .mf-logo img { width: 28px; height: 28px; }
  .mf-logo b { font-size: 18px; }
  .mf-brand p { font-size: 12.5px; line-height: 1.5; margin-bottom: 8px; }
  .mf-facts { gap: 4px; font-size: 11.5px; line-height: 1.4; }
  .mf-facts li { padding-left: 17px; }
  .mf-cols { grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px; }
  .mf-col { gap: 7px; }
  .mf-col h4 { font-size: 10.5px; letter-spacing: .5px; margin-bottom: 1px; }
  .mf-col a, .mf-col button { font-size: 12px; line-height: 1.3; }
  .mf-data { margin-top: 14px; padding-top: 10px; font-size: 10.5px; line-height: 1.5; }
  .mf-bottom { gap: 4px; margin-top: 10px; padding-top: 10px; font-size: 11px; line-height: 1.45; }
}
/* Footer on phones, compact: Explore | For members | Help & legal side by side, smaller text, less height */
@media (max-width: 820px), (min-width: 821px) and (max-width: 1180px) and (orientation: portrait) {
  .m-foot { padding: 22px 16px calc(16px + env(safe-area-inset-bottom)); }
  .mf-logo { margin-bottom: 8px; gap: 8px; }
  .mf-logo img { width: 30px; height: 30px; }
  .mf-logo b { font-size: 19px; }
  .mf-brand p { font-size: 12.5px; line-height: 1.5; margin-bottom: 8px; }
  .mf-facts { gap: 4px; font-size: 11.5px; }
  .mf-facts li { padding-left: 18px; }
  .mf-cols { grid-template-columns: 1fr 1.05fr 1fr; gap: 10px; margin-top: 18px; }
  .mf-col { gap: 8px; }
  .mf-col h4 { font-size: 10.5px; letter-spacing: .5px; margin-bottom: 1px; white-space: nowrap; }
  .mf-col a, .mf-col button { font-size: 12px; line-height: 1.3; }
  .mf-data { margin-top: 16px; padding-top: 12px; font-size: 10.5px; line-height: 1.5; }
  .mf-bottom { gap: 4px; margin-top: 10px; padding-top: 10px; font-size: 11px; line-height: 1.5; }
}

/* ===== Continue with Google ===== */
.g-wrap[hidden] { display: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; color: var(--muted, #6b6585); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line, #e4e0ef); }
.g-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 16px;
  border: 1px solid #dadce0; border-radius: 12px; background: #fff; color: #3c4043; font: 600 15px/1.2 inherit; cursor: pointer;
  transition: background .15s, box-shadow .15s; }
.g-btn:hover { background: #f8f9fb; box-shadow: 0 1px 3px rgba(60,64,67,.2); }
.g-btn:focus-visible { outline: 3px solid rgba(105,65,198,.35); outline-offset: 2px; }
.g-btn:disabled { opacity: .7; cursor: default; }
.error.note { color: #5b3fb0; background: #f1ecfd; border-color: #ddd2fb; }
.g-note { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: #f1ecfd; color: #4b2fa0; font-size: 14px; line-height: 1.45; }