/* u1s1.io — 纸上终端 · 有一说一
   cream paper + ink + vermilion, hard shadows, honest tone */

:root {
  --paper: #faf5ec;
  --paper-dim: #f1eadb;
  --ink: #1c1a17;
  --ink-soft: #57534b;
  --red: #e8442e;
  --red-dark: #c73520;
  --green: #2e7d4f;
  --term-bg: #201d1a;
  --term-fg: #efe9dc;
  --border: 2px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  /* subtle paper grain */
  background-image: radial-gradient(rgba(28, 26, 23, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

::selection { background: var(--red); color: var(--paper); }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.field input:focus-visible { outline: none; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.logo {
  font-family: var(--mono);
  font-size: 26px; font-weight: 800; letter-spacing: -1px;
  text-decoration: none;
}
.logo .cursor {
  display: inline-block; width: 0.55em; height: 1.05em;
  background: var(--red); vertical-align: -0.15em; margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.head-nav { display: flex; gap: 12px; align-items: center; }

.notification-center { position: relative; }
.notification-toggle {
  position: relative; display: grid; place-items: center; width: 45px; height: 43px;
  padding: 0; color: var(--ink); background: var(--paper); border: var(--border);
  border-radius: 6px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.notification-toggle:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.notification-toggle:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.notification-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notification-badge {
  position: absolute; top: -8px; right: -9px; min-width: 20px; height: 20px; padding: 0 5px;
  color: #fff; background: var(--red); border: 2px solid var(--ink); border-radius: 999px;
  font: 800 10px/16px var(--mono); text-align: center;
}
.notification-popover {
  position: absolute; z-index: 80; top: calc(100% + 4px); right: 0;
  width: min(390px, calc(100vw - 32px)); padding: 0; overflow: hidden;
  background: #fff; border: var(--border); border-radius: 10px; box-shadow: var(--shadow);
}
.notification-popover[hidden] { display: none; }
.notification-popover-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 15px; border-bottom: 2px solid var(--ink); background: var(--paper-dim);
}
.notification-popover-head strong { font-size: 15px; }
.notification-popover-head button {
  padding: 2px 0; border: 0; background: none; color: var(--red-dark);
  font: 700 12px/1.4 var(--sans); cursor: pointer;
}
.notification-popover-head button[hidden] { display: none; }
.notification-list { max-height: min(520px, calc(100vh - 120px)); overflow-y: auto; }
.notification-item {
  position: relative; display: block; width: 100%; padding: 14px 16px 13px 28px;
  border: 0; border-bottom: 1.5px dashed #d8cfbc; background: #fff; color: var(--ink);
  text-align: left; font: inherit; cursor: pointer;
}
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: var(--paper); }
.notification-item.unread { background: #fff8e8; }
.notification-item.unread::before {
  content: ""; position: absolute; top: 20px; left: 13px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--red);
}
.notification-item-title { display: block; font-size: 13.5px; font-weight: 850; line-height: 1.45; }
.notification-item-body { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.notification-item-meta { display: block; margin-top: 7px; color: #8a8277; font: 11px/1.4 var(--mono); }
.notification-empty { margin: 0; padding: 34px 20px; color: var(--ink-soft); text-align: center; font-size: 13px; }

@media (max-width: 640px) {
  .notification-popover { position: fixed; top: 67px; right: 16px; left: 16px; width: auto; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans); font-size: 16px; font-weight: 700;
  padding: 10px 22px;
  background: var(--paper); color: var(--ink);
  border: var(--border); border-radius: 6px;
  box-shadow: var(--shadow-sm);
  cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-red { background: var(--red); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.head-nav .head-action {
  display: inline-flex; align-items: center; justify-content: center;
  height: 43px; padding: 0 18px; font-size: 14px; line-height: 1;
}

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.slang-tag {
  display: inline-block; transform: rotate(-2deg);
  font-size: 14px; font-weight: 700;
  background: var(--ink); color: var(--paper);
  padding: 3px 12px; border-radius: 4px; margin-bottom: 18px;
}
.slang-tag em { color: #ffb4a8; font-style: normal; }

h1.hero-title {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.18; font-weight: 900; letter-spacing: -1px;
  margin-bottom: 20px;
}
h1 .hl {
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 5px;
  text-underline-offset: 7px;
}
.hero-sub { font-size: 18px; color: var(--ink-soft); margin-bottom: 30px; max-width: 30em; }
.hero-sub strong { color: var(--ink); }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta-note { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- terminal ---------- */
.term {
  background: var(--term-bg); color: var(--term-fg);
  border: var(--border); border-radius: 10px;
  box-shadow: var(--shadow);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.65;
  overflow: hidden;
  transform: rotate(0.6deg);
}
.term-bar {
  display: flex; align-items: center; gap: 6px;
  background: #2c2925; padding: 9px 14px;
  border-bottom: 2px solid var(--ink);
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.r { background: #ff5f57; } .term-dot.y { background: #febc2e; } .term-dot.g { background: #28c840; }
.term-title { margin-left: 8px; font-size: 12px; color: #8d867b; }
.term-body { padding: 18px 20px 22px; overflow-x: auto; }
.term-body .p { color: #7ee08a; }
.term-body .cmd { color: #fff; font-weight: 600; }
.term-body .dim { color: #8d867b; }
.term-body .ai { color: #ffc46b; }
.term-body .ok { color: #7ee08a; }
.term-body .tcaret {
  display: inline-block; width: 0.55em; height: 1.05em;
  background: var(--term-fg); vertical-align: -0.15em;
  animation: blink 1.1s steps(1) infinite;
}
/* 终端逐行「执行」出现 */
@media (prefers-reduced-motion: no-preference) {
  .term-body .tl { opacity: 0; animation: tline 0.35s ease forwards; animation-delay: var(--d, 0s); }
  @keyframes tline { to { opacity: 1; } }
}
/* 窄屏:演示行折行而不是横向截断(横向滚动条在手机上看不出来) */
@media (max-width: 640px) {
  .term { transform: none; }
  .term-body { padding: 14px 14px 18px; overflow-x: hidden; }
  .term-body pre { white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere; }
}

/* ---------- sections ---------- */
section { padding: 48px 0; }
.sec-title {
  font-size: clamp(24px, 3.4vw, 34px); font-weight: 900; letter-spacing: -0.5px;
  margin-bottom: 28px;
}
.sec-title::after {
  content: ""; display: block; width: 44px; height: 5px;
  background: var(--red); border-radius: 3px; margin-top: 10px;
}

/* steps — 一张「小票」容器,虚线裁切分隔三步 */
.steps {
  list-style: none;
  display: grid; grid-template-columns: 1fr 1.45fr 1fr;
  background: #fff; border: var(--border); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden;
}
.step { padding: 26px 24px 28px; }
.step + .step { border-left: 2px dashed #d8cfbc; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; border-top: 2px dashed #d8cfbc; }
}
.step-num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; margin-bottom: 12px;
  font-family: var(--mono); font-size: 16px; font-weight: 800;
  color: var(--red); border: 2px solid var(--red); border-radius: 9px;
  transform: rotate(-6deg);
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--ink-soft); }
.step code {
  font-family: var(--mono); font-size: 13px;
  background: var(--paper-dim); border: 1.5px solid var(--ink);
  padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}

/* install tabs (step 2) */
.install-tabs { margin-top: 12px; }
.tab-btns { display: flex; gap: 6px; margin-bottom: 10px; }
.tab-btn {
  background: var(--paper-dim); color: var(--ink); border: 2px solid var(--ink);
  padding: 5px 14px; border-radius: 6px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
}
.tab-btn.active { background: var(--ink); color: var(--paper); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.step .install-code,
.card .install-code {
  display: block; background: var(--paper-dim);
  font-size: 13px; line-height: 1.6;
  padding: 12px 14px; border: 2px solid var(--ink); border-radius: 8px;
  word-break: normal; overflow-wrap: break-word; white-space: pre-wrap; margin-bottom: 8px;
}
.copy-btn {
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink);
  padding: 4px 14px; border-radius: 5px; cursor: pointer;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
}
.copy-btn:active, .copy-btn.copied { background: var(--red); border-color: var(--red); }
/* 手机上复制/标签/迷你按钮触控目标不低于 44px(UX 审计 M12);桌面保持紧凑 */
@media (max-width: 640px) {
  .copy-btn, .tab-btn, .mini-btn {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
    padding-inline: 16px;
  }
  .tab-btns { flex-wrap: wrap; }
}
.install-alt { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.step .install-alt code,
.card .install-alt code { font-size: 12px; }
.install-warn {
  margin: 10px 0 0; padding: 6px 10px 6px 12px;
  font-size: 12px; color: var(--ink-soft); line-height: 1.5;
  background: var(--paper-dim); border-left: 3px solid var(--red);
  border-radius: 0 5px 5px 0;
}

/* honest table */
.honest {
  background: #fff; border: var(--border); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden;
}
.honest table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.honest th, .honest td { padding: 14px 20px; text-align: left; border-bottom: 1.5px solid var(--paper-dim); }
.honest td { overflow-wrap: anywhere; }
.honest td:first-child { font-weight: 700; white-space: normal; }
.pricing-value-table td:first-child { white-space: nowrap; }
.pricing-value-table td:last-child { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  /* 窄屏改成「问题在上、回答在下」的堆叠卡片 */
  .honest thead { display: none; }
  .honest tr { display: block; padding: 12px 18px; border-bottom: 1.5px solid var(--paper-dim); }
  .honest tr:last-child { border-bottom: none; }
  .honest td { display: block; padding: 2px 0; border-bottom: none; white-space: normal; }
}
.honest th { font-size: 13px; color: var(--ink-soft); font-weight: 700; background: var(--paper-dim); }
.honest tr:last-child td { border-bottom: none; }
.honest .yes { color: var(--green); font-weight: 800; }
.honest .price { font-family: var(--mono); font-weight: 800; color: var(--red); }
.honest-note { font-size: 13px; color: var(--ink-soft); margin-top: 12px; }

/* pricing page */
.price-head { padding: 44px 0 8px; }
.price-lead {
  font-size: 16.5px; color: var(--ink-soft); line-height: 1.75;
  max-width: 660px; margin-top: 12px;
}
.price-lead b { color: var(--ink); }
.price-section { padding: 26px 0; }
.price-band-slot:not(:empty) { margin-bottom: 14px; }
.price-band-status {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 11px 14px; color: var(--paper); background: var(--ink);
  border: 2px solid var(--ink); border-radius: 9px; box-shadow: var(--shadow-sm);
}
.price-band-status-now { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.price-band-status-now > span {
  color: #cfc8bb; font-size: 12px; font-weight: 750; letter-spacing: 0.04em;
}
.price-band-status-now strong {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px;
  color: #fff; border-radius: 20px; font-size: 13px;
}
.price-band-status-now i {
  width: 8px; height: 8px; background: currentColor; border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}
.price-band-status-peak .price-band-status-now strong { background: var(--red); }
.price-band-status-off-peak .price-band-status-now strong { background: var(--green); }
.price-band-status p { margin: 0; color: #dcd5c8; font-size: 12.5px; line-height: 1.5; }
.table-card {
  background: #fff; border: var(--border); border-radius: 10px;
  box-shadow: var(--shadow); overflow-x: auto;
}
.price-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.price-table th, .price-table td {
  padding: 14px 18px; text-align: left; border-bottom: 1.5px solid var(--paper-dim);
}
.price-table th {
  font-size: 13px; color: var(--ink-soft); font-weight: 700;
  background: var(--paper-dim); white-space: nowrap;
}
.price-table tr:last-child td { border-bottom: none; }
.price-table .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.price-table td.num { font-weight: 700; }
.price-table tbody tr:hover { background: #fdfbf6; }
.price-cell-value { display: inline-block; }
.price-band-rates { display: grid; justify-items: end; gap: 2px; margin-top: 5px; }
.price-band-rate {
  display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 4px;
  padding: 1px 5px; color: #91897d; border-radius: 4px;
  font-size: 10.5px; font-weight: 650; line-height: 1.45;
}
.price-band-rate b { font-weight: 900; }
.price-band-rate-peak.is-current {
  color: var(--red-dark); background: #fff0ed; box-shadow: inset 0 0 0 1px rgba(232, 68, 46, 0.34);
}
.price-band-rate-off-peak.is-current {
  color: var(--green); background: #ecf7f0; box-shadow: inset 0 0 0 1px rgba(46, 125, 79, 0.34);
}
.price-id { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.price-model-id, .price-promo-note { display: block; margin-top: 4px; }
.price-empty { text-align: center; color: var(--ink-soft); padding: 30px 0; }
.price-tags {
  display: flex; flex-wrap: nowrap; gap: 4px; margin-top: 5px;
}
.price-tag {
  display: inline-block; flex: 0 0 auto; padding: 1px 7px; border-radius: 20px;
  font-size: 11px; font-weight: 800; background: var(--red); color: #fff; vertical-align: 2px;
}
.price-tag.alt { background: var(--green); }
.price-tag.free { background: #d97706; }
.price-tag.vision { background: #1d6fb8; }
.price-tag.upcoming { background: #6d4aa8; }
/* 调价预告:未生效的价格不能混进价目表本体,单独一块紧贴价目表上方。 */
.price-upcoming {
  margin-top: 12px; padding: 12px 15px; background: #f5f1fb;
  border: 2px solid #6d4aa8; border-radius: 9px; box-shadow: var(--shadow-sm);
  font-size: 13px; line-height: 1.6; color: var(--ink);
}
.price-upcoming-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0; }
.price-upcoming-head strong {
  padding: 2px 9px; color: #fff; background: #6d4aa8; border-radius: 20px;
  font-size: 11.5px; font-weight: 800;
}
.price-upcoming-at { font-family: var(--mono); font-weight: 800; }
.price-upcoming-models { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 0; }
.price-upcoming-rates { margin-top: 8px; border-collapse: collapse; font-size: 12.5px; }
.price-upcoming-rates th, .price-upcoming-rates td {
  padding: 3px 12px 3px 0; text-align: right; white-space: nowrap;
}
.price-upcoming-rates thead th { color: var(--ink-soft); font-weight: 700; }
.price-upcoming-rates tbody th { text-align: left; font-weight: 800; }
.price-upcoming-rates td { font-family: var(--mono); font-weight: 700; }
.price-upcoming-note { margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; }
.price-upcoming-note a { color: inherit; word-break: break-all; }
.price-help {
  display: grid; gap: 7px; margin-top: 14px; padding: 13px 16px;
  color: var(--ink-soft); background: rgba(241, 234, 219, 0.72);
  border-left: 4px solid var(--ink); border-radius: 0 7px 7px 0;
  font-size: 13px; line-height: 1.65;
}
.price-help p { margin: 0; }
.price-help b { color: var(--ink); }

@media (max-width: 640px) {
  .price-band-status { align-items: flex-start; flex-direction: column; gap: 7px; }
  .price-band-status p { padding-left: 2px; }
  /* 窄屏把每个模型改成自带字段名的卡片，所有价格无需横向滚动即可发现。 */
  .table-card { overflow-x: visible; }
  .price-table { min-width: 0; font-size: 14px; }
  .price-table thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .price-table tbody, .price-table tr { display: block; }
  .price-table tbody tr {
    padding: 14px 16px; border-bottom: 1.5px solid var(--paper-dim);
  }
  .price-table tbody tr:last-child { border-bottom: none; }
  .price-table th, .price-table td { border-bottom: none; }
  .price-table td {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; padding: 6px 0;
  }
  .price-table td:first-child {
    display: block; padding: 0 0 10px; margin-bottom: 4px;
    border-bottom: 1px dashed var(--paper-dim); overflow-wrap: anywhere;
  }
  .price-table td.num { text-align: right; white-space: normal; overflow-wrap: anywhere; }
  .price-band-rates { justify-items: end; }
  .price-table td.num::before {
    flex: 0 0 auto; color: var(--ink-soft); font-family: var(--sans);
    font-size: 12px; font-weight: 700; text-align: left;
  }
  .price-table td:nth-child(2)::before { content: "输入"; }
  .price-table td:nth-child(3)::before { content: "输出"; }
  .price-table td:nth-child(4)::before { content: "缓存命中"; }
  .price-table td:nth-child(5)::before { content: "上下文"; }
  .price-table td.price-empty {
    display: block; padding: 24px 0; margin: 0; border-bottom: none; text-align: center;
  }
  .price-table td.price-empty::before { content: none; }
  .price-tags { flex-wrap: wrap; }
}

/* news banner */
.news-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding: 10px 16px;
  background: var(--ink); color: var(--paper);
  border-radius: 10px; font-size: 14.5px; font-weight: 600;
  text-decoration: none; line-height: 1.5;
}
.news-banner:hover { transform: translateY(-1px); }
.news-banner [data-news-text] {
  flex: 1 1 320px; min-width: 0;
  overflow-wrap: anywhere; word-break: break-word;
}
.news-badge {
  flex-shrink: 0;
  background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  padding: 2px 9px; border-radius: 20px;
}
.news-banner code {
  font-family: var(--mono); font-size: 13px;
  background: rgba(255, 255, 255, 0.16);
  padding: 1px 6px; border-radius: 4px;
}
.news-banner .news-arrow { margin-left: auto; white-space: nowrap; }

/* referral banner */
.refer {
  border: var(--border); border-radius: 12px; box-shadow: var(--shadow);
  background: var(--red); color: #fff;
  padding: 34px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.refer h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; line-height: 1.3; }
.refer p { opacity: 0.92; margin-top: 6px; }
.refer .btn { background: var(--paper); color: var(--ink); }

/* footer */
.site-foot {
  border-top: var(--border); margin-top: 40px; padding: 26px 0 44px;
  font-size: 13.5px; color: var(--ink-soft);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------- auth & dashboard cards ---------- */
.narrow { max-width: 440px; margin: 48px auto 80px; padding: 0 24px; }
.card {
  background: #fff; border: var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 30px 28px;
}
.card + .card { margin-top: 22px; }
.card h2 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.card .sub { font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.field input,
.field select,
.field textarea {
  width: 100%; font-size: 16px; font-family: var(--mono);
  padding: 11px 14px; background: var(--paper);
  border: var(--border); border-radius: 6px; outline: none;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus,
.field select:focus,
.field textarea:focus { box-shadow: 3px 3px 0 var(--red); }
.field .hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }

.otp-row { display: flex; gap: 10px; }
.otp-row input { flex: 1; }
.otp-row .btn { white-space: nowrap; font-size: 14px; padding: 10px 14px; }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: var(--border); border-radius: 8px; overflow: hidden;
  margin-bottom: 20px;
}
.auth-tab {
  font-family: var(--sans); font-size: 15px; font-weight: 800;
  padding: 10px 12px; background: var(--paper); color: var(--ink-soft);
  border: 0; cursor: pointer;
}
.auth-tab + .auth-tab { border-left: var(--border); }
.auth-tab.is-on { background: var(--ink); color: var(--paper); }
.auth-method-tabs {
  display: flex; gap: 8px; margin: -8px 0 18px;
}
.auth-method-tabs button {
  border: 1.5px solid var(--paper-dim); border-radius: 999px;
  background: #fff; color: var(--ink-soft); padding: 6px 13px;
  font: 700 13px/1 var(--sans); cursor: pointer;
}
.auth-method-tabs button.is-on {
  border-color: var(--ink); background: var(--ink); color: #fff;
}
.auth-links {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin-top: 14px; font-size: 13.5px;
}
.auth-links button {
  background: none; border: 0; padding: 0;
  font: inherit; color: var(--ink-soft); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.auth-links button:hover { color: var(--ink); }
.field[hidden], [hidden] { display: none !important; }

.pw-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
}
.pw-head h2 { margin-bottom: 4px; }
#pw-form { margin-top: 18px; }

.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-soft); font-size: 13px; margin: 22px 0;
}
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1.5px dashed var(--ink-soft); }

.oauth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.oauth-btn { display: inline-flex; align-items: center; justify-content: center; }

/* Capcat invisible PoW CAPTCHA — 和输入框一样占满整行、靠左,风格自动继承 */
.capcat-wrap {
  margin-top: 16px;
  margin-bottom: 20px;
}
.capcat-wrap cap-widget {
  /* 两条都不可省:display 盖掉控件 shadow :host 的 inline-block 让宿主占满整行,
     CSS 变量控制 shadow 内部 .captcha 盒子的宽度(控件默认写死 260px) */
  display: block;
  --cap-widget-width: 100%;
}

.terms-consent {
  margin: -4px 0 18px; padding: 13px 14px;
  background: #fff8e8; border: 1.5px solid #c7ad72; border-radius: 8px;
}
.terms-consent label {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 13.5px; font-weight: 700; line-height: 1.65; cursor: pointer;
}
.terms-consent input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--red); }
.terms-consent a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.terms-consent p { margin: 7px 0 0 26px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.terms-consent.is-required { border-color: var(--red); box-shadow: 3px 3px 0 rgba(232, 68, 46, .2); }

.msg { font-size: 14px; margin-top: 14px; display: none; }
.msg.err { display: block; color: var(--red-dark); font-weight: 700; }
.msg.ok { display: block; color: var(--green); font-weight: 700; }
.msg.info { display: block; color: var(--ink-soft); font-weight: 600; }
/* 成功/失败不能只靠红绿区分(色弱、灰度屏):失败前面加一个警示符 */
.msg.err::before { content: "⚠ "; }

/* dashboard */
.dash-wrap { max-width: 1040px; margin: 40px auto 80px; padding: 0 24px; }
.dashboard-model-lead { margin: -6px 0 18px; }
.dashboard-model-coverage { margin: -10px 0 18px; }

/* 版块导航:吸顶纸片,点击滚到对应版块,滚动时高亮当前版块 */
.dash-nav {
  position: sticky; top: 12px; z-index: 20;
  display: flex; gap: 4px;
  background: var(--paper); border: var(--border); border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: 6px; margin-bottom: 28px;
  overflow-x: auto;
}
.dash-nav a {
  flex-shrink: 0;
  font-size: 14px; font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 7px 14px; border-radius: 7px;
  white-space: nowrap;
}
.dash-nav a:hover { color: var(--ink); background: var(--paper-dim); }
.dash-nav a.is-on { background: var(--ink); color: var(--paper); }

.dash-sec { scroll-margin-top: 84px; margin-bottom: 36px; }
.dash-sec:last-child { margin-bottom: 0; }
.dash-sec-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 900; letter-spacing: -0.3px;
  margin-bottom: 16px;
}
.dash-sec-title::before {
  content: ""; flex-shrink: 0;
  width: 8px; height: 20px;
  background: var(--red); border-radius: 2px;
  transform: rotate(-6deg);
}
.keybox {
  display: flex; gap: 10px; align-items: center;
  font-family: var(--mono); font-size: 14px;
  background: var(--term-bg); color: var(--term-fg);
  border: var(--border); border-radius: 8px; padding: 12px 14px;
  overflow-x: auto;
}
.keybox code { flex: 1; white-space: nowrap; }
/* keybox 里的小标签:「API 端点」/「API Key」 */
.api-endpoint-label {
  flex: none; font-family: var(--sans); font-size: 11.5px; font-weight: 800;
  color: var(--term-fg); opacity: 0.65; border: 1px solid currentColor;
  border-radius: 4px; padding: 1px 6px; white-space: nowrap;
}
.mini-btn {
  font-size: 12.5px; font-weight: 700; font-family: var(--sans);
  background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 5px;
  padding: 4px 10px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
}
.mini-btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ink); }
/* 充值面板:计价方式 / 预设金额的选中态要一眼看出来;三种控件同一高度 */
.pay-mode[aria-pressed="true"], .pay-amt[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pay-amt { font-size: 15px; padding: 10px 16px; font-family: var(--mono); }
.pay-amount { width: 150px !important; font-size: 16px; padding: 10px 14px; }
.mini-btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }


.quota-bar {
  height: 26px; border: var(--border); border-radius: 6px;
  background: var(--paper-dim); overflow: hidden; margin: 12px 0 8px;
}
.quota-fill {
  height: 100%; background: var(--green);
  transition: width 0.6s ease;
  min-width: 2px;
}
.quota-fill.warn { background: #e5a13c; }
.quota-fill.low { background: var(--red); }
.quota-nums { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-soft); }
.quota-nums b { color: var(--ink); font-family: var(--mono); }

/* Daily check-in card with a quiet 30-day reward calendar. */
.checkin-card {
  display: grid; grid-template-columns: minmax(340px, 0.8fr) minmax(420px, 1.2fr);
  grid-template-areas: "calendar summary";
  gap: 20px; padding: 18px;
  border: var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow);
}
.checkin-summary {
  grid-area: summary; min-width: 0; display: flex; flex-direction: column;
}
.checkin-head {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
}
.checkin-kicker {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 7px;
  color: var(--red-dark); font: 800 10px/1.4 var(--mono); letter-spacing: 0.08em;
}
.checkin-kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}
.checkin-card .checkin-head h2 { margin-bottom: 6px; font-size: 19px; line-height: 1.28; letter-spacing: -0.25px; }
.checkin-card .checkin-head .sub { margin: 0; max-width: 390px; font-size: 12px; line-height: 1.5; }
.checkin-reward {
  flex: none; display: inline-flex; align-items: baseline; gap: 4px;
  padding: 6px 9px; color: var(--red-dark); background: #fff4ef;
  border: 1px solid #f0c4b8; border-radius: 999px; white-space: nowrap;
}
.checkin-reward b { font: 900 14px/1.2 var(--mono); }
/* 待领取礼包引导卡:与打卡卡同级,放在它上方;领完切成「已到账」态 */
.gift-lead {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px;
  border: 1px solid #f0c4b8; border-radius: 12px; background: #fffaf7; box-shadow: var(--shadow);
}
.gift-lead-body { min-width: 0; flex: 1; }
.gift-lead h2 { margin: 0 0 6px; font-size: 19px; line-height: 1.28; letter-spacing: -0.25px; }
.gift-lead .sub { margin: 0; font-size: 12px; line-height: 1.5; }
.gift-lead .msg { margin-top: 8px; }
.gift-lead-btn { flex: none; white-space: nowrap; }
@media (max-width: 720px) {
  .gift-lead { flex-direction: column; align-items: stretch; padding: 15px; }
  .gift-lead h2 { font-size: 17px; }
}
.checkin-reward span { color: #9a5042; font: 750 9px/1.2 var(--mono); }
.checkin-calendar-panel {
  grid-area: calendar; min-width: 0; padding: 10px 11px 9px;
  border: 1px solid #ddd5ca; border-radius: 12px; background: #f8f6f2;
}
.checkin-cycle-head {
  display: flex; align-items: baseline;
  justify-content: space-between; gap: 8px; margin: 0 0 3px;
  font: 800 12px/1.35 var(--mono);
}
.checkin-cycle-head span { color: var(--ink-soft); font-weight: 700; }
.checkin-calendar-weekdays,
.checkin-calendar {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
}
.checkin-calendar-weekdays {
  margin-bottom: 2px; color: #9b9389; text-align: center; font: 700 8px/1.2 var(--mono);
}
.checkin-calendar { margin: 0; }
.checkin-calendar-blank { min-height: 34px; }
.checkin-calendar-day {
  position: relative; display: grid; justify-items: center; align-content: start;
  min-width: 0; min-height: 34px; padding: 3px 1px 9px;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-soft); font: 700 8px/1.1 var(--mono);
}
.checkin-calendar-day i {
  display: grid; place-items: center; width: 21px; height: 21px;
  border-radius: 50%; background: transparent; color: #756e66;
  font-style: normal; font-size: 10px; transition: background 0.15s ease, color 0.15s ease;
}
.checkin-calendar-day small { display: none; }
.checkin-calendar-day em {
  position: absolute; right: 1px; bottom: 0; left: 1px; overflow: hidden;
  color: var(--red-dark); font: 850 7px/1.1 var(--mono); font-style: normal;
  text-align: center; white-space: nowrap; text-overflow: ellipsis;
}
.checkin-calendar-day.is-claimed i { color: #fff; background: #4f8b70; }
.checkin-calendar-day.is-next i { color: var(--ink); background: #ebe6df; }
.checkin-calendar-day.is-today i { color: var(--red-dark); background: #fff; box-shadow: 0 0 0 2px var(--red); }
.checkin-calendar-day.is-milestone i { color: #fff; background: var(--red); }
.checkin-card .checkin-next {
  margin: auto 0 12px; padding: 9px 10px 9px 12px;
  color: #6f4035; background: #fff7f2; border-left: 3px solid var(--red);
  border-radius: 0 8px 8px 0; font-size: 12px; line-height: 1.45;
}
.checkin-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 11px; border-top: 1px solid #eee9e2;
}
.checkin-actions .btn { padding: 8px 13px; font-size: 13px; white-space: nowrap; }
.checkin-streak { color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.checkin-summary > .msg { margin-top: 6px; font-size: 12px; }
@media (max-width: 900px) {
  .checkin-card { display: block; padding: 18px; }
  .checkin-calendar-panel { margin-top: 16px; }
  .checkin-card .checkin-next { margin: 14px 0 12px; }
}
@media (max-width: 560px) {
  .checkin-card { padding: 15px; }
  .checkin-head { gap: 10px; }
  .checkin-card .checkin-head h2 { font-size: 17px; }
  .checkin-reward { padding: 5px 7px; }
  .checkin-reward b { font-size: 13px; }
  .checkin-reward span { font-size: 8px; }
  .checkin-calendar-panel { margin-top: 14px; padding: 9px 8px 8px; }
  .checkin-calendar-weekdays, .checkin-calendar { gap: 1px; }
  .checkin-calendar-blank { min-height: 30px; }
  .checkin-calendar-day { min-height: 30px; padding: 2px 1px 8px; }
  .checkin-calendar-day i { width: 19px; height: 19px; font-size: 9px; }
  .checkin-calendar-day em { font-size: 6px; }
}

.invitee { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-bottom: 1.5px dashed var(--paper-dim); }
.invitee:last-child { border-bottom: none; }
.tag-ok { color: var(--green); font-weight: 700; font-size: 13px; }
.tag-wait { color: var(--ink-soft); font-size: 13px; }

.site-manage { padding: 16px 0; border-bottom: 1.5px dashed var(--paper-dim); }
.site-manage:last-child { border-bottom: 0; padding-bottom: 0; }
.site-manage-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.site-url { font: 700 13px/1.4 var(--mono); overflow-wrap: anywhere; }
.site-manage-fields { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 12px; }
.site-manage-fields label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.site-manage-fields input,
.site-manage-fields select,
.site-manage-fields textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); color: var(--ink); font: 13px/1.4 var(--mono); }
.site-manage-fields textarea { min-height: 68px; resize: vertical; }
.site-description { grid-column: 1 / -1; }
.site-manage-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.site-manage-actions .msg { margin: 0; }
.site-delete-btn { color: var(--red-dark); border-color: var(--red-dark); box-shadow: 2px 2px 0 var(--red-dark); }
.site-delete-btn:active { box-shadow: 0 0 0 var(--red-dark); }

/* ---------- 作品社区 ---------- */
.community-wrap { max-width: 1120px; margin: 46px auto 80px; padding: 0 24px; }
.community-hero { max-width: 720px; margin-bottom: 30px; }
.community-lead { color: var(--ink-soft); font-size: 17px; line-height: 1.8; }
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.community-card { overflow: hidden; border: var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.community-preview { position: relative; height: 210px; overflow: hidden; border-bottom: var(--border); background: var(--paper-dim); }
.community-preview iframe { position: absolute; inset: 0; width: 160%; height: 160%; border: 0; opacity: 0; transform: scale(.625); transform-origin: 0 0; pointer-events: none; background: #fff; transition: opacity .2s ease; }
.community-preview.is-loaded iframe { opacity: 1; }
.community-preview-cover { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 24px; color: #fff; background: #2d5b4d; transition: opacity .2s ease; }
.community-preview.is-loaded .community-preview-cover { opacity: 0; }
.community-cover-tone-1 .community-preview-cover { background: #355997; }
.community-cover-tone-2 .community-preview-cover { background: #a33c2d; }
.community-cover-tone-3 .community-preview-cover { background: #745493; }
.community-preview-mark { display: grid; place-items: center; min-width: 64px; height: 64px; padding: 0 10px; border: 2px solid currentColor; border-radius: 12px; font: 900 25px/1 var(--mono); box-shadow: 5px 5px 0 rgba(0,0,0,.24); }
.community-preview-name { max-width: 100%; overflow: hidden; font-size: 15px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.community-preview a { position: absolute; inset: 0; display: block; }
.community-body { padding: 18px 18px 16px; }
.community-body h2 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.community-body p { min-height: 44px; margin: 8px 0 14px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; }
.community-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1.5px dashed var(--paper-dim); }
.community-meta { display: grid; gap: 2px; min-width: 0; color: var(--ink-soft); font: 11.5px/1.4 var(--mono); }
.community-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-votes { display: flex; gap: 6px; flex: none; }
.community-vote { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 4px 8px; color: var(--ink-soft); background: var(--paper); border: 1.5px solid var(--paper-dim); border-radius: 999px; cursor: pointer; font: 700 11px/1 var(--mono); }
.community-vote:hover { color: var(--ink); border-color: var(--ink); }
.community-vote.is-like.is-active { color: var(--green); border-color: currentColor; background: rgba(20,122,75,.08); }
.community-vote.is-dislike.is-active { color: var(--red-dark); border-color: currentColor; background: rgba(180,50,36,.08); }
.community-vote:disabled { cursor: wait; opacity: .55; }
.community-vote-msg { margin-top: 7px; color: var(--red-dark); font-size: 11px; }
.community-vote-msg:empty { display: none; }
.community-empty { grid-column: 1 / -1; padding: 50px 24px; text-align: center; border: 2px dashed var(--paper-dim); border-radius: 12px; color: var(--ink-soft); }
.home-community { padding-top: 24px; }
.home-community-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.home-community-head .sec-title { margin: 12px 0 8px; }
.home-community-lead { max-width: 700px; margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.community-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .home-community-head { align-items: flex-start; flex-direction: column; gap: 16px; }
  .community-grid-home { grid-template-columns: 1fr; }
  .community-card-foot { align-items: flex-start; flex-direction: column; }
}

.loading { text-align: center; color: var(--ink-soft); padding: 60px 0; font-family: var(--mono); }

/* ---------- Admin contact mailbox ---------- */
.support-ticket-list { display: grid; gap: 10px; }
.support-ticket {
  width: 100%; text-align: left; color: var(--ink); background: var(--paper);
  border: 2px solid var(--paper-dim); border-radius: 10px; padding: 12px 14px;
  cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.support-ticket:hover { border-color: var(--ink); }
.support-ticket.is-on { border-color: var(--red); box-shadow: 2px 2px 0 var(--red); }
.support-ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.support-ticket-title { font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.support-ticket-meta { margin-top: 5px; color: var(--ink-soft); font-size: 12.5px; }
.support-status { flex: 0 0 auto; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 800; }
.support-status.open { color: #8a3f00; background: #fff0d7; }
.support-status.answered { color: #18642c; background: #e5f5e9; }
.support-status.closed { color: var(--ink-soft); background: var(--paper-dim); }
.support-detail { margin-top: 22px; padding-top: 20px; border-top: 2px dashed var(--paper-dim); }
.support-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.support-detail-head h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.support-thread { display: grid; gap: 12px; }
.support-message { max-width: 88%; border-radius: 10px; padding: 11px 13px; background: var(--paper-dim); }
.support-message.mine { justify-self: end; background: #fff0ed; border: 1px solid #f4c5bd; }
.support-message.staff { justify-self: start; background: #eaf5ed; border: 1px solid #bbdbc5; }
.support-message-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; }
.support-message-attachments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.support-message-attachments:first-child { margin-top: 0; }
.support-message-attachments a { display: block; border-radius: 7px; overflow: hidden; background: rgba(255,255,255,.75); }
.support-message-attachments img { display: block; width: 100%; height: min(220px, 28vw); min-height: 100px; object-fit: contain; }
.support-message-meta { margin-top: 5px; font-size: 11.5px; color: var(--ink-soft); }
.support-reply { margin-top: 18px; }
.support-reply textarea { min-height: 80px; }
.support-paste-preview { display: flex; flex-wrap: wrap; gap: 9px; margin: -3px 0 8px; }
.support-paste-preview[hidden] { display: none; }
.support-paste-item { position: relative; width: 86px; height: 86px; border: 1.5px solid var(--paper-dim); border-radius: 8px; background: var(--paper-dim); }
.support-paste-item img { display: block; width: 100%; height: 100%; border-radius: 7px; object-fit: cover; }
.support-paste-item button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; padding: 0; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; font: 800 18px/20px sans-serif; }
.support-paste-hint { margin: 0 0 10px; }
.product-issue-card { margin: 0 0 18px; padding: 14px 16px; border: 1.5px solid #e8b851; border-radius: 9px; background: #fff8e8; }
.product-issue-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.product-issue-kicker { color: #875700; font: 700 12px/1.4 var(--mono); letter-spacing: .02em; }
.product-issue-kind { display: inline-block; margin-right: 4px; border-radius: 999px; padding: 2px 7px; background: #f1e4bd; color: #6d4800; font: 800 11px/1.35 var(--sans); letter-spacing: 0; }
.product-issue-kind.bug { background: #ffe0dc; color: #9b241c; }
.product-issue-card.bug { border-color: #ef9187; background: #fff6f4; }
.product-issue-card h4 { margin: 4px 0 7px; font-size: 16px; }
.product-issue-summary { margin: 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.product-issue-status { flex: none; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 800; background: #f3ddac; color: #6d4800; }
.product-issue-status.in_progress { background: #dce9ff; color: #23529a; }
.product-issue-status.released { background: #e2f3e8; color: var(--green); }
.product-issue-status.declined { background: var(--paper-dim); color: var(--ink-soft); }
.product-issue-meta { margin-top: 10px; color: var(--ink-soft); font-size: 12px; }
.product-issue-events { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.product-issue-event { border-radius: 999px; padding: 3px 8px; background: rgba(255,255,255,.72); font-size: 11.5px; color: var(--ink-soft); }
.product-issue-admin { margin: 16px 0; padding: 14px; border: 1.5px dashed #e8b851; border-radius: 9px; }
.product-issue-admin h4 { margin: 0 0 10px; }
.product-issue-admin .field { margin-bottom: 10px; }
.product-issue-registry { margin: 22px 0 0; padding-top: 18px; border-top: 2px dashed var(--paper-dim); }
.product-issue-registry-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.product-issue-registry-head h3 { margin: 0 0 10px; font-size: 16px; }
.product-issue-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.product-issue-list .product-issue-card { margin: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; width: 100%; }
@media (max-width: 680px) {
  .site-manage-head { align-items: flex-start; flex-direction: column; }
  .site-manage-fields { grid-template-columns: 1fr; }
  .site-description { grid-column: auto; }
  .support-message { max-width: 96%; }
  .support-message-attachments { grid-template-columns: 1fr; }
  .support-message-attachments img { height: min(260px, 55vw); }
  .support-detail-head { flex-direction: column; }
  .product-issue-head { flex-direction: column; }
  .product-issue-registry-head { flex-direction: column; }
}

/* ---------- CLI 浏览器登录(?device=) ---------- */
.device-hint {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6;
  background: var(--paper-dim); border: 2px dashed var(--ink);
  border-radius: 6px; padding: 10px 12px; margin: 0 0 18px;
}
.device-result { text-align: center; padding: 18px 0 8px; }
.device-mark {
  width: 64px; height: 64px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: #fff;
  background: var(--green); border: var(--border); border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.device-mark.bad { background: var(--red); }
.device-result .sub { margin-bottom: 0; }
.device-result .btn { margin-top: 18px; }

/* ---------- daily usage bar chart ---------- */
.chart-wrap {
  margin: 16px 0 4px;
  display: flex; flex-direction: column; gap: 4px;
}
.chart-bars {
  display: flex; align-items: flex-end; gap: 3px;
  height: 120px;
  padding: 4px 0;
  border-bottom: 2px solid var(--ink);
}
.chart-bar {
  flex: 1; min-width: 4px;
  background: var(--red);
  border-radius: 3px 3px 0 0;
  position: relative;
  cursor: default;
  transition: opacity 0.15s ease;
  opacity: 0.7;
}
.chart-bar:hover { opacity: 1; }
.chart-bar .tooltip {
  display: none;
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  font-size: 11px; font-family: var(--mono);
  padding: 6px 9px; border-radius: 5px; white-space: nowrap;
  text-align: left; line-height: 1.75;
  pointer-events: none; z-index: 1;
  margin-bottom: 4px;
}
.chart-bar .tooltip .tt-d {
  display: block; font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.25);
  padding-bottom: 2px; margin-bottom: 3px;
}
.chart-bar .tooltip i {
  font-style: normal; opacity: .55;
  display: inline-block; min-width: 28px; margin-right: 5px;
}
.chart-bar .tooltip .tt-none { opacity: .45; }
.chart-bar:hover .tooltip { display: block; }
.chart-bar.zero { opacity: 0.15; }
.chart-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--ink-soft); font-family: var(--mono);
}

/* 今日用量细分(输入/输出/缓存) */
.chart-today {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 10px;
}
.tk-chip {
  font-size: 12px; font-family: var(--mono);
  color: var(--ink-soft);
  border: 1px solid var(--line, #e5e0d8);
  border-radius: 999px;
  padding: 3px 10px;
}
.tk-chip b { color: var(--ink); font-weight: 600; }
.tk-chip.tk-cached { border-style: dashed; }

/* dashboard recent requests */
.recent-requests-card {
  overflow: hidden;
}
.recent-requests-head {
  padding: 0;
}
.recent-requests-card .recent-requests-head .sub { margin: 4px 0 0; }
.recent-requests-card #recent-requests > .sub,
.recent-requests-card #recent-requests > .msg { margin: 20px 0 0; padding: 0; }
.recent-requests-scroll {
  --recent-request-row-height: 42px;
  margin-top: 20px;
  max-height: calc(var(--recent-request-row-height) * 11);
  overflow: auto;
  border: 1px solid var(--paper-dim);
  border-radius: 10px;
}
.recent-requests-table {
  width: 100%; min-width: 900px;
  border-collapse: collapse; font-size: 13px;
}
.recent-requests-table th,
.recent-requests-table td {
  height: var(--recent-request-row-height);
  padding: 8px 14px;
  text-align: left;
  border-bottom: 1px solid var(--paper-dim);
}
.recent-requests-table th {
  position: sticky; top: 0; z-index: 1;
  color: var(--ink-soft); background: var(--paper-dim);
  font-size: 12px; white-space: nowrap;
}
.recent-requests-table tr:last-child td { border-bottom: none; }
.recent-requests-table tbody tr:hover { background: #fdfbf6; }
.recent-requests-table .num {
  text-align: right; font-family: var(--mono); white-space: nowrap;
}
.recent-requests-table .request-time {
  width: 126px; text-align: left; white-space: nowrap;
}
.recent-requests-table td.request-time { font-family: var(--mono); }
.recent-requests-table .model {
  max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* dashboard quota change history */
.quota-events-card {
  padding: 0;
  overflow: hidden;
}
.quota-events-head {
  padding: 24px 28px 14px;
  border-bottom: 1.5px solid var(--paper-dim);
}
.quota-events-title-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
}
.quota-events-title-row h2 { margin: 0; }
.quota-events-card .quota-events-head .sub { margin: 4px 0 0; }
.quota-events-count {
  flex: none; margin-top: 3px; padding: 3px 9px; border-radius: 999px;
  background: var(--paper-dim); color: var(--ink-soft); font: 700 11px/1.45 var(--mono);
}
.quota-event-filters {
  display: inline-flex; gap: 3px; margin-top: 14px; padding: 3px;
  border: 1px solid var(--paper-dim); border-radius: 9px; background: var(--paper);
}
.quota-event-filters button {
  min-height: 29px; padding: 4px 12px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-soft); font: inherit; font-size: 12px; font-weight: 600; line-height: 1.3; cursor: pointer;
}
.quota-event-filters button:hover { color: var(--ink); background: #fff; }
.quota-event-filters button.is-active { color: var(--paper); background: var(--ink); }
.quota-events-card #quota-events > .sub,
.quota-events-card #quota-events > .msg { margin: 0; padding: 24px 28px; }
.quota-events-scroll {
  --quota-event-row-height: 66px;
  max-height: calc(var(--quota-event-row-height) * 8);
  overflow: auto;
  scrollbar-gutter: stable;
}
.quota-events-list { display: grid; }
.quota-event-item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  min-height: var(--quota-event-row-height); padding: 10px 18px;
  border-bottom: 1px solid var(--paper-dim); background: #fff;
}
.quota-event-item:last-child { border-bottom: 0; }
.quota-event-item:hover { background: #fdfbf6; }
.quota-event-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 9px; background: var(--paper-dim); color: var(--ink-soft); font: 800 14px/1 var(--mono);
}
.quota-event-package .quota-event-mark { color: var(--green); background: rgba(30, 126, 76, .11); }
.quota-event-balance .quota-event-mark { color: #2166a5; background: rgba(33, 102, 165, .11); }
.quota-event-decrease .quota-event-mark { color: var(--red-dark); background: rgba(180, 50, 36, .11); }
.quota-event-copy { min-width: 0; }
.quota-event-title { overflow: hidden; font-size: 13.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.quota-event-meta { display: flex; gap: 7px; align-items: center; margin-top: 3px; color: var(--ink-soft); font: 10.5px/1.35 var(--mono); }
.quota-event-kind { padding: 1px 6px; border-radius: 999px; background: var(--paper-dim); }
.quota-event-amount { color: var(--ink); font: 700 13px/1.35 var(--mono); text-align: right; white-space: nowrap; }
.quota-event-decrease .quota-event-amount { color: var(--red-dark); }
.quota-event-empty { margin: 0; padding: 30px 24px; color: var(--ink-soft); text-align: center; }

@media (max-width: 640px) {
  .quota-events-head { padding: 20px 18px 13px; }
  .quota-events-title-row { align-items: flex-start; }
  .quota-events-count { margin-top: 1px; }
  .quota-event-filters { display: grid; grid-template-columns: repeat(3, 1fr); }
  .quota-event-filters button { padding-inline: 9px; }
  .quota-events-card #quota-events > .sub,
  .quota-events-card #quota-events > .msg { padding: 22px 18px; }
  .quota-events-scroll { max-height: calc(var(--quota-event-row-height) * 7); }
  .quota-event-item { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 10px 14px; }
  .quota-event-mark { width: 29px; height: 29px; border-radius: 8px; }
  .quota-event-title { white-space: normal; }
  .quota-event-amount { grid-column: 2; margin-top: -5px; text-align: left; }
}

/* ---------- desktop app download ---------- */
.head-nav .head-thin {
  box-shadow: none; border-color: transparent; background: transparent;
  padding: 10px 8px;
}
.head-nav .head-thin:hover { transform: none; box-shadow: none; color: var(--red); }
/*
 * 窄屏(≤640px)不再藏掉次级导航(UX 审计 M8):目标用户多从微信/小红书进来,
 * 只剩「登录/开始使用」两个按钮会让社区、指南、价目表在手机上无法到达。
 * 做法是让导航整体换到 logo 下一行、允许换行,全部入口可见;并把头部按钮
 * 触控高度抬到 44px(M12)。
 */
@media (max-width: 640px) {
  .site-head { flex-wrap: wrap; gap: 10px 0; padding: 16px 0 12px; }
  .head-nav { flex: 1 0 100%; flex-wrap: wrap; gap: 8px; }
  .head-nav .btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 14px; font-size: 14.5px;
  }
  .head-nav .head-thin { padding: 0 10px; }
  .head-nav .head-action { height: 44px; padding: 0 14px; }
}

.dl-lead { font-size: 16.5px; color: var(--ink-soft); max-width: 620px; margin: -6px 0 22px; }
.dl-lead b { color: var(--ink); }

.dl-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 28px; }
.dl-btn { display: inline-flex; flex-direction: column; gap: 1px; padding: 10px 20px 11px; line-height: 1.4; }
.dl-btn b { font-size: 16px; }
.dl-btn span { font-size: 12px; font-weight: 600; color: var(--ink-soft); font-family: var(--mono); }
.dl-btn.is-mine { background: var(--red); color: #fff; }
.dl-btn.is-mine span { color: rgba(255, 255, 255, 0.94); }
.dl-ver { font-size: 13.5px; color: var(--ink-soft); margin-left: 4px; }
.dl-ver b { font-family: var(--mono); color: var(--ink); }

.shot {
  margin: 0; background: #fff; border: var(--border); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden; transform: rotate(-0.4deg);
}
.shot .term-bar { border-radius: 0; }
.shot img { display: block; width: 100%; height: auto; }
.dl-note { font-size: 13px; color: var(--ink-soft); margin-top: 16px; }

@media (max-width: 560px) {
  .dl-btn { flex: 1 1 100%; align-items: center; text-align: center; }
  .dl-ver { margin-left: 0; }
  .shot { transform: none; }
}

/* entrance animation */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(14px); animation: rise 0.55s ease forwards; }
  .rise.d1 { animation-delay: 0.08s; } .rise.d2 { animation-delay: 0.16s; }
  .rise.d3 { animation-delay: 0.24s; } .rise.d4 { animation-delay: 0.32s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ---- 公告弹窗(公告横幅的加强版,同一条公告每人只弹一次) ---- */
.ann-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(28, 26, 23, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ann-card {
  background: var(--paper); border: var(--border); border-radius: 12px;
  box-shadow: var(--shadow); max-width: 460px; width: 100%; padding: 24px 26px;
  position: relative;
}
.ann-close {
  position: absolute; top: 8px; right: 8px;
  width: 44px; height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--ink-soft);
}
.ann-close:hover { color: var(--ink); }
.ann-card h3 { font-size: 18px; margin: 0 0 10px; }
.ann-badge {
  display: inline-block; padding: 1px 8px; margin-right: 8px; border-radius: 6px;
  font-size: 11px; font-weight: 800; background: var(--red); color: #fff; vertical-align: 2px;
}
.ann-card p {
  font-size: 14.5px; margin: 0 0 18px; white-space: pre-wrap;
  overflow-wrap: anywhere; word-break: break-word;
}
.ann-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }

/* hero 下方的防控提示 */
.hero-note {
  margin-top: 14px; font-size: 13.5px; color: var(--ink-soft);
  border-left: 3px solid var(--red); padding-left: 10px; max-width: 560px;
}

/* Token 不是通用 API 额度：在首页、注册页和仪表盘使用同一视觉语言，
   让邀请入口的用户在领取前就能看清使用边界。 */
.token-scope-notice {
  margin: 0 0 20px; padding: 14px 16px;
  color: var(--ink); background: #fff2ed;
  border: 2px solid var(--red); border-radius: 9px;
  box-shadow: 3px 3px 0 rgba(232, 68, 46, 0.22);
}
.token-scope-notice h3 {
  margin: 0 0 5px; color: var(--red-dark);
  font-size: 15px; font-weight: 900; line-height: 1.4;
}
.token-scope-notice p {
  margin: 0; font-size: 13.5px; font-weight: 650; line-height: 1.65;
}
.token-scope-referral {
  margin-top: 9px !important; padding-top: 9px;
  border-top: 1.5px dashed var(--red);
  color: var(--red-dark);
}
.token-scope-notice-hero { max-width: 600px; margin-top: -10px; }
.token-scope-notice-dashboard { margin-bottom: 22px; }
.token-scope-inline {
  margin: -8px 0 16px; padding: 8px 11px;
  color: var(--red-dark); background: #fff2ed;
  border-left: 3px solid var(--red); border-radius: 0 5px 5px 0;
  font-size: 13px; font-weight: 750; line-height: 1.6;
}
.refer .refer-restriction {
  max-width: 720px; margin-top: 10px; padding: 8px 10px;
  opacity: 1; background: rgba(255, 255, 255, 0.16);
  border-left: 3px solid #fff; border-radius: 0 5px 5px 0;
  font-size: 13.5px; font-weight: 800;
}

/* 国际站(<html data-site="intl">,site-asset-rewrite.ts):首期只做付费,赠送/邀请/站点托管/手机号/人民币支付
   相关入口一律隐藏。!important 压过 JS 里 el.hidden=false / style.display 的开启,入口不会被脚本重新点亮。 */
html[data-site="intl"] [data-cn-only] { display: none !important; }
/* 反过来:只在国际站出现的替换文案(中国站那份带 data-cn-only) */
html:not([data-site="intl"]) [data-intl-only] { display: none !important; }
/* 用量包/打卡两格隐藏后,指标剩两格;余额卡独占一行 */
html[data-site="intl"] .dashboard-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-site="intl"] #sec-usage > .usage-balance { grid-column: 1 / -1; }
