:root {
  --ink: #050505;
  --paper: #f7f5eb;
  --white: #ffffff;
  --soft-white: rgba(255, 255, 255, 0.86);
  --muted-white: rgba(255, 255, 255, 0.64);
  --line-white: rgba(255, 255, 255, 0.32);
  --line-dark: rgba(0, 0, 0, 0.18);
  --red: #a73b34;
  --green: #3f784b;
  --blue: #2e5f82;
  --gold: #ad7b28;
  --violet: #554678;
  --nav-height: 74px;
  --safe-bottom: 112px;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--white);
  background: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.09), transparent 34%),
    #050505;
  color: var(--white);
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.sound-prompt,
body:not(.has-entered) {
  overflow: hidden;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.05), transparent 45%, rgba(0, 0, 0, 0.12)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  opacity: 0.55;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  text-decoration: none;
}

.intro-prompt {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 4px),
    #030303;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

body:not(.sound-prompt) .intro-prompt {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.intro-prompt__mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 620px;
  color: rgba(255, 255, 255, 0.12);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 8.8rem;
  font-weight: 900;
  line-height: 0.84;
  text-align: center;
  transform: translate(-50%, -50%) rotate(-8deg);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.14);
}

.intro-prompt__inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(460px, calc(100vw - 40px));
  text-align: center;
}

.intro-prompt__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.intro-prompt__sub {
  max-width: 260px;
  margin: 12px 0 24px;
  color: var(--soft-white);
  font-family: Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

.intro-prompt__actions {
  display: flex;
  gap: 22px;
}

.sound-choice {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 48px;
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 700;
}

.sound-choice__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  font-size: 1.5rem;
  transition: background 0.24s ease, color 0.24s ease;
}

.sound-choice:hover .sound-choice__icon {
  background: var(--white);
  color: var(--ink);
}

.opening {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.08), transparent 32%),
    #030303;
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.8s ease;
}

body.has-entered .opening {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}

.opening__logo,
.site-logo {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0;
}

.opening__logo {
  position: relative;
  z-index: 1;
  color: var(--white);
  font-size: 9.2rem;
  line-height: 0.78;
  text-align: center;
  transform: rotate(-7deg);
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.45));
  animation: logoFlicker 5.2s ease-in-out infinite;
}

.opening__line {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 2;
  width: min(260px, calc(100vw - 36px));
  transform: translateX(-50%);
}

.opening__line p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
}

.opening__line p + p {
  margin-top: 3px;
  font-family: Arial, sans-serif;
  font-size: 0.76rem;
  color: var(--soft-white);
}

.opening__copy {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  z-index: 2;
  width: fit-content;
  margin: auto;
  color: rgba(255, 255, 255, 0.48);
  font-family: Arial, sans-serif;
  font-size: 0.65rem;
}

.opening__circle {
  position: absolute;
  right: min(13vw, 180px);
  bottom: min(15vh, 130px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 172px;
  height: 172px;
  color: var(--white);
}

.opening__circle-rim,
.opening__circle-scene,
.opening__circle-copy {
  grid-area: 1 / 1;
}

.opening__circle-rim {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: rotateSlow 18s linear infinite;
}

.opening__circle-rim::before,
.opening__circle-rim::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.opening__circle-rim::before {
  inset: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.42);
}

.opening__circle-rim::after {
  inset: 36px;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.opening__circle-scene {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(17, 34, 66, 0.1), rgba(0, 0, 0, 0.65)),
    linear-gradient(155deg, #d9be78 0 22%, #233d68 23% 52%, #07111d 53% 100%);
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.8);
}

.opening__circle-scene::before {
  position: absolute;
  right: 34px;
  bottom: 35px;
  width: 22px;
  height: 58px;
  border-radius: 999px 999px 4px 4px;
  background: rgba(0, 0, 0, 0.72);
  content: "";
}

.opening__circle-scene::after {
  position: absolute;
  right: 26px;
  bottom: 88px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 247, 188, 0.86);
  box-shadow: 0 0 28px rgba(255, 247, 188, 0.48);
  content: "";
}

.opening__circle-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 5px;
  place-items: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
  transform: translateY(112px);
}

.opening__circle-copy span {
  font-size: 1.05rem;
  font-weight: 700;
}

.opening__circle-copy small {
  font-family: Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
}

.opening__cloud {
  position: absolute;
  z-index: 0;
  width: 280px;
  height: 92px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 22% 55%, rgba(255, 255, 255, 0.22) 0 22%, transparent 23%),
    radial-gradient(circle at 42% 38%, rgba(255, 255, 255, 0.2) 0 28%, transparent 29%),
    radial-gradient(circle at 64% 55%, rgba(255, 255, 255, 0.19) 0 26%, transparent 27%),
    radial-gradient(circle at 80% 46%, rgba(255, 255, 255, 0.17) 0 20%, transparent 21%);
  filter: blur(1px);
  opacity: 0.76;
  animation: driftCloud 12s ease-in-out infinite alternate;
}

.opening__cloud--one {
  top: 12%;
  left: -80px;
}

.opening__cloud--two {
  top: 17%;
  right: -70px;
  width: 330px;
  animation-delay: -3s;
}

.opening__cloud--three {
  right: 18%;
  bottom: 13%;
  width: 240px;
  opacity: 0.5;
  animation-delay: -6s;
}

.opening__cloud--four {
  bottom: 19%;
  left: 12%;
  width: 210px;
  opacity: 0.54;
  animation-delay: -9s;
}

.site-header,
.site-main,
.bottom-nav {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

body.has-entered .site-header,
body.has-entered .site-main,
body.has-entered .bottom-nav {
  opacity: 1;
  pointer-events: auto;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 24px;
  color: var(--white);
}

.site-logo {
  display: block;
  color: var(--white);
  font-size: 2.3rem;
  line-height: 0.82;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.7);
  transform: rotate(-8deg);
}

.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
}

.site-nav a {
  padding: 8px 0;
}

.site-main {
  min-height: 100svh;
}

.story-grid {
  position: relative;
  min-height: 100svh;
  padding: 52px 28px var(--safe-bottom);
  overflow: hidden;
}

.story-grid__watermark {
  position: fixed;
  top: 49%;
  left: 50%;
  z-index: 0;
  width: 620px;
  color: rgba(255, 255, 255, 0.11);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 8.5rem;
  font-weight: 900;
  line-height: 0.84;
  text-align: center;
  transform: translate(-50%, -50%) rotate(-7deg);
  pointer-events: none;
}

.story-grid__fade {
  position: fixed;
  right: 0;
  left: 0;
  z-index: 5;
  height: 96px;
  pointer-events: none;
}

.story-grid__fade--top {
  top: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.88), transparent);
}

.story-grid__fade--bottom {
  bottom: 0;
  height: 140px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent);
}

.story-grid__columns {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(178px, 1fr));
  gap: 30px;
  width: min(1240px, 100%);
  min-height: 1120px;
  margin: 0 auto;
}

.grid-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.grid-column:nth-child(1) {
  transform: translateY(-86px);
}

.grid-column:nth-child(2) {
  transform: translateY(44px);
}

.grid-column:nth-child(3) {
  transform: translateY(-132px);
}

.grid-column:nth-child(4) {
  transform: translateY(50px);
}

.grid-column:nth-child(5) {
  transform: translateY(-72px);
}

.story-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 292px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--story-color, #567) 70%, white 30%);
  border-radius: 28px;
  background: var(--story-color, #345);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.45);
  color: var(--white);
  isolation: isolate;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.story-card:hover {
  transform: translateY(-8px) rotate(1deg);
  filter: brightness(1.08);
}

.story-card__scene {
  position: absolute;
  inset: 0;
}

.story-card__scene::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(180deg, transparent 0 28%, rgba(0, 0, 0, 0.38) 60%, rgba(0, 0, 0, 0.78)),
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.26), transparent 42%);
  content: "";
}

.story-card__content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 292px;
  padding: 0 18px 20px;
  text-align: left;
}

.story-card__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.story-card__en {
  margin: 3px 0 12px;
  color: var(--soft-white);
  font-family: Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.story-card__view {
  position: absolute;
  top: 16px;
  right: -17px;
  z-index: 8;
  padding: 3px 15px 5px;
  border: 1px solid var(--white);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  opacity: 0;
  transform: rotate(6deg);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.story-card:hover .story-card__view,
.story-card:focus-visible .story-card__view {
  opacity: 1;
  transform: rotate(6deg) translateY(-2px);
}

.scene {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
  background: linear-gradient(180deg, #26415d, #101727 55%, #0d1016);
}

.scene > span {
  position: absolute;
  display: block;
}

.scene__sky {
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 26px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 52%);
  opacity: 0.75;
}

.scene__moon,
.scene__sun {
  top: 32px;
  right: 34px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.scene__moon {
  background: #f7f0bf;
  box-shadow: 0 0 30px rgba(247, 240, 191, 0.35);
}

.scene__sun {
  background: #d88438;
  box-shadow: 0 0 36px rgba(216, 132, 56, 0.32);
  opacity: 0;
}

.scene__mountain {
  right: -34px;
  bottom: 70px;
  width: 160px;
  height: 112px;
  border-radius: 12px 90px 18px 16px;
  background: rgba(8, 14, 20, 0.58);
  transform: rotate(45deg);
}

.scene__mountain--back {
  right: 58px;
  bottom: 86px;
  width: 150px;
  height: 110px;
  opacity: 0.6;
}

.scene__river {
  right: -32px;
  bottom: -20px;
  left: -16px;
  height: 118px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.1), rgba(72, 137, 166, 0.34), rgba(0, 0, 0, 0.02));
  clip-path: polygon(0 40%, 28% 22%, 55% 42%, 100% 16%, 100% 100%, 0 100%);
}

.scene__house {
  right: 42px;
  bottom: 64px;
  width: 70px;
  height: 52px;
  background: rgba(17, 13, 10, 0.74);
  clip-path: polygon(0 38%, 50% 0, 100% 38%, 88% 38%, 88% 100%, 12% 100%, 12% 38%);
}

.scene__figure {
  bottom: 55px;
  left: 42px;
  width: 26px;
  height: 68px;
  border-radius: 16px 16px 5px 5px;
  background: rgba(0, 0, 0, 0.72);
}

.scene__figure::before {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 28px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  content: "";
  transform: translateX(-50%);
}

.scene__figure--two {
  left: 76px;
  bottom: 48px;
  width: 22px;
  height: 54px;
  opacity: 0.68;
}

.scene__petal {
  width: 18px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 224, 228, 0.82);
  opacity: 0.6;
}

.scene__petal--one {
  top: 80px;
  left: 40px;
  transform: rotate(22deg);
}

.scene__petal--two {
  top: 118px;
  right: 84px;
  transform: rotate(-28deg);
}

.scene__grain {
  right: 74px;
  bottom: 48px;
  width: 76px;
  height: 28px;
  border-radius: 50%;
  background: rgba(234, 204, 129, 0.86);
  box-shadow:
    -18px 9px 0 rgba(234, 204, 129, 0.72),
    18px 8px 0 rgba(234, 204, 129, 0.72);
  opacity: 0;
}

.scene--sunset {
  background: linear-gradient(180deg, #d08f4e 0%, #6b3a4b 48%, #13233c 100%);
}

.scene--sunset .scene__sun {
  opacity: 1;
}

.scene--sunset .scene__moon {
  opacity: 0;
}

.scene--river {
  background: linear-gradient(180deg, #6687a6, #1a3551 58%, #09121c);
}

.scene--river .scene__river {
  height: 156px;
  background: linear-gradient(150deg, rgba(245, 250, 255, 0.36), rgba(49, 123, 153, 0.66), rgba(5, 13, 25, 0.1));
}

.scene--snow {
  background: linear-gradient(180deg, #d8e3e9, #8aa1b8 54%, #23364c);
}

.scene--snow .scene__moon {
  background: var(--white);
}

.scene--snow .scene__mountain {
  background: rgba(255, 255, 255, 0.42);
}

.scene--flower {
  background: linear-gradient(180deg, #798fb8, #3e6c5b 54%, #17261f);
}

.scene--flower .scene__petal {
  opacity: 1;
}

.scene--grain {
  background: linear-gradient(180deg, #b78946, #5b4934 54%, #181411);
}

.scene--grain .scene__grain {
  opacity: 1;
}

.scene--grain .scene__house {
  right: 118px;
}

.scene--night {
  background: linear-gradient(180deg, #16275f, #111835 52%, #05070e);
}

.scene--night .scene__moon {
  right: 86px;
}

.scene--mist {
  background: linear-gradient(180deg, #bbc4bb, #617b75 48%, #101b1d);
}

.scene--mist .scene__sky {
  opacity: 0.44;
  filter: blur(3px);
}

.scene--ember {
  background: linear-gradient(180deg, #48211c, #221018 56%, #080407);
}

.scene--ember .scene__sun {
  top: 72px;
  right: 58px;
  width: 34px;
  height: 34px;
  background: #ff9651;
  opacity: 1;
}

.scene--ember .scene__moon {
  opacity: 0;
}

.story-list {
  display: none;
  width: min(1040px, calc(100% - 56px));
  margin: 0 auto;
  padding: 160px 0 var(--safe-bottom);
}

.story-list__intro {
  max-width: 390px;
  margin: 0 auto 74px;
  text-align: center;
}

.story-list__all {
  margin: 0 0 8px;
  font-family: Arial, sans-serif;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
}

.story-list__intro p:not(.story-list__all),
.story-list__intro span {
  display: block;
  margin: 0;
  color: var(--soft-white);
  font-size: 0.94rem;
  font-weight: 700;
}

.story-list__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.story-list__chips button {
  padding: 7px 14px 8px;
  border: 1px solid var(--white);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.story-list__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 58px 66px;
}

.list-card {
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  align-items: center;
  min-height: 154px;
  padding: 14px;
  color: var(--white);
}

.list-card::before {
  position: absolute;
  inset: -10px -8px;
  z-index: -1;
  border-radius: 18px;
  background: var(--white);
  opacity: 0;
  content: "";
  transition: opacity 0.18s ease;
}

.list-card:hover::before {
  opacity: 0.1;
}

.list-card__thumb {
  width: 100px;
  height: 100px;
  overflow: hidden;
  border: 7px solid color-mix(in srgb, var(--story-color) 74%, white 26%);
  border-radius: 50%;
}

.list-card__thumb .scene {
  min-height: 100%;
}

.list-card__body h3 {
  margin: 0;
  font-size: 1.26rem;
  line-height: 1.2;
}

.list-card__body small {
  display: block;
  margin: 2px 0 13px;
  color: var(--soft-white);
  font-family: Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.list-card__description {
  display: -webkit-box;
  margin: 13px 0 0;
  overflow: hidden;
  color: var(--soft-white);
  font-size: 0.86rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.story-list__pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(520px, 100%);
  margin: 100px auto 0;
  color: var(--soft-white);
  font-size: 0.94rem;
  font-weight: 800;
}

.story-list__pager strong {
  color: var(--white);
}

.story-list__pager div {
  display: flex;
  gap: 9px;
}

.story-list__pager .is-disabled {
  opacity: 0.42;
}

.page-footer {
  display: grid;
  justify-items: center;
  gap: 30px;
  margin-top: 180px;
  padding-bottom: 40px;
  color: var(--soft-white);
}

.page-footer__logo {
  color: var(--white);
  font-size: 3.2rem;
}

.page-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
}

.page-footer p:last-child {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 0.7rem;
}

body[data-view="list"] .story-grid {
  display: none;
}

body[data-view="list"] .story-list {
  display: block;
}

body[data-view="grid"] .story-list {
  display: none;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 18px;
  left: 0;
  z-index: 90;
  width: fit-content;
  margin: 0 auto;
}

.bottom-nav__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.bottom-nav__toggles {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line-white);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
}

.view-toggle,
.sound-toggle,
.filter-open {
  min-height: 54px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 900;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
}

body[data-view="list"] .view-toggle--list,
body[data-view="grid"] .view-toggle--grid {
  background: var(--white);
  color: var(--ink);
}

.icon-list,
.icon-grid {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
}

.icon-list::before,
.icon-list::after {
  position: absolute;
  left: 0;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 8px 0 currentColor, 0 16px 0 currentColor;
  content: "";
}

.icon-list::after {
  width: 4px;
  opacity: 0.75;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  gap: 4px;
}

.icon-grid::before,
.icon-grid::after {
  content: "";
}

.icon-grid,
.icon-grid::before,
.icon-grid::after {
  background:
    linear-gradient(currentColor 0 0) left top / 9px 9px no-repeat,
    linear-gradient(currentColor 0 0) right top / 9px 9px no-repeat,
    linear-gradient(currentColor 0 0) left bottom / 9px 9px no-repeat,
    linear-gradient(currentColor 0 0) right bottom / 9px 9px no-repeat;
}

.filter-open {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 14px;
  padding: 0 20px;
  border: 1px solid var(--line-white);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.filter-open span {
  font-size: 0.76rem;
  font-weight: 800;
}

.filter-open strong {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.76rem;
  white-space: nowrap;
}

.sound-toggle {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line-white);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
}

.sound-toggle span:last-child {
  font-family: Arial, sans-serif;
  font-size: 0.55rem;
}

body[data-sound="off"] .sound-toggle__icon {
  text-decoration: line-through;
}

.bottom-nav__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.filter-panel {
  position: absolute;
  right: 50%;
  bottom: 72px;
  z-index: 1;
  display: grid;
  width: min(880px, calc(100vw - 34px));
  max-height: min(680px, calc(100svh - 122px));
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line-white);
  border-radius: 30px;
  background: rgba(13, 13, 13, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  color: var(--white);
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%) translateY(20px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.bottom-nav.is-filter-open .bottom-nav__backdrop {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.bottom-nav.is-filter-open .filter-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(50%);
}

.filter-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-white);
}

.filter-panel__header p {
  max-width: 420px;
  margin: 0;
  color: var(--soft-white);
  font-size: 0.95rem;
  font-weight: 700;
}

.filter-panel__actions {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.filter-panel__actions button {
  color: var(--soft-white);
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-panel__tabs {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.filter-panel__tabs button {
  padding: 9px 17px 10px;
  border: 1px solid var(--line-white);
  border-radius: 999px;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-panel__tabs button.is-active {
  background: var(--white);
  color: var(--ink);
}

.filter-panel__body {
  min-height: 214px;
  margin-top: 20px;
  overflow: auto;
}

.filter-group {
  display: none;
}

.filter-panel__body[data-active-tab="characters"] [data-tab-panel="characters"],
.filter-panel__body[data-active-tab="genres"] [data-tab-panel="genres"],
.filter-panel__body[data-active-tab="places"] [data-tab-panel="places"] {
  display: block;
}

.filter-group p {
  margin: 0 0 14px;
  color: var(--muted-white);
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-white);
  border-radius: 999px;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-option::before {
  width: 12px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.filter-option.is-active {
  background: var(--white);
  color: var(--ink);
}

.filter-option.is-active::before {
  background: var(--ink);
  box-shadow: inset 0 0 0 3px var(--white);
}

.filter-apply {
  justify-self: center;
  min-width: 220px;
  margin-top: 24px;
  padding: 12px 22px 13px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.story-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  pointer-events: none;
}

.story-modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.story-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.story-modal.is-open .story-modal__scrim {
  opacity: 1;
}

.story-modal__sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 620px;
  border-radius: 30px 30px 0 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.42);
  transform: translateY(104%);
  transition: transform 0.34s ease;
}

.story-modal.is-open .story-modal__sheet {
  transform: translateY(0);
}

.story-modal__big {
  position: absolute;
  top: -128px;
  right: 18px;
  z-index: -1;
  margin: 0;
  color: var(--white);
  font-family: "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: 6.4rem;
  line-height: 1;
  opacity: 0.86;
  pointer-events: none;
}

.story-modal__close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 4;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.story-modal__close span:last-child {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 1.2rem;
}

.story-modal__inner {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 74px;
  width: min(1180px, calc(100% - 90px));
  margin: 0 auto;
  padding: 70px 0 74px;
}

.story-modal__visual {
  width: 400px;
  height: 400px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.story-modal__visual .scene {
  min-height: 100%;
}

.story-modal__content {
  padding: 34px 28px 0 0;
}

.story-modal__content h2 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.35;
}

.story-modal__content hgroup p {
  margin: 4px 0 0;
  color: rgba(0, 0, 0, 0.64);
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.story-modal__taxonomy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  margin-top: 28px;
}

.story-modal__taxonomy p {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
}

.story-modal__taxonomy .tag-row {
  gap: 6px;
}

.story-modal__taxonomy .tag {
  background: var(--ink);
  color: var(--white);
  font-size: 0.68rem;
}

.story-modal__description {
  max-width: 680px;
  margin: 28px 0 0;
  color: rgba(0, 0, 0, 0.76);
  font-size: 0.88rem;
  line-height: 1.8;
}

.is-hidden-by-filter {
  display: none;
}

@keyframes logoFlicker {
  0%, 100% {
    opacity: 1;
    transform: rotate(-7deg) translate(0, 0);
  }
  46% {
    opacity: 0.94;
  }
  48% {
    opacity: 0.72;
    transform: rotate(-7deg) translate(-1px, 1px);
  }
  50% {
    opacity: 1;
    transform: rotate(-7deg) translate(1px, 0);
  }
}

@keyframes rotateSlow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes driftCloud {
  to {
    transform: translateX(28px) translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .story-grid__columns {
    grid-template-columns: repeat(3, minmax(176px, 1fr));
  }

  .grid-column:nth-child(n) {
    transform: none;
  }

  .story-list__items {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .bottom-nav__bar {
    gap: 8px;
  }

  .filter-open span {
    display: none;
  }

  .story-modal__inner {
    grid-template-columns: 320px 1fr;
    gap: 38px;
  }

  .story-modal__visual {
    width: 320px;
    height: 320px;
  }
}

@media (max-width: 720px) {
  :root {
    --safe-bottom: 118px;
  }

  .intro-prompt__mark {
    width: 330px;
    font-size: 5.2rem;
  }

  .opening__logo {
    font-size: 5.6rem;
  }

  .opening__circle {
    right: 50%;
    bottom: 118px;
    width: 142px;
    height: 142px;
    transform: translateX(50%);
  }

  .opening__circle-scene {
    width: 108px;
    height: 108px;
  }

  .opening__circle-copy {
    transform: translateY(92px);
  }

  .site-header {
    padding: 12px 12px 10px;
  }

  .site-logo {
    font-size: 1.68rem;
  }

  .site-nav {
    gap: 11px;
    font-size: 0.62rem;
  }

  .story-grid {
    padding: 96px 14px var(--safe-bottom);
    overflow: visible;
  }

  .story-grid__watermark {
    width: 320px;
    font-size: 4.8rem;
  }

  .story-grid__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-height: auto;
  }

  .grid-column {
    gap: 16px;
  }

  .story-card {
    min-height: 228px;
    border-radius: 22px;
  }

  .story-card__content {
    min-height: 228px;
    padding: 0 12px 14px;
  }

  .story-card__title {
    font-size: 0.95rem;
  }

  .story-card__en {
    font-size: 0.6rem;
  }

  .tag {
    min-height: 20px;
    padding: 2px 7px;
    font-size: 0.58rem;
  }

  .story-list {
    width: calc(100% - 28px);
    padding-top: 118px;
  }

  .story-list__all {
    font-size: 4.2rem;
  }

  .list-card {
    grid-template-columns: 82px 1fr;
    gap: 14px;
    padding: 8px 0;
  }

  .list-card__thumb {
    width: 82px;
    height: 82px;
    border-width: 5px;
  }

  .list-card__body h3 {
    font-size: 1rem;
  }

  .list-card__description {
    font-size: 0.78rem;
    -webkit-line-clamp: 2;
  }

  .bottom-nav {
    bottom: 12px;
    width: calc(100% - 20px);
  }

  .bottom-nav__bar {
    justify-content: center;
  }

  .bottom-nav__toggles {
    flex-shrink: 0;
  }

  .view-toggle,
  .sound-toggle,
  .filter-open {
    min-height: 52px;
  }

  .view-toggle {
    padding: 0 12px;
  }

  .wide {
    display: none;
  }

  .filter-open {
    gap: 7px;
    padding: 0 8px;
  }

  .filter-open strong {
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.66rem;
  }

  .sound-toggle {
    width: 52px;
    height: 52px;
  }

  .filter-panel {
    right: 0;
    bottom: 64px;
    width: 100%;
    max-height: calc(100svh - 92px);
    padding: 18px;
    border-radius: 24px;
    transform: translateY(20px);
  }

  .bottom-nav.is-filter-open .filter-panel {
    transform: none;
  }

  .filter-panel__header {
    display: grid;
  }

  .filter-panel__tabs {
    overflow-x: auto;
  }

  .filter-panel__body {
    min-height: 250px;
  }

  .story-modal__sheet {
    min-height: 0;
    max-height: calc(100svh - 46px);
    overflow-y: auto;
  }

  .story-modal__big {
    display: none;
  }

  .story-modal__close {
    top: 15px;
    right: 16px;
    color: var(--white);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  }

  .story-modal__inner {
    display: block;
    width: 100%;
    padding: 8px 8px 90px;
  }

  .story-modal__visual {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 24px;
  }

  .story-modal__content {
    padding: 26px 20px 0;
  }

  .story-modal__content h2 {
    font-size: 1.5rem;
  }

  .story-modal__taxonomy {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 721px) {
  .narrow {
    display: none;
  }
}
