/* Shared visual direction: soft indigo, mint practice cards, quiet surfaces. */
:root {
  --primary: #625bd8; --primary-dark: #514bb7; --text: #262b45;
  --text-primary: #262b45; --text-secondary: #626b83; --text-muted: #737b91;
  --border: #e8eaf3; --bg: #f7f8fc; --radius: 22px;
  --shadow: 0 8px 28px rgba(38, 43, 69, .045);
  --gradient: linear-gradient(120deg, #6174de, #8670d7);
}
html, body { line-height: 1.55; background: #eef0f8; }
body { -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #9a94ee; outline-offset: 3px; }
button:disabled { opacity: .46; cursor: not-allowed; }
#app { background: var(--bg); box-shadow: 0 0 80px #303b6810; }
.page-scroll { padding: 0 20px 28px; }
.card { border: 1px solid #eceef6; }
.brand-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 0 22px; }
.brand-identity { display: flex; gap: 10px; align-items: center; font-size: 18px; font-weight: 750; letter-spacing: .5px; }
.brand-mark { background: var(--gradient); color: white; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px; font-size: 25px; box-shadow: 0 5px 12px #7465ca22; }
.brand-identity small { display: block; font-size: 10px; color: var(--text-muted); font-weight: 400; letter-spacing: 1.4px; }
.brand-tag { font-size: 11px; color: #626887; border: 1px solid #e0e4f1; background: #fff9; border-radius: 20px; padding: 5px 10px; }
.home-hero { position: relative; overflow: hidden; isolation: isolate; padding: 24px; border-radius: 26px; background: linear-gradient(115deg, #ecefff 0%, #f0edfc 62%, #e6e9fd); border: 1px solid #e4e4f8; }
.home-hero::after { content: ''; position: absolute; z-index: -1; width: 180px; height: 180px; right: -45px; top: -72px; border: 26px solid #ffffff45; border-radius: 50%; }
.hero-kicker { display: flex; gap: 6px; align-items: center; color: #66638d; font-size: 11px; margin-bottom: 13px; }
.status-dot { width: 6px; height: 6px; background: #8582d7; border-radius: 50%; }
.home-hero h1 { color: #363957; font-size: clamp(25px, 7vw, 32px); line-height: 1.45; letter-spacing: -.5px; font-weight: 750; position: relative; z-index: 2; }
.home-hero p { font-size: 11px; color: #6e7394; margin-top: 11px; position: relative; z-index: 2; }
.hero-action { position: relative; z-index: 2; border: 0; border-radius: 13px; margin-top: 20px; min-height: 43px; padding: 0 15px; color: #fff; background: var(--gradient); font-size: 13px; box-shadow: 0 6px 16px #6860c52b; }
.hero-action span { margin-left: 16px; }
.hero-art { position: absolute; width: 96px; height: 120px; right: 16px; top: 56px; transform: rotate(9deg); pointer-events: none; }
.art-sheet { position: absolute; left: 14px; top: 8px; width: 70px; height: 93px; border-radius: 14px; background: linear-gradient(150deg,#ffffffec,#ffffff88); border: 1px solid #fff; padding: 15px; box-shadow: 0 14px 24px #777ab924; }
.art-sheet-back { transform: rotate(-22deg); background: #bec3f0; top: 15px; left: 6px; border: 0; }
.art-check { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 9px; background: #deddf8; color: #7770c8; font-size: 18px; }
.art-sheet i { display: block; width: 34px; height: 4px; margin-top: 8px; background: #d9dcee; border-radius: 4px; }
.art-sheet i:last-child { width: 23px; }
.art-spark { position: absolute; top: -6px; right: -3px; font-size: 21px; color: #9b93de; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 27px 1px 13px; }
.section-heading h2 { font-size: 18px; letter-spacing: -.4px; font-weight: 700; }
.section-heading > span { font-size: 11px; color: var(--text-muted); }
.stats-heading { margin-top: 23px; }
.stats-card { margin: 0 0 14px; padding: 19px 4px; border-radius: 20px; }
.stat-icon { display: none; }
.stat-num { font-size: 24px; letter-spacing: -.7px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat-label { font-size: 11px; margin-top: 7px; }
.stat-item + .stat-item { border-left: 1px solid #eceef5; }
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-link { text-decoration: none; display: flex; align-items: center; padding: 14px 11px; background: #fff; border: 1px solid #e9ecf4; border-radius: 18px; color: var(--text); gap: 8px; min-width: 0; }
.quick-icon { display: grid; place-items: center; width: 30px; height: 34px; flex-shrink: 0; }
.quick-icon img { width: 23px; height: 23px; }
.quick-link strong { display: block; font-size: 13px; font-weight: 650; }
.quick-link small { display: block; font-size: 9px; color: var(--text-muted); margin-top: 3px; }
.quick-arrow { margin-left: auto; color: #9096ac; font-size: 21px; }
.category-switch-card { margin: 0 0 14px; padding: 16px; border: 1px solid #e9ecf4; border-radius: 20px; box-shadow: none; }
.category-switch-label { font-size: 13px; }
.category-switch-label::before { height: 12px; width: 3px; }
.category-switch-track { gap: 5px; padding: 4px; background: #f4f5fa; border-radius: 13px; }
.category-switch-tab { flex: 1 0 84px; min-height: 44px; padding: 9px 10px; font-size: 12px; }
.category-switch-tab.active { box-shadow: 0 3px 10px #6b63c523; }
.category-active-badge { background: transparent; border: 0; padding: 7px 2px 0; font-size: 11px; color: var(--text-muted); }
.category-active-dot { width: 5px; height: 5px; box-shadow: none; }
.category-single-badge { background: #f3f2fc; border: 0; font-size: 13px; padding: 10px; }
.category-single-icon { display: none; }
.exam-card, .practice-card { margin: 0 0 14px; border-radius: 22px; }
.exam-card { background: linear-gradient(130deg,#fefeff,#f4f3ff); border-color: #e4e2f6; }
.exam-card-top { background: transparent; padding: 20px 18px 12px; gap: 12px; align-items: flex-start; }
.exam-icon-wrap { background: #e9e7fb; border: 1px solid #fff; width: 46px; height: 46px; border-radius: 15px; }
.exam-icon-wrap img { width: 26px; height: 26px; }
.exam-title { color: var(--text); font-size: 18px; margin-bottom: 5px; }
.exam-desc { display: block; color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
.exam-meta { flex-wrap: wrap; justify-content: flex-start; padding: 0 18px 3px; gap: 8px; border: 0; }
.meta-item { font-size: 11px; padding: 4px 8px; border-radius: 7px; background: #e9e8f64f; color: #646a87; }
.btn-primary { border-radius: 14px; height: 48px; font-size: 15px; margin: 15px 18px 19px; width: calc(100% - 36px); box-shadow: 0 5px 12px #7368c31f; }
.btn-primary span { margin-left: auto; padding-right: 3px; }
#btn-start-exam { justify-content: flex-start; padding: 0 17px; }
.practice-card { background: linear-gradient(150deg,#fff,#f2f9f7); border-color: #e1eee9; }
.practice-icon-wrap { background: #e0f1eb; }
.practice-category-block { padding: 4px 18px 18px; }
.practice-category-block:last-child { padding-bottom: 18px; }
.practice-mode-btn { align-items: flex-start; padding: 15px; background: #ffffffb8; border: 1px solid #dfece8; border-radius: 15px; box-shadow: none; }
.mode-title { color: #35675b; font-size: 13px; }
.mode-count { color: #398675; font-size: 27px; letter-spacing: -.5px; }
.mode-count-unit { font-size: 11px; }
.practice-empty-hint { background: #ffffffb0; border-color: #e2ece7; padding: 18px 12px; }
.rules-card { margin: 20px 0 0; box-shadow: none; background: transparent; border: 0; }
.rules-header { padding: 10px 2px; min-height: 44px; }
.rules-title { font-size: 14px; }
.rules-body { padding: 6px 2px; }
.rule-item { color: #737b91; font-size: 12px; gap: 10px; margin-bottom: 10px; }
.rule-num { color: #8a87a8; }
.tabbar { height: calc(65px + var(--safe-bottom)); background: #ffffffed; backdrop-filter: blur(16px); border-top-color: #e8eaf2; }
.tab-item { font-size: 11px; gap: 3px; min-height: 56px; }
.tab-icon { display: grid; place-items: center; width: 46px; height: 29px; border-radius: 10px; }
.tab-icon img { height: 22px; width: 22px; opacity: .7; filter: grayscale(1); }
.tab-item.active .tab-icon { background: #f0edfc; }
.tab-item.active img { opacity: 1; filter: none; }
.page { padding-bottom: calc(76px + var(--safe-bottom)); }
.profile-intro { padding: 34px 3px 19px; }
.eyebrow { font-size: 10px; letter-spacing: 2.6px; color: #8b86b3; font-weight: 600; }
.profile-intro h1 { font-size: 29px; margin: 8px 0 5px; letter-spacing: -.6px; }
.profile-intro p { color: var(--text-muted); font-size: 12px; }
.login-card { margin: 0 0 24px; padding: 23px 18px; background: linear-gradient(115deg,#efedfd,#edf2fc); border-color: #e1e4f6; }
.login-left { min-width: 0; flex: 1; gap: 12px; }
.login-left > div:last-child { min-width: 0; }
.avatar { width: 50px; height: 50px; border-radius: 18px; background: #ffffffb8; color: #7872ba; }
.login-title { font-size: 17px; overflow-wrap: anywhere; }
.login-subtitle { display: block; font-size: 11px; line-height: 1.7; margin-top: 3px; }
.login-btn { min-height: 40px; border-radius: 12px; padding: 8px 15px; margin-left: 8px; }
.menu-card { margin: 0 0 14px; }
.menu-item { padding: 17px 18px; min-height: 68px; }
.menu-label { font-size: 15px; }
.menu-icon { width: 35px; height: 35px; border-radius: 12px; background: #f0effa; margin-right: 14px; }
.menu-icon img { width: 21px; height: 21px; }
.menu-arrow { color: #9aa0b3; }
.subpage { background: var(--bg); }
.subpage-header { color: var(--text); background: #ffffffed; backdrop-filter: blur(12px); border-bottom: 1px solid #e9ecf4; height: 60px; }
.subpage-title { font-size: 16px; font-weight: 650; }
.subpage-back { width: 44px; height: 44px; color: #5e657c; }
.subpage-body { padding: 20px; }
.exam-page .subpage-body { padding: 20px 20px calc(105px + var(--safe-bottom)); }
.exam-topbar { padding: 2px 0 14px; gap: 14px; }
.exam-timer { background: #eeeefa; color: var(--primary); font-size: 14px; padding: 7px 12px; border-radius: 11px; font-variant-numeric: tabular-nums; }
.exam-progress { color: var(--text-muted); font-size: 13px; flex-shrink: 0; }
.practice-mode-label { color: #47796b; font-size: 14px; }
.learning-progress { height: 5px; border-radius: 5px; background: #e8e9f4; overflow: hidden; margin-bottom: 13px; }
.learning-progress > div { background: var(--gradient); height: 100%; border-radius: inherit; transition: width .2s; }
#practice-progress-fill { background: #7cb5a4; }
.answer-summary, .practice-stats-bar { font-size: 12px; color: var(--text-muted); padding: 0 0 17px; }
.question-card { padding: 24px 20px; border-radius: 22px; box-shadow: var(--shadow); }
.q-type { color: #7062b4; background: #f0edfa; font-size: 11px; border-radius: 7px; padding: 5px 9px; margin-bottom: 19px; }
.q-text, .q-content, .q-rich { color: #2c334b; font-size: 18px; line-height: 1.9; overflow-wrap: anywhere; }
.options { gap: 12px; margin-top: 23px; }
.option-item { display: flex; width: 100%; text-align: left; align-items: center; padding: 16px 14px; border: 1px solid #e6e8f0; background: #fcfcff; border-radius: 15px; min-height: 62px; gap: 13px; color: var(--text); font-size: 15px; line-height: 1.7; cursor: pointer; overflow-wrap: anywhere; }
.option-item > span:last-child { min-width: 0; }
.option-label { width: 28px; height: 28px; line-height: 28px; font-size: 12px; border-radius: 9px; background: #eceef6; color: #76809b; flex-shrink: 0; }
.option-item.selected { border-color: #a59ae4; background: #f1eefb; box-shadow: 0 0 0 1px #a59ae42b; }
.option-item.selected .option-label { background: #8173cf; color: white; }
.option-item.correct { background: #eef8f2; border-color: #84b59b; }
.option-item.wrong { background: #fff1ee; border-color: #d79790; }
.exam-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; padding: 16px 20px calc(16px + var(--safe-bottom)); background: #ffffffed; backdrop-filter: blur(12px); border-top: 1px solid #e8eaf2; gap: 12px; z-index: 5; }
.nav-btn { border-radius: 14px; height: 48px; min-height: 48px; font-size: 15px; border-color: #e3e5ef; }
.nav-btn.primary { background: var(--gradient); box-shadow: 0 5px 12px #7368c321; }
.practice-feedback { border-radius: 16px; padding: 16px; margin-top: 14px; font-size: 14px; }
.practice-feedback strong, .practice-feedback span { display: block; }
.practice-feedback strong { margin-bottom: 5px; }
.result-card { margin-top: 30px; background: radial-gradient(ellipse at top,#efedff,white 60%); padding: 38px 22px; }
.result-score { color: #6e65c3; font-size: 52px; }
.result-icon { font-size: 46px; }
.login-modal-mask { background: #22284266; backdrop-filter: blur(7px); }
.login-modal-box { padding: 29px 24px 24px; border-radius: 25px; box-shadow: 0 20px 70px #252b4730; }
.login-modal-title { font-size: 23px; letter-spacing: -.5px; }
.login-modal-tip { font-size: 12px; line-height: 1.7; }
.login-field input { background: #f8f9fd; min-height: 48px; border-radius: 12px; font-size: 16px; }
.login-modal-actions button { border-radius: 12px; height: 46px; }
.login-submit-btn { background: var(--gradient); }
.toast { border-radius: 13px; background: #30374ceF; max-width: 85vw; }
@media (max-width: 360px) {
  .page-scroll { padding-left: 14px; padding-right: 14px; }
  .home-hero { padding: 22px 18px; }
  .hero-art { right: 0; transform: rotate(9deg) scale(.8); opacity: .65; }
  .quick-link { padding: 13px 8px; gap: 5px; }
  .quick-link small { font-size: 9px; }
  .quick-arrow { display: none; }
  .section-heading > span { font-size: 10px; }
}
@media (min-width: 700px) { #app { border-left: 1px solid #e4e7f1; border-right: 1px solid #e4e7f1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Reserve a visible image area even while the original source is unavailable. */
.q-image-wrap[data-state] { margin: 18px 0; }
.q-image-wrap[data-state="loading"] .q-image,
.q-image-wrap[data-state="error"] .q-image { display: none; }
.q-image-status { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 150px; padding: 24px 16px; border: 1px dashed #cdd2e6; border-radius: 15px; background: #f7f8fc; text-align: center; font-size: 14px; line-height: 1.7; color: #626b83; }
.q-image-status[hidden], .q-image-retry[hidden] { display: none; }
.q-image-status strong { font-weight: 600; color: #4f5873; }
.q-image-status span { font-size: 12px; }
.q-image-retry { padding: 9px 18px; border: 1px solid #d7d3ee; border-radius: 10px; background: white; color: #625bd8; cursor: pointer; }

.learning-hub { padding: 22px 18px; margin: 0 0 18px; background: linear-gradient(130deg,#f0edff,#eef8f6); }
.learning-hub-title { display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:17px;gap:10px; }
.learning-hub-title small { font-size:11px;color:#77718d;font-weight:400;white-space:nowrap; }
.learning-metrics { display:flex;gap:12px;margin:22px 0 12px; }
.learning-metrics span { flex:1;font-size:11px;color:#68718a; }
.learning-metrics b { display:block;font-size:25px;color:#454164;margin-bottom:4px; }
.learning-hub p { font-size:12px;color:#68718a;line-height:1.8;margin:10px 0; }
.learning-actions { display:flex;gap:10px;margin:18px 0; }
.learning-actions button { flex:1;min-height:46px;border:1px solid #d7d4ed;border-radius:13px;background:white;color:#625bd8;font-size:13px; }
.learning-actions button:first-child { background:var(--gradient);color:white;border:0; }
.learning-hub details { font-size:12px;color:#737b91; }
