/* =========================================================================
   Tibo 今天重置了吗？ — 浅色玻璃拟态，底图之上悬浮半透明磨砂组件。
   色板刻意避开蓝色：珊瑚红 / 暖琥珀 / 苔绿 / 梅子紫。
   逻辑属性优先（padding-inline / inset-inline），保证阿拉伯语 RTL 可用。
   ========================================================================= */

:root {
  --bg-solid: #e9d9c1;

  /* ---- 玻璃质感 ----
     磨砂效果来自 backdrop-filter，白色只是薄薄一层着色，不是主体。
     所以 alpha 压得很低：面板 0.40 起，小控件 0.58 起（尺寸小、需要更实一点才立得住）。 */
  --glass-a: rgba(255, 255, 255, 0.4);
  --glass-b: rgba(255, 255, 255, 0.14);
  --glass-c: rgba(255, 255, 255, 0.24);
  --glass-grad: linear-gradient(158deg, var(--glass-a), var(--glass-b) 46%, var(--glass-c));

  --ctl-a: rgba(255, 255, 255, 0.6);
  --ctl-b: rgba(255, 255, 255, 0.36);
  --ctl-grad: linear-gradient(158deg, var(--ctl-a), var(--ctl-b));

  /* 卡片内部的小面板：不再叠一层 backdrop-filter（套娃又慢又浑），只做淡淡提亮 */
  --inner: rgba(255, 255, 255, 0.24);
  --inner-hi: rgba(255, 255, 255, 0.38);

  --glass-brd: rgba(255, 255, 255, 0.5);
  --glass-brd-hi: rgba(255, 255, 255, 0.82);

  --txt: #2f2921;
  /* 底图是中间调的蜜色，卡片又只有 0.4 的白，所以次级文字的不透明度要比
     纯白背景时更高，否则透过玻璃看会发虚 */
  --txt-dim: rgba(47, 41, 33, 0.84);
  --txt-faint: rgba(47, 41, 33, 0.7);

  --accent: #c9503a;
  --accent-soft: rgba(201, 80, 58, 0.14);
  --green: #2f9e6a;
  --green-soft: rgba(47, 158, 106, 0.16);
  --amber: #b8791a;
  --amber-soft: rgba(184, 121, 26, 0.17);
  --plum: #a8456f;
  --plum-soft: rgba(168, 69, 111, 0.14);

  --radius-lg: 26px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --blur: 30px;
  --shadow: 0 24px 52px -28px rgba(104, 78, 52, 0.5), 0 2px 8px -3px rgba(104, 78, 52, 0.16);
  --shadow-soft: 0 6px 18px -12px rgba(104, 78, 52, 0.45);

  --gap: clamp(1rem, 2vw, 1.5rem);
  --breathe: clamp(4rem, 11vh, 9rem);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    "Noto Sans JP", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--txt);
  background: var(--bg-solid);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------- 背景层 */

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-solid);
}

.bg__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
}

/* 浅色系靠「提亮」而不是压暗来保证文字对比度；压得太死底图就看不见了 */
.bg__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 252, 245, 0.4) 0%, rgba(255, 252, 245, 0) 62%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.28) 0%, rgba(255, 252, 245, 0.05) 36%, rgba(255, 250, 240, 0.32) 100%);
}

/* 缓慢漂移的暖色光晕，制造「呼吸」感 */
.aurora {
  position: fixed;
  z-index: -1;
  inset: -20vmax;
  pointer-events: none;
  opacity: 0.62;
  filter: blur(72px);
}

.aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.aurora span:nth-child(1) {
  width: 40vmax;
  height: 40vmax;
  inset-inline-start: 4%;
  top: 6%;
  background: radial-gradient(circle, rgba(255, 196, 168, 0.5), transparent 68%);
  animation: drift-a 38s ease-in-out infinite;
}

.aurora span:nth-child(2) {
  width: 34vmax;
  height: 34vmax;
  inset-inline-end: 6%;
  top: 20%;
  background: radial-gradient(circle, rgba(255, 252, 244, 0.5), transparent 68%);
  animation: drift-b 46s ease-in-out infinite;
}

.aurora span:nth-child(3) {
  width: 30vmax;
  height: 30vmax;
  inset-inline-end: 16%;
  bottom: 2%;
  background: radial-gradient(circle, rgba(168, 214, 178, 0.5), transparent 68%);
  animation: drift-c 52s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vmax, 3vmax, 0) scale(1.12); }
}

@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.06); }
  50% { transform: translate3d(-5vmax, 4vmax, 0) scale(0.94); }
}

@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.96); }
  50% { transform: translate3d(-3vmax, -4vmax, 0) scale(1.1); }
}

/* 细颗粒噪点，避免大面积渐变出现色带 */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- 布局 */

.wrap {
  width: min(1240px, 100% - clamp(1.5rem, 5vw, 4rem));
  margin-inline: auto;
}

main {
  padding-block: clamp(2rem, 5vh, 3.5rem) 0;
}

section + section {
  margin-block-start: var(--breathe);
}

.skip-link {
  position: absolute;
  inset-inline-start: 50%;
  translate: -50% -200%;
  z-index: 100;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-pill);
  background: #2b2620;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: translate 0.2s ease;
}

.skip-link:focus-visible {
  translate: -50% 0.75rem;
}

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-block: 0.7rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.16));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-block-end: 1px solid rgba(255, 255, 255, 0.42);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-inline-end: auto;
  text-decoration: none;
  color: inherit;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #e8836a, #d1553a 52%, #b8791a);
  box-shadow: 0 8px 18px -8px rgba(201, 80, 58, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  flex: none;
}

.brand__mark svg {
  width: 19px;
  height: 19px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-weight: 660;
  letter-spacing: -0.01em;
}

.brand__tag {
  font-size: 0.72rem;
  color: var(--txt-faint);
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------- 玻璃控件 */

.glass {
  background: var(--glass-grad);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)) saturate(145%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(145%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.card {
  position: relative;
  padding: clamp(1.15rem, 2.4vw, 1.7rem);
  border-radius: var(--radius-lg);
}

/* 顶缘高光，玻璃的关键细节 */
.card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  opacity: 0.7;
  pointer-events: none;
}

.card__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-block-end: 1rem;
}

.card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 640;
  letter-spacing: 0.01em;
}

.card__hint {
  margin: 0;
  margin-inline-start: auto;
  min-width: 0;
  font-size: 0.78rem;
  color: var(--txt-faint);
  font-variant-numeric: tabular-nums;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--inner-hi);
  border: 1px solid var(--glass-brd);
  color: var(--accent);
  flex: none;
}

.card__icon svg {
  width: 14px;
  height: 14px;
}

/* ---------------------------------------------------------------- Hero */

.hero {
  max-width: 62ch;
  margin-block-end: clamp(1.6rem, 4vh, 2.8rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  padding: 0.32rem 0.75rem 0.32rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--ctl-grad);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--txt-dim);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(47, 158, 106, 0.5);
  animation: pulse 2.6s ease-out infinite;
  flex: none;
}

.dot--warm {
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(184, 121, 26, 0.5);
  animation-name: pulse-warm;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 158, 106, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(47, 158, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 158, 106, 0); }
}

@keyframes pulse-warm {
  0% { box-shadow: 0 0 0 0 rgba(184, 121, 26, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(184, 121, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 121, 26, 0); }
}

.hero h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 5.2vw, 3.35rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.028em;
  background: linear-gradient(160deg, #2b2620 24%, #8a4a30 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  margin: 0;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  color: var(--txt-dim);
  max-width: 56ch;
}

.answer {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-block-start: 1.15rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 560;
  background: var(--amber-soft);
  border: 1px solid rgba(184, 121, 26, 0.28);
  color: #7d4f0c;
}

.answer--yes {
  background: var(--green-soft);
  border-color: rgba(47, 158, 106, 0.3);
  color: #1f6f4a;
}

/* AI 翻译提醒：要显眼到不会被忽略，但不抢主标题的注意力 */
.trans-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 62ch;
  margin: 1rem 0 0;
  padding: 0.62rem 0.95rem;
  border-radius: var(--radius);
  background: var(--amber-soft);
  border: 1px solid rgba(184, 121, 26, 0.28);
  color: #7d4f0c;
  font-size: 0.82rem;
  line-height: 1.55;
}

.trans-notice svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-block-start: 0.15rem;
  opacity: 0.85;
}

/* ------------------------------------------------------------ 主栅格 */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--gap);
  align-items: start;
}

.col {
  display: grid;
  gap: var(--gap);
  align-content: start;
}

@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 轻微的悬浮呼吸，仅限装饰性卡片 */
.floaty {
  animation: floaty 11s ease-in-out infinite;
}

.floaty--b {
  animation-duration: 13s;
  animation-delay: -4s;
}

@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -7px, 0); }
}

/* ---------------------------------------------------------- 自绘下拉 */

.picker {
  position: relative;
}

.picker__btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 15rem;
  padding: 0.42rem 0.7rem 0.42rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--ctl-grad);
  border: 1px solid var(--glass-brd);
  color: var(--txt);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 540;
  text-align: start;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.picker__btn:hover,
.picker__btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--glass-brd-hi);
}

.picker__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker__chevron {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--txt-faint);
  transition: transform 0.2s ease;
}

.picker__chevron svg {
  width: 13px;
  height: 13px;
}

.picker__btn[aria-expanded="true"] .picker__chevron {
  transform: rotate(180deg);
}

/* 弹出层要能快速扫读，所以比卡片实一些；但仍保留一点通透，别做成一整块白板 */
.picker__popup {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: calc(100% + 0.4rem);
  z-index: 60;
  min-width: 100%;
  max-width: min(21rem, 78vw);
  max-height: min(23rem, 55vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.3rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 253, 249, 0.9), rgba(255, 250, 243, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 26px 54px -24px rgba(104, 78, 52, 0.55), 0 2px 10px -4px rgba(104, 78, 52, 0.26);
  animation: picker-in 0.14s ease-out;
}

/* 右侧顶到视口时改成右对齐，避免弹出层被切掉 */
.picker__popup--end {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

@keyframes picker-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.picker__group {
  padding: 0.55rem 0.7rem 0.22rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--txt-faint);
}

.picker__option {
  display: flex;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border-radius: 10px;
  font-size: 0.83rem;
  line-height: 1.35;
  color: var(--txt-dim);
  cursor: pointer;
  white-space: nowrap;
}

.picker__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker__option--active {
  background: rgba(255, 255, 255, 0.78);
  color: var(--txt);
}

.picker__option[aria-selected="true"] {
  background: var(--accent-soft);
  color: #a33d29;
  font-weight: 620;
}

/* 选中项同时被键盘高亮：保留选中色，加一圈描边区分 */
.picker__option[aria-selected="true"].picker__option--active {
  background: rgba(201, 80, 58, 0.2);
  box-shadow: inset 0 0 0 1px rgba(201, 80, 58, 0.45);
}

.picker__popup::-webkit-scrollbar {
  width: 10px;
}

.picker__popup::-webkit-scrollbar-thumb {
  background: rgba(120, 95, 70, 0.28);
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.picker__popup::-webkit-scrollbar-track {
  background: transparent;
}

/* ------------------------------------------------------------ 推文卡 */

.tweet__meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-block-end: 0.9rem;
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(145deg, #f0a05a, #d1553a 55%, #a8456f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 16px -8px rgba(201, 80, 58, 0.9);
}

.tweet__id {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.tweet__name {
  font-weight: 640;
  font-size: 0.94rem;
}

.tweet__handle {
  font-size: 0.78rem;
  color: var(--txt-faint);
}

.tweet__time {
  margin-inline-start: auto;
  font-size: 0.78rem;
  color: var(--txt-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tweet__text {
  margin: 0;
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.6;
  color: var(--txt);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tweet__text--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 译文行 + 「查看原文」开关。机器翻译必须能一键核对原文 */
.trans {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-block-start: 0.5rem;
}

.trans__toggle {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 560;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.trans__toggle:hover {
  color: #a33d29;
}

.trans__note {
  font-size: 0.72rem;
  color: var(--txt-faint);
}

.tweet__foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block-start: 1.1rem;
  flex-wrap: wrap;
}

.tweet__stats {
  display: flex;
  gap: 0.9rem;
  font-size: 0.8rem;
  color: var(--txt-faint);
  font-variant-numeric: tabular-nums;
}

.tweet__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.tweet__stat svg {
  width: 13px;
  height: 13px;
  opacity: 0.8;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-inline-start: auto;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--ctl-grad);
  border: 1px solid var(--glass-brd);
  color: var(--txt);
  font: inherit;
  font-size: 0.83rem;
  font-weight: 580;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--glass-brd-hi);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -14px rgba(122, 92, 70, 0.6);
}

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

.btn--ghost {
  background: transparent;
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.45);
}

.btn svg {
  width: 13px;
  height: 13px;
}

/* -------------------------------------------------------------- 徽标 */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid var(--glass-brd);
  color: var(--txt-dim);
}

.badge--reset {
  background: var(--green-soft);
  border-color: rgba(47, 158, 106, 0.3);
  color: #1f6f4a;
}

.badge--credits {
  background: var(--accent-soft);
  border-color: rgba(201, 80, 58, 0.28);
  color: #a33d29;
}

.badge--boost {
  background: var(--amber-soft);
  border-color: rgba(184, 121, 26, 0.3);
  color: #82550d;
}

.badge--promo {
  background: var(--plum-soft);
  border-color: rgba(168, 69, 111, 0.28);
  color: #8a3159;
}

/* ------------------------------------------------------- 上次重置卡 */

.lastreset__when {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.lastreset__date {
  font-size: 0.86rem;
  color: var(--txt-dim);
  font-variant-numeric: tabular-nums;
}

.lastreset__time {
  margin: 0.35rem 0 0.15rem;
  font-family: var(--mono);
  font-size: clamp(2.1rem, 5.5vw, 2.9rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(140deg, #2f2823 28%, #b8492f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lastreset__zone {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 560;
  color: var(--txt-dim);
  letter-spacing: 0;
}

.lastreset__alt {
  margin: 0;
  font-size: 0.8rem;
  color: var(--txt-faint);
  font-variant-numeric: tabular-nums;
}

.lastreset__alt b {
  color: var(--txt-dim);
  font-weight: 560;
}

.lastreset__ago {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-block-start: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--inner-hi);
  border: 1px solid var(--glass-brd);
  font-size: 0.82rem;
  color: var(--txt-dim);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ 统计 */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.stat {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius);
  background: var(--inner);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.stat__label {
  font-size: 0.74rem;
  color: var(--txt-faint);
  margin-block-end: 0.25rem;
  line-height: 1.35;
}

.stat__value {
  font-family: var(--mono);
  font-size: 1.28rem;
  font-weight: 640;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--txt);
}

/* ------------------------------------------------------------ 日历 */

.cal__nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-inline-start: auto;
}

.cal__label {
  min-width: 8.5em;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.iconbtn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--inner-hi);
  border: 1px solid var(--glass-brd);
  color: var(--txt-dim);
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease, color 0.18s ease;
}

.iconbtn:hover {
  background: rgba(255, 255, 255, 0.62);
  color: var(--txt);
}

.iconbtn:disabled {
  opacity: 0.35;
  cursor: default;
}

.iconbtn:disabled:hover {
  background: var(--inner-hi);
  color: var(--txt-dim);
}

.iconbtn svg {
  width: 14px;
  height: 14px;
}

/* 月份前进/后退的箭头在 RTL 下要镜像，LTR 下保持原方向 */
[dir="rtl"] .cal__nav .iconbtn svg {
  transform: scaleX(-1);
}

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

.cal__weekdays {
  margin-block-end: 0.35rem;
}

.cal__weekday {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--txt-faint);
  padding-block: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal__day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--txt-dim);
  font: inherit;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  cursor: default;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.cal__day--out {
  opacity: 0.3;
}

.cal__day--today {
  border-color: rgba(43, 38, 32, 0.42);
  color: var(--txt);
  font-weight: 700;
}

.cal__day--has {
  color: var(--txt);
  background: var(--inner-hi);
  border-color: var(--glass-brd);
  cursor: pointer;
}

.cal__day--has:hover,
.cal__day--has:focus-visible {
  background: rgba(255, 255, 255, 0.62);
  border-color: var(--glass-brd-hi);
  box-shadow: var(--shadow-soft);
}

.cal__day--active {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(43, 38, 32, 0.3);
}

.cal__day--reset {
  background: var(--green-soft);
  border-color: rgba(47, 158, 106, 0.34);
}

.cal__day--reset:hover,
.cal__day--reset.cal__day--active {
  background: rgba(47, 158, 106, 0.24);
  border-color: rgba(47, 158, 106, 0.6);
}

.cal__dots {
  display: flex;
  gap: 2px;
  height: 4px;
}

.cal__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--txt-faint);
}

.cal__dot--reset {
  background: var(--green);
}

.cal__dot--credits {
  background: var(--accent);
}

.cal__dot--boost {
  background: var(--amber);
}

.cal__dot--promo {
  background: var(--plum);
}

/* 图例里的「今天」是个空心圈，和事件实心点区分开 */
.cal__dot--today-ring {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(43, 38, 32, 0.5);
}

.cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-block-start: 1rem;
  padding-block-start: 0.9rem;
  border-block-start: 1px solid rgba(255, 255, 255, 0.42);
  font-size: 0.75rem;
  color: var(--txt-faint);
}

.cal__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.cal__empty {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
  color: var(--txt-faint);
  text-align: center;
}

/* 选中某天后的当日明细 */
.cal__picked {
  margin-block-start: 0.9rem;
  padding-block-start: 0.9rem;
  border-block-start: 1px solid rgba(255, 255, 255, 0.42);
  font-size: 0.82rem;
}

.cal__picked-date {
  font-weight: 620;
  margin-block-end: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.cal__picked ul {
  margin: 0;
  padding-inline-start: 1rem;
  color: var(--txt-dim);
}

.cal__picked li {
  margin-block-end: 0.3rem;
}

/* ---------------------------------------------------------- 记录列表 */

.section__head {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-block-end: 1.3rem;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 680;
  letter-spacing: -0.02em;
}

.section__head p {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: var(--txt-dim);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.55rem;
  border-radius: var(--radius);
  margin-block-end: var(--gap);
}

.chips {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.chip {
  padding: 0.38rem 0.8rem;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid transparent;
  color: var(--txt-dim);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 560;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.chip:hover {
  color: var(--txt);
  background: rgba(255, 255, 255, 0.42);
}

.chip[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--glass-brd-hi);
  color: var(--txt);
  box-shadow: var(--shadow-soft);
}

.chip__count {
  margin-inline-start: 0.35rem;
  font-size: 0.72rem;
  color: var(--txt-faint);
  font-variant-numeric: tabular-nums;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  margin-inline-start: auto;
  min-width: min(250px, 100%);
}

.search svg {
  position: absolute;
  inset-inline-start: 0.7rem;
  width: 14px;
  height: 14px;
  color: var(--txt-faint);
  pointer-events: none;
}

.search input {
  width: 100%;
  padding: 0.45rem 0.8rem 0.45rem 2.1rem;
  padding-inline-start: 2.1rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--glass-brd);
  color: var(--txt);
  font: inherit;
  font-size: 0.84rem;
}

.search input::placeholder {
  color: var(--txt-faint);
}

.search input:focus {
  outline: none;
  border-color: rgba(201, 80, 58, 0.55);
  background: rgba(255, 255, 255, 0.66);
}

.records {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.record {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--glass-grad);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-soft);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.record:hover {
  background: rgba(255, 255, 255, 0.52);
  border-color: var(--glass-brd-hi);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -22px rgba(122, 92, 70, 0.55);
}

.record__top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-block-end: 0.5rem;
}

.record__date {
  font-size: 0.86rem;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.record__weekday {
  font-size: 0.8rem;
  color: var(--txt-faint);
}

.record__agno {
  margin-inline-start: auto;
  font-size: 0.76rem;
  color: var(--txt-faint);
  font-variant-numeric: tabular-nums;
}

.record__times {
  display: flex;
  gap: 0.35rem 1.2rem;
  flex-wrap: wrap;
  margin-block-end: 0.65rem;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.record__time {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.record__time b {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 620;
  color: var(--txt);
  letter-spacing: -0.01em;
}

.record__time span {
  color: var(--txt-faint);
  font-size: 0.74rem;
}

.record__text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--txt-dim);
  overflow-wrap: anywhere;
}

.record__gap {
  margin-inline-start: auto;
  font-size: 0.74rem;
  color: var(--txt-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--txt-faint);
  font-size: 0.88rem;
}

.more {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  align-items: center;
  margin-block-start: 1.2rem;
}

.more button {
  padding: 0.6rem 1.4rem;
  /* .btn 自带 margin-inline-start:auto（用于卡片右下角的按钮），
     这里在居中的 flex 行里要清掉，否则按钮会被顶到最右 */
  margin-inline-start: 0;
}

/* --------------------------------------------------------- 发言列表 */

.feed {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.post {
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-soft);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.post:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: var(--glass-brd-hi);
}

.post--signal {
  background: var(--green-soft);
  border-color: rgba(47, 158, 106, 0.26);
}

.post--signal:hover {
  background: rgba(47, 158, 106, 0.2);
  border-color: rgba(47, 158, 106, 0.45);
}

.post__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-block-end: 0.45rem;
}

.post__time {
  font-size: 0.75rem;
  color: var(--txt-faint);
  font-variant-numeric: tabular-nums;
}

.post__badge {
  margin-inline-start: auto;
}

.post__text {
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--txt-dim);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.post__more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-block-start: 0.45rem;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 560;
}

.post__more:hover {
  text-decoration: underline;
}

.post__more svg {
  width: 11px;
  height: 11px;
}

/* ------------------------------------------------------------ 页脚 */

.footer {
  margin-block-start: var(--breathe);
  padding-block: 2rem 3rem;
  border-block-start: 1px solid rgba(255, 255, 255, 0.38);
  font-size: 0.8rem;
  color: var(--txt-faint);
}

.footer__inner {
  display: flex;
  gap: 0.6rem 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer a {
  color: var(--txt-dim);
  text-decoration: none;
}

.footer a:hover {
  color: var(--txt);
  text-decoration: underline;
}

.footer__spacer {
  margin-inline-start: auto;
}

/* 订阅入口：给一点存在感，否则没人会发现它 */
/* ---------------------------------------------------------- 订阅区域 */

/* 订阅入口只此一处（页脚不再重复），飞书的二维码收进弹窗，所以这里很轻 */
.subscribe {
  display: flex;
  align-items: center;
  gap: 1.2rem 2rem;
  flex-wrap: wrap;
}

.subscribe__head {
  flex: 1 1 20rem;
  min-width: 0;
}

.subscribe__title {
  margin: 0 0 0.3rem;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 680;
  letter-spacing: -0.015em;
}

.subscribe__sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--txt-dim);
}

.subscribe__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* .btn 默认 margin-inline-start:auto（给卡片右下角用），这里要贴左 */
.subscribe__actions .btn {
  margin-inline-start: 0;
  padding: 0.55rem 1.1rem;
}

.btn--accent {
  background: linear-gradient(158deg, #d9634a, #c9503a);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(201, 80, 58, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--accent:hover {
  background: linear-gradient(158deg, #e06e54, #d1553f);
  color: #fff;
}

.btn--accent svg {
  width: 15px;
  height: 15px;
}

/* -------------------------------------------------- 二维码弹窗 */

body.is-modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(58, 40, 24, 0.42);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fade-in 0.16s ease-out;
}

.modal__dialog {
  position: relative;
  width: min(23rem, 100%);
  max-height: calc(100dvh - 2.4rem);
  overflow-y: auto;
  padding: 1.7rem 1.5rem 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  /* 弹窗比卡片实一些：二维码要看清，文字也要一次读明白 */
  background: linear-gradient(160deg, rgba(255, 253, 249, 0.95), rgba(255, 250, 243, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 32px 70px -28px rgba(78, 54, 32, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: modal-in 0.18s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.modal__close {
  position: absolute;
  inset-block-start: 0.75rem;
  inset-inline-end: 0.75rem;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-brd);
  color: var(--txt-dim);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--txt);
}

.modal__close svg {
  width: 15px;
  height: 15px;
}

.modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
  font-weight: 680;
  letter-spacing: -0.015em;
}

.modal__desc {
  margin: 0 auto 1.15rem;
  max-width: 30ch;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--txt-dim);
}

.modal__qr {
  margin: 0 0 1.2rem;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
}

.modal__qr img {
  display: block;
  /* 240px 是实测能稳定扫出来的尺寸；码比较密，别再缩小 */
  width: 240px;
  height: 240px;
  border-radius: var(--radius-sm);
  /* 二维码是例外：必须纯白底才能被稳定扫出来，不要改成半透明 */
  background: #fff;
  padding: 8px;
  border: 1px solid var(--glass-brd);
  box-shadow: var(--shadow-soft);
}

.modal__qr figcaption {
  font-size: 0.75rem;
  color: var(--txt-faint);
}

.modal__dialog .btn {
  margin-inline-start: 0;
}

/* --------------------------------------------------------- 状态/工具 */

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

/* 作者样式里的 display 会盖掉 UA 的 [hidden]，这里统一兜底。
   骨架屏、弹窗、下拉弹出层、各类空状态都靠它，删不得。 */
[hidden] {
  display: none !important;
}

/* 全局焦点环：键盘用户唯一的定位手段，别删 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: rgba(201, 80, 58, 0.22);
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(
    90deg,
    rgba(140, 112, 82, 0.14),
    rgba(255, 255, 255, 0.55),
    rgba(140, 112, 82, 0.14)
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

/* 首屏骨架屏高度，和真实内容对齐，避免加载时跳动 */
.skeleton--tweet {
  height: 132px;
}

.skeleton--reset {
  height: 118px;
}

.noscript-note {
  padding-block: 2rem;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.loaderror {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  background: rgba(201, 80, 58, 0.1);
  border: 1px solid rgba(201, 80, 58, 0.3);
  color: #8f3521;
  font-size: 0.88rem;
  margin-block-end: var(--gap);
}

/* -------------------------------------------------------- 响应式 */

@media (max-width: 720px) {
  .brand__tag {
    display: none;
  }

  .topbar__inner {
    gap: 0.6rem;
  }

  /* 两个下拉在窄屏并排占满一行，避免顶栏堆成三行 */
  .controls {
    width: 100%;
  }

  .picker {
    flex: 1 1 0;
    min-width: 0;
  }

  .picker__btn {
    max-width: none;
    width: 100%;
  }

  .picker__popup {
    max-width: none;
  }

  .search {
    margin-inline-start: 0;
    width: 100%;
  }

  .record__agno {
    margin-inline-start: 0;
  }

  .record__gap {
    margin-inline-start: 0;
  }

  .tweet__foot {
    gap: 0.7rem;
  }

  .btn {
    margin-inline-start: 0;
  }
}

@media (max-width: 360px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------- 降低动效 */

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

  .aurora {
    opacity: 0.4;
  }
}

/* 不支持 backdrop-filter 时保证可读性 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass,
  .card,
  .topbar,
  .record,
  .post,
  .picker__btn,
  .picker__popup,
  .modal__dialog,
  .btn {
    background: rgba(250, 243, 232, 0.97);
  }
}
