:root {
  --ink: #20263d;
  --muted: #707892;
  --line: #e5e8f2;
  --paper: #ffffff;
  --canvas: #f4f6fc;
  --primary: #5b5bd6;
  --primary-dark: #4546ae;
  --purple-soft: #efefff;
  --green: #22a77a;
  --green-soft: #e8f8f2;
  --amber: #e6a31a;
  --shadow: 0 16px 45px rgba(51, 59, 105, 0.1);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, textarea, input { font: inherit; }
button { cursor: pointer; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.boot-screen, .login-page {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 85% 15%, rgba(123, 105, 229, 0.22), transparent 28%),
    radial-gradient(circle at 12% 80%, rgba(56, 196, 151, 0.14), transparent 30%),
    #f6f7ff;
}

.boot-logo, .login-logo {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 27px;
  color: white;
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(145deg, #7071e8, #4747b0);
  box-shadow: 0 18px 45px rgba(74, 74, 183, 0.28);
}

.boot-title { color: var(--muted); font-size: 16px; }
.login-card { width: min(100%, 440px); padding: 36px 28px; border-radius: 30px; background: white; box-shadow: var(--shadow); }
.login-title { margin: 0; font-size: 29px; }
.login-subtitle { margin: 12px auto 24px; color: var(--muted); line-height: 1.7; }
.login-note { margin-top: 18px; color: #9097aa; font-size: 13px; line-height: 1.6; }
.login-error { margin-bottom: 18px; padding: 12px; border-radius: 13px; color: #b34c4c; background: #fff0f0; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 20px 0 4px; padding: 5px; border-radius: 14px; background: #f1f3f9; }
.auth-tab { min-height: 40px; border: 0; border-radius: 10px; color: #7b8298; font-size: 13px; font-weight: 750; background: transparent; }
.auth-tab.active { color: var(--primary-dark); background: white; box-shadow: 0 4px 13px rgba(54,60,100,.09); }
.login-form { display: grid; gap: 10px; margin-top: 22px; text-align: left; }
.register-form { margin-top: 14px; }
.login-form .primary-button { margin-top: 8px; }
.field-label { color: #555e78; font-size: 13px; font-weight: 750; }
.field-help { margin-top: -5px; color: #9299ab; font-size: 11px; line-height: 1.5; }
.text-input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid #dfe3ef; border-radius: 13px; outline: none; color: var(--ink); background: white; transition: border-color .18s, box-shadow .18s; }
.text-input:focus, .table-input:focus { border-color: #7778df; box-shadow: 0 0 0 3px rgba(91,91,214,.11); }

.primary-button, .secondary-button, .ghost-button {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 750;
}
.primary-button { color: white; background: linear-gradient(135deg, #6667e2, #5051c1); box-shadow: 0 10px 22px rgba(78, 79, 194, 0.22); }
.secondary-button { color: var(--primary-dark); background: var(--purple-soft); }
.ghost-button { color: var(--muted); background: #f2f4f9; }
.wide-button { width: 100%; }
.wechat-button { color: white; background: linear-gradient(135deg, #20bd69, #12a557); }

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 68px;
  padding: 10px max(18px, env(safe-area-inset-left)) 10px max(18px, env(safe-area-inset-right));
  border-bottom: 1px solid rgba(225, 228, 240, 0.9);
  background: rgba(248, 249, 255, 0.9);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 900; }
.brand-button { padding: 0; border: 0; color: inherit; background: transparent; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px; color: white; font-size: 13px; background: var(--primary); }
.user-area { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #e6e8f4; }
.avatar-fallback { display: grid; place-items: center; color: white; font-weight: 800; background: linear-gradient(135deg, #7b69e5, #55a1d8); }
.user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; }
.logout-button { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12px; }
.admin-nav-button { min-height: 34px; padding: 0 12px; border-radius: 10px; color: var(--primary-dark); font-size: 12px; background: var(--purple-soft); }
.product-nav-button { min-height: 34px; padding: 0 12px; border-radius: 10px; color: #167454; font-size: 12px; background: #e4f7ef; }

.page-shell { width: min(1180px, 100%); margin: 0 auto; padding: 28px 20px calc(54px + env(safe-area-inset-bottom)); }
.hero {
  position: relative;
  overflow: hidden;
  padding: 36px;
  border-radius: 30px;
  color: white;
  background: linear-gradient(135deg, #222a50, #5557c7 66%, #7569dc);
  box-shadow: 0 22px 52px rgba(55, 58, 133, 0.2);
}
.hero::after { content: "</>"; position: absolute; right: 26px; bottom: -30px; color: rgba(255,255,255,.08); font: 900 128px/1 monospace; transform: rotate(-8deg); }
.hero-eyebrow { color: #f5d975; font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.hero-title { position: relative; z-index: 1; margin: 10px 0 8px; font-size: clamp(30px, 6vw, 52px); }
.hero-text { position: relative; z-index: 1; max-width: 650px; margin: 0; color: #e2e5ff; line-height: 1.7; }
.hero-stats { position: relative; z-index: 1; display: flex; gap: 14px; margin-top: 25px; }
.hero-stat { min-width: 112px; padding: 13px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.09); }
.hero-stat strong { display: block; font-size: 22px; }
.hero-stat span { color: #d8dcff; font-size: 12px; }

.activation-panel { display: grid; grid-template-columns: 1fr minmax(330px, .85fr); align-items: center; gap: 30px; margin-top: 20px; padding: 25px 28px; border: 1px solid #eadfae; border-radius: 23px; background: linear-gradient(135deg, #fffdf5, #fff8de); box-shadow: 0 10px 28px rgba(142,111,29,.07); }
.activation-panel h2 { margin: 4px 0; font-size: 21px; }
.activation-panel p { margin: 0; color: #7a715b; font-size: 13px; line-height: 1.6; }
.panel-kicker { color: #b57c0c; font-size: 11px; font-weight: 850; letter-spacing: .08em; }
.activation-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.access-confirmed { display: flex; align-items: center; gap: 13px; margin-top: 20px; padding: 19px 23px; border: 1px solid #c6eadc; border-radius: 20px; color: #1b7255; background: var(--green-soft); }
.access-confirmed > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: white; background: var(--green); }
.access-confirmed p { margin: 3px 0 0; color: #5c8877; font-size: 12px; }

.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 34px 2px 17px; }
.section-heading h2 { margin: 0; font-size: 23px; }
.section-heading span { color: var(--muted); font-size: 13px; }
.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.course-card { position: relative; min-height: 206px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: 0 9px 27px rgba(50, 58, 100, .06); transition: transform .18s, box-shadow .18s; }
.course-card:not(.locked):active { transform: scale(.985); }
.course-card.complete { border-color: #bfe9d9; background: linear-gradient(160deg, white, #f2fcf8); }
.course-card.current { border-color: #c9c9fa; box-shadow: 0 14px 34px rgba(78, 79, 194, .13); }
.course-card.locked { opacity: .62; filter: grayscale(.25); }
.course-card.activation-required { border-style: dashed; background: #fafafd; }
.course-day { display: inline-flex; padding: 6px 10px; border-radius: 10px; color: var(--primary-dark); font-size: 11px; font-weight: 850; background: var(--purple-soft); }
.course-status { position: absolute; top: 20px; right: 20px; font-size: 18px; }
.course-card h3 { margin: 17px 0 8px; font-size: 18px; }
.course-card p { min-height: 44px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.course-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: #8b92a5; font-size: 12px; }
.course-open { color: var(--primary); font-weight: 800; }

.lesson-shell { width: min(1140px, 100%); margin: 0 auto; padding: 22px 20px calc(60px + env(safe-area-inset-bottom)); }
.back-button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 13px; border: 0; border-radius: 12px; color: var(--muted); background: white; }
.lesson-hero { margin-top: 15px; padding: 30px; border-radius: 27px; color: white; background: linear-gradient(135deg, #20294c, #6263d4); }
.lesson-hero-row { display: flex; justify-content: space-between; gap: 20px; }
.lesson-hero h1 { margin: 8px 0; font-size: clamp(25px, 5vw, 38px); }
.lesson-hero p { margin: 0; color: #e0e3ff; line-height: 1.6; }
.xp-pill { align-self: start; flex: 0 0 auto; padding: 8px 12px; border-radius: 12px; color: #ffe484; font-weight: 850; background: rgba(255,255,255,.1); }
.progress-track { height: 10px; margin-top: 23px; border-radius: 10px; background: rgba(255,255,255,.15); }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #75e0b6, #f6dd78); transition: width .25s; }
.step-nav { position: sticky; z-index: 20; top: 78px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 15px 0; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.step-link { padding: 10px 6px; border: 0; border-radius: 12px; color: var(--muted); font-size: 12px; font-weight: 750; background: transparent; }
.step-link.done { color: var(--green); background: var(--green-soft); }

.lesson-card { margin-top: 16px; padding: 28px; border: 1px solid var(--line); border-radius: 25px; background: white; box-shadow: 0 10px 32px rgba(52, 59, 98, .06); }
.card-kicker { color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .08em; }
.card-title { margin: 7px 0 4px; font-size: 23px; }
.card-caption { color: var(--muted); font-size: 13px; line-height: 1.6; }
.video-grid, .workbench { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: 22px; margin-top: 20px; }
.lesson-video { width: 100%; aspect-ratio: 16/9; border-radius: 18px; background: #151a2c; }
.knowledge-box, .mission-box, .expected-box, .hint-box { padding: 18px; border-radius: 17px; background: #f4f5ff; }
.knowledge-box h4 { margin: 0 0 12px; }
.knowledge-item { display: flex; gap: 9px; margin-top: 10px; color: #515a78; font-size: 14px; line-height: 1.55; }
.knowledge-dot { color: #7b69e5; }
.inline-actions, .editor-actions { display: flex; gap: 10px; margin-top: 16px; }
.inline-actions button, .editor-actions button { flex: 1; }
.transcript { margin-top: 14px; padding: 16px; border-radius: 16px; color: #596078; font-size: 13px; line-height: 1.65; background: #f7f8fc; }
.transcript p { margin: 8px 0; }

.quiz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 20px; }
.quiz-item { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fbfcff; }
.question { margin-bottom: 14px; font-weight: 750; line-height: 1.55; }
.option { width: 100%; margin-top: 8px; padding: 11px 12px; border: 1px solid #e1e4ef; border-radius: 12px; color: #4b536d; text-align: left; background: white; }
.option.selected { border-color: #7374de; background: #f0f0ff; }
.option.correct { border-color: #56bf9a; color: #187757; background: #edf9f4; }
.option.wrong { border-color: #eb8b8b; color: #a24b4b; background: #fff1f1; }
.explanation { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.score-line { margin-top: 13px; color: var(--primary); text-align: center; font-weight: 800; }

.editor-pane { min-width: 0; }
.editor-bar { display: flex; align-items: center; height: 46px; padding: 0 15px; border-radius: 15px 15px 0 0; color: #b9c0d4; font-size: 12px; background: #252b42; }
.editor-dots { margin-right: 12px; color: #ef6b67; letter-spacing: 3px; }
.editor-name { flex: 1; }
.runner-mode { padding: 5px 8px; border-radius: 8px; color: #adb6e4; background: #343b5b; }
.code-editor { display: block; width: 100%; height: 390px; padding: 18px; border: 0; border-radius: 0 0 15px 15px; outline: none; resize: vertical; color: #e2e6f3; font-size: 14px; line-height: 1.65; background: #1b2033; }
.input-box { margin-top: 14px; padding: 15px; border: 1px solid #dfe3ef; border-radius: 15px; background: #f8faff; }
.input-box.terminal { border-color: #3f4966; background: #171d30; }
.input-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #68718c; font-size: 12px; font-weight: 750; }
.terminal .input-toolbar { color: #abb5cf; }
.example-button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--primary); font-size: 11px; background: #e9ebff; }
.program-input { width: 100%; min-height: 55px; margin-top: 9px; padding: 11px; border: 1px solid #e1e5ef; border-radius: 10px; outline: none; resize: vertical; color: #27304a; background: white; }
.terminal .program-input { border-color: #252e46; color: #8de6bc; background: #0f1524; }
.input-help { margin-top: 7px; color: #8d96ad; font-size: 11px; line-height: 1.5; }
.console { min-height: 150px; padding: 17px; border-radius: 17px; color: #d9deeb; background: #111728; }
.console + .console, .test-report + .console { margin-top: 13px; }
.console-title { margin-bottom: 11px; color: #929db7; font-size: 12px; }
.console-output { display: block; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.6; }
.success-output { color: #79e4b6; }
.test-report { padding: 8px 15px; border-radius: 16px; background: #f7f8fc; }
.test-row { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid #e7e9f1; }
.test-row:last-child { border-bottom: 0; }
.test-status { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: 9px; color: white; background: #d66c6c; }
.test-status.passed { background: #36ad82; }
.test-name { font-size: 13px; font-weight: 750; }
.test-message { margin-top: 3px; color: var(--muted); font-size: 11px; }
.hint-box { margin-top: 13px; color: #665b85; font-size: 12px; line-height: 1.7; background: #faf4ff; }
.finish-card { margin-top: 18px; padding: 28px; border-radius: 24px; color: #216b53; text-align: center; background: linear-gradient(140deg, #e8faf3, #f7fffb); }
.finish-card h3 { margin: 6px 0; font-size: 23px; }

.admin-shell { width: min(1320px, 100%); margin: 0 auto; padding: 28px 20px 60px; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 30px; border-radius: 26px; color: white; background: linear-gradient(135deg, #222a50, #5557c7); }
.admin-heading h1 { margin: 7px 0; font-size: clamp(26px, 5vw, 40px); }
.admin-heading p { margin: 0; color: #dfe2ff; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 18px 0; }
.admin-stats div { padding: 20px 23px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 8px 25px rgba(50,58,100,.05); }
.admin-stats strong { display: block; color: var(--primary-dark); font-size: 28px; }
.admin-stats span { color: var(--muted); font-size: 12px; }
.admin-card { margin-top: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 23px; background: white; box-shadow: 0 9px 27px rgba(50,58,100,.05); }
.admin-card-title h2 { margin: 0; font-size: 20px; }
.admin-card-title p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.admin-form { display: grid; align-items: center; gap: 10px; margin-top: 18px; }
.user-create-form { grid-template-columns: 1fr 1fr 1.35fr auto auto; }
.code-create-form { grid-template-columns: 110px minmax(220px, 1fr) auto; margin-bottom: 20px; }
.checkbox-field { color: #586078; font-size: 13px; white-space: nowrap; }
.checkbox-field input { width: 17px; height: 17px; vertical-align: -4px; accent-color: var(--primary); }
.table-scroll { margin-top: 18px; overflow-x: auto; }
.admin-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 12px; }
.admin-table th { padding: 11px 10px; border-bottom: 1px solid var(--line); color: #7b8298; text-align: left; white-space: nowrap; background: #fafbfe; }
.admin-table td { padding: 13px 10px; border-bottom: 1px solid #edf0f6; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table small { display: block; margin-top: 4px; color: #9299ac; }
.table-input { width: 130px; min-height: 34px; padding: 0 9px; border: 1px solid #dfe3ed; border-radius: 9px; outline: none; color: var(--ink); background: white; }
.status-badge { display: inline-flex; padding: 5px 8px; border-radius: 8px; font-weight: 750; white-space: nowrap; }
.status-good { color: #147052; background: #e5f8f0; }
.status-off { color: #a04d4d; background: #fff0f0; }
.status-basic { color: #846512; background: #fff5d8; }
.admin-actions { min-width: 260px; }
.table-button { min-height: 31px; margin: 2px; padding: 0 9px; border: 0; border-radius: 8px; color: var(--primary-dark); font-size: 11px; font-weight: 750; background: var(--purple-soft); }
.danger-button { color: #9e4a4a; background: #fff0f0; }
.password-reset { display: inline-flex; gap: 4px; margin-left: 2px; vertical-align: middle; }
.password-reset .table-input { width: 145px; }
.activation-code-value { padding: 6px 8px; border-radius: 8px; color: #3f429e; font-weight: 750; background: #f1f1ff; white-space: nowrap; }

.vocab-shell { width: min(1180px, 100%); margin: 0 auto; padding: 24px 20px 60px; }
.vocab-tabs { display: flex; gap: 7px; margin-bottom: 18px; padding: 6px; border-radius: 16px; background: #eaf3ef; }
.vocab-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 11px; color: #648073; font-weight: 750; background: transparent; }
.vocab-tabs button.active { color: #167454; background: white; box-shadow: 0 5px 16px rgba(25,92,68,.09); }
.vocab-hero { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 34px; border-radius: 28px; color: white; background: linear-gradient(135deg,#164f47,#24a174); }
.vocab-hero h1 { margin: 8px 0; font-size: clamp(28px,5vw,44px); }.vocab-hero p { margin: 0; color: #d9f4e9; }
.vocab-stats { display: flex; gap: 10px; }.vocab-stats div { min-width: 92px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.12); }.vocab-stats strong,.vocab-stats span { display: block; }.vocab-stats strong { font-size: 22px; }.vocab-stats span { font-size: 11px; color: #d9f4e9; }
.vocab-settings-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 17px; padding: 18px 22px; border: 1px solid #dbe9e3; border-radius: 19px; background: white; }.vocab-settings-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }.vocab-settings-card form { display: flex; align-items: center; gap: 9px; }.vocab-settings-card label { color: var(--muted); font-size: 12px; }.vocab-settings-card input { width: 62px; margin-left: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; }
.vocab-task-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 17px; }.vocab-task-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: white; }.vocab-task-card h3,.vocab-task-card p { margin: 0; }.vocab-task-card p { margin-top: 5px; color: var(--muted); font-size: 13px; }.vocab-task-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; font-size: 25px; background: #e9f8f2; }
.vocab-section-head h1 { margin: 8px 0; }.vocab-section-head p { color: var(--muted); }.vocab-create-card { padding: 18px; border-radius: 19px; background: white; }.vocab-create-card form { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; }
.vocab-book-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; margin-top: 17px; }.vocab-book-card { display: flex; gap: 15px; min-height: 150px; padding: 20px; border: 1px solid var(--line); border-radius: 21px; background: white; cursor: pointer; }.book-cover { display: grid; place-items: center; flex: 0 0 58px; height: 72px; border-radius: 9px 17px 17px 9px; color: white; font: 800 20px Georgia,serif; background: linear-gradient(145deg,#20a274,#176557); box-shadow: inset 5px 0 rgba(0,0,0,.1); }.book-cover.large { width: 76px; height: 96px; font-size: 25px; }.book-info h3 { margin: 4px 0; }.book-info p { min-height: 40px; margin: 0; color: var(--muted); font-size: 12px; }.book-info div { display: flex; gap: 10px; margin-top: 10px; color: #74877f; font-size: 11px; }
.vocab-book-header { display: flex; gap: 20px; margin: 15px 0; padding: 25px; border-radius: 22px; color: white; background: linear-gradient(135deg,#183f3c,#27876b); }.vocab-book-header h1 { margin: 5px 0; }.vocab-book-header p { margin: 0; color: #dbf0e9; }.share-list { display: flex; gap: 6px; margin-top: 11px; font-size: 11px; }.share-chip { padding: 5px 8px; border-radius: 8px; background: rgba(255,255,255,.13); }.share-chip button { margin-left: 5px; border: 0; color: white; background: transparent; }
.vocab-manager-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 15px; }.stack-form { display: grid; gap: 9px; margin-top: 13px; }.danger-text { margin-top: 10px; color: #a34c4c; }.import-textarea { min-height: 145px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; resize: vertical; }.vocab-word-table { min-width: 760px; }.vocab-word-table small { display: block; color: var(--muted); }
.dictionary-lookup-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }.dictionary-lookup-row button { padding: 0 14px; white-space: nowrap; }
.study-shell { width: min(680px,100%); margin: 0 auto; }.study-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }.study-step-label { margin: 18px 0 8px; color: #16805d; font-size: 12px; font-weight: 850; letter-spacing: .08em; }.study-card { padding: 34px; border: 1px solid var(--line); border-radius: 27px; text-align: center; background: white; box-shadow: var(--shadow); }.study-word { font: 800 clamp(42px,10vw,72px)/1.2 Georgia,serif; color: #173f39; }.phonetic { margin: 7px 0; color: #6d827b; }.meaning-reveal { margin: 17px 0 8px; color: #176c52; font-size: 24px; font-weight: 800; }.example-sentence { padding: 13px; border-radius: 13px; color: #5e736b; background: #edf7f3; }.study-actions { display: flex; gap: 8px; margin: 20px 0 12px; }.study-actions button { flex: 1; padding: 0 8px; }.study-prompt { margin-bottom: 22px; font-size: 20px; }.meaning-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.meaning-options button { min-height: 52px; padding: 10px; border: 1px solid #dce8e3; border-radius: 13px; color: #345c4f; background: #f7fbf9; }.study-feedback { margin: 16px 0; padding: 12px; border-radius: 12px; }.study-feedback.success { color: #126b4c; background: #e5f7ef; }.study-feedback.error { color: #a04949; background: #fff0f0; }.record-button { width: 160px; height: 160px; border: 0; border-radius: 50%; color: white; font-weight: 800; background: linear-gradient(145deg,#25aa7b,#176a55); box-shadow: 0 15px 32px rgba(25,119,87,.25); }.record-button.recording { animation: pulse 1s infinite; background: #df6464; }.recording-playback { display: block; width: 100%; margin-top: 14px; }.heard-text { margin-top: 14px; color: var(--muted); }.spelling-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; }.spelling-form input { text-align: center; font-size: 20px; }
.study-word-button { display: block; margin: 0 auto; padding: 0 12px; border: 0; border-radius: 15px; cursor: pointer; background: transparent; transition: transform .15s,color .15s,background .15s; }.study-word-button:hover { color: #11805d; background: #edf8f4; }.study-word-button:active { transform: scale(.96); }.study-word-button:focus-visible { outline: 3px solid rgba(32,162,116,.25); outline-offset: 4px; }.study-word-hint { margin-top: 5px; color: #779087; font-size: 12px; }
.pronunciation-score { display: inline-flex; align-items: baseline; justify-content: center; flex-wrap: wrap; min-width: 126px; margin: 18px auto 3px; padding: 12px 20px; border-radius: 18px; }.pronunciation-score strong { font-size: 42px; line-height: 1; }.pronunciation-score span { margin-left: 3px; font-size: 16px; font-weight: 800; }.pronunciation-score small { flex-basis: 100%; margin-top: 5px; font-weight: 750; }.pronunciation-score.passed { color: #12704f; background: #e3f8ee; }.pronunciation-score.retry { color: #a14b4b; background: #fff0f0; }
@keyframes pulse { 50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(223,100,100,.12); } }

.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); max-width: min(86vw, 430px); padding: 11px 17px; border-radius: 13px; color: white; text-align: center; background: rgba(26,31,49,.92); box-shadow: 0 12px 32px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty-state { padding: 50px 20px; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-grid, .workbench { grid-template-columns: 1fr; }
  .quiz-grid { grid-template-columns: 1fr; }
  .code-editor { height: 340px; }
  .activation-panel { grid-template-columns: 1fr; gap: 15px; }
  .user-create-form { grid-template-columns: 1fr 1fr; }
  .vocab-book-grid { grid-template-columns: 1fr 1fr; }.vocab-hero { align-items: flex-start; flex-direction: column; }.vocab-manager-grid { grid-template-columns: 1fr; }
  .user-create-form .primary-button { width: 100%; }
}

@media (max-width: 560px) {
  .app-header { min-height: 60px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 35px; height: 35px; }
  .user-name { display: none; }
  .admin-nav-button { padding: 0 9px; }
  .product-nav-button { padding: 0 9px; }
  .page-shell, .lesson-shell { padding-right: 13px; padding-left: 13px; }
  .hero { padding: 27px 22px; border-radius: 24px; }
  .hero::after { right: -10px; font-size: 92px; }
  .hero-stats { gap: 9px; }
  .hero-stat { min-width: 0; flex: 1; padding: 11px; }
  .course-grid { grid-template-columns: 1fr; gap: 12px; }
  .course-card { min-height: 175px; padding: 20px; }
  .activation-panel { padding: 21px 18px; }
  .activation-form { grid-template-columns: 1fr; }
  .activation-form .primary-button { width: 100%; }
  .lesson-hero { padding: 23px 20px; }
  .xp-pill { font-size: 12px; }
  .step-nav { top: 68px; }
  .lesson-card { padding: 22px 17px; border-radius: 21px; }
  .card-title { font-size: 20px; }
  .inline-actions, .editor-actions { flex-wrap: wrap; }
  .editor-actions button { flex-basis: 42%; padding-right: 8px; padding-left: 8px; font-size: 12px; }
  .code-editor { height: 315px; padding: 15px; font-size: 13px; }
  .lesson-video { border-radius: 13px; }
  .admin-shell { padding: 14px 12px 40px; }
  .admin-heading { align-items: flex-start; padding: 23px 19px; }
  .admin-heading .secondary-button { min-height: 38px; padding: 0 11px; font-size: 11px; }
  .admin-stats { gap: 8px; }
  .admin-stats div { padding: 14px 11px; }
  .admin-stats strong { font-size: 22px; }
  .admin-card { padding: 19px 15px; }
  .user-create-form, .code-create-form { grid-template-columns: 1fr; }
  .vocab-shell { padding: 13px 12px 40px; }.vocab-hero { padding: 24px 20px; }.vocab-stats { width: 100%; }.vocab-stats div { min-width: 0; flex: 1; padding: 10px; }.vocab-settings-card,.vocab-settings-card form { align-items: stretch; flex-direction: column; }.vocab-task-grid,.vocab-book-grid { grid-template-columns: 1fr; }.vocab-task-card { grid-template-columns: auto 1fr; }.vocab-task-card .primary-button { grid-column: 1 / -1; }.vocab-create-card form { grid-template-columns: 1fr; }.study-card { padding: 25px 17px; }.study-actions { flex-wrap: wrap; }.study-actions button { flex-basis: 42%; }.meaning-options { grid-template-columns: 1fr; }
}
