/* 对齐 lakesideforest.me 极简调音法律页（minimaltuner/privacy.html）视觉语言 */

@font-face {
  font-family: "WenYuan Rounded SC";
  src: url("/drivefocus/assets/fonts/WenYuanRoundedSCVF.subset.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #86868b;
  --text-3: #b0b0b3;
  --border: rgba(0, 0, 0, 0.08);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  /* 手机端铺满，避免安全区露出系统白底 */
  min-height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

body {
  font-family: "WenYuan Rounded SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

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

/* ---------- 胶囊导航（与全站 / 极简调音一致） ---------- */

.nav {
  position: fixed;
  top: 6.44dvh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  isolation: isolate;
  width: 22.65vw;
  height: 2.58vw;
  display: flex;
  align-items: center;
  gap: 1.77vw;
  padding: 0 1.39vw;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.74) 0%,
    rgba(255, 255, 255, 0.42) 42%,
    rgba(255, 255, 255, 0.5) 68%,
    rgba(255, 255, 255, 0.7) 100%
  );
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  backdrop-filter: blur(18px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 0 max(10px, 0.64vw) rgba(0, 0, 0, 0.2),
    0 1px 1px rgba(255, 255, 255, 0.7),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -1px 1px rgba(255, 255, 255, 0.4),
    inset 1px 0 1px rgba(255, 255, 255, 0.55),
    inset -1px 0 1px rgba(255, 255, 255, 0.55),
    inset 0 0 24px rgba(255, 255, 255, 0.35);
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(110% 165% at 10% -20%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 52%),
    radial-gradient(80% 130% at 92% 120%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.nav::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0) 65%
  );
  transform: translateX(-60%);
  animation: glass-flow 7s var(--ease) 2s infinite;
  pointer-events: none;
}

@keyframes glass-flow {
  0% { transform: translateX(-60%); }
  55%, 100% { transform: translateX(60%); }
}

@media (prefers-reduced-motion: reduce) {
  .nav::after { animation: none; opacity: 0; }
}

.nav a {
  flex: 0 0 5.45vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.29vw;
  font-weight: 500;
  letter-spacing: 0;
  text-align: center;
  color: #3d3d3d;
  text-shadow: 0 0 2.5px rgba(0, 0, 0, 0.6);
  border-radius: 999px;
  transition: background 0.3s var(--ease);
}

/* ---------- 法律文档页 ---------- */

body.doc {
  overflow: auto;
  background: var(--bg);
}

.doc-main {
  padding: calc(6.44dvh + 2.58vw + 6vh) 6.44vw 9vh;
  padding-left: max(6.44vw, env(safe-area-inset-left, 0px));
  padding-right: max(6.44vw, env(safe-area-inset-right, 0px));
  padding-bottom: max(9vh, calc(4vh + env(safe-area-inset-bottom, 0px)));
}

/* App 内 WKWebView（?embed=1）：藏站点导航，收紧上下留白，底色铺满 */
body.embed .nav { display: none; }
body.embed .doc-main {
  padding-top: max(20px, env(safe-area-inset-top, 0px));
  padding-bottom: max(28px, calc(16px + env(safe-area-inset-bottom, 0px)));
}
body.embed .doc-footer {
  margin-top: 6vh;
  padding-bottom: max(4vh, env(safe-area-inset-bottom, 0px));
}

.doc-inner { max-width: 780px; }

.doc-inner > h1 {
  font-size: clamp(30px, 3.22vw, 50px);
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.3;
  color: #3d3d3d;
}

.doc-meta {
  margin-top: 1.8vh;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text-3);
}

.doc-meta a {
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.doc-switch {
  margin-top: 2.2vh;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6em;
}

.doc-switch a {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--text-2);
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.doc-switch a:hover,
.doc-switch a[aria-current="page"] {
  color: #3d3d3d;
  border-bottom-color: rgba(0, 0, 0, 0.28);
}

.doc-body { margin-top: 5.4vh; }

.doc-body h2 {
  margin-top: 7vh;
  font-size: clamp(18px, 1.29vw, 22px);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: #3d3d3d;
}

.doc-body h2:first-child { margin-top: 0; }

.doc-body h3 {
  margin-top: 4.4vh;
  font-size: clamp(16px, 1.03vw, 18px);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: #3d3d3d;
}

.doc-body p,
.doc-body li {
  margin-top: 2.2vh;
  font-size: clamp(15px, 1.03vw, 17px);
  font-weight: 300;
  line-height: 2;
  letter-spacing: 0.06em;
  color: #3d3d3d;
}

.doc-body strong { font-weight: 500; }

.doc-body ul,
.doc-body ol {
  list-style: none;
  margin-top: 0.6vh;
}

.doc-body ul li,
.doc-body ol li {
  position: relative;
  padding-left: 1.6em;
}

.doc-body ul li::before {
  content: "";
  position: absolute;
  left: 0.35em;
  top: 1em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-3);
}

.doc-body ol {
  counter-reset: doc-ol;
}

.doc-body ol li {
  counter-increment: doc-ol;
}

.doc-body ol li::before {
  content: counter(doc-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.92em;
  letter-spacing: 0;
  color: var(--text-3);
}

.doc-body a {
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  transition: border-color 0.3s var(--ease);
}

.doc-body a:hover { border-color: rgba(0, 0, 0, 0.5); }

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 3vh;
  font-size: clamp(13px, 0.92vw, 15px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #3d3d3d;
}

.doc-body th,
.doc-body td {
  border: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

.doc-body th {
  background: rgba(0, 0, 0, 0.03);
  font-weight: 400;
}

.doc-sep {
  margin: 8vh 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.doc-footer {
  margin-top: 10vh;
  padding: 0 6.44vw 7vh;
}

.site-footer {
  max-width: 780px;
  margin: 0 auto;
  justify-content: center;
  border-top: 1px solid var(--border);
  padding: 44px 0 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer p {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}

@media (max-width: 860px) {
  .nav { width: auto; height: auto; gap: 2px; padding: 6px; }
  .nav a { flex: none; height: auto; padding: 9px 18px; font-size: 14px; }
  .doc-main {
    padding: calc(6.44dvh + 78px) 22px 8vh;
    padding-left: max(22px, env(safe-area-inset-left, 0px));
    padding-right: max(22px, env(safe-area-inset-right, 0px));
    padding-bottom: max(8vh, calc(24px + env(safe-area-inset-bottom, 0px)));
  }
  body.embed .doc-main {
    padding-top: max(16px, env(safe-area-inset-top, 0px));
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    padding-bottom: max(24px, calc(12px + env(safe-area-inset-bottom, 0px)));
  }
  .doc-body ul li::before,
  .doc-body ol li::before { top: 0.95em; }
  .doc-footer { margin-top: 64px; padding: 0 22px 6vh; }
}

@media (max-width: 480px) {
  .nav { top: 18px; }
  .nav a { padding: 8px 14px; font-size: 13px; }
}
