/* =========================================================
   气运簿 · 暖阳主题
   ========================================================= */

:root{
  color-scheme: light;
  accent-color: var(--gold);
  --bg: #f8f1e2;
  --bg-soft: #fffaf0;
  --panel: rgba(255,253,247,.82);
  --panel-2: #fffdf8;
  --line: rgba(140,98,38,.20);
  --line-strong: rgba(140,98,38,.40);
  --text: #2b251c;
  --muted: #655b4b;
  --dim: #7d705d;
  --gold: #b07a22;
  --gold-2: #7f520e;
  --jade: #2f8b6d;
  --red: #c0523d;
  --amber: #a96a20;
  --accent: #b07a22;
  --accent-dim: rgba(176,122,34,.24);
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Palatino", "Book Antiqua", Georgia, "Songti SC", "Songti TC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "Avenir Next", Avenir, "PingFang SC", "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

html[lang="zh-Hant"]{
  --serif: "Songti TC", "Songti SC", "STSong", "Noto Serif TC", "Noto Serif SC", serif;
  --sans: "PingFang TC", "PingFang SC", "Hiragino Sans GB", "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
}

*,*::before,*::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  background:
    radial-gradient(1100px 700px at 8% -12%, rgba(255,190,76,.42), transparent 58%),
    radial-gradient(900px 600px at 104% 2%, rgba(255,168,104,.22), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(255,214,144,.24), transparent 62%),
    radial-gradient(700px 500px at 92% 108%, rgba(106,188,154,.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(140,98,38,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,98,38,.055) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 0%, transparent 76%);
          mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 0%, transparent 76%);
}

[hidden]{ display: none !important; }

button, input, select{ font: inherit; color: inherit; }
button{ cursor: pointer; background: none; border: 0; padding: 0; }
a{ color: inherit; text-decoration: none; }
::selection{ background: rgba(214,160,70,.28); }
:focus-visible{ outline: 1px solid rgba(176,122,34,.62); outline-offset: 2px; }

.sr-only{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ========================= 顶栏 ========================= */

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
  padding: 0 34px;
  background: rgba(9,12,11,.78);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

.brand{ display: flex; align-items: center; gap: 12px; flex: none; }

.seal{
  width: 42px;
  height: 42px;
  flex: none;
  display: block;
  border: 0;
  border-radius: 12px;
  background: none;
  box-shadow: none;
  transform: rotate(-3deg);
}
.seal img{
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(100,65,20,.18);
}

.brand-text b{
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.15;
}
.brand-text small{
  display: block;
  margin-top: 2px;
  font-size: 8px;
  letter-spacing: .3em;
  color: var(--dim);
}

.tabs{
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.018);
}
.tabs a{
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--muted);
  transition: color .18s, background .18s, box-shadow .18s;
}
.tabs a:hover{ color: var(--text); }
.tabs a.active{
  color: var(--gold-2);
  background: rgba(216,184,120,.13);
  box-shadow: inset 0 0 0 1px rgba(216,184,120,.18);
}

.top-right{ display: flex; align-items: center; gap: 14px; flex: none; }

.theme-btn{
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
  color: var(--muted);
  transition: color .18s, border-color .18s, background .18s;
}
.theme-btn:hover{ color: var(--text); border-color: var(--line-strong); background: #fff6e2; }
.theme-btn svg{ width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme-btn .icon-sun{ display: none; }

.lang-wrap{ position: relative; flex: none; }
.lang-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1;
  transition: color .18s, border-color .18s, background .18s;
}
.lang-btn:hover{ color: var(--text); border-color: var(--line-strong); background: #fff6e2; }
.lang-globe{ width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-menu{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  min-width: 148px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fffdf8;
  box-shadow: 0 18px 40px -18px rgba(90,58,16,.4);
}
.lang-menu button{
  display: block;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
.lang-menu button:hover{ background: #fff3d6; color: var(--text); }
.lang-menu button.active{ background: #f2ddb0; color: #6d460b; }

.period-select{
  -webkit-appearance: none;
  appearance: none;
  padding: 7px 26px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: rgba(255,255,255,.025);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23989c93' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .18s, color .18s;
}
.period-select:hover{ border-color: var(--line-strong); color: var(--text); }
.period-select option{ background: #121614; color: var(--text); }

.date-chip{
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (min-width: 861px){
  .topbar{
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }
  .top-right{ justify-self: end; }
}

/* ========================= 通用 ========================= */

.wrap{
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 34px 80px;
}

.card{
  position: relative;
  background: linear-gradient(165deg, rgba(255,255,255,.045), rgba(255,255,255,.014) 55%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.04);
}
.card::before{
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243,223,180,.26), transparent);
  pointer-events: none;
}

.btn{
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, filter .18s, transform .12s;
}
.btn:hover{ border-color: var(--line-strong); background: rgba(255,255,255,.04); }
.btn:active{ transform: translateY(1px); }
.btn-gold{
  color: #1a1710;
  font-weight: 600;
  border-color: transparent;
  background: linear-gradient(135deg, #e8cd96, #c9a565);
  box-shadow: 0 6px 24px rgba(216,184,120,.18);
}
.btn-gold:hover{ filter: brightness(1.06); background: linear-gradient(135deg, #e8cd96, #c9a565); }
.btn-ghost{ background: rgba(255,255,255,.02); }
.btn-sm{ padding: 8px 13px; font-size: 12px; border-radius: 8px; }
.btn-block{ width: 100%; }
.btn.danger{ color: var(--red); border-color: rgba(221,118,99,.28); }
.btn.danger:hover{ background: rgba(221,118,99,.08); border-color: rgba(221,118,99,.5); }

.plus{ font-size: 14px; margin-top: -1px; }

.pos{ color: var(--jade); }
.neg{ color: var(--red); }

.muted-xs{ font-size: 10.5px; color: var(--dim); letter-spacing: .08em; }

.panel-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-title{
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .06em;
}
.panel-sub{ margin: 4px 0 0; font-size: 11.5px; color: var(--dim); }

.card-sub{ margin: 5px 0 0; font-size: 11.5px; color: var(--dim); line-height: 1.7; }

.link-btn{
  color: var(--gold);
  font-size: 12px;
  border-bottom: 1px solid rgba(216,184,120,.28);
  padding-bottom: 1px;
  transition: color .18s, border-color .18s;
}
.link-btn:hover{ color: var(--gold-2); border-color: var(--gold-2); }

/* ========================= 示例条 ========================= */

.banner{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 11px 16px;
  border: 1px solid rgba(216,184,120,.22);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(216,184,120,.10), rgba(216,184,120,.015));
  font-size: 12.5px;
  color: var(--muted);
}
.banner p{ margin: 0; flex: 1; }
.banner b{ color: var(--gold-2); font-weight: 500; }
.banner-tag{
  flex: none;
  padding: 3px 7px;
  border: 1px solid rgba(216,184,120,.4);
  border-radius: 4px;
  color: var(--gold);
  font-size: 9.5px;
  letter-spacing: .16em;
}
.banner .btn{ flex: none; }

/* ========================= 首屏 ========================= */

.hero{
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: center;
  gap: 46px;
  padding: 32px 38px;
  overflow: hidden;
}
.hero::after{
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  left: -120px; top: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim), transparent 65%);
  opacity: .18;
  pointer-events: none;
}

.gauge-wrap{
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
  flex: none;
}
.gauge{ width: 100%; height: 100%; display: block; }
.gauge-track{
  fill: none;
  stroke: rgba(255,255,255,.065);
  stroke-width: 8;
}
.gauge-arc{
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 7px var(--accent-dim));
  transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1), stroke .6s, filter .6s;
}
.gauge-ticks line{ stroke: rgba(216,184,120,.2); stroke-width: 1; }
.gauge-ticks line.major{ stroke: rgba(216,184,120,.42); }

.gauge-ring-deco{
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px dashed rgba(216,184,120,.11);
  animation: spin 180s linear infinite;
}

.gauge-center{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.score{
  font-family: var(--serif);
  font-size: 78px;
  font-weight: 500;
  line-height: .95;
  letter-spacing: -2px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 34px var(--accent-dim);
}
.score.pop{ animation: pop .34s ease; }
.score-cap{
  margin-top: 9px;
  font-size: 9.5px;
  letter-spacing: .32em;
  text-indent: .32em;
  color: var(--dim);
}
.level{
  margin-top: 13px;
  padding: 3px 11px;
  border: 1px solid rgba(216,184,120,.24);
  border-radius: 999px;
  color: var(--accent);
  font-size: 10.5px;
  letter-spacing: .14em;
  white-space: nowrap;
}

.hero-copy{ min-width: 0; }

.eyebrow{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .28em;
}
.dot-sep{
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .55;
}

.hero h1{
  margin: 14px 0 12px;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: .005em;
}
.verdict{
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.verdict b{ color: var(--gold-2); font-weight: 500; }

.hero-stats{
  display: flex;
  max-width: 580px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.hero-stats div{
  flex: 1;
  padding: 0 26px;
  border-left: 1px solid rgba(255,255,255,.07);
}
.hero-stats div:first-child{ padding-left: 0; border-left: 0; }
.hero-stats b{
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  font-variant-numeric: lining-nums tabular-nums;
}
.hero-stats span{ font-size: 10.5px; color: var(--dim); letter-spacing: .07em; }

.spark{ max-width: 580px; margin-top: 22px; }
.spark-head{
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 9.5px;
  letter-spacing: .12em;
}
.spark-bars{
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 34px;
}
.spark-bars i{
  flex: 1;
  min-height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,.09);
  transition: height .5s ease;
}
.spark-bars i.pos{ background: linear-gradient(to top, rgba(108,199,168,.3), rgba(108,199,168,.75)); }
.spark-bars i.neg{ background: linear-gradient(to top, rgba(221,118,99,.3), rgba(221,118,99,.7)); }

/* ========================= 记录 ========================= */

.log-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  margin-top: 18px;
}

.quick-card{ padding: 26px 28px; }

.kind-seg{
  display: inline-flex;
  gap: 2px;
  margin-bottom: 17px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0,0,0,.2);
}
.kind-seg button{
  padding: 6px 17px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  transition: color .18s, background .18s;
}
.kind-seg button:hover{ color: var(--text); }
.kind-seg button.active{
  color: var(--gold-2);
  background: rgba(216,184,120,.14);
}

.chips{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.chip{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 11px;
  background: rgba(255,255,255,.022);
  font-size: 13px;
  text-align: left;
  transition: transform .16s, border-color .16s, background .16s;
}
.chip:hover{
  transform: translateY(-1px);
  border-color: rgba(216,184,120,.32);
  background: rgba(216,184,120,.055);
}
.chip:active{ transform: translateY(0) scale(.985); }
.chip.hit{ animation: hit .45s ease-out; }

.chip-label{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.chip-label span{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  line-height: 1.35;
}
.dot{
  flex: none;
  width: 5px; height: 5px;
  border-radius: 50%;
}
.dot.pos{ background: var(--jade); box-shadow: 0 0 8px rgba(108,199,168,.65); }
.dot.neg{ background: var(--red); box-shadow: 0 0 8px rgba(221,118,99,.5); }

.pts{
  flex: none;
  font-family: var(--serif);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.chip.custom{
  grid-column: 1 / -1;
  justify-content: center;
  color: var(--muted);
  border-style: dashed;
  background: transparent;
}
.chip.custom:hover{ color: var(--gold-2); }

.quick-foot{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  font-size: 11.5px;
  color: var(--dim);
}

.today-card{
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
}
.today-score{
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 8px;
}
.today-score b{
  font-family: var(--serif);
  font-size: 54px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.today-score span{ color: var(--dim); font-size: 10.5px; letter-spacing: .16em; }
.today-meta{ margin: 4px 0 15px; color: var(--muted); font-size: 11px; }
.today-list{
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}
.today-item{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255,255,255,.06);
  font-size: 12px;
}
.today-item:last-child{ border-bottom: 0; padding-bottom: 0; }
.today-item span{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.today-item b{ font-family: var(--serif); font-weight: 500; font-variant-numeric: tabular-nums; }
.empty-mini{
  margin: 8px 0;
  padding: 18px 10px;
  border: 1px dashed rgba(255,255,255,.08);
  border-radius: 10px;
  color: var(--dim);
  font-size: 11.5px;
  text-align: center;
  line-height: 1.7;
}

.daily-card{
  margin-top: 18px;
  padding: 26px 28px;
  overflow: hidden;
}
.daily-head{ align-items: flex-start; }
.daily-card .panel-title{ font-size: 21px; }

.daily-goal{
  flex: none;
  width: 172px;
  padding: 10px 13px 9px;
  border: 1px solid rgba(216,184,120,.2);
  border-radius: 11px;
  background: rgba(216,184,120,.045);
}
.daily-goal-top{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: .06em;
}
.daily-goal-top b{
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.daily-goal-bar{
  height: 3px;
  margin: 9px 0 6px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255,255,255,.06);
}
.daily-goal-bar i{
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  transition: width .5s ease;
}
.daily-goal em{
  color: var(--dim);
  font-style: normal;
  font-size: 10px;
  letter-spacing: .04em;
}
.daily-goal em.done{ color: var(--jade); }

.daily-lead{
  max-width: 880px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.85;
}

.daily-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.daily-item{
  position: relative;
  padding: 16px 17px 15px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
  overflow: hidden;
}
.daily-item::before{
  content: "";
  position: absolute;
  left: 0; top: 15px; bottom: 15px;
  width: 2px;
  border-radius: 2px;
  background: var(--gold);
  opacity: .55;
}
.daily-item.stop::before{ background: var(--red); }
.daily-item.log::before{ background: var(--jade); }
.daily-tag{
  color: var(--gold);
  font-size: 9.5px;
  letter-spacing: .2em;
}
.daily-item.stop .daily-tag{ color: var(--red); }
.daily-item.log .daily-tag{ color: var(--jade); }
.daily-item b{
  display: block;
  margin: 7px 0 3px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}
.daily-item b em{
  margin-left: 5px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .02em;
}
.daily-item p{
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.timeline-card{
  margin-top: 18px;
  padding: 26px 28px;
}

.day-group + .day-group{ margin-top: 8px; }
.day-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 14px 0 8px;
  border-top: 1px solid rgba(255,255,255,.05);
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
}
.day-group:first-child .day-head{
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.entry{
  display: grid;
  grid-template-columns: 48px 28px minmax(0, 1fr) auto 22px;
  gap: 11px;
  align-items: start;
  padding: 9px 0;
}
.entry-time{
  padding-top: 4px;
  color: var(--dim);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.entry-seal{
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-family: var(--serif);
  font-size: 12px;
  opacity: .82;
}
.seal-thought{ color: var(--gold); }
.seal-action{ color: var(--jade); }
.seal-result{ color: var(--amber); }

.entry-main{ min-width: 0; padding-top: 1px; }
.entry-label{ font-size: 13.5px; line-height: 1.55; }
.entry-note{
  margin-top: 1px;
  overflow: hidden;
  color: var(--dim);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-pts{
  padding-top: 2px;
  font-family: var(--serif);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.entry-del{
  padding: 2px;
  opacity: 0;
  color: var(--dim);
  font-size: 17px;
  line-height: 1;
  transition: opacity .15s, color .15s;
}
.entry:hover .entry-del{ opacity: .65; }
.entry-del:hover{ opacity: 1; color: var(--red); }

.demo-tag{
  display: inline-block;
  margin-left: 6px;
  padding: 1px 4px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 3px;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .08em;
  vertical-align: 1px;
}

.empty{
  padding: 44px 20px;
  border: 1px dashed rgba(255,255,255,.1);
  border-radius: 12px;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.9;
  text-align: center;
}
.empty b{
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
}
.empty-actions{ margin-top: 14px; }
.empty-note{
  margin-top: 12px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: .04em;
}

/* ========================= 分析 ========================= */

.view > .card{ margin-top: 18px; }
.view > .card:first-child{ margin-top: 0; }

.report{ padding: 32px 34px; }
.report-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.report h2{
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: .03em;
}
.report-lead{
  max-width: 860px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.95;
}
.report-conclusion{
  margin: 22px 0 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--gold);
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.8;
}
.report-points{
  display: grid;
  gap: 11px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.report-points li{
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}
.report-points b{
  color: var(--text);
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: .06em;
}
.report-points em{ font-style: normal; color: var(--gold-2); }

.one-thing{
  margin-top: 24px;
  padding: 14px 18px;
  border: 1px solid rgba(216,184,120,.2);
  border-radius: 12px;
  background: rgba(216,184,120,.07);
  color: var(--gold-2);
  font-size: 13.5px;
  line-height: 1.8;
}

.chain-card{ padding: 26px 28px; }
.chain-card h3, .analysis-grid h3, .data-card h2{
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .08em;
}

.chain{
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 20px;
}
.chain-node{
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
}
.chain-node small{
  display: block;
  margin-bottom: 9px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: .18em;
}
.chain-node b{
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.chain-node em{
  display: block;
  margin-top: 5px;
  color: var(--dim);
  font-style: normal;
  font-size: 10px;
}
.chain-arrow{
  align-self: center;
  color: var(--dim);
  font-size: 14px;
}

.analysis-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.analysis-grid .card{ padding: 24px 26px; }

.chart{
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 170px;
  margin-top: 18px;
}
.bar-col{
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 100%;
}
.bar-area{
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 34px;
  border-radius: 4px;
  background: linear-gradient(to bottom, transparent calc(50% - .5px), rgba(255,255,255,.075) 50%, transparent calc(50% + .5px));
}
.bar{
  position: absolute;
  left: 16%;
  right: 16%;
  min-height: 2px;
  border-radius: 3px;
}
.bar.pos{
  bottom: 50%;
  background: linear-gradient(to top, rgba(108,199,168,.28), rgba(108,199,168,.9));
}
.bar.neg{
  top: 50%;
  background: linear-gradient(to bottom, rgba(221,118,99,.28), rgba(221,118,99,.85));
}
.bar.zero{
  top: calc(50% - 1px);
  height: 2px;
  background: rgba(255,255,255,.2);
}
.bar-x{
  color: var(--dim);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.bar-col.today .bar-x{ color: var(--gold); }
.bar-col.today .bar-area{ background-color: rgba(216,184,120,.035); }

table{
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 12.5px;
}
th{
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .12em;
  text-align: left;
}
td{
  padding: 11px 0;
  border-bottom: 1px dashed rgba(255,255,255,.06);
  vertical-align: middle;
}
td:nth-child(2), td:nth-child(3){
  width: 64px;
  font-variant-numeric: tabular-nums;
}
td:last-child{
  color: var(--muted);
  font-size: 11.5px;
  text-align: right;
}
tr:last-child td{ border-bottom: 0; }

.rank-list{
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.rank-top{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 12.5px;
}
.rank-top em{
  margin-left: 6px;
  color: var(--dim);
  font-style: normal;
  font-size: 10px;
}
.rank-top b{
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.rank-bar{
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255,255,255,.05);
}
.rank-bar i{
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(47,139,109,.35), rgba(47,139,109,.95));
}
.rank.neg .rank-bar i{
  background: linear-gradient(90deg, rgba(192,82,61,.35), rgba(192,82,61,.9));
}
.empty-mini.wide{ margin-top: 18px; }

.advice{
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: adv;
}
.advice li{
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
}
.advice li::before{
  counter-increment: adv;
  content: "0" counter(adv);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.2;
  opacity: .75;
}
.advice b{ display: block; margin-bottom: 2px; font-size: 13.5px; font-weight: 500; }
.advice p{ margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.75; }

/* ========================= 规则 ========================= */

.rules-card, .data-card{ padding: 28px 30px; }

.rule-head-actions{ display: flex; align-items: center; gap: 12px; }
.save-flash{
  color: var(--jade);
  font-size: 10.5px;
  letter-spacing: .1em;
  opacity: 0;
  transition: opacity .2s;
}
.save-flash.show{ opacity: 1; }

.rule-note{
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.85;
}

.template-bar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 20px;
  padding: 10px 12px;
  border: 1px dashed rgba(216,184,120,.18);
  border-radius: 10px;
  background: rgba(216,184,120,.025);
}
.template-label{
  margin-right: 3px;
  color: var(--dim);
  font-size: 9.5px;
  letter-spacing: .16em;
}
.template-bar button{
  padding: 5px 11px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  transition: color .15s, border-color .15s, background .15s;
}
.template-bar button:hover{
  color: var(--gold-2);
  border-color: rgba(216,184,120,.35);
  background: rgba(216,184,120,.06);
}
.template-hint{
  margin-left: auto;
  color: var(--dim);
  font-size: 9.5px;
}

.rule-group + .rule-group{ margin-top: 22px; }
.rule-group-head{
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .1em;
}
.rule-group-head small{
  color: var(--dim);
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .08em;
}

.rule-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 28px;
  gap: 12px;
  align-items: center;
  padding: 6px 2px;
  border-bottom: 1px dashed rgba(255,255,255,.055);
}
.rule-row input[type="text"]{
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  font-size: 13.5px;
  transition: background .15s, border-color .15s;
}
.rule-row input[type="text"]:hover{ background: rgba(255,255,255,.03); }
.rule-row input[type="text"]:focus{
  border-color: rgba(216,184,120,.35);
  background: rgba(0,0,0,.2);
  outline: none;
}
.rule-points{
  width: 78px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  background: rgba(0,0,0,.22);
  font-family: var(--serif);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.rule-points:focus{ border-color: rgba(216,184,120,.5); outline: none; }

.add-rule{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 96px auto;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.add-rule input, .add-rule select,
.field input{
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  background: rgba(0,0,0,.25);
  color: var(--text);
  font-size: 13px;
}
.add-rule input:focus, .add-rule select:focus, .field input:focus{
  border-color: rgba(216,184,120,.5);
  outline: none;
}
.add-rule select{ cursor: pointer; }
.add-rule option{ background: #121614; }

.data-card{ margin-top: 18px; }
.data-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.formula{
  padding: 14px 16px;
  border: 1px dashed rgba(216,184,120,.2);
  border-radius: 10px;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.9;
}

/* ========================= 弹窗 / Toast ========================= */

dialog{
  max-width: 100vw;
  padding: 0;
  border: 0;
  background: transparent;
}
dialog::backdrop{
  background: rgba(3,5,4,.72);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

.modal{
  width: min(480px, calc(100vw - 32px));
  padding: 26px;
  border: 1px solid rgba(216,184,120,.25);
  border-radius: 20px;
  background: linear-gradient(170deg, #121715, #0b0f0e);
  box-shadow: 0 40px 120px rgba(0,0,0,.7);
}
.modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal h3{
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .08em;
}
.field{ margin-bottom: 14px; }
.field label{
  display: block;
  margin-bottom: 7px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: .16em;
}
.field-row{
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
}
.seg{
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0,0,0,.18);
}
.seg button{
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  transition: color .15s, background .15s;
}
.seg button.active{
  color: var(--gold-2);
  background: rgba(216,184,120,.14);
}
.modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.icon-btn{
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--dim);
  font-size: 20px;
  line-height: 1;
}
.icon-btn:hover{ background: rgba(255,255,255,.06); color: var(--text); }

.toast{
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border: 1px solid rgba(216,184,120,.3);
  border-radius: 999px;
  background: rgba(18,24,21,.96);
  box-shadow: 0 16px 50px rgba(0,0,0,.6);
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity .25s, transform .25s;
}
.toast.show{ opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.toast button{
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,.12);
  color: var(--gold);
  font-size: 12px;
}

/* ========================= 页脚 ========================= */

footer{
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 34px 34px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: .06em;
}

/* ========================= 动画 ========================= */

@keyframes spin{ to{ transform: rotate(360deg); } }
@keyframes pop{
  0%{ transform: scale(1); }
  45%{ transform: scale(1.08); }
  100%{ transform: scale(1); }
}
@keyframes hit{
  0%{ box-shadow: 0 0 0 0 rgba(216,184,120,.35); }
  100%{ box-shadow: 0 0 0 12px rgba(216,184,120,0); }
}
@keyframes fade{
  from{ opacity: 0; transform: translateY(4px); }
  to{ opacity: 1; transform: none; }
}
.view{ animation: fade .35s ease; }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================= 响应式 ========================= */

@media (max-width: 1040px){
  .hero{ grid-template-columns: 260px minmax(0, 1fr); gap: 30px; padding: 28px; }
  .gauge-wrap{ width: 260px; height: 260px; }
  .score{ font-size: 66px; }
  .log-grid{ grid-template-columns: minmax(0, 1fr) 300px; }
  .chips{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar{ padding: 0 22px; gap: 16px; }
  .wrap{ padding: 24px 22px 70px; }
  footer{ padding: 0 22px 30px; }
}

@media (max-width: 860px){
  .daily-grid{ grid-template-columns: 1fr; }
  .daily-head{ flex-direction: column; gap: 12px; }
  .daily-goal{ width: 100%; }
  .daily-lead{ font-size: 13px; }
  .hero{ grid-template-columns: 1fr; gap: 18px; text-align: left; }
  .gauge-wrap{ width: 240px; height: 240px; }
  .score{ font-size: 60px; }
  .hero-copy{ padding: 0 4px; }
  .hero h1{ font-size: 30px; }
  .hero-stats{ max-width: none; }
  .spark{ max-width: none; }
  .log-grid{ grid-template-columns: 1fr; }
  .today-list{ min-height: 0; }
  .analysis-grid{ grid-template-columns: 1fr; }
  .date-chip{ display: none; }
  .brand-text small{ display: none; }
}

@media (max-width: 720px){
  .topbar{ height: 64px; gap: 10px; }
  .brand-text b{ font-size: 17px; letter-spacing: .1em; }
  .seal{ width: 34px; height: 34px; }
  .seal img{ border-radius: 9px; }
  .tabs a{ padding: 6px 12px; font-size: 12px; }
  .period-select{ padding: 6px 24px 6px 8px; font-size: 11px; }
  .lang-btn{ padding: 6px 8px; font-size: 11px; }
  .btn-sm{ padding: 7px 11px; }
  .wrap{ padding: 20px 16px 60px; }
  footer{ padding: 0 16px 26px; flex-direction: column; gap: 4px; }
  .hero{ padding: 24px 20px; }
  .quick-card, .timeline-card, .rules-card, .data-card, .daily-card{ padding: 22px 20px; }
  .report{ padding: 24px 20px; }
  .report h2{ font-size: 23px; }
  .report-points li{ grid-template-columns: 1fr; gap: 2px; }
  .chain{ flex-direction: column; }
  .chain-arrow{ align-self: center; transform: rotate(90deg); }
  .chart{ height: 140px; }
  .add-rule{ grid-template-columns: 1fr 1fr; }
  .add-rule .btn{ grid-column: 1 / -1; }
  .banner{ flex-wrap: wrap; }
  .banner p{ flex-basis: 100%; }
  .entry{ grid-template-columns: 40px 24px minmax(0, 1fr) auto 26px; gap: 8px; }
  .entry-seal{ width: 24px; height: 24px; font-size: 11px; }
  .entry-del{ opacity: .45; font-size: 19px; }
  .report-head{ align-items: flex-start; }
  .report-head .btn{ margin-top: 8px; }
}

@media (hover: none){
  .entry-del{ opacity: .45; }
  .entry-del:hover{ opacity: .9; }
}

@media (max-width: 520px){
  .topbar{ padding: 0 14px; gap: 8px; }
  .brand-text{ display: none; }
  .tabs a{ padding: 6px 10px; }
  .top-right{ gap: 8px; }
  .period-select{ max-width: 86px; }
  .btn-label{ display: none; }
  #quickAddBtn{ padding: 8px 10px; }
  .hero-stats div{ padding: 0 14px; }
  .hero-stats b{ font-size: 21px; }
  .hero h1{ font-size: 27px; }
  .score{ font-size: 54px; }
  .score-cap{ font-size: 9px; }
  .chips{ grid-template-columns: 1fr; }
  .kind-seg{ width: 100%; }
  .kind-seg button{ flex: 1; }
  .report-head{ flex-direction: column; }
  .field-row{ grid-template-columns: 1fr; }
}

/* ========================= 明亮主题细节 ========================= */

.topbar{
  background: rgba(250,244,232,.88);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 32px -30px rgba(100,65,20,.55);
}
.brand-text b{ color: var(--text); }
.brand-text small{ color: var(--dim); }
.tabs{
  background: rgba(255,255,255,.55);
  border-color: var(--line);
}
.tabs a{ color: var(--muted); }
.tabs a:hover{ color: var(--text); }
.tabs a.active{
  color: #6d460b;
  background: #f2ddb0;
  box-shadow: inset 0 0 0 1px rgba(176,122,34,.24);
}
.period-select{
  background-color: rgba(255,255,255,.65);
  color: var(--muted);
  border-color: var(--line);
}
.period-select:hover{ color: var(--text); border-color: var(--line-strong); }
.period-select option{ background: #fffaf0; color: var(--text); }
.date-chip{ color: var(--dim); }

.card{
  background: linear-gradient(165deg, #fffdf8, #fffaef 60%);
  border-color: var(--line);
  box-shadow: 0 24px 55px -38px rgba(100,65,20,.45), inset 0 1px 0 #fff;
}
.card::before{
  background: linear-gradient(90deg, transparent, rgba(176,122,34,.22), transparent);
}

.btn{
  color: #5a4b35;
  background: rgba(255,255,255,.55);
  border-color: var(--line);
}
.btn:hover{ background: #fff6e2; border-color: var(--line-strong); }
.btn-gold{
  color: #2b1d06;
  background: linear-gradient(135deg, #f2d18e, #d9a247);
  box-shadow: 0 8px 22px rgba(176,122,34,.22);
}
.btn-gold:hover{
  filter: brightness(1.03);
  background: linear-gradient(135deg, #f2d18e, #d9a247);
}
.btn-ghost{ background: rgba(255,255,255,.45); }
.btn.danger{ color: #b04432; border-color: rgba(192,82,61,.35); }
.btn.danger:hover{ background: rgba(192,82,61,.07); border-color: rgba(192,82,61,.55); }

.link-btn{ color: var(--gold-2); border-color: rgba(176,122,34,.35); }
.link-btn:hover{ color: #5e3b06; border-color: #5e3b06; }

.banner{
  background: linear-gradient(90deg, rgba(255,213,128,.42), rgba(255,250,240,.7));
  border-color: rgba(176,122,34,.28);
  color: var(--muted);
}
.banner b{ color: var(--gold-2); }
.banner-tag{ color: var(--gold-2); border-color: rgba(176,122,34,.45); }

.hero::after{ opacity: .14; }
.eyebrow{ color: var(--gold-2); }
.dot-sep{ background: var(--gold-2); }
.hero h1{ color: var(--text); }
.verdict{ color: var(--muted); }
.verdict b{ color: var(--gold-2); }
.hero-stats{ border-top-color: rgba(150,108,45,.16); }
.hero-stats div{ border-left-color: rgba(150,108,45,.16); }
.hero-stats span{ color: var(--dim); }
.spark-head{ color: var(--dim); }
.spark-bars i{ background: rgba(150,108,45,.12); }
.spark-bars i.pos{ background: linear-gradient(to top, rgba(47,139,109,.25), rgba(47,139,109,.75)); }
.spark-bars i.neg{ background: linear-gradient(to top, rgba(192,82,61,.25), rgba(192,82,61,.7)); }

.gauge-track{ stroke: rgba(150,108,45,.14); }
.gauge-ticks line{ stroke: rgba(150,108,45,.24); }
.gauge-ticks line.major{ stroke: rgba(150,108,45,.42); }
.gauge-ring-deco{ border-color: rgba(176,122,34,.18); }
.score{ text-shadow: 0 2px 20px rgba(200,140,40,.24); }
.score-cap{ color: var(--dim); }
.level{ background: rgba(255,255,255,.55); }

.kind-seg{
  background: rgba(255,255,255,.55);
  border-color: var(--line);
}
.kind-seg button{ color: var(--muted); }
.kind-seg button:hover{ color: var(--text); }
.kind-seg button.active{ color: #6d460b; background: #f2ddb0; }

.chip{
  background: rgba(255,255,255,.62);
  border-color: rgba(150,108,45,.14);
  box-shadow: 0 1px 0 rgba(255,255,255,.9);
}
.chip:hover{ background: #fff6e2; border-color: rgba(176,122,34,.4); }
.chip.custom{ background: transparent; color: var(--muted); }
.chip.custom:hover{ color: var(--gold-2); }
.dot.pos{ background: var(--jade); box-shadow: 0 0 8px rgba(47,139,109,.35); }
.dot.neg{ background: var(--red); box-shadow: 0 0 8px rgba(192,82,61,.3); }
.quick-foot{ color: var(--dim); }

.daily-item{
  background: rgba(255,255,255,.55);
  border-color: rgba(150,108,45,.14);
}

.today-meta{ color: var(--muted); }
.today-item{ border-bottom-color: rgba(150,108,45,.12); }
.today-item span{ color: var(--muted); }
.empty-mini{ border-color: rgba(150,108,45,.16); color: var(--dim); }

.day-head{ border-top-color: rgba(150,108,45,.12); color: var(--dim); }
.entry-time{ color: var(--dim); }
.entry-note{ color: var(--dim); }
.entry-del{ color: var(--dim); }
.demo-tag{ border-color: rgba(150,108,45,.22); color: var(--dim); }
.empty{ border-color: rgba(150,108,45,.18); color: var(--dim); }
.empty b{ color: var(--muted); }
.empty-note{ color: var(--dim); }

.report-lead{ color: var(--muted); }
.report-conclusion{ color: var(--gold-2); border-left-color: var(--gold); }
.report-points li{ color: var(--muted); }
.report-points b{ color: var(--text); }
.one-thing{
  background: #fff3d6;
  border-color: rgba(176,122,34,.28);
  color: #6b450b;
}
.chain-node{ background: #fffdf8; border-color: rgba(150,108,45,.14); }
.chain-node small, .chain-node em{ color: var(--dim); }
.chain-arrow{ color: var(--dim); }

.bar-area{
  background: linear-gradient(to bottom, transparent calc(50% - .5px), rgba(140,98,38,.22) 50%, transparent calc(50% + .5px));
}
.bar.pos{ background: linear-gradient(to top, rgba(47,139,109,.32), rgba(47,139,109,.96)); }
.bar.neg{ background: linear-gradient(to bottom, rgba(192,82,61,.32), rgba(192,82,61,.92)); }
.bar.zero{ background: rgba(140,98,38,.3); }
.bar-x{ color: var(--dim); }
.bar-col.today .bar-area{ background-color: rgba(255,213,128,.14); }

th{ border-bottom-color: var(--line); color: var(--dim); }
td{ border-bottom-color: rgba(150,108,45,.12); }
td:last-child{ color: var(--muted); }
.rank-bar{ background: rgba(150,108,45,.1); }
.advice li{ background: #fffdf8; border-color: rgba(150,108,45,.14); }
.advice p{ color: var(--muted); }

.rule-note{ color: var(--muted); }
.template-bar{
  background: #fff8e8;
  border-color: rgba(176,122,34,.26);
}
.template-label, .template-hint{ color: var(--dim); }
.template-bar button{
  color: var(--muted);
  border-color: rgba(150,108,45,.2);
  background: rgba(255,255,255,.5);
}
.template-bar button:hover{
  color: var(--gold-2);
  border-color: rgba(176,122,34,.45);
  background: #fff3d6;
}
.rule-group-head{ color: var(--gold-2); border-bottom-color: var(--line); }
.rule-group-head small{ color: var(--dim); }
.rule-row{ border-bottom-color: rgba(150,108,45,.12); }
.rule-row input[type="text"]{ color: var(--text); }
.rule-row input[type="text"]:hover{ background: rgba(176,122,34,.05); }
.rule-row input[type="text"]:focus{ background: #fff; border-color: rgba(176,122,34,.4); }
.rule-points{ background: #fff; border-color: rgba(150,108,45,.18); color: var(--text); }
.rule-points:focus{ border-color: rgba(176,122,34,.55); }
.add-rule{ border-top-color: var(--line); }
.add-rule input, .add-rule select, .field input{
  background: #fff;
  border-color: rgba(150,108,45,.18);
  color: var(--text);
}
.add-rule option{ background: #fff; }
.formula{ border-color: rgba(176,122,34,.26); color: var(--dim); }
.save-flash{ color: var(--jade); }

dialog::backdrop{
  background: rgba(68,46,18,.35);
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
}
.modal{
  background: linear-gradient(170deg, #fffdf8, #fff7ea);
  border-color: rgba(176,122,34,.26);
  box-shadow: 0 40px 100px rgba(90,58,16,.28);
}
.modal h3{ color: var(--text); }
.field label{ color: var(--dim); }
.seg{ background: #fff8ec; border-color: var(--line); }
.seg button{ color: var(--muted); }
.seg button.active{ color: #6d460b; background: #f2ddb0; }
.icon-btn{ color: var(--dim); }
.icon-btn:hover{ background: rgba(176,122,34,.08); color: var(--text); }

.toast{
  background: rgba(255,252,245,.98);
  border-color: rgba(176,122,34,.3);
  box-shadow: 0 16px 40px rgba(100,65,20,.22);
  color: var(--text);
}
.toast button{ color: var(--gold-2); border-left-color: rgba(150,108,45,.18); }

footer{ color: var(--dim); }

/* ========================= 打印 ========================= */

@media print{
  @page{ margin: 14mm; }
  body{
    color: #1a1a1a;
    background: #fff;
    -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
  }
  body::before, .topbar, .banner, footer, #view-log, #view-rules,
  .report-head .btn, .toast{ display: none !important; }
  #view-analysis{ display: block !important; }
  .wrap{ max-width: none; padding: 0; }
  .card{
    margin-top: 10px !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .card::before{ display: none; }
  .report-conclusion, .one-thing{ color: #6b4d12 !important; }
  .report-points li, .report-lead, .advice p, td:last-child{ color: #444 !important; }
  .report-points b, .advice b, table td{ color: #111 !important; }
  .empty-mini, .card-sub, .chain-node small, .chain-node em, .rank-top em{ color: #666 !important; }
  .pos{ color: #17634c !important; }
  .neg{ color: #a63a29 !important; }
  .chain-node b, .rank-top b{ color: #111 !important; }
  .chain-node b.pos{ color: #17634c !important; }
  .chain-node b.neg{ color: #a63a29 !important; }
  .eyebrow{ color: #8a6a2f !important; }
  .chain-node, .advice li{ border-color: #ddd !important; background: #faf8f3 !important; }
  .rank-bar{ background: #eee !important; }
}

@media (max-width: 720px){
  .template-hint{ width: 100%; margin-left: 0; }
}

@media (max-width: 660px){
  .topbar{
    height: auto;
    flex-wrap: wrap;
    padding: 8px 12px;
    row-gap: 8px;
  }
  .brand{ order: 1; }
  .tabs{ order: 2; margin-left: auto; }
  .top-right{
    order: 3;
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
  }
  .lang-menu{ right: 0; }
}

/* ========================= 暗色主题 ========================= */

[data-theme="dark"]{
  color-scheme: dark;
  --bg: #090c0b;
  --bg-soft: #0d1110;
  --panel: rgba(255,255,255,.032);
  --panel-2: rgba(255,255,255,.055);
  --line: rgba(216,184,120,.14);
  --line-strong: rgba(216,184,120,.30);
  --text: #ece7da;
  --muted: #989c93;
  --dim: #6f746d;
  --gold: #d8b878;
  --gold-2: #f3dfb4;
  --jade: #6cc7a8;
  --red: #dd7663;
  --amber: #d9a15f;
  --accent: #d8b878;
  --accent-dim: rgba(216,184,120,.35);
}

[data-theme="dark"] body{
  background:
    radial-gradient(1100px 700px at 12% -12%, rgba(216,184,120,.10), transparent 55%),
    radial-gradient(900px 600px at 105% 4%, rgba(108,199,168,.065), transparent 55%),
    radial-gradient(800px 800px at 50% 120%, rgba(216,184,120,.04), transparent 60%),
    var(--bg);
}
[data-theme="dark"] body::before{
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
}

[data-theme="dark"] .topbar{
  background: rgba(9,12,11,.80);
  border-bottom-color: var(--line);
  box-shadow: none;
}
[data-theme="dark"] .brand-text b{ color: var(--text); }
[data-theme="dark"] .brand-text small{ color: var(--dim); }
[data-theme="dark"] .tabs{
  background: rgba(255,255,255,.018);
  border-color: var(--line);
}
[data-theme="dark"] .tabs a{ color: var(--muted); }
[data-theme="dark"] .tabs a:hover{ color: var(--text); }
[data-theme="dark"] .tabs a.active{
  color: var(--gold-2);
  background: rgba(216,184,120,.13);
  box-shadow: inset 0 0 0 1px rgba(216,184,120,.18);
}
[data-theme="dark"] .period-select{
  background-color: rgba(255,255,255,.025);
  color: var(--muted);
  border-color: var(--line);
}
[data-theme="dark"] .period-select option{ background: #121614; color: var(--text); }
[data-theme="dark"] .date-chip{ color: var(--dim); }
[data-theme="dark"] .lang-btn,
[data-theme="dark"] .theme-btn{
  background: rgba(255,255,255,.03);
  border-color: var(--line);
  color: var(--muted);
}
[data-theme="dark"] .lang-btn:hover,
[data-theme="dark"] .theme-btn:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--line-strong);
  color: var(--text);
}
[data-theme="dark"] .theme-btn .icon-sun{ display: block; }
[data-theme="dark"] .theme-btn .icon-moon{ display: none; }
[data-theme="dark"] .lang-menu{
  background: #121715;
  border-color: rgba(216,184,120,.25);
  box-shadow: 0 18px 45px rgba(0,0,0,.55);
}
[data-theme="dark"] .lang-menu button{ color: var(--muted); }
[data-theme="dark"] .lang-menu button:hover{ background: rgba(216,184,120,.08); color: var(--text); }
[data-theme="dark"] .lang-menu button.active{ background: rgba(216,184,120,.14); color: var(--gold-2); }

[data-theme="dark"] .card{
  background: linear-gradient(165deg, rgba(255,255,255,.045), rgba(255,255,255,.014) 55%);
  border-color: var(--line);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.04);
}
[data-theme="dark"] .card::before{
  background: linear-gradient(90deg, transparent, rgba(243,223,180,.26), transparent);
}

[data-theme="dark"] .btn{
  color: var(--text);
  background: rgba(255,255,255,.02);
  border-color: var(--line);
}
[data-theme="dark"] .btn:hover{ background: rgba(255,255,255,.04); border-color: var(--line-strong); }
[data-theme="dark"] .btn-gold{
  color: #1a1710;
  background: linear-gradient(135deg, #e8cd96, #c9a565);
  box-shadow: 0 6px 24px rgba(216,184,120,.18);
}
[data-theme="dark"] .btn-gold:hover{ background: linear-gradient(135deg, #e8cd96, #c9a565); }
[data-theme="dark"] .btn-ghost{ background: rgba(255,255,255,.02); }
[data-theme="dark"] .btn.danger{ color: var(--red); border-color: rgba(221,118,99,.28); }
[data-theme="dark"] .btn.danger:hover{ background: rgba(221,118,99,.08); border-color: rgba(221,118,99,.5); }
[data-theme="dark"] .link-btn{ color: var(--gold); border-color: rgba(216,184,120,.28); }
[data-theme="dark"] .link-btn:hover{ color: var(--gold-2); border-color: var(--gold-2); }

[data-theme="dark"] .banner{
  background: linear-gradient(90deg, rgba(216,184,120,.10), rgba(216,184,120,.015));
  border-color: rgba(216,184,120,.22);
  color: var(--muted);
}
[data-theme="dark"] .banner b{ color: var(--gold-2); }
[data-theme="dark"] .banner-tag{ color: var(--gold); border-color: rgba(216,184,120,.4); }

[data-theme="dark"] .hero::after{ opacity: .18; }
[data-theme="dark"] .eyebrow{ color: var(--gold); }
[data-theme="dark"] .dot-sep{ background: var(--gold); }
[data-theme="dark"] .hero h1{ color: var(--text); }
[data-theme="dark"] .verdict{ color: var(--muted); }
[data-theme="dark"] .verdict b{ color: var(--gold-2); }
[data-theme="dark"] .hero-stats{ border-top-color: rgba(255,255,255,.06); }
[data-theme="dark"] .hero-stats div{ border-left-color: rgba(255,255,255,.07); }
[data-theme="dark"] .hero-stats span{ color: var(--dim); }
[data-theme="dark"] .spark-head{ color: var(--dim); }
[data-theme="dark"] .spark-bars i{ background: rgba(255,255,255,.09); }
[data-theme="dark"] .spark-bars i.pos{ background: linear-gradient(to top, rgba(108,199,168,.3), rgba(108,199,168,.75)); }
[data-theme="dark"] .spark-bars i.neg{ background: linear-gradient(to top, rgba(221,118,99,.3), rgba(221,118,99,.7)); }

[data-theme="dark"] .gauge-track{ stroke: rgba(255,255,255,.065); }
[data-theme="dark"] .gauge-ticks line{ stroke: rgba(216,184,120,.2); }
[data-theme="dark"] .gauge-ticks line.major{ stroke: rgba(216,184,120,.42); }
[data-theme="dark"] .gauge-ring-deco{ border-color: rgba(216,184,120,.11); }
[data-theme="dark"] .score{ text-shadow: 0 0 34px var(--accent-dim); }
[data-theme="dark"] .score-cap{ color: var(--dim); }
[data-theme="dark"] .level{ background: transparent; }

[data-theme="dark"] .kind-seg{ background: rgba(0,0,0,.2); border-color: var(--line); }
[data-theme="dark"] .kind-seg button{ color: var(--muted); }
[data-theme="dark"] .kind-seg button.active{ color: var(--gold-2); background: rgba(216,184,120,.14); }
[data-theme="dark"] .chip{
  background: rgba(255,255,255,.022);
  border-color: rgba(255,255,255,.065);
  box-shadow: none;
}
[data-theme="dark"] .chip:hover{ background: rgba(216,184,120,.055); border-color: rgba(216,184,120,.32); }
[data-theme="dark"] .chip.custom{ background: transparent; color: var(--muted); }
[data-theme="dark"] .chip.custom:hover{ color: var(--gold-2); }
[data-theme="dark"] .dot.pos{ box-shadow: 0 0 8px rgba(108,199,168,.65); }
[data-theme="dark"] .dot.neg{ box-shadow: 0 0 8px rgba(221,118,99,.5); }
[data-theme="dark"] .quick-foot{ color: var(--dim); }
[data-theme="dark"] .daily-item{ background: rgba(255,255,255,.018); border-color: rgba(255,255,255,.065); }
[data-theme="dark"] .daily-goal{ background: rgba(216,184,120,.045); border-color: rgba(216,184,120,.2); }
[data-theme="dark"] .daily-goal-bar{ background: rgba(255,255,255,.06); }
[data-theme="dark"] .daily-goal em{ color: var(--dim); }
[data-theme="dark"] .daily-lead{ color: var(--muted); }

[data-theme="dark"] .today-meta{ color: var(--muted); }
[data-theme="dark"] .today-item{ border-bottom-color: rgba(255,255,255,.06); }
[data-theme="dark"] .today-item span{ color: var(--muted); }
[data-theme="dark"] .empty-mini{ border-color: rgba(255,255,255,.08); color: var(--dim); }
[data-theme="dark"] .day-head{ border-top-color: rgba(255,255,255,.05); color: var(--dim); }
[data-theme="dark"] .entry-time{ color: var(--dim); }
[data-theme="dark"] .entry-note{ color: var(--dim); }
[data-theme="dark"] .entry-del{ color: var(--dim); }
[data-theme="dark"] .demo-tag{ border-color: rgba(255,255,255,.12); color: var(--dim); }
[data-theme="dark"] .empty{ border-color: rgba(255,255,255,.1); color: var(--dim); }
[data-theme="dark"] .empty b{ color: var(--muted); }
[data-theme="dark"] .empty-note{ color: var(--dim); }

[data-theme="dark"] .report-lead{ color: var(--muted); }
[data-theme="dark"] .report-conclusion{ color: var(--gold-2); border-left-color: var(--gold); }
[data-theme="dark"] .report-points li{ color: var(--muted); }
[data-theme="dark"] .report-points b{ color: var(--text); }
[data-theme="dark"] .one-thing{
  background: rgba(216,184,120,.07);
  border-color: rgba(216,184,120,.2);
  color: var(--gold-2);
}
[data-theme="dark"] .chain-node{ background: rgba(255,255,255,.02); border-color: rgba(255,255,255,.07); }
[data-theme="dark"] .chain-node small,
[data-theme="dark"] .chain-node em,
[data-theme="dark"] .chain-arrow{ color: var(--dim); }
[data-theme="dark"] .bar-area{
  background: linear-gradient(to bottom, transparent calc(50% - .5px), rgba(255,255,255,.075) 50%, transparent calc(50% + .5px));
}
[data-theme="dark"] .bar.pos{ background: linear-gradient(to top, rgba(108,199,168,.28), rgba(108,199,168,.9)); }
[data-theme="dark"] .bar.neg{ background: linear-gradient(to bottom, rgba(221,118,99,.28), rgba(221,118,99,.85)); }
[data-theme="dark"] .bar.zero{ background: rgba(255,255,255,.2); }
[data-theme="dark"] .bar-x{ color: var(--dim); }
[data-theme="dark"] .bar-col.today .bar-area{ background-color: rgba(216,184,120,.035); }
[data-theme="dark"] th{ border-bottom-color: var(--line); color: var(--dim); }
[data-theme="dark"] td{ border-bottom-color: rgba(255,255,255,.06); }
[data-theme="dark"] td:last-child{ color: var(--muted); }
[data-theme="dark"] .rank-bar{ background: rgba(255,255,255,.05); }
[data-theme="dark"] .rank-bar i{ background: linear-gradient(90deg, rgba(108,199,168,.45), rgba(108,199,168,.95)); }
[data-theme="dark"] .rank.neg .rank-bar i{ background: linear-gradient(90deg, rgba(221,118,99,.45), rgba(221,118,99,.95)); }
[data-theme="dark"] .advice li{ background: rgba(255,255,255,.018); border-color: rgba(255,255,255,.06); }
[data-theme="dark"] .advice p{ color: var(--muted); }

[data-theme="dark"] .rule-note{ color: var(--muted); }
[data-theme="dark"] .template-bar{ background: rgba(216,184,120,.025); border-color: rgba(216,184,120,.18); }
[data-theme="dark"] .template-label,
[data-theme="dark"] .template-hint{ color: var(--dim); }
[data-theme="dark"] .template-bar button{ color: var(--muted); border-color: rgba(255,255,255,.09); background: transparent; }
[data-theme="dark"] .template-bar button:hover{ color: var(--gold-2); border-color: rgba(216,184,120,.35); background: rgba(216,184,120,.06); }
[data-theme="dark"] .rule-group-head{ color: var(--gold-2); border-bottom-color: var(--line); }
[data-theme="dark"] .rule-group-head small{ color: var(--dim); }
[data-theme="dark"] .rule-row{ border-bottom-color: rgba(255,255,255,.055); }
[data-theme="dark"] .rule-row input[type="text"]{ color: var(--text); }
[data-theme="dark"] .rule-row input[type="text"]:hover{ background: rgba(255,255,255,.03); }
[data-theme="dark"] .rule-row input[type="text"]:focus{ background: rgba(0,0,0,.2); border-color: rgba(216,184,120,.35); }
[data-theme="dark"] .rule-points{ background: rgba(0,0,0,.22); border-color: rgba(255,255,255,.08); color: var(--text); }
[data-theme="dark"] .add-rule{ border-top-color: var(--line); }
[data-theme="dark"] .add-rule input,
[data-theme="dark"] .add-rule select,
[data-theme="dark"] .field input{
  background: rgba(0,0,0,.25);
  border-color: rgba(255,255,255,.1);
  color: var(--text);
}
[data-theme="dark"] .add-rule option{ background: #121614; }
[data-theme="dark"] .formula{ border-color: rgba(216,184,120,.2); color: var(--dim); }

[data-theme="dark"] dialog::backdrop{
  background: rgba(3,5,4,.72);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
[data-theme="dark"] .modal{
  background: linear-gradient(170deg, #121715, #0b0f0e);
  border-color: rgba(216,184,120,.25);
  box-shadow: 0 40px 120px rgba(0,0,0,.7);
}
[data-theme="dark"] .modal h3{ color: var(--text); }
[data-theme="dark"] .field label{ color: var(--dim); }
[data-theme="dark"] .seg{ background: rgba(0,0,0,.18); border-color: var(--line); }
[data-theme="dark"] .seg button{ color: var(--muted); }
[data-theme="dark"] .seg button.active{ color: var(--gold-2); background: rgba(216,184,120,.14); }
[data-theme="dark"] .icon-btn:hover{ background: rgba(255,255,255,.06); color: var(--text); }

[data-theme="dark"] .toast{
  background: rgba(18,24,21,.96);
  border-color: rgba(216,184,120,.3);
  box-shadow: 0 16px 50px rgba(0,0,0,.6);
  color: var(--text);
}
[data-theme="dark"] .toast button{ color: var(--gold); border-left-color: rgba(255,255,255,.12); }
[data-theme="dark"] footer{ color: var(--dim); }

@media print{
  [data-theme="dark"]{ --bg: #fff; --text: #1a1a1a; --muted: #444; --dim: #666; }
  [data-theme="dark"] body{ background: #fff !important; color: #1a1a1a !important; }
  [data-theme="dark"] .card{ background: #fff !important; border-color: #ddd !important; box-shadow: none !important; }
  [data-theme="dark"] .topbar{ display: none !important; }
}

/* ========================= AI 复盘 / 登录 / 充值 / 分享 ========================= */

.report-actions{ display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.ai-card{
  padding: 26px 28px;
  background: linear-gradient(135deg, rgba(255,213,128,.16), rgba(255,255,255,.62) 55%);
  border-color: rgba(176,122,34,.24);
}
.ai-head{ display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.ai-head h3{
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .03em;
}
.ai-meta{ display: flex; align-items: center; gap: 10px; flex: none; }
.ai-credit-pill{
  padding: 5px 10px;
  border: 1px solid rgba(176,122,34,.28);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(255,255,255,.5);
  font-size: 10.5px;
  letter-spacing: .05em;
  white-space: nowrap;
}
.ai-credit-pill.empty{ color: var(--red); border-color: rgba(192,82,61,.3); }
.ai-body{ margin-top: 18px; }
.ai-locked{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px dashed rgba(176,122,34,.3);
  border-radius: 12px;
  background: rgba(255,255,255,.4);
}
.ai-lock-icon{
  width: 34px; height: 34px;
  display: grid; place-items: center;
  flex: none;
  border: 1px solid rgba(176,122,34,.3);
  border-radius: 9px;
  color: var(--gold-2);
  font-size: 16px;
}
.ai-lock-icon svg{
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ai-locked b{ display: block; font-family: var(--serif); font-size: 16px; font-weight: 500; }
.ai-locked p{ margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.ai-ready{ color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.ai-report{
  padding: 18px 20px;
  border: 1px solid rgba(176,122,34,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.48);
}
.ai-report-head{ display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-report-head b{ font-family: var(--serif); font-size: 16px; font-weight: 500; }
.ai-badge{
  padding: 2px 6px;
  border: 1px solid rgba(176,122,34,.25);
  border-radius: 4px;
  color: var(--dim);
  font-size: 8.5px;
  letter-spacing: .12em;
}
.ai-report p{ margin: 6px 0; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.ai-report p b{ color: var(--text); font-weight: 500; }
.ai-actions{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ai-loading{ display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.ai-spinner{
  width: 12px; height: 12px;
  border: 1.5px solid rgba(176,122,34,.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.modal-note{ margin: 0 0 16px; color: var(--muted); font-size: 11.5px; line-height: 1.75; }
.packages{ display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 16px 0 10px; }
.pack{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(150,108,45,.18);
  border-radius: 11px;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pack:hover{ border-color: rgba(176,122,34,.4); background: #fff8e8; }
.pack input{ position: absolute; opacity: 0; pointer-events: none; }
.pack:has(input:checked){ border-color: rgba(176,122,34,.55); background: #fff3d6; }
.pack b{ font-family: var(--serif); font-size: 17px; font-weight: 500; }
.pack span{ color: var(--muted); font-size: 11px; }
.recharge-actions{ display: flex; flex-wrap: wrap; gap: 10px; }
.redeem-row{ display: flex; gap: 8px; margin-top: 12px; }
.redeem-row input{
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid rgba(150,108,45,.18);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}
.redeem-row input:focus{ border-color: rgba(176,122,34,.5); outline: none; }
.share-image{
  display: block;
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  margin: 4px 0 16px;
  border: 1px solid rgba(150,108,45,.18);
  border-radius: 12px;
  background: #f8f1e2;
}
.share-modal{ width: min(520px, calc(100vw - 32px)); }

[data-theme="dark"] .ai-card{
  background: linear-gradient(135deg, rgba(216,184,120,.08), rgba(255,255,255,.015) 60%);
  border-color: rgba(216,184,120,.22);
}
[data-theme="dark"] .ai-credit-pill{ background: rgba(255,255,255,.03); }
[data-theme="dark"] .ai-locked{ background: rgba(255,255,255,.018); border-color: rgba(216,184,120,.24); }
[data-theme="dark"] .ai-lock-icon{ border-color: rgba(216,184,120,.28); }
[data-theme="dark"] .ai-report{ background: rgba(255,255,255,.018); border-color: rgba(216,184,120,.16); }
[data-theme="dark"] .ai-badge{ border-color: rgba(216,184,120,.24); }
[data-theme="dark"] .pack{ background: rgba(255,255,255,.025); border-color: rgba(255,255,255,.09); }
[data-theme="dark"] .pack:hover{ background: rgba(216,184,120,.06); border-color: rgba(216,184,120,.32); }
[data-theme="dark"] .pack:has(input:checked){ background: rgba(216,184,120,.1); border-color: rgba(216,184,120,.5); }
[data-theme="dark"] .redeem-row input{ background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .share-image{ border-color: rgba(255,255,255,.1); }

@media (max-width: 720px){
  .report-actions{ justify-content: flex-start; }
  .ai-head{ flex-direction: column; }
  .ai-meta{ width: 100%; justify-content: space-between; }
  .packages{ grid-template-columns: 1fr; }
  .share-image{ max-height: 52vh; }
}

@media (max-width: 520px){
  .ai-actions .btn{ flex: 1 1 100%; }
}

/* 绑定码 / 兑换码 */
.bind-modal{ width: min(560px, calc(100vw - 32px)); }
.binding-box{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(176,122,34,.24);
  border-radius: 10px;
  background: rgba(255,255,255,.5);
}
.binding-box span{ color: var(--dim); font-size: 11px; white-space: nowrap; }
.binding-box code{
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--gold-2);
  font-family: "SFMono-Regular", "Cascadia Code", "Roboto Mono", monospace;
  font-size: 14px;
  letter-spacing: .08em;
  white-space: nowrap;
}
.binding-box .btn{ flex: none; padding: 6px 10px; font-size: 11px; }
.binding-steps{
  margin: 10px 0 14px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.9;
}
.binding-steps li::marker{ color: var(--gold); }
[data-theme="dark"] .binding-box{ background: rgba(255,255,255,.02); border-color: rgba(216,184,120,.22); }
@media (max-width: 520px){
  .binding-box{ flex-wrap: wrap; }
  .binding-box code{ flex: 1 1 100%; order: 2; font-size: 13px; }
  .binding-box span{ order: 1; }
  .binding-box .btn{ order: 3; }
}
