:root {
  --bg: #411217;
  --bg2: #5c1a21;
  --accent: #c9a227;
  --accent-text: #2a0b0e;
  --text: #f5e9d8;
  --muted: #c9a88f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.f-app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  background:
    radial-gradient(1200px 800px at 15% -10%, var(--bg2), transparent 60%),
    radial-gradient(900px 700px at 110% 110%, var(--bg2), transparent 55%),
    var(--bg);
}

.f-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(255,255,255,0.08);
  z-index: 20;
}
.f-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.35s ease;
}

.f-stage {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw 10vh;
}

.f-screen {
  width: 100%;
  max-width: 640px;
  animation: f-in 0.45s ease;
}

@keyframes f-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.f-screen.f-out {
  animation: f-out 0.25s ease forwards;
}
@keyframes f-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-14px); }
}

.f-eyebrow {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.f-eyebrow .f-badge {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.f-question {
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 8px;
}
.f-question .f-required {
  color: var(--accent);
  margin-left: 6px;
  font-size: 1.2rem;
}
.f-description {
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 28px;
}

.f-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.25);
  color: var(--text);
  font-size: 1.4rem;
  padding: 10px 2px;
  outline: none;
  font-family: inherit;
}
.f-input::placeholder { color: rgba(245,233,216,0.35); }
.f-input:focus { border-bottom-color: var(--accent); }

textarea.f-input {
  resize: none;
  min-height: 110px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 14px;
  font-size: 1.1rem;
}
textarea.f-input:focus { border-color: var(--accent); }

.f-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.f-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12);
  color: var(--text);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  font-family: inherit;
}
.f-option:hover { border-color: var(--accent); background: rgba(255,255,255,0.1); }
.f-option.selected { border-color: var(--accent); background: rgba(201,162,39,0.18); }
.f-option-key {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.f-option.selected .f-option-key {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.f-rating {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.f-rating button {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.f-rating button:hover { border-color: var(--accent); }
.f-rating button.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.f-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}
.f-btn {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 8px;
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.f-btn:hover { transform: translateY(-1px); }
.f-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.f-btn-ghost {
  background: transparent;
  color: var(--muted);
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}
.f-hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 10px;
}

.f-nav {
  position: fixed;
  bottom: 22px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 20;
}
.f-nav button {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
}
.f-nav button:disabled { opacity: 0.25; cursor: not-allowed; }

.f-center {
  text-align: center;
}
.f-center .f-actions { justify-content: center; }

.f-error {
  color: #ff9b9b;
  font-size: 0.85rem;
  margin-top: 10px;
  min-height: 1.2em;
}

.f-corner-logo {
  position: fixed;
  top: 18px;
  left: 24px;
  max-height: 32px;
  max-width: 140px;
  z-index: 20;
  object-fit: contain;
}

.f-welcome-logo {
  max-height: 64px;
  max-width: 220px;
  margin-bottom: 24px;
  object-fit: contain;
}

.f-loading, .f-notfound {
  color: var(--muted);
  font-size: 1.1rem;
}
