/* ============================================================
   NINKORO.COM — 设计系统 v3（Apple 风格重构）
   暖黑暗调 · 流体动效 · 材质分层 · 编辑级排版
   ============================================================ */

:root {
  /* 色彩：暖黑 + 纸白 + 旧金 */
  --bg: #0e0d0b;
  --bg-elev: #14130f;
  --bg-card: rgba(23, 21, 16, 0.82);
  --ink: #ede8de;
  --ink-dim: #a39d91;
  --ink-faint: #6b665c;
  --accent: #d3a24a;
  --accent-soft: rgba(211, 162, 74, 0.12);
  --line: rgba(237, 232, 222, 0.09);
  --line-strong: rgba(237, 232, 222, 0.18);
  --danger: #d97b6c;

  /* 字体 */
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  /* 尺寸 */
  --nav-h: 64px;
  --wrap: 1120px;
  --radius: 16px;

  /* Apple 流体动效：临界阻尼，无过冲，随时可打断 */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t-fast: 0.18s;
  --t-med: 0.42s;
  --t-slow: 0.6s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  overflow-x: hidden;
  /* iOS Safari: 惯性滚动 + 弹性 */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: #17130a; }

:focus-visible {
  outline: 2px solid rgba(211, 162, 74, 0.65);
  outline-offset: 3px;
  border-radius: 6px;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2721; border-radius: 5px; }

/* ---------- 颗粒质感 ---------- */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 9990;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 9s steps(10) infinite;
}
@keyframes grain-shift {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-2%); }
  80% { transform: translate(3%,3%); }
}

/* ---------- 布局 ---------- */
.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
  position: relative; z-index: 2;
}
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section + .section { border-top: 1px solid var(--line); }

/* ---------- 导航（浮动材质层，内容从其下滚过） ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  padding-top: env(safe-area-inset-top, 0);
  transition: background var(--t-med) var(--ease);
}
.nav.is-scrolled {
  background: rgba(14, 13, 11, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
/* 滚动渐变边缘，替代硬分割线 */
.nav.is-scrolled::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -20px;
  height: 20px; pointer-events: none;
  background: linear-gradient(rgba(14,13,11,0.35), transparent);
}
.nav-inner {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 21px; font-weight: 700;
  letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 6px;
  transition: opacity var(--t-fast) var(--ease);
}
.nav-logo:active { opacity: 0.6; }
.nav-logo em {
  font-style: normal; color: var(--accent);
  font-size: 12px; font-family: var(--mono);
  letter-spacing: 0.18em; transform: translateY(-2px);
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: 14px; color: var(--ink-dim);
  padding: 8px 14px; border-radius: 999px;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform 0.1s ease-out;
}
.nav-links a:hover { color: var(--ink); background: rgba(237,232,222,0.06); }
.nav-links a:active { transform: scale(0.96); }
.nav-links a.active { color: var(--ink); background: rgba(237,232,222,0.08); }

.nav-burger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform var(--t-med) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(14,13,11,0.85);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  display: flex; flex-direction: column;
  justify-content: center; padding: 0 32px;
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-med) var(--ease), visibility var(--t-med);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--serif);
  font-size: clamp(28px, 7vw, 40px);
  letter-spacing: -0.01em;
  padding: 10px 0;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 14px;
  transform: translateY(14px); opacity: 0;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease), color var(--t-fast);
}
.mobile-menu.is-open a { transform: none; opacity: 1; }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--ink); }
.mobile-menu a:active { opacity: 0.6; }
.mobile-menu a .idx {
  font-family: var(--mono); font-size: 12px;
  color: var(--accent); letter-spacing: 0.15em;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--nav-h);
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0));
  padding-bottom: 0;
  position: relative;
}
.hero-eyebrow {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 26px;
}
.hero-eyebrow::before {
  content: ""; width: 40px; height: 1px; background: var(--accent);
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(42px, 7.4vw, 88px);
  line-height: 1.14; font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-title .thin { font-weight: 400; color: var(--ink-dim); }
.hero-title .accent { color: var(--accent); }
.hero-sub {
  margin-top: 30px;
  max-width: 600px;
  color: var(--ink-dim);
  font-size: clamp(15px, 2vw, 18px);
}
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-ornament {
  position: absolute; right: 4%; bottom: 12%;
  font-size: clamp(64px, 10vw, 110px);
  color: var(--accent); opacity: 0.14;
  font-family: var(--serif);
  animation: spin 48s linear infinite;
  pointer-events: none; user-select: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.3em; color: var(--ink-faint);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint::after {
  content: ""; width: 1px; height: 36px;
  background: linear-gradient(var(--ink-faint), transparent);
  animation: drip 2.2s var(--ease) infinite;
}
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 按钮（Apple：按压即时反馈，材质分层） ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(237, 232, 222, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    transform 0.1s ease-out, opacity var(--t-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: rgba(237,232,222,0.08); border-color: rgba(211,162,74,0.5); }
.btn:active { transform: scale(0.97); }
.btn .arrow { transition: transform var(--t-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn.solid {
  background: var(--accent); border-color: transparent;
  color: #17130a; font-weight: 600;
}
.btn.solid:hover { background: #e0b056; }

/* ---------- 标题块 ---------- */
.sec-head { margin-bottom: clamp(36px, 5vw, 56px); }
.sec-label {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.sec-label::before { content: ""; width: 32px; height: 1px; background: var(--accent); }
.sec-title {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.2; font-weight: 700;
  letter-spacing: -0.02em;
}
.sec-title .thin { color: var(--ink-dim); font-weight: 400; }
.sec-desc { margin-top: 16px; color: var(--ink-dim); max-width: 560px; }
.sec-head .more {
  margin-left: auto; align-self: flex-end;
  font-size: 14px; color: var(--ink-dim);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.sec-head .more:hover { color: var(--accent); border-bottom-color: var(--accent); }
.sec-head .more:active { opacity: 0.6; }
.sec-head.row { display: flex; align-items: flex-end; gap: 32px; }

/* ---------- 卡片（轻材质层） ---------- */
.spot {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.spot:hover {
  border-color: rgba(211,162,74,0.32);
  background: rgba(28, 25, 19, 0.9);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

/* ---------- 作品卡片 ---------- */
.works-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.work-card { padding: 30px; display: flex; flex-direction: column; min-height: 260px; }
.work-card .top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px;
}
.work-card .year { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.1em; }
.badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink-dim);
}
.badge.live { color: #8fce8f; border-color: rgba(143,206,143,0.35); }
.badge.wip { color: var(--accent); border-color: rgba(211,162,74,0.4); }
.badge.idea { color: var(--ink-faint); }
.work-card h3 {
  font-family: var(--serif); font-size: 25px; font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px; display: flex; align-items: center; gap: 10px;
}
.work-card h3 .arrow {
  font-family: var(--sans); font-size: 18px; color: var(--accent);
  opacity: 0; transform: translateX(-6px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.work-card:hover h3 .arrow { opacity: 1; transform: none; }
.work-card .en {
  font-family: var(--mono); font-size: 12px; color: var(--ink-faint);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px;
}
.work-card p { color: var(--ink-dim); font-size: 15px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-faint); letter-spacing: 0.06em;
  padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px;
}
.work-card.placeholder {
  border-style: dashed; background: transparent;
  backdrop-filter: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); font-family: var(--serif); font-size: 20px;
  min-height: 260px; text-align: center;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform 0.1s ease-out;
}
.work-card.placeholder:hover { color: var(--accent); border-color: rgba(211,162,74,0.4); }
.work-card.placeholder:active { transform: scale(0.98); }

/* ---------- 列表行 ---------- */
.list-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 24px; align-items: baseline;
  padding: 26px 8px;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-fast) var(--ease), padding var(--t-fast) var(--ease);
  position: relative;
}
.list-row:first-child { border-top: 1px solid var(--line); }
.list-row:hover { background: rgba(237,232,222,0.025); padding-left: 18px; }
.list-row .date {
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-faint); letter-spacing: 0.08em;
}
.list-row h3 {
  font-family: var(--serif); font-size: clamp(19px, 2.4vw, 23px);
  font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px;
  transition: color var(--t-fast) var(--ease);
}
.list-row:hover h3 { color: var(--accent); }
.list-row p { color: var(--ink-dim); font-size: 14px; max-width: 640px; }
.list-row .go {
  font-size: 20px; color: var(--ink-faint);
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.list-row:hover .go { color: var(--accent); transform: translate(3px, -3px); }

/* ---------- Tab ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 36px; flex-wrap: wrap; }
.tab {
  padding: 9px 20px; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-dim); font-size: 14px;
  background: rgba(237,232,222,0.03);
  transition: all var(--t-fast) var(--ease);
  display: flex; align-items: center; gap: 8px;
  user-select: none;
}
.tab:hover { border-color: var(--line-strong); color: var(--ink); }
.tab:active { transform: scale(0.96); }
.tab.active {
  background: var(--accent); border-color: transparent;
  color: #17130a; font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-up var(--t-slow) var(--ease); }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 分享条目 */
.share-item {
  display: grid; grid-template-columns: 56px 1fr auto;
  gap: 20px; align-items: center;
  padding: 20px 12px;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-fast) var(--ease);
}
.share-item:first-child { border-top: 1px solid var(--line); }
.share-item:hover { background: rgba(237,232,222,0.025); }
.share-cover {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 24px; font-weight: 700;
  color: #17130a; flex-shrink: 0;
}
.share-item h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.share-item .by { font-size: 13px; color: var(--ink-faint); margin: 2px 0 6px; }
.share-item .note { font-size: 14px; color: var(--ink-dim); }
.stars { color: var(--accent); font-size: 13px; letter-spacing: 3px; white-space: nowrap; }
.stars .off { color: var(--ink-faint); opacity: 0.4; }

/* ---------- 导航站链接卡 ---------- */
.links-group { margin-bottom: 52px; }
.links-group > h3 {
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
}
.links-group > h3 .no {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  letter-spacing: 0.15em;
}
.links-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.link-card {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px;
}
.link-card:active { transform: scale(0.98); }
.link-card .favi {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 18px;
  color: #17130a; flex-shrink: 0;
}
.link-card .meta { min-width: 0; }
.link-card .name { font-size: 15px; font-weight: 600; display: flex; gap: 6px; align-items: center; letter-spacing: -0.01em; }
.link-card .url {
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 工具页 ---------- */
.tools-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tool-block { padding: 28px; }
.tool-block h3 {
  font-family: var(--serif); font-size: 20px; letter-spacing: -0.01em; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.tool-block h3 .no { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.15em; }
.tool-line {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.tool-line:last-child { border-bottom: none; }
.tool-line .k { color: var(--ink); font-weight: 500; }
.tool-line .v { color: var(--ink-faint); font-size: 13px; text-align: right; }

/* ---------- 关于我 ---------- */
.about-hero { padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 88px)); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-text p { color: var(--ink-dim); margin-bottom: 20px; font-size: 16px; }
.about-text p strong { color: var(--ink); font-weight: 600; }
.about-text .lede {
  font-family: var(--serif); font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: -0.01em;
  color: var(--ink); line-height: 1.6; margin-bottom: 28px;
}
.fact-card { padding: 28px; }
.fact-card h3 { font-family: var(--serif); font-size: 18px; margin-bottom: 16px; color: var(--accent); }
.fact-card dl div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
}
.fact-card dl div:last-child { border: none; }
.fact-card dt { color: var(--ink-faint); }
.fact-card dd { color: var(--ink); text-align: right; }

/* 时间线 */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 1px; background: var(--line-strong);
}
.tl-item { position: relative; padding-bottom: 38px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -32px; top: 8px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--accent); background: var(--bg);
}
.tl-item .when {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  letter-spacing: 0.12em; margin-bottom: 6px;
}
.tl-item h3 { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.tl-item p { color: var(--ink-dim); font-size: 15px; max-width: 600px; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 20px 0; position: relative; z-index: 2;
}
.marquee-track {
  display: inline-flex; gap: 48px;
  animation: marquee 36s linear infinite;
  font-family: var(--serif); font-size: 21px; color: var(--ink-faint);
}
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; }
.marquee-track .dot { color: var(--accent); font-size: 14px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 36px; position: relative; z-index: 2; }
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 40px; flex-wrap: wrap; margin-bottom: 44px;
}
.footer .big {
  font-family: var(--serif); font-size: clamp(26px, 4vw, 40px);
  font-weight: 700; line-height: 1.3; letter-spacing: -0.02em;
}
.footer .big a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color var(--t-fast) var(--ease); }
.footer .big a:hover { border-bottom-color: var(--accent); }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-links h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 14px; color: var(--ink-dim); transition: color var(--t-fast) var(--ease); }
.footer-links a:hover { color: var(--accent); }
.footer-links a:active { opacity: 0.6; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 22px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* ---------- 页面头部（内页通用） ---------- */
.page-head { padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 96px)); padding-bottom: clamp(36px, 5vw, 64px); }
.page-head .cn {
  font-family: var(--serif); font-size: clamp(40px, 7vw, 76px);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.02em;
}
.page-head .en {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.page-head .en::before { content: ""; width: 40px; height: 1px; background: var(--accent); }
.page-head .desc { margin-top: 22px; color: var(--ink-dim); max-width: 600px; font-size: clamp(15px, 2vw, 17px); }

/* ---------- 滚动显现（轻幅、临界阻尼） ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .07s; }
.reveal[data-delay="2"] { transition-delay: .14s; }
.reveal[data-delay="3"] { transition-delay: .21s; }
.reveal[data-delay="4"] { transition-delay: .28s; }

/* ---------- 入场 ---------- */
.page-enter { animation: page-in var(--t-slow) var(--ease) both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   可视化编辑模式
   ============================================================ */
/* 浮动工具条（材质层，底部居中胶囊） */
.ed-toolbar {
  position: fixed; bottom: 24px; left: 50%;
  transform: translate(-50%, 90px);
  z-index: 500;
  display: flex; align-items: center; gap: 6px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(23, 21, 16, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  transition: transform var(--t-slow) var(--ease);
}
.ed-toolbar.show { transform: translate(-50%, 0); }
.ed-btn {
  padding: 9px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-dim);
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap; user-select: none;
}
.ed-btn:hover { color: var(--ink); background: rgba(237,232,222,0.07); }
.ed-btn:active { transform: scale(0.95); }
.ed-btn.primary { background: var(--accent); color: #17130a; font-weight: 600; }
.ed-btn.primary:hover { background: #e0b056; }
.ed-btn.danger:hover { color: var(--danger); }
.ed-status {
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
  padding: 0 10px; letter-spacing: 0.08em; white-space: nowrap;
}

/* 编辑态下的可编辑文字 */
body.editing [data-edit],
body.editing [data-field] {
  cursor: text;
  outline: 1px dashed transparent;
  outline-offset: 4px;
  border-radius: 4px;
  transition: outline-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
body.editing [data-edit]:hover,
body.editing [data-field]:hover {
  outline-color: rgba(211,162,74,0.5);
  background: rgba(211,162,74,0.05);
}
body.editing [data-edit]:focus,
body.editing [data-field]:focus {
  outline: 1.5px solid var(--accent);
  outline-offset: 4px;
  background: rgba(211,162,74,0.07);
}
/* 编辑态禁止链接跳转 */
body.editing a { pointer-events: none; }
body.editing .ed-toolbar a,
body.editing .ed-ui,
body.editing .ed-ui * { pointer-events: auto; }

/* 可排序条目 */
body.editing [data-item] {
  position: relative;
  transition: box-shadow var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
body.editing [data-item]::before {
  content: "⠿";
  position: absolute; top: 10px; right: 12px;
  color: var(--ink-faint); font-size: 15px;
  opacity: 0; transition: opacity var(--t-fast) var(--ease);
  cursor: grab; pointer-events: none;
}
body.editing [data-item]:hover::before { opacity: 0.8; }
[data-item].ed-dragging { opacity: 0.35; }
[data-item].ed-drop-target { box-shadow: 0 -3px 0 0 var(--accent); }

/* 条目操作钮（删除） */
.ed-del {
  position: absolute; top: 10px; right: 34px; z-index: 5;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(217,123,108,0.14); color: var(--danger);
  font-size: 15px; line-height: 1;
  display: none; align-items: center; justify-content: center;
  transition: background var(--t-fast), transform 0.1s ease-out;
}
.ed-del:hover { background: rgba(217,123,108,0.3); }
.ed-del:active { transform: scale(0.9); }
body.editing .ed-del { display: flex; }

/* 列表末尾「添加」 */
.ed-add {
  display: none;
  width: 100%; margin-top: 14px;
  padding: 16px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  color: var(--ink-faint); font-size: 14px;
  text-align: center;
  transition: all var(--t-fast) var(--ease);
}
.ed-add:hover { color: var(--accent); border-color: rgba(211,162,74,0.45); }
.ed-add:active { transform: scale(0.99); }
body.editing .ed-add { display: block; }

/* 保存状态 toast */
.ed-toast {
  position: fixed; bottom: 92px; left: 50%;
  transform: translate(-50%, 20px);
  background: rgba(23,21,16,0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 10px 22px; border-radius: 999px;
  font-size: 13px;
  opacity: 0; transition: all var(--t-med) var(--ease);
  z-index: 501; pointer-events: none;
}
.ed-toast.show { opacity: 1; transform: translate(-50%, 0); }
.ed-toast.err { color: var(--danger); border-color: rgba(217,123,108,0.4); }

/* ============================================================
   登录页（admin.html）
   ============================================================ */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-card {
  width: min(400px, 100%);
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px 38px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  animation: fade-up var(--t-slow) var(--ease);
}
.login-card h1 { font-family: var(--serif); font-size: 26px; letter-spacing: -0.01em; margin-bottom: 8px; }
.login-card .sub { color: var(--ink-dim); font-size: 14px; margin-bottom: 30px; }
.login-card .err { color: var(--danger); font-size: 13px; margin-top: 14px; min-height: 20px; }
.login-card .tip { color: var(--ink-faint); font-size: 12px; margin-top: 18px; line-height: 1.7; }
.adm-field { margin-bottom: 16px; }
.adm-field > label {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 8px;
}
.adm-input {
  width: 100%; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-size: 15px; font-family: var(--sans);
  padding: 13px 15px; outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.adm-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(211,162,74,0.15); }
.login-btn {
  width: 100%; justify-content: center;
  padding: 14px; border-radius: 12px;
  background: var(--accent); color: #17130a;
  font-size: 15px; font-weight: 600;
  transition: background var(--t-fast) var(--ease), transform 0.1s ease-out;
}
.login-btn:hover { background: #e0b056; }
.login-btn:active { transform: scale(0.98); }
.login-btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- 响应式 ---------- */

/* 平板 & 小桌面 */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .hero-title { font-size: clamp(36px, 8vw, 64px); }
}

/* 手机（含 iPhone） */
@media (max-width: 760px) {
  :root {
    --nav-h: 56px;
    --wrap: calc(100% - 32px);
  }

  /* 导航：安全区域 + 汉堡菜单 */
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-logo { font-size: 17px; }

  /* 移动端全屏菜单：从顶部开始（含安全区域） */
  .mobile-menu {
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  /* Hero：紧凑但不失冲击力 */
  .hero {
    min-height: 100svh;
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero-eyebrow {
    font-size: 10px;
    margin-bottom: 20px;
  }
  .hero-title {
    font-size: clamp(32px, 9vw, 56px);
    line-height: 1.12;
  }
  .hero-sub {
    font-size: clamp(14px, 3.8vw, 17px);
    margin-top: 20px;
    max-width: 100%;
  }
  .hero-actions {
    margin-top: 28px;
    gap: 12px;
  }
  .hero-actions .btn {
    padding: 14px 22px;
    font-size: 14px;
  }
  .hero-ornament { display: none; }
  .scroll-hint { display: none; }

  /* 内容区段 */
  .section { padding: clamp(48px, 10vw, 80px) 0; }
  .sec-head { margin-bottom: 32px; }
  .sec-head .sec-label { font-size: 11px; }
  .sec-head .sec-title { font-size: clamp(22px, 6vw, 32px); }

  /* 作品卡片 */
  .works-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .work-card {
    min-height: auto;
    padding: 24px 20px;
  }

  /* 列表行 */
  .list-row { grid-template-columns: 1fr; gap: 6px; }
  .list-row .go { display: none; }

  /* 分享卡片 */
  .share-item { grid-template-columns: 48px 1fr; gap: 14px; }
  .share-item .stars { display: none; }
  .share-cover { width: 48px; height: 48px; font-size: 20px; }

  /* 导航头部 */
  .page-head { padding-top: 100px; padding-bottom: 40px; }
  .page-head h1 { font-size: clamp(28px, 8vw, 42px); }

  /* 区块标题行 */
  .sec-head.row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .sec-head .more { margin-left: 0; align-self: flex-start; }

  /* 关于页 */
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-hero { padding-top: 100px; }

  /* 工具页 */
  .tools-grid { grid-template-columns: 1fr; }

  /* 导航链接 */
  .links-groups { grid-template-columns: 1fr; gap: 24px; }

  /* 页脚 */
  .footer { padding-top: 48px; padding-bottom: 0; }
  .footer-top { flex-direction: column; gap: 32px; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-bottom {
    padding-top: 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
    flex-direction: column;
    gap: 6px;
    text-align: center;
    font-size: 12px;
  }

  /* 编辑工具条 */
  .ed-toolbar { bottom: 14px; max-width: calc(100% - 24px); overflow-x: auto; }
  body.editing [data-item]::before { opacity: 0.6; }
}

/* iPhone SE / 小屏手机 (≤375px) */
@media (max-width: 400px) {
  :root { --wrap: calc(100% - 28px); }
  .hero-title { font-size: clamp(28px, 10vw, 44px); }
  .hero-sub { font-size: 14px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .work-card { padding: 20px 16px; }
  .page-head h1 { font-size: 26px; }
  .sec-head .sec-title { font-size: 22px; }
}

/* iPhone 横屏 / 大屏手机 (430px–500px) */
@media (min-width: 401px) and (max-width: 500px) {
  .works-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { padding: 14px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav.is-scrolled, .mobile-menu, .ed-toolbar, .spot { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .spot { background: #171510; }
}
