/* 유이코 한국어 4급 한 달 과정(2026-11-23) — style.css(11-22 디자인) 위에 더하는 것.
   출근길(아침 해) · 퇴근길(저녁 달) 색, 30일 도장판, 단어 · 문법 카드, 바로 채점, 시험지, 같이 풀이, 관리자 화면. */

.t-vocab { --c: var(--brand); --c-deep: var(--brand-deep); --c-soft: var(--brand-soft); }
.t-writing { --c: #2f8fe0; --c-deep: #1b62a8; --c-soft: #e3f0fd; }
.t-am { --c: #e9a30f; --c-deep: #a35f00; --c-soft: #fff4d6; }
.t-pm { --c: #5b5fc7; --c-deep: #3d40a0; --c-soft: #ebebfb; }

/* 첫 화면 */
.demo-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 14px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink-2); font-size: .86rem; font-weight: 650; }
.demo-bar svg { flex: none; width: 18px; height: 18px; color: var(--brand); }
.demo-bar a { margin-left: auto; color: var(--brand-deep); font-weight: 800; white-space: nowrap; }
.hero h1 { font-size: clamp(1.9rem, 8.4vw, 3.2rem); }
.sess-list { display: grid; gap: 10px; padding: 14px 14px 18px; list-style: none; }
.sess-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 12px; border-radius: 20px; background: var(--c-soft); }
.sess-card .period-title { flex-wrap: wrap; }
.sess-card .sess-go { grid-column: 1 / -1; width: 100%; }
.sess-card.t-pm .btn-primary { background: #4b4fc0; box-shadow: 0 4px 0 #2f3290; }
.sess-card.t-pm .btn-primary:hover:not(:disabled) { background: #4245b3; }
.sess-card.t-pm .btn-primary:active:not(:disabled) { box-shadow: 0 1px 0 #2f3290; }
.sess-card .btn-primary:disabled { background: #f3e9ee; color: #a99aa5; box-shadow: 0 4px 0 #e6d8df; }
.hero-wait { color: var(--ink-2); font-weight: 650; text-align: center; }
.notes-card { margin-top: 16px; }
.note-line { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--brand-tint); font-size: .96rem; }
.note-line .tag { background: #fff; color: var(--brand-deep); }
.note-line.teacher { background: var(--read-soft); }
.note-line.teacher .tag { color: var(--read-deep); }
.home-grid + .card, .notes-card + .card, .hero + .card { margin-top: 16px; }
.card + .card { margin-top: 16px; }
.missed { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.missed .btn { min-height: 44px; padding: 8px 14px; font-size: .92rem; }
.missed .btn svg { width: 16px; height: 16px; }
.home-links { display: flex; justify-content: center; margin-top: 12px; }
.home-links .btn svg { width: 18px; height: 18px; }

/* 30일 도장판: 바깥 고리 왼쪽 = 출근길, 오른쪽 = 퇴근길 */
.stamp-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; list-style: none; }
.stamp-board.with-pct { row-gap: 26px; }
.stamp-cell { position: relative; aspect-ratio: 1; border-radius: 50%; background: #f3eaef; }
.stamp-cell .half { position: absolute; inset: 0; border-radius: 50%; }
.stamp-cell .half.am { clip-path: inset(0 50% 0 0); }
.stamp-cell .half.pm { clip-path: inset(0 0 0 50%); }
.half.am.on { background: #f2b42b; }
.half.pm.on { background: #6b6fd6; }
.half.late { opacity: .5; }
.stamp-cell b { position: absolute; inset: 17%; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink-2); font-family: var(--font-cute); font-size: 1rem; font-weight: 400; }
.stamp-cell.full b { color: var(--ink); }
.stamp-cell.today b { color: var(--brand-deep); box-shadow: 0 0 0 2px var(--brand); }
.stamp-cell.soon { opacity: .42; }
.stamp-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; color: var(--ink-3); font-size: .8rem; font-weight: 700; }
.stamp-legend .half { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.stamp-legend .half.late { background: #f2b42b; }
.admin-cell button { all: unset; position: absolute; inset: 0; border-radius: 50%; cursor: pointer; }
.admin-cell button:disabled { cursor: default; }
.admin-cell button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.admin-cell small { position: absolute; left: -6px; right: -6px; bottom: -20px; color: var(--ink-3); font-size: .7rem; font-weight: 800; text-align: center; }

/* 진행 막대 */
.bar { height: 8px; margin-bottom: 16px; overflow: hidden; border-radius: 99px; background: #eee2e8; }
.bar-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--c, var(--brand)); transition: width .3s ease; }
.track { gap: 3px; }
.track > .seg { flex: 1; }

/* 단어 카드 */
.word-card { text-align: center; }
.word-pos { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--c-soft); color: var(--c-deep); font-size: .8rem; font-weight: 800; }
.q-card .word-ko { margin-top: 10px; font-family: var(--font-cute); font-size: clamp(2.2rem, 11vw, 3.2rem); font-weight: 400; line-height: 1.15; }
.word-card .mini-play.big { margin: 14px auto 0; }
.word-mean { margin-top: 16px; font-size: 1.12rem; font-weight: 700; text-wrap: balance; }
.ja { margin-top: 6px; color: var(--ink-3); font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", var(--font-body); font-size: .95rem; }
.word-ex { margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: #fffcf3; box-shadow: inset 0 0 0 1.5px #f1e3c4; font-size: 1.04rem; line-height: 1.8; text-align: left; }
.word-ex mark { background: linear-gradient(transparent 55%, #ffd6e2 55%); color: inherit; font-weight: 800; }

/* 문법 카드 */
.q-card .gram-form { color: var(--c-deep); font-family: var(--font-cute); font-size: clamp(1.9rem, 9vw, 2.6rem); font-weight: 400; line-height: 1.2; }
.gram-mean { margin-top: 10px; font-size: 1.06rem; font-weight: 700; }
.gram-how { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--c-soft); color: var(--ink-2); font-size: .95rem; }
.gram-ex { display: grid; gap: 8px; margin-top: 14px; padding-left: 1.3em; }
.gram-ex li { line-height: 1.75; }

/* 출근길: 고르고 '확인'하면 바로 맞음·틀림 */
.feedback { margin-top: 14px; padding: 14px 16px; border-radius: 20px; animation: rise .3s ease; }
.feedback.ok { background: var(--good-soft); }
.feedback.no { background: #fff0f2; }
.fb-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-cute); font-size: 1.3rem; }
.fb-head svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; color: #fff; }
.feedback.ok .fb-head { color: var(--good-deep); }
.feedback.ok .fb-head svg { background: var(--good-deep); }
.feedback.no .fb-head { color: var(--brand-deep); }
.feedback.no .fb-head svg { background: var(--brand); }
.feedback .why { margin-top: 8px; }
.options .option.is-right { background: var(--good-soft); box-shadow: inset 0 0 0 2px #39b88a; }
.options .option.is-right .opt-no { background: var(--good-deep); box-shadow: none; color: #fff; }
.options .option.is-mine { background: #fff0f2; box-shadow: inset 0 0 0 2px var(--brand); }
fieldset[disabled] .option { cursor: default; }
.center-card { text-align: center; }
.center-card .btn { margin-top: 14px; }

/* 쓰기 */
.write-box { display: block; margin-top: 18px; }
.write-box input { width: 100%; min-height: 56px; padding: 12px 16px; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px var(--line-2); font-size: 1.1rem; }
.write-box input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--c); }
.blank.blank-mark { width: auto; height: auto; padding: 0 .55em; color: var(--c-deep, var(--ink-2)); font-weight: 800; vertical-align: baseline; }

/* 시험지 */
.sheet { display: grid; gap: 12px; list-style: none; }
.sheet-item { padding: 16px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.sheet-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; font-size: .82rem; font-weight: 800; }
.mark { flex: none; width: 34px; height: 34px; margin-right: 2px; border-radius: 50%; }
.mark.ok { box-shadow: inset 0 0 0 4px var(--stamp); }
.mark.no { border-radius: 4px; background: linear-gradient(135deg, transparent 44%, var(--stamp) 44% 56%, transparent 56%); }
.mark.skip, .mark.none { box-shadow: inset 0 0 0 2px var(--line-2); }
.src-chip { padding: 2px 9px; border-radius: 999px; background: #f0ecfb; color: #5446a0; }
.star-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px; border-radius: 999px; background: #fff4d6; color: #8a5d00; }
.star-chip svg { width: 13px; height: 13px; }
.ms { margin-left: auto; color: var(--ink-3); font-weight: 700; }
.opts { display: grid; gap: 6px; margin-top: 10px; list-style: none; }
.opts li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #faf6f8; font-size: .94rem; }
.opts .opt-no { width: 24px; height: 24px; font-size: .78rem; }
.opts li.right { background: var(--good-soft); }
.opts li.mine:not(.right) { background: #fff0f2; }
.opts .tag.mine-tag { background: var(--brand-soft); color: var(--brand-deep); }
.opts .tag.right-tag { background: #c9eedd; color: var(--good-deep); }
.script-box { margin-top: 8px; }
.mini-play { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px 6px 8px; border: 0; border-radius: 999px; background: var(--listen-soft); color: var(--listen-deep); font-size: .86rem; font-weight: 750; }
.mini-play svg { width: 24px; height: 24px; padding: 6px; border-radius: 50%; background: var(--listen-deep); color: #fff; }
.mini-play.big { min-height: 48px; font-size: .95rem; }
.mini-play.on svg { background: var(--brand); }
.script { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #f4fbf9; color: var(--ink-2); font-size: .9rem; line-height: 1.7; white-space: pre-wrap; }
.teacher-line, .q-line { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; font-size: .9rem; }
.teacher-line { background: var(--read-soft); }
.teacher-line .tag { background: #dfe3ff; color: var(--read-deep); }
.question-box { margin-top: 10px; }
.q-line { background: #fff7e3; }
.q-line .tag { background: #ffe7ad; color: #7a5300; }
.waiting { margin-top: 6px; color: var(--ink-3); font-size: .84rem; }
.report-line { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-3); font-size: .84rem; }
.report-line svg { width: 16px; height: 16px; }
.flag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.flag-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 6px 12px; border: 0; border-radius: 999px; background: #f7f1f4; color: var(--ink-2); font-size: .82rem; font-weight: 750; }
.flag-btn svg { width: 16px; height: 16px; }
.flag-btn.on { background: #fff4d6; color: #8a5d00; }
.ask-form { margin-top: 10px; }
.ask-form label span { color: var(--ink-2); font-size: .86rem; font-weight: 700; }
.ask-form textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 0; border-radius: 12px; box-shadow: inset 0 0 0 2px var(--line-2); font: inherit; resize: vertical; }
.ask-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.sheet-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
.sheet-top h1 { font-family: var(--font-cute); font-size: 1.5rem; font-weight: 400; }
.sheet-top .btn { min-height: 42px; padding: 8px 14px; }
.sheet-top .btn svg { width: 18px; height: 18px; }
.report-actions.three { flex-wrap: wrap; }
.report-actions.three .btn { flex: 1 1 30%; }

/* 같이 풀이 */
.together { max-width: 760px; margin-inline: auto; }
.q-card.together-card h1 { font-size: clamp(1.25rem, 5vw, 1.6rem); }
.together-card .mini-play.big { margin-top: 16px; }
.together-options .option { width: 100%; border: 0; text-align: left; }
.action-bar #t-next { min-width: 116px; margin-left: auto; }
.option.picked { background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c); }
.reveal { display: grid; gap: 6px; margin-top: 16px; }
.together-q { margin-top: 16px; color: var(--ink-2); }
.together-empty { text-align: center; }
.together-empty .btn { margin-top: 16px; }

/* 설정 */
.settings { display: grid; gap: 16px; }
.switch { display: flex; align-items: flex-start; gap: 12px; }
.switch input { flex: none; width: 22px; height: 22px; margin-top: 3px; accent-color: var(--brand); }
.switch span, .speed-set legend { display: grid; }
.switch small, .speed-set small { color: var(--ink-3); font-size: .84rem; }
.speed-set { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; border: 0; }
.speed-set legend { margin-bottom: 8px; }
.speed-set label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.speed-set input { width: 18px; height: 18px; accent-color: var(--listen-deep); }

/* 로그인 */
.login { display: grid; place-items: center; min-height: 80vh; }
.login-card { width: min(100%, 420px); text-align: center; }
.login-card .brand-mark { margin: 0 auto 12px; width: 56px; height: 56px; border-radius: 19px; }
.login-card h1 { font-family: var(--font-cute); font-size: 1.6rem; font-weight: 400; line-height: 1.3; }
.login-card h1 small { display: block; color: var(--ink-3); font-family: var(--font-body); font-size: .86rem; font-weight: 700; }
.login-card form { display: grid; gap: 12px; margin-top: 18px; text-align: left; }
.field { display: grid; gap: 4px; }
.field span { color: var(--ink-2); font-size: .86rem; font-weight: 700; }
.field input { min-height: 52px; padding: 10px 14px; border: 0; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--line-2); font: inherit; font-size: 1.1rem; }
.field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.msg { min-height: 1.4em; color: var(--brand-deep); font-size: .9rem; font-weight: 700; }

/* 관리자 */
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-actions .btn { flex: 1 1 220px; }
.bars { display: grid; grid-template-columns: repeat(30, 1fr); align-items: end; gap: 3px; height: 120px; padding-top: 6px; border-bottom: 2px solid var(--line); }
.bar-col { display: block; min-height: 4px; border-radius: 4px 4px 0 0; background: #6b6fd6; }
.bar-col.empty { background: #f1e8ed; }
.bars-axis { display: flex; justify-content: space-between; margin-top: 4px; color: var(--ink-3); font-size: .74rem; font-weight: 700; }
.sub-h { margin-top: 18px; font-size: .95rem; font-weight: 800; }
.week-rates { display: grid; gap: 6px; margin-top: 8px; list-style: none; }
.week-rates li { display: grid; grid-template-columns: 3em 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #f4f3fc; }
.flag-list { display: grid; gap: 8px; list-style: none; }
.flag-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px; border-radius: 14px; background: #faf6f8; }
.tag.question { background: #ffe7ad; color: #7a5300; }
.tag.together { background: #fff4d6; color: #8a5d00; }
.tag.audio, .tag.error { background: #efe6eb; color: var(--ink-2); }
.flag-main { display: grid; gap: 4px; }
.flag-text { color: var(--ink-2); font-size: .92rem; }
.link { all: unset; color: var(--read-deep); font-size: .88rem; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.answer-form, .cheer-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.admin-hero h1 { font-size: clamp(1.7rem, 7.4vw, 2.7rem); }
.answer-form input, .cheer-form textarea { flex: 1 1 220px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 12px; box-shadow: inset 0 0 0 2px var(--line-2); font: inherit; }
.cheer-form .field { flex: 1 1 220px; }
.cheer-form .btn, .answer-form .btn { flex: none; min-height: 44px; }
.note-list { display: grid; gap: 6px; margin-top: 12px; list-style: none; }
.note-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: .9rem; }
.note-list small { color: var(--ink-3); }
.report.wide { max-width: 880px; }
.day-nav { display: flex; justify-content: space-between; }
.day-nav .btn svg { width: 16px; height: 16px; }
.day-run { display: grid; gap: 12px; margin-top: 16px; }
.run-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.run-head h2 svg { width: 22px; height: 22px; color: var(--c-deep); }
.run-meta { color: var(--ink-2); font-size: .92rem; }
.run-head .report-actions { margin-top: 12px; }

@media (min-width: 720px) {
  .sess-list { grid-template-columns: 1fr 1fr; padding: 18px 30px 30px; }
  .stamp-board { grid-template-columns: repeat(10, 1fr); }
}
