/* 英语app — 经典开发工具深色（GitHub Dark / VS Code 气质） */
:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-soft: #21262d;
  --text: #b1bac4;
  --muted: #8b949e;
  --primary: #3fb950;
  --primary-soft: #238636;
  --accent: #58a6ff;
  --success: #3fb950;
  --danger: #f85149;
  --border: #30363d;
  --shadow: 0 8px 24px rgba(1, 4, 9, 0.45);
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}
.app-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 18px 56px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #238636;
  color: #e6edf3;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  border: 1px solid #2ea043;
}
.brand h1 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 650;
  color: var(--text);
}
.sub { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }

.hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 22px;
}
.hero h1, .hero h2 {
  margin: 0 0 8px;
  font-size: 1.55rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hero p { margin: 0; color: var(--muted); max-width: 62ch; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 24px 0 12px;
}
.section-title h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 650;
  color: var(--text);
}
.section-title span {
  color: var(--muted);
  font-size: 0.9rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  color: var(--text);
  text-align: left;
  font: inherit;
}
.card:hover {
  border-color: #6e7681;
  background: #1c2128;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
  font-weight: 650;
  color: inherit;
}
.card p {
  margin: 0;
  color: inherit;
  opacity: .8;
  font-size: 0.88rem;
}
.badge {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--muted);
  border: 1px solid var(--border);
}
.badge.soon { color: #8b949e; }
.badge.done {
  background: rgba(46, 160, 67, 0.15);
  color: #3fb950;
  border-color: rgba(46, 160, 67, 0.4);
}
.badge.wrong-badge {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
  border-color: rgba(248, 81, 73, 0.4);
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}
.panel h2, .panel h3 { margin: 0 0 12px; color: var(--text); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.btn {
  border: 1px solid rgba(240, 246, 252, 0.1);
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #238636;
  color: #e6edf3;
}
.btn:hover { background: #2ea043; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-soft {
  background: rgba(46, 160, 67, 0.15);
  color: #3fb950;
  border-color: rgba(46, 160, 67, 0.4);
}
.btn-ghost {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: #30363d; border-color: #6e7681; }
.btn-danger {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
  border-color: rgba(248, 81, 73, 0.4);
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.skill-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 17px 15px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  font-size: 1.08em;
  min-height: 96px;
  background: var(--bg-soft);
}
.skill-card:hover { border-color: #6e7681; background: #30363d; }
.skill-card small {
  display: block;
  margin-top: 8px;
  font-weight: 500;
  font-size: 0.92em;
  color: var(--muted);
}
.skill-listen { border-left: 3px solid #58a6ff; }
.skill-speak { border-left: 3px solid #d29922; }
.skill-read { border-left: 3px solid #3fb950; }
.skill-write { border-left: 3px solid #a371f7; }
.skill-input { border-left: 3px solid #f778ba; }
.skill-companion { border-left: 3px solid #39c5cf; }
.skill-card.locked {
  opacity: .5;
  cursor: not-allowed;
  border-left-color: #484f58;
}

.prompt-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
}
.prompt-en {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.25;
}
.prompt-zh { color: var(--muted); margin: 0 0 4px; }
.prompt-ipa {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
  margin: 0;
}
.ipa-tag, .word-meta .ipa, .accent-us {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 139, 253, 0.15);
  color: #58a6ff;
  border: 1px solid rgba(56, 139, 253, 0.4);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 1.2rem;
  font-weight: 650;
}

.choices { display: grid; gap: 8px; margin: 12px 0; }
.choice {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.choice:hover { border-color: #6e7681; background: #30363d; }
.choice.correct {
  background: rgba(46, 160, 67, 0.15);
  border-color: rgba(46, 160, 67, 0.5);
  color: #3fb950;
}
.choice.wrong {
  background: rgba(248, 81, 73, 0.15);
  border-color: rgba(248, 81, 73, 0.5);
  color: #f85149;
}

.input-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.input-row input, .input-row textarea {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
  background: #0d1117;
  color: var(--text);
}
.input-row input:focus, .input-row textarea:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(56, 139, 253, 0.25);
}

.feedback { border-radius: 8px; padding: 12px 14px; margin: 10px 0; border: 1px solid; }
.feedback.ok {
  background: rgba(46, 160, 67, 0.15);
  color: #3fb950;
  border-color: rgba(46, 160, 67, 0.4);
}
.feedback.bad {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
  border-color: rgba(248, 81, 73, 0.4);
}
.feedback.info {
  background: rgba(56, 139, 253, 0.15);
  color: #58a6ff;
  border-color: rgba(56, 139, 253, 0.4);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}
.pill-wrong {
  background: rgba(248, 81, 73, 0.15);
  border-color: rgba(248, 81, 73, 0.4);
  color: #f85149;
  font-weight: 650;
}

.word-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  margin: 4px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.word-chip:hover { border-color: #6e7681; }

.quiz-image, .reading-image {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  margin: 10px 0;
}
.progress-bar {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 16px;
  border: 1px solid var(--border);
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: #238636;
  width: 0;
  transition: width .2s;
}
.muted { color: var(--muted); }
.companion-panel {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.wrong-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wrong-meta .badge { margin-top: 0; }
.wrong-item .wrong-actions {
  display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.back-link {
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  background: none;
  border: none;
  font: inherit;
  padding: 0;
}
.back-link:hover { text-decoration: underline; }
.unit-list { display: grid; gap: 8px; }
.unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
}
.unit-row:hover { border-color: #6e7681; background: #1c2128; }
.score-chip {
  background: rgba(46, 160, 67, 0.15);
  color: #3fb950;
  border: 1px solid rgba(46, 160, 67, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 650;
}
.footer-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 28px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #161b22;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  z-index: 50;
  display: none;
}

/* grade cards — higher lift vs bg; 上/下册 hue split */
.card-emoji { font-size: 1.4rem; margin-bottom: 8px; }
.grade-card {
  color: #b1bac4;
  border: 1px solid #484f58;
  border-left-width: 4px;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(1, 4, 9, 0.4);
}
.grade-card:hover {
  transform: translateY(-1px);
  border-color: #6e7681;
  box-shadow: 0 8px 24px rgba(1, 4, 9, 0.55);
}
.grade-card h3 { color: #b1bac4; }
.grade-card p { color: #b1bac4; opacity: 1; }
.grade-card .badge {
  background: rgba(1, 4, 9, 0.4);
  color: #b1bac4;
  border: 1px solid rgba(240, 246, 252, 0.14);
}
.grade-card .badge.soon { color: #b1bac4; }
.grade-card.locked {
  opacity: 1;
  filter: none;
  /* still readable lift — not washed into bg */
  border-style: dashed;
  box-shadow: none;
}
.grade-card.locked:hover { transform: none; }
.grade-card.locked h3,
.grade-card.locked p { color: #b1bac4; }

.grade-preschool { border-left-color: #ff9bce; background: #4a2a3c; }
.grade-g1a { border-left-color: #ffa657; background: #4a3420; }
.grade-g1b { border-left-color: #ffd18a; background: #4a3c20; }
.grade-g2a { border-left-color: #7ee787; background: #244028; }
.grade-g2b { border-left-color: #56d364; background: #223c26; }
.grade-g3a { border-left-color: #39c5cf; background: #224048; }
.grade-g3b { border-left-color: #7ee7f0; background: #24444c; }
.grade-g4a { border-left-color: #58a6ff; background: #223850; }
.grade-g4b { border-left-color: #9cdcfe; background: #243c58; }
.grade-g5a { border-left-color: #a371f7; background: #342850; }
.grade-g5b { border-left-color: #d2a8ff; background: #3c2e58; }
.grade-g6a { border-left-color: #f778ba; background: #4a2a42; }
.grade-g6b { border-left-color: #ff9bce; background: #502e46; }
.grade-g7a { border-left-color: #ff7b72; background: #4a2a2a; }
.grade-g7b { border-left-color: #ffa198; background: #502e2e; }
.grade-g8a { border-left-color: #fb8500; background: #4a341c; }
.grade-g8b { border-left-color: #e3b341; background: #4a3c1c; }
.grade-g9a { border-left-color: #56d364; background: #244028; }
.grade-g9b { border-left-color: #3fb950; background: #203822; }
.grade-g10a { border-left-color: #39c5cf; background: #203e46; }
.grade-g10b { border-left-color: #388bfd; background: #203248; }
.grade-g11a { border-left-color: #a371f7; background: #302650; }
.grade-g11b { border-left-color: #bc8cff; background: #382a58; }
.grade-g12a { border-left-color: #db61a2; background: #4a2240; }
.grade-g12b { border-left-color: #f778ba; background: #502642; }

/* unit cards inside grade */
.unit-index {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b949e;
  margin-bottom: 8px;
}
.unit-card {
  color: #b1bac4;
  border: 1px solid #484f58;
  border-left-width: 4px;
  box-shadow: 0 4px 16px rgba(1, 4, 9, 0.4);
  text-align: left;
}
.unit-card:hover {
  transform: translateY(-1px);
  border-color: #6e7681;
}
.unit-card h3 { color: #b1bac4; }
.unit-card p { color: #b1bac4; opacity: 1; }
.unit-card .badge {
  background: rgba(1, 4, 9, 0.4);
  color: #b1bac4;
  border: 1px solid rgba(240, 246, 252, 0.14);
}
.unit-card.locked {
  opacity: 1;
  border-style: dashed;
  box-shadow: none;
}
.unit-card.locked h3,
.unit-card.locked p,
.unit-card.locked .unit-index { color: #b1bac4; }

.unit-tone-1 { border-left-color: #58a6ff; background: #223850; }
.unit-tone-2 { border-left-color: #3fb950; background: #223c26; }
.unit-tone-3 { border-left-color: #d29922; background: #4a3c20; }
.unit-tone-4 { border-left-color: #a371f7; background: #342850; }
.unit-tone-5 { border-left-color: #f778ba; background: #4a2a42; }
.unit-tone-6 { border-left-color: #39c5cf; background: #224048; }

/* grade page hero tinted by grade */
.grade-hero {
  border-left: 4px solid #58a6ff;
}
.grade-hero.grade-preschool { border-left-color: #ff9bce; background: #4a2a3c; }
.grade-hero.grade-g1a { border-left-color: #ffa657; background: #4a3420; }
.grade-hero.grade-g1b { border-left-color: #ffd18a; background: #4a3c20; }
.grade-hero.grade-g2a { border-left-color: #7ee787; background: #244028; }
.grade-hero.grade-g2b { border-left-color: #56d364; background: #223c26; }
.grade-hero.grade-g3a { border-left-color: #39c5cf; background: #224048; }
.grade-hero.grade-g3b { border-left-color: #7ee7f0; background: #24444c; }
.grade-hero.grade-g4a { border-left-color: #58a6ff; background: #223850; }
.grade-hero.grade-g4b { border-left-color: #9cdcfe; background: #243c58; }
.grade-hero.grade-g5a { border-left-color: #a371f7; background: #342850; }
.grade-hero.grade-g5b { border-left-color: #d2a8ff; background: #3c2e58; }
.grade-hero.grade-g6a { border-left-color: #f778ba; background: #4a2a42; }
.grade-hero.grade-g6b { border-left-color: #ff9bce; background: #502e46; }
.grade-hero.grade-g7a { border-left-color: #ff7b72; background: #4a2a2a; }
.grade-hero.grade-g7b { border-left-color: #ffa198; background: #502e2e; }
.grade-hero.grade-g8a { border-left-color: #fb8500; background: #4a341c; }
.grade-hero.grade-g8b { border-left-color: #e3b341; background: #4a3c1c; }
.grade-hero.grade-g9a { border-left-color: #56d364; background: #244028; }
.grade-hero.grade-g9b { border-left-color: #3fb950; background: #203822; }
.grade-hero.grade-g10a { border-left-color: #39c5cf; background: #203e46; }
.grade-hero.grade-g10b { border-left-color: #388bfd; background: #203248; }
.grade-hero.grade-g11a { border-left-color: #a371f7; background: #302650; }
.grade-hero.grade-g11b { border-left-color: #bc8cff; background: #382a58; }
.grade-hero.grade-g12a { border-left-color: #db61a2; background: #4a2240; }
.grade-hero.grade-g12b { border-left-color: #f778ba; background: #502642; }

/* word list large type */
.word-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.word-list-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.word-list-1 { grid-template-columns: 1fr; }
@media (max-width: 640px) {
  .word-list, .word-list-2 { grid-template-columns: 1fr; }
}
.word-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.word-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.word-en-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.word-en, .word-meta strong.word-en, .word-meta .word-en-row strong {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #c9d1d9;
}
.word-meta small {
  font-size: 1.05rem;
  color: var(--muted);
}
.word-en-row .btn-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1.25rem;
  border-radius: 10px;
}
.prompt-zh {
  font-size: 1.15rem;
}
.prompt-ipa {
  font-size: 1.35rem;
}


/* ipa large */
.prompt-ipa,
.word-meta .ipa,
.ipa-tag,
.accent-us,
.word-meta .prompt-ipa {
  font-size: 1.35rem !important;
  line-height: 1.4;
}
.ipa-tag, .accent-us {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 1.05rem !important;
}

/* reading article — 电子书护眼绿 */
.panel-reading {
  background: #5a8a5a; /* 再深一点点 */
  border: 1px solid #457045;
  color: #0a120a;
}
.panel-reading h2,
.panel-reading .word-en {
  color: #061006 !important;
}
.panel-reading .sub,
.panel-reading .gloss,
.panel-reading .word-meta small,
.panel-reading .section-title h2 {
  color: #152515 !important;
}
.panel-reading .word-item {
  background: rgba(255, 255, 255, 0.26);
  border-color: #457045;
}
.reading-box {
  font-size: 1.7rem;
  line-height: 1.65;
  font-weight: 550;
  color: #061006 !important;
  margin: 16px 0;
  padding: 20px 18px;
  background: #689868;
  border: 1px solid #507850;
  border-radius: 12px;
}
.reading-box .token {
  cursor: pointer;
  border-radius: 4px;
}
.reading-box .token:hover {
  background: rgba(8, 32, 8, 0.24);
  color: #010501;
}
.gloss {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 12px 0 0;
}
.panel > h2 {
  font-size: 1.55rem;
}


/* dim bright text */
:root {
  --text: #b1bac4;
  --muted: #8b949e;
}
.brand h1,
.hero h1, .hero h2,
.section-title h2,
.panel h2, .panel h3,
.card h3,
.unit-card h3,
.grade-card h3,
.prompt-en,
.word-en {
  color: #c9d1d9 !important;
}
/* reading-box color set in ebook-green block above */
.sub, .prompt-zh, .gloss, .muted, .footer-note,
.word-meta small, .unit-index {
  color: #8b949e !important;
}
.btn {
  color: #e6edf3;
}


/* speak prompt slightly smaller */
.speak-prompt .prompt-en {
  font-size: 2.35rem !important;
  line-height: 1.3;
}
.speak-prompt .prompt-ipa,
.speak-prompt .prompt-ipa .ipa,
.speak-prompt .prompt-ipa .ipa-tag,
.speak-prompt .ipa-tag {
  font-size: 1.3rem !important;
}

/* reading word thumbs — shrink 40% (keep 60%) */
.quiz-image-thumb {
  width: 51%;
  max-width: 119px;
  height: auto;
  max-height: 119px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  margin: 0;
  flex-shrink: 0;
}
.word-item:has(.quiz-image-thumb) {
  align-items: center;
  gap: 10px;
}

/* WeChat login gate */
.panel-login {
  max-width: 420px;
  margin: 48px auto;
  text-align: center;
  padding: 36px 28px;
}
.login-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: #238636;
  color: #e6edf3;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
  border: 1px solid #2ea043;
}
.panel-login h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  color: var(--text);
}
.btn-login {
  display: inline-flex;
  margin-top: 18px;
  min-width: 200px;
  justify-content: center;
  text-decoration: none;
}
.login-hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.login-warn {
  margin-top: 16px;
  color: #f85149;
  font-size: 0.95rem;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.88rem;
}
.user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.user-logout {
  color: var(--accent);
  text-decoration: none;
  margin-left: 4px;
}


.access-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  align-items: stretch;
}
.access-form input[type="password"] {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1rem;
}


.captcha-wrap { margin-top: 4px; text-align: left; }
.captcha-track {
  position: relative;
  height: 52px;
  border-radius: 12px;
  background: #15181f;
  border: 1px solid var(--border);
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.captcha-track.ok { border-color: #3fb950; box-shadow: 0 0 0 1px rgba(63, 185, 80, 0.35); }
.captcha-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 1px;
  background: rgba(63, 185, 80, 0.22);
  border-radius: 12px 0 0 12px;
  pointer-events: none;
  transform-origin: left center;
  transform: scaleX(40);
  will-change: transform;
}
.captcha-mark {
  position: absolute;
  top: 5px;
  bottom: 5px;
  width: 44px;
  box-sizing: border-box;
  border: 2px dashed #58a6ff;
  border-radius: 10px;
  background: rgba(88, 166, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.35), 0 0 12px rgba(88, 166, 255, 0.25);
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #79b8ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: center;
  padding: 0 2px;
}
.captcha-track.ok .captcha-mark {
  border-color: #3fb950;
  background: rgba(63, 185, 80, 0.2);
  color: #3fb950;
  box-shadow: inset 0 0 0 1px rgba(63, 185, 80, 0.35);
}
.captcha-thumb {
  position: absolute; left: 4px; top: 6px;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #238636;
  color: #e6edf3;
  display: grid; place-items: center;
  cursor: grab;
  font-size: 16px;
  font-weight: 800;
  touch-action: none;
  z-index: 2;
  border: 1px solid #2ea043;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  will-change: transform;
  backface-visibility: hidden;
}
.captcha-thumb:active { cursor: grabbing; }
.captcha-track.ok .captcha-thumb { background: #3fb950; }
.access-form input[type="text"],
.access-form input[type="password"] {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1rem;
}
