/* ============================================================
 * iOS 26 HIG 设计语言（Apple Human Interface Guidelines）
 * - Liquid Glass 毛玻璃 nav bar
 * - Large Title 顶部大标题
 * - 系统色板：#007AFF blue / #FF3B30 red / #34C759 green / etc.
 * - 白卡 + 1px hairline (#C6C6C8 透明化)
 * - SF Symbols 风格 outline icons
 * - 底部 Liquid Glass tabbar —— 完全保留，零修改
 * ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Apple iOS 26 System Colors (true HIG) */
  --ios-blue:        #007AFF;
  --ios-blue-dark:   #0051D5;
  --ios-blue-light:  #E5F1FF;

  --ios-red:         #FF3B30;
  --ios-red-dark:    #D70015;
  --ios-red-light:   #FFEBEA;

  --ios-orange:      #FF9500;
  --ios-orange-light:#FFF1DE;

  --ios-yellow:      #FFCC00;
  --ios-yellow-light:#FFF8D9;

  --ios-green:       #34C759;
  --ios-green-light: #E8F8EB;

  --ios-teal:        #5AC8FA;
  --ios-teal-light:  #E5F6FE;

  --ios-indigo:      #5856D6;
  --ios-indigo-light:#ECEBFA;

  --ios-pink:        #FF2D55;
  --ios-pink-light:  #FFE4EB;

  /* Apple iOS 26 Greys (precise) */
  --ios-bg:           #F2F2F7;                              /* systemGroupedBackground */
  --ios-bg-elev:      #FFFFFF;                              /* secondarySystemGroupedBackground */
  --ios-bg-nav-rest:  rgba(255, 255, 255, 0);               /* 完全透明 - iOS 26 nav 默认 */
  --ios-bg-nav-scroll:rgba(255, 255, 255, 0.88);            /* scroll 后 88% 白 */

  --ios-label:        #000000;                              /* primary text */
  --ios-label-2:      #3C3C43;                              /* secondary text @ 60% */
  --ios-label-3:      rgba(60, 60, 67, 0.60);               /* tertiary text */
  --ios-label-4:      rgba(60, 60, 67, 0.30);               /* quaternary */
  --ios-label-5:      rgba(60, 60, 67, 0.18);               /* placeholder */

  --ios-separator:        rgba(60, 60, 67, 0.12);          /* hairline 0.5pt @ 12% */
  --ios-separator-opaque: #C6C6C8;                          /* iOS 13+ opaque separator */
  --ios-fill-1:    rgba(120, 120, 128, 0.20);                /* systemFill */
  --ios-fill-2:    rgba(120, 120, 128, 0.16);                /* secondarySystemFill */
  --ios-fill-3:    rgba(118, 118, 128, 0.12);                /* tertiarySystemFill */
  --ios-fill-4:    rgba(116, 116, 128, 0.08);                /* quaternarySystemFill */

  /* Apple Geometry (precise) */
  --ios-r-card: 16px;                                        /* large card corner */
  --ios-r-tile: 11.5px;                                      /* iOS 26 App Library 17.37% of 66pt */
  --ios-r-pill: 9999px;
  --ios-r-tag:  8px;                                         /* small tag */
  --ios-r-input:10px;
  --ios-r-seg:  9px;                                         /* iOS 26 segmented thumb 9pt */

  /* Apple Section Geometry */
  --ios-inset-card: 20px;                                    /* 整 card 左右距 screen edge 20pt */
  --ios-inset-row:  16px;                                    /* row 内部 padding 16pt */
  --ios-section-gap:24px;                                    /* section 间距 24pt */
  --ios-section-cap-gap: 6px;                                /* caption 到 card 6pt */

  /* iOS 26 Standard heights */
  --ios-h-button:      34pt;                                /* inline button */
  --ios-h-button-prom: 50pt;                                /* prominent button */
  --ios-h-cell:        44pt;                                /* list cell min */
  --ios-h-progress:    4pt;                                 /* iOS 26 progress */
  --ios-h-seg:         30pt;                                /* iOS 26 segmented */

  /* Shadows - iOS uses very subtle */
  --ios-shadow-card:   0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  --ios-shadow-nav:    0 0.33px 0 rgba(0, 0, 0, 0.04);

  /* Typography - Apple iOS 26 */
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
              "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --ios-font-r: -apple-system, BlinkMacSystemFont, "SF Pro Rounded",
               "PingFang SC", sans-serif;

  /* Apple Type Scale (HIG confirmed) */
  --t-large-title: 34px;
  --t-title-1:     28px;
  --t-title-2:     22px;
  --t-title-3:     20px;
  --t-headline:    17px;
  --t-body:        17px;
  --t-callout:     16px;
  --t-subheadline: 15px;
  --t-footnote:    13px;
  --t-caption-1:   12px;
  --t-caption-2:   11px;

  --t: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  min-height: 100%;
  font-family: var(--ios-font);
  color: var(--ios-label);
  font-size: var(--t-body);
  line-height: 1.29;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.024em;
}

body {
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  /* iOS 26 systemGroupedBackground (light) - 纯白基底 */
  background: #FFFFFF;
  background-attachment: fixed;
  position: relative;
}

/* ============================================================
 * 顶部毛玻璃 nav bar（iOS 26 Liquid Glass 折射 + 双 title 系统）
 * Apple 26 关键:
 *  - nav 区域 透明 → scroll 后变 88% 白 + hairline
 *  - Large Title 34pt Bold 在 nav 内顶部（scroll-out 渐隐）
 *  - Inline Title 17pt Semibold 在 nav 中部（scroll-in 渐入）
 *  - 两个 title 由 JS scrollY 互斥过渡，不依赖 class 切换
 * ============================================================ */
:root {
  /* Apple Spring 曲线（UIKit / SwiftUI Motion） */
  --apple-spring:        cubic-bezier(0.22, 1, 0.36, 1);
  --apple-spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --apple-spring-soft:   cubic-bezier(0.4, 0, 0.2, 1);
  --apple-expo-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ios-spring-dur:      380ms;
  --ios-large-title-dur: 320ms;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  /* iOS 26 nav 默认完全透明 */
  background: var(--ios-bg-nav-rest);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition:
    background var(--ios-spring-dur) var(--apple-spring);
}
@supports (backdrop-filter: url(#lg-nav-refract)) {
  .navbar {
    backdrop-filter: saturate(180%) blur(20px) url(#lg-nav-refract);
    -webkit-backdrop-filter: saturate(180%) blur(20px) url(#lg-nav-refract);
  }
}
.navbar.is-condensed {
  background: var(--ios-bg-nav-scroll);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  box-shadow: inset 0 -0.5px 0 var(--ios-separator);
}
.navbar::before {
  /* 顶部高光扫过 (iOS glass 真实感) */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.12) 35%,
    transparent 65%);
  opacity: 1;
  transition: opacity var(--ios-spring-dur) var(--apple-spring);
}
.navbar.is-condensed::before { opacity: 0.35; }

.navbar-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;       /* actions 右对齐 */
  /* iOS 26 nav height: 顶部 safe area + Large title 区 + inline 区 */
  padding: calc(env(safe-area-inset-top)) 0 0;
  height: calc(96px + env(safe-area-inset-top));    /* 顶部 + Large Title 区 + Inline 行 */
  transition: height var(--ios-spring-dur) var(--apple-spring);
}
.navbar.is-condensed .navbar-inner {
  height: calc(44px + env(safe-area-inset-top));   /* 44pt 标准 nav height */
}

/* 双 title stack：Large Title 在 nav 顶部 (top:0)，Inline 在中部 */
.navbar-title-stack {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Large Title: 34pt Bold, Apple tracking -0.4 */
.navbar-large-title {
  position: absolute;
  left: 20px;
  right: 80px;                                       /* 给右侧 actions 留空间 */
  bottom: 7px;                                       /* Large title 距底部 7pt */
  font-size: var(--t-large-title);
  font-weight: 700;                                  /* Bold */
  letter-spacing: -0.014em;                          /* Apple SF tracking @ 34pt */
  line-height: 1.1;
  color: var(--ios-label);
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: opacity, transform;
  transition:
    opacity var(--ios-large-title-dur) var(--apple-spring),
    transform var(--ios-large-title-dur) var(--apple-spring),
    visibility 0s linear var(--ios-large-title-dur);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inline Title: 17pt Semibold 居中 */
.navbar-inline-title {
  position: absolute;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 22px);       /* nav 中部 */
  transform: translate(-50%, -50%) translateY(8px);
  font-size: var(--t-headline);
  font-weight: 600;                                  /* Semibold */
  letter-spacing: -0.024em;
  color: var(--ios-label);
  opacity: 0;
  transition:
    opacity var(--ios-spring-dur) var(--apple-spring),
    transform var(--ios-spring-dur) var(--apple-spring);
  white-space: nowrap;
}

/* nav 右侧按钮组 (Apple HIG: 36x36 button + fill 3) */
.navbar-actions {
  position: absolute;
  right: 12px;
  bottom: 6px;                                       /* 与 Inline title 行底部对齐 */
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  transition: bottom var(--ios-spring-dur) var(--apple-spring);
}
.navbar.is-condensed .navbar-actions {
  bottom: 4px;                                       /* condensed 时对齐到 inline 行 */
}

.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ios-fill-3);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ios-blue);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 200ms var(--apple-spring),
    transform 280ms var(--apple-spring-bounce);
}
.nav-icon-btn.is-pressing {
  transform: scale(0.86);
  background: var(--ios-fill-2);
}
.nav-icon-btn:active {
  background: var(--ios-fill-2);
  transform: scale(0.92);
}

/* ============================================================
 * Page (iOS 内容区)
 * ============================================================ */
.page {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.page-ios {
  /* iOS 26 nav 高度 96pt (Large Title 展开) - 正好让内容从 Large Title 下方开始 */
  padding-top: calc(env(safe-area-inset-top) + 96px);
  padding-left: 0;
  padding-right: 0;
  transition: padding-top var(--ios-spring-dur) var(--apple-spring);
}
/* condensed 时 page 上移，nav 收缩 */
.is-condensed ~ .page-ios,
.page-ios {
  /* 由 nav 高度决定，无需手动调 */
}

/* Page 切换 transition (iOS 26 push: 8% 右移 + opacity) */
.page-enter {
  animation: iosPagePushIn 420ms var(--apple-spring) both;
}
@keyframes iosPagePushIn {
  0%   { opacity: 0; transform: translate3d(7%, 0, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Legacy 兼容 (large-title-wrap 已废弃) */
.large-title-wrap { display: none; }
.ios-large-title   { display: none; }

.ios-content {
  padding: 8px 0 24px;                                /* 左右 padding 由 ios-section 控制 */
}

.ios-section {
  margin-bottom: 20px;
}

/* ============================================================
 * Large Title (在内容区顶部，页面未滚动时显示)
 * ============================================================ */
.ios-large-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ios-label);
  line-height: 1.1;
  padding: 0 16px 16px;
}

/* ============================================================
 * iOS 26 Inset Grouped Card（白底 + hairline + 极轻外阴影）
 * 不是 24px 模糊 Liquid Glass（那个只在 nav bar / control center）
 * ============================================================ */
.ios-card,
.rules-card,
.ledger {
  position: relative;
  margin: 0 var(--ios-inset-card);
  border-radius: var(--ios-r-card);
  overflow: hidden;
  background: #FFFFFF;
  border: 0.5px solid var(--ios-separator);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ============================================================
 * iOS 26 Inset Grouped List 几何 (HIG strict)
 *  - section 间距 24pt
 *  - section caption (header) top:24pt, bottom:6pt
 *  - card margin 20pt from screen edge
 *  - card 内部 row padding 16pt horizontal, 11pt vertical
 *  - 0.5pt hairline separator
 * ============================================================ */
.ios-section {
  margin-bottom: var(--ios-section-gap);
}
.ios-section:first-child { margin-top: 0; }

/* Section caption (header) - ALL CAPS 13pt Regular */
.section-caption {
  font-size: var(--t-footnote);
  font-weight: 400;
  color: var(--ios-label-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;                                /* Apple caption tracking */
  margin: 0 20px 6px 32px;                              /* iOS: 32pt left for grouping */
  line-height: 1.29;
}

/* iOS list row (inset grouped) */
.ios-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--ios-h-cell);
  padding: 11px 16px;
  font-size: var(--t-body);
  font-weight: 400;
  color: var(--ios-label);
  letter-spacing: -0.024em;
  border-bottom: 0.5px solid var(--ios-separator);
  transition: background 200ms var(--apple-spring);
  cursor: default;
}
.ios-row:last-child { border-bottom: none; }
.rule-plus  { color: var(--ios-green); font-weight: 400; font-variant-numeric: tabular-nums; }
.rule-minus { color: var(--ios-red);   font-weight: 400; font-variant-numeric: tabular-nums; }

/* ============================================================
 * 积分卡（iOS 26 Liquid Glass 玻璃壳 + 数字大）
 * ============================================================ */
.points-card {
  display: block;
}
.points-card .points-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 16px 14px;
  gap: 12px;
}
.points-card .points-meta { min-width: 0; }
.points-label {
  font-size: var(--t-footnote);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ios-label-3);
}
.points-value {
  font-size: var(--t-large-title);
  font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.014em;
  color: var(--ios-label);
  line-height: 1.1;
  display: inline-block;
  transition: transform 280ms var(--apple-spring-bounce);
  will-change: transform;
}
.points-value.pop {
  animation: odometerPop 360ms var(--apple-spring-bounce) both;
}
@keyframes odometerPop {
  0%   { transform: translateY(0) scale(1); }
  40%  { transform: translateY(-3px) scale(1.06); color: var(--ios-blue); }
  100% { transform: translateY(0) scale(1); }
}

.points-tip {
  font-size: var(--t-subheadline);
  color: var(--ios-green);
  padding: 0 16px 16px;
  min-height: 0;
  font-weight: 400;
  letter-spacing: -0.024em;
}

/* ============================================================
 * Segmented Control (iOS 26 strict: 30pt height, 9pt thumb radius)
 * ============================================================ */
.segmented {
  display: flex;
  align-items: stretch;
  background: var(--ios-fill-3);
  border-radius: var(--ios-r-pill);
  padding: 2px;
  gap: 0;
  position: relative;
  isolation: isolate;
  height: var(--ios-h-seg);
  margin: 0 var(--ios-inset-card);
}
.seg {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--ios-font);
  font-size: var(--t-subheadline);                      /* 15pt */
  font-weight: 600;                                     /* iOS 26 segmented selected: Semibold */
  color: var(--ios-label);
  cursor: pointer;
  border-radius: var(--ios-r-pill);
  position: relative;
  z-index: 2;
  letter-spacing: -0.024em;
  transition: color 200ms var(--apple-spring);
  -webkit-tap-highlight-color: transparent;
}
.seg.is-pressing { transform: scale(0.96); }

/* 滑块：iOS 26 实心白（保留 inset specular） */
.seg-slider {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 0;
  background: #FFFFFF;
  border-radius: var(--ios-r-seg);
  z-index: 1;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.04),
    0 1px 1px rgba(0, 0, 0, 0.04),
    inset 0 0.5px 0 0 rgba(255, 255, 255, 0.6),
    inset 0 -0.5px 0 0 rgba(0, 0, 0, 0.04);
  transition:
    transform 420ms var(--apple-spring-bounce),
    width 420ms var(--apple-spring-bounce);
  will-change: transform, width;
  pointer-events: none;
}
.seg.active { color: var(--ios-label); }

/* ============================================================
 * App Grid (iOS App Library 风格)
 * ============================================================ */
/* App Grid - iOS 26 Inset Grouped 白底 */
.app-grid {
  position: relative;
  border-radius: var(--ios-r-card);
  overflow: hidden;
  padding: 14px 4px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 0 var(--ios-inset-card);
  background: #FFFFFF;
  border: 0.5px solid var(--ios-separator);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 4px 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--ios-font);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 320ms var(--apple-spring-bounce),
    opacity 280ms var(--apple-spring);
  position: relative;
  overflow: hidden;
}
.app-tile.is-pressing { transform: scale(0.86); }
.app-tile::after {
  /* iOS 26 高光扫过 (按压 ripple) */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.42) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--apple-spring);
}
.app-tile.is-pressing::after { opacity: 1; }

/* 频道切换时重新进入 */
.app-tile.tile-in {
  animation: appTileIn 460ms var(--apple-spring-bounce) both;
}
@keyframes appTileIn {
  0%   { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}
.app-tile-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--ios-r-tile);                       /* 11.5pt iOS 26 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  color: #ffffff;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.4);
  transition: transform 320ms var(--apple-spring-bounce);
}
.app-tile.is-pressing .app-tile-icon {
  transform: scale(0.92);
}
.app-tile-icon svg { width: 26px; height: 26px; display: block; }
.app-tile-blue   { background: linear-gradient(180deg, #5AC8FA 0%, #007AFF 100%); }
.app-tile-indigo { background: linear-gradient(180deg, #8E8E93 0%, #5856D6 100%); }
.app-tile-green  { background: linear-gradient(180deg, #5DD39E 0%, #34C759 100%); }
.app-tile-orange { background: linear-gradient(180deg, #FFB066 0%, #FF9500 100%); }
.app-tile-pink   { background: linear-gradient(180deg, #FF7AAA 0%, #FF2D55 100%); }
.app-tile-teal   { background: linear-gradient(180deg, #88DDFA 0%, #5AC8FA 100%); }
.app-tile-yellow { background: linear-gradient(180deg, #FFE066 0%, #FFCC00 100%); color: #6e5a00; }
.app-tile-red    { background: linear-gradient(180deg, #FF8E80 0%, #FF3B30 100%); }
.app-tile-name {
  font-size: var(--t-caption-1);                          /* 12pt regular */
  font-weight: 400;                                       /* iOS 26 tile name regular */
  color: var(--ios-label);
  text-align: center;
  letter-spacing: -0.012em;
  line-height: 1.25;
  max-width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
 * iOS Field (iOS 26: 无下划线、list 内部行式)
 * ============================================================ */
.ios-field {
  padding: 11px 16px 12px;
  border-bottom: 0.5px solid var(--ios-separator);
}
.ios-field:last-of-type { border-bottom: none; }
.field-label {
  font-size: var(--t-footnote);                            /* 13pt regular uppercase */
  font-weight: 400;
  color: var(--ios-label-3);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.29;
}
.field-hint {
  color: var(--ios-label-3);
  font-size: var(--t-caption-1);
  font-weight: 400;
  margin-left: 4px;
  text-transform: none;
  letter-spacing: -0.012em;
}
.ios-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 4px 0 0;
  color: var(--ios-label);
  font-size: var(--t-body);                                /* 17pt */
  font-family: var(--ios-font);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.024em;
  min-height: 26px;
  line-height: 1.29;
  transition: opacity 200ms var(--apple-spring);
}
.ios-input::placeholder { color: var(--ios-label-5); transition: color 200ms var(--apple-spring); }
.ios-input:focus::placeholder { color: var(--ios-label-5); }
textarea.ios-input {
  resize: none;
  min-height: 80px;
  padding: 4px 16px;
  line-height: 1.4;
}

.ios-hint {
  font-size: var(--t-footnote);
  color: var(--ios-label-3);
  line-height: 1.4;
  padding: 11px 16px 12px;
}
.ios-tip {
  background: var(--ios-orange-light);
  color: var(--ios-orange);
  font-size: var(--t-footnote);
  padding: 8px 12px;
  border-radius: var(--ios-r-tag);
  margin: 0 16px 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.012em;
}

/* ============================================================
 * iOS 按钮 (Apple HIG 严格规范)
 *  - inline button: 34pt min height, 17pt regular
 *  - prominent button: 50pt, 17pt regular
 *  - secondary button: 34pt, 15pt regular
 * ============================================================ */
.btn-row-ios {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
}

.btn-ios-primary {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: var(--ios-r-pill);
  font-size: var(--t-body);
  font-weight: 600;
  font-family: var(--ios-font);
  letter-spacing: -0.024em;
  cursor: pointer;
  padding: 0 20px;
  min-height: var(--ios-h-button-prom);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
  color: #ffffff;
  /* iOS 26 filled button (solid blue + inner specular highlight) */
  background: var(--ios-blue);
  box-shadow: inset 0 0.5px 0 0 rgba(255, 255, 255, 0.30);
  transition:
    background 220ms var(--apple-spring),
    transform 320ms var(--apple-spring-bounce),
    opacity 220ms var(--apple-spring);
  isolation: isolate;
}
.btn-ios-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, 0.4) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 320ms var(--apple-spring);
  pointer-events: none;
}
.btn-ios-primary.is-pressing {
  background: var(--ios-blue-dark);
  transform: scale(0.97);
}
.btn-ios-primary.is-pressing::after { opacity: 1; }
.btn-ios-primary:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

.btn-ios-secondary {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: var(--ios-r-pill);
  font-size: var(--t-subheadline);
  font-weight: 500;
  font-family: var(--ios-font);
  letter-spacing: -0.024em;
  cursor: pointer;
  padding: 0 16px;
  min-height: var(--ios-h-button);
  -webkit-tap-highlight-color: transparent;
  color: var(--ios-blue);
  background: var(--ios-fill-3);
  transition:
    background 220ms var(--apple-spring),
    transform 320ms var(--apple-spring-bounce);
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-ios-secondary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), rgba(0, 0, 0, 0.08) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 320ms var(--apple-spring);
  pointer-events: none;
}
.btn-ios-secondary.is-pressing {
  background: var(--ios-fill-2);
  transform: scale(0.97);
}
.btn-ios-secondary.is-pressing::after { opacity: 1; }

.btn-ios-danger {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: var(--ios-r-pill);
  font-size: var(--t-body);
  font-weight: 600;
  font-family: var(--ios-font);
  letter-spacing: -0.024em;
  cursor: pointer;
  padding: 0 20px;
  min-height: var(--ios-h-button-prom);
  -webkit-tap-highlight-color: transparent;
  color: #ffffff;
  background: var(--ios-red);
  box-shadow: inset 0 0.5px 0 0 rgba(255, 255, 255, 0.30);
  transition:
    background 220ms var(--apple-spring),
    transform 320ms var(--apple-spring-bounce);
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-ios-danger::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, 0.4) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 320ms var(--apple-spring);
  pointer-events: none;
}
.btn-ios-danger.is-pressing {
  background: var(--ios-red-dark);
  transform: scale(0.97);
}
.btn-ios-danger.is-pressing::after { opacity: 1; }

.btn-ios-block {
  flex: 1;
  width: 100%;
}
.btn-sm {
  padding: 0 14px;
  min-height: 30px;
  font-size: var(--t-subheadline);
}

/* ios-row 弹簧按下 */
.ios-row.is-pressing { background: var(--ios-fill-3); }

/* ============================================================
 * Progress
 * ============================================================ */
/* ============================================================
 * Progress (iOS 26: 4pt thin bar, 4 宫格 stats)
 * ============================================================ */
.progress-bar {
  height: var(--ios-h-progress);
  background: var(--ios-fill-3);
  border-radius: var(--ios-r-pill);
  overflow: hidden;
  margin: 4px 16px 0;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--ios-blue);
  border-radius: var(--ios-r-pill);
  transition: width 480ms var(--apple-spring);
}
.progress-fill.done {
  background: var(--ios-green);
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 16px 8px;
  text-align: center;
}
.progress-stats > div { min-width: 0; }
.stat-label {
  font-size: var(--t-caption-2);                          /* 11pt */
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ios-label-3);
  font-weight: 400;
}
.stat-num {
  font-size: var(--t-title-3);                            /* 20pt regular */
  font-weight: 400;
  color: var(--ios-label);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  letter-spacing: -0.024em;
  line-height: 1.2;
}
.c-green { color: var(--ios-green) !important; }
.c-red { color: var(--ios-red) !important; }
.progress-status {
  text-align: center;
  font-size: var(--t-footnote);
  color: var(--ios-label-3);
  padding: 4px 16px 16px;
}

/* ============================================================
 * 邀请码
 * ============================================================ */
.invite-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px 14px;
}
.invite-code {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ios-label);
  background: var(--ios-secondary);
  border-radius: var(--ios-r-input);
  padding: 10px 12px;
  text-align: center;
  font-family: var(--ios-font-r);
  font-variant-numeric: tabular-nums;
}
.invite-code.copied {
  color: var(--ios-green);
  background: var(--ios-green-light);
}
.invite-stats {
  display: flex;
  justify-content: space-between;
  margin: 0 16px 14px;
  font-size: 13px;
  color: var(--ios-label-3);
  font-weight: 400;
}
.invite-stats b { color: var(--ios-label); font-weight: 600; }

/* ============================================================
 * Ledger
 * ============================================================ */
.ledger {
  padding: 0;
}
.ledger-empty {
  text-align: center;
  color: var(--ios-label-3);
  padding: 32px 16px;
  font-size: 15px;
}
.ledger-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 0.5px solid var(--ios-separator);
  animation: iosListIn 460ms var(--apple-spring-bounce) both;
}
@keyframes iosListIn {
  0%   { opacity: 0; transform: translate3d(0, 6px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}
.ledger-item:last-child { border-bottom: none; }
.ledger-reason { font-size: var(--t-body); font-weight: 400; color: var(--ios-label); letter-spacing: -0.024em; }
.ledger-time { font-size: var(--t-footnote); color: var(--ios-label-3); margin-top: 2px; font-weight: 400; letter-spacing: -0.012em; }
.ledger-change-plus  { color: var(--ios-green); font-weight: 400; font-size: var(--t-body); font-variant-numeric: tabular-nums; }
.ledger-change-minus { color: var(--ios-red);   font-weight: 400; font-size: var(--t-body); font-variant-numeric: tabular-nums; }

/* ============================================================
 * Query result
 * ============================================================ */
.query-result {
  white-space: pre-wrap;
  word-break: break-all;
  font-size: var(--t-footnote);
  color: var(--ios-label);
  background: var(--ios-bg);
  border-radius: var(--ios-r-tag);
  padding: 12px;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  line-height: 1.45;
  letter-spacing: -0.012em;
}

/* ============================================================
 * Promo card
 * ============================================================ */
.promo-card { padding: 14px; }
.promo-img {
  display: block;
  width: 100%;
  max-width: 280px;
  max-height: 240px;
  height: auto;
  margin: 0 auto 10px;
  border-radius: var(--ios-r-tag);
  object-fit: contain;
}
.promo-text {
  font-size: var(--t-subheadline);
  color: var(--ios-label);
  line-height: 1.4;
  margin-bottom: 12px;
  word-break: break-all;
  text-align: center;
  padding: 0 8px;
  font-weight: 400;
  letter-spacing: -0.024em;
}

/* ============================================================
 * Toast
 * ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(110px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px) scale(0.94);
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: #ffffff;
  padding: 11px 18px 12px;
  border-radius: var(--ios-r-tag);
  font-size: var(--t-subheadline);
  font-weight: 400;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 240ms var(--apple-spring),
    transform 420ms var(--apple-spring-bounce);
  z-index: 999;
  max-width: 80vw;
  text-align: center;
  letter-spacing: -0.024em;
  line-height: 1.29;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ============================================================
 * 动画
 * ============================================================ */
@keyframes iosFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes iosFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
 * 底部导航 - Liquid Glass tabbar
 * 源码块完全保留 —— 零修改
 * ============================================================ */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 16px calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
  overflow: visible;
}

.tabbar-inner {
  --lift-ease: cubic-bezier(.34, 1.45, .42, 1);
  --unlift-ease: cubic-bezier(.22, .9, .28, 1);
  --glass-spring: cubic-bezier(.32, .72, 0, 1);
  pointer-events: auto;
  position: relative;
  isolation: isolate;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  width: min(100%, 392px);
  height: 62px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  border: 0.5px solid rgba(255, 255, 255, .45);
  box-shadow:
    0 10px 36px -14px rgba(0, 0, 0, .22),
    0 2px 8px rgba(0, 0, 0, .05),
    inset 0 0 0 0.5px rgba(255, 255, 255, .55),
    inset 0 1px 0 rgba(255, 255, 255, .75),
    inset 0 -1px 2px rgba(0, 0, 0, .04);
  backdrop-filter: blur(48px) saturate(180%) brightness(1.04);
  -webkit-backdrop-filter: blur(48px) saturate(180%) brightness(1.04);
  transition:
    width .48s var(--glass-spring),
    height .48s var(--glass-spring),
    padding .48s var(--glass-spring),
    transform .27s var(--lift-ease),
    box-shadow .35s ease;
  touch-action: none;
}

@supports (backdrop-filter: url(#lg-tab-refract)) {
  .tabbar-inner {
    backdrop-filter: blur(36px) saturate(180%) brightness(1.04) url(#lg-tab-refract);
  }
}

.tabbar-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.28) 0%, transparent 42%),
    linear-gradient(125deg, rgba(255,255,255,.16) 0%, transparent 40%);
  opacity: .85;
}

.tabbar.is-lens-lifted .tabbar-inner {
  transform: scale(calc(1 + 0.012 * var(--bar-lift, 1)));
  background: rgba(255, 255, 255, .18);
  box-shadow:
    0 12px 40px -12px rgba(0, 0, 0, .24),
    0 3px 10px rgba(0, 0, 0, .06),
    inset 0 0 0 0.5px rgba(255, 255, 255, .6),
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 -1px 2px rgba(0, 0, 0, .05);
}

.tab-indicator {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: 54px;
  border-radius: 999px;
  transform: translate3d(4px, 0, 0) scale(1, 1);
  transform-origin: center center;
  z-index: 0;
  pointer-events: none;
  will-change: transform, width, height, top, filter;
  transition: none;
  --lens-hx: 30%;
  --lens-hy: 12%;
  --lens-lift: 0;
  --lens-stretch: 0;
}
.tab-indicator-rest,
.tab-indicator-lift {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transition: none;
}
.tab-indicator-rest {
  background: rgba(0, 0, 0, .075);
  opacity: 1;
}
.tab-indicator-lift {
  opacity: 0;
  background: rgba(255, 255, 255, .38);
  border: 0.5px solid rgba(255, 255, 255, .7);
  box-shadow:
    0 10px 28px -10px rgba(0, 0, 0, .26),
    0 2px 8px rgba(0, 0, 0, .07),
    inset 0 0 0 0.5px rgba(255, 255, 255, .85),
    inset 0 1.5px 0 rgba(255, 255, 255, .98),
    inset 0 -1.5px 4px rgba(0, 0, 0, .07),
    inset 0 0 18px rgba(255, 255, 255, .28);
  backdrop-filter: blur(24px) saturate(190%) brightness(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(1.1);
}
.tab-indicator.is-warping .tab-indicator-lift {
  backdrop-filter: blur(20px) saturate(200%) brightness(1.12) url(#lg-lens-warp);
  -webkit-backdrop-filter: blur(20px) saturate(200%) brightness(1.12) url(#lg-lens-warp);
}
.tab-indicator-lift::before {
  content: "";
  position: absolute;
  inset: -0.5px;
  border-radius: inherit;
  pointer-events: none;
  opacity: calc(var(--lens-lift) * 0.55);
  box-shadow:
    inset 0.6px 0 0 rgba(120, 180, 255, .22),
    inset -0.6px 0 0 rgba(255, 140, 160, .16);
}
.tab-indicator-lift::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(
      95% 75% at var(--lens-hx) var(--lens-hy),
      rgba(255,255,255, calc(0.55 + var(--lens-lift) * 0.35)),
      transparent 58%
    ),
    linear-gradient(
      160deg,
      rgba(255,255,255, calc(0.35 + var(--lens-lift) * 0.25)) 0%,
      transparent 48%
    );
  pointer-events: none;
  opacity: .9;
  mix-blend-mode: soft-light;
}

.tabbar.is-lens-lifted .tab-indicator { z-index: 1; }

.tab-item {
  flex: 1 1 0;
  min-width: 0;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 2px 5px;
  margin: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  color: rgba(60, 60, 67, .48);
  position: relative;
  z-index: 2;
  border-radius: 999px;
  transition:
    color .2s ease,
    transform .27s var(--lift-ease);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.tab-item:active { transform: scale(.94); }
.tabbar.is-lens-lifted .tab-item:active { transform: none; }
.tab-item.active { color: #007AFF; }

.tab-item.is-lens-hot {
  color: #007AFF;
  z-index: 3;
}
.tabbar.is-lens-lifted .tab-item.active:not(.is-lens-hot) {
  transform: scale(1);
}

.tab-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  line-height: 0;
}
.tab-lottie {
  width: 34px;
  height: 34px;
  display: block;
  transition: filter .22s ease, transform .27s var(--lift-ease);
  /* 未激活：主题蓝 50% 透明感的浅蓝（用主题蓝 --ios-blue） */
  filter: brightness(0) saturate(100%)
          invert(40%) sepia(94%) saturate(2476%)
          hue-rotate(184deg) brightness(150%) contrast(95%)
          opacity(.55);
}
.tab-item.active .tab-lottie,
.tab-item.is-lens-hot .tab-lottie {
  /* 激活：主题蓝 #007AFF（= --ios-blue），实色 */
  filter: brightness(0) saturate(100%)
          invert(34%) sepia(94%) saturate(2476%)
          hue-rotate(184deg) brightness(101%) contrast(101%)
          opacity(1);
}
.tab-item.is-lens-hot .tab-lottie {
  transform: scale(1.04);
}
.tab-lottie svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.tab-item.sf-bounce .tab-lottie {
  animation: sfBounce .5s var(--lift-ease);
}
@keyframes sfBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.tab-name {
  max-height: 12px;
  max-width: 56px;
  overflow: hidden;
  white-space: nowrap;
  opacity: .92;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.1;
  transform: scale(.96);
  transform-origin: center top;
  transition:
    max-height .4s var(--glass-spring),
    max-width .45s var(--glass-spring),
    opacity .28s ease;
}
.tab-item.active .tab-name,
.tab-item.is-lens-hot .tab-name {
  opacity: 1;
  font-weight: 560;
}

.tabbar.is-compact .tabbar-inner {
  width: auto;
  height: 52px;
  padding: 4px;
}
.tabbar.is-compact .tab-item {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 48px;
  padding: 0 14px;
  gap: 0;
}
.tabbar.is-compact .tab-name {
  max-height: 0;
  max-width: 0;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .tabbar-inner, .tab-item, .tab-name, .tab-indicator, .tab-indicator-lift, .tab-lottie {
    transition: none !important;
  }
  .tab-item.sf-bounce .tab-lottie { animation: none !important; }
  .tabbar.is-lens-lifted .tabbar-inner { transform: none !important; }
}

/* ============================================================
 * 提现奖励卡片（iOS 26 Inset Grouped）
 * ============================================================ */
.reward-progress {
  padding: 14px 16px 6px;
  border-bottom: 0.5px solid var(--ios-separator);
  margin-bottom: 4px;
}
.reward-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--t-subheadline);
  color: var(--ios-label);
  letter-spacing: -0.024em;
  padding: 8px 0;
}
.reward-label { color: var(--ios-label-2); }
.reward-value {
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.reward-value b {
  font-weight: 600;
  font-size: var(--t-body);
  color: var(--ios-label);
}
.reward-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(120,120,128,0.25);
  transition: background 320ms var(--apple-spring);
}
.reward-dot.done {
  background: var(--ios-green);
  box-shadow: 0 0 8px rgba(52,199,89,0.45);
}

.reward-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px;
}
.reward-item {
  border-radius: 12px;
  padding: 14px 12px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.95));
  border: 0.5px solid var(--ios-separator);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.reward-item.is-claimed {
  background: linear-gradient(180deg, rgba(232,246,235,0.85), rgba(208,235,217,0.9));
  border-color: rgba(52,199,89,0.4);
}
.reward-item.is-claimable {
  background: linear-gradient(180deg, rgba(255,243,205,0.95), rgba(255,228,153,0.95));
  border-color: rgba(255,159,10,0.45);
  animation: rewardShine 2.2s ease-in-out infinite;
}
@keyframes rewardShine {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,159,10,0.0); }
  50%      { box-shadow: 0 0 0 6px rgba(255,159,10,0.18); }
}
.reward-amount {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.014em;
  color: var(--ios-red);
  line-height: 1.1;
}
.reward-item.is-claimed .reward-amount { color: var(--ios-green); }
.reward-name {
  font-size: var(--t-footnote);
  color: var(--ios-label-3);
  margin-top: 2px;
}
.reward-status {
  font-size: var(--t-footnote);
  color: var(--ios-label-3);
  margin-top: 6px;
  font-weight: 500;
}
.reward-item.is-claimed .reward-status { color: var(--ios-green); }
.reward-item.is-claimable .reward-status { color: #B25700; }

.withdraw-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}
.withdraw-actions .btn-ios-primary,
.withdraw-actions .btn-ios-secondary {
  flex: 1;
}

.withdraw-list {
  margin: 6px 16px 16px;
  border-top: 0.5px solid var(--ios-separator);
  padding-top: 6px;
}
.withdraw-empty {
  text-align: center;
  color: var(--ios-label-3);
  padding: 16px;
  font-size: var(--t-footnote);
}
.wd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 0.5px solid var(--ios-separator);
  font-size: var(--t-body);
}
.wd-item:last-child { border-bottom: none; }
.wd-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wd-item-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-item-time { font-size: var(--t-footnote); color: var(--ios-label-3); }
.wd-item-status {
  font-size: var(--t-footnote);
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(120,120,128,0.15);
  color: var(--ios-label-2);
}
.wd-item-status.pending { background: rgba(255,159,10,0.18); color: #B25700; }
.wd-item-status.approved { background: rgba(0,122,255,0.16); color: var(--ios-blue); }
.wd-item-status.paid { background: rgba(52,199,89,0.18); color: var(--ios-green); }
.wd-item-status.rejected { background: rgba(255,59,48,0.18); color: var(--ios-red); }

/* ============================================================
 * iOS 26 Sheet (弹层)
 * ============================================================ */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.40);
  z-index: 2000;
  opacity: 0;
  transition: opacity 320ms var(--apple-spring);
}
.sheet-mask.show { opacity: 1; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2010;
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border-radius: 16px 16px 0 0;
  box-shadow:
    0 -1px 0 rgba(0,0,0,0.04),
    0 -8px 32px rgba(0,0,0,0.18);
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 380ms var(--apple-spring-bounce);
  max-height: 80vh;
  overflow-y: auto;
}
.sheet.show { transform: translateY(0); }
.sheet-handle {
  width: 36px; height: 5px;
  border-radius: 3px;
  background: rgba(120,120,128,0.28);
  margin: 4px auto 12px;
}
.sheet-title {
  font-size: var(--t-headline);
  font-weight: 600;
  letter-spacing: -0.024em;
  color: var(--ios-label);
  text-align: center;
  padding: 0 16px 14px;
}
.sheet-body { padding: 4px 4px 16px; }
.sheet-row {
  padding: 10px 12px;
  background: var(--ios-fill-1);
  border-radius: 10px;
  margin-bottom: 10px;
}
.sheet-label {
  font-size: var(--t-footnote);
  color: var(--ios-label-3);
  margin-bottom: 4px;
}
.sheet-row .ios-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: var(--t-body);
  color: var(--ios-label);
  outline: none;
  padding: 2px 0;
  font-family: var(--ios-font);
}
.sheet-hint {
  font-size: var(--t-footnote);
  color: var(--ios-label-3);
  padding: 4px 4px;
}
.sheet-msg {
  font-size: var(--t-footnote);
  color: var(--ios-red);
  padding: 4px 4px;
  min-height: 1em;
}
.sheet-actions {
  display: flex;
  gap: 10px;
  padding: 4px 4px 0;
}
.sheet-actions .btn-ios-primary,
.sheet-actions .btn-ios-secondary { flex: 1; }

.cs-row {
  padding: 10px 12px;
  background: var(--ios-fill-1);
  border-radius: 10px;
  margin-bottom: 10px;
}
.cs-label { font-size: var(--t-footnote); color: var(--ios-label-3); margin-bottom: 4px; }
.cs-value { font-size: var(--t-body); color: var(--ios-label); word-break: break-all; }
.cs-qr {
  display: block;
  width: 180px; height: 180px;
  margin: 4px auto 0;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

/* ============================================================
 * 首页现金奖励 Hero 卡（iOS 26 Promotional Card）
 *  - 浅渐变 + 橙色 accent，醒目但不抢眼
 *  - 内嵌两个金额 + 进度条
 * ============================================================ */
.reward-hero-card {
  position: relative;
  margin: 0 var(--ios-inset-card);
  border-radius: var(--ios-r-card);
  overflow: hidden;
  padding: 16px 18px 14px;
  background:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(255, 159, 10, 0.10), transparent 55%),
    radial-gradient(ellipse 100% 70% at 100% 100%, rgba(255, 69, 58, 0.08), transparent 60%),
    linear-gradient(180deg, #FFF9F1 0%, #FFFFFF 70%);
  border: 0.5px solid rgba(255, 159, 10, 0.30);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  isolation: isolate;
}
.reward-hero-card::before {
  /* 顶部 specular sheen */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.18) 25%,
    rgba(255, 255, 255, 0) 45%);
  mix-blend-mode: soft-light;
  border-radius: inherit;
}
.reward-hero-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.reward-hero-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  background: linear-gradient(180deg, #FF9F0A, #FF7A00);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(255,122,0,0.30);
}
.reward-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ios-label);
  letter-spacing: -0.018em;
  line-height: 1.2;
}
.reward-hero-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.reward-hero-item {
  position: relative;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 12px 12px 10px;
  text-align: center;
  border: 0.5px solid var(--ios-separator);
}
.reward-hero-item-feature {
  background: linear-gradient(180deg, #FFF7E6, #FFF1D6);
  border-color: rgba(255, 159, 10, 0.45);
}
.reward-hero-num {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ios-red);
  letter-spacing: -0.012em;
  line-height: 1.15;
}
.reward-hero-item-feature .reward-hero-num { color: #B25700; }
.reward-hero-label {
  font-size: 12px;
  color: var(--ios-label-3);
  margin-top: 4px;
  line-height: 1.4;
}
.reward-hero-item-feature .reward-hero-label { color: #8A4500; }
.reward-hero-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #B25700;
  background: rgba(255, 159, 10, 0.18);
  padding: 1px 6px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.reward-hero-progress {
  background: #FFFFFF;
  border: 0.5px solid var(--ios-separator);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.reward-hero-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: var(--t-footnote);
  color: var(--ios-label-2);
}
.reward-hero-progress-row + .reward-hero-progress-row {
  border-top: 0.5px solid var(--ios-separator);
}
.reward-hero-progress-label {
  flex: 0 0 auto;
  min-width: 96px;
  letter-spacing: -0.018em;
}
.reward-hero-bar {
  flex: 1;
  height: 6px;
  background: var(--ios-fill-3);
  border-radius: 4px;
  overflow: hidden;
}
.reward-hero-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF9F0A, #FF7A00);
  border-radius: 4px;
  transition: width 520ms var(--apple-spring);
}
.reward-hero-bar-fill.done {
  background: linear-gradient(90deg, #34C759, #28A745);
}
.reward-hero-progress-num {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: var(--ios-label);
}
.reward-hero-progress-num b {
  font-weight: 700;
  font-size: var(--t-subheadline);
}
.reward-hero-cta {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.reward-hero-cta .btn-ios-primary,
.reward-hero-cta .btn-ios-secondary {
  flex: 1;
}

