#hero-live {
  position: absolute;
  inset: 38px 0 auto;
  height: 468px;
  isolation: isolate;
}
.ink-hero-media {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: clip;
  background: url("../assets/hero/hero-original.jpg") left top / 864px 486px no-repeat;
  mask-image: linear-gradient(#000 408px, transparent 465px);
}
.ink-hero-still, .ink-hero-video {
  position: absolute;
  inset: 0 auto auto 0;
  width: 864px;
  height: 486px;
  opacity: 0;
}
.ink-hero-still {
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
}
.ink-hero-still img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: 0;
}
.ink-hero-video {
  object-fit: contain;
  transition: opacity 160ms ease-out;
}
#hero-live[data-hero-state="playing"] .ink-hero-video,
#hero-live[data-hero-state="fallback"] .ink-hero-still {
  opacity: 1;
}
.ink-hero-title {
  position: absolute;
  inset: 37px auto auto 62px;
  margin: 0;
  pointer-events: none;
}
.ink-hero-title img {
  width: 276px;
  height: auto;
  filter: drop-shadow(0 2px 4px #3f2c1c70);
}
.masthead {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  isolation: isolate;
  display: grid;
  grid-template-columns: 30% minmax(0, 1fr);
  align-items: center;
  height: var(--masthead-height);
  padding-inline: clamp(10px, 2.5vw, 36px);
}
.masthead::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 -10px;
  background: #eee4ce url("../assets/ink/chapter-paper.webp") center 52% / 100% auto no-repeat;
  mask-image: linear-gradient(#000 calc(100% - 10px), transparent);
  pointer-events: none;
}
.masthead-brand {
  justify-self: start;
  border-radius: 4px;
}
.masthead-brand img {
  width: clamp(54px, 8.1vw, 126px);
  height: auto;
  max-height: max(44px, calc(37px * var(--page-scale, 1)));
  object-fit: contain;
}
.masthead-menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 48vw);
  gap: 4px;
}
.masthead-menu a {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 4px;
  border-radius: 4px;
  color: #30271c;
  font: 700 clamp(14px, 1.65vw, 26px)/1.1 var(--serif);
  text-decoration: none;
  white-space: nowrap;
}
.masthead-menu a:is(:hover, :focus-visible) {
  background: #ad82402b;
}
.masthead-menu a[aria-current] {
  color: #fff6df;
  background: #795929;
  box-shadow: inset 0 -2px #b18b4e;
}
.masthead-menu a:active {
  box-shadow: inset 0 0 0 2px #aa8043;
}
.ink-hero-actions {
  position: absolute;
  top: 311px;
  left: 8px;
  display: flex;
  gap: 7px;
}
.ink-hero-entry {
  display: grid;
  place-items: center;
  width: 194px;
  height: 91px;
  border-radius: 16px;
}
.ink-hero-entry img {
  width: 100%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px #21190f85);
  transition: filter 140ms ease, transform 140ms ease;
}
.ink-hero-entry:is(:hover, :focus-visible) img {
  filter: brightness(1.14) drop-shadow(0 0 4px #ffe39b);
}
.ink-hero-entry:is(:active, [data-pressed]) img {
  transform: translateY(2px) scale(.96);
  filter: brightness(.89) drop-shadow(0 1px 2px #21190fa0);
}
.ink-hero-status {
  position: absolute;
  top: 406px;
  left: 25px;
  margin: 0;
  background: #f6ecd9f5;
  color: #3f382b;
  border-radius: 3px;
  padding: 4px 9px;
  font: 12px/1.4 "Microsoft YaHei", sans-serif;
}
.ink-hero-status[hidden] { display: none; }
@media (max-width: 700px) {
  .masthead {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
  }
  .masthead-menu { width: 100%; }
  .masthead-menu a {
    padding-inline: 0;
    font-size: clamp(13px, 3.65vw, 16px);
  }
  .ink-hero-status {
    top: auto;
    bottom: 165px;
    left: 12px;
    padding: 2px 6px;
    font-size: max(12px, calc(12px / var(--page-scale, 1)));
  }
}
@media (prefers-reduced-motion: reduce) {
  .ink-hero-video, .ink-hero-entry img { transition: none; }
}

