:root {
  --deep-blue: #0a1f2e;
  --navy: #0f2d3d;
  --slate: #1a3c5c;
  --steel: #2c5a7a;
  --gold: #d4a853;
  --gold-light: #e8c878;
  --gold-dark: #b8923e;
  --cream: #faf8f3;
  --ivory: #f5f0e8;
  --text-dark: #1e2a35;
  --text-body: #3d4f5f;
  --text-light: #6b7d8d;
  --ink: #1e2a35;
  --muted: #6b7d8d;
  --deep: #0a1f2e;
  --deep2: #1a3c5c;
  --line: rgba(26, 60, 92, 0.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(165deg, #e8eef4 0%, var(--cream) 45%, #eef2f6 100%);
  color: var(--text-body);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
  background: rgba(10, 31, 46, 0.94);
  border-bottom: 1px solid rgba(212, 168, 83, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.top-bar a {
  font-size: 13px; font-weight: 600; text-decoration: none;
  color: rgba(255,255,255,0.82); line-height: 1.3;
}
.top-bar a:hover { color: var(--gold-light); }
.top-bar .home { color: var(--gold); }

.deck {
  height: 100dvh; width: 100vw;
  display: flex; align-items: flex-start; justify-content: center;
  /* 底部留白略收，把约 1.2cm 空间给幻灯片方框 */
  padding: calc(40px + env(safe-area-inset-top)) 8px calc(36px + env(safe-area-inset-bottom));
}
.slide-shell {
  position: relative;
  width: min(420px, 96vw);
  /* 原 2:3 高度基础上再拉长约 1.2cm，贴近底部页码 */
  aspect-ratio: auto;
  height: min(
    calc(min(420px, 96vw) * 3 / 2 + 1.2cm),
    calc(100dvh - 40px - env(safe-area-inset-top) - 36px - env(safe-area-inset-bottom))
  );
  max-height: calc(100dvh - 40px - env(safe-area-inset-top) - 36px - env(safe-area-inset-bottom));
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(10, 31, 46, 0.18);
  border: 1px solid rgba(255,255,255,0.7);
  background: #fff;
}

.slide {
  display: none;
  flex-direction: column;
  position: absolute; inset: 0;
  background: #fff;
}
.slide.active { display: flex; }

.head {
  background: linear-gradient(135deg, var(--deep-blue) 0%, var(--navy) 42%, var(--slate) 100%);
  color: #fff;
  padding: 12px 16px 12px;
  flex-shrink: 0;
  position: relative;
}
.head::after {
  content: "";
  position: absolute; left: 16px; bottom: 0;
  width: 40px; height: 3px; background: var(--gold);
}
.eyebrow {
  font-size: 10px; letter-spacing: 0.12em; opacity: 0.85;
  margin-bottom: 5px; font-weight: 500; color: var(--gold-light);
}
.head h1 {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px; line-height: 1.35; font-weight: 700; letter-spacing: 0.5px;
}
.head .sub {
  margin-top: 5px; font-size: 11.5px; line-height: 1.5; opacity: 0.9;
}

.body {
  flex: 1;
  padding: 10px 12px 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cover-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--deep-blue), var(--slate));
}
.cover-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.cover-img .ph {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px; text-align: center;
  color: rgba(255,255,255,0.88); font-size: 12px; padding: 14px; line-height: 1.55;
  background: linear-gradient(165deg, rgba(10,31,46,0.92), rgba(26,60,92,0.88));
  z-index: 1;
}
.cover-img .ph .fn-title {
  font-size: 11px; letter-spacing: 0.12em; color: var(--gold-light); font-weight: 600;
}
.cover-img .ph .fn-name {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 18px; font-weight: 800; color: #fff;
  letter-spacing: 0.04em;
}
.cover-img .ph code {
  font-size: 11px; background: rgba(212,168,83,0.18);
  border: 1px solid rgba(212,168,83,0.35);
  padding: 4px 10px; border-radius: 6px; color: var(--gold-light);
  font-weight: 700;
}
.cover-img .cover-fn {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(10, 31, 46, 0.82);
  border: 1px solid rgba(212, 168, 83, 0.35);
  color: #fff;
  font-size: 11px; line-height: 1.35;
  pointer-events: none;
}
.cover-img .cover-fn b {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 800;
}
.cover-img .cover-fn span {
  color: rgba(255,255,255,0.72);
  font-size: 10px;
}

.panel {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-body);
}
.panel h3 {
  font-size: 13px; color: var(--text-dark); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px; font-weight: 700;
}
.panel h3 .n {
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--deep-blue); font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.panel ul { margin: 0; padding-left: 16px; }
.panel li { margin-bottom: 4px; }
.panel li:last-child { margin-bottom: 0; }
.panel strong { color: var(--slate); font-weight: 700; }

.quote {
  border-left: 3px solid var(--gold);
  padding: 8px 10px;
  margin: 6px 0 8px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-body);
  background: rgba(212, 168, 83, 0.08);
  border-radius: 0 10px 10px 0;
}

.panel.compact { padding: 8px 10px; margin-bottom: 6px; font-size: 12px; line-height: 1.55; }
.panel.compact h3 { font-size: 12.5px; margin-bottom: 4px; }
.firm {
  font-size: 11.5px; line-height: 1.5;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
}
.firm:last-child { border-bottom: none; }
.firm b { color: var(--deep-blue); }
.firm .meta { color: var(--text-light); font-size: 11px; }
.skill-block {
  margin-top: 4px; font-size: 11.5px; line-height: 1.55;
}
.skill-block .lab {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: var(--deep-blue); background: rgba(212,168,83,0.18);
  padding: 1px 6px; border-radius: 4px; margin-bottom: 3px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  font-size: 11px; padding: 4px 8px; border-radius: 999px;
  background: rgba(26, 60, 92, 0.08); color: var(--slate); font-weight: 600;
}
a.tag {
  text-decoration: none;
  color: var(--deep-blue);
  background: rgba(212, 168, 83, 0.2);
  border: 1px solid rgba(212, 168, 83, 0.45);
}

.nav {
  position: fixed;
  bottom: max(6px, env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  z-index: 30;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(26, 60, 92, 0.12);
  border-radius: 999px;
  padding: 4px 8px;
  box-shadow: 0 4px 16px rgba(10, 31, 46, 0.12);
}
.nav button {
  border: none; background: var(--deep-blue); color: #fff;
  border-radius: 50%; width: 32px; height: 32px; padding: 0;
  font-size: 20px; line-height: 1; font-weight: 600;
  font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.nav button:disabled { opacity: 0.35; }
.dots { display: flex; gap: 4px; align-items: center; max-width: 120px; overflow: hidden; }
.dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #c5d0da; cursor: pointer; flex-shrink: 0;
}
.dot.on { width: 12px; border-radius: 999px; background: var(--gold); }
.page-label {
  font-size: 11px; color: var(--text-light); min-width: 36px; text-align: center;
}

.lock-overlay {
  display: none;
  position: absolute; inset: 0; z-index: 20;
  background: rgba(10, 31, 46, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 16px;
}
.lock-overlay.show { display: flex; }
.lock-card {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px 16px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  border: 1px solid rgba(212, 168, 83, 0.25);
}
.lock-card .ge {
  font-size: 10px; letter-spacing: 0.14em; color: var(--gold-dark);
  font-weight: 700; margin-bottom: 8px;
}
.lock-card h2 {
  font-family: "Noto Serif SC", serif;
  font-size: 18px; color: var(--deep-blue); margin-bottom: 8px;
}
.lock-card p {
  font-size: 12.5px; color: var(--text-body); line-height: 1.65; margin-bottom: 14px; text-align: left;
}
.lock-card input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; font-size: 15px; outline: none; margin-bottom: 10px;
  font-family: inherit;
}
.lock-card input:focus { border-color: var(--gold); }
.btn-row { display: flex; flex-direction: column; gap: 8px; }
.lock-card button {
  width: 100%; border: none; border-radius: 10px; padding: 11px 12px;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.btn-enter { background: var(--deep-blue); color: #fff; }
.btn-wechat {
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff;
}
.lock-err {
  display: none; margin-top: 10px; font-size: 12px; color: #c0392b;
}
.lock-err.show { display: block; }

.qr-modal {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.72);
  align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}
.qr-modal.show { display: flex; }
.qr-box {
  background: #fff; border-radius: 18px; padding: 22px 18px 16px;
  text-align: center; width: min(320px, 92vw);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.qr-box p {
  font-size: 13px; color: var(--text-body); line-height: 1.6; margin-bottom: 12px;
}
.qr-box strong { color: var(--deep-blue); }
.qr-box img {
  width: min(220px, 70vw); height: auto; border-radius: 12px;
  border: 1px solid var(--line); margin: 0 auto 12px; display: block;
}
.qr-box button {
  border: none; background: var(--deep-blue); color: #fff;
  border-radius: 10px; padding: 10px 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}

@media print {
  .top-bar, .nav, .lock-overlay, .qr-modal { display: none !important; }
  body { overflow: visible; background: #fff; }
  .deck { display: block; height: auto; padding: 0; }
  .slide-shell { width: 140mm; height: auto; aspect-ratio: auto; max-height: none; box-shadow: none; }
  .slide { position: relative; display: flex !important; page-break-after: always; height: auto; }
}


/* Cover: logo top-right (same as 01/02), site bottom */
.slide[data-i="0"] {
  position: relative;
}
.slide[data-i="0"] .body {
  display: flex;
  flex-direction: column;
  /* cover-logo 绝对定位会叠到标题栏；不可被 body 滚动区裁切成「半个 logo」 */
  overflow: visible;
}
.slide[data-i="0"] .cover-logo {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
  padding: 0;
  width: auto;
  max-width: 160px;
  pointer-events: none;
}
/* 标题栏已有 head-logo 时，隐藏正文里那枚，避免叠两层/裁切 */
.slide[data-i="0"] .head.has-logo ~ .body .cover-logo {
  display: none !important;
}
.slide[data-i="0"] .cover-logo img {
  height: 52px !important;
  width: auto !important;
  max-width: 160px !important;
  object-fit: contain !important;
  display: block;
  border-radius: 0 !important;
  filter: drop-shadow(0 1px 2px rgba(255,255,255,0.35));
}
.head.has-logo {
  position: relative;
  padding-right: 108px;
  min-height: 72px;
  overflow: visible;
}
.head.has-logo .head-logo {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  height: 44px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  object-position: center right;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}
.slide-end-foot {
  margin-top: 16px;
  padding-top: 12px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.slide-end-foot a {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--slate);
  text-decoration: none;
  line-height: 1.5;
  margin-bottom: 6px;
}
.slide-end-foot a:hover { color: var(--gold-dark); }
.slide-end-foot .tagline {
  display: block;
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.55;
  letter-spacing: 0.02em;
}
.cover-site {
  margin-top: auto;
  flex-shrink: 0;
  display: block;
  text-align: center;
  padding: 10px 8px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--slate);
  font-family: "Noto Sans SC", sans-serif;
  text-decoration: none;
}
.cover-site:hover { color: var(--gold-dark); }

