/* ============ 词光 · 一词一画  —  暖色手账插画风 ============ */
:root {
  /* 纸张暖米白底色 */
  --bg: #F5F1E8;
  --bg2: #EFE9DB;
  --paper: #FBF8F1;
  --panel: #FFFFFF;
  --panel2: #FBF7EF;
  --line: #E7DFCE;
  --line2: #F0E9DA;
  /* 文字：深棕近黑 */
  --text: #2B2620;
  --muted: #938A78;
  --muted2: #B6AC98;
  /* 强调：朱橙红（原项目选中标红/例句高亮） */
  --accent: #E0533B;
  --accent-soft: #FBE7E0;
  /* 墨蓝：标题与主按钮 */
  --ink: #2A4D8F;
  --ink-soft: #E7EDF7;
  /* 浅绿：CEFR 难度标签 */
  --green: #4E9A6B;
  --green-soft: #E4F1E8;
  /* 金：数字 */
  --gold: #C8902E;
  /* 词根词缀 */
  --pre: #2A6FB0;
  --root: #2B2620;
  --suf: #E0533B;
  --good: #3E9B6B;
  --bad: #D9534F;

  --serif: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --shadow: 0 6px 20px rgba(60, 50, 30, 0.08);
  --shadow-lg: 0 16px 50px rgba(60, 50, 30, 0.14);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 600px at 85% -5%, #FBF6EA 0%, rgba(251,246,234,0) 60%),
    radial-gradient(700px 500px at 0% 100%, #F1EADC 0%, rgba(241,234,220,0) 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 顶部品牌 + 导航 ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 6px; max-width: 1140px; margin: 0 auto;
}
.brand {
  font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 9px; letter-spacing: .5px;
}
.brand .logo {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #F3C969 45%, #E0533B 100%);
  box-shadow: 0 2px 8px rgba(224,83,59,.35); position: relative; flex: none;
}
.brand .logo::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 220deg, transparent 0 60%, rgba(255,255,255,.5) 75%, transparent 90%);
}
.brand span { font-size: 13px; color: var(--muted); font-weight: 400; font-family: var(--serif); font-style: italic; letter-spacing: .5px; }
.sub { color: var(--muted); font-size: 12px; }

.nav {
  display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;
  padding: 8px 12px; position: sticky; top: 0; z-index: 30;
  background: rgba(245,241,232,0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-btn {
  background: transparent; color: var(--muted); border: none;
  padding: 9px 16px; border-radius: 999px; font-size: 14px; cursor: pointer;
  transition: .2s; white-space: nowrap; font-family: var(--sans);
}
.nav-btn:hover { color: var(--text); background: var(--panel2); }
.nav-btn.active { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(224,83,59,.3); }

.view { max-width: 1140px; margin: 0 auto; padding: 18px 16px 70px; }

/* ===== 加载 ===== */
.loading { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 100; }
.load-inner { text-align: center; }
.load-spin { width: 44px; height: 44px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 14px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.load-text { font-family: var(--serif); font-size: 18px; }
.load-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.load-err { color: var(--bad); text-align: center; line-height: 1.7; padding: 20px; }

/* ===== 访问门（登录） ===== */
.gate {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 50% -10%, #fff8ec 0%, transparent 60%),
    linear-gradient(160deg, #f7f1e4 0%, #efe6d4 100%);
  padding: 20px;
}
.gate.hidden { display: none; }
.gate-card {
  width: min(380px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 34px 30px 26px;
  text-align: center;
}
.gate-brand { font-family: var(--serif); font-size: 24px; color: var(--ink); letter-spacing: 1px; }
.gate-brand span { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.gate-card h2 { font-family: var(--serif); font-weight: 700; font-size: 22px; margin: 14px 0 4px; color: var(--text); }
.gate-sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.gate-input {
  width: 100%; padding: 12px 15px; font-size: 15px; margin-top: 10px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel2);
  font-family: var(--sans); color: var(--text); outline: none; transition: border-color .15s;
  letter-spacing: normal; text-align: left;
}
.gate-input:focus { border-color: var(--accent); }
.gate-card > .gate-input:first-of-type { margin-top: 0; }
.gate-btn:disabled { opacity: .55; cursor: wait; }

/* 安全验证（后端签名算术题，一次性） */
.captcha-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.captcha-q {
  flex: 0 0 auto; min-width: 96px; padding: 11px 12px;
  font-family: var(--serif); font-size: 15px; letter-spacing: 1px; white-space: nowrap;
  color: var(--text); background: var(--panel2);
  border: 1px dashed var(--line); border-radius: 12px;
}
.gate-input.captcha-input { flex: 1 1 70px; width: auto; min-width: 0; margin: 0; padding: 11px 10px; font-size: 15px; text-align: center; }
.captcha-refresh {
  flex: 0 0 auto; border: none; background: transparent; color: var(--muted);
  font-size: 19px; line-height: 1; cursor: pointer; padding: 6px 9px; border-radius: 10px;
}
.captcha-refresh:hover { background: var(--panel2); color: var(--accent); }

/* 默认密码提醒横幅 */
.pw-banner {
  position: fixed; z-index: 180; left: 50%; transform: translateX(-50%); bottom: 76px;
  width: min(560px, 92vw); display: flex; align-items: center; gap: 12px;
  background: #FFF3E0; border: 1px solid #E9C89A; color: #7A4A17;
  border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-lg);
  font-size: 13px; line-height: 1.5;
}
.pw-banner span { flex: 1; }
.pw-banner b { color: var(--bad); }
.pw-banner-btn {
  flex: 0 0 auto; border: none; background: var(--accent); color: #fff;
  border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--sans);
}
.gate-btn {
  width: 100%; margin-top: 14px; padding: 13px; font-size: 16px; font-weight: 600;
  border: none; border-radius: 12px; background: var(--ink); color: #fff; cursor: pointer;
  font-family: var(--sans); transition: background .15s, transform .05s;
}
.gate-btn:hover { background: #23427c; }
.gate-btn:active { transform: scale(0.985); }
.gate-err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 10px; }
.gate-card.shake { animation: shake .4s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-7px); }
  40%,80% { transform: translateX(7px); }
}
.gate-hint { color: var(--muted2); font-size: 12px; margin-top: 14px; line-height: 1.6; }
.gate-hint b { color: var(--muted); }

/* ===== 通用按钮 ===== */
.big-btn {
  display: block; width: 100%; max-width: 440px; margin: 14px auto;
  background: var(--ink); color: #fff; border: none; padding: 15px;
  border-radius: 14px; font-size: 17px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 22px rgba(42,77,143,.28); font-family: var(--sans);
}
.big-btn:active { transform: scale(0.98); }
.mini-btn { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 4px 9px; cursor: pointer; font-size: 13px; }
.mini-btn:hover { background: var(--accent-soft); }
.act-btn { background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 11px; cursor: pointer; font-size: 14px; }
.act-btn:hover { background: var(--panel2); }
.act-btn.danger { border-color: #E6B7AE; color: var(--bad); }
.act-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== 图鉴 ===== */
.atlas-hero { margin: 4px 2px 16px; }
.atlas-hero .count { font-size: 13px; color: var(--muted); letter-spacing: 1px; }
.atlas-hero h1 { font-family: var(--serif); font-size: 34px; font-weight: 700; margin: 4px 0 6px; line-height: 1.2; }
.atlas-hero p { color: var(--muted); font-size: 14px; margin: 0; max-width: 560px; }

.filter-bar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-row .fr-label { font-size: 12px; color: var(--muted); width: 42px; flex: none; }
.search { flex: 1; min-width: 220px; background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 11px 15px; border-radius: 999px; font-size: 15px; font-family: var(--sans); box-shadow: var(--shadow); }
.search:focus { outline: none; border-color: var(--accent); }
.sel { background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 9px 12px; border-radius: 999px; font-size: 13px; font-family: var(--sans); cursor: pointer; }
/* 胶囊筛选 */
.pill { background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 7px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; transition: .15s; }
.pill:hover { color: var(--text); }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.tile { position: relative; background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; cursor: pointer; transition: .2s; box-shadow: var(--shadow); }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.tile-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg2); display: block; }
.tile-cap { padding: 9px 11px 11px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tile-cap b { font-family: var(--serif); font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-cap .zh { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60px; }
.status-dot { position: absolute; top: 9px; right: 9px; width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.status-dot.new { background: #CDBFA3; }
.status-dot.learning { background: var(--accent); }
.status-dot.mastered { background: var(--green); }
.tile-fav { position: absolute; top: 7px; left: 9px; color: var(--gold); font-size: 15px; text-shadow: 0 1px 3px rgba(255,255,255,.9); }
.more-btn { display: block; margin: 20px auto 4px; background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 11px 28px; border-radius: 999px; cursor: pointer; font-family: var(--sans); }
.more-btn:hover { background: var(--panel2); }
.grid-note { text-align: center; color: var(--muted); grid-column: 1/-1; padding: 12px; font-size: 13px; }
.empty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 50px; }

/* ===== 词卡弹窗（暖白手账风） ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(43,38,32,0.42); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.modal-overlay.show { display: flex; }
.modal-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; max-width: 540px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 0; position: relative; box-shadow: var(--shadow-lg); }
.modal-panel.wide { max-width: 560px; }
.modal-close { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.85); border: 1px solid var(--line); color: var(--text); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; z-index: 2; line-height: 1; }
.modal-close:hover { background: #fff; }

.word-card { padding: 18px 20px 22px; }
.wc-media { width: 100%; aspect-ratio: 1.5; border-radius: 16px; overflow: hidden; background: var(--bg2); margin-bottom: 14px; }
.wc-img { width: 100%; height: 100%; object-fit: cover; }
.wc-img-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 84px; font-weight: 800; color: #fff; background: linear-gradient(135deg,#E9A23B,#E0533B); font-family: var(--serif); }

.wc-toprow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wc-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.tag.cefr { background: var(--green-soft); color: var(--green); }
.tag.topic { background: #F3ECDD; color: #9A8460; }
.wc-actions { display: flex; gap: 6px; }
.icon-btn { background: var(--panel); border: 1px solid var(--line); color: var(--muted); width: 34px; height: 34px; border-radius: 50%; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { color: var(--text); }
.icon-btn.on { color: var(--gold); border-color: var(--gold); }

.wc-no { display: flex; align-items: center; gap: 10px; color: var(--muted2); font-size: 11px; letter-spacing: 2px; margin-bottom: 4px; font-family: var(--serif); }
.wc-no::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.wc-title h2 { font-family: var(--serif); margin: 0; font-size: 40px; line-height: 1; text-transform: lowercase; font-weight: 700; color: var(--text); }
.wc-ipa { display: flex; gap: 10px; margin: 12px 0 6px; flex-wrap: wrap; }
.ipa-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 13px; color: var(--muted); }
.ipa-pill em { color: var(--text); font-style: normal; font-family: var(--serif); }
.ipa-pill .mini-btn { border: none; background: var(--accent-soft); color: var(--accent); padding: 2px 7px; border-radius: 8px; }

.wc-morpheme { margin: 12px 0; font-size: 19px; letter-spacing: 1px; font-family: var(--serif); }
.mm { padding: 1px 3px; border-radius: 5px; cursor: help; }
.mm-pre { color: var(--pre); }
.mm-root { color: var(--root); font-weight: 700; }
.mm-suf { color: var(--suf); }
.mm-sep { color: var(--muted2); margin: 0 3px; font-size: 13px; }

.wc-senses { margin: 12px 0; }
.sense { display: flex; gap: 9px; flex-wrap: wrap; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.pos { color: var(--accent); font-size: 12px; font-style: italic; min-width: 26px; font-weight: 700; }
.zh { font-weight: 600; font-size: 15px; }
.en { color: var(--muted); font-size: 13px; }

.wc-examples { margin: 14px 0; }
.example { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.ex-tag { font-size: 11px; color: var(--accent); margin-bottom: 2px; font-weight: 600; letter-spacing: .5px; }
.ex-en { font-family: var(--serif); font-size: 16px; line-height: 1.7; color: var(--text); }
.ex-en .hl { color: var(--accent); border-bottom: 2px solid var(--accent); font-weight: 700; }
.ex-zh { color: var(--muted); font-size: 13px; margin-top: 5px; }

.wc-label { font-size: 12px; color: var(--muted); margin: 14px 0 6px; letter-spacing: 1px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px; font-size: 13px; }
.chip i { color: var(--muted); font-style: normal; font-size: 12px; }
.chip.small { font-size: 12px; padding: 3px 8px; }
.rel-key { color: var(--accent); font-size: 12px; margin-right: 5px; font-weight: 600; }
.wc-tip { background: #FCF3E9; border-left: 3px solid var(--gold); border-radius: 8px; padding: 10px 12px; margin-top: 12px; font-size: 13px; line-height: 1.7; color: #6B5A3E; }

/* 生词联动 */
.link-word { color: var(--ink); cursor: pointer; border-bottom: 1px dashed var(--ink); font-weight: 600; }
.link-word:hover { background: var(--ink-soft); }

/* ===== 学习 / 今日 ===== */
.study-hero { text-align: center; margin-bottom: 18px; }
.study-hero .greet { font-family: var(--serif); font-size: 30px; font-weight: 700; margin: 6px 0; }
.study-hero .date { color: var(--muted); font-size: 13px; }
.hero-stats { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.hs { background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; padding: 14px 20px; min-width: 84px; box-shadow: var(--shadow); }
.hs b { display: block; font-size: 26px; color: var(--accent); font-family: var(--serif); }
.hs span { font-size: 12px; color: var(--muted); }
.study-hint { color: var(--muted); font-size: 13px; line-height: 1.7; text-align: center; max-width: 540px; margin: 14px auto; }

.journey-card { background: linear-gradient(135deg, var(--ink) 0%, #3A63A8 100%); color: #fff; border-radius: 20px; padding: 20px; margin: 0 auto 18px; max-width: 560px; box-shadow: 0 12px 30px rgba(42,77,143,.3); position: relative; overflow: hidden; }
.journey-card::after { content: "✦"; position: absolute; right: -10px; top: -10px; font-size: 120px; color: rgba(255,255,255,.06); }
.journey-card .jl { font-size: 12px; opacity: .8; letter-spacing: 1px; }
.journey-card .jn { font-family: var(--serif); font-size: 30px; font-weight: 700; margin: 6px 0; }
.journey-card .jn b { color: #F3C969; }
.journey-card .jd { font-size: 13px; opacity: .85; }
.journey-thumbs { display: flex; gap: 8px; margin-top: 14px; }
.journey-thumbs img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; border: 2px solid rgba(255,255,255,.4); background: rgba(255,255,255,.1); }
.journey-thumbs .jt-txt { font-size: 12px; opacity: .8; align-self: center; margin-left: 4px; }

.session { max-width: 560px; margin: 0 auto; }
.sess-progress { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.learn-card { background: var(--panel); border: 1px solid var(--line2); border-radius: 20px; padding: 18px; text-align: center; box-shadow: var(--shadow); }
.learn-img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 14px; background: var(--bg2); margin-bottom: 12px; }
.learn-title { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.learn-title h3 { font-family: var(--serif); margin: 0; font-size: 30px; text-transform: lowercase; }
.learn-sense { color: var(--muted); font-size: 15px; margin: 4px 0 14px; }
.test { background: var(--panel); border: 1px solid var(--line2); border-radius: 20px; padding: 18px; margin-top: 14px; box-shadow: var(--shadow); }
.test-q { font-size: 17px; line-height: 1.6; margin-bottom: 14px; text-align: center; }
.cloze-q { font-family: var(--serif); font-size: 19px; }
.cloze-q .blank { color: var(--accent); border-bottom: 2px solid var(--accent); padding: 0 6px; }
.cloze-img, .learn-img { max-width: 100%; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.choice { background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 15px; border-radius: 13px; font-size: 16px; text-transform: lowercase; cursor: pointer; transition: .15s; font-family: var(--serif); }
.choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.choice.ok { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.choice.bad { background: #FBE9E7; border-color: var(--bad); color: var(--bad); }
.choice:disabled { cursor: default; }
.listen-btn { display: block; margin: 0 auto 14px; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent); padding: 12px 24px; border-radius: 13px; font-size: 15px; cursor: pointer; font-family: var(--sans); }
.spell-input { width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 15px; border-radius: 13px; font-size: 19px; text-align: center; text-transform: lowercase; margin-bottom: 12px; font-family: var(--serif); }
.spell-input:focus { outline: none; border-color: var(--accent); }
.grade-row { display: flex; gap: 8px; margin-top: 14px; }
.grade-btn { flex: 1; padding: 12px 4px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); cursor: pointer; font-size: 14px; font-family: var(--sans); }
.grade-btn.bad { color: var(--bad); border-color: #E6B7AE; }
.grade-btn.good { color: var(--good); border-color: #BFE0CB; }
.grade-btn.recommend { outline: 2px solid var(--accent); }
.grade-tip { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }
.spell-fb { text-align: center; margin-top: 8px; font-weight: 700; font-family: var(--sans); }
.spell-fb.ok { color: var(--good); }
.spell-fb.bad { color: var(--bad); }
.session-done { text-align: center; padding: 40px 10px; }
.done-emoji { font-size: 60px; }
.done-sub { color: var(--muted); }

/* ===== 星图（保持暗色宇宙风） ===== */
.stars { position: relative; }
.starcanvas { width: 100%; height: 70vh; min-height: 440px; border-radius: 18px; border: 1px solid var(--line); display: block; cursor: grab; touch-action: none; box-shadow: var(--shadow); }
.starcanvas:active { cursor: grabbing; }
.star-legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 14px; color: var(--muted); font-size: 13px; align-items: center; }
.star-legend i.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot.new { background: #CDBFA3; }
.dot.learning { background: var(--accent); }
.dot.mastered { background: #fff; }
.dot.fav { background: var(--gold); }
.star-count { color: var(--accent); margin-left: 6px; font-weight: 600; }
.star-tip { text-align: center; color: var(--muted); font-size: 12px; margin-top: 6px; }

/* ===== 成就 ===== */
.achv-head { text-align: center; margin-bottom: 16px; }
.achv-head h2 { font-family: var(--serif); font-size: 26px; margin: 0 0 4px; }
.achv-head p { color: var(--muted); font-size: 14px; }
.achv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 13px; }
.achv-card { background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.achv-card.off { opacity: 0.6; filter: grayscale(0.7); }
.achv-icon { font-size: 34px; margin-bottom: 6px; }
.achv-name { font-weight: 700; font-size: 15px; font-family: var(--serif); }
.achv-desc { color: var(--muted); font-size: 12px; margin: 4px 0 10px; min-height: 30px; }
.achv-bar { height: 7px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.achv-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.achv-prog { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* ===== 我的 ===== */
.me-head { text-align: center; }
.me-head h2 { font-family: var(--serif); font-size: 26px; margin: 0 0 4px; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 14px 0; }
.ms { background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; padding: 15px; text-align: center; box-shadow: var(--shadow); }
.ms b { display: block; font-size: 24px; color: var(--accent); font-family: var(--serif); }
.ms span { font-size: 12px; color: var(--muted); }
.me-settings, .me-data, .me-about { background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.me-settings h3, .me-data h3, .me-about h3 { margin: 0 0 12px; font-size: 17px; font-family: var(--serif); }
.set-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line); gap: 12px; }
.set-row input[type=range] { flex: 1; max-width: 200px; accent-color: var(--accent); }
.set-row input[type=number], .set-row select { background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 8px 10px; border-radius: 9px; }
.me-about p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 6px 0; }
.me-about b { color: var(--text); }

/* ===== Toast ===== */
#toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%) translateY(20px); background: rgba(43,38,32,0.94); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .3s; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-icon { margin-right: 6px; }

@media (max-width: 560px) {
  .atlas-hero h1 { font-size: 27px; }
  .wc-title h2 { font-size: 32px; }
  .choice-row { grid-template-columns: 1fr; }
  .me-stats { grid-template-columns: repeat(2, 1fr); }
  .nav-btn { padding: 8px 12px; font-size: 13px; }
  .brand span { display: none; }
  .topbar { padding: 12px 14px 4px; }
}

/* ===== 用户管理 / 账号 ===== */
.gate-input { display: block; }
.users-tip { color: var(--muted); font-size: 13px; margin: 6px 0 14px; line-height: 1.6; }
.user-form { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.user-form h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 17px; }
.uf-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.uf-row .gate-input { flex: 1 1 140px; margin: 0; padding: 10px 12px; }
.uf-row select { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel2); font-family: var(--sans); color: var(--text); }
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-row { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.user-row .un { font-weight: 600; font-family: var(--sans); }
.user-row .ua { color: var(--muted2); font-size: 12px; margin-left: auto; }
.user-row .role { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.user-row .role.admin { background: #FCEBDD; color: var(--accent); }
.user-row .role.user { background: var(--ink-soft); color: var(--ink); }
.pwd-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.pwd-form .gate-input.sm { width: auto; display: inline-block; margin: 0; padding: 9px 11px; font-size: 14px; flex: 1 1 120px; }
.acc-line { margin: 0 0 4px; }
.acc-line .role { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.acc-line .role.admin { background: #FCEBDD; color: var(--accent); }
.acc-line .role.user { background: var(--ink-soft); color: var(--ink); }
.acc-warn { color: var(--bad); font-size: 13px; margin: 2px 0 6px; }
.big-btn.sm { padding: 10px 16px; font-size: 14px; flex: 0 0 auto; }
.mini-btn.danger { color: var(--bad); border-color: #E6B7AE; }
