.formal-flow-test-mode body {
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 255, 255, 0.95) 0 13%, transparent 30%),
    linear-gradient(180deg, #f8fff2 0%, #e9fbdf 100%);
}

body:has(.placement-flow-v1) {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 255, 255, 0.95) 0 13%, transparent 30%),
    radial-gradient(circle at 86% 20%, rgba(28, 176, 246, 0.13), transparent 28%),
    linear-gradient(180deg, #f8fff2 0%, #e9fbdf 100%);
}

body:has(.placement-flow-v1) #app {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body:has(.placement-flow-v1) #fx-canvas,
body:has(.placement-flow-v1) #combo-layer,
body:has(.placement-flow-v1) #flash-overlay,
body:has(.placement-flow-v1) #crack-overlay,
body:has(.placement-flow-v1) #slowmo-overlay {
  display: none !important;
}

.formal-flow-test-mode #fx-canvas,
.formal-flow-test-mode #combo-layer,
.formal-flow-test-mode #flash-overlay,
.formal-flow-test-mode #crack-overlay,
.formal-flow-test-mode #slowmo-overlay {
  display: none !important;
}

.placement-flow-v1 {
  --flow-green: #58cc02;
  --flow-green-dark: #46a302;
  --flow-blue: #1cb0f6;
  --flow-yellow: #ffc800;
  --flow-red: #ff4b4b;
  --flow-ink: #14241b;
  --flow-muted: #607267;
  --flow-line: #d9edcf;
  width: min(100%, 1320px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 10px clamp(10px, 1.6vw, 22px) 18px;
  color: var(--flow-ink);
  font-family: "Nunito", "Inter", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

.placement-flow-topbar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(280px, 420px) auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 8px 12px;
  border: 1px solid rgba(88, 204, 2, 0.25);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(56, 123, 39, 0.12);
}

.placement-flow-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.placement-flow-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, #69df14, var(--flow-green));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), 0 5px 0 var(--flow-green-dark);
  font-size: 22px;
  font-weight: 1000;
}

.placement-flow-brand strong {
  display: block;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1;
  font-weight: 1000;
}

.placement-flow-brand span {
  display: block;
  margin-top: 4px;
  color: var(--flow-green-dark);
  font-size: 13px;
  font-weight: 900;
}

.placement-flow-brand .placement-flow-mark {
  display: grid;
  margin-top: 0;
  color: #ffffff;
  font-size: 22px;
}

.placement-flow-brand > span:not(.placement-flow-mark) {
  margin-top: 0;
}

.placement-flow-progress {
  min-width: 0;
}

.placement-flow-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--flow-muted);
  font-size: 13px;
  font-weight: 900;
}

.placement-flow-track {
  height: 13px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce9d7;
}

.placement-flow-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--flow-green), var(--flow-blue));
}

.placement-flow-exit {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  color: #1677b7;
  background: #eaf8ff;
  box-shadow: 0 4px 0 #bde6fb;
  cursor: pointer;
  font-weight: 1000;
}

.placement-flow-audio {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.placement-flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  margin-top: 12px;
  align-items: start;
}

.placement-flow-card,
.placement-flow-side {
  border: 1px solid rgba(88, 204, 2, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(32, 112, 52, 0.14);
}

.placement-start-v1 {
  width: 100%;
}

.placement-start-v1 .placement-flow-topbar,
.placement-start-grid,
.placement-start-card {
  width: min(100%, 1180px);
  margin-right: auto;
  margin-left: auto;
}

.placement-start-topbar {
  grid-template-columns: minmax(230px, 1fr) minmax(250px, 360px) auto;
}

.placement-start-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
  margin-top: 14px;
  align-items: stretch;
}

.placement-start-hero,
.placement-start-card {
  border: 1px solid rgba(88, 204, 2, 0.22);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 34px rgba(32, 112, 52, 0.14);
}

.placement-start-hero {
  display: grid;
  gap: 16px;
  min-height: 310px;
  align-content: center;
  padding: clamp(22px, 3vw, 42px);
  background:
    radial-gradient(circle at 88% 18%, rgba(28, 176, 246, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f6ffef 100%);
}

.placement-start-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1;
  font-weight: 1000;
}

.placement-start-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--flow-muted);
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 850;
  line-height: 1.5;
}

.placement-start-primary {
  width: min(100%, 280px);
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(180deg, #68de15, var(--flow-green));
  box-shadow: 0 7px 0 var(--flow-green-dark);
  cursor: pointer;
  font-size: 18px;
  font-weight: 1000;
}

.placement-start-side {
  align-content: center;
  padding: 22px;
}

.placement-start-card {
  margin-top: 14px;
  padding: clamp(16px, 2vw, 24px);
}

.placement-start-card h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.1;
  font-weight: 1000;
}

.placement-start-steps,
.placement-start-rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.placement-start-step {
  display: grid;
  gap: 6px;
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--flow-line);
  border-radius: 20px;
  background: #ffffff;
}

.placement-start-step span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: var(--flow-green);
  font-weight: 1000;
}

.placement-start-step strong {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 1000;
}

.placement-start-step small {
  color: var(--flow-muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.placement-start-note {
  margin-bottom: 18px;
}

.placement-start-rules {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.placement-start-rules div {
  min-height: 96px;
  padding: 16px;
  border-radius: 18px;
  background: #f7fff2;
}

.placement-start-rules strong,
.placement-start-rules span {
  display: block;
}

.placement-start-rules strong {
  font-size: 18px;
  font-weight: 1000;
}

.placement-start-rules span {
  margin-top: 6px;
  color: var(--flow-muted);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.45;
}

.placement-flow-card {
  min-width: 0;
  padding: clamp(14px, 1.55vw, 20px);
}

.placement-flow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.placement-flow-kicker {
  margin: 0 0 6px;
  color: #168bd0;
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}

.placement-flow-head h1 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.15;
  font-weight: 1000;
}

.placement-flow-head p {
  margin: 6px 0 0;
  color: var(--flow-muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.placement-flow-count {
  min-width: 76px;
  padding: 8px 10px;
  border-radius: 20px;
  color: #168bd0;
  background: #e9f7ff;
  text-align: center;
  font-size: 15px;
  font-weight: 1000;
}

.placement-flow-count strong {
  font-size: 30px;
  line-height: 1;
}

.placement-flow-passage {
  max-height: 250px;
  margin-top: 14px;
  padding: 14px 16px;
  overflow: auto;
  border: 1px solid #bfe8ff;
  border-radius: 20px;
  background: linear-gradient(180deg, #f5fcff, #ffffff);
}

.placement-flow-passage p {
  margin: 0 0 10px;
  font-size: clamp(17px, 1.25vw, 20px);
  font-weight: 750;
  line-height: 1.55;
}

.placement-flow-prompt {
  margin-top: 14px;
  padding: 15px 18px;
  border: 1px solid #f2df9c;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf6, #fffaf0);
  font-size: clamp(19px, 1.5vw, 24px);
  font-weight: 950;
  line-height: 1.4;
}

.placement-flow-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 14px;
}

.placement-flow-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 60px;
  padding: 10px 14px;
  border: 2px solid #dfeadb;
  border-radius: 18px;
  color: var(--flow-ink);
  background: #ffffff;
  box-shadow: 0 5px 0 #dce6d8;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 950;
}

.placement-flow-option[disabled] {
  cursor: default;
}

.placement-flow-letter {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, #55c7ff, var(--flow-blue));
  font-size: 20px;
  font-weight: 1000;
}

.placement-flow-option.correct {
  border-color: var(--flow-green);
  background: #efffe7;
  box-shadow: 0 5px 0 #b9ec9c;
}

.placement-flow-option.wrong {
  border-color: var(--flow-red);
  background: #fff0f0;
  box-shadow: 0 5px 0 #ffc5c5;
}

.placement-flow-feedback {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-height: 76px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e2eddc;
  border-radius: 20px;
  background: #f8fff4;
}

.placement-flow-feedback.is-correct {
  border-color: #aeea8c;
  background: #efffe7;
}

.placement-flow-feedback.is-wrong {
  border-color: #ffc4c4;
  background: #fff2f2;
}

.placement-flow-feedback-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: var(--flow-blue);
  font-weight: 1000;
}

.placement-flow-feedback strong {
  display: block;
  font-size: clamp(17px, 1.3vw, 21px);
  font-weight: 1000;
}

.placement-flow-feedback p {
  margin: 4px 0 0;
  color: var(--flow-muted);
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 800;
  line-height: 1.42;
}

.placement-flow-feedback .placement-flow-answer-line {
  color: var(--flow-ink);
  font-weight: 1000;
}

.placement-flow-feedback .placement-flow-answer-line.is-muted {
  color: var(--flow-red);
}

.placement-flow-feedback .placement-flow-answer-tip {
  color: var(--flow-muted);
  font-weight: 850;
}

.placement-flow-next {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.placement-flow-next button {
  min-width: 142px;
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(180deg, #68de15, var(--flow-green));
  box-shadow: 0 6px 0 var(--flow-green-dark);
  cursor: pointer;
  font-size: 16px;
  font-weight: 1000;
}

.placement-flow-side {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.placement-flow-side h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 1000;
}

.placement-flow-side p {
  margin: 0;
  color: var(--flow-muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.42;
}

.placement-flow-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #ffffff;
  background: #ff9600;
  font-size: 13px;
  font-weight: 1000;
}

@media (max-width: 1120px) {
  .placement-flow-topbar,
  .placement-flow-grid,
  .placement-start-topbar,
  .placement-start-grid {
    grid-template-columns: 1fr;
  }

  .placement-start-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .placement-flow-v1 {
    padding: 10px;
  }

  .placement-flow-topbar,
  .placement-flow-card,
  .placement-flow-side {
    border-radius: 22px;
  }

  .placement-flow-options {
    grid-template-columns: 1fr;
  }

  .placement-flow-option {
    min-height: 64px;
  }

  .placement-flow-head {
    grid-template-columns: 1fr;
  }

  .placement-flow-next button {
    width: 100%;
  }

  .placement-flow-audio {
    display: grid;
  }

  .placement-start-steps,
  .placement-start-rules {
    grid-template-columns: 1fr;
  }

  .placement-start-hero {
    min-height: auto;
  }

  .placement-start-primary {
    width: 100%;
  }
}
