/* =========================================================
   德语单词记忆助手 · Premium PWA
   视觉方向：德式克制 / 纸张感 / 清晰学习仪表盘
   ========================================================= */
:root{
  --primary:#1d4b40!important;
  --primary-dark:#173c33!important;
  --accent:#b98a3e!important;
  --bg:#f3efe5!important;
  --card:#fbf9f3!important;
  --text:#14211c!important;
  --muted:#737a73!important;
  --line:rgba(20,33,28,.12)!important;
  --success:#4f866f!important;
  --danger:#a45d4e!important;
  --forest:#1d4b40;
  --forest-2:#2e6658;
  --paper:#f3efe5;
  --paper-2:#ebe6da;
  --surface:#fbf9f3;
  --ink:#14211c;
  --ink-muted:#737a73;
  --sage:#9fb4a3;
  --sage-soft:#dce5dc;
  --gold:#b98a3e;
  --gold-soft:#eadcc2;
  --rust:#a45d4e;
  --shadow:0 16px 40px rgba(35,43,36,.08);
  --line-strong:rgba(20,33,28,.18);
  --radius-lg:22px;
  --radius-md:15px;
  --radius-sm:11px;
}
*{box-sizing:border-box}
html{background:var(--paper)!important;scroll-behavior:smooth}
body{
  margin:0!important;
  min-height:100vh!important;
  color:var(--ink)!important;
  background:
    radial-gradient(circle at 90% -8%,rgba(159,180,163,.22),transparent 28%),
    radial-gradient(circle at -10% 40%,rgba(185,138,62,.08),transparent 22%),
    var(--paper)!important;
  font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",system-ui,sans-serif!important;
  font-size:14px!important;
  line-height:1.55!important;
  letter-spacing:.01em!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:geometricPrecision;
}
body::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;opacity:.22;
  background-image:linear-gradient(rgba(20,33,28,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(20,33,28,.018) 1px,transparent 1px);
  background-size:32px 32px;
  mask-image:linear-gradient(to bottom,black,transparent 80%);
}
[hidden]{display:none!important}
button,input,select,textarea{font:inherit}
button{-webkit-tap-highlight-color:transparent}
.serif{font-family:Georgia,"Noto Serif SC",serif}
::selection{background:var(--gold-soft);color:var(--ink)}

/* ---------- 顶部栏 ---------- */
.app-header{display:none!important}
.premium-header{
  position:sticky;top:0;z-index:80;
  padding:calc(10px + env(safe-area-inset-top)) 16px 10px;
  background:rgba(243,239,229,.88);
  border-bottom:1px solid rgba(20,33,28,.09);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.premium-header-inner{max-width:720px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.premium-brand{min-width:0}
.premium-eyebrow{font:700 8.5px/1.2 Georgia,serif;letter-spacing:.16em;color:var(--gold);text-transform:uppercase}
.premium-brand h1{font:500 21px/1.25 Georgia,"Noto Serif SC",serif;margin:5px 0 0;letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.premium-date{margin:4px 0 0;color:#858b84;font-size:9px;letter-spacing:.04em}
.premium-settings{display:flex;align-items:center}
.premium-settings .settings-btn{width:36px;height:36px;border-radius:50%!important;background:rgba(255,255,255,.58)!important;border:1px solid rgba(20,33,28,.12)!important;color:var(--forest)!important;font-size:0!important;display:grid!important;place-items:center!important;box-shadow:none!important}
.premium-settings .settings-btn::before{content:"";width:16px;height:16px;display:block;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 7h16M7 3v8M17 12v9M12 4v16M4 17h16'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 7h16M7 3v8M17 12v9M12 4v16M4 17h16'/%3E%3C/svg%3E") center/contain no-repeat}
.premium-stat-slot{grid-column:1/-1}
.header-stats{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:7px!important;width:100%;max-width:none!important}
.hs-item{height:42px;border:1px solid rgba(20,33,28,.09);border-radius:13px;background:rgba(255,255,255,.43);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0}
.hs-num{font:500 18px/1 Georgia,serif!important;color:var(--ink)!important;display:block!important}
.hs-label{font-size:7.5px!important;color:#858b84!important;opacity:1!important;letter-spacing:.05em}
.hs-item:first-child .hs-num{color:var(--forest)!important}
.hs-item:first-child{border-color:rgba(185,138,62,.28);background:rgba(234,220,194,.34)}

/* ---------- 底部导航 ---------- */
.tabs{
  position:fixed!important;left:50%!important;right:auto!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;
  transform:translateX(-50%)!important;z-index:100!important;
  width:min(680px,calc(100vw - 20px))!important;height:66px!important;
  margin:0!important;padding:6px!important;display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:3px!important;
  background:rgba(251,249,243,.93)!important;border:1px solid rgba(20,33,28,.11)!important;border-radius:21px!important;
  box-shadow:0 16px 42px rgba(28,39,32,.18)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)
}
.tab{
  position:relative!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;
  min-height:52px!important;padding:6px 2px 3px!important;border:0!important;border-radius:16px!important;
  background:transparent!important;box-shadow:none!important;color:#8d938d!important;
  font-size:8.5px!important;font-weight:700!important;letter-spacing:.04em!important;cursor:pointer!important
}
.tab svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tab.active{background:rgba(220,229,220,.68)!important;color:var(--forest)!important;box-shadow:none!important}
.tab.active::after{content:"";position:absolute;top:3px;width:18px;height:2px;border-radius:999px;background:var(--gold)}
.tab.premium-settings-tab.is-open{background:rgba(220,229,220,.68)!important;color:var(--forest)!important}
.tab.premium-settings-tab.is-open::after{content:"";position:absolute;top:3px;width:18px;height:2px;border-radius:999px;background:var(--gold)}

/* ---------- 主布局 ---------- */
main{max-width:720px!important;margin:0 auto!important;padding:18px 16px calc(106px + env(safe-area-inset-bottom))!important;background:transparent!important}
.view{padding-top:0!important;animation:premium-rise .34s cubic-bezier(.22,.8,.3,1) both}
footer{display:none!important}
@keyframes premium-rise{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.view{animation:none!important}}

/* ---------- 通用按钮与面板 ---------- */
.btn{
  min-height:42px!important;padding:10px 16px!important;border-radius:13px!important;
  border:1px solid transparent!important;box-shadow:none!important;font-size:12px!important;font-weight:700!important;
  letter-spacing:.015em;transition:transform .15s,background .15s,border-color .15s!important
}
.btn:hover{transform:translateY(-1px)!important;box-shadow:none!important}
.btn:active{transform:scale(.975)!important}
.btn.big{min-height:48px!important;padding:12px 22px!important;font-size:13px!important}
.btn.small{min-height:36px!important;padding:8px 12px!important;font-size:11px!important}
.btn-primary{background:var(--forest)!important;color:#fff!important;border-color:var(--forest)!important}
.btn-primary:hover{background:var(--forest-2)!important}
.btn-outline{background:rgba(255,255,255,.54)!important;color:var(--forest)!important;border-color:rgba(20,33,28,.13)!important}
.btn-outline:hover{background:rgba(220,229,220,.55)!important;border-color:rgba(29,75,64,.22)!important}
.btn-ghost{background:transparent!important;color:#727a73!important;border-color:transparent!important}
.btn-ghost:hover{background:rgba(20,33,28,.05)!important}
.btn-danger-ghost{background:rgba(255,255,255,.45)!important;color:var(--rust)!important;border-color:rgba(164,93,78,.24)!important;margin-top:18px!important}
.panel,.stat-card,.goal-card,.checkin-card,.word-item,.toolbar,.sel-bar{
  background:rgba(251,249,243,.82)!important;border:1px solid rgba(20,33,28,.10)!important;box-shadow:var(--shadow)!important;backdrop-filter:blur(8px)
}
.panel{border-radius:19px!important;padding:18px!important;margin-top:12px!important}
.panel h3{font-size:13px!important;line-height:1.4!important;color:var(--ink)!important;font-weight:700!important;letter-spacing:.025em!important;margin:0 0 13px!important}
.panel-sub{color:#7f867f!important;font-size:10.5px!important;line-height:1.65!important}
.progress-wrap{height:6px!important;background:#dfddd4!important;border-radius:999px!important;overflow:hidden!important}
.progress-fill{background:linear-gradient(90deg,var(--forest),#6d9687)!important;border-radius:999px!important;transition:width .45s cubic-bezier(.22,.8,.3,1)!important}
.empty{padding:28px 16px!important;text-align:center;color:#8b918b!important;font-size:11px!important;border:1px dashed rgba(20,33,28,.14);border-radius:15px;background:rgba(255,255,255,.30)}

/* ---------- 今日首页 ---------- */
#view-review{padding-top:0!important}
.home-card{
  position:relative!important;overflow:hidden!important;text-align:center!important;
  padding:25px 20px 20px!important;border-radius:24px!important;border:1px solid rgba(255,255,255,.08)!important;
  background:var(--forest)!important;color:#f8f5ec!important;box-shadow:0 18px 44px rgba(29,75,64,.20)!important
}
.home-card::before{content:"";position:absolute;width:235px;height:235px;border:1px solid rgba(255,255,255,.11);border-radius:50%;right:-116px;top:-102px;pointer-events:none}
.home-card::after{content:"";position:absolute;width:138px;height:138px;border:1px solid rgba(255,255,255,.07);border-radius:50%;right:-32px;top:-26px;pointer-events:none}
.home-card>*{position:relative;z-index:1}
.home-icon{
  width:104px!important;height:104px!important;margin:0 auto 17px!important;
  display:grid!important;place-items:center!important;border-radius:50%!important;
  background:rgba(255,255,255,.055)!important;border:1px solid rgba(255,255,255,.15)!important;
  color:#f1cc80!important;font:500 34px/1 Georgia,serif!important;letter-spacing:-.02em
}
.home-icon::after{content:"DUE";position:absolute;margin-top:49px;font:700 7px/1 Georgia,serif;letter-spacing:.15em;color:#b9cbc3}
.home-card h2{font:500 25px/1.25 Georgia,"Noto Serif SC",serif!important;color:#fbf8f0!important;margin:0!important;letter-spacing:-.025em}
.home-card>p{color:#c3d2cb!important;font-size:11px!important;line-height:1.7!important;margin:9px auto 18px!important;max-width:340px!important}
.home-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;margin-top:4px}
.home-actions .btn{width:100%!important}
.home-card .btn-primary{background:#f6f2e7!important;color:var(--forest)!important;border-color:#f6f2e7!important}
.home-card .btn-outline{background:rgba(255,255,255,.07)!important;color:#e6eee9!important;border-color:rgba(255,255,255,.18)!important}
.home-card .btn-ghost{color:#cbd8d1!important;border-color:rgba(255,255,255,.12)!important;background:transparent!important}
.direction-row{display:grid!important;grid-template-columns:58px 1fr!important;align-items:center!important;gap:9px!important;margin-top:14px!important;padding-top:13px!important;border-top:1px solid rgba(255,255,255,.10)!important;text-align:left}
.direction-label{font-size:8.5px!important;color:#aebfb7!important;letter-spacing:.08em;font-weight:700}
.seg{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:1fr!important;gap:4px!important;background:rgba(255,255,255,.07)!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:11px!important;padding:3px!important;overflow:hidden}
.seg-btn{min-height:30px!important;padding:5px 4px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#b9c9c1!important;font-size:8.5px!important;font-weight:700!important;white-space:nowrap}
.seg-btn.active{background:rgba(244,238,224,.94)!important;color:var(--forest)!important;box-shadow:none!important}
.reminder-banner,.backup-banner{margin-top:10px!important;padding:12px 13px!important;border-radius:14px!important;font-size:10.5px!important;line-height:1.60!important}
.reminder-banner{background:#f2e3d9!important;border:1px solid rgba(164,93,78,.15)!important;color:#7d4e43!important}
.backup-banner{background:rgba(220,229,220,.72)!important;border:1px solid rgba(29,75,64,.12)!important;color:var(--forest)!important}
.goal-card{display:grid!important;grid-template-columns:1fr 108px!important;align-items:center!important;gap:12px!important;margin-top:11px!important;padding:15px!important;border-radius:17px!important}
.goal-left{display:flex!important;align-items:center!important;gap:10px!important;min-width:0}
.goal-icon{width:38px!important;height:38px!important;border-radius:12px!important;background:var(--sage-soft)!important;color:var(--forest)!important;display:grid!important;place-items:center!important;font:500 13px/1 Georgia,serif!important}
.goal-title{font-size:11.5px!important;font-weight:700!important;color:var(--ink)!important}
.goal-sub{font-size:8.5px!important;color:#818881!important;margin-top:3px!important}
.goal-right{min-width:0!important}
.goal-progress{height:4px!important}
.goal-check{margin-top:7px!important;font-size:8.5px!important;color:var(--success)!important}
.checkin-card{display:flex!important;align-items:center!important;gap:11px!important;margin-top:11px!important;padding:14px!important;border-radius:17px!important;background:rgba(220,229,220,.62)!important}
.checkin-left{display:flex!important;align-items:center!important;gap:10px!important;min-width:0;flex:1}
.checkin-fire{width:38px!important;height:38px!important;border-radius:12px!important;background:rgba(255,255,255,.56)!important;color:var(--forest)!important;display:grid!important;place-items:center!important;font:500 11px/1 Georgia,serif!important}
.checkin-streak{font-size:11.5px!important;font-weight:700!important;color:var(--ink)!important}
.checkin-sub{font-size:8.5px!important;color:#7c877f!important;margin-top:3px!important}
.checkin-card .btn{min-width:92px!important}

/* ---------- 复习会话 ---------- */
#review-session{padding-top:2px!important}
.session-top{display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;gap:12px!important;margin-bottom:13px!important}
.session-top .progress-wrap{height:4px!important}
.session-count{font:500 10px/1 Georgia,serif!important;color:#707870!important;letter-spacing:.06em}
.word-card{
  margin-top:0!important;padding:29px 21px 24px!important;border-radius:23px!important;
  background:rgba(255,253,248,.92)!important;border:1px solid rgba(20,33,28,.11)!important;
  box-shadow:0 17px 42px rgba(44,50,41,.10)!important;text-align:center!important;overflow:hidden!important;position:relative
}
.word-card::before{content:"";position:absolute;width:150px;height:150px;border:1px solid rgba(185,138,62,.14);border-radius:50%;right:-70px;top:-76px;pointer-events:none}
.word-type{display:inline-flex!important;align-items:center!important;min-height:24px!important;padding:4px 10px!important;border-radius:999px!important;background:var(--sage-soft)!important;color:var(--forest)!important;font-size:8.5px!important;font-weight:700!important;letter-spacing:.07em!important}
.word-main{display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;gap:10px!important;margin-top:18px!important;text-align:left!important}
.word-text{font:500 38px/1.08 Georgia,"Noto Serif SC",serif!important;color:var(--ink)!important;letter-spacing:-.035em!important;word-break:break-word!important;margin:0!important;grid-column:1!important;grid-row:2!important;min-width:0}
.word-pos{grid-column:1!important;grid-row:1!important;justify-self:start!important;font-size:9px!important;padding:3px 8px!important;border-radius:7px!important;background:rgba(20,33,28,.055)!important;color:#727b74!important;font-weight:700!important}
.speak-btn{grid-column:2!important;grid-row:1/3!important;width:44px!important;height:44px!important;border-radius:50%!important;background:var(--sage-soft)!important;color:var(--forest)!important;font-size:0!important;display:grid!important;place-items:center!important;border:0!important;box-shadow:none!important}
.speak-btn::before{content:"♪";font:500 18px/1 Georgia,serif}
.leech-warn{margin-top:16px!important;padding:10px 12px!important;border-radius:11px!important;background:#f2e3d9!important;border:1px solid rgba(164,93,78,.14)!important;color:#804f43!important;font-size:9.5px!important;text-align:left!important}
.meaning-area{margin-top:21px!important;padding-top:18px!important;border-top:1px solid rgba(20,33,28,.11)!important;text-align:left!important}
.meaning-text{font-size:19px!important;line-height:1.45!important;color:var(--forest)!important;font-weight:700!important;letter-spacing:-.01em!important}
.example-block{margin-top:12px!important;padding:13px 14px!important;border-radius:13px!important;background:rgba(235,230,218,.60)!important;border:1px solid rgba(20,33,28,.07)!important;text-align:left!important}
.ex-de{font:italic 12.5px/1.55 Georgia,serif!important;color:#38443e!important}
.ex-zh{font-size:10px!important;color:#7b827b!important;margin-top:5px!important}
.action-area{margin-top:13px!important;display:block!important}
.action-area>.btn{width:100%!important}
.assess-row{display:grid!important;grid-template-columns:repeat(5,1fr)!important;gap:5px!important}
.assess{min-width:0!important;height:53px!important;padding:5px 1px!important;border:1px solid rgba(20,33,28,.10)!important;border-radius:13px!important;background:rgba(255,255,255,.50)!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important;font-size:8.5px!important;color:#56615a!important}
.assess::before{content:"";width:6px;height:6px;border-radius:50%;background:#a6aca6}
.assess.forgot::before{background:#a45d4e}.assess.hard::before{background:#b47b62}.assess.fuzzy::before{background:#bd913e}.assess.good::before{background:#67917d}.assess.perfect::before{background:var(--forest)}
.assess *{display:none!important}
.assess.forgot{color:#8e4f43!important}.assess.hard{color:#8f5e4c!important}.assess.fuzzy{color:#8c6a2e!important}.assess.good{color:#477261!important}.assess.perfect{color:var(--forest)!important}
.reveal-btn,.btn-reveal{width:100%!important}
.choice-row{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
.choice-btn{width:100%!important;background:rgba(255,255,255,.55)!important;border:1px solid rgba(20,33,28,.11)!important;color:var(--ink)!important;text-align:left!important;padding:13px 15px!important}
.choice-btn.choice-correct{background:var(--sage-soft)!important;border-color:rgba(29,75,64,.28)!important;color:var(--forest)!important}
.choice-btn.choice-wrong{background:#f2e3d9!important;border-color:rgba(164,93,78,.26)!important;color:#8f4e42!important}
.spell-row{display:grid!important;grid-template-columns:1fr auto!important;gap:7px!important}
.spell-input{min-width:0!important;height:47px!important;border:1px solid rgba(20,33,28,.14)!important;border-radius:13px!important;background:#fffdf8!important;padding:0 14px!important;color:var(--ink)!important;outline:none!important;font:500 14px Georgia,serif!important}
.spell-input:focus{border-color:var(--forest)!important;box-shadow:0 0 0 3px rgba(29,75,64,.07)!important}
.feedback{min-height:20px!important;margin-top:10px!important;text-align:center!important;font-size:10.5px!important;color:var(--forest)!important}

/* ---------- 词库 ---------- */
.toolbar{
  display:grid!important;grid-template-columns:46px repeat(6,minmax(0,1fr))!important;gap:4px!important;
  padding:11px!important;border-radius:19px!important;margin-bottom:12px!important;position:relative!important;align-items:center!important
}
.toolbar .search{grid-column:1/-1!important;height:42px!important;border-radius:12px!important;border:1px solid rgba(20,33,28,.11)!important;background:rgba(255,255,255,.62)!important;padding:0 13px!important;color:var(--ink)!important;font-size:11px!important;outline:none!important}
.toolbar .search:focus{border-color:var(--forest)!important;box-shadow:0 0 0 3px rgba(29,75,64,.06)!important}
.toolbar .filter{grid-column:auto!important;height:42px!important;border-radius:11px!important;border:1px solid rgba(20,33,28,.11)!important;background:rgba(255,255,255,.57)!important;padding:0 4px!important;color:var(--ink)!important;font-size:9px!important;outline:none!important;text-align:center!important}
.toolbar .btn{min-width:0!important;min-height:42px!important;height:42px!important;padding:0!important;font-size:0!important;white-space:nowrap!important;display:grid!important;place-items:center!important}
.toolbar .btn::before{font:500 16px/1 Georgia,serif!important;color:currentColor!important}
#btn-add-word::before{content:"+"!important;font-size:20px!important}
#btn-export::before{content:"↓"!important}
#import-file~*{}
#btn-import::before{content:"↑"!important}
#btn-batch-import::before{content:"≡"!important}
#btn-trash::before{content:"×"!important;font-size:18px!important}
.toolbar .select-all-label{grid-column:auto!important;display:flex!important;justify-content:center!important;align-items:center!important;min-height:42px!important;font-size:0!important;color:#7f867f!important;border:1px solid rgba(20,33,28,.09);border-radius:11px;background:rgba(255,255,255,.42)}
.toolbar .select-all-label input{width:15px!important;height:15px!important;margin:0!important}
.sel-bar{margin-bottom:10px!important;padding:11px 12px!important;border-radius:15px!important;display:grid!important;gap:9px!important}
.sel-actions{display:grid!important;grid-template-columns:repeat(2,1fr)!important;gap:6px!important}
.word-list{display:grid!important;gap:8px!important}
.word-item{
  position:relative!important;display:grid!important;grid-template-columns:28px minmax(0,1fr) auto!important;gap:9px!important;align-items:center!important;
  padding:13px 12px!important;border-radius:16px!important;border:1px solid rgba(20,33,28,.09)!important;box-shadow:none!important;transition:transform .15s,border-color .15s!important
}
.word-item:hover{transform:translateY(-1px)!important;border-color:rgba(29,75,64,.20)!important}
.word-check{padding:1px!important}
.word-check input{width:16px!important;height:16px!important;accent-color:var(--forest)!important}
.wi-main{min-width:0!important}
.wi-word{font:500 16px/1.18 Georgia,"Noto Serif SC",serif!important;color:var(--ink)!important;letter-spacing:-.015em!important;white-space:normal!important}
.pos-badge{display:inline-block!important;margin-left:6px!important;padding:2px 5px!important;border-radius:5px!important;background:rgba(20,33,28,.055)!important;color:#778079!important;font:700 7.5px/1.2 sans-serif!important;vertical-align:2px}
.wi-meaning{font-size:10.5px!important;color:#768078!important;margin-top:5px!important;line-height:1.5!important}
.wi-ex{font:italic 9px/1.45 Georgia,serif!important;color:#8d918c!important;margin-top:5px!important}
.leech-badge{margin-left:6px!important;padding:2px 6px!important;border-radius:999px!important;background:#f2e3d9!important;color:#8e5145!important;font-size:7.5px!important}
.leech-hint{font-size:8.5px!important;color:#a45d4e!important;margin-top:4px!important}
.wi-right{text-align:right!important;min-width:74px!important}
.wi-dots{display:flex!important;justify-content:flex-end!important;gap:2px!important;margin-bottom:6px!important}
.dot{width:4px!important;height:4px!important;border-radius:50%!important;background:#d7d6ce!important}.dot.filled{background:var(--forest)!important}
.wi-next{font-size:7.5px!important;color:#8b918b!important;white-space:nowrap!important}
.wi-actions{display:flex!important;justify-content:flex-end!important;gap:4px!important;margin-top:7px!important}
.wi-actions .icon-btn{width:26px!important;height:26px!important;border-radius:8px!important;background:rgba(20,33,28,.045)!important;color:#6d766f!important;font-size:0!important;padding:0!important;display:grid!important;place-items:center!important}
.wi-actions .icon-btn::before{font-size:12px!important;font-family:Georgia,serif!important}
.wi-actions [data-act="review"]::before{content:"↗"}.wi-actions [data-act="edit"]::before{content:"✎"}.wi-actions [data-act="reset"]::before{content:"↺"}.wi-actions [data-act="del"]::before{content:"×";font-size:16px!important}
.pager{margin-top:12px!important;display:flex!important;justify-content:center!important;gap:4px!important}
.pager-btn{min-width:32px!important;height:32px!important;border:1px solid rgba(20,33,28,.11)!important;border-radius:9px!important;background:rgba(255,255,255,.48)!important;color:#6e766f!important;font-size:9px!important}
.pager-btn.active{background:var(--forest)!important;border-color:var(--forest)!important;color:#fff!important}

/* ---------- 数据 ---------- */
.stat-cards{display:grid!important;grid-template-columns:repeat(2,1fr)!important;gap:9px!important;margin-bottom:1px!important}
.stat-card{padding:16px!important;border-radius:17px!important;text-align:left!important;position:relative;overflow:hidden}
.stat-card::after{content:"";position:absolute;width:54px;height:54px;border:1px solid rgba(29,75,64,.09);border-radius:50%;right:-25px;bottom:-27px}
.stat-num{font:500 27px/1 Georgia,serif!important;color:var(--forest)!important;background:none!important;-webkit-text-fill-color:currentColor!important}
.stat-label{font-size:9px!important;color:#7f8780!important;margin-top:7px!important;letter-spacing:.04em}
#stage-bars,#week-bars,#perf-grid,#checkin-summary,#week-dots,#weekly-report,#stubborn-list,#achievement-grid,#monthly-trend,#forget-curve{color:var(--ink)}
.wk-grid{display:grid!important;grid-template-columns:repeat(2,1fr)!important;gap:7px!important}
.wk-item{padding:12px!important;border:1px solid rgba(20,33,28,.08)!important;border-radius:13px!important;background:rgba(255,255,255,.44)!important;text-align:left!important}
.wk-label{font-size:8.5px!important;color:#858c85!important}.wk-value{font:500 20px/1 Georgia,serif!important;margin-top:5px!important}.wk-delta{font-size:8px!important;margin-top:5px!important}
.stubborn-head{display:none!important}
.stubborn-row{display:grid!important;grid-template-columns:22px minmax(0,1fr) 66px 48px!important;gap:6px!important;align-items:center!important;padding:10px 0!important;border-bottom:1px solid rgba(20,33,28,.07)!important}
.stubborn-rank{width:22px!important;height:22px!important;border-radius:7px!important;background:rgba(220,229,220,.72)!important;color:var(--forest)!important;font:600 9px Georgia,serif!important}
.stubborn-word{font:500 12px Georgia,serif!important;color:var(--ink)!important}.stubborn-mean{font-size:8px!important;color:#858b85!important}
.stubborn-forget,.stubborn-acc{font-size:8.5px!important}
.ach-grid{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:7px!important}
.ach-item{padding:11px 5px!important;border-radius:13px!important;background:rgba(255,255,255,.36)!important;border:1px solid rgba(20,33,28,.08)!important}
.ach-item.on{background:linear-gradient(145deg,rgba(220,229,220,.78),rgba(234,220,194,.35))!important;border-color:rgba(29,75,64,.17)!important}
.ach-icon{font-size:21px!important}.ach-name{font-size:9.5px!important}.ach-desc{font-size:7.5px!important}
.week-dots{gap:5px!important}.day-dot{width:24px!important;height:24px!important;border-radius:8px!important}.day-dot.on{background:var(--forest)!important;color:#fff!important}.day-label{font-size:7px!important}
.curve-svg{max-height:190px!important}
.panel .week-chart{min-height:140px!important}
.stat-card,.panel,#view-stats .btn-danger-ghost{margin-bottom:0!important}
#view-stats>.panel{margin-top:10px!important}

/* ---------- 弹窗与同步 ---------- */
.modal-overlay{background:rgba(16,25,21,.38)!important;backdrop-filter:blur(9px)!important;-webkit-backdrop-filter:blur(9px)!important;padding:14px!important}
.modal{
  width:min(620px,100%)!important;max-height:92vh!important;overflow:auto!important;padding:22px!important;
  border-radius:22px!important;border:1px solid rgba(255,255,255,.72)!important;background:rgba(250,248,242,.98)!important;
  box-shadow:0 26px 70px rgba(15,25,20,.28)!important;color:var(--ink)!important
}
.modal h3{font:500 21px/1.25 Georgia,"Noto Serif SC",serif!important;color:var(--ink)!important;margin:0 0 15px!important;letter-spacing:-.02em!important}
.modal label{display:block!important;font-size:9.5px!important;font-weight:700!important;color:#737b74!important;letter-spacing:.035em!important;margin:13px 0 6px!important}
.modal input:not([type="checkbox"]):not([type="file"]),.modal select,.modal textarea{
  width:100%!important;border:1px solid rgba(20,33,28,.13)!important;border-radius:12px!important;background:rgba(255,255,255,.66)!important;
  color:var(--ink)!important;padding:11px 12px!important;outline:none!important;font-size:11px!important
}
.modal input:focus,.modal select:focus,.modal textarea:focus{border-color:var(--forest)!important;box-shadow:0 0 0 3px rgba(29,75,64,.06)!important}
.modal textarea{min-height:130px!important;line-height:1.6!important}
.modal-actions{display:flex!important;gap:8px!important;justify-content:flex-end!important;margin-top:17px!important;flex-wrap:wrap!important}
.switch-row{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:10px 0!important;border-bottom:1px solid rgba(20,33,28,.08)!important}
.hint{font-size:9.5px!important;line-height:1.65!important;color:#7c847d!important;margin-top:10px!important}
.sync-modal{width:min(620px,100%)!important}.sync-modal input{background:rgba(255,255,255,.72)!important}.sync-modal h3{font-size:20px!important}
.sync-status{font-size:8px!important;padding:4px 8px!important;border-radius:999px!important;background:var(--sage-soft)!important;color:var(--forest)!important}
.sync-status.off{background:#eee5df!important;color:#9a6355!important}
.toast{left:50%!important;right:auto!important;bottom:calc(90px + env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;max-width:calc(100vw - 34px)!important;background:var(--forest)!important;color:#fff!important;border-radius:13px!important;padding:11px 14px!important;font-size:10.5px!important;box-shadow:0 12px 30px rgba(20,50,40,.26)!important;z-index:130!important}
.toast-action{background:rgba(255,255,255,.16)!important;border-radius:999px!important;font-size:9px!important;padding:4px 10px!important}

/* ---------- 安装与桌面体验 ---------- */
@media (display-mode:standalone){.premium-header{padding-top:calc(8px + env(safe-area-inset-top))}.tabs{bottom:calc(7px + env(safe-area-inset-bottom))}}
@media (max-width:430px){
  main{padding-left:14px!important;padding-right:14px!important}
  .premium-header{padding-left:14px;padding-right:14px}
  .premium-brand h1{font-size:19px}
  .home-card{padding-left:17px!important;padding-right:17px!important}
  .word-text{font-size:34px!important}
  .toolbar{grid-template-columns:46px repeat(6,minmax(0,1fr))!important}
  .wi-right{min-width:64px!important}
  .assess{height:50px!important;font-size:8px!important}
  .modal{padding:19px!important}
}
@media (min-width:700px){
  .stat-cards{grid-template-columns:repeat(4,1fr)!important}
  .ach-grid{grid-template-columns:repeat(4,1fr)!important}
  .wk-grid{grid-template-columns:repeat(4,1fr)!important}
  .modal-overlay{align-items:center!important}
  .modal{border-radius:24px!important}
}

/* ---------- 主题切换 ---------- */
.premium-actions{display:flex;align-items:center;gap:7px}
.theme-toggle,.premium-settings .settings-btn{
  width:36px!important;height:36px!important;border-radius:50%!important;background:rgba(255,255,255,.58)!important;
  border:1px solid rgba(20,33,28,.12)!important;color:var(--forest)!important;display:grid!important;place-items:center!important;
  padding:0!important;box-shadow:none!important;cursor:pointer!important;transition:background .2s,border-color .2s,color .2s,transform .15s
}
.theme-toggle:active,.premium-settings .settings-btn:active{transform:scale(.95)}
.theme-toggle svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-settings{margin:2px 0 8px!important;padding:13px 14px!important;border:1px solid rgba(20,33,28,.10)!important;border-radius:14px!important;background:rgba(255,255,255,.38)!important}
.theme-settings-head{display:flex;align-items:center;justify-content:space-between!important;gap:10px!important;margin:0!important;font-size:10px!important;font-weight:700!important;color:var(--ink)!important}
.theme-settings-head b{font-size:9px!important;color:var(--gold)!important;font-weight:700!important}
.theme-options{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:5px!important;margin-top:10px!important}
.theme-options button{height:34px!important;border:1px solid rgba(20,33,28,.10)!important;border-radius:10px!important;background:rgba(255,255,255,.50)!important;color:#69726b!important;font-size:9px!important;font-weight:700!important;cursor:pointer!important}
.theme-options button.active{background:var(--forest)!important;border-color:var(--forest)!important;color:#fff!important}
.theme-settings p{font-size:8.5px!important;line-height:1.55!important;color:#858d86!important;margin:9px 0 0!important}

/* ---------- 夜间模式 ---------- */
html[data-theme="dark"]{
  color-scheme:dark;
  --primary:#2b6c5b!important;
  --primary-dark:#7bb39e!important;
  --accent:#d1a557!important;
  --bg:#0f1512!important;
  --card:#18201b!important;
  --text:#edf1ec!important;
  --muted:#98a39b!important;
  --line:rgba(236,242,237,.11)!important;
  --success:#72ad92!important;
  --danger:#d08270!important;
  --forest:#2b6c5b!important;
  --forest-2:#367d69!important;
  --paper:#0f1512!important;
  --paper-2:#151d18!important;
  --surface:#18201b!important;
  --ink:#edf1ec!important;
  --ink-muted:#98a39b!important;
  --sage:#8da595!important;
  --sage-soft:#26372f!important;
  --gold:#d1a557!important;
  --gold-soft:#4a3b25!important;
  --rust:#ce7965!important;
  --shadow:0 17px 42px rgba(0,0,0,.24)!important;
  --line-strong:rgba(236,242,237,.17)!important;
}
html[data-theme="dark"] body{
  background:radial-gradient(circle at 88% -8%,rgba(68,112,91,.19),transparent 30%),radial-gradient(circle at -8% 40%,rgba(209,165,87,.07),transparent 24%),var(--paper)!important
}
html[data-theme="dark"] body::before{
  opacity:.18;background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px)
}
html[data-theme="dark"] .premium-header{background:rgba(15,21,18,.90)!important;border-bottom-color:rgba(236,242,237,.09)!important}
html[data-theme="dark"] .premium-brand h1{color:#eff3ee!important}
html[data-theme="dark"] .premium-date{color:#87928b!important}
html[data-theme="dark"] .theme-toggle,html[data-theme="dark"] .premium-settings .settings-btn{background:rgba(255,255,255,.05)!important;border-color:rgba(236,242,237,.13)!important;color:#c9ded4!important}
html[data-theme="dark"] .hs-item{background:rgba(255,255,255,.035)!important;border-color:rgba(236,242,237,.09)!important}
html[data-theme="dark"] .hs-item:first-child{background:rgba(209,165,87,.09)!important;border-color:rgba(209,165,87,.22)!important}
html[data-theme="dark"] .hs-num{color:#edf1ec!important}
html[data-theme="dark"] .hs-item:first-child .hs-num{color:#dfb76b!important}
html[data-theme="dark"] .hs-label{color:#929d95!important}
html[data-theme="dark"] .tabs{background:rgba(20,28,23,.94)!important;border-color:rgba(236,242,237,.11)!important;box-shadow:0 18px 46px rgba(0,0,0,.34)!important}
html[data-theme="dark"] .tab{color:#869189!important}
html[data-theme="dark"] .tab.active,html[data-theme="dark"] .tab.premium-settings-tab.is-open{background:rgba(55,88,73,.48)!important;color:#dcebe4!important}
html[data-theme="dark"] .panel,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .goal-card,html[data-theme="dark"] .checkin-card,html[data-theme="dark"] .word-item,html[data-theme="dark"] .toolbar,html[data-theme="dark"] .sel-bar{
  background:rgba(24,32,27,.90)!important;border-color:rgba(236,242,237,.10)!important;box-shadow:var(--shadow)!important
}
html[data-theme="dark"] .panel h3,html[data-theme="dark"] .stat-num,html[data-theme="dark"] .goal-title,html[data-theme="dark"] .checkin-streak{color:#edf1ec!important}
html[data-theme="dark"] .panel-sub,html[data-theme="dark"] .stat-label,html[data-theme="dark"] .goal-sub,html[data-theme="dark"] .checkin-sub{color:#98a39b!important}
html[data-theme="dark"] .empty{background:rgba(255,255,255,.025)!important;border-color:rgba(236,242,237,.13)!important;color:#919c94!important}
html[data-theme="dark"] .progress-wrap{background:#263029!important}
html[data-theme="dark"] .progress-fill{background:linear-gradient(90deg,#69a68f,#8bbca7)!important}
html[data-theme="dark"] .home-card{background:#1b4b3f!important;box-shadow:0 19px 48px rgba(0,0,0,.30)!important}
html[data-theme="dark"] .home-card .btn-primary{background:#f1ebdc!important;color:#173b32!important;border-color:#f1ebdc!important}
html[data-theme="dark"] .home-card .btn-outline{background:rgba(255,255,255,.055)!important;color:#e5eee9!important;border-color:rgba(255,255,255,.16)!important}
html[data-theme="dark"] .goal-card .goal-icon,html[data-theme="dark"] .checkin-card .checkin-fire{background:rgba(255,255,255,.06)!important;color:#d5e5dc!important}
html[data-theme="dark"] .word-card{background:#18201b!important;border-color:rgba(236,242,237,.11)!important;box-shadow:0 18px 46px rgba(0,0,0,.28)!important}
html[data-theme="dark"] .word-type{background:#26372f!important;color:#a8ccb9!important}
html[data-theme="dark"] .word-text{color:#f0f3ee!important}
html[data-theme="dark"] .word-pos{background:rgba(255,255,255,.07)!important;color:#aab4ad!important}
html[data-theme="dark"] .speak-btn{background:#26372f!important;color:#a9d0bd!important}
html[data-theme="dark"] .meaning-area{border-top-color:rgba(236,242,237,.11)!important}
html[data-theme="dark"] .meaning-text{color:#a9d2bf!important}
html[data-theme="dark"] .example-block{background:#202a24!important;border-color:rgba(236,242,237,.08)!important}
html[data-theme="dark"] .ex-de{color:#d9e1dc!important}
html[data-theme="dark"] .ex-zh{color:#99a59d!important}
html[data-theme="dark"] .assess{background:rgba(255,255,255,.04)!important;border-color:rgba(236,242,237,.10)!important}
html[data-theme="dark"] .choice-btn{background:#202a24!important;border-color:rgba(236,242,237,.11)!important;color:#edf1ec!important}
html[data-theme="dark"] .choice-btn:hover{background:#26352d!important}
html[data-theme="dark"] .choice-btn.choice-correct{background:#28483b!important;border-color:rgba(120,180,151,.30)!important;color:#c6ead8!important}
html[data-theme="dark"] .choice-btn.choice-wrong{background:#442b26!important;border-color:rgba(208,130,112,.30)!important;color:#f0baaa!important}
html[data-theme="dark"] .spell-input{background:#202a24!important;border-color:rgba(236,242,237,.13)!important;color:#edf1ec!important}
html[data-theme="dark"] .toolbar .search,html[data-theme="dark"] .toolbar .filter,html[data-theme="dark"] .toolbar .select-all-label{background:rgba(255,255,255,.045)!important;border-color:rgba(236,242,237,.10)!important;color:#edf1ec!important}
html[data-theme="dark"] .toolbar .search::placeholder{color:#7f8b83!important}
html[data-theme="dark"] .wi-word{color:#edf1ec!important}
html[data-theme="dark"] .wi-meaning,html[data-theme="dark"] .wi-ex,html[data-theme="dark"] .wi-next{color:#939f97!important}
html[data-theme="dark"] .pos-badge{background:rgba(255,255,255,.07)!important;color:#9daaa2!important}
html[data-theme="dark"] .wi-actions .icon-btn{background:rgba(255,255,255,.055)!important;color:#95a39a!important}
html[data-theme="dark"] .word-item.leech{background:#251b18!important;border-color:rgba(208,130,112,.34)!important}
html[data-theme="dark"] .leech-badge{background:#422b25!important;color:#e0a392!important}
html[data-theme="dark"] .pager-btn{background:rgba(255,255,255,.045)!important;border-color:rgba(236,242,237,.11)!important;color:#a3aca6!important}
html[data-theme="dark"] .pager-btn.active{background:#2b6c5b!important;border-color:#2b6c5b!important;color:#fff!important}
html[data-theme="dark"] .stat-card::after{ border-color:rgba(123,179,158,.13)!important}
html[data-theme="dark"] .wk-item,html[data-theme="dark"] .perf-item,html[data-theme="dark"] .setting-stats,html[data-theme="dark"] .sync-info{background:rgba(255,255,255,.035)!important;border-color:rgba(236,242,237,.08)!important;color:#e4ebe6!important}
html[data-theme="dark"] .day-dot{background:#263029!important;color:#76b596!important}
html[data-theme="dark"] .day-dot.on{background:#397662!important;color:#fff!important}
html[data-theme="dark"] .week-bar{background:linear-gradient(180deg,#79ad98,#397662)!important}
html[data-theme="dark"] .week-num,html[data-theme="dark"] .week-label,html[data-theme="dark"] .curve-legend{color:#98a39b!important}
html[data-theme="dark"] .curve-svg{filter:saturate(.82) brightness(1.16)}
html[data-theme="dark"] .ach-item{background:rgba(255,255,255,.025)!important;border-color:rgba(236,242,237,.08)!important}
html[data-theme="dark"] .ach-item.on{background:linear-gradient(145deg,#22372e,#332d20)!important;border-color:rgba(123,179,158,.20)!important}
html[data-theme="dark"] .modal-overlay{background:rgba(2,6,4,.64)!important}
html[data-theme="dark"] .modal{background:#18201b!important;border-color:rgba(236,242,237,.11)!important;box-shadow:0 28px 76px rgba(0,0,0,.52)!important}
html[data-theme="dark"] .modal h3{color:#edf1ec!important}
html[data-theme="dark"] .modal label,html[data-theme="dark"] .hint{color:#98a39b!important}
html[data-theme="dark"] .modal input:not([type="checkbox"]):not([type="file"]),html[data-theme="dark"] .modal select,html[data-theme="dark"] .modal textarea,html[data-theme="dark"] .sync-modal input{
  background:#202a24!important;border-color:rgba(236,242,237,.13)!important;color:#edf1ec!important
}
html[data-theme="dark"] .switch-row{border-bottom-color:rgba(236,242,237,.09)!important}
html[data-theme="dark"] .theme-settings{background:rgba(255,255,255,.035)!important;border-color:rgba(236,242,237,.10)!important}
html[data-theme="dark"] .theme-settings-head{color:#edf1ec!important}
html[data-theme="dark"] .theme-options button{background:rgba(255,255,255,.045)!important;border-color:rgba(236,242,237,.10)!important;color:#a2aea6!important}
html[data-theme="dark"] .theme-options button.active{background:#2b6c5b!important;border-color:#2b6c5b!important;color:#fff!important}
html[data-theme="dark"] .theme-settings p{color:#87938b!important}
html[data-theme="dark"] .toast{background:#d4e7de!important;color:#17382f!important;box-shadow:0 14px 36px rgba(0,0,0,.40)!important}
html[data-theme="dark"] .toast-action{background:rgba(23,56,47,.12)!important;color:#17382f!important}
html[data-theme="dark"] .sync-status{background:#26372f!important;color:#a9cbb9!important}
html[data-theme="dark"] .sync-status.off{background:#372821!important;color:#d5a08e!important}
html[data-theme="dark"] .reminder-banner{background:#36251f!important;border-color:rgba(208,130,112,.18)!important;color:#e1a693!important}
html[data-theme="dark"] .backup-banner{background:#22352d!important;border-color:rgba(123,179,158,.14)!important;color:#b3d0c2!important}
html[data-theme="dark"] .btn-primary{background:#2b6c5b!important;border-color:#2b6c5b!important;color:#fff!important}
html[data-theme="dark"] .btn-primary:hover{background:#367d69!important}
html[data-theme="dark"] .btn-outline{background:rgba(255,255,255,.045)!important;color:#c8dbd1!important;border-color:rgba(236,242,237,.13)!important}
html[data-theme="dark"] .btn-outline:hover{background:rgba(255,255,255,.08)!important;border-color:rgba(123,179,158,.26)!important}
html[data-theme="dark"] .btn-ghost{color:#9aa59e!important}
html[data-theme="dark"] .btn-danger-ghost{background:rgba(255,255,255,.035)!important;color:#dd8e7a!important;border-color:rgba(208,130,112,.24)!important}
