/**
 * Simple Content — COME 蓝主色深色风
 * 主色参考 https://web-in.cometostory.com/en ：accent-blue #00BBFF、dark #101219、surface #181D29
 */
:root {
  --sc-bg: #101219;
  --sc-bg-2: #131720;
  --sc-surface: #181d29;
  --sc-surface-2: #2a3546;
  --sc-ink: #f4f7fb;
  --sc-muted: #9aa3b5;
  --sc-line: rgba(244, 247, 251, 0.1);
  --sc-line-strong: rgba(244, 247, 251, 0.16);
  /* COME accent-blue */
  --sc-blue: #00bbff;
  --sc-blue-2: #33c9ff;
  --sc-blue-deep: #0081c3;
  --sc-blue-soft: rgba(0, 187, 255, 0.12);
  --sc-tag: #3e4f68;
  --sc-radius: 12px;
  --sc-header-h: 72px;
  --sc-article-max: 42rem;
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;

  /* 兼容旧变量名（组件/样式里仍可能引用） */
  --sc-saffron: var(--sc-blue);
  --sc-saffron-2: var(--sc-blue-2);
  --sc-gold: var(--sc-blue-2);
  --sc-maroon: #0e2c3b;
  --sc-indigo: #181d29;

  --ink: var(--sc-ink);
  --text: var(--sc-ink);
  --muted: var(--sc-muted);
  --accent: var(--sc-blue);
  --panel: var(--sc-surface);
  --radius-base: var(--sc-radius);
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--sc-ink);
  background:
    radial-gradient(ellipse 65% 42% at 100% -8%, rgba(0, 187, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 38% at -8% 18%, rgba(0, 129, 195, 0.18), transparent 52%),
    radial-gradient(ellipse 40% 28% at 72% 92%, rgba(0, 187, 255, 0.06), transparent 45%),
    linear-gradient(180deg, #131720 0%, var(--sc-bg) 42%, #0a0c11 100%);
  background-attachment: fixed;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--sc-ink);
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.narrow {
  width: min(var(--sc-article-max), calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: clamp(2.25rem, 5vw, 3.75rem) 0;
}

/* —— Page shell —— */
.sc-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100vh;
}

.sc-page-body {
  flex: 1;
}

main#main {
  min-height: 48vh;
}

main#main > .section:first-child {
  padding-top: clamp(2.5rem, 6vw, 4rem);
}

main#main > .section .narrow {
  background: rgba(24, 29, 41, 0.92);
  border: 1px solid var(--sc-line);
  border-radius: calc(var(--sc-radius) + 4px);
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 3.5vw, 2.5rem);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

/* —— Buttons —— */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible,
.sc-nav a:focus-visible,
.sc-brand:focus-visible,
.sc-menu:focus-visible {
  outline: 2px solid var(--sc-saffron);
  outline-offset: 3px;
}

.button-primary {
  background: linear-gradient(135deg, var(--sc-blue) 0%, #1ac3ff 55%, var(--sc-blue-2) 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 187, 255, 0.32);
}

.button-primary:hover {
  background: linear-gradient(135deg, var(--sc-blue-2) 0%, #66d4ff 100%);
}

/* —— Header：移动端品牌左、菜单按钮最右 —— */
.sc-header {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: var(--sc-header-h);
  border-bottom: 1px solid var(--sc-line);
  background: rgba(16, 18, 25, 0.92);
  backdrop-filter: blur(14px) saturate(1.1);
}

.sc-header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--sc-header-h);
}

.sc-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  /* 吃掉中间空间，把后续控件（含菜单）顶到右侧 */
  flex: 1 1 auto;
}

.sc-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(51, 201, 255, 0.35);
  flex-shrink: 0;
}

.sc-brand strong {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--sc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(58vw, 14rem);
}

.sc-nav {
  display: none;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
  flex: 1 1 auto;
}

.sc-nav a {
  position: relative;
  color: var(--sc-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.sc-nav a:hover {
  color: var(--sc-gold);
  background: rgba(246, 239, 228, 0.05);
}

.sc-nav a[aria-current="page"] {
  color: var(--sc-gold);
  background: rgba(0, 187, 255, 0.12);
}

.sc-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 2px;
  background: var(--sc-saffron);
}

.sc-header-cta {
  display: none;
  flex-shrink: 0;
}

/* 导航 / 底部 Download APK：跟随 Come logo 彩虹渐变（青→绿→黄→橙） */
body[data-theme="simple-content"] .sc-header-cta,
body[data-theme="simple-content"] .sc-mobile-cta,
body[data-theme="simple-content"] .sc-download-dock-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.05) 36%,
      rgba(0, 0, 0, 0.08) 100%
    ),
    linear-gradient(
      95deg,
      #00bbff 0%,
      #1ec8ff 38%,
      #2fd15c 58%,
      #8fd92a 100%,
 
    );
  box-shadow:
    0 10px 26px rgba(0, 160, 200, 0.28),
    0 8px 22px rgba(255, 140, 40, 0.18),
    0 2px 0 rgba(255, 255, 255, 0.16) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    background 0.18s ease;
}

body[data-theme="simple-content"] .sc-header-cta:hover,
body[data-theme="simple-content"] .sc-mobile-cta:hover,
body[data-theme="simple-content"] .sc-download-dock-btn:hover {
  filter: brightness(1.06) saturate(1.08);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.28) 0%,
      rgba(255, 255, 255, 0.06) 38%,
      rgba(0, 0, 0, 0.06) 100%
    ),
    linear-gradient(
      95deg,
      #00bbff 0%,
      #1ec8ff 38%,
      #2fd15c 58%,
      #8fd92a 100%,
    );
  box-shadow:
    0 14px 32px rgba(0, 187, 255, 0.32),
    0 10px 26px rgba(255, 154, 40, 0.22),
    0 2px 0 rgba(255, 255, 255, 0.2) inset,
    0 -1px 0 rgba(0, 0, 0, 0.14) inset;
}

body[data-theme="simple-content"] .sc-header-cta:active,
body[data-theme="simple-content"] .sc-mobile-cta:active,
body[data-theme="simple-content"] .sc-download-dock-btn:active {
  transform: translateY(1px);
  filter: brightness(0.97);
}

/* 汉堡菜单：始终在 flex 行最右（移动端可见） */
.sc-menu {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  flex-shrink: 0;
  padding: 10px;
  border: 1px solid var(--sc-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  order: 10;
}

.sc-menu span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--sc-gold);
  border-radius: 2px;
}

.sc-mobile-panel {
  position: fixed;
  z-index: 55;
  top: var(--sc-nav-top, var(--sc-header-h));
  left: 0;
  right: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-top: 1px solid var(--sc-line);
  border-bottom: 1px solid var(--sc-line);
  background: rgba(16, 18, 25, 0.98);
  padding: 0.75rem 0 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.sc-mobile-panel[hidden] {
  display: none !important;
}

/* 导航蒙板：点空白处关闭；site.js 挂到 body 避免 sticky 裁切 */
.sc-nav-backdrop {
  position: fixed;
  top: var(--sc-nav-top, var(--sc-header-h));
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 54;
  background: rgba(4, 8, 14, 0.72);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease;
}

.sc-nav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.sc-nav-backdrop[hidden] {
  display: none !important;
}

html.t2-nav-open body[data-theme="simple-content"],
body[data-theme="simple-content"].t2-nav-open {
  overflow: hidden;
}

.sc-mobile-links {
  display: grid;
  gap: 0.2rem;
}

.sc-mobile-links > a:not(.button) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0.15rem;
  color: var(--sc-ink);
  font-weight: 600;
  border-bottom: 1px solid var(--sc-line);
}

.sc-mobile-links > a:not(.button)[aria-current="page"] {
  color: var(--sc-gold);
}

.sc-mobile-links > a:not(.button) span {
  color: var(--sc-saffron);
}

.sc-mobile-links > a.button.sc-mobile-cta {
  display: inline-flex;
  margin-top: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  border-bottom: none;
}

@media (min-width: 880px) {
  .sc-header-inner {
    gap: 1rem;
  }

  .sc-brand {
    flex: 0 1 auto;
  }

  .sc-brand strong {
    max-width: min(28vw, 16rem);
  }

  .sc-nav {
    display: flex;
  }

  .sc-header-cta {
    display: inline-flex;
  }

  .sc-menu {
    display: none;
  }

  .sc-mobile-panel,
  .sc-nav-backdrop {
    display: none !important;
  }
}

/* —— Portable Text（Simple Content 强化阅读样式） —— */
body[data-theme="simple-content"] .portable {
  display: grid;
  gap: 1.15rem;
}

body[data-theme="simple-content"] .portable :is(p, li, blockquote) {
  margin: 0;
  color: #b6bfcf;
  font-size: 1.08rem;
  line-height: 1.8;
}

body[data-theme="simple-content"] .portable p {
  text-wrap: pretty;
}

/* 标题后第一段略放大，作导语 */
body[data-theme="simple-content"] .portable > h1:first-child + p,
body[data-theme="simple-content"] .portable > h2:first-child + p {
  font-size: 1.16rem;
  color: #d7e0ef;
  line-height: 1.75;
}

body[data-theme="simple-content"] .portable strong {
  color: var(--sc-ink);
  font-weight: 700;
}

body[data-theme="simple-content"] .portable em {
  font-style: italic;
  color: #c5cede;
}

body[data-theme="simple-content"] .portable h1,
body[data-theme="simple-content"] .portable h2,
body[data-theme="simple-content"] .portable h3,
body[data-theme="simple-content"] .portable h4 {
  margin: 0.95rem 0 0;
  color: var(--sc-ink);
  scroll-margin-top: calc(var(--sc-header-h) + 0.75rem);
}

body[data-theme="simple-content"] .portable > :first-child {
  margin-top: 0;
}

body[data-theme="simple-content"] .portable > h1:first-child {
  font-size: clamp(2.05rem, 5.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
  padding-bottom: 1.05rem;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(
      90deg,
      rgba(0, 187, 255, 0.75),
      rgba(51, 201, 255, 0.2),
      transparent 85%
    )
    1;
}

body[data-theme="simple-content"] .portable h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

body[data-theme="simple-content"] .portable h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-top: 1.7rem;
  padding-top: 0.35rem;
}

body[data-theme="simple-content"] .portable h2::before {
  content: "";
  display: block;
  width: 2.25rem;
  height: 2px;
  margin-bottom: 0.7rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sc-saffron), transparent);
}

body[data-theme="simple-content"] .portable h3 {
  font-size: 1.24rem;
  margin-top: 1.35rem;
  color: var(--sc-gold);
}

body[data-theme="simple-content"] .portable h4 {
  font-size: 1.08rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #e8eef8;
}

body[data-theme="simple-content"] .portable a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.15rem 0.2rem 0.15rem 0;
  padding: 0.45rem 0.95rem;
  min-height: 2.35rem;
  border-radius: 10px;
  border: 1px solid transparent;
  /* 默认即用原 hover/点击态：白字 + 实心蓝 */
  background: linear-gradient(135deg, var(--sc-blue) 0%, #1ac3ff 55%, var(--sc-blue-2) 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95em;
  line-height: 1.2;
  text-decoration: none;
  text-underline-offset: unset;
  box-shadow: 0 8px 22px rgba(0, 187, 255, 0.3);
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

body[data-theme="simple-content"] .portable a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sc-blue-2) 0%, #66d4ff 100%);
  box-shadow: 0 10px 26px rgba(0, 187, 255, 0.38);
}

body[data-theme="simple-content"] .portable a:active {
  transform: translateY(1px);
}

body[data-theme="simple-content"] .portable a:focus-visible {
  outline: 2px solid var(--sc-saffron);
  outline-offset: 3px;
}

body[data-theme="simple-content"] .portable li > a {
  margin-top: 0.15rem;
  margin-bottom: 0.15rem;
}

/* 列表内链接：保持行内文字，避免 chip 按钮把圆点顶歪 */
body[data-theme="simple-content"] .portable .list-item a {
  display: inline;
  margin: 0;
  padding: 0;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--sc-blue-2);
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  vertical-align: baseline;
}

body[data-theme="simple-content"] .portable .list-item a:hover {
  color: #ffffff;
  background: none;
  border-color: transparent;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

body[data-theme="simple-content"] .portable .list-item a:active {
  transform: none;
}

body[data-theme="simple-content"] .portable blockquote {
  margin: 0.35rem 0;
  border-left: 3px solid var(--sc-saffron);
  border-radius: 0 10px 10px 0;
  padding: 0.9rem 1.15rem;
  font-style: italic;
  color: var(--sc-ink);
  background: linear-gradient(
    90deg,
    rgba(0, 187, 255, 0.12),
    rgba(42, 53, 70, 0.35) 55%,
    transparent
  );
}

body[data-theme="simple-content"] .portable-list {
  margin: 0.15rem 0;
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.65rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--sc-line);
  border-radius: 12px;
}

body[data-theme="simple-content"] .portable-list.bullet > .list-item,
body[data-theme="simple-content"] .portable-list.number > .list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  color: #b6bfcf;
  line-height: 1.8;
}

body[data-theme="simple-content"] .portable .list-item-body {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

/* 圆点与首行文字垂直居中对齐 */
body[data-theme="simple-content"] .portable-list.bullet > .list-item::before {
  content: "";
  flex: 0 0 auto;
  width: 0.4rem;
  height: 0.4rem;
  margin-top: calc((1.08rem * 1.8 - 0.4rem) / 2);
  border-radius: 50%;
  background: var(--sc-blue);
  box-shadow: 0 0 0 3px rgba(0, 187, 255, 0.15);
}

body[data-theme="simple-content"] .portable-list.number {
  counter-reset: sc-ol;
}

body[data-theme="simple-content"] .portable-list.number > .list-item {
  counter-increment: sc-ol;
}

body[data-theme="simple-content"] .portable-list.number > .list-item::before {
  content: counter(sc-ol) ".";
  flex: 0 0 1.35rem;
  margin-top: 0;
  color: var(--sc-blue);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.8;
  text-align: right;
}

body[data-theme="simple-content"] .portable-figure {
  margin: 0.95rem 0;
}

body[data-theme="simple-content"] .portable-figure img {
  width: 100%;
  border-radius: var(--sc-radius);
  border: 1px solid var(--sc-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

body[data-theme="simple-content"] .portable-figure figcaption {
  margin-top: 0.55rem;
  color: var(--sc-muted);
  font-size: 0.88rem;
  text-align: center;
}

body[data-theme="simple-content"] .note {
  background: linear-gradient(145deg, rgba(0, 129, 195, 0.22), rgba(42, 53, 70, 0.55));
  border: 1px solid rgba(0, 187, 255, 0.28);
  border-radius: var(--sc-radius);
  padding: 1.25rem 1.35rem;
}

/* —— Footer —— */
.sc-footer {
  margin-top: auto;
  border-top: 1px solid var(--sc-line);
  background: rgba(10, 12, 17, 0.94);
  padding: 1.6rem 0 2rem;
}

/* 全站底部 APK CTA：有 apkUrl + 文案才渲染；为 dock 预留滚动空间 */
body[data-theme="simple-content"]:has(.sc-download-dock) {
  padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}

.sc-download-dock {
  position: fixed;
  z-index: 55;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  padding: 0.7rem 0;
  padding-bottom: max(0.7rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--sc-line);
  background: linear-gradient(
    180deg,
    rgba(16, 18, 25, 0.72) 0%,
    rgba(13, 17, 26, 0.96) 40%,
    #0a0c11 100%
  );
  backdrop-filter: blur(12px) saturate(1.05);
}

.sc-download-dock-inner {
  display: flex;
  justify-content: center;
}

.sc-download-dock-btn {
  width: min(100%, 28rem);
  min-height: 0.15rem;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sc-footer-inner {
  display: grid;
  gap: 0.85rem;
}

.sc-footer-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sc-ink);
}

.sc-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  justify-content: space-between;
  align-items: baseline;
  color: var(--sc-muted);
  font-size: 0.88rem;
}

.sc-footer-note {
  color: var(--sc-gold);
  max-width: 36rem;
  opacity: 0.95;
}

@media (max-width: 640px) {
  main#main > .section .narrow {
    width: min(100%, calc(100% - 1.25rem));
    padding: 1.35rem 1.1rem 1.6rem;
    border-radius: 12px;
  }

  .sc-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .button,
  .sc-nav a {
    transition: none;
  }
}
