/* RU4Me styles — edit, save, refresh. No Tailwind compiler or CSS build step. */
:root {
    --accent: #e11d48;
    --accent-end: #db2777;
    --accent-soft: #fff1f2;
    --ink: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --surface: #fff;
    --radius: 24px;
    --shadow: 0 24px 65px -22px rgba(77, 25, 54, .25);
    --gradient: linear-gradient(110deg, #f43f5e, var(--accent-end));
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #fff1f2;
    font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: linear-gradient(135deg, #fff1f2, #fdf2f8, #faf5ff); min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
input, textarea { max-width: 100%; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--accent); }
button, input, textarea, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #9f1239; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
/* Programmatic screen-reader focus should not draw a box around headings. */
h1[tabindex="-1"]:focus { outline: none; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.25rem); letter-spacing: -.025em; line-height: 1.16; }
h2 { font-size: 1.5rem; line-height: 1.3; }
h3 { font-size: 1rem; line-height: 1.45; }
p { line-height: 1.55; }
.screen { padding: 32px 16px; min-height: calc(100vh - 70px); }
.wide { width: 100%; max-width: 896px; margin: 0 auto; }
.narrow { width: 100%; max-width: 672px; margin: 0 auto; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-header { color: white; background: var(--gradient); padding: 28px 32px; }
.panel-header h1 { margin: 12px 0 8px; }
.panel-header p { color: rgba(255,255,255,.92); margin-bottom: 0; }
.panel-body { padding: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 12px 18px; font-weight: 600; color: var(--ink); background: white; line-height: 1.35; min-height: 44px; transition: box-shadow .15s, background .15s, transform .15s; }
.button:hover:not(:disabled) { background: #f9fafb; box-shadow: 0 4px 12px #00000009; }
.button:active:not(:disabled) { transform: scale(.985); }
.button.primary { background: var(--gradient); color: white; border-color: transparent; box-shadow: 0 6px 16px #e11d4820; }
.button.primary:hover:not(:disabled) { filter: brightness(.97); }
.button.outline { border: 2px solid var(--accent); color: var(--accent); }
.button.ghost { background: transparent; color: white; border-color: transparent; padding-left: 0; }
.button.ghost:hover { background: #ffffff20; }
.button.large { padding: 20px; font-size: 1.125rem; border-radius: 12px; }
.button.small { padding: 8px 12px; font-size: .82rem; min-height: 40px; }
.button.danger { color: #b91c1c; }
.button.dashed { border-style: dashed; }
.full { width: 100%; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.home-screen { display: flex; align-items: center; justify-content: center; position: relative; padding-top: 95px; }
.home-matches { position: absolute; right: 24px; top: 20px; background: #ffffffa6; color: var(--accent); border-color: #ffe4e6; }
.welcome-card { max-width: 672px; width: 100%; padding: 48px; text-align: center; }
.heart-badge { display: grid; place-items: center; width: 80px; height: 80px; background: var(--gradient); border-radius: 50%; margin: 0 auto 24px; color: white; box-shadow: 0 7px 16px #fda4af70; }
.heart-badge svg { width: 42px; height: 42px; }
.welcome-card h1 { font-size: clamp(2.2rem, 7vw, 3rem); color: var(--accent); margin-bottom: 12px; }
.tagline { color: var(--muted); font-size: 1.125rem; margin-bottom: 32px; }
.home-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--border); margin-top: 32px; padding-top: 28px; }
.home-stats strong { display: block; font-size: 1.5rem; color: var(--accent); }
.home-stats span { color: var(--muted); font-size: .875rem; }
.storage-note { font-size: .8rem; color: var(--muted); text-align: center; margin: 22px 0 0; line-height: 1.5; }
.storage-note.left { text-align: left; margin: 0 0 20px; }
.category-tabs { display: flex; overflow-x: auto; gap: 8px; padding: 8px; background: #f3f4f6; border-radius: 12px; margin-bottom: 24px; }
.category-tab { flex: 1 0 130px; padding: 12px 9px; font-size: .8rem; border: none; background: transparent; color: var(--muted); border-radius: 8px; line-height: 1.3; }
.category-tab[aria-selected="true"] { background: white; color: var(--accent); box-shadow: 0 1px 3px #0000000d; }
.category-tab span { display: block; margin-top: 5px; font-size: .75rem; }
.question-card { padding: 24px; border-radius: 12px; background: #f9fafb; border: 1px solid var(--border); }
.question-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.question-heading { min-width: 0; flex: 1; }
.question-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: .75rem; color: var(--muted); }
.badge { background: #ffe4e6; color: var(--accent); border-radius: 5px; font-size: .75rem; padding: 4px 7px; font-weight: 700; }
.question-type { text-transform: capitalize; }
.question-text { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.ideal-section { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 12px; }
.label { font-size: .875rem; font-weight: 600; margin-bottom: 12px; }
.option { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; background: white; margin-bottom: 8px; font-size: .9rem; overflow-wrap: anywhere; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: #881337; }
.option:hover { border-color: #fda4af; }
.option input { accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: .875rem; font-weight: 600; }
.field input, textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 12px; background: white; font-weight: 400; color: var(--ink); }
textarea { min-height: 100px; resize: vertical; }
.option-edit-row { display: flex; align-items: end; gap: 8px; }
.option-edit-row label { flex: 1; min-width: 0; }
.range-input { width: 100%; accent-color: var(--accent); }
.scale-labels { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin: 10px 0; }
.scale-labels output { font-weight: 700; font-size: 1.1rem; color: var(--accent); }
.add-button { margin-top: 18px; width: 100%; border: 2px dashed #fda4af; color: var(--accent); background: transparent; }
.save-bar { border-top: 1px solid var(--border); margin-top: 30px; padding-top: 24px; }
.quiz-card { min-height: 600px; display: flex; flex-direction: column; }
.quiz-header { padding: 16px 24px 28px; }
.progress-summary { text-align: center; font-size: .875rem; margin: 8px auto 12px; }
progress { display: block; width: 100%; max-width: 320px; margin: auto; height: 8px; border: 0; border-radius: 10px; overflow: hidden; background: #ffffff44; }
progress::-webkit-progress-bar { background: #ffffff44; }
progress::-webkit-progress-value { background: white; }
progress::-moz-progress-bar { background: white; }
.quiz-body { flex: 1; padding: 38px; }
.category-label { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--accent); font-weight: 700; }
.quiz-body h1 { font-size: clamp(1.4rem, 4vw, 1.875rem); line-height: 1.28; }
.quiz-answers { margin-top: 28px; }
.quiz-answers .option { padding: 17px; font-size: 1rem; border-width: 2px; }
.quiz-nav { display: flex; gap: 14px; padding: 24px; background: #f9fafb; border-top: 1px solid #f3f4f6; }
.quiz-nav .button { flex: 1; }
.score-header { text-align: center; padding: 38px; }
.score-header.excellent { background: linear-gradient(110deg,#22c55e,#059669); }
.score-header.good { background: linear-gradient(110deg,#eab308,#ea580c); }
.score-header.different { background: linear-gradient(110deg,#f43f5e,#dc2626); }
.score-heart svg { width: 64px; height: 64px; }
.score-header h1 { font-size: 3.75rem; }
.score-header h2 { margin-bottom: 10px; }
.breakdown-card { padding: 18px; border-radius: 12px; border: 2px solid; }
.breakdown-card.match { background: #f0fdf4; border-color: #bbf7d0; }
.breakdown-card.partial { background: #fefce8; border-color: #fef08a; }
.breakdown-card.mismatch { background: #fef2f2; border-color: #fecaca; }
.breakdown-card p { margin: 3px 0; font-size: .875rem; overflow-wrap: anywhere; }
.match-card { padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: #f9fafb; }
.match-name { font-size: 1.125rem; margin-bottom: 6px; overflow-wrap: anywhere; }
.match-date { font-size: .75rem; color: var(--muted); }
.match-score { padding: 6px 10px; border-radius: 100px; font-weight: 700; font-size: .875rem; white-space: nowrap; }
.match-score.excellent { background: #d1fae5; color: #047857; }
.match-score.good { background: #ffedd5; color: #c2410c; }
.match-score.different { background: #ffe4e6; color: #be123c; }
.match-details { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: .875rem; }
.match-details dt { color: var(--muted); }
.match-details dd { margin: 0; overflow-wrap: anywhere; }
.matches-card { min-height: 500px; }
.empty-state { text-align: center; padding: 64px 10px; color: var(--muted); }
.site-footer { padding: 20px 16px; display: flex; justify-content: center; gap: 18px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.toast { position: fixed; bottom: 24px; right: 24px; max-width: min(440px,calc(100% - 32px)); padding: 18px 24px; border: 1px solid #fecdd3; border-radius: 12px; box-shadow: var(--shadow); background: white; z-index: 30; font-size: .9rem; }
.toast.error { border-color: #ef4444; color: #991b1b; }
.notice { max-width: 896px; padding: 18px; margin: 16px auto; border: 1px solid #f59e0b; border-radius: 10px; background: #fffbeb; line-height: 1.5; }
.skip-link { position: fixed; top: -80px; left: 12px; z-index: 50; background: white; padding: 12px; }
.skip-link:focus { top: 10px; }
@media (max-width: 600px) {
    :root { --radius: 18px; }
    .screen { padding: 18px 12px; }
    .home-screen { padding-top: 84px; }
    .welcome-card { padding: 30px 22px; }
    .panel-header { padding: 20px; }
    .panel-body { padding: 20px; }
    .heart-badge { width: 68px; height: 68px; }
    .question-card { padding: 16px; }
    .question-top { flex-wrap: wrap; }
    .question-heading { flex-basis: 100%; }
    .question-actions { margin-left: auto; }
    .two-columns { grid-template-columns: 1fr; }
    .quiz-body { padding: 26px 20px; }
    .quiz-nav { padding: 18px; gap: 10px; }
    .quiz-nav .button { font-size: .875rem; padding: 14px 8px; }
    .category-tab { flex-basis: 140px; }
    .score-header { padding: 30px 20px; }
    .toast { bottom: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
