:root { --bg:#fcfbf6; --tint:#fbf8e1; --text:#2d2f4a; --muted:#6f7290; --primary:#069de0; --primary-dark:#3a3790; --card:#fff; --line:#e8e6d8; --radius:18px; --shadow:0 6px 24px rgba(58,55,144,.08); }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-family:"Noto Sans KR",-apple-system,"Apple SD Gothic Neo",sans-serif; line-height:1.6; }
.top { background:#fff; border-bottom:1px solid var(--line); padding:14px 16px; text-align:center; }
.top img { height:56px; width:auto; display:block; margin:0 auto 6px; }
.top h1 { margin:0; font-size:1.25rem; color:var(--primary-dark); }
.top small { color:var(--muted); }
main { background:var(--tint); padding:20px 16px 36px; min-height:70vh; }
.section-title { text-align:center; margin:0 0 14px; font-size:1.3rem; color:var(--primary-dark); }
.foot { padding:18px 16px 30px; text-align:center; color:var(--muted); font-size:.85rem; line-height:1.7; }
.toast { position:fixed; left:50%; bottom:28px; transform:translateX(-50%); background:#2d2f4a; color:#fff; padding:10px 18px; border-radius:999px; font-size:.92rem; z-index:20; max-width:90vw; text-align:center; }
.home { max-width:520px; margin:60px auto; padding:0 20px; text-align:center; color:var(--muted); line-height:1.8; }
button { font-family: inherit; }
.quiz-card { max-width: 560px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 18px 22px; }
.quiz-note { margin: 0 0 14px; color: var(--muted); font-size: .92rem; text-align: center; }
.quiz-field label { display: block; font-weight: 800; margin: 12px 0 6px; font-size: .95rem; }
.quiz-field input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: #fff; color: var(--text); }
.quiz-field small { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; }
.quiz-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 4px; }
.quiz-kinds button { padding: 11px 0; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 800; color: var(--muted); cursor: pointer; }
.quiz-kinds button[aria-pressed="true"] { border-color: var(--primary); background: #eaf6fd; color: var(--primary-dark); }
.quiz-kinds button.done::after { content: " ✓"; color: #2f8f4e; }
.quiz-q { margin: 16px 0 10px; font-size: 1.12rem; font-weight: 800; line-height: 1.55; word-break: keep-all; }
.quiz-choices { display: grid; gap: 8px; }
.quiz-choices button { text-align: left; padding: 13px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; color: var(--text); cursor: pointer; line-height: 1.45; }
.quiz-choices button[aria-pressed="true"] { border-color: var(--primary); background: #eaf6fd; font-weight: 800; }
.quiz-go { display: block; width: 100%; margin-top: 16px; padding: 14px; border: 0; border-radius: 14px; background: var(--primary-dark); color: #fff; font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.quiz-go:disabled { opacity: .45; cursor: default; }
.quiz-result { margin-top: 16px; padding: 16px; border-radius: 14px; background: #eef8f0; text-align: center; line-height: 1.6; }
.quiz-result.no { background: #fff4e0; }
.quiz-result b { display: block; font-size: 1.2rem; margin-bottom: 4px; }
.quiz-wait { text-align: center; padding: 18px 8px; color: var(--muted); line-height: 1.7; }
.quiz-wait b { color: var(--text); display: block; font-size: 1.1rem; }
.quiz-free { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; font: inherit; color: var(--text); resize: vertical; }
.quiz-free:focus, .quiz-field input:focus { outline: 0; border-color: var(--primary); }
.quiz-mode { margin: 14px 0 -8px; font-size: .85rem; font-weight: 800; color: var(--primary); }
.quiz-img { display: block; max-width: 100%; height: auto; margin: 4px auto 12px; border-radius: 12px; border: 1px solid var(--line); }
.quiz-hint { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: .84rem; }
.quiz-yday { max-width: 560px; margin: 18px auto 0; padding: 16px 18px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); font-size: .92rem; line-height: 1.6; }
.quiz-yday > b { display: block; margin-bottom: 6px; color: var(--primary-dark); }
.quiz-yday p { margin: 8px 0 0; }
.quiz-yday span { display: inline-block; padding: 1px 9px; border-radius: 999px; background: #eaf6fd; color: var(--primary-dark); font-weight: 800; font-size: .8rem; margin-right: 4px; }
.quiz-yday strong { color: #2f8f4e; }
.quiz-family { max-width: 560px; margin: 18px auto 0; padding: 18px; background: #fff8e8; border: 1px solid #f0dcaa; border-radius: var(--radius); }
.quiz-family h3 { margin: 0 0 6px; font-size: 1.1rem; color: #9a6a0a; }
.qf-q { margin: 0 0 6px; font-weight: 800; line-height: 1.55; word-break: keep-all; }
.qf-help { margin: 4px 0 10px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.qf-help b { color: var(--text); }
.qf-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.qf-modes button { padding: 10px 0; border: 2px solid #f0dcaa; border-radius: 12px; background: #fff; font: inherit; font-weight: 800; color: var(--muted); cursor: pointer; }
.qf-modes button[aria-pressed="true"] { border-color: #e0a92f; background: #fff3cf; color: #7a5200; }
.qf-text { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 2px solid #f0dcaa; border-radius: 14px; font: inherit; color: var(--text); resize: vertical; background: #fff; }
.qf-photo input[type="file"] { width: 100%; font: inherit; }
.qf-clear { display: block; margin: 0 auto 6px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; color: var(--muted); cursor: pointer; }
.qf-share { display: block; margin: 12px 0 0; font-size: .92rem; font-weight: 700; line-height: 1.5; }
.qf-share small { font-weight: 400; color: var(--muted); }
.qf-send { display: block; width: 100%; margin-top: 12px; padding: 13px; border: 0; border-radius: 14px; background: #c98a00; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.qf-send:disabled { opacity: .5; cursor: default; }
.qf-done { margin: 10px 0 0; text-align: center; font-weight: 800; color: #2f8f4e; }
.qf-done small { font-weight: 400; color: var(--muted); }
.qf-photo .quiz-img { max-height: 260px; object-fit: contain; background: #fff; }
.quiz-vbox { max-width: 560px; margin: 0 auto 14px; }
.quiz-vtitle { margin: 0 0 8px; font-size: 1.05rem; color: var(--primary-dark); text-align: center; }
.quiz-video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #111; box-shadow: var(--shadow); }
.quiz-video iframe, .quiz-video #quiz-yt { width: 100%; height: 100%; border: 0; display: block; }
.quiz-vnote { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: .9rem; }
.quiz-lock { max-width: 560px; margin: 0 auto; padding: 22px 16px; text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); display: grid; gap: 6px; }
.quiz-lock b { font-size: 1.05rem; }
.quiz-lock span { color: var(--muted); font-size: .9rem; }
.quiz-seen { justify-self: center; margin-top: 10px; padding: 4px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; text-decoration: underline; cursor: pointer; }

.open-note { max-width:560px; margin:-6px auto 14px; text-align:center; color:var(--muted); font-size:.92rem; word-break:keep-all; }
