html,
body {
  margin: 0;
  padding: 0;
  font-family: "StackHeadline";
}

:root {
  --book-max: 1080px;
  --aspect-ratio: 1.2315;
  --book-max-height: 85vh;
  --blue: #50baff;
  --page-pad: 1.5rem;
  --book-width: min(var(--book-max), 100%, calc(var(--book-max-height) * var(--aspect-ratio)));
}

body {
  background-color: black;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

canvas {
  display: block;
  position: relative;
}

header {
  padding: var(--page-pad);
  display: flex;
  justify-content: center;
  align-items: center;
}

header > div {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

h1 {
  color: #f5f5f5;
  font-size: clamp(1.45rem, 2.8vw, 24px);
  font-family: "PPNeuebit";
  margin: 0;
  line-height: 1.05;
  flex: 1 1 14rem;
  min-width: 0;
}

nav {
  --page-gap: clamp(0.55rem, 1.45vw, 14px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  column-gap: var(--page-gap);
  row-gap: 0.35rem;
  font-family: "PPNeuebit";
  font-size: clamp(1.45rem, 2.8vw, 24px);
  line-height: 1.05;
  flex: 1 1 auto;
}

.page-steps {
  display: inline-flex;
  align-items: center;
  gap: var(--page-gap);
  margin-left: 0.7rem;
  margin-bottom: 6px;
}

.page-step {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: aliceblue;
}

.page-step:hover {
  color: #ddd827;
}

.page-step.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pixel-tri {
  --px: round(0.14em, 1px);
  position: relative;
  width: calc(var(--px) * 3);
  height: calc(var(--px) * 5);
  display: block;
}

.pixel-tri::before {
  content: "";
  position: absolute;
  top: 0;
  width: var(--px);
  height: var(--px);
  background: currentColor;
}

.pixel-tri-right::before {
  left: 0;
  box-shadow:
    0 var(--px) currentColor,
    var(--px) var(--px) currentColor,
    0 calc(var(--px) * 2) currentColor,
    var(--px) calc(var(--px) * 2) currentColor,
    calc(var(--px) * 2) calc(var(--px) * 2) currentColor,
    0 calc(var(--px) * 3) currentColor,
    var(--px) calc(var(--px) * 3) currentColor,
    0 calc(var(--px) * 4) currentColor;
}

.pixel-tri-left::before {
  right: 0;
  box-shadow:
    0 var(--px) currentColor,
    calc(var(--px) * -1) var(--px) currentColor,
    0 calc(var(--px) * 2) currentColor,
    calc(var(--px) * -1) calc(var(--px) * 2) currentColor,
    calc(var(--px) * -2) calc(var(--px) * 2) currentColor,
    0 calc(var(--px) * 3) currentColor,
    calc(var(--px) * -1) calc(var(--px) * 3) currentColor,
    0 calc(var(--px) * 4) currentColor;
}

a {
  color: aliceblue;
  text-decoration: none;
}

.active {
  color: #ddd827;
}

.brand-row {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 auto;
}

.brand-row h1 {
  flex: 0 1 auto;
}

.main-panel > .tooltip:not(.tooltip-above-book) {
  visibility: hidden;
}

.tooltip {
  position: absolute;
  left: calc(100% + 0.85rem);
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 5;
  background-color: #000000;
  border: 1px solid #50baff;
  padding: 0.5rem 0.7rem;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  font-size: clamp(0.68rem, 1.15vw, 0.8rem);
  line-height: 1.25;
}

.tooltip-above-book {
  left: 50%;
  top: 0;
  transform: translate(-50%, calc(-100% - 0.65rem));
  z-index: 220;
}

.tooltip p {
  margin: 0;
  white-space: nowrap;
}

.tooltip .ph {
  font-size: 0.95rem;
  line-height: 1;
  color: var(--blue);
}

@font-face {
  font-family: "PPNeuebit";
  src: url("assets/PPNeueBit-Bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "StackHeadline";
  src: url("assets/StackSansHeadline-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

@font-face {
  font-family: "StackText";
  src: url("assets/StackSansText-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

/* locked weight */
@font-face {
  font-family: "StackText700";
  src: url("assets/StackSansText-VariableFont_wght.ttf") format("truetype");
  font-weight: 700;
  font-stretch: normal;
  font-style: normal;
}

@font-face {
  font-family: "Sedgwick";
  src: url("assets/SedgwickAve-Regular.ttf") format("truetype");
  /* font-weight: 400;  */
  font-style: normal;
}

#canvasWrapper0{
    position: relative;
}

main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: safe center;
  justify-content: center;
  min-height: 0;
  padding: var(--page-pad);
}

.edge-turn {
  position: absolute;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.edge-cue {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.edge-turn-prev .edge-cue {
  justify-content: flex-end;
  padding-right: max(4px, calc(50% - 5vw - 6px));
}

.edge-turn-next .edge-cue {
  justify-content: flex-start;
  padding-left: max(4px, calc(50% - 5vw - 6px));
}

.edge-mark {
  position: relative;
  display: flex;
}

.edge-turn:hover .edge-cue,
.edge-turn:focus-visible .edge-cue {
  opacity: 0.55;
}

.edge-hint {
  position: absolute;
  top: calc(100% + 1.15rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: "PPNeuebit";
  font-size: 16px;
  line-height: 1;
  color: aliceblue;
  white-space: nowrap;
  visibility: hidden;
}

.edge-hint.is-shown {
  visibility: visible;
}

.edge-turn .pixel-tri {
  --px: round(up, 0.16em, 1px);
  font-family: "PPNeuebit";
  font-size: clamp(1.45rem, 2.8vw, 24px);
  pointer-events: none;
  color: aliceblue;
}

.edge-turn-next {
  left: auto;
  right: 0;
}

.edge-turn.is-disabled {
  pointer-events: none;
}

.main-panel {
  position: relative;
  width: var(--book-width);
  max-height: var(--book-max-height);
  aspect-ratio: var(--aspect-ratio);
  margin-inline: auto;
  background-color: white;
}

img {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: auto;
}

.canvas {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: white;
}

.main-panel > .canvas,
.main-panel > img {
  transition: opacity 0.12s linear;
}

.main-panel.spread-pending > .canvas,
.main-panel.spread-pending > img {
  opacity: 0;
}

.spread-bg,
.spread-fg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 50;
}

.spread-fg {
  z-index: 100;
}

.sp4 {
  z-index: 100;
}

.sp5 {
  z-index: 100;
}

.sp5-bg {
  z-index: 0;
}

/* .sp11, .sp8-bg, .sp8-mg, .sp8-fg{
    margin-left: 4px;
    margin-top: 2px;
} */

.sp8-bg {
  z-index: 0;
}

.sp8-mg {
  mix-blend-mode: darken;
  z-index: 75;
}

.sp8-fg {
  z-index: 100;
}

.sp15 {
  z-index: 50;
}

#canvasWrapper15{
    position: relative;
}

.panel-15 p {
  position: absolute;
  font-family: "PPNeuebit";
  color: #3a7157;
  z-index: 100;
  left: 36%;
  font-size: clamp(0.85rem, 1.5vw, 1.2rem);
  bottom: 30%;
}

.panel-15 video {
  position: absolute;
  width: 28%;
  left:3%;
  top: 30%;
  /* left: 0; */
  box-sizing: border-box;
}

/* .cover-img{
    left: 314px;
} */

.sp1-transparent {
  position: absolute;
  z-index: 100;
}

#canvasWrapper13 {
  background-color: black;
}

.lyrics,
.discourse {
  position: absolute;
}

.lyrics {
  font-family: "Sedgwick";
  top: 100px;
  left: 400px;
  z-index: 100;
}

.discourse {
  bottom: 70px;
  font-size: 1.4rem;
  font-weight: 600;
  width: 28ch;
  right: 400px;
  z-index: 100;
}

.main-panel::after,
.divider-line {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0.5px;
  height: 100%;
  background-color: black;
  transform: translateX(-50%);
  z-index: 180;
  pointer-events: none;
}

.ph {
  color: rgb(195, 195, 195);
  font-size: 2rem;
}

#canvasWrapper7 {
  font-weight: 700;
}

@media (max-width: 720px) {
  header > div {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .brand-row {
    justify-content: center;
  }

  h1 {
    flex: 0 1 auto;
    text-align: center;
  }

  nav {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --page-pad: 1rem;
  }
}
