:root {
  --bg: #faf9f7;
  --card: #ffffff;
  --text: #22262b;
  --muted: #6b7280;
  --accent: #457B9D;
  --accent-dark: #2f5a74;
  --border: #e5e2dc;
  --good: #2e7d4f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

h1, h2 {
  font-family: "Google Sans", "Noto Sans", sans-serif;
  margin-top: 0;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; margin-bottom: 4px; }

.screen { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.step-label {
  color: var(--muted);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.hint, .emotion-hint {
  color: var(--muted);
  font-size: .95rem;
}

.progress {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width .25s ease;
}

.video-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0;
}
.video-pair-single { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }

.video-slot {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.video-slot video {
  width: 100%;
  border-radius: 6px;
  background: #000;
  display: block;
}
.video-label {
  margin-top: 8px;
  font-weight: 600;
  color: var(--muted);
}

.question {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 14px 0;
}
.question p { margin: 0 0 10px; }

.choice-row {
  display: flex;
  gap: 12px;
}

.btn-choice {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.btn-choice:hover { border-color: var(--accent); }
.btn-choice.selected {
  border-color: var(--accent);
  background: #eaf2f6;
  font-weight: 600;
}

.rating-row {
  display: flex;
  gap: 8px;
}
.btn-rating {
  flex: 1;
  padding: 10px 0;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.btn-rating:hover { border-color: var(--accent); }
.btn-rating.selected {
  border-color: var(--accent);
  background: #eaf2f6;
  font-weight: 700;
}
.rating-scale-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
  margin-top: 4px;
}

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-primary:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

textarea#error-payload {
  width: 100%;
  height: 160px;
  font-family: monospace;
  font-size: .8rem;
}

@media (max-width: 560px) {
  .video-pair { grid-template-columns: 1fr; }
}
