:root {
  --width: 100%;
  --edge: calc((100% - var(--width)) / 2);
  --safe: env(safe-area-inset-top, 0px);
  --header: calc(var(--safe) + 50px);
  --red: #c01925;
}
@media (min-width: 600px) { :root { --width: 393px; } }
* { box-sizing: border-box; }
html { background: var(--red); }
body { margin: 0; background: white; font-family: "Gen Interface JP", sans-serif; }
@media (min-width: 600px) {
  html, body { background: #000000; }
  .header, .page, #navigation { zoom: 1.5; }
}
.header {
  position: fixed; inset: 0 var(--edge) auto; z-index: 3;
  height: var(--header); display: flex; align-items: stretch; padding-top: var(--safe);
  background: var(--red);
  border-bottom: 1px solid black;
}
.header::before { content: ""; position: absolute; top: var(--safe); left: 0; right: 0; height: 1px; background: black; pointer-events: none; }
.logo { background: white; flex: 1; min-width: 0; display: flex; align-items: center; overflow: hidden; position: relative; }
.logo-track {
  display: flex;
  width: max-content;
  flex: none;
  margin-left: -33px;
  transform: translateX(calc(-100% / 3));
}
.logo-tile { display: block; flex: none; padding-right: 12px; }
.logo img { display: block; }
.menu { width: 48px; flex: none; border: 0; border-left: 1px solid black; background: var(--red); display: grid; place-items: center; padding: 0; cursor: pointer; }
/* Rails stay in the scrolling frame so Safari can draw their text under the
   toolbar. The scroll timeline moves that text back with the scroll, on the
   compositor, so the bars stay still instead of sliding a frame late. */
.page {
  width: var(--width); margin-inline: auto; display: grid;
  grid-template-columns: 35px minmax(0, 1fr) 35px;
  padding-top: var(--header);
  min-height: 100vh;
  min-height: max(100lvh, var(--screen-height, 0px));
  background: white;
}
.rail { position: relative; grid-row: 1; overflow: hidden; color: #8d8d8d; font-size: 16px; letter-spacing: .16px; line-height: 19px; }
.tags { grid-column: 1; border-right: 1px solid black; }
.news { grid-column: 3; border-left: 1px solid black; }
.rail-origin { position: absolute; top: 0; inset-inline: 0; transform: translateY(var(--page-scroll, 0px)); }
@supports (animation-timeline: scroll()) {
  @keyframes rail-hold {
    from { transform: translateY(0); }
    to { transform: translateY(var(--rail-span, 0px)); }
  }
  .rail-origin {
    transform: none;
    animation: rail-hold linear both;
    animation-timeline: scroll(root);
  }
}
.axis { position: absolute; left: calc(50% + 9.5px); top: 0; transform-origin: top left; transform: rotate(90deg); }
.track, .sequence { display: flex; width: max-content; flex-wrap: nowrap; }
.track { will-change: transform; }
.sequence { align-items: center; height: 19px; white-space: nowrap; padding-right: 16px; gap: 16px; }
.news .sequence { padding-left: 16px; padding-right: 0; }
.news a { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.news time { border-radius: 50px; background: var(--red); color: white; font-size: 10px; letter-spacing: .1px; font-weight: 500; line-height: 13px; padding: 3px 7px; }
#navigation { position: fixed; top: var(--header); right: var(--edge); z-index: 4; padding: 8px 18px; background: white; border: 1px solid black; }
@media (min-width: 600px) {
  .header {
    left: 0;
    right: 0;
    width: 393px;
    margin-inline: auto;
  }
  #navigation { right: calc((100% - 393px * 1.5) / 2); }
}
#navigation a { display: block; color: black; padding: 11px; text-decoration: none; }
main { grid-column: 2; grid-row: 1; min-width: 0; }

/* The scrollable content ends before the artwork does. The oversized snap
   area allows normal scrolling inside it, including at compact toolbar size. */
@media (pointer: coarse) {
  html { scroll-snap-type: y mandatory; }
  .page { position: relative; }
  .page::before {
    content: "";
    position: absolute;
    inset: 0 0 var(--rail-tail, 160px);
    pointer-events: none;
    scroll-snap-align: start;
  }
  .page {
    min-height: calc(max(100lvh, var(--screen-height, 0px)) + var(--rail-tail, 160px));
  }
  main { margin-bottom: var(--rail-tail, 160px); }
}

