:root {
  --page: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe3ef;
  --line-strong: #c7d2e1;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eaf1ff;
  --green: #0f9f6e;
  --red: #e5484d;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 48px;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.top-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 76px;
  padding: 0 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.brand {
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand span {
  color: var(--blue);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav button {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.main-nav button.active {
  color: var(--ink);
}

.main-nav button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -16px;
  height: 3px;
  border-radius: 999px;
  background: var(--blue);
}

.utility-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.utility-nav button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.utility-nav button:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.utility-nav svg {
  width: 21px;
  height: 21px;
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 48px;
  padding: 8px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.site-footer nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-footer button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #334155;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer button:hover {
  color: var(--blue);
}

.home-view {
  display: none;
  grid-template-columns: minmax(430px, 0.88fr) minmax(600px, 1.12fr);
  gap: 42px;
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: 72px;
}

.home-view.active {
  display: grid;
}

.intro {
  max-width: 650px;
}

.module-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: 48px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0;
  word-break: keep-all;
}

.lead {
  max-width: 630px;
  margin: 28px 0 40px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.55;
  letter-spacing: 0;
  word-break: keep-all;
}

.standard-box {
  max-width: 620px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.standard-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.standard-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.badge-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef6ff;
  color: var(--blue);
}

.badge-icon svg {
  width: 20px;
  height: 20px;
}

.standard-box p {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
}

.setup-panel {
  justify-self: end;
  width: min(820px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

form {
  display: grid;
  gap: 34px;
}

.field-block {
  display: grid;
  gap: 14px;
}

label,
.field-label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.select-wrap,
.select-line,
.unit-input {
  position: relative;
  display: flex;
  align-items: center;
}

select,
input[type="number"] {
  width: 100%;
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: #171a20;
  font-size: 18px;
  outline: 0;
}

select:focus,
input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

select {
  appearance: none;
  padding: 0 54px 0 18px;
}

.select-wrap svg {
  position: absolute;
  right: 18px;
  width: 22px;
  height: 22px;
  color: var(--muted);
  pointer-events: none;
}

.rigor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rigor-card {
  display: grid;
  gap: 7px;
  min-height: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
}

.rigor-card.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.rigor-card strong {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
}

.rigor-card span {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px;
}

input[type="number"] {
  padding: 0 18px;
}

.unit-input,
.select-line {
  gap: 12px;
}

.unit-input span,
.select-line span {
  min-width: 58px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}

.select-line select {
  min-width: 250px;
}

.slider-box {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 86px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.slider-box div {
  color: #1b2028;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.slider-box strong {
  font-size: 20px;
  font-weight: 900;
}

.slider-box input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

.start-button,
.black-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.start-button {
  height: 62px;
  font-size: 18px;
}

.start-button:hover,
.black-button:hover {
  background: #020617;
}

.start-button:disabled {
  cursor: not-allowed;
  background: #94a3b8;
  color: #eef2f7;
  box-shadow: none;
}

.start-button:disabled:hover {
  background: #94a3b8;
}

.start-button svg,
.black-button svg {
  width: 22px;
  height: 22px;
}

.device-check-view {
  height: calc(100vh - 76px);
  min-height: 0;
  overflow: hidden;
  padding: 14px 24px;
}

.device-check-shell {
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.device-check-header {
  display: grid;
  grid-template-columns: 150px 1fr 170px;
  align-items: center;
  gap: 18px;
  min-height: 108px;
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.device-check-header > div {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.device-check-header .module-label {
  margin: 0;
}

.device-check-header h1 {
  margin: 0;
  text-align: center;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: 0;
  word-break: keep-all;
}

.device-check-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 12px;
  min-height: 0;
}

.camera-check-card,
.device-check-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.camera-check-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  padding: 14px;
}

.camera-check-frame {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0f172a;
}

.camera-check-frame video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-check-frame.camera-on video {
  display: block;
}

.camera-check-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: #fff;
}

.camera-check-frame.camera-on .camera-check-placeholder {
  display: none;
}

.camera-check-placeholder svg {
  width: 40px;
  height: 40px;
  color: #bfdbfe;
}

.camera-check-placeholder strong {
  font-size: 24px;
}

.camera-check-placeholder span {
  max-width: 280px;
  color: #cbd5e1;
  line-height: 1.5;
  word-break: keep-all;
}

.person-guide {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.guide-head {
  position: absolute;
  top: 16%;
  width: 150px;
  height: 185px;
  border: 3px solid rgba(255, 255, 255, 0.76);
  border-radius: 50% 50% 45% 45%;
}

.guide-shoulders {
  position: absolute;
  top: 50%;
  width: 520px;
  height: 190px;
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-bottom: 0;
  border-radius: 260px 260px 0 0;
}

.guide-body {
  position: absolute;
  top: 52%;
  width: 240px;
  height: 250px;
  border: 3px dashed rgba(255, 255, 255, 0.48);
  border-radius: 90px 90px 18px 18px;
}

.device-check-panel {
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}

.device-check-item {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 14px;
}

.device-check-item h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.device-check-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  word-break: keep-all;
}

.recording-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.recording-mode-button {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.recording-mode-button svg {
  width: 18px;
  height: 18px;
}

.recording-mode-button.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.mic-meter {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mic-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 90ms linear;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.check-list span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.check-list span.ready {
  background: #eafaf3;
  color: var(--green);
}

.device-check-panel .device-check-item:last-child {
  gap: 6px;
  padding: 10px 12px;
}

.device-check-panel .device-check-item:last-child h2 {
  margin-bottom: 2px;
  font-size: 17px;
}

.device-check-panel .device-check-item:last-child p {
  font-size: 13px;
  line-height: 1.28;
}

.device-check-panel .device-check-item:last-child .check-list span {
  min-height: 28px;
}

.interview-view {
  height: calc(100vh - 76px);
  overflow: hidden;
  padding: 18px 28px;
}

.interview-shell {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto minmax(130px, 0.42fr);
  gap: 12px;
}

.interview-shell.compact {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.timer-bar {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  align-items: center;
  min-height: 76px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface-soft);
  color: #1b365c;
  font-weight: 800;
}

.ghost-button svg {
  width: 18px;
  height: 18px;
}

.timer-status {
  justify-self: end;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 900;
}

.question-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  min-height: 0;
}

.question-panel,
.webcam-panel,
.control-panel,
.feedback-panel article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.question-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding: 24px 28px 18px;
}

.question-meta {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.question-meta span {
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.report-question-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.report-question-button:hover {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #9a3412;
}

.report-question-button svg {
  width: 15px;
  height: 15px;
}

.question-text {
  align-self: center;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: #000;
  font-size: 28px;
  line-height: 1.42;
  font-weight: 800;
  word-break: keep-all;
}

.webcam-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  background: #0f172a;
}

.webcam-panel video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.webcam-panel.camera-on video {
  display: block;
}

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: #fff;
}

.webcam-panel.camera-on .camera-placeholder {
  display: none;
}

.camera-placeholder svg {
  width: 40px;
  height: 40px;
  color: #bfdbfe;
}

.camera-placeholder strong {
  font-size: 22px;
  font-weight: 900;
}

.camera-placeholder span {
  max-width: 230px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
  word-break: keep-all;
}

.recording-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: none;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.webcam-panel.recording .recording-badge {
  display: block;
}

.control-panel {
  display: block;
  min-height: 0;
  padding: 14px;
}

.timer-readout {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.top-timer {
  justify-self: center;
  min-width: 168px;
  padding: 7px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.timer-readout span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.timer-readout strong {
  font-size: 34px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

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

.control-buttons .outline-button,
.control-buttons .black-button {
  width: 100%;
  min-height: 56px;
  font-size: 16px;
}

.outline-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: #111821;
  font-weight: 900;
  white-space: nowrap;
}

.outline-button:hover,
.small-button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.outline-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.outline-button svg,
.small-button svg {
  width: 18px;
  height: 18px;
}

.black-button {
  min-height: 44px;
  font-size: 15px;
}

.feedback-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  min-height: 0;
}

.feedback-panel article {
  min-height: 0;
  overflow: auto;
  padding: 18px 20px;
}

.result-view {
  min-height: calc(100vh - 76px);
  padding: 34px;
}

.result-shell {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.result-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.result-hero .module-label {
  margin-bottom: 14px;
}

.result-hero h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.28;
  letter-spacing: 0;
  word-break: keep-all;
}

.result-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
  word-break: keep-all;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.result-actions .outline-button,
.result-actions .black-button {
  min-height: 44px;
  padding: 0 14px;
}

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

.result-summary article {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.result-summary span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.result-summary strong {
  font-size: 28px;
  font-weight: 900;
}

.result-list {
  display: grid;
  gap: 14px;
}

.result-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

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

.result-card-head > span {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 900;
}

.result-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.45;
  word-break: keep-all;
}

.result-card-body {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
}

.result-card-body section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.result-card-body h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.result-card-body p {
  margin: 0;
  color: #334155;
  line-height: 1.68;
  word-break: keep-all;
}

.result-card video,
.no-recording {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background: #0f172a;
}

.no-recording {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: #cbd5e1;
  text-align: center;
}

.no-recording svg {
  width: 28px;
  height: 28px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.panel-title-row h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.small-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

#modelAnswer {
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.58;
  word-break: keep-all;
}

.review-list {
  display: grid;
  gap: 8px;
}

.empty-review {
  margin: 0;
  color: var(--muted);
}

.review-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.review-item video {
  width: 112px;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background: #000;
}

.review-item strong {
  display: block;
  margin-bottom: 4px;
}

.review-item span {
  color: var(--muted);
  font-size: 14px;
}

.exit-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
}

.exit-modal.open {
  display: grid;
}

.exit-dialog {
  width: min(420px, 100%);
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.exit-dialog h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.exit-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  word-break: keep-all;
}

.report-dialog {
  width: min(540px, 100%);
}

.feedback-dialog {
  width: min(520px, 100%);
}

.feedback-dialog .module-label {
  margin-bottom: 10px;
}

.feedback-stars {
  display: flex;
  gap: 6px;
  margin: 18px 0;
}

.feedback-star {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: #cbd5e1;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.feedback-star:hover,
.feedback-star.active {
  border-color: #2563eb;
  color: #2563eb;
}

.feedback-star:hover {
  transform: translateY(-1px);
}

.feedback-star:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.feedback-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.report-question-preview {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 900;
  line-height: 1.5;
  word-break: keep-all;
}

.report-field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.report-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 130px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}

.report-field textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 221, 0.14);
}

.exit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.exit-actions.single-action {
  grid-template-columns: 1fr;
}

.help-dialog {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 28px;
}

.help-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.help-dialog-head .module-label {
  margin-bottom: 10px;
}

.help-dialog h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.28;
  word-break: keep-all;
}

.icon-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}

.icon-close svg {
  width: 20px;
  height: 20px;
}

.help-message {
  overflow: auto;
  padding-right: 6px;
  color: #000;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
}

.help-message p {
  margin: 0 0 16px;
  color: #000;
}

.help-message blockquote {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--ink);
  font-weight: 900;
}

.help-message .message-signature {
  margin-bottom: 0;
  color: var(--ink);
  font-weight: 900;
}

.legal-dialog {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 28px;
}

.legal-content {
  overflow: auto;
  padding-right: 6px;
  color: #243044;
  font-size: 15px;
  line-height: 1.72;
  word-break: keep-all;
}

.legal-content h3 {
  margin: 22px 0 8px;
  color: var(--ink);
  font-size: 18px;
}

.legal-content h3:first-child {
  margin-top: 0;
}

.legal-content p {
  margin: 0 0 14px;
}

.help-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 1180px) {
  .top-nav {
    padding: 0 32px;
  }

  .main-nav {
    gap: 22px;
  }

  .home-view {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 48px 32px;
  }

  .intro,
  .standard-box,
  .setup-panel {
    max-width: none;
    width: 100%;
  }

  .setup-panel {
    justify-self: stretch;
  }

  .question-stage,
  .feedback-panel {
    grid-template-columns: 1fr;
  }

  .device-check-header,
  .device-check-grid {
    grid-template-columns: 1fr;
  }

  .device-check-header {
    min-height: 0;
  }

  .device-check-header h1 {
    text-align: left;
  }

  .interview-view {
    height: auto;
    min-height: calc(100vh - 76px);
    overflow: visible;
  }

  .interview-shell {
    height: auto;
    grid-template-rows: auto;
  }

  .result-hero,
  .result-card-body {
    grid-template-columns: 1fr;
  }

  .result-hero {
    display: grid;
  }

  .result-actions {
    flex-wrap: wrap;
  }

  .webcam-panel {
    min-height: 300px;
  }

  .control-panel {
    display: block;
  }
}

@media (max-width: 760px) {
  .top-nav {
    grid-template-columns: 1fr auto;
    height: auto;
    gap: 18px;
    padding: 20px;
  }

  .brand {
    font-size: 21px;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 12px;
    overflow-x: auto;
  }

  .main-nav button {
    font-size: 16px;
  }

  .site-footer {
    position: static;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px;
  }

  .site-footer nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .home-view {
    padding: 34px 20px;
  }

  .intro h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 19px;
  }

  .setup-panel {
    padding: 24px 18px;
  }

  form {
    gap: 28px;
  }

  .rigor-grid,
  .two-column,
  .slider-box,
  .control-buttons,
  .timer-bar {
    grid-template-columns: 1fr;
  }

  .timer-bar {
    gap: 10px;
    padding: 14px;
  }

  .timer-status,
  .ghost-button {
    justify-self: center;
  }

  .top-timer {
    min-width: 0;
    width: 100%;
  }

  .select-line {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .select-line select {
    min-width: 0;
  }

  .check-list {
    grid-template-columns: 1fr;
  }

  .interview-view {
    padding: 18px 12px;
  }

  .device-check-view {
    padding: 18px 12px;
  }

  .camera-check-frame {
    min-height: 360px;
  }

  .guide-head {
    width: 118px;
    height: 145px;
  }

  .guide-shoulders {
    width: 360px;
    height: 150px;
    border-radius: 180px 180px 0 0;
  }

  .guide-body {
    width: 190px;
    height: 215px;
  }

  .question-panel {
    min-height: 360px;
    padding: 22px 18px;
  }

  .question-meta {
    grid-template-columns: auto auto;
  }

  .report-question-button {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .question-text {
    font-size: 22px;
  }

  .review-item {
    grid-template-columns: 1fr;
  }

  .review-item video {
    width: 100%;
  }

  .result-view {
    padding: 18px 12px;
  }

  .result-summary,
  .result-card-body {
    grid-template-columns: 1fr;
  }

  .result-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
