@font-face {
  font-family: PortfolioSC;
  src: url("assets/sc-normal.woff?v=motto1") format("woff");
  font-display: swap;
}
* { box-sizing: border-box; }
:root { color-scheme: light; }
body {
  margin: 0;
  background: white;
  color: #000;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, PortfolioSC, sans-serif;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #2264a2; outline-offset: 1px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.board {
  container-type: inline-size; position: relative; width: min(100% - 24px, 960px); margin: auto;
  background-image: url("assets/yim-pattern.svg"); background-size: clamp(180px, 26vw, 250px) auto;
}
.sheet { position: relative; aspect-ratio: 720 / 1040; }
.sheet:last-child { aspect-ratio: 720 / 900; }
.site-footer {
  width: min(100% - 32px, 960px); margin: 0 auto; padding: 18px 0 26px;
  border-top: 1px solid #e8e8e8; color: #686868; text-align: center;
  font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums;
}
.entry { position: absolute; top: var(--y); left: 0; width: 100%; scroll-margin-top: 12px; }
.slide-title, .ending {
  color: #000;
  font-size: 2.96296cqw;
  font-weight: 400;
  line-height: 1.25;
}
.slide-title {
  width: var(--tw); height: var(--th);
  margin: 0 0 0 var(--tx);
  padding: .66667cqw 1.33333cqw;
  white-space: nowrap;
}
.ending { position: absolute; top: var(--y); left: var(--x); margin: 0; padding: .66667cqw 1.33333cqw; }
.ending-motto {
  display: block;
  margin-top: .3em;
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: .15em;
}
.panels { position: relative; width: 100%; margin-top: var(--gap); }
.panel { position: absolute; display: block; scroll-margin-top: 12px; }
.alias { position: absolute; top: 0; left: 0; }
.still { cursor: zoom-in; }
.panel img, .panel video, .movie-start {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
}
.movie-start {
  position: relative; overflow: hidden; cursor: pointer;
  border: none; background: transparent; padding: 0;
}
.play-icon {
  position: absolute; left: 4%; bottom: 5%;
  display: grid; place-items: center;
  width: clamp(18px, 2.8cqw, 28px); aspect-ratio: 1;
  border-radius: 50%; border: 1px solid #ffffffbd;
  background: #151a20bb;
}
.play-icon::after {
  content: ""; margin-left: 9%;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 7px solid white;
}
.movie-start:hover .play-icon, .movie-start:focus-visible .play-icon { background: #131920; }
#viewer { padding: 0; width: min(96vw, 1750px); max-width: 96vw; max-height: 95dvh; border: none; border-radius: 4px; background: white; color: #111; }
#viewer::backdrop { background: #10151aca; }
.viewer-head { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #ddd; }
.viewer-caption { margin-right: auto; line-height: 1.4; font-size: .94rem; }
.viewer-head button, .viewer-head a { cursor: pointer; background: white; border: 1px solid #bbc0c4; border-radius: 4px; padding: 6px 10px; font-size: .86rem; white-space: nowrap; }
.viewer-body { overflow: auto; max-height: calc(94dvh - 60px); }
.viewer-body img, .viewer-body video { display: block; margin: auto; width: auto; max-width: 100%; height: auto; max-height: calc(94dvh - 62px); object-fit: contain; }
.viewer-body video { width: 100%; }
#viewer[data-zoom=true] .viewer-body img { max-width: none; max-height: none; }
body:has(#viewer[open]) { overflow: hidden; }
@media (max-width: 700px) {
  .board { width: calc(100% - 18px); padding: 9px 0 30px; }
  .sheet, .sheet:last-child { aspect-ratio: auto; }
  .entry { position: relative; top: auto; margin: 19px 0 27px; }
  .slide-title { width: min(var(--tw), 100%); min-width: calc(100% - var(--tx)); height: auto; padding-block: 0; font-size: clamp(16px, 2.963cqw, 20px); line-height: 1.45; white-space: normal; }
  .panels { margin-top: 10px; }
  .ending { position: static; margin-left: var(--x); font-size: 16px; }
  .viewer-caption { font-size: .86rem; }
}
@media print {
  @page { margin: 0; size: 7.5in 10.833in; }
  .board { width: 100%; }
  .sheet { break-after: page; }
  .sheet:last-child { break-after: auto; }
  .entry { break-inside: avoid; }
  #viewer, .play-icon, .site-footer { display: none !important; }
}

/* The same plain image link also works in webviews with no video decoder. */
a.movie-start { display: block; text-decoration: none; }
.motion-link { display: none; }
@media (max-width: 700px), (pointer: coarse) {
  .motion-link {
    display: block; position: absolute; top: 0; right: 0; z-index: 1;
    max-width: 44%; padding: 3px 2px; min-height: 24px; white-space: nowrap; background: #fffef9eb; color: #18202b;
    font-size: 12px; line-height: 18px; text-decoration: underline; border-radius: 0 0 0 3px;
  }
}
.clip-dialog:not([open]) { display: none; }
.clip-dialog {
  padding: 0; margin: auto; width: min(96vw, 960px); max-width: 96vw;
  max-height: 94vh; max-height: 94dvh; overflow: auto;
  border: 0; border-radius: 5px; color: #111; background: #fff;
}
.clip-dialog::backdrop { background: #10151acc; }
.clip-dialog.fallback-dialog[open] {
  display: block; position: fixed; z-index: 100; inset: 0;
  height: fit-content; box-shadow: 0 0 0 150vmax #10151acc;
}
.clip-body { background: #121519; }
.clip-body video, .clip-body img {
  display: block; object-fit: contain; width: 100%; height: auto;
  max-height: 65vh; max-height: 65dvh; margin: auto;
}
.clip-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 9px 12px; }
.clip-tools a, .clip-tools button {
  font-size: .9rem; line-height: 1.45; color: #1d3b55;
}
.clip-tools button { background: #fff; border: 1px solid #b7c1c7; border-radius: 4px; padding: 6px 10px; cursor: pointer; }
.clip-status { padding: 0 12px 10px; font-size: .875rem; margin: 0; }
body:has(.clip-dialog[open]) { overflow: hidden; }
@media print { .clip-dialog, .motion-link { display: none !important; } }
