/* 公开站点样式（零构建：改完刷新即生效，无需打包） */

:root {
  --fg: #1a1a1a;
  --fg-muted: #767066;
  --bg: #faf8f4;
  --bg-soft: #f2eee7;
  --line: #e4ded3;
  --accent: #0b6e4f;
  /* 衬线用于标题（与截图的站名 / 栏目名一致）；正文保持无衬线，中文更易读 */
  --serif: Georgia, "Times New Roman", "Songti SC", "Noto Serif CJK SC", serif;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #f1ede5;
    --fg-muted: #9b948a;
    --bg: #14130f;
    --bg-soft: #1c1b16;
    --line: #302d26;
    --accent: #4fbf95;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.8 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.shell { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 28px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* MARK: - 顶栏（只有语言切换；站名在首页 hero 里） */

.site-bar { padding: 22px 0 0; }
.site-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bar-brand { font-size: 15px; font-weight: 600; color: var(--fg); }
.bar-brand:hover { text-decoration: none; opacity: .8; }
.bar-brand--ghost { display: block; }

.lang-switch { position: relative; }
.lang-switch > summary {
  list-style: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-soft);
  color: var(--fg-muted); font-size: 13px; line-height: 1;
  cursor: pointer; user-select: none;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { color: var(--fg); }
.globe {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 10;
  min-width: 132px; padding: 6px;
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .09);
}
.lang-menu a {
  padding: 7px 10px; border-radius: 7px;
  color: var(--fg); font-size: 14px;
}
.lang-menu a:hover { background: var(--bg-soft); text-decoration: none; }
.lang-menu a[aria-current="true"] { color: var(--accent); font-weight: 600; }

/* MARK: - 首页：站名 / 作品集 / 关于我们 */

main { flex: 1; padding: 72px 0 96px; }

.hero { margin-bottom: 56px; }
.hero-name {
  font-family: var(--serif);
  font-size: 46px; line-height: 1.15; font-weight: 400;
  letter-spacing: -0.5px; margin: 0 0 6px;
}
.hero-section {
  font-family: var(--serif);
  font-size: 36px; line-height: 1.2; font-weight: 400;
  margin: 0; color: var(--fg);
}

.app-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 32px;
}
.app-tile a { color: inherit; display: block; }
.app-tile a:hover { text-decoration: none; }
.app-tile a:hover .app-thumb { opacity: .92; }

.app-thumb {
  display: block; position: relative;
  aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 6px; background: var(--bg-soft);
  transition: opacity .15s ease;
}
.app-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 默认图：居中一个大字（名称首字），配色按卡片序号轮换 ——
   没配图标的应用也不会是一块空白 */
.app-thumb-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 64px; line-height: 1;
  background: #111110; color: #f6f1e7;
}
.app-tile:nth-child(4n + 2) .app-thumb-fallback { background: #f6e7d5; color: #b4553f; }
.app-tile:nth-child(4n + 3) .app-thumb-fallback { background: #e7edf2; color: #3f6b8a; }
.app-tile:nth-child(4n + 4) .app-thumb-fallback { background: #e9efe6; color: #4a7256; }

.app-tile-caption { display: block; margin-top: 14px; font-size: 15px; line-height: 1.5; }
.app-tile-name { font-weight: 600; }
.app-tile-tag { color: var(--fg-muted); }

.about { margin-top: 88px; max-width: 660px; }
.about-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; }
.empty { color: var(--fg-muted); }

/* MARK: - 应用页（app.html） */

.page-title { font-family: var(--serif); font-size: 34px; line-height: 1.25; margin: 0 0 8px; font-weight: 400; }
.lead { color: var(--fg-muted); margin: 0 0 28px; font-size: 17px; }

.app-head { margin-bottom: 32px; }
.app-icon { width: 76px; height: 76px; border-radius: 18px; display: block; margin-bottom: 16px; object-fit: cover; }
.app-icon--fallback {
  display: flex; align-items: center; justify-content: center;
  background: #111110; color: #f6f1e7;
  font-family: var(--serif); font-size: 34px;
}

/* ⚠️ 2026-10-15：`.facts` 与这里那份 `.mono` 随「Bundle ID / 平台 / 联系」三行一起去掉了
   （它们在公开站点里**只有那个块**在用）。管理台那份 `.mono` 在 `web/style.css` 里，
   是另一个样式表、不受影响。 */

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; }
.btn {
  display: inline-block; padding: 9px 16px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 500;
}
.btn:hover { text-decoration: none; opacity: .9; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }

/* MARK: - 正文（应用页的简介与独立文档页共用） */

.prose h1 { font-family: var(--serif); font-size: 32px; font-weight: 400; margin: 0 0 18px; }
.prose h2 { font-size: 18px; margin: 30px 0 10px; }
.prose h3 { font-size: 16px; margin: 22px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.meta { color: var(--fg-muted); font-size: 13px; margin-top: 32px; }

/* 独立文档页（许可协议 / 服务条款 / 隐私政策）
   不继承站点框架，所以这里自己给版心和留白 —— 页面上只有文档本身 */
.doc-shell { padding: 56px 0 80px; }
.doc-shell .prose { max-width: 720px; margin: 0 auto; padding: 0 28px; }
.doc-shell .prose h1 { font-size: 28px; margin-bottom: 20px; }

.doc-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.doc-links a {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
}
.doc-links a:hover { text-decoration: none; background: var(--bg-soft); }

/* MARK: - 网站分发（购买 / 下载）

   两件东西：货架列表（`.store-list`）与许可证表单（`.store-form`）。
   表单只用一个输入框 —— 用户手里的唯一凭据就是那串密钥，别让人先注册账号 ✓ */

.store-list { list-style: none; margin: 18px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.store-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft);
}
.store-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.store-item .meta { font-size: 13px; }
.store-price { color: var(--fg); font-size: 15px; }
.store-price + * { margin-top: 2px; }

.store-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 22px 0 8px; }
.store-form label { font-size: 14px; color: var(--fg-muted); }
.store-form input {
  flex: 1 1 260px; min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--fg);
  font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.store-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* 提示条（校验失败 / 服务暂不可用）。红色只用在"确实出了问题"上，别拿它做装饰 */
.notice {
  margin: 16px 0; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-soft); font-size: 14px;
}
.notice--error { border-color: #c0554d; color: #c0554d; }

@media (max-width: 640px) {
  .store-list li { flex-direction: column; align-items: flex-start; }
  .store-form input { flex-basis: 100%; }
}

/* MARK: - 页脚：公司 / 版权 / ICP 备案 / 公安备案 */

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 32px; }
.site-footer p { margin: 0 0 6px; color: var(--fg-muted); font-size: 13px; text-align: center; }
/* 备案那两行（ICP 与公安备案共用 —— 原来只叫 `.icp`，2026-10-15 加了公安备案后改名）
   ⚠️ **必须有下划线**：这两行是"号 + 官方查询链接"，去掉下划线就只剩一串灰字，
   看起来压根不是链接（2026-10-29 用户反馈「看不到查询链接」就是这个原因）✗ */
.site-footer .beian a {
  color: var(--fg-muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
}
.site-footer .beian a:hover { color: var(--fg); }

/* MARK: - 窄屏 */

@media (max-width: 640px) {
  .shell { padding: 0 20px; }
  main { padding: 48px 0 72px; }
  .hero-name { font-size: 34px; }
  .hero-section { font-size: 27px; }
  .app-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .app-thumb-fallback { font-size: 52px; }
  .about { margin-top: 60px; }
}
