:root {
  --bg: #050505;
  --bg-2: #0b0b0b;
  --panel: rgba(255, 255, 255, 0.055);
  --text: #f6f1e8;
  --muted: #c9c1b4;
  --subtle: #8f887e;
  --gold: #c9a66b;
  --gold-light: #e0c08a;
  --line: rgba(201, 166, 107, 0.22);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 76% 8%, rgba(201, 166, 107, 0.14), transparent 28%),
    linear-gradient(180deg, #050505 0%, #0b0b0b 100%);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.ppt-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.ppt-header,
.ppt-main,
.ppt-footer {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.ppt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 18px;
}

.back-link {
  color: var(--gold-light);
  font-weight: 800;
}

.ppt-header-note {
  color: var(--subtle);
  font-size: 13px;
}

.ppt-hero {
  padding: 34px 0 24px;
  border-top: 1px solid rgba(201, 166, 107, 0.16);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.ppt-hero h1 {
  max-width: 920px;
  margin: 0 0 12px;
  color: var(--text);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.08;
}

.ppt-company {
  margin: 0 0 12px;
  color: var(--gold-light);
  font-weight: 800;
}

.ppt-description {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.ppt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.ppt-tags span {
  padding: 7px 11px;
  color: var(--text-muted, #c9c1b4);
  border: 1px solid rgba(201, 166, 107, 0.22);
  border-radius: 999px;
  background: rgba(201, 166, 107, 0.065);
  font-size: 13px;
}

.viewer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(201, 166, 107, 0.2);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.022)),
    rgba(0,0,0,0.26);
  box-shadow: 0 28px 90px rgba(0,0,0,0.52);
}

.viewer-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

.slide-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(201, 166, 107, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(rgba(201, 166, 107, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 166, 107, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 24% 18%, rgba(224, 192, 138, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(201, 166, 107, 0.12), rgba(20,20,20,0.92));
  background-size: 18px 18px, 18px 18px, auto, auto;
}

.slide-frame img,
.slide-frame video,
.ppt-slide-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #050505;
}

.ppt-slide-video {
  pointer-events: none;
}

.slide-frame.is-missing img,
.slide-frame.is-missing video {
  display: none;
}

.slide-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--text);
}

.slide-placeholder strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(22px, 3vw, 38px);
}

.viewer-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #0a0a0a;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 16px 46px rgba(0,0,0,0.35);
  cursor: pointer;
  transform: translateY(-50%);
}
.viewer-arrow.prev { left: 16px; }
.viewer-arrow.next { right: 16px; }

.viewer-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}

.slide-count {
  color: var(--gold-light);
  font-weight: 900;
}

.slide-caption {
  color: var(--muted);
  line-height: 1.7;
}

.thumb-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scroll-snap-type: x mandatory;
}

.thumb-button {
  position: relative;
  flex: 0 0 132px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(201, 166, 107, 0.18);
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  cursor: pointer;
  scroll-snap-align: start;
}

.thumb-button::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.thumb-button img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-button.is-missing img {
  display: none;
}

.thumb-button.is-active {
  border-color: rgba(224,192,138,0.78);
  box-shadow: 0 0 0 2px rgba(201,166,107,0.16);
}

.ppt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 26px 0 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 900;
}

.btn-primary {
  color: #080808;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.btn-secondary {
  color: var(--text);
  border: 1px solid rgba(201,166,107,0.42);
  background: rgba(255,255,255,0.035);
}

.ppt-actions .btn[href*="return=more"] {
  color: #080808;
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 16px 38px rgba(201, 166, 107, 0.22);
}

.ppt-actions .btn[href="#contact"],
.ppt-actions .btn[href$="#contact"] {
  color: var(--gold-light);
  border: 1px solid rgba(201, 166, 107, 0.48);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.ppt-actions .btn[href*="return=more"]:hover,
.ppt-actions .btn[href*="return=more"]:focus-visible {
  background: linear-gradient(135deg, #ecd09b, var(--gold));
  box-shadow: 0 18px 44px rgba(201, 166, 107, 0.3);
}

.ppt-actions .btn[href="#contact"]:hover,
.ppt-actions .btn[href="#contact"]:focus-visible,
.ppt-actions .btn[href$="#contact"]:hover,
.ppt-actions .btn[href$="#contact"]:focus-visible {
  color: var(--text);
  border-color: rgba(224, 192, 138, 0.72);
  background: rgba(201, 166, 107, 0.08);
}

.ppt-footer {
  padding: 12px 0 32px;
  color: var(--subtle);
  text-align: center;
  font-size: 13px;
}

/* Compact one-screen PPT excerpt layout */
.ppt-main-compact {
  min-height: calc(100vh - 84px);
  display: flex;
  align-items: center;
  padding: clamp(24px, 3vw, 42px) 0;
}

.ppt-detail-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(260px, 0.32fr) minmax(0, 0.68fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.ppt-info-panel {
  align-self: center;
}

.ppt-info-panel h1 {
  max-width: 520px;
  margin: 0 0 12px;
  color: var(--text);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(36px, 4.8vw, 68px);
  line-height: 1.06;
}

.ppt-info-panel .ppt-description {
  max-width: 460px;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.72;
}

.ppt-role {
  margin-top: 18px;
  padding: 14px 15px;
  border: 1px solid rgba(201, 166, 107, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.ppt-role span {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.ppt-role p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 700;
}

.ppt-info-panel .ppt-actions {
  justify-content: flex-start;
  padding: 0;
  margin-top: 22px;
}

.ppt-case-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(201, 166, 107, 0.22);
}

.ppt-case-nav::before {
  content: "案例切换";
  color: rgba(224, 192, 138, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ppt-case-nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(201, 166, 107, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
  color: rgba(246, 241, 232, 0.86);
  text-decoration: none;
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease,
    color 0.28s ease;
}

.ppt-case-nav-link:hover,
.ppt-case-nav-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(224, 192, 138, 0.54);
  background: rgba(224, 192, 138, 0.07);
  color: var(--text);
  outline: none;
}

.ppt-case-nav-link span {
  color: rgba(224, 192, 138, 0.86);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.ppt-case-nav-link strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

.ppt-main-compact .viewer-shell {
  width: 100%;
  gap: 12px;
  padding: 16px;
}

.ppt-main-compact .slide-frame {
  max-height: 60vh;
}

.ppt-main-compact .slide-frame img,
.ppt-main-compact .slide-frame video {
  object-fit: contain;
  background: #050505;
}

.ppt-main-compact .viewer-meta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ppt-main-compact .slide-caption {
  margin: 0;
}

.ppt-main-compact .thumb-strip {
  display: grid;
  grid-template-columns: repeat(var(--ppt-thumb-count, 7), minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  padding: 0;
  scroll-snap-type: none;
}

.thumb-button span {
  position: relative;
  z-index: 2;
}

.ppt-main-compact .thumb-button {
  min-height: 46px;
  aspect-ratio: auto;
  flex: initial;
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ppt-main-compact .thumb-button::after {
  content: "";
  display: none;
}

@media (max-width: 720px) {
  .ppt-header,
  .ppt-main,
  .ppt-footer { width: min(92vw, 680px); }
  .ppt-header { align-items: flex-start; flex-direction: column; }
  .viewer-shell { padding: 14px; border-radius: 16px; }
  .viewer-arrow { width: 40px; height: 40px; }
  .viewer-arrow.prev { left: 10px; }
  .viewer-arrow.next { right: 10px; }
  .viewer-meta { grid-template-columns: 1fr; gap: 6px; }
  .thumb-button { flex-basis: 104px; }
  .ppt-case-nav {
    margin-top: 18px;
    padding-top: 14px;
  }
  .ppt-case-nav-link {
    align-items: flex-start;
    flex-direction: column;
    min-height: 64px;
  }
  .ppt-case-nav-link strong {
    text-align: left;
  }
}

@media (max-width: 900px) {
  .ppt-main-compact {
    align-items: flex-start;
    padding: 24px 0 40px;
  }

  .ppt-detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .ppt-main-compact .slide-frame {
    max-height: none;
  }

  .ppt-main-compact .thumb-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ppt-info-panel h1,
  .ppt-info-panel .ppt-description {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Stage 4H: keep the PPT viewer readable and touch-safe on phones/tablets. */
@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .ppt-page,
  .ppt-header,
  .ppt-main,
  .ppt-footer,
  .ppt-detail-layout,
  .viewer-shell,
  .ppt-info-panel {
    width: min(100% - 32px, 760px);
    max-width: 100%;
  }

  .ppt-main-compact {
    padding-top: 22px;
  }

  .ppt-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .ppt-info-panel {
    order: 1;
  }

  .viewer-shell {
    order: 2;
  }

  .ppt-case-nav {
    margin: 16px 0 18px;
  }

  .ppt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .slide-frame {
    width: 100%;
    max-height: none;
    aspect-ratio: 16 / 9;
  }

  .slide-frame img,
  .slide-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .viewer-arrow {
    width: 42px;
    height: 42px;
    z-index: 5;
    opacity: 0.82;
  }

  .thumb-strip,
  .ppt-main-compact .thumb-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .ppt-page,
  .ppt-header,
  .ppt-main,
  .ppt-footer,
  .ppt-detail-layout,
  .viewer-shell,
  .ppt-info-panel {
    width: min(100% - 24px, 520px);
  }

  .ppt-info-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .ppt-info-panel h1 {
    font-size: clamp(28px, 9vw, 42px);
    line-height: 1.12;
  }

  .ppt-case-nav {
    grid-template-columns: 1fr;
  }

  .ppt-actions {
    grid-template-columns: 1fr;
  }

  .viewer-shell {
    padding: 12px;
    border-radius: 16px;
  }

  .viewer-stage {
    align-items: center;
    padding-bottom: 54px;
  }

  .viewer-arrow {
    bottom: 10px;
    top: auto;
    width: 36px;
    height: 36px;
    transform: none;
    opacity: 0.78;
  }

  .viewer-arrow.prev {
    left: calc(50% - 46px);
  }

  .viewer-arrow.next {
    right: calc(50% - 46px);
  }

  .thumb-strip,
  .ppt-main-compact .thumb-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .thumb-button,
  .ppt-main-compact .thumb-button {
    min-height: 44px;
    font-size: 12px;
  }
}
