/* 第 20 版：新增策略三（红绿定色），开始页多一张策略卡、看板多一个策略按钮。
   第 27 版：策略说明文字删掉后，开始页三张策略卡改成三列等宽。
   第 28 版：删掉看板右侧的“下一单建议”卡片后，总览区改成资金卡独占一行，
   下一单金额仍然显示在下面的“当前这一单的下单金额”里。
   第 31 版：新增“跨设备记录码”面板和弹窗，手机端排在统计卡和总览之间。
   第 33 版：同步弹窗里新增“备份到百度网盘”区块，多了备份状态条、
   自动备份下拉框和四个备份按钮；同步面板改成两个按钮并排。
   改完这个文件，记得把页面里引用的文件名也换一个（app-v22.css → app-v23.css）：
   地址不变的话，访客的浏览器会继续用存在本地的旧文件，改了也看不见。 */

:root {
  --paper: #f3eee3;
  --paper-deep: #e8dfcf;
  --card: #fffdf8;
  --card-soft: #faf6ed;
  --ink: #14211c;
  --ink-soft: #263a32;
  --muted: #6d786f;
  --muted-light: #91998f;
  --line: rgba(20, 33, 28, 0.11);
  --line-strong: rgba(20, 33, 28, 0.2);
  --green: #0e7052;
  --green-dark: #094d39;
  --green-deep: #0b2e25;
  --green-soft: #e3f1ea;
  --gold: #bd8738;
  --gold-light: #e4bf79;
  --gold-soft: #f3e5c9;
  --red: #b84f43;
  --red-dark: #973c32;
  --red-soft: #f7e5e1;
  --shadow-lg: 0 36px 80px -46px rgba(20, 33, 28, 0.5);
  --shadow-md: 0 18px 40px -28px rgba(20, 33, 28, 0.35);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 13px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  /* 手机上连续快速点按钮时，不要让浏览器把第二次点击当成“双击放大”。
     manipulation 只关掉双击缩放，正常的上下滚动和双指缩放不受影响。 */
  touch-action: manipulation;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(ellipse at 7% 4%, rgba(201, 158, 84, 0.2), transparent 38%),
    radial-gradient(ellipse at 94% 8%, rgba(14, 112, 82, 0.12), transparent 36%),
    linear-gradient(180deg, #f7f2e8 0%, var(--paper) 54%, #efe8da 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 33, 28, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 33, 28, 0.027) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 72%);
}

::selection {
  color: #fff;
  background: var(--green);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(189, 135, 56, 0.62);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ic {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  display: inline-block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.16em;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--green-deep);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.noscript-bar {
  padding: 12px 20px;
  text-align: center;
  color: #fff;
  background: var(--red-dark);
  font-size: 0.9rem;
}

.shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  padding: 22px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff9e9;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), transparent 45%),
    linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  box-shadow: 0 10px 24px -12px rgba(10, 77, 57, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-mark .ic {
  width: 25px;
  height: 25px;
  stroke-width: 1.5;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.brand-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.55);
  font-size: 0.76rem;
  backdrop-filter: blur(10px);
}

.local-badge .ic {
  color: var(--green);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.68);
  font-size: 0.82rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--card);
  transform: translateY(-1px);
}

.ghost-btn:disabled {
  opacity: 0.42;
}

.icon-btn {
  width: 40px;
  flex: none;
  padding: 0;
}

main {
  flex: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.start-view {
  padding: 42px 0 86px;
}

.start-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  align-items: center;
  gap: clamp(38px, 6vw, 82px);
}

.hero-copy {
  animation: rise-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy h1 {
  margin: 18px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6.2vw, 5.2rem);
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-copy h1 em {
  position: relative;
  color: var(--green-dark);
  font-style: normal;
  background-image: linear-gradient(rgba(228, 191, 121, 0.55), rgba(228, 191, 121, 0.55));
  background-repeat: no-repeat;
  background-position: 0 94%;
  background-size: 100% 0.2em;
}

.hero-copy > p {
  max-width: 35em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.4vw, 1.05rem);
  line-height: 1.95;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.58);
  font-size: 0.8rem;
}

.hero-points .ic {
  color: var(--green);
  font-size: 0.95rem;
}

.setup-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 32px;
  border: 1px solid rgba(20, 33, 28, 0.1);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-lg);
  animation: rise-in 0.7s 0.08s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  backdrop-filter: blur(18px);
}

.setup-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -125px;
  right: -105px;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 191, 121, 0.32), transparent 68%);
}

.setup-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -120px;
  bottom: -170px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 112, 82, 0.09), transparent 70%);
}

.setup-topline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.setup-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
}

.setup-card h2 {
  margin: 18px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.setup-desc {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.75;
}

.setup-card label,
.reset-dialog label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.money-input {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.money-input:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(14, 112, 82, 0.1);
}

.money-input > span {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.money-input input {
  width: 100%;
  min-width: 0;
  padding: 3px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1.45rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.money-input input::placeholder {
  color: #b4b3aa;
  font-weight: 500;
}

.money-input.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(184, 79, 67, 0.08);
}

.field-error {
  margin: 9px 2px 0;
  color: var(--red);
  font-size: 0.8rem;
  line-height: 1.5;
}

.field-tip {
  margin: 9px 2px 0;
  color: var(--muted-light);
  font-size: 0.73rem;
  line-height: 1.5;
}

.primary-btn {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 17px;
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: #fffdf6;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 48%),
    linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  box-shadow: 0 14px 26px -14px rgba(9, 77, 57, 0.8);
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px -14px rgba(9, 77, 57, 0.78);
  filter: brightness(1.04);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn-small {
  width: auto;
  min-height: 46px;
  margin-top: 0;
  padding: 12px 20px;
  font-size: 0.9rem;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.55;
}

.privacy-note .ic {
  margin-top: 2px;
  color: var(--green);
}

.rule-preview {
  margin-top: clamp(70px, 10vw, 110px);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.section-heading > p {
  max-width: 29em;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.83rem;
  text-align: right;
}

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

.rule-mini {
  position: relative;
  min-height: 154px;
  padding: 21px 20px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.61);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rule-mini:hover {
  border-color: rgba(14, 112, 82, 0.23);
  background: rgba(255, 253, 248, 0.86);
  transform: translateY(-2px);
}

.rule-num {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rule-mini strong {
  display: block;
  margin: 13px 0 5px;
  font-size: 0.97rem;
}

.rule-mini p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

/* 资金看板 */

.dashboard {
  padding: 26px 0 76px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.dashboard-heading h1 {
  margin: 9px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.3vw, 3.35rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px;
}

.balance-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 272px;
  padding: 27px 29px;
  border: 1px solid rgba(20, 33, 28, 0.1);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-md);
}

.balance-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -110px;
  right: 7%;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 191, 121, 0.24), transparent 66%);
}

.balance-card::after {
  content: "¥";
  position: absolute;
  z-index: -1;
  right: 34px;
  bottom: -54px;
  color: rgba(14, 112, 82, 0.055);
  font-family: var(--font-display);
  font-size: 13rem;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-8deg);
}

.balance-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-kicker {
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-light);
  font-size: 0.7rem;
}

.live-dot > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(14, 112, 82, 0.1);
  animation: breathe 2.4s ease-in-out infinite;
}

.balance-value {
  display: block;
  max-width: 100%;
  margin: 9px 0 9px;
  overflow-wrap: anywhere;
  font-size: clamp(2.7rem, 5.8vw, 4.55rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.balance-value.is-long {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
}

.balance-value.is-very-long {
  font-size: clamp(1.45rem, 3.6vw, 2.45rem);
}

.pnl-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pnl-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pnl-pill.is-up {
  color: var(--green-dark);
  background: var(--green-soft);
}

.pnl-pill.is-down {
  color: var(--red-dark);
  background: var(--red-soft);
}

.pnl-pill.is-flat {
  color: var(--muted);
  background: rgba(20, 33, 28, 0.06);
}

.return-rate {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.capital-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.capital-meta div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.capital-meta span {
  color: var(--muted);
  font-size: 0.73rem;
}

.capital-meta strong {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 0.97rem;
  font-variant-numeric: tabular-nums;
}

.capital-meta strong.is-long {
  font-size: 0.82rem;
}

.capital-meta strong.is-very-long {
  font-size: 0.72rem;
}

.action-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: 28px;
  margin-top: 15px;
  padding: 23px 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 18px 40px -38px rgba(20, 33, 28, 0.6);
}

.current-bet {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stake-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 2px 0 4px;
}

.current-stake {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.current-stake.is-long {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
}

.current-stake.is-very-long {
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

/* 红绿显示：只是随机装饰，不参与输赢和金额计算。 */
.random-light {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 11px;
  min-width: 62px;
  padding: 7px 16px 8px 13px;
  border: 1px solid rgba(20, 33, 28, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px -22px rgba(20, 33, 28, 0.6);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.random-light-dots {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}

.random-light-dots i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(20, 33, 28, 0.16);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.random-light-copy {
  display: flex;
  align-items: center;
  line-height: 1;
}

.random-light-copy strong {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.random-light[data-tone="red"] {
  border-color: rgba(196, 72, 60, 0.35);
  background: rgba(196, 72, 60, 0.09);
}

.random-light[data-tone="red"] .random-light-copy strong {
  color: #a83a30;
}

.random-light[data-tone="red"] .dot-red {
  background: #d2574a;
  box-shadow: 0 0 10px rgba(210, 87, 74, 0.6);
}

.random-light[data-tone="green"] {
  border-color: rgba(31, 122, 90, 0.34);
  background: rgba(31, 122, 90, 0.09);
}

.random-light[data-tone="green"] .random-light-copy strong {
  color: #176d4c;
}

.random-light[data-tone="green"] .dot-green {
  background: #2a9169;
  box-shadow: 0 0 10px rgba(42, 145, 105, 0.6);
}

.random-light.is-fresh {
  animation: random-light-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes random-light-pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.random-light-hint {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.action-hint {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.55;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.result-btn {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fffdf7;
  text-align: left;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.result-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.result-btn:active:not(:disabled) {
  transform: translateY(0);
}

.result-btn:disabled {
  opacity: 0.45;
  filter: grayscale(0.3);
}

.win-btn {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), transparent 48%),
    linear-gradient(135deg, #12815e 0%, #0a5a43 100%);
  box-shadow: 0 14px 26px -18px rgba(10, 90, 67, 0.9);
}

.loss-btn {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), transparent 48%),
    linear-gradient(135deg, #c55b4e 0%, #9e4035 100%);
  box-shadow: 0 14px 26px -18px rgba(158, 64, 53, 0.85);
}

.result-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.13);
}

.result-icon .ic {
  width: 21px;
  height: 21px;
}

.result-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.35;
}

.result-copy strong {
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.result-copy small {
  color: rgba(255, 253, 247, 0.73);
  font-size: 0.79rem;
  font-variant-numeric: tabular-nums;
}

.empty-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 15px;
  padding: 15px 18px;
  border: 1px solid rgba(184, 79, 67, 0.2);
  border-radius: var(--radius-md);
  color: var(--red-dark);
  background: rgba(247, 229, 225, 0.72);
  font-size: 0.82rem;
  line-height: 1.6;
}

.empty-alert .ic {
  margin-top: 2px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.stat-card {
  min-width: 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.59);
}

.stat-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.stat-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.stat-card strong.is-long {
  font-size: 0.9rem;
}

.stat-card strong.is-very-long {
  font-size: 0.76rem;
}

.is-up-text {
  color: var(--green);
}

.is-down-text {
  color: var(--red);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 15px;
  margin-top: 15px;
}

/* 第 26 版：规则速查面板删除后，风险提示单独占一整行。 */
.content-grid > .risk-note {
  margin-top: 0;
}

.panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.82);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.text-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  color: var(--green-dark);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 600;
}

.text-btn:hover:not(:disabled) {
  background: var(--green-soft);
}

.text-btn:disabled {
  color: var(--muted-light);
  opacity: 0.6;
}

.table-wrap {
  max-height: 448px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 33, 28, 0.22) transparent;
}

.ledger-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

.ledger-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f7f2e7;
  font-size: 0.71rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.ledger-table th:nth-child(n + 3),
.ledger-table td:nth-child(n + 3) {
  text-align: right;
}

.ledger-table td {
  padding: 12px 13px;
  border-bottom: 1px solid rgba(20, 33, 28, 0.065);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ledger-table tr:last-child td {
  border-bottom: 0;
}

.ledger-table tbody tr {
  transition: background 0.15s ease;
}

.ledger-table tbody tr:hover {
  background: rgba(14, 112, 82, 0.035);
}

.round-cell {
  color: var(--muted);
  font-size: 0.75rem;
}

.result-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 700;
}

.result-chip.is-win {
  color: var(--green-dark);
  background: var(--green-soft);
}

.result-chip.is-loss {
  color: var(--red-dark);
  background: var(--red-soft);
}

.amount-win {
  color: var(--green);
  font-weight: 700;
}

.amount-loss {
  color: var(--red);
  font-weight: 700;
}

.amount-neutral {
  color: var(--muted);
}

.balance-cell {
  color: var(--ink);
  font-weight: 600;
}

.empty-state {
  display: flex;
  min-height: 236px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid rgba(14, 112, 82, 0.13);
  border-radius: 18px;
  color: var(--green);
  background: var(--green-soft);
}

.empty-icon .ic {
  width: 25px;
  height: 25px;
}

.empty-state strong {
  font-size: 0.95rem;
}

.empty-state p {
  max-width: 19em;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.7;
}

.panel-footnote {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 14px 2px 0;
  color: var(--muted-light);
  font-size: 0.7rem;
  line-height: 1.5;
}

.panel-footnote .ic {
  margin-top: 1px;
  color: var(--green);
}

.rules-panel .panel-head {
  margin-bottom: 14px;
}

.rules-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-list li {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.rules-list li:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.rule-step {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(189, 135, 56, 0.27);
  border-radius: 8px;
  color: var(--gold);
  background: rgba(243, 229, 201, 0.46);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
}

.rules-list strong {
  display: block;
  font-size: 0.83rem;
  line-height: 1.45;
}

.rules-list p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.risk-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 17px;
  padding: 12px;
  border: 1px solid rgba(189, 135, 56, 0.18);
  border-radius: var(--radius-sm);
  color: #75613f;
  background: rgba(248, 238, 218, 0.67);
}

.risk-note .ic {
  margin-top: 2px;
  color: var(--gold);
}

.risk-note p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.7;
}

.site-footer {
  padding: 0 0 28px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 0.7rem;
}

/* 重新设置弹窗 */

.reset-dialog {
  width: min(460px, calc(100% - 30px));
  max-width: none;
  max-height: calc(100% - 30px);
  overflow-y: auto;
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 42px 100px -32px rgba(8, 31, 24, 0.6);
}

.reset-dialog::backdrop {
  background: rgba(8, 28, 23, 0.5);
  backdrop-filter: blur(5px);
}

.dialog-inner {
  position: relative;
  padding: 29px;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
}

.dialog-close:hover {
  color: var(--ink);
  background: var(--card-soft);
}

.dialog-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 14px;
  color: var(--green);
  background: var(--green-soft);
}

.dialog-icon .ic {
  width: 22px;
  height: 22px;
}

.reset-dialog h2 {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.35;
}

.reset-dialog p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.7;
}

.money-input-small {
  padding: 8px 14px;
  border-radius: 14px;
}

.money-input-small input {
  font-size: 1.24rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.secondary-btn {
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.87rem;
  font-weight: 600;
}

.secondary-btn:hover {
  background: var(--card-soft);
}

/* 轻提示 */

.toast-stack {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  width: min(470px, calc(100% - 30px));
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  color: #fffdf8;
  background: rgba(12, 40, 32, 0.96);
  box-shadow: 0 18px 42px -24px rgba(8, 30, 24, 0.7);
  pointer-events: auto;
  animation: toast-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  backdrop-filter: blur(12px);
}

.toast.is-out {
  animation: toast-out 0.25s ease forwards;
}

.toast--celebrate {
  border-color: rgba(255, 241, 199, 0.3);
  color: #2b1a03;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.4), transparent 42%),
    linear-gradient(135deg, #ecca82 0%, #c8953d 100%);
  box-shadow: 0 20px 50px -22px rgba(126, 80, 16, 0.8);
}

.toast--warning {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(126, 49, 38, 0.97);
}

.toast-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
}

.toast--celebrate .toast-icon {
  background: rgba(58, 34, 4, 0.12);
}

.toast-icon .ic {
  width: 16px;
  height: 16px;
}

.toast-message {
  margin: 1px 0 0;
  font-size: 0.82rem;
  line-height: 1.62;
}

.toast--celebrate .toast-message {
  font-size: 0.91rem;
  font-weight: 700;
}

/* 庆祝彩纸 */

.confetti {
  position: fixed;
  z-index: 90;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -24px;
  width: 7px;
  height: 13px;
  border-radius: 2px;
  opacity: 0;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(0.15, 0.65, 0.35, 1);
  animation-fill-mode: forwards;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(14, 112, 82, 0.08);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(14, 112, 82, 0.03);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    opacity: 0.9;
    transform: translate3d(var(--drift), 105vh, 0) rotate(var(--spin));
  }
}

/* 第 2 版：手动设置总资金与首次下单金额 */

.field-block + .field-block {
  margin-top: 17px;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.setup-card .label-row label,
.reset-dialog .label-row label {
  margin-bottom: 0;
}

.quick-fill {
  flex: none;
  padding: 2px 0;
  border: 0;
  color: var(--green-dark);
  background: transparent;
  font-size: 0.73rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.quick-fill:hover {
  color: var(--green);
}

.dialog-field + .dialog-field {
  margin-top: 15px;
}

.reset-dialog .field-error {
  margin: 9px 2px 0;
  color: var(--red);
  font-size: 0.8rem;
}

.reset-dialog .field-tip {
  margin-top: 8px;
}

@media (max-width: 980px) {
  .start-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .setup-card {
    width: min(100%, 620px);
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .balance-card {
    min-height: 244px;
  }

  .rules-panel {
    order: 2;
  }
}

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 32px);
  }

  .site-header {
    padding: 16px 0;
  }

  .brand-copy span {
    display: none;
  }

  .brand-mark {
    width: 41px;
    height: 41px;
    border-radius: 13px;
  }

  .local-badge {
    display: none;
  }

  .start-view {
    padding-top: 30px;
  }

  .start-grid {
    gap: 30px;
  }

  .hero-copy h1 {
    margin-top: 14px;
  }

  .hero-copy > p {
    line-height: 1.85;
  }

  .setup-card {
    padding: 24px;
    border-radius: 24px;
  }

  .section-heading {
    display: block;
    margin-bottom: 18px;
  }

  .section-heading > p {
    margin-top: 9px;
    text-align: left;
  }

  .rule-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rule-mini {
    min-height: 0;
    padding: 18px;
  }

  .dashboard {
    padding-top: 16px;
  }

  .dashboard .shell {
    display: flex;
    flex-direction: column;
  }

  .overview-grid {
    display: contents;
  }

  .dashboard-heading {
    order: 1;
    margin-bottom: 18px;
  }

  .dashboard-heading h1 {
    font-size: clamp(1.9rem, 8vw, 2.7rem);
  }

  .balance-card {
    order: 2;
  }

  .action-panel {
    order: 3;
  }

  .empty-alert {
    order: 4;
  }

  .stats-row {
    order: 5;
  }

  .content-grid {
    order: 6;
  }

  .balance-card {
    padding: 23px 22px;
    border-radius: 24px;
  }

  .action-panel {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 21px 22px;
    border-radius: 24px;
  }

  .current-stake {
    font-size: 2rem;
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toast-stack {
    top: calc(env(safe-area-inset-top) + 78px);
    bottom: auto;
  }

  .panel {
    padding: 20px;
    border-radius: 24px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 620px) {
  .table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .ledger-table,
  .ledger-table tbody,
  .ledger-table tr,
  .ledger-table td {
    display: block;
    width: 100%;
  }

  .ledger-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .ledger-table tbody {
    display: grid;
    gap: 9px;
  }

  .ledger-table tbody tr {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fcf9f2;
  }

  .ledger-table tbody tr:hover {
    background: #fcf9f2;
  }

  .ledger-table td,
  .ledger-table td:nth-child(n + 3) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    border: 0;
    text-align: left;
    white-space: normal;
  }

  .ledger-table td::before {
    content: attr(data-label);
    flex: none;
    color: var(--muted);
    font-size: 0.71rem;
    font-weight: 500;
  }

  .ledger-table td:first-child {
    margin-bottom: 3px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line);
    color: var(--ink);
    font-weight: 700;
  }

  .ledger-table td:first-child::before {
    content: none;
  }

  .round-cell {
    color: var(--ink);
    font-size: 0.8rem;
  }

  .empty-state {
    min-height: 190px;
  }
}

@media (max-width: 540px) {
  .eyebrow {
    letter-spacing: 0.11em;
  }

  .capital-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .hero-copy h1 {
    font-size: clamp(2.45rem, 12vw, 3.4rem);
    letter-spacing: -0.04em;
  }

  .hero-points {
    gap: 7px;
  }

  .hero-points li {
    font-size: 0.75rem;
  }

  .rule-mini-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .rule-mini {
    padding: 17px 18px;
  }

  .rule-mini strong {
    margin-top: 8px;
  }

  .result-btn {
    gap: 8px;
    padding: 13px 12px;
    border-radius: 16px;
  }

  .result-icon {
    width: 33px;
    height: 33px;
    border-radius: 10px;
  }

  .result-icon .ic {
    width: 18px;
    height: 18px;
  }

  .result-copy strong {
    font-size: 0.88rem;
  }

  .result-copy small {
    font-size: 0.72rem;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
  }

  .text-btn {
    margin-left: -8px;
  }

  .dialog-inner {
    padding: 24px;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .primary-btn,
  .dialog-actions .secondary-btn {
    width: 100%;
  }

  .toast-stack {
    top: calc(env(safe-area-inset-top) + 72px);
    bottom: auto;
  }
}

@media (max-width: 400px) {
  .shell {
    width: calc(100% - 24px);
  }

  .header-actions {
    gap: 6px;
  }

  .ghost-btn {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.76rem;
  }

  .icon-btn {
    width: 38px;
    padding: 0;
  }

  .setup-card,
  .balance-card,
  .action-panel,
  .panel {
    padding-left: 18px;
    padding-right: 18px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .capital-meta {
    gap: 12px;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    padding: 13px 14px;
  }
}

@media (max-width: 350px) {
  .shell {
    width: calc(100% - 20px);
  }

  .header-inner {
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand-copy strong {
    font-size: 0.9rem;
  }

  #undo-header-btn {
    display: none !important;
  }

  .ghost-btn {
    padding: 7px 8px;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 第 4 版：会员体系、试用倒计时、发码工具 ---------- */

/* 第 5 版的用户切换和用户管理样式在文件末尾。 */

/* 第 14 版：会员入口改成链接，去掉浏览器默认下划线。 */
a.member-chip,
a.locked-cta {
  text-decoration: none;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(189, 135, 56, 0.3);
  border-radius: 999px;
  color: #7a5412;
  background: linear-gradient(135deg, #fbf1d8, #f5e4bc);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.member-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.member-chip .ic {
  width: 15px;
  height: 15px;
  color: #a9762a;
}

.member-chip.is-member {
  border-color: rgba(138, 90, 23, 0.55);
  color: #fff8e8;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 50%),
    linear-gradient(135deg, #b07c2d, #81521a);
  box-shadow: 0 10px 22px -16px rgba(129, 82, 26, 0.9);
}

.member-chip.is-member .ic {
  color: #ffe3a3;
}

.member-chip.is-expired {
  border-color: rgba(184, 79, 67, 0.25);
  color: var(--red-dark);
  background: var(--red-soft);
}

.member-chip.is-expired .ic {
  color: var(--red);
}

.trial-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.trial-note .ic {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.trial-note.is-member {
  color: #7a5412;
}

.trial-note.is-expired {
  color: var(--red-dark);
}

.trial-link {
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.trial-note.is-expired .trial-link {
  color: var(--red-dark);
}

.trial-link:hover {
  opacity: 0.78;
}

.action-panel.is-locked {
  border-color: rgba(189, 135, 56, 0.32);
}

.action-panel.is-locked .result-btn:disabled {
  opacity: 0.55;
  filter: grayscale(0.55);
}

.locked-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
  padding: 16px 18px;
  border: 1px solid rgba(189, 135, 56, 0.35);
  border-radius: var(--radius-md);
  color: #5f4214;
  background:
    radial-gradient(circle at 100% 0, rgba(228, 191, 121, 0.34), transparent 48%),
    linear-gradient(135deg, #fdf5e2, #f8ecd3);
}

.locked-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border-radius: 12px;
  color: #8a5a17;
  background: #f0d9a8;
}

.locked-icon .ic {
  width: 20px;
  height: 20px;
}

.locked-copy {
  min-width: 0;
  flex: 1;
}

.locked-copy strong {
  display: block;
  font-size: 0.92rem;
}

.locked-copy p {
  margin: 3px 0 0;
  color: #7d5c23;
  font-size: 0.78rem;
  line-height: 1.6;
}

.locked-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  flex: none;
  padding: 9px 15px;
  border: 1px solid rgba(138, 90, 23, 0.5);
  border-radius: 12px;
  color: #fff8e8;
  background: linear-gradient(135deg, #b07c2d, #8a5a17);
  font-size: 0.8rem;
  font-weight: 700;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.locked-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.locked-cta .ic {
  width: 15px;
  height: 15px;
}

.footer-link {
  margin-left: auto;
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 会员中心弹窗 */

.member-dialog {
  width: min(620px, calc(100% - 30px));
  max-width: none;
  max-height: calc(100% - 30px);
  overflow-y: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 42px 100px -32px rgba(8, 31, 24, 0.6);
}

.member-dialog::backdrop {
  background: rgba(8, 28, 23, 0.5);
  backdrop-filter: blur(5px);
}

.member-dialog-inner {
  padding: 30px;
}

.member-dialog-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 38px;
}

.member-dialog-icon {
  flex: none;
  margin-bottom: 0;
  color: #8a5a17;
  background: var(--gold-soft);
}

.member-kicker {
  display: block;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.member-dialog h2 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.32;
}

.member-desc {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.75;
}

.member-status-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(189, 135, 56, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(228, 191, 121, 0.35), transparent 48%),
    linear-gradient(135deg, #fdf8ec, #f7edd9);
}

.member-status-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px;
}

.member-state-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.member-state-pill.is-trial {
  color: #7a5412;
  background: #f0dca9;
}

.member-state-pill.is-member {
  color: #fff8e8;
  background: linear-gradient(135deg, #b07c2d, #8a5a17);
}

.member-state-pill.is-expired {
  color: var(--red-dark);
  background: var(--red-soft);
}

.member-remain {
  color: #5f4214;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.member-expiry {
  margin: 7px 0 0;
  color: #8a744f;
  font-size: 0.73rem;
  font-variant-numeric: tabular-nums;
}

.member-progress {
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(138, 90, 23, 0.15);
}

.member-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d8ad5c, #0e7052);
  transition: width 0.5s ease;
}

.member-progress span.is-low {
  background: linear-gradient(90deg, #c9924a, #b84f43);
}

.member-status-note {
  margin: 10px 0 0;
  color: #7d5c23;
  font-size: 0.74rem;
  line-height: 1.65;
}

.member-section-title {
  margin: 22px 0 10px;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

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

.plan-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 15px 14px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--card-soft);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.plan-card:hover {
  border-color: rgba(189, 135, 56, 0.55);
  transform: translateY(-2px);
}

.plan-card.is-selected {
  border-color: var(--gold);
  background: #fdf5e3;
  box-shadow: 0 0 0 3px rgba(189, 135, 56, 0.12);
}

.plan-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff8e8;
  background: linear-gradient(135deg, #b07c2d, #8a5a17);
  font-size: 0.61rem;
  font-weight: 700;
  white-space: nowrap;
}

.plan-name {
  font-size: 0.9rem;
}

.plan-days {
  color: var(--muted);
  font-size: 0.71rem;
}

.plan-price {
  margin-top: 5px;
  color: var(--green-dark);
  font-size: 1.14rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.plan-select {
  margin-top: 6px;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 700;
}

.plan-card.is-selected .plan-select {
  color: #8a5a17;
}

.plan-copy-bar {
  margin-top: 11px;
  padding: 12px 14px;
  border: 1px dashed rgba(14, 112, 82, 0.3);
  border-radius: 14px;
  background: rgba(227, 241, 234, 0.5);
}

.plan-copy-bar p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.6;
}

.plan-copy-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.plan-copy-btn {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.78rem;
}

.plan-contact {
  color: var(--muted);
  font-size: 0.72rem;
}

.member-contact {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.member-form label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.8rem;
  font-weight: 600;
}

.member-code-row {
  display: flex;
  gap: 8px;
}

.member-code-row input {
  min-width: 0;
  min-height: 48px;
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--ink);
  background: #fffdf8;
  /* 输入框字号不能小于 16px，否则 iPhone 一聚焦就会把整个页面放大。 */
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.member-code-row input::placeholder {
  color: var(--muted-light);
  letter-spacing: 0.03em;
  text-transform: none;
}

.member-code-row input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(14, 112, 82, 0.12);
}

.member-code-row input[aria-invalid="true"] {
  border-color: var(--red);
}

.member-activate-btn {
  width: auto;
  min-height: 48px;
  flex: none;
  margin-top: 0;
  padding: 10px 18px;
  font-size: 0.85rem;
}

.member-form .field-error,
.member-form .field-tip {
  margin: 7px 0 0;
}

.member-steps {
  display: grid;
  gap: 7px;
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card-soft);
  list-style: none;
}

.member-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.member-steps li span {
  display: grid;
  width: 19px;
  height: 19px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.64rem;
  font-weight: 800;
}

.member-steps p {
  margin: 0;
}

.member-local-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.65;
}

.member-local-note .ic {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex: none;
  color: var(--gold);
}

@media (max-width: 760px) {
  .member-dialog-inner {
    padding: 24px;
  }

  .locked-alert {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .locked-copy {
    flex-basis: calc(100% - 56px);
  }

  .locked-cta {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .member-chip {
    width: 38px;
    min-height: 38px;
    padding: 0;
    flex: none;
  }

  .member-chip span {
    display: none;
  }

  .member-dialog-inner {
    padding: 22px;
  }

  .member-dialog-head {
    align-items: flex-start;
  }

  .member-dialog h2 {
    font-size: 1.3rem;
  }

  .member-code-row {
    flex-direction: column;
  }

  .member-activate-btn {
    width: 100%;
  }

  .footer-link {
    margin-left: 0;
  }
}

@media (max-width: 400px) {
  .member-plans {
    grid-template-columns: 1fr;
  }

  .plan-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
    padding: 13px 14px;
  }

  .plan-name {
    grid-column: 1;
  }

  .plan-days {
    grid-column: 1;
  }

  .plan-price {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
    font-size: 1.05rem;
  }

  .plan-select {
    grid-column: 1 / -1;
    margin-top: 4px;
  }
}

/* 发码工具页 */

.tool-page main {
  padding: 24px 0 80px;
}

.tool-hero {
  max-width: 760px;
}

.tool-hero h1 {
  margin: 10px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.tool-hero > p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.tool-card {
  max-width: 760px;
  margin-top: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow-md);
}

.tool-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid rgba(184, 79, 67, 0.22);
  border-radius: 14px;
  color: var(--red-dark);
  background: rgba(247, 229, 225, 0.72);
  font-size: 0.78rem;
  line-height: 1.65;
}

.tool-warning .ic {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex: none;
}

.tool-gate {
  margin-top: 20px;
}

.tool-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.8rem;
  font-weight: 600;
}

.tool-gate-row {
  display: flex;
  gap: 9px;
}

.tool-gate-row input {
  min-width: 0;
  min-height: 46px;
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--ink);
  background: #fffdf8;
}

.tool-gate-row input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(14, 112, 82, 0.12);
}

.tool-gate-row input[aria-invalid="true"] {
  border-color: var(--red);
}

.tool-gate-row .primary-btn {
  width: auto;
  min-height: 46px;
  flex: none;
  margin-top: 0;
  padding: 9px 18px;
  font-size: 0.85rem;
}

.tool-gate-error {
  margin: 8px 0 0;
  color: var(--red-dark);
  font-size: 0.78rem;
}

.tool-body {
  margin-top: 22px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tool-field select,
.tool-field input[type="number"] {
  width: 100%;
  min-height: 46px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--ink);
  background: #fffdf8;
  font: inherit;
}

.tool-field select:focus,
.tool-field input[type="number"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(14, 112, 82, 0.12);
}

.tool-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tool-actions .primary-btn {
  width: auto;
  margin-top: 0;
  padding: 12px 20px;
  font-size: 0.88rem;
}

.tool-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.65;
}

.tool-output {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--card-soft);
}

.tool-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-output-head strong {
  font-size: 0.84rem;
}

.code-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fffdf8;
}

.code-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--green-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.code-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.copy-btn {
  min-height: 34px;
  flex: none;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--green-dark);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 600;
}

.copy-btn:hover {
  background: var(--green-soft);
}

.tool-footer-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.7;
}

@media (max-width: 620px) {
  .tool-card {
    padding: 20px;
    border-radius: 22px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-gate-row {
    flex-direction: column;
  }

  .tool-gate-row .primary-btn {
    width: 100%;
  }
}

/* ---------- 第 5 版：本机多用户、用户时间分开算 ---------- */

.user-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  max-width: 170px;
  padding: 8px 13px;
  border: 1px solid rgba(14, 112, 82, 0.22);
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(227, 241, 234, 0.78);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease;
}

.user-chip:hover {
  transform: translateY(-1px);
  background: var(--green-soft);
}

.user-chip .ic {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.user-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip.is-expired {
  border-color: rgba(184, 79, 67, 0.24);
  color: var(--red-dark);
  background: var(--red-soft);
}

.user-chip.is-expired .ic {
  color: var(--red);
}

.user-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.user-note .ic {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.user-note strong {
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.user-note + .trial-note {
  margin-top: 9px;
}

.dashboard-user-note {
  margin-top: 10px;
}

.member-user-note {
  margin: 8px 0 0;
  color: #7a5412;
  font-size: 0.76rem;
  line-height: 1.65;
}

.user-dialog-icon {
  color: var(--green);
  background: var(--green-soft);
}

.user-current-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 15px 18px;
  border: 1px solid rgba(14, 112, 82, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(143, 201, 173, 0.3), transparent 50%),
    linear-gradient(135deg, #f2faf5, #fbf7ee);
}

.user-current-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.user-current-label {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.user-current-main strong {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.3;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 700;
  white-space: nowrap;
}

.user-status-pill.is-trial {
  color: #7a5412;
  background: #f0dca9;
}

.user-status-pill.is-member {
  color: #fff8e8;
  background: linear-gradient(135deg, #b07c2d, #8a5a17);
}

.user-status-pill.is-expired {
  color: var(--red-dark);
  background: var(--red-soft);
}

.user-trial-line {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.6;
}

.user-list {
  display: grid;
  gap: 8px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card-soft);
}

.user-row.is-active {
  border-color: rgba(14, 112, 82, 0.35);
  background: linear-gradient(135deg, #f4faf6, #fbf8f0);
  box-shadow: inset 0 0 0 1px rgba(14, 112, 82, 0.06);
}

.user-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 12px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.95rem;
  font-weight: 800;
}

.user-row.is-active .user-avatar {
  color: #fff;
  background: linear-gradient(135deg, #158361, #0b5a42);
}

.user-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.user-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  line-height: 1.45;
}

.user-active-tag {
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.62rem;
  font-weight: 700;
}

.user-meta {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.user-act-btn {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 600;
}

.user-act-btn:hover:not(:disabled) {
  background: var(--card);
}

.user-act-btn.is-primary {
  border-color: rgba(14, 112, 82, 0.3);
  color: var(--green-dark);
  background: var(--green-soft);
}

.user-act-btn.is-danger {
  border-color: rgba(184, 79, 67, 0.25);
  color: var(--red-dark);
}

.user-act-btn.is-danger:hover:not(:disabled) {
  background: var(--red-soft);
}

.user-act-btn:disabled {
  opacity: 0.5;
}

.user-limit-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.user-add-form {
  margin-top: 2px;
}

.user-add-form .member-code-row input {
  /* 同上：保持 16px，避免 iPhone 聚焦输入框时自动放大页面。 */
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
}

@media (max-width: 540px) {
  .user-chip {
    width: 38px;
    min-height: 38px;
    flex: none;
    padding: 0;
  }

  .user-chip span {
    display: none;
  }

  [data-open-reset] {
    width: 38px;
    flex: none;
    padding: 0;
  }

  [data-open-reset] .btn-label {
    display: none;
  }

  .user-row {
    flex-wrap: wrap;
  }

  .user-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .user-actions .user-act-btn {
    min-width: 0;
    flex: 1;
  }
}

/* ---------- 第 8 版：添加到手机桌面 ---------- */

.install-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 32px;
  padding: 18px 22px;
  border: 1px solid rgba(189, 135, 56, 0.28);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.4), transparent 55%),
    linear-gradient(135deg, #fbf1d8, #f7ead0);
  box-shadow: var(--shadow-md);
}

.install-banner-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: none;
  place-items: center;
  border-radius: 14px;
  color: #7a5412;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: inset 0 0 0 1px rgba(189, 135, 56, 0.18);
}

.install-banner-icon .ic {
  width: 23px;
  height: 23px;
}

.install-banner-copy {
  flex: 1;
  min-width: 0;
}

.install-banner-copy strong {
  display: block;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
}

.install-banner-copy p {
  margin: 3px 0 0;
  color: #6f5a34;
  font-size: 0.77rem;
  line-height: 1.65;
}

.install-banner-btn {
  display: inline-flex;
  min-height: 42px;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid rgba(122, 84, 18, 0.22);
  border-radius: 12px;
  color: #6d4a10;
  background: #fffaf0;
  font-size: 0.81rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.install-banner-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.install-banner-btn .ic {
  width: 15px;
  height: 15px;
}

.install-chip {
  display: inline-flex;
  min-height: 42px;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid rgba(189, 135, 56, 0.3);
  border-radius: 999px;
  color: #7a5412;
  background: rgba(251, 241, 216, 0.8);
  font-size: 0.79rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.install-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.install-chip .ic {
  width: 17px;
  height: 17px;
}

.footer-inner .footer-link + .footer-link {
  margin-left: 0;
}

.install-dialog {
  width: min(510px, calc(100% - 30px));
}

.install-dialog-icon {
  color: #7a5412;
  background: var(--gold-soft);
}

.install-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.install-lead {
  margin: 0 0 18px !important;
}

.install-state {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(14, 112, 82, 0.18);
  border-radius: 15px;
  color: var(--green-dark);
  background: var(--green-soft);
}

.install-state > .ic {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  color: var(--green);
}

.install-state strong {
  display: block;
  font-size: 0.86rem;
}

.install-state p {
  margin: 3px 0 0 !important;
  color: var(--green-dark) !important;
  font-size: 0.75rem !important;
  line-height: 1.6 !important;
}

.install-native {
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid rgba(14, 112, 82, 0.18);
  border-radius: 16px;
  background: var(--green-soft);
}

.install-native-btn {
  margin-top: 0;
}

.install-native p {
  margin: 8px 0 0 !important;
  color: var(--green-dark) !important;
  font-size: 0.73rem !important;
  line-height: 1.6 !important;
  text-align: center;
}

.install-platform {
  margin-bottom: 14px;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-soft);
}

.install-platform.is-wechat {
  border-color: rgba(184, 79, 67, 0.24);
  background: var(--red-soft);
}

.install-platform-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.install-platform-head strong {
  font-size: 0.88rem;
}

.install-platform-pill {
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: inset 0 0 0 1px rgba(14, 112, 82, 0.14);
  font-size: 0.69rem;
  font-weight: 700;
  white-space: nowrap;
}

.install-platform.is-wechat .install-platform-pill {
  color: var(--red-dark);
  box-shadow: inset 0 0 0 1px rgba(184, 79, 67, 0.18);
}

.install-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.65;
}

.install-step-num {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 2px;
  place-items: center;
  border-radius: 50%;
  color: #fffdf6;
  background: var(--green);
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1;
}

.install-platform.is-wechat .install-step-num {
  background: var(--red-dark);
}

.inline-ic {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}

.inline-ic .ic {
  width: 14px;
  height: 14px;
}

.install-note {
  margin: 11px 0 0 !important;
  padding: 9px 11px;
  border-radius: 10px;
  color: #7a5412 !important;
  background: var(--gold-soft);
  font-size: 0.72rem !important;
  line-height: 1.65 !important;
}

.install-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0 !important;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  line-height: 1.7 !important;
}

.install-privacy .ic {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--green);
}

@media (max-width: 760px) {
  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .install-chip {
    align-self: flex-start;
  }

  .install-banner {
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 26px;
    padding: 17px 18px;
  }

  .install-banner-copy {
    flex-basis: calc(100% - 59px);
  }

  .install-banner-btn {
    width: 100%;
  }

  .footer-inner .footer-link {
    margin-left: 0;
  }
}

@media (max-width: 400px) {
  .install-banner {
    padding: 15px;
  }

  .install-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .install-banner-copy {
    flex-basis: calc(100% - 53px);
  }

  .install-banner-copy strong {
    font-size: 0.9rem;
  }

  .install-dialog .dialog-inner {
    padding: 23px 20px;
  }

  .install-platform {
    padding: 14px;
  }

  .install-steps li {
    font-size: 0.77rem;
  }
}

/* 第 10 版：新增二号策略（平推回本），开始页和看板都能选 */

.strategy-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.strategy-field legend {
  display: block;
  margin-bottom: 9px;
  padding: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

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

.setup-card .strategy-choice {
  position: relative;
  display: flex;
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  cursor: pointer;
}

.strategy-choice input {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.strategy-choice-body {
  display: block;
  flex: 1;
  min-width: 0;
  padding: 12px 38px 12px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.strategy-choice:hover .strategy-choice-body {
  border-color: rgba(14, 112, 82, 0.34);
}

.strategy-choice input:checked ~ .strategy-choice-body {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(14, 112, 82, 0.08);
}

.strategy-choice input:focus-visible ~ .strategy-choice-body {
  outline: 3px solid rgba(189, 135, 56, 0.62);
  outline-offset: 3px;
}

.strategy-choice-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.strategy-choice-head strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.strategy-choice-head em {
  color: var(--green-dark);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 600;
}

.strategy-choice-text {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 400;
  line-height: 1.6;
}

.strategy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
  padding: 15px 20px;
  border: 1px solid rgba(14, 112, 82, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.8);
}

.strategy-bar-copy {
  min-width: 0;
}

.strategy-bar-copy strong {
  display: block;
  margin-top: 1px;
  font-size: 0.98rem;
}

.strategy-bar-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.strategy-tabs {
  display: flex;
  flex: none;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-soft);
}

.strategy-tab {
  display: flex;
  min-width: 104px;
  min-height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 7px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.strategy-tab small {
  color: var(--muted-light);
  font-size: 0.63rem;
  font-weight: 500;
}

.strategy-tab:hover {
  color: var(--green-dark);
}

.strategy-tab.is-active {
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 18px -10px rgba(14, 112, 82, 0.85);
}

.strategy-tab.is-active small {
  color: rgba(255, 255, 255, 0.8);
}

.rules-strategy-chip {
  flex: none;
  padding: 5px 10px;
  border: 1px solid rgba(14, 112, 82, 0.2);
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.69rem;
  font-weight: 700;
  white-space: nowrap;
}

.reset-strategy-note {
  margin: 10px 0 17px;
  padding: 10px 12px;
  border: 1px solid rgba(189, 135, 56, 0.18);
  border-radius: var(--radius-sm);
  color: #75613f;
  background: rgba(248, 238, 218, 0.67);
  font-size: 0.76rem;
  line-height: 1.6;
}

.reset-strategy-note strong {
  color: var(--green-dark);
}

@media (max-width: 760px) {
  /* 手机端看板按顺序排列时，把策略栏放在标题下面、资金卡上面。 */
  .dashboard-heading {
    order: 1;
  }

  .strategy-bar {
    order: 2;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }

  .balance-card {
    order: 3;
  }

  .action-panel {
    order: 4;
  }

  .empty-alert {
    order: 5;
  }

  .stats-row {
    order: 6;
  }

  .content-grid {
    order: 7;
  }

  .strategy-tabs {
    width: 100%;
  }

  .strategy-tab {
    min-width: 0;
    flex: 1;
  }
}

@media (max-width: 400px) {
  .strategy-choice-grid {
    grid-template-columns: 1fr;
  }

  .strategy-choice-body {
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

/* ===== 第 11 版：门户登录 ===== */

.portal-gate {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 28px 18px calc(28px + env(safe-area-inset-bottom));
}

.portal-card {
  width: min(442px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

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

.portal-brand .brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
}

.portal-brand .brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.portal-brand .brand-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.portal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 25px;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.portal-card h1 {
  margin: 8px 0 9px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 6vw, 2.15rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.portal-lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.8;
}

.portal-form label {
  display: block;
  margin: 14px 0 7px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
}

.portal-form label:first-of-type {
  margin-top: 0;
}

.portal-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  /* 输入框字号不能小于 16px，否则 iPhone 一聚焦就会把整个页面放大。 */
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-input::placeholder {
  color: #b4b3aa;
}

.portal-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(14, 112, 82, 0.1);
}

.portal-input[aria-invalid="true"] {
  border-color: var(--red);
}

.portal-form .portal-remember {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.55;
}

.portal-form .portal-remember input {
  width: 17px;
  height: 17px;
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.portal-form .primary-btn {
  margin-top: 18px;
}

.portal-notes {
  display: grid;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 0.72rem;
  line-height: 1.65;
}

.portal-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
}

.portal-note .ic {
  margin-top: 2px;
  color: var(--green);
}

.portal-note strong {
  color: var(--muted);
  font-weight: 600;
}

.portal-settings-dialog {
  width: min(460px, calc(100% - 30px));
}

.portal-settings-note {
  padding: 12px 14px;
  border: 1px solid rgba(189, 135, 56, 0.24);
  border-radius: 14px;
  background: rgba(243, 229, 201, 0.45);
  color: #6f511b;
  font-size: 0.76rem;
  line-height: 1.65;
}

.portal-settings-form .dialog-field label {
  margin-bottom: 7px;
}

.portal-settings-form .field-error {
  margin: 8px 2px 0;
}

.portal-settings-form .field-tip {
  margin: 8px 2px 0;
}

.portal-settings-form .dialog-actions {
  flex-wrap: wrap;
  margin-top: 22px;
}

.portal-settings-form .dialog-actions .secondary-btn,
.portal-settings-form .dialog-actions .primary-btn {
  min-height: 44px;
}

.footer-inner {
  flex-wrap: wrap;
  row-gap: 8px;
}

@media (max-width: 540px) {
  .portal-gate {
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
  }

  .portal-card {
    padding: 24px 22px;
    border-radius: 24px;
  }

  .portal-kicker {
    margin-top: 20px;
  }

  .portal-settings-form .dialog-actions {
    flex-direction: column-reverse;
  }

  .portal-settings-form .dialog-actions .secondary-btn,
  .portal-settings-form .dialog-actions .primary-btn {
    width: 100%;
  }
}

@media (max-height: 640px) {
  .portal-gate {
    align-items: start;
  }
}

/* ===== 第 12 版：每个用户自己的门户登录和登录期限 ===== */

.portal-notice {
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid rgba(189, 135, 56, 0.34);
  border-radius: 12px;
  background: rgba(243, 229, 201, 0.6);
  color: #6f511b;
  font-size: 0.8rem;
  line-height: 1.65;
}

.user-chip.is-locked,
.user-chip:disabled {
  cursor: default;
  opacity: 1;
  color: var(--muted);
  background: var(--card-soft);
}

.user-login-tip {
  margin: 0 0 9px;
  padding: 11px 13px;
  border: 1px solid rgba(14, 112, 82, 0.18);
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.73rem;
  line-height: 1.65;
}

.user-login-meta {
  overflow-wrap: anywhere;
}

.user-login-meta.is-none {
  color: var(--muted-light);
}

.user-login-meta.is-active {
  color: var(--green-dark);
}

.user-login-meta.is-disabled,
.user-login-meta.is-expired {
  color: var(--red-dark);
}

.user-act-btn.is-login {
  border-color: rgba(189, 135, 56, 0.3);
  color: #7a5412;
  background: rgba(243, 229, 201, 0.55);
}

.user-account-dialog {
  width: min(470px, calc(100% - 30px));
}

.user-account-status {
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card-soft);
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.65;
}

.portal-role-note {
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-width: 540px) {
  .user-actions .user-act-btn {
    flex: 1 1 calc(50% - 5px);
  }
}

/* 第 13 版：会员中心优化
   会员开通记录、累计天数、套餐日均价格、会员码识别预览和到期提醒。
   新增内容统一放在文件末尾，避免和前面的版式互相覆盖。 */

.member-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed rgba(138, 90, 23, 0.28);
}

.member-stat {
  min-width: 0;
}

.member-stat span {
  display: block;
  color: #8a744f;
  font-size: 0.64rem;
  line-height: 1.4;
}

.member-stat strong {
  display: block;
  margin-top: 2px;
  color: #5f4214;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.member-renew-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 11px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  color: #0e7052;
  background: rgba(227, 241, 234, 0.7);
  font-size: 0.7rem;
  line-height: 1.6;
}

.member-renew-note .ic {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex: none;
  color: var(--gold);
}

.plan-daily {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.5;
}

.plan-saving {
  margin-top: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  color: #0e7052;
  background: rgba(14, 112, 82, 0.1);
  font-size: 0.61rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.member-code-preview {
  margin: 8px 0 0;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 0.72rem;
  line-height: 1.6;
}

.member-code-preview.is-ok {
  color: #0e7052;
  background: rgba(227, 241, 234, 0.78);
}

.member-code-preview.is-warning {
  color: var(--red-dark);
  background: var(--red-soft);
}

.member-history {
  display: grid;
  gap: 7px;
}

.member-history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-soft);
}

.member-history-main {
  min-width: 0;
}

.member-history-main strong {
  display: block;
  font-size: 0.76rem;
  line-height: 1.5;
}

.member-history-main span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.member-history-days {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  color: #0e7052;
  background: rgba(14, 112, 82, 0.1);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.member-history-empty {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.65;
  text-align: center;
}

.member-history-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.6;
}

.member-expiry-reminder {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 11px 0 0;
  padding: 9px 12px;
  border: 1px solid rgba(189, 135, 56, 0.32);
  border-radius: 12px;
  color: #7a5412;
  background: rgba(253, 248, 236, 0.92);
  font-size: 0.78rem;
  line-height: 1.6;
}

.member-expiry-reminder .ic {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--gold);
}

.member-expiry-reminder .trial-link {
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 540px) {
  .member-expiry-reminder .trial-link {
    margin-left: 23px;
  }
}

@media (max-width: 400px) {
  .member-stat-grid {
    gap: 6px;
  }

  .member-stat span {
    font-size: 0.6rem;
  }

  .member-stat strong {
    font-size: 0.72rem;
  }

  .plan-daily,
  .plan-saving {
    grid-column: 1;
    justify-self: start;
  }

  .member-history-item {
    flex-direction: column;
    gap: 6px;
  }

  .member-history-days {
    align-self: flex-start;
  }
}

/* 第 15 版：管理后台入口和用户切换弹窗的小调整。 */
a.ghost-btn,
a.admin-entry {
  text-decoration: none;
}

.admin-entry {
  white-space: nowrap;
}

.user-dialog-admin-link {
  margin: 14px 0 0;
}

.user-dialog-admin-link .primary-btn {
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

/* ===== 第 20 版：策略三（红绿定色） ===== */

/* 规则预览的第三套策略说明横跨整行，桌面端不留下半行空位。 */
.rule-mini--wide {
  grid-column: 1 / -1;
  min-height: 0;
}

/* 三个策略按钮在桌面端稍微收窄，窄屏仍然平分整行。 */
.strategy-tabs .strategy-tab {
  min-width: 92px;
}

@media (max-width: 760px) {
  .strategy-tabs .strategy-tab {
    min-width: 0;
  }
}

/* ===== 第 30 版：管理员盈亏总览 ===== */

.account-overview {
  margin-top: 15px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.82);
}

.start-view .account-overview {
  margin-top: 26px;
}

.account-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-overview-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.account-live {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(14, 112, 82, 0.18);
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.68rem;
  font-weight: 700;
}

.account-live > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2a9169;
  box-shadow: 0 0 0 3px rgba(42, 145, 105, 0.16);
}

.account-overview-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.6;
}

.account-overview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 11px;
  margin-top: 15px;
}

.account-card {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.8);
}

.account-card.is-current {
  border-color: rgba(14, 112, 82, 0.32);
  background: rgba(233, 245, 238, 0.72);
  box-shadow: 0 10px 22px -20px rgba(14, 112, 82, 0.9);
}

.account-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-card-top strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.account-badges {
  display: inline-flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.account-badge {
  padding: 2px 7px;
  border-radius: 999px;
  color: #7a5a1f;
  background: rgba(248, 238, 218, 0.9);
  font-size: 0.6rem;
  font-weight: 700;
  white-space: nowrap;
}

.account-badge.is-current {
  color: var(--green-dark);
  background: rgba(220, 240, 229, 0.95);
}

.account-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  margin-top: 13px;
}

.account-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.67rem;
}

.account-metric strong {
  display: block;
  margin-top: 1px;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.account-empty {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.account-foot {
  margin: 12px 0 0;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.account-card.is-empty .account-foot {
  margin-top: 6px;
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 760px) {
  /* 手机端看板按顺序排列：总览放在统计卡和明细之间。 */
  .dashboard .account-overview {
    order: 7;
  }

  .dashboard .content-grid {
    order: 8;
  }

  .account-overview {
    padding: 18px 18px 20px;
  }

  .account-overview-list {
    grid-template-columns: 1fr;
  }
}

/* ===== 第 31 版：跨设备记录码 ===== */

.sync-panel {
  min-width: 0;
  margin-top: 15px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.82);
}

.sync-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.sync-panel-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.sync-tag {
  flex: none;
  padding: 5px 11px;
  border: 1px solid rgba(189, 135, 56, 0.3);
  border-radius: 999px;
  color: #7a5a1f;
  background: rgba(248, 238, 218, 0.82);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.sync-panel-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.6;
}

.sync-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.sync-panel-actions .secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sync-panel-actions .ic {
  width: 17px;
  height: 17px;
}

.sync-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  padding: 20px 22px;
  border: 1px dashed rgba(14, 112, 82, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(233, 245, 238, 0.5);
}

.sync-banner-icon {
  display: grid;
  flex: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--green);
  background: rgba(220, 240, 229, 0.95);
}

.sync-banner-icon .ic {
  width: 22px;
  height: 22px;
}

.sync-banner-copy {
  min-width: 0;
  flex: 1;
}

.sync-banner-copy strong {
  display: block;
  font-size: 0.95rem;
}

.sync-banner-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.65;
}

.sync-banner-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 10px 15px;
  border: 1px solid rgba(14, 112, 82, 0.28);
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--card);
  font-size: 0.78rem;
  font-weight: 700;
}

.sync-banner-btn .ic {
  width: 16px;
  height: 16px;
}

.sync-dialog {
  width: min(520px, calc(100% - 30px));
}

.reset-dialog .sync-account-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: -6px 0 4px;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.sync-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.sync-block h3 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.4;
}

.sync-block .field-tip {
  margin: 0;
}

.sync-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 11px;
}

.sync-buttons .secondary-btn,
.sync-buttons .primary-btn {
  min-height: 42px;
}

.sync-textarea {
  width: 100%;
  min-height: 88px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--ink);
  background: var(--card);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.55;
  resize: vertical;
}

.sync-textarea:focus {
  outline: 2px solid rgba(14, 112, 82, 0.35);
  outline-offset: 1px;
}

.sync-block .field-error {
  margin-top: 9px;
}

.account-sync-btn {
  margin-top: 9px;
  padding: 0;
  border: 0;
  color: var(--green-dark);
  background: transparent;
  font-size: 0.71rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  /* 手机端看板顺序：统计卡 → 记录同步 → 管理员总览 → 明细。 */
  .dashboard .sync-panel {
    order: 6;
  }

  .sync-panel {
    padding: 18px 18px 20px;
  }

  .sync-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }

  .sync-banner-btn {
    width: 100%;
    justify-content: center;
  }

  .sync-banner-icon {
    width: 40px;
    height: 40px;
  }

  .sync-buttons .secondary-btn,
  .sync-buttons .primary-btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 400px) {
  .sync-dialog .dialog-inner {
    padding: 22px 18px;
  }
}

/* 第 33 版：备份到百度网盘用的是「本机自动备份 + 备份文件」，
   新加的都是同步弹窗里的说明、备份时间和选择框，不改动看板原有排版。 */
.backup-status {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 11px;
  color: var(--green-dark);
  background: rgba(14, 112, 82, 0.08);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.55;
}

.backup-status.is-warning {
  color: #8a3a32;
  background: rgba(184, 79, 67, 0.1);
}

.backup-select {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: var(--card);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

.backup-select:focus {
  outline: 2px solid rgba(14, 112, 82, 0.35);
  outline-offset: 1px;
}

.backup-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.6;
}

#backup-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .sync-buttons #backup-download-btn,
  .sync-buttons #backup-share-btn,
  .sync-buttons #backup-restore-btn,
  .sync-buttons #backup-file-btn {
    flex: 1 1 100%;
  }
}
