/* ============================================================
 * 造神计划 · 新粗野主义版 · 样式
 * Neo-Brutalism：高饱和亮色块 / 粗黑边框 / 硬阴影 / 无圆角 / 粗壮字体
 * 手机优先（375px 第一优先级）→ 平板 ≥768px → PC ≥1200px 侧边栏
 * v0.3：Toast 置顶 / 九宫格解锁 / 模块统计表 / 动效演示 / 称谓管理 / 健康模块 / 能力标签
 * ============================================================ */

:root {
  --yellow: #FFD400;
  --yellow2: #FFC400;
  --black: #0B0B0B;
  --white: #FFFFFF;
  --paper: #F5F1E6;
  --blue: #002FA7;
  --red: #FF3B30;
  --green: #00C853;
  --orange: #FF8A00;
  --purple: #7C3AED;
  --gray: #E8E4D8;

  --border: 4px solid var(--black);
  --border-thick: 5px solid var(--black);
  --shadow: 6px 6px 0 var(--black);
  --shadow-sm: 3px 3px 0 var(--black);
  --shadow-lg: 10px 10px 0 var(--black);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { overflow-x: hidden; }

body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 700;
  background: var(--paper);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body.locked { overflow: hidden; }

h1, h2, h3 { font-weight: 900; line-height: 1.2; }

button { font-family: inherit; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-family: inherit; }

/* ================= 通用块 / 卡片 ================= */
.card {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}
.card-yellow { background: var(--yellow); }
.card-blue { background: var(--blue); color: var(--white); border-color: var(--black); }
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; gap: 8px;
}
.card-head h3 { font-size: 19px; }

.tag-light {
  display: inline-block; background: var(--black); color: var(--white);
  font-size: 12px; font-weight: 900; padding: 3px 10px; letter-spacing: .5px;
  white-space: nowrap;
}
.tag-dark {
  display: inline-block; background: var(--white); color: var(--black);
  border: 2px solid var(--black); font-size: 12px; font-weight: 900;
  padding: 2px 10px; white-space: nowrap;
}

/* ================= 按钮（实体按键感） ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 18px;
  background: var(--yellow); color: var(--black);
  border: var(--border); box-shadow: var(--shadow);
  font-size: 16px; font-weight: 900; text-align: center; line-height: 1.25;
  transition: transform .05s linear, box-shadow .05s linear, background .15s;
}
.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--black);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: 14px; box-shadow: var(--shadow-sm); }
.btn-sm:active { transform: translate(2px, 2px); }
.btn-big { flex: 1; min-height: 92px; font-size: 19px; flex-direction: column; }
.btn-big.done { background: var(--green); color: var(--white); opacity: .85; }
.btn-primary { background: var(--yellow); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-green { background: var(--green); color: var(--white); }
.btn-warn { background: var(--orange); color: var(--white); }
.btn-gray { background: var(--gray); }
.btn.pressing { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--black); }

/* ================= 页头 ================= */
.masthead {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--black); color: var(--white);
  padding: 12px 14px; margin-bottom: 16px;
  box-shadow: var(--shadow);
  border-left: 10px solid var(--yellow);
}
.masthead h2 { font-size: 24px; letter-spacing: 1px; text-transform: uppercase; }
.masthead h2::after { content: ' ▸'; color: var(--yellow); }
.mh-tag {
  font-size: 12px; font-weight: 900; letter-spacing: 2px;
  color: var(--black); background: var(--yellow);
  padding: 4px 10px; border: 3px solid var(--black);
  transform: rotate(2deg);
}
.mh-btns { display: flex; gap: 8px; }

/* ================= 页面容器 / 切换动效 ================= */
#app { min-height: 100vh; }
main { padding: 16px 14px calc(92px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }

.page { display: none; }
.page.active { display: block; animation: pageIn .3s steps(5) both; }
@keyframes pageIn {
  0%   { transform: translateX(56px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* ================= 锁屏页（Q31 九宫格图案解锁 · Q62 V1.3 全新视觉：封神令·印章票根风） ================= */
#lockscreen {
  position: fixed; inset: 0; z-index: 9990;
  background: var(--blue);
  display: flex; flex-direction: column; align-items: center;
  /* Q70 V1.5：垂直均匀分布（space-evenly），消除手机底部 1/3 大片空白 */
  justify-content: space-evenly;
  padding: 46px 20px 14px; text-align: center; overflow: hidden;
}
#lockscreen.unlocking { animation: lockUp .38s steps(5) forwards; }
@keyframes lockUp { 100% { transform: translateY(-100%); } }

/* 顶部票根条 */
.lock-ticket {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--black); color: var(--yellow);
  font-size: 10px; font-weight: 900; letter-spacing: 3px;
  padding: 9px 14px; border-bottom: 4px solid var(--black);
  box-shadow: 0 5px 0 rgba(255, 255, 255, .22);
}
.lock-ticket-no {
  background: var(--yellow); color: var(--black);
  padding: 1px 8px; letter-spacing: 1px; font-size: 10px;
}

/* Q70 V1.5：左右两侧印章已删除（印章感并入主标题「造」「神」二字，见 .lock-brand 印章样式） */

/* 主视觉（Q64 V1.4：错位叠影大字 + 「造」字印章块；Q70 V1.5：「造」「神」双字印章，四字放大霸气） */
.lock-hero { margin-top: 2px; }
.lock-brand {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 2px; padding: 0 4px;
  /* Q70 V1.5：四字加大（10.5vw → 18vw），375px 下宽度≈时间+星期列，霸气不溢出 */
  font-size: clamp(40px, 18vw, 76px); font-weight: 900; line-height: 1.15;
  letter-spacing: 0; animation: heroIn .45s steps(5) both;
}
.lb-char {
  display: inline-block; color: var(--white);
  text-shadow: 3px 3px 0 var(--black), 6px 6px 0 rgba(255, 59, 48, .55);
}
.lb-char:nth-child(2) { transform: rotate(3deg) translateY(5px); }
.lb-char:nth-child(3) { transform: rotate(-2.5deg) translateY(-4px); }
.lb-char:nth-child(4) { transform: rotate(2deg) translateY(3px); }
/* 印章字（Q70 V1.5：「造」「神」两字，粗黑边 + 硬阴影 + 盖章感，错落角度） */
.lb-char.first {
  color: var(--black); background: var(--yellow);
  border: 4px solid var(--black); box-shadow: 5px 5px 0 var(--red);
  padding: 1px 7px 3px; transform: rotate(-6deg); text-shadow: none;
  margin-right: 5px;
}
.lb-char.first:nth-child(2) {
  transform: rotate(5deg) translateY(3px);
  box-shadow: 5px 5px 0 var(--blue);
}
@keyframes heroIn {
  0% { transform: translateY(-26px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.lock-rule {
  width: min(210px, 54vw); height: 6px; margin: 26px auto 28px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 18px, var(--black) 18px 26px);
  border: 3px solid var(--black);
}
.lock-sub {
  display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: 3px;
  color: var(--yellow); background: var(--black);
  border: 3px solid var(--black); box-shadow: 3px 3px 0 rgba(0, 0, 0, .55);
  padding: 5px 14px;
}

/* 时钟（Q64 V1.4：分栏色块小时/分钟 + 闪烁冒号 + 双色日期章） */
.lock-clock { margin: 4px 0 2px; }
.lock-time {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
}
.lt-block {
  display: inline-block; padding: 5px 11px 8px;
  font-size: clamp(30px, 9.5vw, 54px); line-height: 1;
  border: 5px solid var(--black);
}
.lt-h { background: var(--yellow); color: var(--black); box-shadow: 5px 5px 0 rgba(0, 0, 0, .6); transform: rotate(-1.5deg); }
.lt-m { background: var(--white); color: var(--black); box-shadow: 5px 5px 0 rgba(0, 0, 0, .6); transform: rotate(1.5deg); margin-top: 9px; }
.lt-colon {
  font-size: clamp(26px, 7.5vw, 44px); font-weight: 900; color: var(--yellow);
  text-shadow: 3px 3px 0 var(--black); animation: colonBlink 1.1s steps(2) infinite;
}
@keyframes colonBlink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .15; } }
.lock-date {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 900; letter-spacing: 2px;
}
.ld-block { display: inline-block; padding: 4px 11px; border: 3px solid var(--black); }
.ld-date { color: var(--white); background: var(--blue); box-shadow: 3px 3px 0 rgba(0, 0, 0, .55); transform: rotate(-1deg); }
.ld-week { color: var(--black); background: var(--yellow); box-shadow: 3px 3px 0 rgba(0, 0, 0, .55); transform: rotate(1.5deg); margin-top: 4px; }

/* ---- 九宫格图案解锁（Q62：菱格点 + 白色块状分段连线 + 黄菱格 mark） ---- */
/* Q70 V1.5：九宫格与上方时间/日期之间增加明显间隙（12px → 30px） */
.lock-pattern-wrap { position: relative; margin-top: 30px; display: flex; flex-direction: column; align-items: center; }
.lock-pattern-hint {
  font-size: 12px; font-weight: 900; letter-spacing: 2px;
  color: var(--black); background: var(--yellow);
  border: 4px solid var(--black); box-shadow: 4px 4px 0 rgba(0, 0, 0, .55);
  padding: 6px 14px; margin-bottom: 12px; white-space: nowrap;
}
#lock-pattern-svg { width: min(232px, 62vw); height: auto; touch-action: none; }

/* Q70 V1.5：矮屏（≤640px 高，如 iPhone SE 320x568）锁屏紧凑——内容完整显示不裁切 */
@media (max-height: 640px) {
  #lockscreen { padding-top: 38px; padding-bottom: 8px; }
  .lock-hero { margin-top: 0; }
  .lock-rule { margin: 7px auto 8px; }
  .lock-clock { margin: 10px 0 0; }
  .lock-pattern-wrap { margin-top: 18px; }
  .lock-pattern-hint { margin-bottom: 7px; padding: 4px 12px; }
  #lock-pattern-svg { width: min(168px, 56vw); }
  .lock-tip { margin-top: 7px; padding: 4px 12px; }
}

/* 图案点（Q62）：粗黑描边菱格（方块旋转 45°），黄底；已连点变黑底 + 黄色小菱格 mark */
.lock-dot {
  fill: var(--yellow); stroke: var(--black); stroke-width: 6;
  transform: rotate(45deg); transform-box: fill-box; transform-origin: center;
}
.lock-dot-g { transform-box: fill-box; transform-origin: center; transition: transform .05s steps(2); }
.lock-dot-g:active { transform: scale(1.18); }
.lock-dot-g.visited { transform: scale(1.08); }
.lock-dot-g.visited .lock-dot { fill: var(--black); }
/* Q62 bug A 修复：transform-box: fill-box + transform-origin: center，黄 mark 严格居中在点上 */
.lock-mark {
  fill: var(--yellow); stroke: var(--black); stroke-width: 4;
  transform: rotate(45deg); transform-box: fill-box; transform-origin: center;
  display: none;
}
.lock-dot-g.visited .lock-mark { display: block; }

/* 连线（Q62）：白色块状分段（色块分段盖章风），替代旧黑虚线 */
.lock-line {
  stroke: var(--white); stroke-width: 12; fill: none;
  stroke-linecap: square; stroke-linejoin: miter;
  stroke-dasharray: 22 8;
  animation: inkJump .22s steps(3);
}
@keyframes inkJump {
  0% { stroke-dashoffset: 30; }
  100% { stroke-dashoffset: 0; }
}
.lock-live {
  stroke: var(--yellow); stroke-width: 10; fill: none;
  stroke-linecap: square; stroke-linejoin: miter;
  stroke-dasharray: 14 10; opacity: .85;
}

/* 错误：抖动 + 红色「✗」块 */
.lock-pattern-wrap.err { animation: lockShake .4s steps(4); }
@keyframes lockShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-14px); }
  50% { transform: translateX(12px); }
  75% { transform: translateX(-8px); }
}
.lock-pattern-err {
  display: none; position: absolute; top: 40%; left: 50%; z-index: 5;
  transform: translate(-50%, -50%) rotate(-6deg);
  background: var(--red); color: var(--white); border: 6px solid var(--black);
  box-shadow: 8px 8px 0 var(--black);
  font-size: 84px; font-weight: 900; line-height: 1; padding: 2px 26px;
  pointer-events: none;
}
.lock-pattern-wrap.err .lock-pattern-err { display: block; animation: errPop .3s steps(4); }
@keyframes errPop {
  0% { transform: translate(-50%, -50%) scale(2.4) rotate(-14deg); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(-6deg); opacity: 1; }
}

.lock-tip {
  margin-top: 14px; font-size: 12px; font-weight: 900; letter-spacing: 2px;
  color: var(--yellow); background: var(--black);
  border: 3px solid var(--black); box-shadow: 3px 3px 0 rgba(0, 0, 0, .55);
  padding: 5px 14px;
}

/* 解锁成功动效（Q62 新形式：大「神」印章砸下 + OPEN 条，替代旧「咔!」黑闪） */
.lock-flash {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(0, 0, 0, .88);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  opacity: 0; visibility: hidden;
  pointer-events: none;
}
.lock-flash.show { opacity: 1; visibility: visible; transition: opacity .18s steps(3); }
.lock-stamp {
  width: 116px; height: 116px;
  background: var(--yellow); border: 8px solid var(--black);
  box-shadow: 12px 12px 0 var(--blue);
  display: flex; align-items: center; justify-content: center;
  transform: translateY(-150%) rotate(14deg) scale(.4);
  animation: stampSlam .34s steps(5) forwards;
}
.lock-stamp-char { font-size: 70px; font-weight: 900; line-height: 1; color: var(--black); }
@keyframes stampSlam {
  0% { transform: translateY(-150%) rotate(14deg) scale(.4); }
  100% { transform: translateY(0) rotate(-5deg) scale(1); }
}
.lock-open {
  background: var(--black); color: var(--white); border: 4px solid var(--white);
  font-size: 15px; font-weight: 900; letter-spacing: 5px; padding: 6px 18px;
  opacity: 0; animation: openIn .28s steps(4) .18s forwards;
}
@keyframes openIn {
  0% { opacity: 0; transform: scale(0); }
  100% { opacity: 1; transform: scale(1); }
}

/* ================= 首页 ================= */
/* Q46：首页背景装饰（点阵 + 顶部条纹），不脱离新野风基调 */
#page-home { position: relative; }
#page-home::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(11, 11, 11, .08) 1.6px, transparent 1.6px);
  background-size: 26px 26px;
}
#page-home::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; z-index: -1;
  height: 14px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--black) 0 22px, var(--yellow) 22px 44px);
  border-bottom: 4px solid var(--black);
}
/* 阶段卡片（Q27） */
.stage-card { background: var(--yellow); position: relative; }
.stage-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.stage-level {
  font-size: 40px; font-weight: 900; line-height: 1;
  background: var(--black); color: var(--yellow);
  border: 4px solid var(--black); box-shadow: var(--shadow-sm);
  padding: 8px 12px; transform: rotate(-3deg);
}
.stage-info { flex: 1; min-width: 0; }
.stage-title {
  font-size: 32px; font-weight: 900; line-height: 1.1;
  transform: rotate(-1.2deg);
  display: inline-block;
}
.stage-title.flip { animation: flipX .5s steps(5); }
@keyframes flipX {
  0% { transform: rotateX(0) rotate(-1.2deg); }
  50% { transform: rotateX(90deg); }
  100% { transform: rotateX(0) rotate(-1.2deg); }
}
.stage-sub { font-size: 12px; font-weight: 900; letter-spacing: 2px; opacity: .75; }
.stage-exp {
  font-size: 16px; font-weight: 900; white-space: nowrap;
  background: var(--white); border: 3px solid var(--black);
  padding: 6px 10px; box-shadow: var(--shadow-sm);
}
.stage-next {
  margin-top: 12px; font-size: 14px; font-weight: 900;
  background: var(--black); color: var(--white);
  border: 3px solid var(--black); box-shadow: var(--shadow-sm);
  padding: 8px 12px; letter-spacing: .5px;
}
.stage-next b { color: var(--yellow); font-size: 18px; }

/* 经验条 Q46：色块分段刻度 + 动态流动 */
.exp-bar {
  height: 24px; background: var(--white);
  border: 3px solid var(--black); position: relative; overflow: hidden;
}
.exp-bar.big { height: 30px; box-shadow: var(--shadow-sm); }
.exp-bar.big::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(11, 11, 11, .25) calc(10% - 2px) 10%);
}
.exp-fill {
  height: 100%; width: 0;
  background: repeating-linear-gradient(45deg, var(--yellow) 0 14px, var(--yellow2) 14px 28px);
  border-right: 3px solid var(--black);
  transition: width .9s cubic-bezier(.25, 1.4, .4, 1);
  position: relative;
  background-size: 200% 100%;
  animation: stripeFlow 1.2s linear infinite;
}
@keyframes stripeFlow {
  0% { background-position: 0 0; }
  100% { background-position: 40px 0; }
}
.exp-fill.blue { background: repeating-linear-gradient(45deg, var(--blue) 0 14px, #1A46D0 14px 28px); background-size: 200% 100%; animation: stripeFlow 1.2s linear infinite; }

/* 小月卡片 Q46：更活泼 */
.xiaoyue-card {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 16px; padding: 12px;
  background: var(--white); border: var(--border); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.xiaoyue-card::before, .xiaoyue-card::after {
  content: '✦'; position: absolute; font-size: 15px; font-weight: 900; color: var(--blue);
  animation: sparkle 2.6s steps(4) infinite; pointer-events: none;
}
.xiaoyue-card::before { top: 8px; right: 14px; }
.xiaoyue-card::after { content: '★'; bottom: 10px; right: 42px; color: var(--red); animation-delay: 1.1s; font-size: 12px; }
@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0); opacity: .85; }
  50% { transform: scale(1.5) rotate(40deg); opacity: .35; }
}
.xy-avatar {
  flex: none; width: 54px; height: 54px;
  background: var(--yellow); border: 4px solid var(--black);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; font-weight: 900; transform: rotate(-4deg);
  animation: xyBob 2.4s steps(5) infinite;
}
@keyframes xyBob {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-4px); }
}
.xy-bubble {
  flex: 1; min-width: 0; position: relative;
  background: var(--white); border: 3px solid var(--black);
  box-shadow: var(--shadow-sm); padding: 10px 12px;
  font-size: 15.5px; line-height: 1.5;
}
.xy-bubble::before {
  content: ''; position: absolute; left: -10px; top: 16px;
  border: 5px solid transparent; border-right-color: var(--black);
}
.xy-name { font-size: 12px; font-weight: 900; letter-spacing: 2px; color: var(--blue); margin-bottom: 2px; }
.xy-bubble.pop { animation: bubblePop .5s steps(5); }
@keyframes bubblePop {
  0% { transform: scale(.5) rotate(-3deg); }
  55% { transform: scale(1.12) rotate(1.5deg); }
  100% { transform: scale(1) rotate(0); }
}

/* 个人能力标签（Q39：主页轮播） */
.abil-card {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding: 10px 12px;
  background: var(--black); border: var(--border); box-shadow: var(--shadow);
}
.abil-label {
  flex: none; font-size: 12px; font-weight: 900; letter-spacing: 2px;
  color: var(--yellow); border: 2px solid var(--yellow); padding: 4px 8px;
}
.abil-pill {
  font-size: 15.5px; font-weight: 900; letter-spacing: .5px;
  color: var(--black); background: var(--yellow);
  border: 3px solid var(--black); box-shadow: var(--shadow-sm);
  padding: 8px 14px; max-width: 100%;
  animation: abilSwap .35s steps(4);
}
@keyframes abilSwap {
  0% { transform: translateY(-10px) scale(.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.abil-empty { font-size: 13px; font-weight: 900; color: var(--yellow); opacity: .85; }

/* 连击 Q46：徽章化 */
.combo-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.combo-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--white); border: 3px solid var(--black);
  box-shadow: var(--shadow-sm); font-size: 13.5px; font-weight: 900;
  padding: 8px 12px; transform: rotate(-1deg);
}
.combo-chip:nth-child(even) { transform: rotate(1.2deg); }
.combo-chip svg { width: 16px; height: 16px; display: block; }
.combo-chip b { font-size: 17px; color: var(--blue); }
.combo-chip.dim { opacity: .72; background: var(--gray); box-shadow: 3px 3px 0 rgba(0,0,0,.4); }
.combo-chip.gold {
  background: var(--yellow); box-shadow: var(--shadow-sm);
  animation: comboGold .6s steps(5);
}
@keyframes comboGold {
  0% { transform: scale(.6) rotate(-6deg); }
  60% { transform: scale(1.15) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}

/* 今日任务 mini 进度条 */
.mini-bar {
  height: 12px; background: var(--white); border: 2px solid var(--black);
  margin-bottom: 12px; overflow: hidden;
}
.mini-fill {
  height: 100%; background: var(--green); width: 0;
  transition: width .6s cubic-bezier(.25, 1.4, .4, 1);
}

/* 任务列表 */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 3px solid var(--black);
  box-shadow: var(--shadow-sm); padding: 10px;
  transition: opacity .3s, transform .3s;
}
/* Q46：任务卡片 hover 抬起 / 完成时盖章动效 */
@media (hover: hover) {
  .task-item:not(.done):hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--black);
  }
}
.task-item.done { opacity: .6; }
.task-del {
  align-self: center; flex: none;
  width: 30px; height: 30px; margin-right: 8px;
  border: 3px solid var(--black); background: #FFF;
  color: var(--red); font-size: 15px; font-weight: 900; line-height: 1;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .12s steps(2), box-shadow .12s steps(2);
}
.task-del:active { transform: translate(2px, 2px); box-shadow: none; }
.task-item.just-done { animation: taskPop .45s steps(5); }
@keyframes taskPop {
  0% { transform: scale(1) rotate(0); }
  35% { transform: scale(1.04) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}
.task-item.done .task-icon { background: var(--gray); }
.task-icon {
  flex: none; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--yellow); border: 3px solid var(--black);
  box-shadow: 2px 2px 0 var(--black);
}
.task-icon svg { width: 26px; height: 26px; }
.task-body { flex: 1; min-width: 0; }
.task-name { font-size: 16px; font-weight: 900; line-height: 1.3; word-break: break-word; }
.task-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.diff {
  font-size: 11px; font-weight: 900; padding: 2px 8px;
  border: 2px solid var(--black); letter-spacing: .5px;
}
.diff-easy  { background: var(--green); color: var(--white); }
.diff-normal{ background: var(--orange); color: var(--white); }
.diff-hard  { background: var(--red); color: var(--white); }
.diff-达标  { background: var(--blue); color: var(--white); }
.diff-记录  { background: var(--purple); color: var(--white); }
.diff-豁免  { background: var(--yellow); }

.btn-check {
  flex: none; min-width: 80px; min-height: 44px;
  background: var(--yellow); border: 3px solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  font-size: 15px; font-weight: 900;
  transition: transform .05s linear, box-shadow .05s linear, background .2s;
}
.btn-check:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--black); }
.btn-check.done {
  background: var(--green); color: var(--white);
  opacity: .85;
}

/* ================= 模块聚合页 ================= */
.note-banner {
  background: var(--black); color: var(--yellow);
  border: 3px solid var(--black); box-shadow: var(--shadow-sm);
  font-size: 14px; font-weight: 900; letter-spacing: 1px;
  padding: 10px 14px; margin-bottom: 16px;
}
/* Q54 模块卡重设计：主色大色块头部 + 图标 + 名称 + 连击徽章；hover 位移/盖章感；间距节奏统一 */
.module-list { display: flex; flex-direction: column; gap: 18px; }
.mod-card {
  display: block; width: 100%; text-align: left;
  background: var(--white); border: var(--border);
  box-shadow: var(--shadow); padding: 0; overflow: hidden;
  transition: transform .08s linear, box-shadow .08s linear;
}
.mod-card:nth-child(odd) { transform: rotate(-.5deg); }
.mod-card:nth-child(even) { transform: rotate(.5deg); }
@media (hover: hover) {
  .mod-card:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 9px 9px 0 var(--black); }
}
.mod-card:active { transform: translate(4px, 4px) rotate(0); box-shadow: 0 0 0 var(--black); }
.mod-top {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 4px solid var(--black);
}
.mod-ic {
  flex: none; width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 3px solid var(--black);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .35); transform: rotate(-3deg);
}
.mod-ic svg { width: 28px; height: 28px; }
.mod-names { flex: 1; min-width: 0; }
.mod-name { display: block; font-size: 20px; font-weight: 900; line-height: 1.12; letter-spacing: 1px; }
.mod-en { display: block; font-size: 9px; font-weight: 900; letter-spacing: 2px; opacity: .8; margin-top: 3px; }
.mod-card.dark .mod-name, .mod-card.dark .mod-en { color: var(--white); }
.mod-combo {
  flex: none; display: inline-flex; align-items: baseline; gap: 3px;
  background: var(--black); color: var(--yellow);
  border: 3px solid var(--black); box-shadow: 3px 3px 0 rgba(0, 0, 0, .4);
  font-size: 11px; font-weight: 900; padding: 4px 9px; transform: rotate(2deg);
  white-space: nowrap;
}
.mod-combo b { color: var(--white); font-size: 15px; }
.mod-bottom { display: block; padding: 10px 14px 12px; }
.mod-meta { display: block; font-size: 12px; font-weight: 900; opacity: .85; margin-bottom: 8px; }
.mod-bar-row { display: flex; align-items: center; gap: 10px; }
.mod-bar { flex: 1; margin: 0; }
.mod-arrow { flex: none; font-size: 26px; font-weight: 900; line-height: 1; }

/* Q53 模块摘要：连击/经验/称谓改为贴合文字的简洁背景框（chips），取消大面积背景图 */
.mod-summary {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 14px; padding: 0;
  background: transparent; border: none; box-shadow: none;
}
.ms-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--yellow); color: var(--black);
  border: 3px solid var(--black); box-shadow: var(--shadow-sm);
  padding: 6px 12px; font-size: 13.5px; font-weight: 900;
  transform: rotate(-1deg);
}
.ms-chip:nth-child(even) { transform: rotate(1deg); }
.ms-chip svg { width: 15px; height: 15px; display: block; }
.ms-chip b { color: var(--blue); font-size: 16px; }
.ms-chip.ms-name { background: var(--white); }
.ms-chip.ms-need { background: var(--blue); color: var(--white); }
.ms-chip.ms-need b { color: var(--yellow); }

/* ================= 模块统计图表（Q40：柱状图 + 趋势线混合图，纯 CSS/SVG） ================= */
.stat-card { padding: 12px; }
.chart-box {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 10px;
}
.chart-body {
  position: relative;
  height: 168px;
  margin: 2px 0 0;
  border-bottom: 3px solid var(--black);
}
.chart-body .bars {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  gap: 2px;
  z-index: 1;
}
.bar-col {
  flex: 1; min-width: 0; height: 100%;
  display: flex; align-items: flex-end; justify-content: center;
}
.bar-fill {
  position: relative;
  width: 100%; max-width: 26px;
  min-height: 4px;
  border: 3px solid var(--black);
  box-shadow: 2px 2px 0 var(--black);
  transition: height .8s cubic-bezier(.25, 1.4, .4, 1);
}
.bar-fill.today {
  background: repeating-linear-gradient(45deg, var(--yellow) 0 6px, var(--yellow2) 6px 12px);
}
.bar-fill.today::after {
  content: '';
  position: absolute; top: -11px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border: 5px solid transparent;
  border-top: 9px solid var(--black);
}
.trend-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
}
.chart-x {
  display: flex; gap: 2px;
  margin: 6px 2px 0;
}
.chart-x span {
  flex: 1; min-width: 0;
  text-align: center;
  font-size: 10px; font-weight: 900;
  white-space: nowrap; overflow: hidden;
}
.chart-x span.hide { visibility: hidden; }
.chart-legend {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px; font-weight: 900;
}
.legend-sq { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--black); }
.legend-line {
  display: inline-block; width: 20px;
  border-top: 3px solid var(--black);
  border-bottom: 2px solid var(--white);
}
.legend-mark {
  display: inline-block; width: 0; height: 0;
  border: 5px solid transparent; border-top: 9px solid var(--black);
}
.chart-summary {
  margin-top: 10px;
  background: var(--yellow); color: var(--black);
  border: 3px solid var(--black);
  box-shadow: var(--shadow-sm);
  padding: 8px 12px;
  font-size: 13px; font-weight: 900; letter-spacing: .5px;
}
.chart-summary b { color: var(--blue); font-size: 16px; }

/* Q56 今日完成：该模块今天完成了哪些任务 + 数量 */
.chart-today { margin-top: 10px; border: 3px solid var(--black); background: var(--white); box-shadow: var(--shadow-sm); }
.ct-head {
  background: var(--black); color: var(--white);
  font-size: 12px; font-weight: 900; letter-spacing: 1px;
  padding: 6px 10px;
}
.ct-head b { color: var(--yellow); font-size: 15px; }
.ct-body { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; font-size: 13px; font-weight: 900; }
.ct-body.dim { opacity: .55; }
.ct-item {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--yellow); border: 2px solid var(--black);
  padding: 3px 8px; white-space: nowrap;
}
.chart-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; opacity: .6;
}
.range-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.range-btn {
  min-height: 34px; padding: 4px 12px; font-size: 13px; font-weight: 900;
  background: var(--white); color: var(--black);
  border: 3px solid var(--black); box-shadow: 2px 2px 0 var(--black);
  transition: transform .05s linear, box-shadow .05s linear;
}
.range-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--black); }
.range-btn.active { background: var(--yellow); }

/* ================= 作息 ================= */
.sleep-btns { display: flex; gap: 12px; margin-bottom: 16px; }
.btn-ic { display: block; }
.btn-ic svg { width: 36px; height: 36px; display: block; margin-bottom: 6px; }
.sleep-goal { font-size: 16px; font-weight: 900; margin-bottom: 8px; }
.sleep-goal b { font-size: 21px; color: var(--blue); }
.sleep-meta { font-size: 13px; font-weight: 900; line-height: 1.8; opacity: .85; }
.sleep-meta b { font-size: 16px; }
.week-dots { display: flex; gap: 8px; }
.wdot {
  flex: 1; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--black); background: var(--gray);
  font-size: 13px; font-weight: 900;
}
.wdot.on { background: var(--green); color: var(--white); }

/* ================= 戒断 ================= */
.quit-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.quit-card {
  background: var(--white); border: var(--border);
  box-shadow: var(--shadow); padding: 14px;
}
.quit-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.quit-icon {
  flex: none; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red); border: 3px solid var(--black);
}
.quit-icon svg { width: 24px; height: 24px; }
.quit-head b { font-size: 18px; flex: 1; }
.quit-stats { font-size: 13px; font-weight: 900; line-height: 1.8; opacity: .85; margin-bottom: 10px; }
.quit-stats b { font-size: 19px; color: var(--green); }
/* Q67 V1.4：同一行布局 —— 左删除 / 右破戒请假（按钮调窄靠右） */
.quit-actions { display: flex; align-items: center; gap: 8px; }
.quit-del { flex: none; min-width: 46px; min-height: 44px; padding: 8px 0; font-size: 15px; box-shadow: var(--shadow-sm); }
.quit-act-space { flex: 1; }
.quit-act { flex: none; min-width: 78px; min-height: 44px; padding: 8px 12px; font-size: 14px; box-shadow: var(--shadow-sm); }

/* 今日戒断（Q36 首页） */
.quit-today-list { display: flex; flex-direction: column; gap: 10px; }
.quit-today-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 3px solid var(--black);
  box-shadow: var(--shadow-sm); padding: 10px;
}
.quit-today-icon {
  flex: none; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red); border: 3px solid var(--black);
}
.quit-today-icon svg { width: 21px; height: 21px; }
.quit-today-body { flex: 1; min-width: 0; }
.quit-today-name { font-size: 16px; font-weight: 900; }
.quit-today-meta { font-size: 12px; font-weight: 900; opacity: .75; margin-top: 2px; }
.quit-today-status {
  flex: none; font-size: 11px; font-weight: 900; padding: 3px 8px;
  border: 2px solid var(--black); white-space: nowrap;
}
.qs-done { background: var(--green); color: var(--white); }
.qs-leave { background: var(--yellow); }
.qs-todo { background: var(--gray); }
.quit-today-btn { flex: none; min-width: 84px; min-height: 40px; }
.quit-today-btn.done { background: var(--green); color: var(--white); }

/* 请假界面（Q36：理由输入 + 历史倒序） */
.leave-reason { width: 100%; min-height: 70px; }
.leave-history { margin-top: 12px; border-top: 4px solid var(--black); padding-top: 10px; }
.leave-h-title { font-size: 12px; font-weight: 900; letter-spacing: 2px; margin-bottom: 8px; }
.leave-item {
  display: flex; gap: 8px; align-items: flex-start;
  border: 3px solid var(--black); background: var(--paper);
  padding: 8px 10px; margin-bottom: 8px; font-size: 12px; font-weight: 700;
}
.leave-date {
  flex: none; background: var(--black); color: var(--yellow);
  padding: 2px 8px; font-size: 11px; font-weight: 900; white-space: nowrap;
}
.leave-reason-text { flex: 1; min-width: 0; line-height: 1.5; word-break: break-all; }

/* ================= 日记 ================= */
.mood-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mood {
  flex: 1; min-width: 60px; min-height: 46px;
  background: var(--white); border: 3px solid var(--black);
  box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 900;
  transition: transform .05s linear, box-shadow .05s linear;
}
.mood:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--black); }
.mood.active {
  background: var(--red); color: var(--white);
  transform: rotate(-2deg);
}
.mood-sq {
  display: inline-block; width: 10px; height: 10px;
  border: 2px solid var(--black); margin-right: 5px; vertical-align: -1px;
}
.mood.active .mood-sq { border-color: var(--white); }
textarea {
  width: 100%; border: 3px solid var(--black); padding: 11px;
  font-size: 16px; font-weight: 700; line-height: 1.6;
  box-shadow: var(--shadow-sm); background: var(--white); resize: vertical;
  min-height: 100px;
}
textarea:focus, input:focus, select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 3px 3px 0 var(--blue);
}
.save-row { margin-top: 12px; }
.save-row .btn { width: 100%; min-height: 54px; font-size: 17px; }

/* 日记搜索（Q28） */
.diary-search { margin-bottom: 14px; }
.diary-search input[type="text"] {
  width: 100%; border: 3px solid var(--black); padding: 12px;
  font-size: 16px; font-weight: 700; box-shadow: var(--shadow-sm);
  margin-bottom: 8px; background: var(--white);
}
.search-row { display: flex; gap: 8px; }
.search-row input[type="date"] {
  flex: 1; min-width: 0; border: 3px solid var(--black); padding: 8px 10px;
  font-size: 14px; font-weight: 700; box-shadow: var(--shadow-sm); background: var(--white);
}
.search-row .btn { min-height: 44px; }

.diary-list { display: flex; flex-direction: column; gap: 10px; }
/* Q44：列表项 = 一句话摘要卡片（可点击进详情） */
.diary-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: var(--white); border: 3px solid var(--black);
  box-shadow: var(--shadow-sm); padding: 12px;
  animation: pageIn .28s steps(4) both;
  cursor: pointer;
  transition: transform .05s linear, box-shadow .05s linear, background .15s;
}
.diary-item:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--black); }
.diary-item:hover { background: var(--yellow); }
.diary-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; }
.diary-date { font-size: 13px; font-weight: 900; letter-spacing: 1px; background: var(--black); color: var(--white); padding: 2px 9px; white-space: nowrap; }
.diary-mood {
  font-size: 12px; font-weight: 900; padding: 2px 9px;
  border: 2px solid var(--black); background: var(--yellow);
  white-space: nowrap;
}
.diary-text { font-size: 15px; font-weight: 700; line-height: 1.7; word-break: break-word; }
.diary-empty {
  border: 3px dashed var(--black); padding: 26px 14px; text-align: center;
  font-size: 14px; font-weight: 900; color: #555;
}
.search-active .diary-item { animation: none; }

/* Q44：列表摘要（一行截断省略号） */
.diary-item .d-body { flex: 1; min-width: 0; }
.diary-item .d-sum {
  font-size: 15px; font-weight: 700; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.diary-item .d-arrow { flex: none; font-size: 22px; font-weight: 900; opacity: .6; }

/* Q44：查看更多 / 收起 */
.diary-more-row { margin-top: 4px; }
.diary-more-row .btn { width: 100%; min-height: 44px; font-size: 15px; }

/* Q44：日记详情视图 */
.diary-detail { border: 4px solid var(--black); background: var(--yellow); box-shadow: var(--shadow); padding: 16px; }
.diary-detail .dd-date {
  display: inline-block; background: var(--black); color: var(--white);
  font-size: 13px; font-weight: 900; letter-spacing: 1px; padding: 3px 10px;
}
.diary-detail .dd-mood {
  display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 900;
  border: 2px solid var(--black); background: var(--white); padding: 2px 9px;
}
.diary-detail .dd-title { font-size: 20px; font-weight: 900; margin: 10px 0 8px; letter-spacing: 1px; }
.diary-detail .dd-text {
  font-size: 16px; font-weight: 700; line-height: 1.9; word-break: break-word;
  background: var(--white); border: 3px solid var(--black);
  padding: 14px; box-shadow: var(--shadow-sm);
}

/* Q58 日记详情独立页：长文舒适排版（分段/行距/滚动） */
#page-diary-detail .diary-detail {
  background: var(--white); border: var(--border);
  box-shadow: var(--shadow); padding: 16px;
}
#page-diary-detail .dd-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
#page-diary-detail .dd-title { font-size: 22px; font-weight: 900; letter-spacing: 2px; margin: 4px 0 12px; }
#page-diary-detail .dd-text {
  font-size: 17px; font-weight: 700; line-height: 2;
  word-break: break-word; white-space: pre-wrap;
  background: var(--paper); border: 3px solid var(--black);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.dd-actions { display: flex; gap: 10px; margin-top: 16px; align-items: stretch; }
/* Q61：返回按钮（主按钮，放右侧，占主位）；删除按钮（小号弱化，放左侧，不抢眼） */
.dd-actions .dd-back {
  flex: 1; min-height: 52px; font-size: 17px;
  box-shadow: var(--shadow); order: 2;
}
.dd-actions .dd-del-sm {
  flex: 0 0 auto; min-width: 0; min-height: 40px; align-self: center;
  background: var(--white); color: var(--red); border: 3px solid var(--black);
  font-size: 12px; font-weight: 900; letter-spacing: .5px;
  padding: 4px 10px; box-shadow: 2px 2px 0 var(--black);
  opacity: .75; order: 1;
}
.dd-actions .dd-del-sm:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--black); }

/* Q45：自定义日期选择（替代原生 date input，修复移动端触控） */
.diary-date-bar {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  border: 3px solid var(--black); padding: 8px 12px;
  box-shadow: var(--shadow-sm); background: var(--white);
  font-size: 15px; font-weight: 900; text-align: left;
  color: var(--black);
}
.diary-date-bar .ddb-ic { flex: none; display: flex; }
.diary-date-bar .ddb-ic svg { width: 20px; height: 20px; display: block; }
.diary-date-bar .ddb-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diary-date-bar.placeholder { color: #9A958A; }
.diary-date-bar .ddb-caret { flex: none; font-size: 12px; font-weight: 900; }
.date-picker-wrap { position: relative; flex: 1; min-width: 0; }
.date-picker-pop {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  background: var(--white); border: 4px solid var(--black);
  box-shadow: var(--shadow); padding: 8px; display: none;
  max-height: 280px; overflow-y: auto;
}
.date-picker-pop.show { display: block; animation: pageIn .18s steps(4) both; }
.dp-item {
  display: block; width: 100%; text-align: left;
  border: 3px solid var(--black); background: var(--paper);
  font-size: 15px; font-weight: 900; color: var(--black);
  padding: 10px 12px; margin-bottom: 6px;
  transition: transform .05s linear;
}
.dp-item:last-child { margin-bottom: 0; }
.dp-item:active { transform: translate(2px, 2px); }
.dp-item.sel { background: var(--yellow); }
.dp-item.clear { background: var(--gray); font-size: 13px; text-align: center; }

/* ================= 健康模块（Q37/38） ================= */
.bmi-box { display: flex; gap: 8px; margin-bottom: 10px; }
.bmi-num {
  flex: 1; min-width: 0;
  background: var(--yellow); border: 3px solid var(--black);
  box-shadow: var(--shadow-sm); padding: 8px 4px; text-align: center;
}
.bmi-num b { display: block; font-size: 20px; font-weight: 900; word-break: break-all; }
.bmi-num span { display: block; font-size: 11px; font-weight: 900; letter-spacing: 1px; opacity: .8; margin-top: 2px; }
.weight-list { display: flex; flex-direction: column; gap: 8px; }
.weight-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 3px solid var(--black); background: var(--white);
  padding: 9px 10px; font-size: 14px; font-weight: 900;
}
.weight-item .wi-date { background: var(--black); color: var(--white); padding: 2px 8px; font-size: 12px; }

/* ================= 统计（Q69 V1.4：彩色化/数据突出/布局节奏） ================= */
.cst-card { padding-top: 0; }
.cst-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin: 0 -16px 16px; padding: 11px 16px;
  border: 0; border-bottom: 4px solid var(--black);
}
.cst-banner h3 { font-size: 18px; }
.cst-blue { background: var(--blue); }
.cst-blue h3 { color: var(--white); }
.cst-yellow { background: var(--yellow); }
.cst-yellow h3 { color: var(--black); }
.cst-green { background: var(--green); }
.cst-green h3 { color: var(--white); }
/* Q73 V1.5：雷达图放大（340px → 420px，占满卡片宽度，375px 内不溢出） */
#radar-wrap svg { width: 100%; max-width: 420px; display: block; margin: 0 auto; }

/* 能力成长：彩色模块卡 + 统一尺寸图标（参考模块页六色图标） */
.mbar-card {
  display: flex; align-items: center; gap: 16px;
  border: 4px solid var(--black); box-shadow: var(--shadow-sm);
  padding: 18px; margin-bottom: 14px;
}
.mbar-card:nth-child(odd) { transform: rotate(-.4deg); }
.mbar-card:nth-child(even) { transform: rotate(.4deg); }
.mbar-ic {
  flex: none; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 3px solid var(--black);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .35); transform: rotate(-3deg);
}
.mbar-ic svg { width: 26px; height: 26px; }
.mbar-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mbar-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 900; flex-wrap: wrap;
}
.mbar-head b { font-size: 18px; }
.mbar-card.dark .mbar-head, .mbar-card.dark .mbar-exp { color: var(--white); }
.mbar-card.dark .mbar-next { color: rgba(255, 255, 255, .78); }
.mbar-nums { display: flex; align-items: baseline; gap: 6px; }
.mbar-exp { font-size: 28px; font-weight: 900; line-height: 1; }
.mbar-need { font-size: 12px; font-weight: 900; opacity: .8; }
.mbar-card .exp-bar.small { height: 16px; }

/* 最近 7 天经验：彩色柱 + 黑底数值 + 错落节奏 */
.week-bars {
  display: flex; gap: 8px; align-items: stretch;
  height: 170px; padding-top: 26px;
}
.wcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.wcol:nth-child(odd) .wbar-wrap { transform: rotate(-1deg); }
.wcol:nth-child(even) .wbar-wrap { transform: rotate(1deg); }
.wval {
  font-size: 13px; font-weight: 900;
  background: var(--black); color: var(--white);
  padding: 1px 7px; letter-spacing: .5px; white-space: nowrap;
}
.wbar-wrap {
  flex: 1; width: 100%; min-height: 60px;
  display: flex; align-items: flex-end;
  background: var(--white); border: 3px solid var(--black);
  padding: 4px;
}
.wbar {
  width: 100%; min-height: 8px;
  border: 3px solid var(--black);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .3);
  transition: height .8s cubic-bezier(.25, 1.4, .4, 1);
}
.wbar.today { background: var(--yellow); }
.wlabel { font-size: 11px; font-weight: 900; }

/* ================= 提醒中心 ================= */
.reminder-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.reminder-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--white); border: var(--border);
  box-shadow: var(--shadow); padding: 12px;
}
.reminder-item.custom { background: var(--yellow); }
/* Q47：系统提醒 = 克莱因蓝/红底色 + 白描边图标；自定义 = 黄底 + 黑描边 */
.r-icon {
  flex: none; width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); border: 3px solid var(--black);
  box-shadow: 2px 2px 0 rgba(0,0,0,.3);
}
.r-icon.sys-red { background: var(--red); }
.r-icon.sys-blue { background: var(--blue); }
.r-icon.sys-blue svg, .r-icon.sys-red svg { stroke: #FFFFFF; }
.r-icon.sys-red svg path:last-child { stroke: #FFFFFF; }
.r-icon svg { width: 24px; height: 24px; }
.reminder-item.custom .r-icon { background: var(--yellow); box-shadow: 2px 2px 0 var(--black); }
.reminder-item.custom .r-icon svg { stroke: var(--black); }
.r-body { flex: 1; min-width: 0; }
.r-title { font-size: 16px; font-weight: 900; }
.r-text { font-size: 13px; font-weight: 700; margin-top: 2px; line-height: 1.5; }
/* Q68 V1.4：自定义提醒 内容在上（大字）、类型字在下 */
.reminder-item.custom .r-title { font-size: 18px; line-height: 1.35; }
.r-type {
  display: inline-block; margin-top: 5px; font-size: 11px; font-weight: 900;
  background: var(--black); color: var(--yellow); padding: 2px 8px; letter-spacing: 1px;
}
.r-time {
  display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 900;
  background: var(--black); color: var(--white); padding: 2px 8px; letter-spacing: 1px;
}

/* ================= 设置 ================= */
.set-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.set-ic {
  flex: none; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--yellow); border: 3px solid var(--black);
  box-shadow: 2px 2px 0 var(--black);
}
.set-ic svg { width: 24px; height: 24px; }
.set-info { flex: 1; min-width: 0; }
.set-info b { font-size: 17px; }
.set-desc { font-size: 13px; font-weight: 700; opacity: .8; margin-top: 3px; line-height: 1.5; }
.about { text-align: center; }
.about-title { font-size: 26px; font-weight: 900; letter-spacing: 3px; margin-bottom: 6px; }
.about div { font-size: 13px; font-weight: 700; line-height: 1.8; }

/* 设置入口行（Q66 V1.4：个人信息/成就徽章折叠展开） */
.set-entry { cursor: pointer; margin-bottom: 0; }
.set-chev {
  flex: none; font-size: 26px; font-weight: 900; line-height: 1;
  color: var(--black); transition: transform .2s steps(3);
}
.set-entry[aria-expanded="true"] .set-chev { transform: rotate(90deg); }
.ach-entry-count {
  flex: none; font-size: 12px; font-weight: 900; white-space: nowrap;
  background: var(--black); color: var(--white); padding: 3px 9px;
}
.set-collapse { display: none; margin-top: 14px; padding-top: 14px; border-top: 3px dashed var(--black); }
.set-collapse.open { display: block; animation: pageIn .25s steps(4) both; }

/* 个人信息（Q38） */
.profile-grid { display: flex; gap: 8px; margin-bottom: 12px; }
.profile-grid label { flex: 1; min-width: 0; font-size: 13px; font-weight: 900; }
.profile-grid input, .profile-grid select {
  width: 100%; border: 3px solid var(--black); padding: 9px;
  font-size: 15px; font-weight: 700; box-shadow: var(--shadow-sm);
  background: var(--white); margin-top: 4px;
}

/* 动效演示（Q34） */
.demo-list { display: flex; flex-direction: column; }
.demo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 3px solid var(--black);
}
.demo-item:last-child { border-bottom: none; }
.demo-info { flex: 1; min-width: 0; }
.demo-name { font-size: 16px; font-weight: 900; }
.demo-desc { font-size: 12px; font-weight: 700; opacity: .7; margin-top: 2px; line-height: 1.4; }
.demo-play { flex: none; min-width: 84px; }
.demo-stage {
  margin-top: 10px; min-height: 42px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.demo-count {
  font-size: 34px; font-weight: 900;
  background: var(--black); color: var(--yellow);
  border: 4px solid var(--black); box-shadow: var(--shadow-sm);
  padding: 4px 16px;
}
.demo-chip {
  background: var(--yellow); border: 3px solid var(--black);
  box-shadow: var(--shadow-sm); font-size: 14px; font-weight: 900;
  padding: 10px 16px; animation: comboGold .6s steps(5);
}
.demo-bubble {
  background: var(--white); border: 3px solid var(--black);
  box-shadow: var(--shadow-sm); padding: 8px 12px;
  font-size: 13px; font-weight: 900;
  animation: bubblePop .5s steps(5);
}
.demo-flash {
  position: fixed; inset: 0; z-index: 9997;
  background: rgba(0, 0, 0, .9);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  pointer-events: none; visibility: hidden; opacity: 0;
}
.demo-flash.show { visibility: visible; opacity: 1; transition: opacity .18s steps(3); }

/* 称谓管理（Q35） */
.title-group-row { margin-bottom: 8px; }
.title-group-row select { width: 100%; border: 3px solid var(--black); padding: 10px; font-size: 15px; font-weight: 700; box-shadow: var(--shadow-sm); background: var(--white); }
.title-rows { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.title-row { display: flex; align-items: center; gap: 8px; }
.title-idx {
  flex: none; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--black); color: var(--yellow);
  border: 3px solid var(--black); font-size: 13px; font-weight: 900;
}
.title-row input {
  flex: 1; min-width: 0; border: 3px solid var(--black); padding: 9px;
  font-size: 15px; font-weight: 700; box-shadow: var(--shadow-sm); background: var(--white);
}
.title-row input.ti-exp { flex: none; width: 92px; }
.title-save-btn { width: 100%; min-height: 52px; margin-top: 4px; }
.title-note { font-size: 12px; font-weight: 700; opacity: .7; line-height: 1.6; margin-bottom: 10px; }

/* 个人能力编辑（Q39） */
.abil-edit-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.abil-edit-row {
  display: flex; align-items: center; gap: 8px;
  border: 3px solid var(--black); background: var(--paper); padding: 6px 8px;
}
.abil-edit-row span { flex: 1; min-width: 0; font-size: 14px; font-weight: 900; word-break: break-all; }
.abil-edit-row .btn { min-height: 36px; min-width: 44px; padding: 2px 8px; font-size: 13px; }
.abil-add-row { display: flex; gap: 8px; }
.abil-add-row input { flex: 1; min-width: 0; }

/* 九宫格设置弹窗（Q31） */
#pattern-set-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#pattern-set-box svg { width: min(250px, 62vw); height: auto; touch-action: none; }
.pat-hint {
  font-size: 13px; font-weight: 900; letter-spacing: 1px;
  background: var(--black); color: var(--yellow);
  border: 3px solid var(--black); padding: 6px 14px; text-align: center;
}
.pat-err { color: var(--red); font-size: 12px; font-weight: 900; min-height: 16px; text-align: center; }

/* 开关（Q65 V1.4：正圆圆钮 + 椭圆轨，经典手机开关样式，内外垂直居中） */
.switch { position: relative; display: inline-block; width: 62px; height: 34px; flex: none; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: var(--gray);
  border: 3px solid var(--black); cursor: pointer;
  border-radius: 999px;
  transition: background .2s;
}
.slider::after {
  content: ''; position: absolute; top: 50%; left: 3px;
  /* Q71 V1.5：圆钮精确垂直居中。
     坑：全局 * { box-sizing:border-box } 不匹配伪元素，::after 默认 content-box（22px 内容+6px 边框=28px 实际渲染，顶部被外框上边框遮住→视觉偏上）。
     修复：显式 border-box → 圆钮总 22px，translateY(-50%)=-11px，与外框内容区完美居中，不超出。 */
  box-sizing: border-box;
  transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--black);
  box-shadow: 1px 1px 0 var(--black);
  transition: transform .22s steps(4);
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::after { transform: translate(28px, -50%); }

/* ================= 底部 Tab 导航 ================= */
#bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: flex; background: var(--white);
  border-top: var(--border-thick);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1; min-height: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--white); border: none;
  font-size: 12px; font-weight: 900; color: var(--black);
  border-top: 4px solid transparent;
  transition: background .15s;
}
.nav-item .ni { font-size: 21px; line-height: 1; }
.nav-item .ni svg { width: 24px; height: 24px; display: block; margin: 0 auto; }
.nav-item:active { background: var(--gray); }
.nav-item.active {
  background: var(--yellow);
  border-top: 4px solid var(--black);
  animation: tabJump .32s steps(4);
}
@keyframes tabJump {
  0% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

/* ================= PC 侧边栏（≥1200px） ================= */
#sidebar { display: none; }

/* ================= 弹窗 ================= */
.modal-mask {
  position: fixed; inset: 0; z-index: 9980;
  background: rgba(0, 0, 0, .62);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  width: min(92vw, 430px); max-height: 86vh; overflow-y: auto;
  background: var(--white); border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  animation: modalIn .28s steps(5);
}
@keyframes modalIn {
  0% { transform: scale(.6) rotate(-3deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.modal-title {
  background: var(--black); color: var(--white);
  font-size: 18px; font-weight: 900; letter-spacing: 1px;
  padding: 12px 16px; border-bottom: 4px solid var(--black);
}
.modal-body { padding: 16px; }
.modal-body label { display: block; font-size: 13px; font-weight: 900; margin: 12px 0 6px; }
.modal-body input, .modal-body select {
  width: 100%; border: 3px solid var(--black); padding: 11px;
  font-size: 15px; font-weight: 700; box-shadow: var(--shadow-sm);
  background: var(--white);
}
.modal-body p { font-size: 14px; font-weight: 700; line-height: 1.8; }
.form-note { font-size: 12px; opacity: .7; margin-top: 10px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; padding: 0 16px 16px; }
.modal-actions .btn { flex: 1; }

/* ================= Toast（Q30：顶部弹出，不遮挡底部 Tab） ================= */
.toast {
  position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); bottom: auto; z-index: 9995;
  transform: translateX(-50%) translateY(-220%);
  background: var(--yellow); color: var(--black);
  border: var(--border-thick); box-shadow: var(--shadow-lg);
  padding: 14px 22px; font-size: 16px; font-weight: 900; text-align: center;
  max-width: 86vw; letter-spacing: .5px;
  transition: transform .28s steps(5);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ================= 升级庆祝（印章盖章式） ================= */
.celebration {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0, 0, 0, .78);
  display: none; align-items: center; justify-content: center;
}
.celebration.show { display: flex; }
.stamp {
  position: relative;
  background: var(--white); border: 6px solid var(--black);
  box-shadow: 14px 14px 0 var(--black);
  padding: 20px 38px; text-align: center;
  transform: rotate(-8deg);
  animation: stampIn .34s steps(6) forwards;
}
@keyframes stampIn {
  0%   { transform: rotate(-24deg) scale(3.2); opacity: 0; }
  60%  { transform: rotate(-4deg) scale(.92); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1); opacity: 1; }
}
.stamp-flag {
  display: inline-block; background: var(--red); color: var(--white);
  font-size: 11px; font-weight: 900; letter-spacing: 3px;
  border: 3px solid var(--black); padding: 3px 10px;
  animation: flagShake .5s steps(4) .2s infinite;
}
@keyframes flagShake {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(4deg); }
}
.stamp-lv { font-size: 18px; font-weight: 900; margin-top: 10px; letter-spacing: 2px; color: var(--blue); }
.stamp-title { font-size: 54px; font-weight: 900; line-height: 1.15; }
.stamp-seal {
  position: absolute; right: -26px; top: -26px;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--red); color: var(--white);
  border: 5px solid var(--black);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; transform: rotate(14deg);
}
#confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cf {
  position: absolute; top: 42%; left: 50%;
  width: 16px; height: 16px; border: 3px solid var(--black);
  animation: cfFly .85s steps(8) forwards;
}
@keyframes cfFly {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--cx), var(--cy)) rotate(720deg); opacity: 0; }
}

/* 通用提示条 */
.note-box {
  border: 3px dashed var(--black); background: var(--white);
  padding: 10px 12px; font-size: 13px; font-weight: 700;
  line-height: 1.7; margin-top: 14px;
}
.nb-tag {
  display: inline-block; background: var(--yellow); border: 2px solid var(--black);
  font-size: 11px; font-weight: 900; letter-spacing: 1px;
  padding: 2px 7px; margin-right: 6px;
}

/* ================= QA 自检钩子 ================= */
#qa-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 9999;
  padding: 5px; font: 12px/1.5 sans-serif; text-align: center; color: #fff;
}

/* ================= 平板 / PC 自适应 ================= */
@media (min-width: 768px) {
  main { max-width: 720px; padding: 20px 24px calc(100px); }
  .mood { min-width: 88px; }
  .task-list { gap: 12px; }
}

@media (max-width: 480px) {
  /* 窄屏：图表 X 轴标签更紧凑（JS 控制显示密度） */
  .chart-x span { font-size: 8px; }
  .bar-fill { max-width: 18px; }
  .profile-grid { flex-wrap: wrap; }
  .profile-grid label { flex: 1 1 88px; }
}

@media (min-width: 1200px) {
  body { padding-left: 236px; }
  main { max-width: 1000px; padding: 26px 34px 40px; }

  #sidebar {
    display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0; bottom: 0; width: 236px;
    background: var(--white); border-right: var(--border-thick);
    padding: 18px 14px; z-index: 50;
  }
  .side-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
  .side-logo {
    width: 46px; height: 46px; flex: none;
    background: var(--yellow); border: 4px solid var(--black);
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 900; transform: rotate(-4deg);
  }
  .side-name { font-size: 17px; font-weight: 900; letter-spacing: 1px; }
  .side-sub { font-size: 9px; font-weight: 900; letter-spacing: 2px; color: var(--blue); }
  .side-nav { flex: 1; overflow-y: auto; }
  .side-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 11px 12px; margin-bottom: 8px;
    background: var(--white); border: 3px solid var(--black);
    box-shadow: 3px 3px 0 var(--black);
    font-size: 14px; font-weight: 900; color: var(--black); text-align: left;
    transition: transform .05s linear, box-shadow .05s linear;
  }
  .side-item:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--black); }
  .side-item.active { background: var(--yellow); box-shadow: 3px 3px 0 var(--black); }
  .si { font-size: 18px; }
  .si svg { width: 18px; height: 18px; display: block; }
  .side-foot {
    font-size: 11px; font-weight: 900; letter-spacing: 1px;
    background: var(--black); color: var(--yellow);
    border: 3px solid var(--black); padding: 8px 10px; text-align: center;
  }

  #bottom-nav { display: none; }

  /* PC 宽屏：统计页双栏 */
  @media (min-width: 1400px) {
    #page-stats .card:first-of-type,
    #page-stats .card:nth-of-type(2) { width: 48%; float: left; margin-right: 2%; }
    #page-stats .card:nth-of-type(3) { width: 100%; float: left; }
    #page-stats::after { content: ''; display: block; clear: both; }
  }
}

/* ============================================================
 * 二期：数据备份 / 浏览器通知 / 成就徽章（Q9/Q12/Q20）
 * ============================================================ */
.backup-meta {
  font-size: 13px; font-weight: 700; line-height: 1.7;
  background: var(--paper); border: 3px solid var(--black);
  padding: 9px 10px; margin-bottom: 10px; word-break: break-all;
}
.backup-meta b { color: var(--blue); }
.backup-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.backup-actions .btn { flex: none; }
.backup-note {
  flex: 1 1 150px; min-width: 0; font-size: 12px; font-weight: 700;
  opacity: .75; line-height: 1.6;
}

.notif-status {
  font-size: 13px; font-weight: 900; line-height: 1.6;
  background: var(--black); color: var(--yellow);
  border: 3px solid var(--black); padding: 6px 10px; margin-bottom: 10px;
  word-break: break-all;
}
.notif-grid { display: flex; gap: 8px; margin-bottom: 10px; }
.notif-grid label { flex: 1; min-width: 0; font-size: 13px; font-weight: 900; }
.notif-grid input {
  width: 100%; border: 3px solid var(--black); padding: 8px;
  font-size: 15px; font-weight: 700; background: var(--white);
  margin-top: 4px; box-shadow: var(--shadow-sm);
}

/* 成就徽章网格 */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.ach-item {
  position: relative; border: 4px solid var(--black);
  padding: 10px 6px 8px; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .05s linear;
}
.ach-item:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--black); }
.ach-item.unlocked { background: var(--yellow); }
.ach-item.locked { background: var(--gray); }
.ach-icon {
  width: 44px; height: 44px; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--black); border: 3px solid var(--black);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
}
.ach-icon svg { width: 24px; height: 24px; }
.ach-item.locked .ach-icon { background: #C9C4B8; border-color: #8A867A; box-shadow: none; }
.ach-item.locked .ach-icon svg { opacity: .35; }
.ach-item.locked .ach-name, .ach-item.locked .ach-desc { color: #6B675C; }
.ach-name { font-size: 13px; font-weight: 900; line-height: 1.3; word-break: break-all; }
.ach-desc { font-size: 10px; font-weight: 700; line-height: 1.4; margin-top: 3px; opacity: .75; word-break: break-all; }
.ach-stamp {
  display: inline-block; margin-top: 6px;
  background: var(--red); color: var(--white);
  border: 2px solid var(--black); font-size: 10px; font-weight: 900;
  padding: 1px 6px; letter-spacing: 1px;
}
.ach-progress {
  display: inline-block; font-size: 13px; font-weight: 900;
  background: var(--black); color: var(--white); padding: 4px 10px;
}

/* 提醒中心：自定义提醒删除 / 已触发标记 */
.rem-del { flex: none; min-height: 34px; min-width: 40px; padding: 2px 8px; font-size: 13px; }
.rem-fired {
  display: inline-block; margin-top: 6px; margin-left: 6px;
  font-size: 10px; font-weight: 900;
  background: var(--gray); border: 2px solid var(--black); padding: 1px 6px;
}

@media (max-width: 480px) {
  .notif-grid { flex-wrap: wrap; }
  .notif-grid label { flex: 1 1 130px; }
  .backup-actions .btn { flex: 1 1 110px; }
}

/* ============================================================
 * V1.1 迭代（Q49 语言设置）：中/韩切换按钮
 * ============================================================ */
.lang-row { display: flex; gap: 10px; }
.lang-btn {
  flex: 1; min-height: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--white); color: var(--black);
  border: 3px solid var(--black); box-shadow: var(--shadow-sm);
  font-size: 15px; font-weight: 900;
  transition: transform .05s linear, box-shadow .05s linear, background .15s;
}
.lang-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--black); }
.lang-btn.active { background: var(--yellow); box-shadow: 3px 3px 0 var(--black); }
.lang-btn .lb-tag {
  font-size: 11px; font-weight: 900; letter-spacing: 1px;
  background: var(--black); color: var(--yellow);
  border: 2px solid var(--black); padding: 1px 6px;
}
.lang-btn.active .lb-tag { background: var(--blue); color: var(--white); }
