/* ============================================================
   好时光 · 全站统一 UI（唯一样式来源）
   所有页面最后引入本文件，覆盖各页面的局部写法
   ============================================================ */

:root {
  /* 颜色 */
  --ui-bg:        #0e1411;
  --ui-card:      #161e1a;
  --ui-card-2:    #1b2420;
  --ui-line:      #26312b;
  --ui-line-2:    #334139;
  --ui-ink:       #e6ebe6;
  --ui-ink-head:  #eff3ee;
  --ui-muted:     #93a09a;
  --ui-accent:    #d3a45c;
  --ui-accent-bg: rgba(211, 164, 92, .10);
  --ui-solid:     #f2efe9;
  --ui-solid-ink: #14201a;

  /* 尺寸 */
  --ui-r-card: 16px;
  --ui-r-ctrl: 12px;
  --ui-r-pill: 999px;
  --ui-h-btn:  50px;
  --ui-h-ctrl: 44px;
  --ui-h-chip: 38px;
}

/* ---------- 按钮 ---------- */
.btn,
.btn-primary,
a.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--ui-h-btn);
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--ui-r-pill);
  background: var(--ui-solid);
  color: var(--ui-solid-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}
.btn:hover { filter: brightness(1.03); }

.btn-ghost,
.btn.btn-ghost {
  background: transparent;
  border-color: var(--ui-line);
  color: var(--ui-ink);
  font-weight: 500;
}

.btn-block { width: 100%; }

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* ---------- 卡片 ---------- */
.card,
.panel,
.tun-upload {
  background: var(--ui-card);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r-card);
}

.card { padding: 20px; margin-top: 20px; }

/* ---------- 芯片（多选/参数） ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  height: var(--ui-h-chip);
  padding: 0 16px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r-pill);
  background: transparent;
  color: var(--ui-ink);
  font-size: 13.5px;
  line-height: 1;
  cursor: pointer;
}
.chip.on,
.chip.is-on {
  border-color: var(--ui-accent);
  background: var(--ui-accent-bg);
  color: var(--ui-accent);
  font-weight: 600;
}

/* ---------- 分段切换 ---------- */
.tab {
  height: var(--ui-h-ctrl);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r-ctrl);
  background: transparent;
  color: var(--ui-ink);
  font-size: 14px;
  cursor: pointer;
}
.tab.is-on,
.tab.on {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: var(--ui-solid-ink);
  font-weight: 600;
}

/* ---------- 底部导航 ---------- */
.t-nav a:not(.t-logo),
.m-nav .m-btn {
  height: var(--ui-h-ctrl);
  line-height: calc(var(--ui-h-ctrl) - 2px);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r-ctrl);
  background: var(--ui-card);
  color: var(--ui-ink);
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.t-nav a.on,
.m-nav .m-btn.on {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: var(--ui-solid-ink);
  font-weight: 600;
}

/* ---------- 上传框 ---------- */
.drop,
.tun-drop {
  border: 1px dashed var(--ui-line);
  border-radius: 13px;
  background: transparent;
}
.drop:hover,
.drop.is-drag,
.tun-drop:hover,
.tun-drop.over {
  border-color: rgba(211, 164, 92, .55);
  background: transparent;
}

/* ---------- 输入 ---------- */
input[type="text"],
input[type="number"],
textarea,
select {
  height: var(--ui-h-ctrl);
  padding: 0 12px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-bg);
  color: var(--ui-ink);
  font: inherit;
  font-size: 14px;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--ui-accent);
}

/* ---------- 可选列表项（服务卡） ---------- */
.svc-card.is-selected,
.svc:has(input:checked) {
  border-color: var(--ui-accent) !important;
  background: var(--ui-accent-bg) !important;
  box-shadow: 0 0 0 1px var(--ui-accent), 0 8px 24px rgba(0, 0, 0, .28);
}

/* ---------- 标题 ---------- */
.note,
.progress,
.tun-ages-label { color: var(--ui-muted); }

/* 上传框内边距与图标，全站统一 */
.drop { padding: 34px 18px; }
.drop-ico {
  display: grid; place-items: center;
  width: 42px; height: 42px; margin: 0 auto 10px;
  border: 1px solid var(--ui-line); border-radius: 50%;
  color: var(--ui-muted);
}
.drop-ico svg { width: 20px; height: 20px; display: block; }
.drop b, .drop .drop-t { display: block; color: var(--ui-ink); font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.drop .hint { font-size: 12.5px; line-height: 1.7; color: var(--ui-muted); }

/* 工具页主操作按钮：单独占一行时整行宽，与其他页一致 */
.btn-row > .btn:only-child,
.btn-row > .btn-block {
  width: 100%;
  max-width: none;
  flex: 1 1 100%;
}

/* H5 内容宽度统一：各页左右留白一致 */
@media (max-width: 860px) {
  body.page-repair .shell,
  .wrap { padding-left: 14px; padding-right: 14px; }
}

/* 内容宽度与上传框外框：全站对齐到 362（390 视口） */
@media (max-width: 860px) {
  body.page-repair .shell { padding-left: 14px !important; padding-right: 14px !important; }
}
/* 时光隧道的上传框外框去掉多余边框与内边距，虚线框与其他页同宽 */
.tun-upload { border: 0 !important; background: transparent !important; padding: 0 !important; }

/* PC：修复页选项行改为纵向堆叠，避免两列溢出卡片 */
@media (min-width: 861px) {
  .opt-wrap { grid-auto-flow: row !important; }
  .opt-wrap .tone-row,
  .opt-wrap .opt-row { flex-wrap: wrap !important; }
}

/* 修复页主按钮：整行宽，与各工具页一致 */
.cta-row { margin-top: 20px; }
.cta-row .btn { width: 100%; }
@media (max-width: 860px) {
  .cta-row { margin-top: 18px; }
}

/* PC：主按钮不铺满整屏，居中收窄 */
@media (min-width: 861px) {
  .cta-row { max-width: 520px; margin-left: auto; margin-right: auto; }
}

/* ===== 工具页 PC 顶部导航（贯穿全站） ===== */
.page-tool .site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(14, 20, 17, .92);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--ui-line);
}
.page-tool .site-head .head-inner,
.page-tool .site-head .shell {
  display: flex;
  align-items: center;
  gap: 34px;
  height: 64px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.page-tool .site-head .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #aeb9b1;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .12em;
  flex: none;
}
.page-tool .site-head .brand-mark { display: block; flex: none; }
.page-tool .site-head .brand-mark img {
  height: 26px;
  width: auto;
  display: block;
}
.page-tool .site-head .brand-mark .logo-dark-mode { display: block; }
.page-tool .site-head .brand-mark .logo-light-mode { display: none; }
.page-tool .site-head .site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.page-tool .site-head .site-nav a {
  color: var(--ui-muted);
  font-size: 14.5px;
  line-height: 1;
  text-decoration: none;
  padding: 6px 0;
  transition: color .18s ease;
}
.page-tool .site-head .site-nav a:hover { color: var(--ui-accent); }
.page-tool .site-head .site-nav a.on { color: var(--ui-accent); font-weight: 600; }

/* H5 不显示顶部导航（底部导航替代） */
@media (max-width: 900px) {
  .site-head { display: none !important; }
}

/* 顶部导航统一高度 */
.site-head .head-inner { min-height: 65px; }
.site-head { border-bottom-color: var(--ui-line); }

/* 顶部导航高度精确统一（消除 3px 差异） */
.site-head .head-inner {
  height: 66px !important;
  min-height: 66px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* ===== 参数芯片：全站唯一一套（胶囊 + 选中实心金） ===== */
.chip,
.tone-opt,
.opt-opts button,
.tone-opts button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important;
  min-width: 0 !important;
  padding: 0 18px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-r-pill) !important;
  background: transparent !important;
  color: var(--ui-ink) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer;
}

.chip.on,
.chip.is-on,
.tone-opt.is-active,
.tone-opt.on,
.opt-opts button.is-active,
.tone-opts button.is-active {
  background: var(--ui-accent) !important;
  border-color: var(--ui-accent) !important;
  color: var(--ui-solid-ink) !important;
  font-weight: 600 !important;
}

.page-tool .site-head .brand-text {
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .12em;
  color: #aeb9b1;
}
.page-tool .site-head .site-nav { gap: 26px; }
.page-tool .site-head .site-nav a { font-size: 14.5px; color: #aeb9b1; }

/* 顶部导航容器与其它页完全对齐（消除横向跳动） */
.page-tool .site-head .head-inner,
.page-tool .site-head .shell {
  max-width: 1240px;
  padding-left: 40px;
  padding-right: 40px;
  gap: 34px;
}
@media (max-width: 1100px) {
  .page-tool .site-head .head-inner,
  .page-tool .site-head .shell {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* logo 占位与首页一致（30px 见方），保证导航起点不偏移 */
.page-tool .site-head .brand-mark {
  display: inline-grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  flex: none;
}
.page-tool .site-head .brand-mark img { height: 26px !important; width: auto !important; }

/* 导航起点统一：全站使用相同的头部间距 */
.site-head .head-inner,
.page-tool .site-head .head-inner { gap: 26px !important; }
.site-head .site-nav { margin-left: 14px !important; }

/* 服务卡选中：去掉外发光环，只保留 1px 金色边框（与导航/芯片一致） */
.svc-card.is-selected,
.svc:has(input:checked) {
  box-shadow: none !important;
  border-width: 1px !important;
  border-color: var(--ui-accent) !important;
  background: var(--ui-accent-bg) !important;
  outline: none !important;
}

/* ===== 选中态：与未选中同样的深底+1px 描边，只把边和字变金 ===== */
.t-nav a.on,
.m-nav .m-btn.on,
.tab.on,
.tab.is-on,
.chip.on,
.chip.is-on,
.tone-opt.is-active,
.tone-opt.on,
.opt-opts button.is-active,
.tone-opts button.is-active,
.svc-card.is-selected,
.svc:has(input:checked) {
  background: var(--ui-card) !important;
  border: 1px solid var(--ui-accent) !important;
  color: var(--ui-accent) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

/* PC：三页主操作按钮统一宽度与对齐（520px，左对齐） */
@media (min-width: 861px) {
  .cta-row { max-width: 520px; margin: 20px 0 0; }
  .cta-row .btn { width: 100%; }
  .btn-row > .btn:only-child,
  .btn-row > .btn.btn-block {
    width: 100%;
    max-width: 520px;
    flex: 0 0 520px;
  }
}
/* H5：统一通栏（100% 容器宽） */
@media (max-width: 860px) {
  .btn-row > .btn:only-child,
  .btn-row > .btn.btn-block { width: 100%; max-width: none; flex: 1 1 100%; }
}

/* 主按钮禁用态：用不透明固定色，避免压在不同底色上出现深浅差 */
.btn[disabled],
.btn:disabled {
  opacity: 1 !important;
  background: #9a9b96 !important;
  color: #23241f !important;
  border-color: transparent !important;
  cursor: default;
}
.btn.btn-ghost[disabled],
.btn-ghost:disabled {
  background: transparent !important;
  color: var(--ui-muted) !important;
  border-color: var(--ui-line) !important;
  opacity: .7 !important;
}

/* 工具页 H1 标题：全站统一（字号/颜色/字距/上边距） */
.wrap h1,
.repair-title h1,
.studio-section h1 {
  font-size: 20px !important;
  line-height: 1.65 !important;
  font-weight: 700 !important;
  color: #f2efe9 !important;
  letter-spacing: .2px !important;
  margin: 0 0 8px !important;
}

/* 修复页标题块与其它页顶部对齐 */
.repair-title { margin: 0 0 18px !important; padding: 0 !important; }
body.page-repair .studio-section { padding-top: 0 !important; }
body.page-repair .wrap { padding-top: 16px !important; }

/* 修复页容器去掉额外上外边距，标题与其它页对齐 */
body.page-repair .studio-section .shell { margin-top: 0 !important; padding-top: 16px !important; }

/* ===== 全站统一字体栈与字距（2026-11-30） ===== */
html, body, button, input, textarea, select {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif !important;
}
.btn, .btn-primary, .chip, .tab, .t-nav a, .m-nav .m-btn {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif !important;
  letter-spacing: .2px !important;
}
