/* Inked lettering. Sits on top of comic.css and only touches text on the art. */
@font-face {
  font-family: Letterer;
  src: url('assets/fonts/PatrickHand-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: Brush;
  src: url('assets/fonts/Knewave-Regular.ttf') format('truetype');
  font-display: swap;
}
.comic-panel.is-inked {
  container-type: inline-size;
}
.ink-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.ink-balloon,
.ink-caption {
  position: absolute;
  translate: -50% -50%;
  width: max-content;
  isolation: isolate;
  font-family: Letterer, var(--letter);
  color: #10131a;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  letter-spacing: 0.015em;
  pointer-events: auto;
  text-rendering: geometricPrecision;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.ink-balloon {
  font-size: calc(var(--page-w) * 0.0305);
  line-height: 1.02;
  padding: 0.62em 0.86em 0.56em;
}
.ink-caption {
  font-size: calc(var(--page-w) * 0.0272);
  line-height: 1.04;
  padding: 0.42em 0.62em 0.36em;
  text-align: left;
}
.ink-caption .location-line {
  display: block;
  font: inherit;
  font-size: 0.86em;
  letter-spacing: 0.04em;
  margin-bottom: 0.2em;
}
.ink-balloon p,
.ink-caption p {
  margin: 0;
}
.ink-speaker {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
svg.ink-shape {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
  overflow: visible;
  z-index: -1;
  stroke: none;
}
.ink-shape path {
  stroke-linejoin: round;
  stroke-linecap: round;
}
.ink-shape .ink-weight {
  fill: #10131a;
  stroke: #10131a;
  stroke-width: calc(var(--page-w) * 0.0042);
  transform: translate(calc(var(--page-w) * 0.0012), calc(var(--page-w) * 0.0018));
}
.ink-shape .ink-fill {
  fill: #fdf8ea;
  stroke: #10131a;
  stroke-width: calc(var(--page-w) * 0.0026);
}
.ink-caption .ink-fill {
  fill: #f3dfa2;
}
.ink-sfx {
  position: absolute;
  translate: -50% -50%;
  display: flex;
  z-index: 2;
  font-family: Brush, var(--display);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.ink-sfx > span {
  display: inline-block;
  color: var(--sfx-fill);
  -webkit-text-stroke: 0.1em #10131a;
  paint-order: stroke fill;
  text-shadow: 0.055em 0.07em 0 var(--sfx-shade);
}

/* Full-panel zoom: same crop and proportions as the printed panel */
.zoom-page-holder.full-panels .comic-panel.is-inked {
  aspect-ratio: var(--panel-ratio);
}
.zoom-page-holder.full-panels .comic-panel.is-inked > img {
  object-fit: cover;
  object-position: var(--panel-pos) !important;
}
.zoom-page-holder.full-panels .is-inked .ink-layer {
  --page-w: calc(100cqi / var(--panel-frac));
}
