:root {
    --bg: #F2F4F8;
    --card: #FFFFFF;
    --primary: #174CF5;
    --primary-light: #EEF2FF;
    --success: #34C759;
    --success-bg: #EDFBF0;
    --error: #FF3B30;
    --error-bg: #FFF0EF;
    --text: #1C1C1E;
    --text-2: #6B6B7B;
    --text-3: #AEAEB2;
    --border: #E5E5EA;
    --radius: 14px;
    --shadow: 0 2px 12px rgba(0,0,0,0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow-y: scroll;
    overflow-x: hidden;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 0 16px 40px;
    background: linear-gradient(180deg, #ffffff 0%, #f2f4f8 60%);
    animation: fadeUp 0.22s ease;
}
.screen.active { display: block; }

/* ─── MAIN / HOME SCREEN ─── */
#screen-main { padding: 0 0 100px; }

/* Header */
.main-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 32px 20px 20px;
    gap: 12px;
}
.main-header-left { flex: 1; min-width: 0; }
.main-greeting {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    word-break: break-word;
}
.main-date {
    font-size: 14px;
    color: var(--text-2);
    margin-top: 5px;
}
.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(23,76,245,0.25);
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

/* Week strip */
.week-strip {
    display: flex;
    gap: 7px;
    padding: 0 16px 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.week-strip::-webkit-scrollbar { display: none; }
.week-day {
    flex: 1;
    min-width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px 8px;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    background: var(--card);
}
.week-day.past-done {
    background: #FFE4EC;
    border-color: #FFCCD8;
}
.week-day.past-miss {
    background: var(--card);
    border-color: var(--border);
    opacity: 0.6;
}
.week-day.today {
    background: #1a1a1a;
    border-color: #1a1a1a;
}
.week-day.future {
    background: var(--card);
    border-color: var(--border);
    opacity: 0.55;
}
.wd-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
}
.wd-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.wd-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: transparent;
}
.week-day.past-done .wd-name { color: #D63A6A; }
.week-day.past-done .wd-num  { color: #C0304A; }
.week-day.past-done .wd-dot  { background: #E05070; }
.week-day.today .wd-name { color: rgba(255,255,255,0.55); }
.week-day.today .wd-num  { color: #fff; }
.week-day.today .wd-dot  { background: rgba(255,255,255,0.75); }

/* Home card */
.home-card {
    margin: 0 16px 14px;
    background: var(--card);
    border-radius: 22px;
    padding: 20px 20px 18px;
    box-shadow: 0 2px 18px rgba(0,0,0,0.07);
}
.home-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.productivity-block { flex: 1; }
.productivity-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 0.9px;
    margin-bottom: 8px;
}
.productivity-msg {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.5;
}

/* Streak ring */
.streak-ring-wrap {
    position: relative;
    flex-shrink: 0;
    width: 82px;
    height: 82px;
}
.streak-ring-svg {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
}
.streak-ring-track {
    fill: none;
    stroke: #EBEBEB;
    stroke-width: 5;
}
.streak-ring-fill {
    fill: none;
    stroke: #FF6B8A;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 0 201;
    transition: stroke-dasharray 0.6s ease;
}
.streak-ring-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.streak-ring-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.streak-ring-lbl {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-2);
    text-align: center;
    line-height: 1.3;
    margin-top: 3px;
}

/* Card divider + stats */
.home-card-divider {
    height: 1px;
    background: var(--border);
    margin: 18px 0 14px;
}
.home-card-stats-lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 0.9px;
    margin-bottom: 12px;
}
.home-card-stats {
    display: flex;
    align-items: center;
}
.hcs-stat { flex: 1; text-align: center; }
.hcs-val {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.hcs-lbl {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 4px;
}
.hcs-sep {
    width: 1px;
    height: 38px;
    background: var(--border);
}

/* CTA */
.home-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 4px 16px 0;
    padding: 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(23,76,245,0.28);
    transition: opacity 0.15s;
}
.home-cta:active { opacity: 0.85; }

@keyframes fadeUp {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes toastIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ===== HOME ===== */
.home-header {
    text-align: center;
    padding: 36px 0 28px;
}
.home-header p {
    font-size: 14px;
    color: var(--text-2);
}
.tab-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 460px;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 4px 28px rgba(0,0,0,0.11), 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    padding: 7px;
    gap: 2px;
    z-index: 100;
}
.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    padding: 13px 10px;
    border-radius: 40px;
    overflow: hidden;
    transition: background 0.25s ease, color 0.25s ease;
}
.nav-tab span {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    margin-left: 0;
    transition: max-width 0.28s ease, opacity 0.2s ease, margin-left 0.28s ease;
}
.nav-tab.active {
    background: #174CF5;
    color: #ffffff;
}
.nav-tab.active span {
    max-width: 90px;
    opacity: 1;
    margin-left: 7px;
}
.nav-tab svg { flex-shrink: 0; }

#screen-home,
#screen-achievements { padding-bottom: 96px; }

.subjects-section { margin-bottom: 22px; }
.section-heading  { margin-bottom: 10px; }

.tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 3px 10px;
    border-radius: 20px;
}
.tag-mandatory { background: #FFF0E0; color: #C05900; }
.tag-optional  { background: #E8F5E9; color: #2A7D34; }

.subject-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 15px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    user-select: none;
}
.subject-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
.card-icon  { font-size: 26px; flex-shrink: 0; line-height: 1; }
.card-info  { flex: 1; min-width: 0; }
.card-name  { font-size: 16px; font-weight: 600; }
.card-meta  { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.card-score { font-size: 13px; color: var(--primary); font-weight: 500; margin-top: 2px; }
.card-arrow { font-size: 22px; color: var(--text-3); flex-shrink: 0; }

/* ===== ACHIEVEMENTS ===== */
.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
    padding-bottom: 32px;
}

.ach-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.ach-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    cursor: pointer;
    user-select: none;
}
.ach-card-main:active { opacity: 0.85; }

.ach-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    width: 42px;
    text-align: center;
}

.ach-info { flex: 1; min-width: 0; }

.ach-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}
.ach-level {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}
.ach-level.none { color: var(--text-3); }
.ach-level.done { color: var(--success); }

.ach-bar-wrap {
    height: 6px;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}
.ach-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    transition: width 0.5s ease;
}
.ach-bar.done { background: var(--success); }

.ach-progress-text {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
    line-height: 1.4;
}

.ach-chevron {
    font-size: 22px;
    color: var(--text-3);
    flex-shrink: 0;
    transition: transform 0.2s;
    line-height: 1;
}
.ach-card.expanded .ach-chevron { transform: rotate(90deg); }

.ach-tiers {
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.ach-tier {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-3);
}
.ach-tier.done { color: var(--text); font-weight: 500; }

.ach-tier-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}
.ach-tier.done .ach-tier-check {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.ach-topics-breakdown {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.ach-subj-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.ach-subj-icon { font-size: 16px; flex-shrink: 0; }
.ach-subj-name { flex: 1; color: var(--text-2); }
.ach-subj-count { font-weight: 600; color: var(--text); font-size: 12px; }
.ach-subj-count.done { color: var(--success); }

/* Single achievement card */
.ach-card-single {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
}
.ach-single-info { flex: 1; }
.ach-single-desc { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.ach-card.locked .ach-icon { filter: grayscale(1); opacity: 0.35; }
.ach-card.locked .ach-name { color: var(--text-3); }

/* Achievement unlock toast */
.ach-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1C1C1E;
    color: #fff;
    padding: 12px 18px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.28);
    animation: toastIn 0.3s ease;
    z-index: 999;
    white-space: nowrap;
}
.ach-toast-icon { font-size: 24px; }
.ach-toast-title { font-size: 10px; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1px; }
.ach-toast-name { font-size: 15px; font-weight: 700; }

/* ===== SUBJECT SCREEN ===== */
.subj-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 0 24px;
    gap: 8px;
}
.subj-icon  { font-size: 52px; line-height: 1; }
.subj-qcount {
    font-size: 13px;
    color: var(--text-2);
    font-weight: 500;
}

.subj-modes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
}
.mode-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    text-align: left;
    transition: background 0.13s;
    user-select: none;
}
.mode-card:active { background: var(--bg); }
.mode-card-icon { font-size: 22px; flex-shrink: 0; line-height: 1; width: 28px; text-align: center; }
.mode-card-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mode-card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.mode-card-desc  { font-size: 12px; color: var(--text-2); }
.mode-card-arrow { color: var(--text-3); flex-shrink: 0; }

/* ===== TOPICS SCREEN ===== */
.topics-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 8px;
}
.topic-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    user-select: none;
}
.topic-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
.topic-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: var(--primary);
    font-weight: 700;
}
.topic-card-body { flex: 1; min-width: 0; }
.topic-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topic-card-count {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 2px;
}
.topic-card-arrow { font-size: 20px; color: var(--text-3); flex-shrink: 0; }

.topics-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.6;
}

/* ===== QUIZ ===== */
.quiz-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 0 12px;
}
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
    transition: background 0.1s;
}
.icon-btn:active { background: var(--border); }

.quiz-label {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quiz-header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    min-width: 44px;
    justify-content: flex-end;
}
.quiz-count {
    font-size: 14px;
    color: var(--text-2);
    font-weight: 500;
    text-align: right;
}
.quiz-total-time {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    min-width: 48px;
    text-align: right;
    transition: color 0.3s;
}
.quiz-total-time.urgent { color: var(--error); }

/* Quiz actions (hint / skip) */
.quiz-actions-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.qa-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text-2);
    transition: background 0.13s, opacity 0.13s;
    flex: 1;
    justify-content: center;
}
.qa-btn:disabled { opacity: 0.4; cursor: default; }
.qa-btn:not(:disabled):active { background: var(--bg); }
.qa-hint { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.qa-skip  { color: var(--text-2); }

/* Quiz timer */
.quiz-timer {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}
.qtimer-svg {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
}
.qtimer-track {
    fill: none;
    stroke: #EBEBEB;
    stroke-width: 3.5;
}
.qtimer-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 113 113;
    transition: stroke-dasharray 0.9s linear, stroke 0.3s;
}
.qtimer-fill.urgent { stroke: var(--error); }
.qtimer-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.qtimer-num.urgent { color: var(--error); }

.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
}
.progress-inner {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.35s ease;
}

.question-num {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-3);
    margin-bottom: 8px;
}
.question-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.question-text {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    line-height: 1.4;
}
.option-btn:not(:disabled):active { transform: scale(0.99); }
.option-btn:disabled { cursor: default; }

.opt-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 8px;
    background: var(--bg);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-2);
    transition: background 0.15s, color 0.15s;
}
.opt-text { flex: 1; }

.option-btn.correct {
    border-color: var(--success);
    background: var(--success-bg);
}
.option-btn.correct .opt-label {
    background: var(--success);
    color: #fff;
}

.option-btn.wrong {
    border-color: var(--error);
    background: var(--error-bg);
}
.option-btn.wrong .opt-label {
    background: var(--error);
    color: #fff;
}

.explanation {
    margin-top: 14px;
    padding: 13px 16px;
    background: #D6E0FA;
    border-left: 4px solid #174CF5;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    animation: fadeUp 0.2s ease;
}

/* ===== RESULTS ===== */
.results-header { padding: 16px 0 4px; }

.results-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 16px;
}

.score-circle {
    width: 136px;
    height: 136px;
    border-radius: 50%;
    border: 6px solid var(--primary);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    transition: border-color 0.3s, background 0.3s;
}
.score-circle.good { border-color: var(--success); background: var(--success-bg); }
.score-circle.bad  { border-color: var(--error);   background: var(--error-bg);   }

.score-inner { display: flex; align-items: baseline; gap: 2px; }
#res-score   { font-size: 46px; font-weight: 800; line-height: 1; }
.res-total   { font-size: 18px; color: var(--text-2); font-weight: 600; }

.res-subject { font-size: 17px; font-weight: 600; margin-bottom: 6px; text-align: center; }
.res-grade   { font-size: 21px; font-weight: 700; margin-bottom: 5px; text-align: center; }
.res-msg     { font-size: 14px; color: var(--text-2); margin-bottom: 24px; text-align: center; padding: 0 16px; }

.wrong-section  { width: 100%; margin-bottom: 20px; }
.wrong-heading  {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-2);
    margin-bottom: 12px;
    text-align: center;
}
.wrong-item {
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
}
.wrong-q       { font-size: 14px; font-weight: 500; margin-bottom: 8px; line-height: 1.4; }
.wrong-your    { font-size: 13px; color: var(--error); margin-bottom: 3px; }
.wrong-correct { font-size: 13px; color: var(--success); font-weight: 500; }
.wrong-expl    { font-size: 12px; color: var(--text-2); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); line-height: 1.45; }

.quit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.quit-modal {
    background: var(--card);
    border-radius: 20px 20px 0 0;
    padding: 24px 20px 28px;
    width: 100%;
    max-width: 480px;
}
.quit-msg {
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.4;
}
.quit-msg span {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-2);
    margin-top: 4px;
}
.quit-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quit-btn-ok {
    padding: 14px;
    background: var(--error);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.quit-btn-cancel {
    padding: 14px;
    background: var(--bg);
    color: var(--text);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.result-btns {
    display: flex;
    gap: 10px;
    width: 100%;
}
.btn-primary, .btn-outline {
    flex: 1;
    padding: 14px 12px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
}
.btn-primary:active { opacity: 0.85; }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:active { background: var(--primary-light); }
