/* ============================================================
   阳光新材 · 在线 PPT 演示模式
   与网页版共用同一套色板与印刷级排版语言：
   细规则线、编号体系、衬线标题、零渐变 / 零阴影 / 零 emoji。
   ============================================================ */

:root {
  --ink:      #15181C;
  --ink-2:    #4A5158;
  --ink-3:    #878D94;
  --rule:     #E5E5E1;
  --rule-2:   #D2D2CC;
  --paper:    #FFFFFF;
  --paper-2:  #F7F7F4;
  --brand:    #1A4C7C;
  --brand-dk: #123A5E;
  --accent:   #0E7A52;
  --stage:    #111417;
  --stage-2:  #1B2026;
  --stage-rule: #2E353C;

  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--stage);
  color: #EDEDEA;
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.ppt-app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------------- top bar ---------------- */
.ppt-bar {
  flex: 0 0 auto;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 20px;
  background: var(--stage-2);
  border-bottom: 1px solid var(--stage-rule);
}
.ppt-bar-left, .ppt-bar-right {
  display: flex; align-items: center; flex-wrap: nowrap;
  min-width: 0; gap: 14px;
}
.ppt-brand {
  font-family: var(--serif);
  font-size: 16px; font-weight: 600; letter-spacing: .06em;
  color: #F2F2EF; white-space: nowrap;
}
.ppt-sep { color: #5B646D; }
.ppt-doc {
  font-size: 13px; color: #A8B0B8; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 34vw;
}
.ppt-mode {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: #0E7A52; border: 1px solid #245A45; padding: 3px 8px;
  border-radius: 2px; white-space: nowrap;
}
.ppt-bar-right { gap: 8px; }
.ppt-bar button, .ppt-bar a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #C9CFD5;
  background: transparent;
  border: 1px solid var(--stage-rule);
  border-radius: 2px;
  white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.ppt-bar button:hover, .ppt-bar a:hover { border-color: #7C878F; color: #fff; }
.ppt-bar button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ppt-bar a:last-child { border-color: transparent; color: #8E99A2; }

/* ---------------- stage ---------------- */
.ppt-stage {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 84px 34px;
  background: var(--stage);
  overflow: hidden;
}
.ppt-slide {
  position: relative;
  margin: 0;
  width: min(100%, calc((100dvh - 200px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: var(--paper);
  border: 1px solid var(--stage-rule);
}
.ppt-slide img {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fff;
  user-select: none;
  -webkit-user-drag: none;
}
.ppt-slide figcaption {
  position: absolute; bottom: -25px; left: 0;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .08em; color: #7A848C;
}

.ppt-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5;
  width: 44px; height: 76px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; line-height: 1; font-family: var(--sans);
  color: #B9C1C8;
  background: transparent;
  border: 1px solid var(--stage-rule);
  border-radius: 2px;
  transition: border-color .15s, color .15s, background .15s;
}
.ppt-nav:hover { color: #fff; border-color: #7C878F; background: #1B2026; }
.ppt-nav:disabled { opacity: .25; cursor: default; }
.ppt-prev { left: 18px; }
.ppt-next { right: 18px; }

/* ---------------- side panels ---------------- */
.ppt-grid, .ppt-text {
  position: absolute; top: 0; right: 0; bottom: 0;
  z-index: 20;
  width: min(360px, 86vw);
  background: var(--paper-2);
  color: var(--ink);
  border-left: 1px solid var(--rule-2);
  display: flex; flex-direction: column;
}
.ppt-panel-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand);
}
.ppt-panel-head button {
  border: 0; background: transparent; font-size: 22px; line-height: 1;
  color: var(--ink-3); padding: 0 2px;
}
.ppt-panel-head button:hover { color: var(--ink); }
.ppt-grid-list {
  flex: 1 1 auto; overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 16px;
  align-content: start;
}
.ppt-grid-item {
  display: block; padding: 0; border: 1px solid var(--rule-2);
  background: #fff; border-radius: 2px; text-align: left;
  overflow: hidden;
}
.ppt-grid-item:hover { border-color: var(--brand); }
.ppt-grid-item.cur { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ppt-grid-item img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ppt-grid-item span {
  display: block; padding: 5px 7px 7px;
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ppt-text pre {
  flex: 1 1 auto; overflow: auto; margin: 0; padding: 18px;
  font-size: 12.5px; line-height: 1.85; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
  font-family: var(--sans);
}

/* ---------------- footer ---------------- */
.ppt-foot {
  flex: 0 0 auto;
  background: var(--stage-2);
  border-top: 1px solid var(--stage-rule);
}
.ppt-progress { height: 2px; background: #2E353C; }
.ppt-progress span {
  display: block; height: 100%; width: 3.125%;
  background: var(--accent); transition: width .18s ease;
}
.ppt-foot-row {
  display: flex; align-items: center; gap: 22px;
  min-height: 58px; padding: 0 20px;
}
.ppt-title {
  font-family: var(--serif); font-size: 15px; color: #EDEDEA;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1 1 auto; min-width: 0;
}
.ppt-counter {
  display: flex; align-items: baseline; gap: 7px;
  font-family: var(--mono); font-size: 12px; color: #9AA3AB;
  white-space: nowrap;
}
.ppt-counter input {
  width: 54px; padding: 5px 7px; text-align: center;
  font-family: var(--mono); font-size: 13px;
  color: #EDEDEA; background: #111417;
  border: 1px solid var(--stage-rule); border-radius: 2px;
}
.ppt-counter input::-webkit-outer-spin-button,
.ppt-counter input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ppt-hint {
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  color: #6C767F; white-space: nowrap;
}

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .ppt-doc { display: none; }
  .ppt-hint { display: none; }
  .ppt-bar { padding: 0 12px; gap: 8px; }
  .ppt-bar-right { gap: 5px; overflow-x: auto; }
  .ppt-bar button, .ppt-bar a { padding: 5px 8px; font-size: 11px; }
  .ppt-stage { padding: 14px 52px 28px; }
  .ppt-slide { width: min(100%, calc((100dvh - 165px) * 16 / 9)); }
  .ppt-nav { width: 34px; height: 58px; font-size: 26px; }
  .ppt-prev { left: 8px; }
  .ppt-next { right: 8px; }
  .ppt-foot-row { padding: 0 12px; min-height: 52px; gap: 12px; }
}
@media (max-width: 560px) {
  .ppt-mode, #btnPlay { display: none; }
  .ppt-stage { padding: 10px 42px 26px; }
  .ppt-slide { width: min(100%, calc((100dvh - 150px) * 16 / 9)); }
  .ppt-nav { width: 30px; height: 50px; font-size: 22px; }
  .ppt-slide figcaption { bottom: -20px; font-size: 10px; }
}
