:root { --fg: #1d2330; --muted: #5b6475; --line: #d9dde5; --accent: #2457c5; --bad: #b3261e; --ok: #1e7a3c; --bg: #f7f8fa; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: var(--bg); }
header.top { display: flex; gap: 1rem; align-items: center; padding: .6rem 1rem; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
header.top nav a { margin-right: .8rem; color: var(--accent); text-decoration: none; }
main { padding: 1rem; max-width: 1200px; margin: 0 auto; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border: 1px solid var(--line); padding: .35rem .5rem; text-align: left; vertical-align: top; }
form.inline { display: inline; }
fieldset { border: 1px solid var(--line); background: #fff; margin: 0 0 1rem; }
label { display: block; margin: .3rem 0; }
input[type=text], input[type=number], input[type=password], input[type=date], select, textarea { width: 100%; max-width: 40rem; padding: .3rem; }
textarea { min-height: 6rem; font-family: ui-monospace, monospace; }
button { padding: .35rem .8rem; cursor: pointer; }
.error { color: var(--bad); border: 1px solid var(--bad); padding: .5rem; background: #fff; }
.ok { color: var(--ok); }
.muted { color: var(--muted); }
.task-content { background: #fff; border: 1px solid var(--line); padding: .8rem; overflow-x: auto; }
.task-content img { max-width: 100%; }
.badge { display: inline-block; padding: 0 .4rem; border-radius: .3rem; background: #e6ebf5; }
.meter { display: inline-block; width: 6rem; height: .6rem; background: #e6ebf5; border-radius: .3rem; vertical-align: middle; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); }
tr.status-gap td { background: #fdecea; }
tr.status-careless td { background: #fff6e0; }
tr.status-mastered td { background: #e8f5ec; }
ol.lesson-items li { margin: .2rem 0; }
ol.lesson-items li.current { font-weight: 600; }
.verdict-correct { color: var(--ok); font-weight: 600; }
.verdict-wrong { color: var(--bad); font-weight: 600; }
.structured-answer fieldset { margin: .4rem 0; }
.answer-row { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; margin: .3rem 0; }
.answer-row label { display: inline-flex; gap: .3rem; align-items: center; margin: 0; }
.answer-row input[type=text] { width: 9rem; }
.answer-preview { margin: .5rem 0; }
.answer-actions { display: flex; gap: .6rem; margin-top: .5rem; }
.exam-bar { position: sticky; top: 0; background: #fff; border: 1px solid var(--line); padding: .5rem .8rem; z-index: 5; }
.exam-clock { font-variant-numeric: tabular-nums; }
.exam-item { margin: 0 0 1.4rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.exam-item textarea { max-width: 60rem; min-height: 12rem; }
.exam-result tr.feedback td { background: #fafbfd; }
ul.criteria { list-style: none; padding-left: 0; }
ul.criteria li { margin: .3rem 0; padding: .3rem .5rem; border-left: 4px solid var(--line); background: #fff; }
li.criterion-met { border-left-color: var(--ok); }
li.criterion-missed { border-left-color: var(--bad); }
.badge.unverified { background: #fff3cd; color: #6b4e00; }
button.danger { border-color: var(--bad); color: var(--bad); background: #fff; }
.lesson-days { display: flex; flex-wrap: wrap; gap: .25rem; margin: .5rem 0 1rem; }
.lesson-day { display: inline-flex; flex-direction: column; align-items: center; width: 2.6rem; padding: .2rem 0; border: 1px solid var(--line); border-radius: .3rem; background: #fff; font-size: .8rem; }
.lesson-day.done { background: #e8f5ec; border-color: var(--ok); }
.lesson-day.missed { background: #fdecea; border-color: var(--bad); }
.lesson-day.planned { background: #fff6e0; }
.lesson-day.mock { background: #e8eefc; border-color: #5b7bd5; }
.lesson-day.mock .mark { font-size: .65rem; }
.lesson-day.off { color: var(--muted); background: #f0f1f4; }
.photo-preview { display: inline-block; margin: 0 1rem 1rem 0; vertical-align: top; max-width: 340px; background: #fff; border: 1px solid var(--line); padding: .5rem; }
.photo-preview img { max-width: 100%; height: auto; display: block; }
.link-code { font-size: 2rem; letter-spacing: .15em; font-family: ui-monospace, monospace; }
.lesson-wait { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: .4rem; background: #f7f9fc; }
.lesson-wait-title { font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.spinner { width: 1rem; height: 1rem; border: 2px solid var(--line); border-top-color: currentColor; border-radius: 50%; display: inline-block; animation: egeprep-spin 1s linear infinite; }
@keyframes egeprep-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.lesson-purpose { margin-top: .15rem; }
.lesson-exam-task { color: var(--muted); }
.entry-diagnostic { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: .4rem; background: #f7f9fc; }
.entry-step { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: .65rem 1rem; background: #fff4d6; border-bottom: 1px solid var(--line); }
a.button { display: inline-block; padding: .45rem .9rem; border-radius: .3rem; background: #2457c5; color: #fff; text-decoration: none; }
.warning { padding: .5rem .75rem; border-left: 3px solid #c58a00; background: #fff6e0; }
.schedule-help { margin: .75rem 0; }
.code-hint { font-size: .75em; }
.phone-qr { display: block; width: min(280px, 80vw); height: auto; background: white; padding: 12px; border: 1px solid var(--line); }
.phone-capture-page { max-width: 42rem; margin: 0 auto; padding: 1rem; }
.phone-capture-page button, .phone-capture-page .button { min-height: 48px; font-size: 1rem; }
.phone-capture-actions, .phone-send-actions { display: grid; gap: .75rem; }
.phone-capture-page .phone-button-primary { display: flex; width: 100%; min-height: 60px; align-items: center; justify-content: center; gap: .7rem; padding: .8rem 1rem; border: 2px solid #123a83; border-radius: .65rem; background: #174b9e; color: #fff; font-size: 1.2rem; font-weight: 750; line-height: 1.25; box-shadow: 0 2px 4px rgb(17 47 94 / 22%); }
.phone-capture-page .phone-button-primary:hover:not(:disabled) { background: #103d86; }
.phone-capture-page .phone-button-primary:focus-visible, .phone-capture-page .phone-button-secondary:focus-visible, .phone-sheet-actions button:focus-visible { outline: 3px solid #f0a900; outline-offset: 3px; }
.phone-capture-page .phone-button-primary:active:not(:disabled) { transform: translateY(1px); }
.phone-capture-page .phone-button-primary:disabled { border-color: #69758a; background: #69758a; color: #fff; box-shadow: none; }
.phone-camera-icon { width: 1.55rem; height: 1.55rem; flex: 0 0 auto; fill: currentColor; }
.phone-capture-page .phone-button-secondary { width: 100%; min-height: 48px; padding: .6rem 1rem; border: 2px solid #174b9e; border-radius: .55rem; background: #fff; color: #123a83; font-weight: 650; }
.phone-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
.phone-send-actions { margin-top: 1.25rem; }
.phone-send-reason { margin: -.2rem 0 0; color: #424c60; font-size: .95rem; }
.phone-sheet-list { display: grid; gap: 1rem; margin: 1rem 0; }
.phone-sheet { border: 1px solid var(--line); border-radius: .75rem; padding: .75rem; }
.phone-sheet > img { width: 100%; max-height: 55vh; object-fit: contain; background: #eee; }
.phone-sheet-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.phone-sheet-actions > button, .phone-sheet-actions > .phone-reshoot { display: inline-flex; min-width: 48px; min-height: 48px; align-items: center; justify-content: center; padding: .5rem .8rem; border: 1px solid #68748a; border-radius: .45rem; background: #fff; color: #1d2330; font-weight: 600; }
.quality-warning { color: #7b3d00; background: #fff1d6; padding: .7rem; font-weight: 700; }
.phone-capture-shell { min-height: 100vh; background: #f6f8fb; padding: 1rem; }
.phone-image-view { width: min(96vw, 900px); max-width: none; max-height: 95vh; padding: .25rem; border: 0; }
.phone-image-view img { width: 100%; height: auto; max-height: 90vh; object-fit: contain; }
