/* ============================================================
   摆脱娱乐 · 共享站点样式 /assets/site.css
   语言：展开的规则地图 / 墨蓝坐标底 / 荧光青绿规则高亮
   ============================================================ */

/* ---------- 1. 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

img, svg, video { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a { color: inherit; }

hr {
  border: 0;
  border-top: 1px solid currentColor;
  opacity: .18;
  margin: 0;
}

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 品牌色板 */
  --ink: #0B1B2B;
  --teal: #0E2F3A;
  --paper: #F3EBDD;
  --paper-2: #FBF7EE;
  --mint: #28F0C8;
  --amber: #FFB347;
  --violet: #8B7FA8;
  --graphite: #1F2933;
  --slate: #6B7C8C;
  --alert: #E45757;

  /* 语义色 */
  --fg: #F3EBDD;
  --fg-muted: rgba(243, 235, 221, .66);
  --fg-faint: rgba(243, 235, 221, .44);
  --line: rgba(243, 235, 221, .14);
  --line-mint: rgba(40, 240, 200, .24);
  --ink-muted: rgba(31, 41, 51, .68);

  /* 字体 */
  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  /* 尺寸 */
  --maxw: 1180px;
  --gutter: clamp(1.1rem, 4vw, 3.25rem);
  --radius: 14px;
  --radius-sm: 8px;
  --pill: 999px;

  /* 动效 */
  --ease: cubic-bezier(.32, .72, .35, 1);
  --dur: 200ms;
}

/* ---------- 3. 中文排版基线 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: clamp(15px, .35vw + 14px, 17px);
  line-height: 1.75;
  font-weight: 400;
  color: var(--fg);
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 560px at 10% -12%, rgba(40, 240, 200, .10), transparent 62%),
    radial-gradient(900px 520px at 94% 6%, rgba(139, 127, 168, .13), transparent 64%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  line-break: strict;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--paper);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1.06; }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); letter-spacing: -.012em; }
h4 { font-size: 1.06rem; letter-spacing: 0; font-weight: 700; }

p { margin: 0; }
p + p { margin-top: .85em; }

strong { font-weight: 700; color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

#main-content:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: -4px;
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: .75rem;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, calc(-100% - 1.75rem));
  padding: .62rem 1.15rem;
  border-radius: var(--pill);
  background: var(--mint);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* ---------- 5. 刊头页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 27, 43, .93);
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
  backdrop-filter: blur(14px) saturate(1.18);
  border-bottom: 1px solid var(--line-mint);
  color: var(--paper);
}

.masthead {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(.7rem, 1.5vw, 1.05rem) var(--gutter) .3rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .75rem;
}

.masthead__stamp {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--fg-faint);
  white-space: nowrap;
}

.masthead__brand {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  padding-inline: 1.1rem;
  text-decoration: none;
  text-align: center;
}

.masthead__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  letter-spacing: .04em;
  line-height: 1.05;
  color: var(--paper);
  transition: color var(--dur) var(--ease);
}

.masthead__brand:hover .masthead__name { color: var(--mint); }

.masthead__tagline {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .34em;
  text-indent: .34em;
  color: var(--mint);
  white-space: nowrap;
}

.masthead__aside {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: .7rem;
}

.masthead__hours {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--fg-muted);
  white-space: nowrap;
  padding: .3rem .68rem;
  border: 1px solid var(--line-mint);
  border-radius: var(--pill);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .42rem .85rem .42rem .7rem;
  border: 1px solid rgba(243, 235, 221, .28);
  border-radius: var(--pill);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav-toggle:hover {
  border-color: var(--mint);
  background: rgba(40, 240, 200, .10);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--mint);
  transition: background-color var(--dur) var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: inherit;
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: var(--amber); }

.nav-toggle__label { line-height: 1; }

/* ---------- 6. 居中栏目导航 ---------- */
.site-nav {
  display: block;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--gutter) .7rem;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .1rem .18rem;
  padding-top: .55rem;
  border-top: 1px solid var(--line);
  counter-reset: navidx;
}

.site-nav__item { counter-increment: navidx; }

.site-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  padding: .48rem .85rem;
  border-radius: var(--pill);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .03em;
  text-decoration: none;
  color: rgba(243, 235, 221, .82);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.site-nav__link::before {
  content: counter(navidx, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--mint);
  opacity: .62;
  transition: opacity var(--dur) var(--ease);
}

.site-nav__link:hover {
  color: var(--paper);
  background: rgba(40, 240, 200, .10);
}

.site-nav__link:hover::before { opacity: 1; }

.site-nav__link:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.site-nav__link[aria-current="page"] {
  color: var(--ink);
  background: var(--mint);
  font-weight: 700;
}

.site-nav__link[aria-current="page"]::before {
  color: var(--ink);
  opacity: .72;
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  margin-top: clamp(3rem, 8vw, 6rem);
  background: var(--teal);
  background-image:
    radial-gradient(760px 320px at 6% 0%, rgba(40, 240, 200, .09), transparent 66%),
    radial-gradient(620px 300px at 96% 100%, rgba(139, 127, 168, .16), transparent 70%);
  background-repeat: no-repeat;
  border-top: 1px solid var(--line-mint);
  color: var(--paper);
}

.footer__grid {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(2.25rem, 5vw, 3.6rem) var(--gutter) clamp(1.4rem, 3vw, 2.1rem);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(1.75rem, 4vw, 3.2rem);
}

.footer__brand { min-width: 0; }

.footer__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--paper);
  margin-bottom: .55rem;
}

.footer__summary {
  font-size: .92rem;
  line-height: 1.75;
  color: var(--fg-muted);
  max-width: 30em;
}

.footer__stamp {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .13em;
  color: var(--mint);
  opacity: .85;
}

.footer__col { min-width: 0; }

.footer__heading {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--mint);
  margin-bottom: .9rem;
}

.footer__list {
  display: grid;
  gap: .55rem;
}

.footer__list--contact { gap: .85rem; }

.footer__link {
  display: inline-block;
  width: fit-content;
  padding-bottom: 1px;
  font-size: .92rem;
  color: rgba(243, 235, 221, .84);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer__link:hover {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

.footer__item {
  display: grid;
  gap: .1rem;
}

.footer__label {
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .2em;
  color: var(--fg-faint);
}

.footer__value {
  font-family: var(--font-mono);
  font-size: .84rem;
  line-height: 1.55;
  letter-spacing: .01em;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer__bar {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1rem var(--gutter) 1.7rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .35rem 1.5rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--fg-faint);
}

.footer__copy,
.footer__icp { margin: 0; }

/* ---------- 8. 布局容器与网格 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 780px; }
.container--wide { max-width: 1360px; }

.section { padding-block: clamp(2.4rem, 5.5vw, 4.5rem); }

.measure { max-width: 34em; }

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(.9rem, 1.6vw, 1.5rem);
}

.bento > * { grid-column: span 12; }

@media (min-width: 760px) {
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
}

/* ---------- 9. 面板与通栏 ---------- */
.panel {
  background: var(--paper);
  color: var(--graphite);
  border-radius: var(--radius);
  padding: clamp(1.15rem, 2.4vw, 1.9rem);
}

.panel h1,
.panel h2,
.panel h3,
.panel h4 { color: var(--graphite); }

.panel--dark {
  background: rgba(14, 47, 58, .78);
  border: 1px solid var(--line-mint);
  color: var(--paper);
}

.panel--dark h1,
.panel--dark h2,
.panel--dark h3,
.panel--dark h4 { color: var(--paper); }

.panel--glass {
  background: rgba(243, 235, 221, .07);
  border: 1px solid rgba(243, 235, 221, .16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--paper);
}

.rule-band {
  width: 100%;
  background: var(--paper);
  color: var(--graphite);
  padding-block: clamp(1.5rem, 3.5vw, 2.4rem);
  border-block: 2px solid var(--mint);
}

.rule-band h2,
.rule-band h3 { color: var(--graphite); }

/* ---------- 10. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-body);
  font-size: .93rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              filter var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.btn--mint {
  background: var(--mint);
  color: var(--ink);
}

.btn--mint:hover { filter: brightness(1.08); }

.btn--amber {
  background: var(--amber);
  color: var(--ink);
}

.btn--amber:hover { filter: brightness(1.06); }

.btn--paper {
  background: var(--paper);
  color: var(--ink);
}

.btn--paper:hover { background: #FFFFFF; }

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(243, 235, 221, .34);
}

.btn--ghost:hover {
  color: var(--mint);
  border-color: var(--mint);
  background: rgba(40, 240, 200, .09);
}

/* ---------- 11. 标签与坐标 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .22rem .6rem;
  border: 1px solid currentColor;
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.5;
  white-space: nowrap;
}

.tag--rule { color: var(--mint); }
.tag--price { color: var(--amber); }
.tag--version { color: var(--violet); }
.tag--activity { color: var(--paper); }
.tag--alert { color: var(--alert); }

.coord {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--slate);
  text-transform: uppercase;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* ---------- 12. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--fg-muted);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: rgba(40, 240, 200, .55);
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 235, 221, .22);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.breadcrumbs a:hover {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

.breadcrumbs [aria-current="page"] {
  color: var(--paper);
  border-bottom: 0;
}

/* ---------- 13. 图片容器 ---------- */
.figure {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-mint);
  aspect-ratio: 16 / 9;
  background-color: var(--teal);
  background-image:
    repeating-linear-gradient(135deg, rgba(40, 240, 200, .09) 0 10px, transparent 10px 22px);
}

.figure--wide { aspect-ratio: 21 / 9; }
.figure--tall { aspect-ratio: 4 / 5; }
.figure--square { aspect-ratio: 1 / 1; }

.figure img,
.figure svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__label {
  position: absolute;
  top: .8rem;
  left: .8rem;
  z-index: 2;
  padding: .2rem .55rem;
  border: 1px solid rgba(40, 240, 200, .34);
  border-radius: var(--pill);
  background: rgba(11, 27, 43, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .16em;
  color: var(--mint);
}

.figure__caption {
  margin-top: .6rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--fg-faint);
}

/* ---------- 14. 阅读进度 ---------- */
.reading-progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  height: 3px;
  background: rgba(243, 235, 221, .10);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.reading-progress__bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--amber));
  transition: width .08s linear;
}

/* ---------- 15. 内容显现 ---------- */
[data-reveal] { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .55s var(--ease), transform .55s var(--ease);
  }

  html.js [data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 16. 移动端栏目 ---------- */
@media (max-width: 980px) {
  .masthead {
    grid-template-columns: 1fr auto;
    padding-block: .68rem .45rem;
  }

  .masthead__stamp { display: none; }

  .masthead__brand {
    justify-self: start;
    align-items: flex-start;
    text-align: left;
    padding-inline: 0;
  }

  .masthead__tagline { letter-spacing: .26em; text-indent: .26em; }

  .masthead__hours { display: none; }

  .nav-toggle { display: inline-flex; }

  .site-nav { display: none; }

  .site-nav[data-open] {
    display: block;
    padding-bottom: .85rem;
    animation: nav-drop .24s var(--ease) both;
  }

  .site-nav[data-open] .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: .12rem;
    padding-top: .6rem;
  }

  .site-nav[data-open] .site-nav__link {
    width: 100%;
    padding: .68rem .8rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }
}

@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-7px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 17. 平板与手机 ---------- */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.9rem;
  }

  .footer__bar {
    justify-content: flex-start;
    flex-direction: column;
    gap: .25rem;
  }

  .site-nav__link { font-size: .95rem; }
  .measure { max-width: none; }
}

/* ---------- 18. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .btn:hover,
  .btn:active {
    transform: none;
  }
}
