:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #fff8f2 0%, #f8f0ea 48%, #efe3dc 100%);
  color: #241f1b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.shell {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.masthead {
  padding: 18px 0 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #7d5142;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 4.5rem);
  line-height: 0.95;
}

.status {
  margin: 12px 0 0;
  color: #655d56;
  font-weight: 700;
}

.status.locked {
  padding: 12px 14px;
  border: 1px solid rgba(125, 81, 66, 0.18);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.78);
  color: #7d5142;
  line-height: 1.45;
}

.guide-card {
  margin: 0 0 14px;
  padding: 18px;
  border: 1px solid rgba(36, 31, 27, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 16px 42px rgba(52, 36, 26, 0.08);
}

.guide-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.guide-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: #4d443d;
  font-size: 0.94rem;
  line-height: 1.45;
}

.guide-card p {
  margin: 12px 0 0;
  color: #7d5142;
  font-weight: 800;
  line-height: 1.45;
}

.tips-card {
  background: rgba(255, 250, 245, 0.76);
}

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

.question-card {
  padding: 18px;
  border: 1px solid rgba(36, 31, 27, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 42px rgba(52, 36, 26, 0.09);
}

.question-card.locked {
  border-color: rgba(125, 81, 66, 0.18);
  background: rgba(255, 250, 245, 0.82);
}

.question-card h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.question-card p {
  margin: 10px 0 14px;
  font-size: 0.92rem;
  font-weight: 800;
}

.question-helper {
  color: #655d56;
  font-weight: 700 !important;
  line-height: 1.45;
}

.locked-note {
  margin: 4px 0 0 !important;
  padding: 12px 14px;
  border: 1px solid rgba(125, 81, 66, 0.16);
  border-radius: 8px;
  background: rgba(248, 240, 234, 0.72);
  color: #7d5142;
  font-weight: 800 !important;
  line-height: 1.45;
}

.received {
  color: #1f7a3c;
}

.waiting {
  color: #a45d17;
}

.failed {
  color: #b42318;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

input[type="file"] {
  display: none;
}

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

.button {
  width: 100%;
}

.button.primary {
  background: #2d2027;
  color: #fffaf5;
  box-shadow: 0 12px 26px rgba(45, 32, 39, 0.16);
}

.button.secondary {
  background: #fffaf5;
  color: #2d2027;
  border: 1px solid rgba(45, 32, 39, 0.18);
}

.button.ghost {
  width: auto;
  margin-top: 12px;
  padding: 11px 14px;
  background: transparent;
  color: #8e2d2b;
  border: 1px solid rgba(142, 45, 43, 0.24);
}

.progress {
  height: 9px;
  margin: 10px 0 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(45, 32, 39, 0.10);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d2027, #b67867);
  transition: width 160ms ease;
}

.progress-label {
  margin: 4px 0 12px !important;
  color: #655d56;
  font-size: 0.82rem !important;
}

.upload-recovery {
  display: flex;
  gap: 10px;
  margin: 4px 0 14px;
  flex-wrap: wrap;
}

.upload-recovery[hidden] {
  display: none;
}

.recording-panel {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(36, 31, 27, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.78);
}

.recording-panel[hidden] {
  display: none;
}

.recording-preview {
  width: 100%;
  max-height: min(56vh, 420px);
  border-radius: 8px;
  background: #120f0e;
}

.recording-status,
.recording-helper {
  margin: 0 0 4px !important;
  color: #655d56;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  line-height: 1.45;
}

.recording-helper {
  margin: 0 0 14px !important;
  padding: 12px 14px;
  border: 1px solid rgba(36, 31, 27, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.78);
}

.recording-helper[hidden] {
  display: none;
}

.recording-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.recording-controls .button.ghost {
  margin-top: 0;
}

.button.compact {
  width: auto;
  min-width: 96px;
  padding: 10px 14px;
}

.preview {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}

.preview:empty {
  display: none;
}

.preview video {
  width: 100%;
  max-height: min(56vh, 420px);
  border-radius: 8px;
  background: #120f0e;
  box-shadow: 0 16px 38px rgba(18, 15, 14, 0.16);
}

.preview p {
  margin: 0;
  color: #655d56;
  font-size: 0.82rem;
  font-weight: 800;
}

.preview .preview-unavailable {
  padding: 12px 14px;
  border: 1px solid rgba(36, 31, 27, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.78);
  line-height: 1.45;
}

.preview .preview-pending {
  padding: 12px 14px;
  border: 1px solid rgba(36, 31, 27, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.78);
  line-height: 1.45;
}

@media (min-width: 680px) {
  .actions {
    grid-template-columns: 1fr 1fr;
  }

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