:root {
  --bg: #f6efe6;
  --bg-deep: #efe4d5;
  --card: #fffaf3;
  --sand: #e8d9c4;
  --sand-strong: #d9c3a5;
  --accent: #c48f73;
  --accent-deep: #a8725a;
  --sage: #b9c6b1;
  --text: #4a3f37;
  --muted: #8a7b6e;
  --line: #e6d8c6;
  --error: #b5564a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(120, 90, 60, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

a { color: var(--accent-deep); }

.notice {
  background: var(--sand);
  color: var(--text);
  text-align: center;
  padding: 10px 16px;
  font-size: 15px;
}

.notice strong { font-weight: 700; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  padding: 28px 0 8px;
}

.brand {
  font-family: "Lora", Georgia, serif;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

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

.welcome {
  padding: 32px 0 28px;
}

.welcome h1 {
  font-size: clamp(28px, 5vw, 40px);
}

.welcome p {
  color: var(--text);
  max-width: 640px;
}

.resume-box {
  display: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.resume-box.show { display: block; }
.resume-box p { margin: 0 0 12px; }

.quest {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 28px 28px 24px;
  margin-bottom: 48px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.progress-bar {
  height: 6px;
  background: var(--bg-deep);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 28px;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sage), var(--accent));
  transition: width 0.4s ease;
}

.q-stage {
  flex: 1;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.q-title {
  font-family: "Lora", Georgia, serif;
  font-size: clamp(21px, 3.4vw, 26px);
  margin: 0 0 8px;
}

.q-req {
  display: inline-block;
  font-family: "Nunito Sans", sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  background: #f5e4d9;
  border-radius: 99px;
  padding: 2px 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.q-hint {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 20px;
}

.q-hint.important {
  color: var(--accent-deep);
  font-weight: 600;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}

.option:hover { border-color: var(--sand-strong); }
.option:active { transform: scale(0.995); }

.option.selected {
  border-color: var(--accent);
  background: #fbf0e8;
}

.option .mark {
  flex: 0 0 20px;
  height: 20px;
  margin-top: 3px;
  border: 2px solid var(--sand-strong);
  border-radius: 50%;
  position: relative;
}

.option.multi .mark { border-radius: 6px; }

.option.selected .mark {
  border-color: var(--accent);
  background: var(--accent);
}

.option.selected .mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: #fff;
}

.option.multi.selected .mark::after {
  inset: 3px 6px 6px 6px;
  border-radius: 0;
  background: none;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  width: 5px;
  height: 9px;
  left: 5px;
  top: 1px;
}

.option .label-wrap { flex: 1; }
.option .sub { display: block; font-size: 14px; color: var(--muted); }

.option-extra {
  margin: -4px 0 4px 32px;
}

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.15s;
}

input:focus, textarea:focus, .option:focus-visible, button:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 143, 115, 0.18);
}

textarea { min-height: 130px; resize: vertical; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field .small { font-size: 13px; color: var(--muted); margin-top: 4px; }

.scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.scale .option {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 8px;
  gap: 6px;
}

.scale .num {
  font-family: "Lora", serif;
  font-size: 22px;
}

.scale .desc { font-size: 13px; color: var(--muted); line-height: 1.35; }

.scale-ends {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.scale-ends div {
  flex: 1;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: center;
}

.scale-ends .sample { font-size: 30px; line-height: 1.2; display: block; margin-bottom: 4px; }
.scale-ends .word { font-size: 14px; color: var(--muted); }

.radius-demo {
  display: inline-block;
  width: 56px;
  height: 34px;
  background: var(--sand);
  border: 2px solid var(--accent);
  margin-right: 6px;
  vertical-align: middle;
}

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

.color-pick {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}

.color-pick input[type="color"] {
  width: 100%;
  height: 70px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.color-pick input[type="text"] { text-align: center; margin-top: 8px; padding: 8px; }
.color-pick span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }

.upload {
  border: 2px dashed var(--sand-strong);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  background: #fff;
}

.upload h3 { font-size: 17px; margin-bottom: 4px; }
.upload p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }

.file-list { list-style: none; padding: 0; margin: 10px 0 0; font-size: 14px; }
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 6px;
}
.file-list button {
  border: none;
  background: none;
  color: var(--error);
  cursor: pointer;
  font: inherit;
}

.error {
  color: var(--error);
  font-size: 15px;
  min-height: 24px;
  margin-top: 12px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.nav .right { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }

.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 99px;
  padding: 11px 24px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--sand-strong); color: var(--text); }
.btn-link { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 11px 6px; }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 8px;
  cursor: pointer;
}

.consent input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }

.legal {
  font-size: 14px;
  color: var(--muted);
  margin-top: 14px;
}

.upload-progress { margin-top: 16px; font-size: 15px; color: var(--muted); }

.done { text-align: center; padding: 30px 0; }
.done .icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--sage);
  display: grid; place-items: center;
  margin: 0 auto 20px;
  color: #fff; font-size: 34px;
}

footer.site {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  padding: 0 16px 40px;
}

footer.site a { color: var(--muted); }

@media (max-width: 560px) {
  .quest { padding: 22px 18px 18px; border-radius: 18px; }
  .scale { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .scale .desc { display: none; }
  .scale-desc-mobile { display: block !important; }
  .colors { grid-template-columns: 1fr; }
  .scale-ends .sample { font-size: 24px; }
}

.scale-desc-mobile { display: none; font-size: 14px; color: var(--muted); margin-top: 10px; }
