.music-dock {
  position: fixed;
  z-index: 5;
  left: max(24px, env(safe-area-inset-left));
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px;
  border: 1px solid #ddd;
  border-radius: 18px;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 24px #00000014;
  font:
    12px/1.4 'DM Sans',
    Arial,
    sans-serif;
}
.music-dock[hidden],
.music-dock [hidden] {
  display: none !important;
}
.music-dock a {
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.music-dock strong {
  display: block;
  font-size: 11px;
  font-weight: 550;
}
.music-dock span {
  display: block;
  color: #666;
  font-size: 10px;
  margin-top: 3px;
}
.music-dock-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  color: #111;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease;
}
.music-dock-toggle svg {
  width: 18px;
  height: 18px;
}
.music-dock-toggle:hover {
  background: #111;
  color: #fff;
}
.music-dock-toggle:focus-visible,
.music-dock a:focus-visible {
  outline: 2px solid #111;
  outline-offset: 4px;
}
@media (max-width: 700px) {
  .music-dock {
    left: 16px;
    bottom: max(100px, calc(env(safe-area-inset-bottom) + 88px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .music-dock-toggle {
    transition: none;
  }
}

@view-transition {
  navigation: auto;
}
#page-view main[tabindex='-1']:focus {
  outline: none;
}

::view-transition-old(root) {
  animation: page-fade-out 140ms ease-out both;
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  animation: page-arrive 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
  mix-blend-mode: normal;
}

/* Browsers without cross-document transitions still get a quiet entrance. */
.page-fade-fallback:not(.music-session) main {
  animation: page-arrive 300ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes page-fade-out {
  to {
    opacity: 0;
  }
}
@keyframes page-arrive {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
  .page-fade-fallback:not(.music-session) main,
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}


* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f8f8f8;
  color: #171717;
  font-family: 'DM Sans', Arial, sans-serif;
}
.reader-toolbar {
  height: 72px;
  padding: 0 32px;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 1;
}
.reader-back {
  font-size: 13px;
  color: #555;
  text-decoration: none;
  padding: 12px 0;
}
.reader-back:hover {
  color: #000;
}
.view-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
}
.view-switch button {
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #666;
  padding: 9px 13px;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.18s,
    color 0.18s;
}
.view-switch button[aria-pressed='true'] {
  background: #ededed;
  color: #000;
}
.view-switch button:hover {
  color: #000;
  background: #f4f4f4;
}
.view-switch button[aria-pressed='true']:hover {
  background: #ededed;
}
.view-switch svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}
.reader-stage {
  display: flex;
  justify-content: center;
  padding: 26px 28px;
  min-height: calc(100dvh - 72px);
}
.reading-device {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1e1e1;
  box-shadow: 0 12px 32px #0000000b;
  width: min(1440px, 100%);
  height: calc(100dvh - 124px);
  border-radius: 12px;
  transition:
    width 0.28s ease,
    border-radius 0.28s ease;
}
.desktop-chrome {
  height: 49px;
  flex: none;
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  align-items: center;
  background: #f0f0f0;
  padding: 0 17px;
  border-bottom: 1px solid #e2e2e2;
}
.desktop-chrome > span {
  font-size: 11px;
  color: #888;
  text-align: center;
}
.window-dots {
  display: flex;
  gap: 6px;
}
.window-dots i {
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background: #d1d1d1;
}
.window-dots i:first-child {
  background: #ff6058;
}
.window-dots i:nth-child(2) {
  background: #febc2e;
}
.window-dots i:nth-child(3) {
  background: #28c840;
}
.article-screen {
  display: block;
  width: 100%;
  min-height: 0;
  flex: 1;
  border: 0;
  background: white;
}
.phone-chrome,
.phone-bottom {
  display: none;
}
body[data-view='mobile'] .reading-device {
  width: 488px;
  height: calc(100dvh - 124px);
  max-height: 1000px;
  border-radius: 56px;
  border: 9px solid #fff;
  outline: 1px solid #e1e1e1;
  box-shadow: 0 16px 40px #0000000d;
}
body[data-view='mobile'] .desktop-chrome {
  display: none;
}
body[data-view='mobile'] .phone-chrome {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0 27px;
  position: relative;
  border-radius: 46px 46px 0 0;
  border: 1px solid #eee;
  border-bottom: 0;
  font-size: 15px;
  font-weight: 600;
}
.phone-island {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 132px;
  height: 36px;
  border-radius: 24px;
  background: #000;
}
.phone-indicators {
  display: flex;
  align-items: center;
  gap: 5px;
}
.phone-indicators svg {
  width: 22px;
  height: 16px;
  fill: currentColor;
}
body[data-view='mobile'] .article-screen {
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
}
body[data-view='mobile'] .phone-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  flex: none;
  border: 1px solid #eee;
  border-top: 0;
  border-radius: 0 0 44px 44px;
}
.phone-bottom span {
  width: 115px;
  height: 4px;
  background: #111;
  border-radius: 4px;
}
@media (max-width: 600px) {
  .reader-toolbar {
    height: 64px;
    padding: 0 16px;
    gap: 10px;
  }
  .reader-back {
    font-size: 11px;
  }
  .view-switch button {
    font-size: 11px;
    padding: 8px 9px;
    gap: 5px;
  }
  .view-switch svg {
    width: 15px;
    height: 15px;
  }
  .reader-stage {
    min-height: calc(100dvh - 64px);
    padding: 14px 10px;
  }
  .reading-device {
    height: calc(100dvh - 92px);
  }
  body[data-view='mobile'] .reading-device {
    width: 100%;
    height: calc(100dvh - 92px);
    border-width: 5px;
    border-radius: 39px;
  }
  body[data-view='mobile'] .phone-chrome {
    height: 60px;
    padding: 0 21px;
    font-size: 12px;
    border-radius: 34px 34px 0 0;
  }
  .phone-island {
    width: 100px;
    height: 29px;
    top: 12px;
  }
  .phone-indicators {
    gap: 3px;
  }
  .phone-indicators svg {
    width: 17px;
  }
  .desktop-chrome {
    grid-template-columns: 50px 1fr 20px;
    padding: 0 10px;
    height: 38px;
  }
  .desktop-chrome > span {
    font-size: 9px;
  }
  .window-dots {
    gap: 4px;
  }
  .window-dots i {
    height: 6px;
    width: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reading-device,
  .view-switch button {
    transition: none;
  }
}

/* Desktop reading frame fills the space beneath the toolbar. */
body[data-view='desktop'] .reader-stage {
  padding: 0;
  min-height: calc(100dvh - 72px);
}
body[data-view='desktop'] .reading-device {
  width: 100%;
  max-width: none;
  height: calc(100dvh - 72px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 600px) {
  body[data-view='desktop'] .reader-stage {
    min-height: calc(100dvh - 64px);
  }
  body[data-view='desktop'] .reading-device {
    height: calc(100dvh - 64px);
  }
}
