/* Layout: the top page is one scroll film (5 chapters over one 15s clip) followed by the shelves:
   genre bento, app capsule rails, the tool feature, the quiz/notes diptych and the about strip.
   Document pages (about, privacy, 404) share the narrow reading column at the bottom. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--y-header-h) + 16px); color-scheme: light; }
body { margin: 0; background: var(--y-bg); color: var(--y-ink); font-family: var(--y-font-jp); font-weight: 500; line-height: 1.85; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--y-pink); outline-offset: 3px; }
h1, h2, h3 { font-feature-settings: "palt" 1; }

/* ---------- Scroll film ---------- */
.film { position: relative; isolation: isolate; --film-progress: 0; background: var(--y-bg); overflow-x: clip; }
.film__stage { position: sticky; top: 0; z-index: 0; height: 100vh; height: 100dvh; overflow: hidden; background: var(--y-bg); }
.film__media, .film__poster, .film__video { position: absolute; inset: 0; width: 100%; height: 100%; }
.film__poster, .film__video { object-fit: cover; object-position: 50% 50%; }
.film__video { z-index: 1; }
.film__media[data-video-painted="true"] .film__poster { visibility: hidden; }
.film__stage::after { content: ""; position: absolute; inset: auto 0 0; z-index: 2; height: 14vh; background: linear-gradient(to bottom, transparent, var(--y-bg)); pointer-events: none; }
.film__progress { position: absolute; z-index: 5; left: 0; right: 0; top: var(--y-header-h); height: 3px; background: rgba(21, 23, 28, 0.07); }
.film__progress span { display: block; height: 100%; background: var(--y-pink); transform: scaleX(var(--film-progress)); transform-origin: left center; }
.film__story { position: relative; z-index: 3; margin-top: -100vh; margin-top: -100dvh; }
.film__chapter { position: relative; min-height: 150vh; min-height: 150dvh; }
.film__chapter:last-child { min-height: 125vh; min-height: 125dvh; }
.film__pin { position: sticky; top: 0; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; padding: calc(var(--y-header-h) + 40px) clamp(20px, 6vw, 96px) 64px; }
.film__chapter[data-align="right"] .film__pin { justify-content: flex-end; padding-right: clamp(20px, 4vw, 64px); }
.film__copy { position: relative; width: min(25.5rem, 32vw); }
.film__copy::before {
  content: ""; position: absolute; z-index: -1; inset: -3.5rem -4.5rem; pointer-events: none;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--y-bg) 92%, transparent) 0%, color-mix(in srgb, var(--y-bg) 66%, transparent) 55%, transparent 76%);
}
.film__title { margin: 0; font-weight: 900; font-size: clamp(2.1rem, 3.7vw, 3.8rem); line-height: 1.16; letter-spacing: -0.02em; word-break: keep-all; overflow-wrap: anywhere; }
.film__title .latin { font-family: var(--y-font-latin); font-weight: 800; letter-spacing: -0.03em; }
.film__body { margin: 1.1rem 0 0; color: var(--y-ink-2); font-size: clamp(1rem, 1.25vw, 1.12rem); line-height: 1.9; max-width: 28em; }
.film__actions { margin-top: 1.7rem; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) {
  .film__pin, .film__chapter[data-align="right"] .film__pin { align-items: flex-end; justify-content: flex-start; padding: calc(var(--y-header-h) + 24px) 20px calc(44px + env(safe-area-inset-bottom)); }
  .film__media { inset: -14vh 0 14vh; inset: -14dvh 0 14dvh; }
  .film__copy { width: 100%; }
  .film__copy::before { inset: -3.5rem -20px -44px; background: linear-gradient(to top, transparent 0, var(--y-bg) 44px, var(--y-bg) 64%, color-mix(in srgb, var(--y-bg) 72%, transparent) 84%, transparent 100%); }
  .film__title { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .film__body { font-size: 0.95rem; line-height: 1.8; }
}
@media (prefers-reduced-motion: reduce) {
  .film__chapter, .film__chapter:last-child { min-height: 100vh; min-height: 100dvh; }
}

/* ---------- The five CTA garments (one per intent) ---------- */
.cta-pill { display: inline-flex; align-items: center; gap: 12px; padding: 8px 8px 8px 24px; border-radius: 999px; background: var(--y-pink); color: var(--y-ink); font-weight: 900; font-size: 1.02rem; text-decoration: none; box-shadow: 0 16px 30px -18px rgba(255, 62, 127, 0.9); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.cta-pill i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--y-surface); font-style: normal; font-size: 1.1rem; transition: transform 0.25s ease; }
.cta-pill:hover { transform: translateY(-2px); box-shadow: 0 22px 34px -18px rgba(255, 62, 127, 0.95); }
.cta-pill:hover i { transform: translateY(3px); }
.cta-pill:active { transform: scale(0.98); }

.cta-line { display: inline-flex; align-items: center; gap: 8px; color: var(--y-ink); font-weight: 900; font-size: 1.05rem; text-decoration: none; padding-bottom: 4px; background: linear-gradient(var(--y-pink), var(--y-pink)) 0 100% / 40% 3px no-repeat; transition: background-size 0.3s ease; }
.cta-line::after { content: "→"; font-family: var(--y-font-latin); transition: transform 0.25s ease; }
.cta-line:hover { background-size: 100% 3px; }
.cta-line:hover::after { transform: translateX(4px); }

.cta-frame { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 16px; border: 2px solid var(--y-ink); background: var(--y-surface); color: var(--y-ink); font-weight: 900; text-decoration: none; transition: background-color 0.2s ease, color 0.2s ease; }
.cta-frame::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(to bottom, var(--y-surface) 0 50%, var(--y-pink) 50%); box-shadow: 0 0 0 2px currentColor; }
.cta-frame:hover { background: var(--y-ink); color: var(--y-surface); }
.cta-frame:active { transform: translateY(1px); }

.cta-arrow { display: inline-flex; align-items: center; gap: 12px; color: var(--y-ink); font-weight: 900; text-decoration: none; }
.cta-arrow i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--y-ink); color: var(--y-surface); font-style: normal; font-family: var(--y-font-latin); transition: transform 0.25s ease; }
.cta-arrow:hover i { transform: translateX(5px) rotate(-12deg); }

.cta-text { display: inline-flex; align-items: center; gap: 6px; color: var(--y-ink); font-weight: 900; text-decoration: underline; text-decoration-color: var(--y-pink); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.cta-text::after { content: "→"; font-family: var(--y-font-latin); }
.cta-ghost { display: inline-flex; align-items: center; padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--y-ink); color: var(--y-ink); font-weight: 900; font-size: 0.95rem; text-decoration: none; transition: background-color 0.2s ease; }
.cta-ghost:hover { background: var(--y-surface); }
.cta-ghost:active { transform: scale(0.98); }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(48px, 6.5vw, 92px); }
.sec-title { margin: 0; font-weight: 900; font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.16; letter-spacing: -0.02em; }
.sec-lede { margin: 14px 0 0; color: var(--y-ink-2); max-width: 34em; font-size: 1.02rem; }

/* Genre bento: exactly four cells */
.bento { margin-top: 34px; display: grid; gap: 16px; grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: repeat(2, minmax(250px, auto)); }
.bento__tile { position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: start; gap: 2px; padding: 24px 26px; background: var(--y-tile); border: 1px solid rgba(21, 23, 28, 0.06); border-radius: var(--y-radius); box-shadow: var(--y-shadow); color: var(--y-ink); text-decoration: none; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease; }
.bento__tile:hover { transform: translateY(-3px); box-shadow: 0 1px 0 #fff inset, 0 32px 56px -30px rgba(21, 23, 28, 0.45); }
.bento__tile:active { transform: translateY(-1px) scale(0.995); }
.bento__tile--apps { grid-row: span 2; }
.bento__tile--notes { grid-column: span 2; }
.bento__en { font-family: var(--y-font-latin); font-weight: 800; font-size: 1.7rem; line-height: 1.1; letter-spacing: -0.01em; }
.bento__jp { font-weight: 700; font-size: 0.95rem; color: var(--y-ink-2); }
.bento__meta { margin-top: 10px; justify-self: start; font-weight: 700; font-size: 0.8rem; line-height: 1.6; padding: 2px 12px; border-radius: 999px; background: var(--y-surface); border: 1px solid var(--y-line); }
.bento__img { position: absolute; z-index: -1; right: -2%; bottom: -8%; width: min(64%, 290px); height: auto; aspect-ratio: 1; -webkit-mask-image: radial-gradient(closest-side, #000 74%, transparent 100%); mask-image: radial-gradient(closest-side, #000 74%, transparent 100%); }
.bento__tile--apps .bento__img { width: min(92%, 470px); right: 4%; bottom: -3%; }
.bento__tile--notes .bento__img { width: min(42%, 270px); right: 3%; bottom: -14%; }
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: none; gap: 12px; }
  .bento__tile { min-height: 214px; padding: 18px; }
  .bento__en { font-size: 1.4rem; }
  .bento__tile--apps { grid-column: span 2; grid-row: auto; min-height: 300px; }
  .bento__tile--notes { grid-column: span 2; min-height: 190px; }
  .bento__img { width: 78%; right: -10%; bottom: -12%; }
  .bento__tile--apps .bento__img { width: min(68%, 300px); right: 0; bottom: -6%; }
  .bento__tile--notes .bento__img { width: min(44%, 190px); }
}

/* App capsule rails */
.rail { margin-top: 46px; }
.rail__label { width: min(1160px, 100% - 32px); margin: 0 auto 12px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-weight: 400; }
.rail__en { font-family: var(--y-font-latin); font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1; letter-spacing: 0.02em; }
.rail__en::after { content: ""; display: inline-block; width: 0.2em; height: 0.2em; margin-left: 0.1em; border-radius: 50%; background: var(--y-pink); }
.rail__jp { font-weight: 700; color: var(--y-ink-2); font-size: 0.9rem; }
.rail__track { list-style: none; margin: 0; display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; padding: 10px max(16px, calc((100% - 1160px) / 2)) 28px; scroll-padding-inline: max(16px, calc((100% - 1160px) / 2)); }
.rail__shelf { width: min(1160px, 100% - 32px); height: 10px; margin: -30px auto 0; border-radius: 999px; background: linear-gradient(#ffffff, #e6eaf0); box-shadow: 0 8px 16px -10px rgba(21, 23, 28, 0.4); position: relative; z-index: -1; }
.cap { flex: 0 0 auto; scroll-snap-align: start; }
.cap a { position: relative; display: grid; grid-template-rows: 1fr 1fr; width: 148px; height: 256px; border-radius: 74px; overflow: hidden; background: var(--y-surface); border: 1px solid rgba(21, 23, 28, 0.08); box-shadow: var(--y-shadow); color: var(--y-ink); text-decoration: none; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cap a:hover { transform: translateY(-4px) rotate(-1.5deg); }
.cap a:active { transform: translateY(-1px) scale(0.98); }
.cap a:focus-visible { outline: 3px solid var(--y-pink); outline-offset: 4px; }
.cap__top { display: grid; place-items: center; padding-top: 20px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 48%), var(--tint); border-bottom: 2px solid rgba(21, 23, 28, 0.1); }
.cap__top img { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 10px 18px -10px rgba(21, 23, 28, 0.55); background: var(--y-surface); }
.cap__bottom { display: grid; align-content: start; justify-items: center; gap: 4px; padding: 12px 12px 0; text-align: center; }
.cap__name { font-weight: 900; font-size: 0.84rem; line-height: 1.35; max-width: 8.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cap__desc { font-size: 0.72rem; line-height: 1.5; color: var(--y-ink-2); max-width: 9.2em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cap[data-tint="pink"] { --tint: var(--y-cap-pink); }
.cap[data-tint="lemon"] { --tint: var(--y-cap-lemon); }
.cap[data-tint="sky"] { --tint: var(--y-cap-sky); }
.shelf__note { margin-top: 26px; color: var(--y-muted); font-size: 0.86rem; }
.shelf__note a { text-decoration-color: var(--y-pink); text-underline-offset: 3px; }
@media (min-width: 1024px) {
  .rail { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; margin-left: max(16px, calc((100% - 1160px) / 2)); }
  .rail__label { width: auto; margin: 0; flex-direction: column; align-items: flex-start; }
  .rail__track { padding: 10px 40px 28px 2px; scroll-padding-inline: 2px; }
  .rail__shelf { grid-column: 2; width: auto; margin: -30px 0 0; }
}

/* Tool feature with layered frames */
.tool__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.tool__name { margin: 26px 0 0; font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 900; line-height: 1.4; }
.tool__text p { color: var(--y-ink-2); max-width: 30em; }
.tool__text .cta-frame { margin-top: 8px; }
.tool__related { font-size: 0.88rem; margin-top: 22px; }
.tool__related a { font-weight: 700; text-decoration-color: var(--y-pink); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tool__frames { position: relative; margin: 0; min-height: 440px; }
.tool__frame { position: absolute; margin: 0; overflow: hidden; border-radius: 20px; background: var(--y-surface); border: 1px solid var(--y-line); box-shadow: 0 40px 70px -40px rgba(21, 23, 28, 0.55); }
.tool__frame img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.tool__frame--a { inset: 0 8% 20% 0; }
.tool__frame--b { inset: 42% 0 0 48%; rotate: 2deg; }
@media (max-width: 860px) {
  .tool__grid { grid-template-columns: 1fr; }
  .tool__frames { min-height: 0; aspect-ratio: 1 / 0.92; }
}

/* Quiz and notes diptych */
.duo__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duo__cell { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 18px; min-height: 340px; padding: clamp(26px, 4vw, 44px); border-radius: var(--y-radius); }
.duo__cell--quiz { background: var(--y-pink-soft); }
.duo__cell--notes { background: var(--y-surface); border: 1px solid var(--y-line); }
.duo__text { display: grid; gap: 14px; align-content: start; align-self: start; }
.duo__text p { margin: 0; color: var(--y-ink-2); max-width: 22em; }
.duo__text .sec-title { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.duo__text .cta-ghost, .duo__text .cta-arrow { justify-self: start; margin-top: 6px; }
.duo__name { margin: -4px 0 0; font-weight: 900; font-size: 1.15rem; line-height: 1.5; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-top: 1px solid var(--y-line); }
.notes li { border-bottom: 1px solid var(--y-line); }
.notes a { display: grid; gap: 2px; padding: 10px 2px; color: var(--y-ink); text-decoration: none; }
.notes a:hover .notes__title { text-decoration: underline; text-decoration-color: var(--y-pink); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.notes__date { font-family: var(--y-font-latin); font-weight: 600; font-size: 0.78rem; color: var(--y-muted); }
.notes__title { font-weight: 700; font-size: 0.92rem; line-height: 1.6; }
.notes__paid { margin-left: 6px; font-size: 0.72rem; font-weight: 700; padding: 0 8px; border-radius: 999px; border: 1px solid var(--y-line); color: var(--y-ink-2); white-space: nowrap; }
.duo__img { width: clamp(130px, 15vw, 190px); height: auto; aspect-ratio: 1; border-radius: 50%; background: var(--y-tile); box-shadow: var(--y-shadow); }
@media (max-width: 860px) {
  .duo__grid { grid-template-columns: 1fr; }
  .duo__cell { min-height: 0; grid-template-columns: 1fr; }
  .duo__img { justify-self: end; margin-top: -8px; width: 140px; }
}

/* About strip with the oversized capsule monogram */
.about { position: relative; overflow: hidden; display: grid; align-items: center; min-height: clamp(380px, 44vw, 520px); padding-block: 72px; }
.about__mono { position: absolute; left: clamp(-120px, -6vw, -48px); top: 50%; translate: 0 -50%; height: 82%; aspect-ratio: 32 / 54; border-radius: 999px; background: linear-gradient(170deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 40%), linear-gradient(to bottom, var(--y-cap-pink) 0 52%, var(--y-pink) 52% 100%); box-shadow: inset 0 0 0 2px rgba(21, 23, 28, 0.08), var(--y-shadow); display: grid; justify-items: center; }
.about__mono span { margin-top: 12%; font-family: var(--y-font-latin); font-weight: 800; font-size: clamp(5rem, 12vw, 10rem); line-height: 1; color: var(--y-pink); }
.about__inner { position: relative; display: grid; gap: 14px; padding-left: clamp(150px, 23vw, 320px); }
.about__name { margin: 0; font-family: var(--y-font-latin); font-weight: 800; font-size: clamp(1.7rem, 3.6vw, 2.8rem); letter-spacing: 0.01em; line-height: 1.15; }
.about__inner p { margin: 0; color: var(--y-ink-2); max-width: 30em; }
.about__links { display: flex; flex-wrap: wrap; gap: 14px 26px; margin-top: 8px !important; }
@media (max-width: 860px) {
  .about { min-height: 0; padding-block: 64px; }
  .about__mono { height: 300px; left: -84px; }
  .about__mono span { font-size: 4.6rem; }
  .about__inner { padding-left: 96px; }
  .about__name { font-size: 1.6rem; }
}

/* Ad slot (filled only after the AdSense review) */
.ad-slot { width: min(1160px, 100% - 32px); margin: 0 auto; padding-block: 24px; }
.ad-slot__label { display: block; font-size: 0.72rem; color: var(--y-muted); margin-bottom: 6px; }

/* ---------- Document pages ---------- */
.doc { padding: calc(var(--y-header-h) + 52px) 0 90px; }
.doc .y-wrap { max-width: 760px; }
.doc h1 { margin: 0 0 8px; font-weight: 900; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.25; letter-spacing: -0.01em; }
.doc .doc__date { margin: 0 0 30px; color: var(--y-muted); font-size: 0.88rem; }
.doc h2 { margin: 42px 0 10px; padding-top: 20px; border-top: 1px solid var(--y-line); font-weight: 900; font-size: 1.3rem; line-height: 1.5; }
.doc p, .doc li, .doc dd { color: var(--y-ink-2); }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--y-ink); font-weight: 700; text-decoration-color: var(--y-pink); text-decoration-thickness: 2px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.doc dl { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px 18px; margin: 0; }
.doc dt { font-weight: 900; }
.doc dd { margin: 0; }
@media (max-width: 560px) { .doc dl { grid-template-columns: 1fr; gap: 2px; } .doc dd { margin-bottom: 12px; } }
.lost { min-height: 70vh; display: grid; align-content: center; justify-items: start; gap: 18px; }
.lost img { width: 180px; height: auto; border-radius: 50%; background: var(--y-tile); box-shadow: var(--y-shadow); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .bento__tile:hover, .cap a:hover, .cta-pill:hover { transform: none; }
}
