/* Alex-learning · B 明亮游戏化练习 · 设计样式 v2026.10.14.1 */
:root {
  --page: #f5f6fd; --surface: #fff; --ink: #20283d; --muted: #59657d;
  --primary: #5743cf; --primary-dark: #3f2caf; --primary-soft: #efedff;
  --success: #176b46; --success-soft: #e8f7ee;
  --error: #a03242; --error-soft: #fff0f2;
  --reward: #7a5100; --reward-soft: #fff3cf; --line: #dfe3ef;
  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --text: 17px; --small: 14px; --title: 32px; --question: 48px;
  --space-1: 6px; --space-2: 12px; --space-3: 20px; --space-4: 28px; --space-5: 40px;
  --radius: 20px; --radius-small: 12px; --stroke: 1px solid var(--line);
  --shadow: 0 8px 28px #28204708; --z-feedback: 2;
  --motion: 160ms; --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); font: var(--text)/1.55 var(--font); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
button:disabled { cursor: not-allowed; opacity: .58; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--title); line-height: 1.3; letter-spacing: -.5px; }
h2 { font-size: 23px; line-height: 1.35; }
h3 { font-size: 19px; }
small, .small { font-size: var(--small); }
.muted { color: var(--muted); }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .8px; color: var(--primary); }
.preview-bar { background: #e9ecf6; color: #4e5b74; font-size: 12px; padding: 7px 20px; text-align: center; }
.app-header { background: var(--surface); border-bottom: var(--stroke); }
.header-inner { max-width: 1120px; margin: auto; min-height: 80px; display: flex; align-items: center; gap: 30px; padding: 12px 28px; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 20px; font-weight: 800; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--primary); color: white; display: grid; place-items: center; font-size: 24px; }
.main-nav { display: flex; align-items: center; gap: 24px; }
.main-nav a { min-height: 48px; display: grid; align-content: center; color: var(--muted); border-bottom: 3px solid transparent; font-size: 16px; font-weight: 600; }
.main-nav a[aria-current='page'] { color: var(--primary); border-color: var(--primary); }
.account { margin-left: auto; display: flex; align-items: center; gap: 9px; font-size: 14px; white-space: nowrap; }
.avatar { background: var(--reward-soft); color: var(--reward); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; }
.shell { max-width: 1120px; margin: auto; padding: 30px var(--space-4) 42px; }
.view { animation: enter var(--motion) var(--ease); }
@keyframes enter { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 24px; }
.page-heading p { margin-top: 6px; }
.text-link { color: var(--primary); font-size: 15px; font-weight: 600; padding: 12px 0; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: var(--space-4); }
.workspace { background: var(--surface); border: var(--stroke); border-radius: var(--radius); padding: var(--space-4); box-shadow: var(--shadow); }
.workspace-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: var(--primary); padding: 5px 10px; border-radius: 7px; font-size: 13px; font-weight: 700; }
.tag.reward { color: var(--reward); background: var(--reward-soft); }
.stage-name { font-size: 29px; margin: 14px 0 4px; }
.daily-progress { padding: 24px 0; }
.progress-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.progress-label strong { font-size: 24px; }
.progress { height: 14px; border-radius: 20px; background: #e9e8f5; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.progress.small { height: 8px; }
.daily-progress .small { margin-top: 10px; }
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 24px; border: 1px solid transparent; border-radius: var(--radius-small); font-weight: 750; transition: transform var(--motion), background var(--motion), box-shadow var(--motion); }
.button.primary { background: var(--primary); color: white; box-shadow: 0 4px 0 var(--primary-dark); }
.button.primary:hover { background: var(--primary-dark); }
.button.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--primary-dark); }
.button.secondary { background: white; border-color: #aaa0e1; color: var(--primary); box-shadow: 0 3px 0 #e1ddf3; }
.button.secondary:hover { background: var(--primary-soft); }
.button.secondary:active { transform: translateY(2px); box-shadow: 0 1px 0 #e1ddf3; }
.button.quiet { border-color: var(--line); background: white; color: var(--muted); }
.button.danger { background: var(--error-soft); color: var(--error); border-color: #efc0c8; }
.button.wide { width: 100%; }
.special-strip { margin-top: 25px; padding-top: 24px; border-top: var(--stroke); display: flex; gap: 20px; align-items: center; justify-content: space-between; }
.special-strip .small { margin-top: 4px; }
.energy { margin-top: 10px; max-width: 210px; }
.aside-block { padding: 0 0 25px; border-bottom: var(--stroke); margin-bottom: 25px; }
.week-slots { display: flex; gap: 10px; margin-top: 15px; }
.week-slot { width: 43px; height: 43px; border: 2px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--muted); background: white; }
.week-slot.done { background: var(--success-soft); border-color: #90c9a8; color: var(--success); }
.week-slot.current { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.stat-line { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; }
.stat-line strong { font-size: 22px; }
.help-line { font-size: 14px; color: var(--muted); margin-top: 12px; }
.question-shell { max-width: 800px; margin: auto; }
.question-top { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.question-top .progress { flex: 1; height: 9px; }
.question-top .small { white-space: nowrap; }
.question-panel { padding: 32px 44px; }
.question-meta { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.question-title { font-size: 23px; margin: 27px 0 8px; }
.word { font-size: var(--question); line-height: 1.3; font-weight: 800; margin: 10px 0 30px; overflow-wrap: anywhere; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.option { min-height: 76px; display: flex; align-items: center; gap: 16px; padding: 18px; border: 2px solid var(--line); border-radius: 14px; background: white; color: var(--ink); text-align: left; font-size: 23px; font-weight: 650; transition: border-color var(--motion), background var(--motion), transform var(--motion); }
.option:hover { border-color: #aaa0e1; }
.option:active { transform: translateY(2px); }
.option.selected { border-color: var(--primary); background: var(--primary-soft); }
.option.correct { border-color: #83bca0; background: var(--success-soft); }
.option.wrong { border-color: #db93a0; background: var(--error-soft); }
.option-letter { width: 28px; height: 28px; border: 1px solid #bfc6d5; display: grid; place-items: center; border-radius: 7px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.question-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 28px; padding-top: 24px; border-top: var(--stroke); }
.feedback { position: relative; z-index: var(--z-feedback); padding: 18px 22px; border-radius: 12px; margin-top: 22px; background: var(--success-soft); color: var(--success); }
.feedback.error { background: var(--error-soft); color: var(--error); }
.feedback.neutral { background: #f0f2f8; color: #44516d; }
.feedback strong { display: block; font-size: 20px; }
.answer-reference { background: var(--primary-soft); padding: 24px; border-radius: 14px; margin: 25px 0; }
.answer-reference p { font-size: 27px; font-weight: 650; margin-top: 8px; overflow-wrap: anywhere; }
.self-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.completion { text-align: center; padding: 34px; max-width: 760px; margin: auto; }
.trophy { width: 88px; height: 88px; background: var(--reward-soft); color: var(--reward); border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px; }
.trophy svg { width: 45px; height: 45px; }
.completion h1 { font-size: 34px; }
.completion .score { font-size: 48px; font-weight: 800; margin: 22px 0 2px; color: var(--primary); }
.completion .score small { font-size: 18px; color: var(--muted); }
.score-breakdown { display: flex; justify-content: center; gap: 32px; padding: 18px 0 24px; margin-bottom: 10px; }
.score-breakdown div { display: grid; gap: 4px; }
.score-breakdown strong { font-size: 23px; }
.segmented { display: inline-flex; gap: 2px; padding: 4px; background: #e9ecf5; border-radius: 10px; margin-bottom: 22px; }
.segmented span { padding: 8px 20px; border-radius: 7px; color: var(--muted); font-size: 15px; }
.segmented .active { background: white; color: var(--primary); font-weight: 700; }
.library-list { border-top: var(--stroke); }
.library-row { padding: 20px 0; border-bottom: var(--stroke); display: flex; align-items: center; gap: 20px; }
.library-icon { width: 50px; height: 54px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 23px; font-weight: 800; }
.library-info { flex: 1; min-width: 0; }
.library-info p { margin-top: 5px; font-size: 14px; color: var(--muted); }
.row-action { color: var(--primary); font-weight: 700; padding: 12px; font-size: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label { display: block; font-weight: 650; margin-bottom: 8px; }
.field input, .field select { width: 100%; min-height: 50px; border: 1px solid #a4afc4; border-radius: 10px; padding: 11px 13px; background: white; color: var(--ink); }
.field .small { margin-top: 6px; }
.state-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.state-block { border-top: var(--stroke); padding-top: 20px; }
.state-block h3 { margin-bottom: 12px; }
.spinner { width: 18px; height: 18px; border: 2px solid #bfb7f0; border-top-color: white; border-radius: 50%; animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview-tabs { margin: 28px auto 0; max-width: 1120px; padding: 16px 28px; border-top: var(--stroke); display: flex; flex-wrap: wrap; gap: 12px 20px; color: var(--muted); font-size: 13px; }
.preview-tabs a { padding: 6px 0; }
@media (max-width: 900px) {
  .header-inner { gap: 22px; padding-inline: 22px; }
  .main-nav { gap: 18px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; }
  .shell { padding-inline: 22px; }
  .workspace { padding: 24px; }
  .week-slots { gap: 7px; }
  .week-slot { width: 40px; height: 40px; }
}
@media (max-width: 720px) {
  .header-inner { min-height: 70px; flex-wrap: wrap; gap: 6px 20px; padding: 14px 20px 0; }
  .brand { font-size: 18px; }
  .account { margin-left: auto; }
  .main-nav { order: 3; width: 100%; justify-content: space-between; gap: 12px; }
  .main-nav a { min-height: 45px; font-size: 14px; }
  .shell { padding: 24px 20px; }
  .home-layout { grid-template-columns: 1fr; }
  .aside { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .aside-block { margin: 0; }
  .page-heading { align-items: flex-start; gap: 15px; }
  h1 { font-size: 27px; }
  .workspace { padding: 22px; }
  .question-panel { padding: 24px; }
  .word { font-size: 40px; }
  .question-footer { align-items: stretch; flex-direction: column; gap: 14px; }
  .question-footer .button { width: 100%; }
  .question-footer .small { text-align: center; }
  .completion { padding: 26px 22px; }
  .form-grid, .state-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .shell { padding-inline: 14px; }
  .workspace { padding: 20px; }
  .page-heading .text-link { font-size: 13px; }
  .stage-name { font-size: 25px; }
  .workspace-head { gap: 12px; }
  .special-strip { align-items: stretch; flex-direction: column; gap: 14px; }
  .aside { grid-template-columns: 1fr; gap: 20px; }
  .options { grid-template-columns: 1fr; }
  .option { min-height: 62px; font-size: 21px; padding: 14px; }
  .question-top { gap: 12px; }
  .question-title { font-size: 21px; }
  .question-meta { font-size: 13px; }
  .answer-reference { padding: 19px; }
  .answer-reference p { font-size: 23px; }
  .self-actions { grid-template-columns: 1fr; }
  .library-row { gap: 12px; }
  .library-icon { width: 42px; height: 48px; }
  .library-info h3 { font-size: 17px; }
  .row-action { padding: 10px 0; }
  .score-breakdown { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
