/* Quiet Hobby Maturity Quiz — styles.css */
:root {
  --bg: #faf9f7;
  --bg-card: #ffffff;
  --text: #2c2a26;
  --text-muted: #6b6560;
  --text-light: #9a948e;
  --accent: #6b8f71;
  --accent-hover: #5a7d60;
  --accent-light: #e8f0ea;
  --accent-warm: #c97b4b;
  --accent-warm-hover: #b56a3a;
  --border: #e0ddd8;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --transition: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1917;
    --bg-card: #252320;
    --text: #e8e4de;
    --text-muted: #a09a92;
    --text-light: #706a62;
    --accent: #7da884;
    --accent-hover: #8fb895;
    --accent-light: #2a3a2e;
    --accent-warm: #d4946a;
    --accent-warm-hover: #c08358;
    --border: #3a3733;
    --shadow: 0 2px 12px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.3);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus-visible { color: var(--accent-hover); }

img, svg { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--accent); color: #fff;
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  z-index: 100; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.1rem; color: var(--text);
}
.logo:hover { color: var(--accent); }
.logo svg { color: var(--accent); }

.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted); padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus-visible {
  color: var(--accent); border-bottom-color: var(--accent);
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--bg) 100%);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; margin-bottom: 1rem; }
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted); max-width: 560px;
  margin: 0 auto 2rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.65rem 1.5rem;
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--accent-warm); color: #fff; }
.btn-secondary:hover { background: var(--accent-warm-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }

/* Presets */
.presets-section { padding: 3rem 0; }
.presets-section h2 { text-align: center; margin-bottom: 0.5rem; }
.presets-section > .container > p { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; }
.preset-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.preset-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  transition: all var(--transition); font-family: var(--font);
}
.preset-card:hover, .preset-card:focus-visible {
  border-color: var(--accent); box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.preset-card.active { border-color: var(--accent); background: var(--accent-light); }
.preset-icon { font-size: 1.75rem; }
.preset-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }

/* Quiz */
.quiz-section { padding: 3rem 0 4rem; }
.quiz-layout {
  display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start;
}
@media (max-width: 860px) {
  .quiz-layout { grid-template-columns: 1fr; }
  .quiz-sidebar { order: -1; }
}

.hobby-input-group { margin-bottom: 2rem; }
.label-lg { display: block; font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.hint { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

#hobby-name {
  width: 100%; max-width: 400px;
  padding: 0.75rem 1rem;
  font-family: var(--font); font-size: 1rem;
  background: var(--bg-card); color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}
#hobby-name:focus { outline: none; border-color: var(--accent); }

.questions-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 1.25rem;
  margin-bottom: 2rem;
}
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.question-card:hover { box-shadow: var(--shadow-lg); }
.question-card fieldset { border: none; }
.question-card legend {
  font-weight: 700; font-size: 1.05rem;
  margin-bottom: 0.75rem; line-height: 1.4;
}
.q-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; background: var(--accent-light);
  color: var(--accent); border-radius: 50%;
  font-size: 0.8rem; font-weight: 800; margin-right: 0.5rem;
}

.likert {
  display: flex; flex-direction: column; gap: 0.4rem;
}
.likert-option {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--transition);
  font-size: 0.92rem; line-height: 1.4;
}
.likert-option:hover { background: var(--accent-light); }
.likert-option input[type="radio"] {
  margin-top: 0.2rem; accent-color: var(--accent);
  width: 18px; height: 18px; flex-shrink: 0;
}
.likert-option:has(input:checked) {
  background: var(--accent-light);
  font-weight: 600;
}

.quiz-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Sidebar */
.quiz-sidebar { position: relative; }
.sidebar-sticky {
  position: sticky; top: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.sidebar-sticky h3 { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1rem; }
.progress-ring-wrap { position: relative; width: 120px; height: 120px; margin: 0 auto 1.25rem; }
.progress-ring { transform: rotate(-90deg); }
.progress-ring-bg { stroke: var(--border); }
.progress-ring-fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 0.4s ease; }
.progress-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem; font-weight: 800; color: var(--text);
}

.mini-scores { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.mini-score { text-align: left; }
.mini-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.mini-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 0.2rem; }
.mini-fill { height: 100%; background: var(--accent); border-radius: 3px; width: 0%; transition: width 0.4s ease; }
.sidebar-note { font-size: 0.82rem; color: var(--text-light); }

/* Result */
.result-section { padding: 3rem 0 4rem; }
.result-section[hidden] { display: none; }
.result-card {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 700px; margin: 0 auto;
}
.result-header {
  display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem;
}
.result-emoji { font-size: 3rem; }
.result-hobby { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.result-profile { font-size: 1.75rem; line-height: 1.2; }
.result-summary { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.7; }

.result-bars { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
.result-bar-row { display: flex; align-items: center; gap: 1rem; }
.result-bar-label { width: 90px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.result-bar-track { flex: 1; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.result-bar-fill { height: 100%; border-radius: 5px; transition: width 0.6s ease; }
.result-bar-fill.consistency { background: var(--accent); }
.result-bar-fill.spending { background: var(--accent-warm); }
.result-bar-fill.skill { background: #5b8fb9; }
.result-bar-fill.joy { background: #b98b5b; }
.result-bar-value { width: 36px; text-align: right; font-size: 0.85rem; font-weight: 700; }

.result-steps { margin-bottom: 2rem; }
.result-steps h4 { font-size: 1rem; margin-bottom: 0.75rem; }
.result-steps ul { padding-left: 1.25rem; }
.result-steps li { margin-bottom: 0.5rem; line-height: 1.5; }

.result-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.result-saved-note { margin-top: 1rem; font-size: 0.85rem; color: var(--accent); font-weight: 600; }

/* Profiles */
.profiles-section { padding: 4rem 0; background: var(--accent-light); }
.profiles-section h2 { text-align: center; margin-bottom: 0.5rem; }
.profiles-section > .container > p { text-align: center; color: var(--text-muted); margin-bottom: 2rem; }
.profile-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.profile-emoji { font-size: 2.5rem; margin-bottom: 0.75rem; }
.profile-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.profile-card p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }
.profile-example { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); font-size: 0.85rem !important; }

/* About */
.about-section { padding: 4rem 0; }
.about-section h2 { text-align: center; margin-bottom: 2.5rem; }
.about-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.about-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.about-block h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.about-block p, .about-block li { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }
.about-block ul { padding-left: 1.25rem; margin-top: 0.25rem; }
.about-block li { margin-bottom: 0.35rem; }
.version-note {
  text-align: center; margin-top: 2.5rem;
  font-size: 0.82rem; color: var(--text-light);
}
.version-note a { color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem; color: var(--text-muted);
}
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* Print */
@media print {
  .site-header, .site-footer, .quiz-sidebar, .hero, .presets-section, .profiles-section, .about-section, .quiz-actions, .result-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .result-card { border: 2px solid #333; box-shadow: none; }
  .question-card { break-inside: avoid; }
}

/* Focus visible for keyboard */
*:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Responsive */
@media (max-width: 600px) {
  .container { padding: 0 1rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .question-card { padding: 1rem; }
  .result-card { padding: 1.5rem; }
  .result-header { flex-direction: column; text-align: center; }
  .preset-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}

/* Animation for result reveal */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-card { animation: fadeSlideUp 0.5s ease forwards; }

/* Toast notification */
.toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--text); color: var(--bg);
  padding: 0.75rem 1.25rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: fadeSlideUp 0.3s ease;
}
@media (max-width: 600px) {
  .toast { left: 1rem; right: 1rem; bottom: 1rem; text-align: center; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
