:root {
  --bg: #f7fafc;
  --mint: #28d7b5;
  --mint-soft: #dffaf4;
  --blue: #4f8ff7;
  --blue-soft: #edf4ff;
  --violet: #8d76ff;
  --violet-soft: #f1eeff;
  --ink: #17212b;
  --soft: #687586;
  --line: rgba(112, 130, 150, 0.18);
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 50px rgba(43, 58, 78, 0.12);
  --font: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg);
}

/* Opt-in contract for any overlay WebView: no HTML, body, or app backdrop may
   paint behind the native transparent character layer. The normal controller
   keeps its existing visual background because this class is query-gated. */
html.transparent-overlay-surface,
html.transparent-overlay-surface body,
html.transparent-overlay-surface .app {
  background: transparent !important;
}

html.transparent-overlay-surface .titlebar,
html.transparent-overlay-surface .screen {
  background: transparent !important;
  box-shadow: none !important;
}

button,
input,
textarea {
  font: inherit;
}

.app {
  width: 100%;
  height: 100%;
  position: relative;
  background:
    linear-gradient(90deg, rgba(247,250,252,0.98) 0%, rgba(247,250,252,0.90) 45%, rgba(247,250,252,0.58) 74%, rgba(247,250,252,0.35) 100%),
    url("assets/morning-workspace.png") right center / cover no-repeat;
}

.titlebar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 22px;
  border-bottom: 1px solid rgba(120, 132, 146, 0.12);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
  user-select: none;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
}

.brand span {
  color: #23cdb1;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand b {
  font-size: 15px;
  color: var(--ink);
}

.window-actions {
  display: flex;
  gap: 4px;
}

.window-actions button {
  width: 38px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  color: #283545;
  background: transparent;
  cursor: pointer;
}

.window-actions button:hover {
  background: rgba(34, 49, 66, 0.07);
}

.window-actions .audio-tools-action {
  width: auto;
  min-width: 76px;
  padding: 0 12px;
  color: #197d71;
  font-weight: 800;
}

body.smart-rack-mode .app {
  background:
    radial-gradient(circle at 84% 14%, rgba(79, 143, 247, 0.13), transparent 34%),
    radial-gradient(circle at 16% 86%, rgba(40, 215, 181, 0.12), transparent 32%),
    #f7fafc;
}

body.wechat-collector-mode .app {
  background:
    radial-gradient(circle at 82% 12%, rgba(82, 133, 229, 0.12), transparent 34%),
    radial-gradient(circle at 18% 88%, rgba(39, 198, 165, 0.13), transparent 34%),
    #f7fafc;
}

body.smart-rack-mode .stage,
body.wechat-collector-mode .stage,
body.post-live-mode .stage {
  left: 24px;
  right: 24px;
  top: 68px;
  bottom: 18px;
  width: auto;
  max-width: none;
  display: block;
}

body.smart-rack-mode .prep,
body.smart-rack-mode .trust,
body.wechat-collector-mode .prep,
body.wechat-collector-mode .trust,
body.post-live-mode .prep,
body.post-live-mode .trust {
  display: none;
}

.wechat-collector-page {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid rgba(151, 168, 185, 0.2);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 50px rgba(43, 58, 78, 0.1);
  backdrop-filter: blur(18px);
}

.collector-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.collector-heading .eyebrow {
  min-height: 20px;
  font-size: 11px;
}

.collector-heading .eyebrow::after {
  display: none;
}

.collector-heading h1 {
  margin: 4px 0 5px;
  font-size: 28px;
  line-height: 1.1;
}

.collector-heading p {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
}

.collector-local-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(34, 188, 158, 0.26);
  border-radius: 999px;
  color: #168c76;
  background: rgba(232, 252, 247, 0.9);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.collector-local-badge span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #20caa9;
  box-shadow: 0 0 0 5px rgba(32, 202, 169, 0.12);
}

.collector-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.collector-status-card {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid rgba(151, 168, 185, 0.2);
  border-radius: 17px;
  background: rgba(249, 251, 253, 0.9);
}

.collector-status-card small,
.collector-metrics small,
.collector-route small {
  display: block;
  color: #8996a6;
  font-size: 9.5px;
  font-weight: 800;
}

.collector-status-card b {
  display: block;
  margin-top: 5px;
  font-size: 14px;
}

.collector-status-card p {
  margin: 6px 0 0;
  color: #748194;
  font-size: 10px;
}

.collector-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.collector-metrics > div {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f5f9ff, #f1fcf9);
}

.collector-metrics b {
  display: block;
  margin-top: 4px;
  color: #1b354b;
  font-size: 20px;
}

.collector-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(237, 244, 255, 0.9), rgba(226, 251, 246, 0.82));
}

.collector-route b {
  display: block;
  margin: 4px 0;
  font-size: 12px;
}

.collector-route p {
  margin: 0;
  color: #69788a;
  font-size: 10px;
}

.collector-route strong {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 10px;
  color: #147d6a;
  background: rgba(255, 255, 255, 0.68);
  font-size: 10px;
}

.smart-rack-page {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid rgba(151, 168, 185, 0.2);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(43, 58, 78, 0.1);
  backdrop-filter: blur(18px);
}

.rack-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.rack-heading .eyebrow {
  min-height: 20px;
  font-size: 11px;
}

.rack-heading .eyebrow::after {
  display: none;
}

.rack-heading h1 {
  margin: 4px 0 5px;
  font-size: 28px;
  line-height: 1.1;
}

.rack-heading p {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
}

.rack-connection {
  min-width: 156px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border: 1px solid rgba(151, 168, 185, 0.2);
  border-radius: 14px;
  background: #f7f9fb;
}

.rack-connection > span {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a5b0bd;
  box-shadow: 0 0 0 5px rgba(165, 176, 189, 0.12);
}

.rack-connection.online > span {
  background: #20caa9;
  box-shadow: 0 0 0 5px rgba(32, 202, 169, 0.13);
}

.rack-connection.partial > span,
.rack-connection.checking > span {
  background: #f3ad43;
  box-shadow: 0 0 0 5px rgba(243, 173, 67, 0.14);
}

.rack-connection small {
  display: block;
  margin-bottom: 2px;
  color: #8996a6;
  font-size: 9.5px;
}

.rack-connection b {
  display: block;
  font-size: 12px;
}

.rack-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.rack-tool-card {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid rgba(151, 168, 185, 0.2);
  border-radius: 17px;
  background: rgba(249, 251, 253, 0.88);
}

.rack-tool-card.online {
  border-color: rgba(40, 215, 181, 0.3);
  background: linear-gradient(145deg, rgba(236, 255, 250, 0.9), rgba(255, 255, 255, 0.92));
}

.rack-tool-card.missing {
  border-color: rgba(226, 112, 112, 0.3);
  background: rgba(255, 248, 248, 0.94);
}

.rack-tool-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rack-label {
  display: block;
  color: #8996a6;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.rack-tool-card h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.rack-tool-state {
  max-width: 130px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #748194;
  font-size: 10px;
  font-weight: 900;
}

.rack-tool-state i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a5b0bd;
}

.rack-tool-card.online .rack-tool-state {
  color: #15977f;
}

.rack-tool-card.online .rack-tool-state i {
  background: #20caa9;
}

.rack-tool-card.missing .rack-tool-state {
  color: #c05b5b;
}

.rack-tool-card.missing .rack-tool-state i {
  background: #df7474;
}

.rack-tool-detail {
  margin: 14px 0 0;
  overflow: hidden;
  color: #283545;
  font-size: 11.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rack-capability {
  margin: 6px 0 0;
  color: #788598;
  font-size: 10px;
}

.rack-route-card {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(237, 244, 255, 0.9), rgba(226, 251, 246, 0.82));
}

.rack-route-copy {
  min-width: 0;
}

.rack-route-copy b {
  display: block;
  margin: 4px 0;
  font-size: 12px;
}

.rack-route-copy p {
  margin: 0;
  overflow: hidden;
  color: #69788a;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rack-check-time {
  min-width: 86px;
  padding-left: 16px;
  border-left: 1px solid rgba(108, 133, 156, 0.18);
  color: #8a96a6;
  font-size: 9px;
  line-height: 1.5;
  text-align: right;
}

.rack-check-time b {
  color: #374659;
  font-size: 11px;
}

.rack-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
}

.rack-actions .primary,
.rack-actions .secondary {
  height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 11px;
}

.rack-actions span {
  margin-left: 3px;
  color: #8793a2;
  font-size: 9.5px;
}

.screen {
  height: calc(100% - 48px);
  position: relative;
  padding: 0;
}

.rail {
  position: absolute;
  left: 22px;
  top: 46px;
  bottom: auto;
  width: 136px;
  height: min(498px, calc(100% - 94px));
  padding: 18px 14px;
  border: 1px solid rgba(151, 168, 185, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 12px 28px rgba(70, 91, 110, 0.07);
  backdrop-filter: blur(18px);
}

.step {
  width: 100%;
  border: 0;
  appearance: none;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: 32px 1fr;
  min-height: 62px;
  position: relative;
  background: transparent;
  padding: 0;
}

.step:disabled {
  cursor: default;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 36px;
  bottom: -2px;
  width: 1px;
  background: linear-gradient(var(--mint), rgba(124, 152, 176, 0.25));
}

.step-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(152, 170, 189, 0.35);
  color: #7b8798;
  background: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 800;
  z-index: 2;
  box-shadow: 0 8px 18px rgba(55, 73, 94, 0.06);
}

.step.active .step-number {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, #2edfc0, #2db9ff);
  box-shadow: 0 10px 22px rgba(40, 215, 181, 0.26);
}

.step.done .step-number {
  color: var(--mint);
  border-color: rgba(40, 215, 181, 0.28);
  background: #f0fffb;
}

.step-copy {
  padding-top: 2px;
}

.step-title {
  margin: 0;
  color: #677385;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.2;
}

.step.active .step-title {
  color: #20bfa5;
}

.step-caption {
  display: none;
}

.stage {
  position: absolute;
  left: 180px;
  top: 78px;
  width: 600px;
  display: flex;
  align-items: flex-start;
  min-width: 0;
  padding-top: 0;
}

.hero,
.welcome-page,
.form-page,
.coach-page {
  width: 100%;
  max-width: 560px;
}

.welcome-page {
  width: 100%;
  max-width: 880px;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 54px;
  align-items: center;
}

.welcome-copy h1 {
  margin: 26px 0 18px;
  font-size: clamp(46px, 4.25vw, 64px);
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 950;
}

.welcome-copy h1 span {
  display: block;
  color: var(--blue);
}

.welcome-copy p {
  width: min(500px, 100%);
  margin: 0 0 26px;
  color: #718096;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 500;
}

.welcome-visual {
  min-height: 420px;
  display: grid;
  place-items: center;
  position: relative;
}

.motion-orbit {
  width: 248px;
  height: 248px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(40, 215, 181, 0.2), transparent 36%),
    radial-gradient(circle at 38% 28%, rgba(79, 143, 247, 0.18), transparent 30%);
}

.motion-orbit::before,
.motion-orbit::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(79, 143, 247, 0.22);
  animation: orbitPulse 3.8s ease-in-out infinite;
}

.motion-orbit::after {
  inset: 42px;
  border-color: rgba(40, 215, 181, 0.25);
  animation-delay: -1.4s;
}

.motion-orbit span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #29d8bb, #4f8ff7);
  box-shadow: 0 0 28px rgba(40, 215, 181, 0.42);
  animation: orbitSpin 7s linear infinite;
  transform-origin: 0 118px;
}

.motion-orbit span:nth-child(2) {
  animation-duration: 9s;
  animation-direction: reverse;
  background: linear-gradient(135deg, #8d76ff, #4f8ff7);
  transform-origin: 0 92px;
}

.motion-orbit span:nth-child(3) {
  animation-duration: 11s;
  transform-origin: 0 64px;
}

.motion-core {
  width: 106px;
  height: 106px;
  display: grid;
  place-items: center;
  border-radius: 34px;
  color: white;
  background: linear-gradient(135deg, #2edfc0, #4f8ff7);
  box-shadow: 0 22px 60px rgba(79, 143, 247, 0.26);
  font-size: 32px;
  font-weight: 950;
  animation: coreFloat 4s ease-in-out infinite;
}

.setup-flow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.setup-flow div {
  min-height: 72px;
  padding: 13px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(43, 58, 78, 0.08);
  backdrop-filter: blur(16px);
}

.setup-flow b,
.setup-flow span {
  display: block;
}

.setup-flow b {
  color: #23cdb1;
  font-size: 13px;
  margin-bottom: 7px;
}

.setup-flow span {
  color: #314055;
  font-size: 13px;
  font-weight: 900;
}

@keyframes orbitPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.62; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes orbitSpin {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

@keyframes coreFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(151, 126, 255, 0.18);
  border-radius: 10px;
  color: #7e65f2;
  background: rgba(249, 247, 255, 0.82);
  font-size: 15px;
  font-weight: 700;
}

.hero h1 {
  margin: 26px 0 18px;
  font-size: clamp(42px, 4.25vw, 60px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.hero h1 span {
  display: block;
  color: var(--blue);
}

.hero p {
  width: min(500px, 100%);
  margin: 0 0 26px;
  color: #718096;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 500;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(300px, 100%);
}

.primary,
.secondary,
.ghost {
  height: 48px;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary {
  color: white;
  background: linear-gradient(135deg, #29d8bb, #28c8ac);
  box-shadow: 0 16px 28px rgba(40, 215, 181, 0.24);
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(40, 215, 181, 0.3);
}

.secondary,
.ghost {
  color: #667589;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(150, 165, 180, 0.22);
}

.secondary:hover,
.ghost:hover {
  background: rgba(255, 255, 255, 0.86);
}

.time-note {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #8b99a9;
  font-size: 14px;
  font-weight: 700;
}

.prep {
  position: absolute;
  right: 22px;
  top: 88px;
  width: 214px;
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.prep h2 {
  margin: 0 0 12px;
  font-size: 14px;
}

.prep h2::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--blue);
}

.ready-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  margin-bottom: 7px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(247, 250, 252, 0.76);
}

.ready-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--mint);
  background: var(--mint-soft);
  font-family: "Segoe Fluent Icons", "Segoe MDL2 Assets", sans-serif;
  font-size: 15px;
}

.ready-item:nth-child(3) .ready-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.ready-item:nth-child(4) .ready-icon {
  color: var(--violet);
  background: var(--violet-soft);
}

.ready-title {
  margin: 0 0 2px;
  font-weight: 800;
  font-size: 12px;
}

.ready-sub {
  margin: 0;
  color: #8390a0;
  font-size: 10px;
}

.safe-pill {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  border-radius: 9px;
  color: #8995a5;
  background: rgba(244, 247, 250, 0.86);
  font-size: 10px;
  font-weight: 700;
}

.safe-pill span {
  font-family: "Segoe Fluent Icons", "Segoe MDL2 Assets", sans-serif;
}

.trust {
  position: absolute;
  left: 180px;
  right: 22px;
  bottom: 16px;
  height: 74px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  padding: 10px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(43, 58, 78, 0.08);
  backdrop-filter: blur(22px);
}

.trust-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  min-width: 0;
}

.trust-item:not(:last-child) {
  border-right: 1px solid var(--line);
}

.trust-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--mint);
  background: rgba(40, 215, 181, 0.1);
  font-family: "Segoe Fluent Icons", "Segoe MDL2 Assets", sans-serif;
  font-size: 16px;
}

.trust-item:nth-child(2) .trust-icon {
  color: var(--blue);
  background: rgba(91, 167, 255, 0.12);
}

.trust-item:nth-child(3) .trust-icon {
  color: var(--violet);
  background: rgba(155, 140, 255, 0.12);
}

.trust-title {
  margin: 0 0 3px;
  font-size: 12px;
  font-weight: 900;
}

.trust-sub {
  margin: 0;
  color: #8b98a8;
  font-size: 9.5px;
}

.form-card {
  width: min(600px, 100%);
  max-height: min(620px, calc(100vh - 168px));
  overflow-y: auto;
  padding: 24px 26px 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.form-card::-webkit-scrollbar {
  width: 8px;
}

.form-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(124, 144, 166, 0.34);
}

.form-card h1,
.coach-page h1 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.16;
  letter-spacing: 0;
}

.form-card > p,
.coach-page > p {
  margin: 0 0 17px;
  color: #738092;
  font-size: 13px;
  line-height: 1.62;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 12px;
}

.span-2 {
  grid-column: span 2;
}

.field {
  min-width: 0;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: #344154;
  font-size: 12px;
  font-weight: 900;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(130, 150, 170, 0.22);
  border-radius: 12px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  transition: border 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field input {
  height: 38px;
  padding: 0 14px;
}

.field textarea {
  min-height: 64px;
  resize: none;
  padding: 12px 14px;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(61, 72, 86, 0.5);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(40, 215, 181, 0.62);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(40, 215, 181, 0.12);
}

.option-field {
  padding: 12px;
  border: 1px solid rgba(130, 150, 170, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.option-head label {
  margin: 0;
}

.option-head span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  color: #6f7e92;
  background: rgba(91, 167, 255, 0.09);
  font-size: 10px;
  font-weight: 900;
}

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chip {
  min-height: 30px;
  border: 1px solid rgba(130, 150, 170, 0.2);
  border-radius: 999px;
  padding: 0 12px;
  color: #496075;
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, border 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.choice-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(40, 215, 181, 0.36);
  box-shadow: 0 8px 18px rgba(28, 70, 110, 0.08);
}

.choice-chip.selected {
  color: #073b40;
  border-color: rgba(40, 215, 181, 0.52);
  background: linear-gradient(135deg, rgba(40, 215, 181, 0.28), rgba(91, 167, 255, 0.16));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42), 0 10px 22px rgba(40, 215, 181, 0.14);
}

.custom-option {
  margin-top: 9px;
}

.page-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.page-actions .primary,
.page-actions .secondary,
.page-actions .ghost {
  min-width: 150px;
  padding: 0 22px;
}

.video-box {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 18px;
  border: 1px dashed rgba(91, 167, 255, 0.42);
  background: rgba(237, 244, 255, 0.58);
  text-align: center;
}

.video-count {
  color: #4d6b89;
  font-weight: 800;
}

.coach-page {
  width: min(760px, 100%);
  padding: 30px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.advice {
  min-height: 150px;
  display: flex;
  align-items: center;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(40, 215, 181, 0.1), rgba(91, 167, 255, 0.09));
  font-size: 28px;
  line-height: 1.45;
  font-weight: 900;
}

.deep {
  margin-top: 16px;
  min-height: 72px;
  color: #596879;
  line-height: 1.7;
}

.metrics {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  color: #6c7a8c;
  font-weight: 800;
}

body.welcome-mode .rail,
body.welcome-mode .prep,
body.welcome-mode .trust {
  display: none;
}

body.welcome-mode .stage {
  left: 50%;
  top: 50%;
  width: min(980px, calc(100% - 112px));
  max-width: none;
  transform: translate(-50%, -50%);
}

.field-tip {
  display: block;
  max-width: 30rem;
  margin-top: 6px;
  color: #8d9aac;
  font-size: 10.5px;
  line-height: 1.45;
  font-weight: 600;
}

.guide-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
  padding: 13px 15px;
  border-radius: 14px;
  color: #5d7188;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

body.coach-mode .stage {
  left: 276px;
  right: 58px;
  top: 78px;
  bottom: 150px;
  width: auto;
  max-width: none;
  display: block;
}

body.coach-mode .prep {
  display: none;
}

body.coach-mode .trust {
  left: 276px;
}

body.coach-mode .coach-page {
  width: 100%;
  max-width: none;
  height: 100%;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.coach-hero-card,
.coach-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.coach-hero-card {
  min-height: 455px;
  padding: 30px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  overflow: hidden;
  position: relative;
}

.coach-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.coach-kicker {
  margin: 0 0 7px;
  color: #22bfa6;
  font-size: 13px;
  font-weight: 900;
}

.coach-page h1 {
  margin: 0;
  color: #17212b;
  font-size: 35px;
  letter-spacing: 0;
  line-height: 1.18;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #16987f;
  background: rgba(40, 215, 181, 0.12);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.advice-label {
  margin-top: 28px;
  color: #7d8da0;
  font-size: 13px;
  font-weight: 900;
}

.advice-diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.advice-diagnosis-grid div {
  min-height: 82px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(40, 215, 181, 0.18);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 30px rgba(56, 90, 120, 0.08);
}

.advice-diagnosis-grid span {
  display: block;
  margin-bottom: 6px;
  color: #7d8da0;
  font-size: 12px;
  font-weight: 900;
}

.advice-diagnosis-grid b {
  display: block;
  color: #172235;
  font-size: 14px;
  line-height: 1.42;
}

body.coach-mode .advice {
  min-height: 210px;
  margin-top: 12px;
  padding: 30px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(40, 215, 181, 0.14), rgba(79, 143, 247, 0.1)),
    rgba(255, 255, 255, 0.54);
  color: #121d2c;
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.36;
  font-weight: 950;
  letter-spacing: 0;
}

.momentum-note {
  margin-top: 12px;
  color: #1d9279;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 950;
}

.coach-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.coach-actions .primary,
.coach-actions .secondary {
  min-width: 146px;
  padding: 0 20px;
}

.coach-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.coach-panel {
  min-height: 150px;
  padding: 20px;
}

.panel-title {
  margin-bottom: 14px;
  color: #273549;
  font-size: 16px;
  font-weight: 950;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric-grid div {
  min-height: 82px;
  display: grid;
  align-content: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(245, 250, 252, 0.76);
}

.metric-grid b {
  color: #17212b;
  font-size: 28px;
  line-height: 1;
}

.metric-grid span {
  margin-top: 9px;
  color: #8090a2;
  font-size: 12px;
  font-weight: 800;
}

.deep-panel {
  grid-column: span 2;
}

.deep-panel p,
.small-copy {
  margin: 0;
  color: #617085;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 700;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 10px;
  color: #5f6f83;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}

.check-row span {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(40, 215, 181, 0.12);
  flex: 0 0 auto;
}

.coach-panel .ghost {
  width: 100%;
  height: 40px;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .screen {
    padding: 0;
  }

  .rail {
    width: 190px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .stage {
    left: 260px;
    width: 430px;
  }

  .prep {
    right: 24px;
    width: 246px;
  }

  .trust {
    left: 230px;
    right: 24px;
  }

  .hero h1 {
    font-size: clamp(38px, 4.2vw, 52px);
  }

  .hero p {
    font-size: 16px;
  }
}

@media (max-width: 1180px) {
  body.coach-mode .coach-page {
    grid-template-columns: 1fr;
    overflow: auto;
    padding-right: 6px;
  }

  body.coach-mode .stage {
    bottom: 138px;
  }
}

@media (max-width: 880px) {
  .advice-diagnosis-grid {
    grid-template-columns: 1fr;
  }

  .prep {
    display: none;
  }

  .ready-item {
    grid-template-columns: 36px 1fr;
    gap: 8px;
    padding: 10px;
  }

  .ready-icon {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .trust {
    left: 210px;
    right: 16px;
  }

  .trust-title {
    font-size: 13px;
  }

  .trust-sub {
    font-size: 11px;
  }

  .hero h1 {
    font-size: clamp(34px, 4vw, 44px);
  }
}

/* Compact onboarding shell: top flow, smaller window, lighter page density. */
.titlebar {
  height: 50px;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 16px;
  padding: 0 18px 0 26px;
}

.brand {
  gap: 12px;
}

.brand span {
  font-size: 17px;
}

.brand b {
  padding-left: 12px;
  border-left: 1px solid rgba(132, 148, 166, 0.22);
  color: #667384;
  font-size: 12px;
  font-weight: 800;
}

.screen {
  height: calc(100% - 50px);
}

.rail {
  position: static;
  justify-self: end;
  align-self: center;
  width: auto;
  height: auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.step {
  width: auto;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
}

.step:not(:last-child)::after {
  display: none;
}

.step-number {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  color: transparent;
  background: #cbd5e1;
  box-shadow: none;
}

.step.active .step-number {
  color: transparent;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(40, 215, 181, 0.12);
}

.step.done .step-number {
  color: transparent;
  background: rgba(40, 215, 181, 0.56);
  border: 0;
}

.step-copy {
  padding-top: 0;
}

.step-title {
  color: #9aa7b6;
  font-size: 11px;
  line-height: 1;
}

.step.active .step-title {
  color: #16bfa5;
}

.stage {
  left: 164px;
  top: 76px;
  width: 470px;
}

.prep {
  right: 32px;
  top: 102px;
  width: 200px;
  padding: 15px;
  border-radius: 17px;
}

.prep h2 {
  font-size: 14px;
  margin-bottom: 12px;
}

.ready-item {
  grid-template-columns: 30px 1fr;
  min-height: 44px;
  padding: 8px;
}

.ready-icon {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.ready-title {
  font-size: 11.5px;
}

.ready-sub {
  font-size: 9.5px;
}

.trust {
  left: 164px;
  right: 32px;
  bottom: 14px;
  height: 58px;
  display: none;
  padding: 8px 12px;
  border-radius: 14px;
}

.trust-item {
  grid-template-columns: 30px 1fr;
}

.trust-icon {
  width: 26px;
  height: 26px;
  font-size: 14px;
}

.trust-title {
  margin-bottom: 2px;
  font-size: 11px;
}

.trust-sub {
  font-size: 8.5px;
  line-height: 1.35;
}

.form-card {
  width: min(470px, 100%);
  max-height: min(520px, calc(100vh - 98px));
  padding: 22px 24px 20px;
  border-radius: 20px;
}

.form-card h1,
.coach-page h1 {
  font-size: 24px;
}

.form-card > p,
.coach-page > p {
  margin-bottom: 14px;
  font-size: 12.5px;
}

.form-grid {
  column-gap: 12px;
  row-gap: 10px;
}

.field label {
  margin-bottom: 5px;
  font-size: 11.5px;
}

.field input {
  height: 36px;
}

.field input,
.field textarea {
  border-radius: 11px;
  font-size: 12.5px;
}

.field textarea {
  min-height: 58px;
  padding: 10px 12px;
}

.field-tip {
  margin-top: 5px;
  font-size: 9.5px;
  line-height: 1.42;
}

.page-actions {
  margin-top: 14px;
}

.page-actions .primary,
.page-actions .secondary,
.page-actions .ghost {
  min-width: 126px;
  height: 42px;
  padding: 0 18px;
}

.setup-progress {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: #8b98a8;
  font-size: 11px;
  font-weight: 900;
}

.setup-progress-title {
  color: #17bfa4;
  margin-right: 2px;
}

.setup-chip {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #94a2b3;
  background: rgba(244, 247, 250, 0.86);
}

.setup-chip.done {
  color: #16bfa5;
  background: rgba(40, 215, 181, 0.1);
}

.setup-chip.active {
  color: white;
  background: linear-gradient(135deg, #28d7b5, #4f8ff7);
  box-shadow: 0 8px 18px rgba(40, 215, 181, 0.22);
}

body.welcome-mode .rail {
  display: flex;
}

body.welcome-mode .prep {
  display: block;
  right: 90px;
  top: 150px;
  width: 210px;
}

body.welcome-mode .trust {
  display: grid;
  left: 100px;
  right: auto;
  bottom: 108px;
  width: 520px;
}

body.welcome-mode .stage {
  left: 100px;
  top: 132px;
  width: 470px;
  max-width: none;
  transform: none;
}

body.welcome-mode .welcome-page {
  display: block;
  max-width: 470px;
  min-height: 0;
}

body.welcome-mode .welcome-visual {
  display: none;
}

.welcome-copy h1 {
  margin: 22px 0 14px;
  font-size: 43px;
  line-height: 1.12;
}

.welcome-copy h1 span {
  display: inline;
}

.welcome-copy p {
  margin-bottom: 24px;
  font-size: 17px;
  line-height: 1.6;
}

.welcome-copy .actions {
  flex-direction: row;
  align-items: center;
  width: auto;
  gap: 14px;
}

.welcome-copy .primary {
  width: 204px;
}

.welcome-copy .secondary {
  width: 132px;
  border-color: transparent;
  color: #4f8ff7;
  background: transparent;
  box-shadow: none;
}

.time-note {
  margin-top: 24px;
  font-size: 12px;
}

.eyebrow {
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #17bfa4;
  background: transparent;
  font-size: 13px;
}

.eyebrow::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  margin-top: 10px;
  border-radius: 99px;
  background: var(--mint);
}

.post-live-page {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: 22px;
  border: 1px solid rgba(151, 168, 185, 0.2);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 50px rgba(43, 58, 78, 0.1);
}

.post-live-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.post-live-principles article {
  min-height: 150px;
  padding: 22px;
  border: 1px solid #dce5ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 34px rgba(34, 70, 105, 0.08);
}

.post-live-principles b {
  color: #142c45;
  font-size: 18px;
}

.post-live-principles p {
  margin: 12px 0 0;
  color: #667a90;
  line-height: 1.75;
}

body.coach-mode .stage {
  left: 24px;
  right: 24px;
  top: 64px;
  bottom: 88px;
  width: auto;
  max-width: none;
  display: block;
}

body.coach-mode .trust {
  display: grid;
  left: 24px;
  right: 24px;
  bottom: 12px;
  width: auto;
}

body.coach-mode .coach-page {
  grid-template-columns: minmax(0, 1.1fr) minmax(270px, 0.9fr);
  gap: 12px;
}

.coach-hero-card {
  min-height: 360px;
  padding: 22px;
  border-radius: 20px;
}

.coach-page h1 {
  font-size: 30px;
}

body.coach-mode .advice {
  min-height: 164px;
  padding: 24px;
  font-size: clamp(24px, 3vw, 34px);
}

.coach-side-grid {
  gap: 10px;
}

.coach-panel {
  min-height: 120px;
  padding: 16px;
  border-radius: 18px;
}

.metric-grid {
  gap: 8px;
}

.metric-grid div {
  min-height: 66px;
  padding: 10px;
}

.metric-grid b {
  font-size: 24px;
}
