* { margin:0; padding:0; box-sizing:border-box; }
html,body { height:100%; }
body {
  background:#0a0a0a; color:#fafafa; min-height:100vh;
  font-family:-apple-system,"Helvetica Neue",Helvetica,Arial,sans-serif;
  display:flex; flex-direction:column;
}
.hidden { display:none !important; }

.app-shell { display:flex; flex-direction:column; flex:1; min-height:100vh; }

/* ============ GATE: sign up / log in ============ */
.gate {
  flex:1; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  padding:40px 20px; text-align:center;
}
.gate-logo { display:flex; align-items:center; gap:10px; margin-bottom:28px; color:inherit; text-decoration:none; }
.gate-logo-icon { width:32px; height:32px; border-radius:8px; }
.gate-logo-text { font-size:18px; font-weight:900; letter-spacing:1px; text-transform:uppercase; }
.gate-title {
  font-size:clamp(36px, 8vw, 64px); font-weight:900; letter-spacing:-2px; line-height:1; text-transform:uppercase;
}
.gate-title .dim { color:#2c2c2c; display:block; }
.gate-sub { margin-top:18px; color:#8a8a8a; font-size:15px; }
.auth-form { margin-top:34px; width:100%; max-width:360px; display:flex; flex-direction:column; gap:12px; }
.auth-form input, .auth-form select {
  width:100%; background:#141414; border:1px solid #262626; border-radius:10px;
  color:#e5e5e5; padding:13px 16px; font-size:14px; font-family:inherit; outline:none;
  transition:border-color .15s;
}
.auth-form select {
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  padding-right:42px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 16px center;
}
.auth-form input:focus, .auth-form select:focus { border-color:#22c55e; }
.auth-form input::placeholder { color:#555; }
.terms-box {
  max-height:120px; overflow-y:auto; background:#141414; border:1px solid #262626; border-radius:10px;
  padding:12px 14px; text-align:left;
}
.terms-box p { font-size:12px; line-height:1.6; color:#8a8a8a; }
.terms-box strong { color:#c4c4c4; }
.terms-checkbox { display:flex; align-items:flex-start; gap:8px; text-align:left; cursor:pointer; }
.terms-checkbox input { width:16px; height:16px; margin-top:2px; accent-color:#22c55e; flex-shrink:0; }
.terms-checkbox span { font-size:12px; line-height:1.4; color:#8a8a8a; }
.gate-consent { font-size:11.5px; color:#555; line-height:1.4; text-align:left; margin-top:2px; }
.auth-submit { width:100%; margin-top:6px; padding:14px; font-size:13px; }
.auth-error { color:#ef4444; font-size:13px; text-align:left; }
.auth-toggle { margin-top:24px; font-size:13px; color:#666; }
.auth-toggle b { color:#8fe3ac; }
.auth-toggle span { cursor:pointer; }

/* top strip — the ONLY chrome */
.strip {
  display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center;
  gap:10px 18px;
  padding:22px 30px; font-size:12px; letter-spacing:2px; color:#555;
  text-transform:uppercase; z-index:3;
}
.strip b { color:#fafafa; }
.strip-title { white-space:nowrap; }
.strip-brand { color:inherit; text-decoration:none; }
.strip-brand:hover { color:#fafafa; }
.brand-slash { color:#4ADE68; }
.strip-links { display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin-left:auto; justify-content:flex-end; }
.script-link, .steps-link {
  cursor:pointer; border-bottom:1px solid #333; padding-bottom:2px; color:#888;
  background:none; font:inherit; letter-spacing:2px; text-transform:uppercase;
  white-space:nowrap; display:inline-block;
}
.script-link:hover, .steps-link:hover { color:#fafafa; border-color:#fafafa; }
.steps-link { border-color:#1f3d2a; color:#5fae7d; }
.steps-link:hover { color:#8fe3ac; border-color:#8fe3ac; }

/* ============ STAGE ============ */
.stage { flex:1; display:flex; align-items:safe center; justify-content:center; position:relative; padding:24px 20px; overflow-y:auto; }

/* --- state 1: idle --- */
.idle { text-align:center; }

/* streak block — coins for nights, tonight's call count */
.streak-block {
  max-width:420px; margin:0 auto 28px; background:#101010; border:1px solid #1c1c1c;
  border-radius:14px; padding:16px 22px; text-align:left;
}
.streak-block-top {
  display:flex; justify-content:space-between; align-items:center; margin-bottom:14px;
  font-size:10px; letter-spacing:2px; text-transform:uppercase;
}
.streak-label { color:#22c55e; font-weight:700; }
.streak-tonight { color:#8d8d8d; }
.streak-coins { display:flex; gap:9px; }
.streak-coin { width:24px; height:24px; border-radius:50%; position:relative; flex:0 0 auto; }
.streak-coin.filled { background:#22c55e; }
.streak-coin.filled::after {
  content:""; position:absolute; left:50%; top:50%; width:3px; height:13px; background:#04120a;
  border-radius:2px; transform:translate(-50%,-50%) rotate(-28deg);
}
.streak-coin.empty { border:2px solid #2c2c2c; }

.idle h1 {
  font-size:clamp(38px, 8vw, 100px); font-weight:900; letter-spacing:-3px; line-height:.9;
  text-transform:uppercase;
}
.idle h1 .dim { color:#2c2c2c; display:block; }
.dialbtn {
  margin-top:40px; width:150px; height:150px; border-radius:50%; border:none; cursor:pointer;
  background:#22c55e; color:#04120a; font-size:52px;
  box-shadow:0 0 0 0 rgba(34,197,94,.55);
  animation:throb 1.7s infinite;
  transition:transform .1s;
}
.dialbtn:active { transform:scale(.93); }
@keyframes throb {
  0% { box-shadow:0 0 0 0 rgba(34,197,94,.55); }
  70% { box-shadow:0 0 0 44px rgba(34,197,94,0); }
  100% { box-shadow:0 0 0 0 rgba(34,197,94,0); }
}
.idle .hint { margin-top:22px; font-size:12px; letter-spacing:3px; color:#555; text-transform:uppercase; }

/* persona picker — one row of faces, label always visible below (not hover-only — hover tooltips never show on touch) */
.picker { margin-top:32px; display:flex; justify-content:center; row-gap:18px; column-gap:14px; flex-wrap:wrap; }
.chip-wrap { display:flex; flex-direction:column; align-items:center; gap:8px; width:64px; cursor:pointer; }
.chip {
  width:58px; height:58px; border-radius:50%; border:1px solid #262626; background:#141414;
  font-size:26px; display:flex; align-items:center; justify-content:center;
  filter:grayscale(1); opacity:.55; transition:all .15s;
}
.chip-wrap:hover .chip { filter:none; opacity:1; transform:translateY(-4px); }
.chip-wrap.on .chip { filter:none; opacity:1; border-color:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.25); transform:translateY(-4px); }
.chip.rand { font-size:22px; color:#22c55e; filter:none; }
.chip-label {
  font-size:9px; letter-spacing:1.5px; color:#666; text-transform:uppercase; text-align:center;
  line-height:1.3; transition:color .15s;
}
.chip-wrap:hover .chip-label { color:#aaa; }
.chip-wrap.on .chip-label { color:#22c55e; font-weight:700; }

/* description of the selected persona */
.pdesc {
  margin:22px auto 0; max-width:520px; min-height:48px; padding:0 20px;
  font-size:15px; line-height:1.6; color:#8a8a8a; text-align:center;
  animation:fadeUp .25s ease-out;
}
.pdesc b { color:#fafafa; font-weight:600; }
@keyframes fadeUp { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* --- state 2: ringing --- */
.ringing { text-align:center; }
.ringing .rt {
  font-size:clamp(44px, 9vw, 110px); font-weight:900; letter-spacing:-3px; text-transform:uppercase;
  animation:shake .55s infinite;
}
@keyframes shake {
  0%,100% { transform:rotate(0deg); } 20% { transform:rotate(-1.2deg); }
  40% { transform:rotate(1.2deg); } 60% { transform:rotate(-.8deg); } 80% { transform:rotate(.8deg); }
}
.ringing .who { margin-top:26px; font-size:15px; letter-spacing:4px; color:#666; text-transform:uppercase; }
.ringing .who span { color:#fafafa; }

/* --- state 3: connected --- */
.connected { text-align:center; max-width:900px; padding:0 30px; width:100%; }
.connected .face { font-size:96px; animation:pop .35s cubic-bezier(.2,1.6,.4,1); display:block; }
@keyframes pop { from { transform:scale(.3); opacity:0; } to { transform:scale(1); opacity:1; } }
.connected .name {
  font-size:clamp(30px, 5.5vw, 62px); font-weight:900; letter-spacing:-2px; text-transform:uppercase; margin-top:8px;
}
.connected .prev-line {
  margin-top:18px; font-size:13px; color:#4a4a4a; font-style:italic; line-height:1.4;
  min-height:1.2em; opacity:0; transition:opacity .3s ease;
}
.connected .prev-line.show { opacity:1; }
.connected .line {
  margin-top:22px; font-size:clamp(18px, 2.4vw, 26px); color:#a3a3a3; font-style:italic; line-height:1.4;
  min-height:1.4em; transition:opacity .15s;
}
.connected .line.thinking { color:#555; }

/* coach strip — mode + assists, always visible during a call */
.coach-strip {
  max-width:420px; margin:0 auto 18px; display:flex; justify-content:space-between; align-items:center;
  background:#101010; border:1px solid #1c1c1c; border-radius:14px; padding:9px 16px;
  font-size:9.5px; letter-spacing:1.5px; text-transform:uppercase; color:#8d8d8d;
}
.coach-strip-assists { font-weight:700; }

/* the help button — one pull-based cue, then a cooldown */
.help-btn {
  margin:22px auto 0; width:64px; height:64px; border-radius:50%; background:#101010; border:2px solid #22c55e;
  color:#22c55e; cursor:pointer; display:inline-flex; flex-direction:column; align-items:center; justify-content:center;
  gap:2px; transition:opacity .15s, border-color .15s;
}
.help-btn-icon { font-size:15px; }
.help-btn-label { font-size:8px; font-weight:700; letter-spacing:1px; }
.help-btn:hover { transform:translateY(-2px); }
.help-btn:disabled, .help-btn.cooldown {
  border-color:#333; color:#555; cursor:default; transform:none;
}

/* the cue itself — pull, not push: one move, then quiet */
.coach-cue {
  max-width:520px; margin:22px auto 0; text-align:left; background:#0d1a10; border:2px solid #22c55e;
  border-radius:14px; padding:16px 20px; animation:pop .25s cubic-bezier(.2,1.6,.4,1);
}
.coach-cue-label { font-size:9.5px; font-weight:700; letter-spacing:2px; color:#22c55e; text-transform:uppercase; margin-bottom:8px; }
.coach-cue-headline { font-size:14px; font-weight:700; color:#fafafa; margin-bottom:4px; }
.coach-cue-line { font-size:13.5px; color:#e5e5e5; line-height:1.5; }
.coach-cue-countdown { max-width:520px; margin:10px auto 0; font-size:11px; color:#555; }

.respond-row {
  margin:30px auto 0; max-width:520px; display:flex; align-items:center; gap:10px;
}
.mic-btn {
  flex-shrink:0; width:52px; height:52px; border-radius:50%; border:1px solid #333; background:#141414;
  color:#fafafa; font-size:20px; cursor:pointer; transition:all .15s;
}
.mic-btn:hover { border-color:#666; }
.mic-btn.listening {
  background:#ef4444; border-color:#ef4444;
  animation:mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}
.text-form { flex:1; }
#text-input {
  width:100%; background:#141414; border:1px solid #262626; border-radius:99px;
  color:#e5e5e5; padding:13px 20px; font-size:14px; font-family:inherit; outline:none;
  transition:border-color .15s;
}
#text-input:focus { border-color:#22c55e; }
#text-input::placeholder { color:#555; }

.connected .timer { margin-top:30px; font-size:15px; color:#22c55e; letter-spacing:3px; font-variant-numeric:tabular-nums; }
.hangup, .dialbtn-outline {
  margin-top:24px; background:none; border:1px solid #3a3a3a; color:#888; padding:13px 34px;
  border-radius:99px; font-size:13px; letter-spacing:3px; cursor:pointer; text-transform:uppercase;
  font-family:inherit;
}
.hangup:hover { border-color:#ef4444; color:#ef4444; }
.dialbtn-outline:hover { border-color:#22c55e; color:#22c55e; }
.dialbtn-solid {
  margin-top:24px; background:#22c55e; border:none; color:#04120a; padding:16px 42px;
  border-radius:99px; font-size:14px; font-weight:800; letter-spacing:3px; cursor:pointer;
  text-transform:uppercase; font-family:inherit; transition:transform .1s;
}
.dialbtn-solid:hover { transform:translateY(-2px); }
.dialbtn-solid:active { transform:scale(.97); }

/* flash on connect */
.flash { position:fixed; inset:0; background:#22c55e; opacity:0; pointer-events:none; z-index:2; }
.flash.go { animation:fl .45s ease-out; }
@keyframes fl { 0% { opacity:.85; } 100% { opacity:0; } }

/* --- state 4: scorecard --- */
.scorecard { text-align:center; max-width:640px; width:100%; padding:0 30px; max-height:100%; overflow-y:auto; }
.sc-score {
  display:flex; justify-content:center; animation:pop .35s cubic-bezier(.2,1.6,.4,1);
}
.score-ring { width:clamp(140px, 22vw, 180px); height:auto; }
.sc-loading { font-size:15px; color:#666; letter-spacing:normal; font-weight:400; font-style:normal; }
.sc-body { margin-top:20px; text-align:left; display:flex; flex-direction:column; gap:18px; }
.clean-call-badge {
  text-align:center; color:#22c55e; font-size:12px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase;
}
.sc-section h3 {
  font-size:11px; letter-spacing:3px; color:#5fae7d; text-transform:uppercase; margin-bottom:4px;
}
.sc-section p { font-size:15px; line-height:1.5; color:#c4c4c4; }
.sc-fixes-box { background:#0d1a10; border:1.5px solid #22c55e; border-radius:12px; padding:16px 18px; }
.sc-fixes-box h3 {
  font-size:11px; letter-spacing:3px; color:#22c55e; text-transform:uppercase; margin-bottom:8px;
}
.sc-fixes { padding-left:18px; }
.sc-fixes li { font-size:15px; line-height:1.6; color:#e5e5e5; margin-bottom:4px; }

.sc-transcript { margin-top:2px; border-top:1px solid #222; padding-top:16px; }
.sc-transcript summary {
  cursor:pointer; font-size:11px; letter-spacing:3px; color:#5fae7d; text-transform:uppercase; list-style:none;
}
.sc-transcript summary::-webkit-details-marker { display:none; }
.sc-transcript summary::before { content:'▸ '; }
.sc-transcript[open] summary::before { content:'▾ '; }
.t-body { margin-top:14px; display:flex; flex-direction:column; gap:12px; max-height:340px; overflow-y:auto; padding-right:8px; }
.t-line { font-size:14px; line-height:1.5; }
.t-who { display:block; font-size:10px; letter-spacing:2px; text-transform:uppercase; color:#666; margin-bottom:2px; }
.t-text { color:#a8a8a8; }
.t-user .t-who { color:#22c55e; }
.t-user .t-text { color:#e6e6e6; }

/* bottom gamification strip */
.bottom { padding:18px 30px; font-size:11px; letter-spacing:2px; color:#3a3a3a; text-transform:uppercase; display:flex; justify-content:space-between; z-index:3; }

/* script / steps drawers */
.drawer {
  position:fixed; left:0; right:0; bottom:0; background:#141414; border-top:1px solid #2a2a2a;
  transform:translateY(100%); transition:transform .3s cubic-bezier(.3,1,.3,1); z-index:10; padding:26px 30px 30px;
  max-height:80vh; overflow-y:auto;
}
.drawer.open { transform:translateY(0); }
.drawer .dh { display:flex; justify-content:space-between; font-size:12px; letter-spacing:3px; color:#666; text-transform:uppercase; margin-bottom:14px; }
.drawer .dh span:last-child { cursor:pointer; color:#888; }
.drawer .dh span:last-child:hover { color:#fafafa; }
.drawer textarea {
  width:100%; min-height:160px; background:#0a0a0a; border:1px solid #262626; border-radius:10px;
  color:#e5e5e5; padding:16px; font-family:ui-monospace,Menlo,monospace; font-size:14px; line-height:1.7;
  outline:none; resize:vertical;
}
.drawer textarea::placeholder { color:#444; }
.drawer-label {
  display:block; margin:20px 0 8px; font-size:11px; letter-spacing:2px; color:#666; text-transform:uppercase;
}
.drawer select {
  width:100%; background:#0a0a0a; border:1px solid #262626; border-radius:10px;
  color:#e5e5e5; padding:12px 16px; font-size:14px; font-family:inherit; outline:none;
}
.warning { color:#ef4444; font-size:13px; margin-top:14px; }

/* checklist inside steps drawer */
.checklist-progress { height:5px; border-radius:2px; background:#262626; overflow:hidden; margin-bottom:6px; }
.checklist-progress-bar { height:100%; width:0%; background:#22c55e; transition:width .3s ease; }
.checklist-progress-bar.complete { background:#22c55e; box-shadow:0 0 8px rgba(34,197,94,.6); }
#checklist-count { color:#666; margin:0 0 14px; }
.checklist-list { list-style:none; display:flex; flex-direction:column; gap:10px; }
.checklist-item { display:flex; align-items:flex-start; gap:10px; font-size:14px; color:#888; cursor:pointer; line-height:1.35; }
.checklist-check {
  flex-shrink:0; width:16px; height:16px; border-radius:4px; border:1px solid #333;
  display:flex; align-items:center; justify-content:center; font-size:10px; color:transparent;
  margin-top:2px; transition:all .15s ease;
}
.checklist-item.done { color:#e5e5e5; }
.checklist-item.done .checklist-check { background:#22c55e; border-color:#22c55e; color:#04120a; }
.checklist-item.just-checked .checklist-check { animation:check-pop .5s ease; }
@keyframes check-pop { 0% { transform:scale(1); } 40% { transform:scale(1.35); } 100% { transform:scale(1); } }

.leaderboard-list { list-style:none; display:flex; flex-direction:column; gap:2px; counter-reset:rank; }
.leaderboard-row {
  display:flex; align-items:center; gap:14px; padding:10px 4px; border-bottom:1px solid #1a1a1a;
  counter-increment:rank; font-size:14px;
}
.leaderboard-row::before {
  content:counter(rank); width:22px; flex-shrink:0; color:#666; font-weight:700; font-size:13px; text-align:center;
}
.leaderboard-row:nth-child(1)::before { color:#22c55e; }
.leaderboard-name { flex:1; color:#e5e5e5; }
.leaderboard-streak { color:#22c55e; font-weight:700; white-space:nowrap; }
.leaderboard-score { color:#666; font-size:12px; white-space:nowrap; }

@media (max-width:560px) {
  .respond-row { flex-direction:column; }
  .mic-btn { width:100%; border-radius:26px; }
}

@media (max-width:480px) {
  .strip { padding:16px 18px; font-size:10px; letter-spacing:1.5px; }
  .strip-links { gap:10px; }
  .script-link, .steps-link { font-size:8.5px; letter-spacing:1px; padding-bottom:1px; }
  .stage { padding:32px 16px 16px; align-items:flex-start; }

  .streak-block { padding:12px 16px; margin-bottom:20px; }
  .streak-coin { width:20px; height:20px; }
  .idle h1 { font-size:clamp(30px, 11vw, 44px); letter-spacing:-2px; }
  .dialbtn { width:104px; height:104px; font-size:36px; margin-top:28px; }
  .idle .hint { margin-top:16px; font-size:10.5px; letter-spacing:2px; }
  .picker { margin-top:22px; row-gap:16px; column-gap:6px; }
  .chip-wrap { width:52px; }
  .chip { width:44px; height:44px; font-size:19px; }
  .chip-label { font-size:8px; }
  .pdesc { margin-top:30px; font-size:13px; }

  .ringing .rt { font-size:clamp(34px, 11vw, 60px); }
  .ringing .who { margin-top:16px; font-size:12px; }

  .coach-strip { padding:8px 14px; font-size:8.5px; margin-bottom:14px; }
  .connected .face { font-size:64px; }
  .connected .name { font-size:clamp(22px, 6.5vw, 32px); margin-top:4px; }
  .connected .prev-line { margin-top:12px; font-size:11.5px; }
  .connected .line { margin-top:10px; font-size:15px; }
  .coach-cue { margin-top:16px; padding:13px 16px; }
  .coach-cue-headline { font-size:13px; }
  .coach-cue-line { font-size:12.5px; }
  .respond-row { margin-top:20px; }
  .help-btn { width:54px; height:54px; margin-top:16px; }
  .connected .timer { margin-top:18px; font-size:12.5px; }
  .hangup, .dialbtn-outline, .dialbtn-solid { margin-top:16px; padding:11px 26px; }

  .bottom { padding:12px 16px; font-size:9px; letter-spacing:1px; }

  .gate { padding:28px 16px; }
  .gate-title { font-size:clamp(28px, 10vw, 44px); }
  .auth-form { margin-top:24px; }
}
