/* ==========================================================================
   usage-reset-sheet.css · v2.1（2026-10-18）
   「使用重置卡」弹层（.rc-sheet）＋ 旧长条（#uxe-reset-wrap > .rc-bar）
   从 Google Material 改成 ChatGPT 风格，与用量页 usage-chatgpt.css 同一套语言：
     中性色（无 Google 蓝）· 发丝描边 · 22px 连续曲率圆角 · GS Sans
   --------------------------------------------------------------------------
   覆盖对象：user-extras.js 运行时注入的 #rc-style（RESET_CSS）。
   它被 append 到 <head> 末尾 → 永远排在本文件之后，同特异性会被它盖住，
   所以这里统一用 `html body .rc-sheet …` / `html body #uxe-reset-wrap …`
   抬高特异性；全部规则不使用 !important。

   主题：跟随 html[data-theme]；
        html 没有 data-theme 时按系统 prefers-color-scheme 兜底。
   颜色全部走 --rs-* 令牌，几何规则只写一遍，深浅色只换令牌 +
   少数几处（面板底色/阴影）。
   ========================================================================== */

/* ── 0. 字体 / 盒模型 / 基础色 ─────────────────────────────────────────── */
html body #uxe-reset-wrap,
html body .rc-sheet {
  font-family: "GS Sans", "Google Sans", "Product Sans", Roboto,
               "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--rs-fg);
}

html body #uxe-reset-wrap,
html body #uxe-reset-wrap *,
html body #uxe-reset-wrap *::before,
html body #uxe-reset-wrap *::after,
html body .rc-sheet,
html body .rc-sheet *,
html body .rc-sheet *::before,
html body .rc-sheet *::after { box-sizing: border-box; }

/* ── 1. 令牌：浅色（默认） ─────────────────────────────────────────────── */
html body .rc-sheet,
html body #uxe-reset-wrap {
  --rs-fg:          #0d0d0d;
  --rs-fg2:         #6b6b6b;
  --rs-fg3:         #8a8a8a;
  --rs-line:        rgba(0, 0, 0, .07);
  --rs-line-strong: rgba(0, 0, 0, .08);
  --rs-panel:       #ffffff;
  --rs-bar:         #f9f9f9;
  --rs-bar-hover:   #f2f2f2;
  --rs-mask:        rgba(0, 0, 0, .34);
  --rs-mask-blur:   6px;
  --rs-shadow:      0 24px 64px rgba(0, 0, 0, .16);
  --rs-inset:       inset 0 0 0 rgba(255, 255, 255, 0);
  --rs-btn-bg:      #0d0d0d;
  --rs-btn-fg:      #ffffff;
  --rs-btn-hover:   #2b2b2b;
  --rs-ghost-border: rgba(0, 0, 0, .13);
  --rs-hover:       rgba(0, 0, 0, .05);
  --rs-hover-soft:  rgba(0, 0, 0, .03);
  --rs-busy-bg:     rgba(0, 0, 0, .06);
  --rs-busy-fg:     #6b6b6b;
  --rs-ic-bg:       rgba(0, 0, 0, .04);
  --rs-green:       #137333;
  --rs-green-dot:   #137333;
  --rs-focus:       #6b6b6b;
  --rs-scroll:      rgba(0, 0, 0, .18);
  color-scheme: light;

  /* 覆盖注入层的 --rc-* 令牌：漏写的规则也不会再冒出 Material 蓝 */
  --rc-line:        rgba(0, 0, 0, .08);
  --rc-line2:       rgba(0, 0, 0, .07);
  --rc-surface:     #ffffff;
  --rc-ink:         #0d0d0d;
  --rc-ink2:        #6b6b6b;
  --rc-ink3:        #8a8a8a;
  --rc-blue:        #0d0d0d;
  --rc-blue-deep:   #2b2b2b;
  --rc-blue-soft:   rgba(0, 0, 0, .06);
  --rc-hover:       rgba(0, 0, 0, .05);
  --rc-green-ink:   #137333;
  --rc-green-dot:   #137333;
  --rc-ease:        cubic-bezier(.16, 1, .3, 1);
}

/* ── 1b. 令牌：深色（显式 data-theme） ─────────────────────────────────── */
html[data-theme="dark"] body .rc-sheet,
html[data-theme="dark"] body #uxe-reset-wrap {
  --rs-fg:          #f4f4f4;
  --rs-fg2:         #a0a0a0;
  --rs-fg3:         #8a8a8a;
  --rs-line:        rgba(255, 255, 255, .075);
  --rs-line-strong: rgba(255, 255, 255, .08);
  --rs-panel:       #262626;
  --rs-bar:         #232323;
  --rs-bar-hover:   #282828;
  --rs-mask:        rgba(0, 0, 0, .58);
  --rs-mask-blur:   8px;
  --rs-shadow:      0 32px 80px rgba(0, 0, 0, .6);
  --rs-inset:       inset 0 1px 0 rgba(255, 255, 255, .04);
  --rs-btn-bg:      #ffffff;
  --rs-btn-fg:      #0d0d0d;
  --rs-btn-hover:   #ececec;
  --rs-ghost-border: rgba(255, 255, 255, .16);
  --rs-hover:       rgba(255, 255, 255, .07);
  --rs-hover-soft:  rgba(255, 255, 255, .04);
  --rs-busy-bg:     rgba(255, 255, 255, .1);
  --rs-busy-fg:     #a0a0a0;
  --rs-ic-bg:       rgba(255, 255, 255, .06);
  --rs-green:       #4cd97b;
  --rs-green-dot:   #4cd97b;
  --rs-focus:       #a0a0a0;
  --rs-scroll:      rgba(255, 255, 255, .2);
  color-scheme: dark;

  --rc-line:        rgba(255, 255, 255, .08);
  --rc-line2:       rgba(255, 255, 255, .075);
  --rc-surface:     #262626;
  --rc-ink:         #f4f4f4;
  --rc-ink2:        #a0a0a0;
  --rc-ink3:        #8a8a8a;
  --rc-blue:        #ffffff;
  --rc-blue-deep:   #ececec;
  --rc-blue-soft:   rgba(255, 255, 255, .1);
  --rc-hover:       rgba(255, 255, 255, .07);
  --rc-green-ink:   #4cd97b;
  --rc-green-dot:   #4cd97b;
  --rc-ease:        cubic-bezier(.16, 1, .3, 1);
}

/* ── 1c. 令牌：深色兜底（html 没有 data-theme 时跟随系统） ─────────────── */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) body .rc-sheet,
  html:not([data-theme]) body #uxe-reset-wrap {
    --rs-fg:          #f4f4f4;
    --rs-fg2:         #a0a0a0;
    --rs-fg3:         #8a8a8a;
    --rs-line:        rgba(255, 255, 255, .075);
    --rs-line-strong: rgba(255, 255, 255, .08);
    --rs-panel:       #262626;
    --rs-bar:         #232323;
    --rs-bar-hover:   #282828;
    --rs-mask:        rgba(0, 0, 0, .58);
    --rs-mask-blur:   8px;
    --rs-shadow:      0 32px 80px rgba(0, 0, 0, .6);
    --rs-inset:       inset 0 1px 0 rgba(255, 255, 255, .04);
    --rs-btn-bg:      #ffffff;
    --rs-btn-fg:      #0d0d0d;
    --rs-btn-hover:   #ececec;
    --rs-ghost-border: rgba(255, 255, 255, .16);
    --rs-hover:       rgba(255, 255, 255, .07);
    --rs-hover-soft:  rgba(255, 255, 255, .04);
    --rs-busy-bg:     rgba(255, 255, 255, .1);
    --rs-busy-fg:     #a0a0a0;
    --rs-ic-bg:       rgba(255, 255, 255, .06);
    --rs-green:       #4cd97b;
    --rs-green-dot:   #4cd97b;
    --rs-focus:       #a0a0a0;
    --rs-scroll:      rgba(255, 255, 255, .2);
    color-scheme: dark;

    --rc-line:        rgba(255, 255, 255, .08);
    --rc-line2:       rgba(255, 255, 255, .075);
    --rc-surface:     #262626;
    --rc-ink:         #f4f4f4;
    --rc-ink2:        #a0a0a0;
    --rc-ink3:        #8a8a8a;
    --rc-blue:        #ffffff;
    --rc-blue-deep:   #ececec;
    --rc-blue-soft:   rgba(255, 255, 255, .1);
    --rc-hover:       rgba(255, 255, 255, .07);
    --rc-green-ink:   #4cd97b;
    --rc-green-dot:   #4cd97b;
    --rc-ease:        cubic-bezier(.16, 1, .3, 1);
  }
}

/* ── 2. 遮罩 ───────────────────────────────────────────────────────────── */
html body .rc-sheet .rc-sheet-mask {
  background: var(--rs-mask);
  -webkit-backdrop-filter: blur(var(--rs-mask-blur));
  backdrop-filter: blur(var(--rs-mask-blur));
  transition: opacity 200ms ease;
}

/* ── 3. 面板 ───────────────────────────────────────────────────────────── */
html body .rc-sheet .rc-sheet-panel {
  max-width: 460px;
  max-height: min(78vh, 640px);
  border: 1px solid var(--rs-line-strong);
  border-radius: 22px;
  background: var(--rs-panel);
  box-shadow: var(--rs-inset), var(--rs-shadow);
  transform: translateY(8px) scale(.96);
  opacity: 0;
  /* 关闭方向：比 JS 的 240ms 隐藏定时更短，避免被硬切 */
  transition: transform 200ms cubic-bezier(.2, .8, .3, 1),
              opacity 160ms ease;
}
/* 打开方向：快起慢收，320ms「上手」 */
html body .rc-sheet.is-on .rc-sheet-panel {
  transform: none;
  opacity: 1;
  transition: transform 320ms cubic-bezier(.16, 1, .3, 1),
              opacity 220ms ease;
}
@supports (corner-shape: squircle) {
  html body .rc-sheet .rc-sheet-panel { corner-shape: squircle; }
}

/* ── 4. 头部 / 标题 / 关闭 ─────────────────────────────────────────────── */
html body .rc-sheet .rc-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 10px;
}
html body .rc-sheet .rc-sheet-title {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--rs-fg);
}
html body .rc-sheet .rc-x {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--rs-fg2);
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease,
              transform .18s cubic-bezier(.2, .9, .25, 1);
}
@media (hover: hover) and (pointer: fine) {
  html body .rc-sheet .rc-x:hover {
    background: var(--rs-hover);
    color: var(--rs-fg);
  }
}
html body .rc-sheet .rc-x:active { transform: scale(.94); }
html body .rc-sheet .rc-x:focus-visible,
html body .rc-sheet .rc-btn:focus-visible {
  outline: 2px solid var(--rs-focus);
  outline-offset: 2px;
}

/* ── 5. 正文 / 说明 ────────────────────────────────────────────────────── */
html body .rc-sheet .rc-sheet-body {
  padding: 0 24px 24px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--rs-scroll) transparent;
}
html body .rc-sheet .rc-sheet-body::-webkit-scrollbar { width: 10px; }
html body .rc-sheet .rc-sheet-body::-webkit-scrollbar-track { background: transparent; }
html body .rc-sheet .rc-sheet-body::-webkit-scrollbar-thumb {
  background: var(--rs-scroll);
  background-clip: content-box;
  border: 3px solid transparent;
  border-radius: 999px;
}
html body .rc-sheet .rc-sheet-cap {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 20px;
  color: var(--rs-fg2);
}
html body .rc-sheet .rc-sheet-cap b {
  margin: 0 1px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rs-fg);
}

/* ── 6. 卡片列表：ChatGPT 式列表行（不是带框卡片） ─────────────────────── */
html body .rc-sheet .rc-items { gap: 0; }
html body .rc-sheet .rc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--rs-line);
  border-radius: 0;
  background: transparent;
  transition: background-color .16s ease;
}
html body .rc-sheet .rc-item > div { min-width: 0; }
html body .rc-sheet .rc-item:last-child { border-bottom: 0; }
html body .rc-sheet .rc-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  line-height: 18px;
  font-weight: 500;
  color: var(--rs-green);
}
html body .rc-sheet .rc-state i {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rs-green-dot);
}
html body .rc-sheet .rc-state.is-dead { color: var(--rs-fg3); }
html body .rc-sheet .rc-state.is-dead i { background: var(--rs-fg3); }
html body .rc-sheet .rc-item-d {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--rs-fg2);
}
html body .rc-sheet .rc-days {
  margin-right: 0;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--rs-fg);
}
html body .rc-sheet .rc-days span {
  margin-left: 2px;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--rs-fg2);
}

/* ── 7. 按钮 ───────────────────────────────────────────────────────────── */
html body .rc-sheet .rc-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--rs-btn-bg);
  color: var(--rs-btn-fg);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease,
              transform .18s cubic-bezier(.2, .9, .25, 1);
}
html body .rc-sheet .rc-btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  html body .rc-sheet .rc-btn:hover { background: var(--rs-btn-hover); }
}
html body .rc-sheet .rc-btn.rc-btn-ghost {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--rs-ghost-border);
  background: transparent;
  color: var(--rs-fg2);
  font-size: 13px;
  font-weight: 500;
}
@media (hover: hover) and (pointer: fine) {
  html body .rc-sheet .rc-btn.rc-btn-ghost:hover {
    background: var(--rs-hover);
    color: var(--rs-fg);
  }
}
html body .rc-sheet .rc-btn:disabled:not(.is-busy):not(.is-done) {
  background: var(--rs-busy-bg);
  color: var(--rs-fg3);
  opacity: 1;
  cursor: not-allowed;
}
/* 重置中：中性底 + 次要字，不用蓝 */
html body .rc-sheet .rc-btn.is-busy,
html body .rc-sheet .rc-btn.is-busy:hover {
  background: var(--rs-busy-bg);
  color: var(--rs-busy-fg);
  cursor: default;
  pointer-events: none;
}
/* 已重置：透明底 + 1px 绿描边 + 绿字 */
html body .rc-sheet .rc-btn.is-done,
html body .rc-sheet .rc-btn.is-done:hover {
  background: transparent;
  border: 1px solid var(--rs-green-dot);
  color: var(--rs-green);
  cursor: default;
  pointer-events: none;
}

/* ── 8. 空的 / 历史 / 底部 / 加载 ─────────────────────────────────────── */
html body .rc-sheet .rc-empty {
  padding: 16px 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--rs-fg3);
}
html body .rc-sheet .rc-more {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rs-line);
}
html body .rc-sheet .rc-more summary {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--rs-fg2);
  transition: color .16s ease;
}
html body .rc-sheet .rc-more summary:hover { color: var(--rs-fg); }
html body .rc-sheet .rc-more-n {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--rs-fg3);
}
html body .rc-sheet .rc-dead {
  margin: 10px 0 0;
  padding: 0;
}
html body .rc-sheet .rc-dead li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--rs-fg3);
  border-bottom: 1px solid var(--rs-line);
}
html body .rc-sheet .rc-dead li:last-child { border-bottom: 0; }
html body .rc-sheet .rc-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rs-line);
}
html body .rc-sheet .rc-spin {
  width: 12px;
  height: 12px;
  border-width: 2px;
  margin-right: 6px;
}
html body .rc-sheet .rc-tick {
  margin-right: 5px;
  font-size: 13px;
}

/* 使用中 / 已用过的行：极淡底，不再是描边卡片 */
html body .rc-sheet .rc-item.is-busy {
  padding: 14px 10px;
  border-radius: 12px;
  border-bottom-color: transparent;   /* 高亮行不要再压一条发丝线 */
  background: var(--rs-hover-soft);
}
html body .rc-sheet .rc-item.is-done { background: transparent; }

/* ── 9. 旧长条（用量页已隐藏，别处保持同款观感） ───────────────────────── */
html body #uxe-reset-wrap { margin-bottom: 40px; }
html body #uxe-reset-wrap .rc-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 22px;
  border: 1px solid var(--rs-line-strong);
  border-radius: 22px;
  background: var(--rs-bar);
  color: var(--rs-fg);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, transform .18s cubic-bezier(.2, .9, .25, 1);
}
@supports (corner-shape: squircle) {
  html body #uxe-reset-wrap .rc-bar { corner-shape: squircle; }
}
@media (hover: hover) and (pointer: fine) {
  html body #uxe-reset-wrap .rc-bar:hover { background: var(--rs-bar-hover); }
}
html body #uxe-reset-wrap .rc-bar:active { transform: scale(.995); }
html body #uxe-reset-wrap .rc-bar:focus-visible {
  outline: 2px solid var(--rs-focus);
  outline-offset: 2px;
}
html body #uxe-reset-wrap .rc-bar-ic {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--rs-ic-bg);
  color: var(--rs-fg);
}
html body #uxe-reset-wrap .rc-bar-txt { gap: 3px; }
html body #uxe-reset-wrap .rc-bar-t {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--rs-fg);
}
html body #uxe-reset-wrap .rc-bar-s {
  font-size: 12.5px;
  line-height: 18px;
  color: var(--rs-fg2);
}
html body #uxe-reset-wrap .rc-bar-count {
  flex: none;
  font-size: 13px;
  color: var(--rs-fg2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
html body #uxe-reset-wrap .rc-bar-count b {
  margin-right: 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--rs-fg);
}
html body #uxe-reset-wrap .rc-bar-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--rs-btn-bg);
  color: var(--rs-btn-fg);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}
html body #uxe-reset-wrap .rc-bar-cta.is-empty {
  background: var(--rs-busy-bg);
  color: var(--rs-fg3);
}

/* ── 10. 窄屏 ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  html body .rc-sheet .rc-sheet-head { padding: 20px 20px 8px; }
  html body .rc-sheet .rc-sheet-body { padding: 0 20px 20px; }
  html body .rc-sheet .rc-item { padding: 13px 0; }
  html body .rc-sheet .rc-item.is-busy { padding: 13px 10px; }
  html body .rc-sheet .rc-item .rc-btn { margin-left: auto; }
  html body #uxe-reset-wrap .rc-bar { padding: 16px 18px; gap: 12px; }
}

/* ── 11. 减少动态 ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html body .rc-sheet .rc-sheet-mask,
  html body .rc-sheet .rc-sheet-panel,
  html body .rc-sheet.is-on .rc-sheet-panel,
  html body .rc-sheet .rc-x,
  html body .rc-sheet .rc-btn,
  html body .rc-sheet .rc-item,
  html body .rc-sheet .rc-more summary,
  html body #uxe-reset-wrap .rc-bar { transition: none; }
}
