@charset "UTF-8";

:root {
  color-scheme: dark;
  --background: #15100e;
  --paper: #f5eadd;
  --muted: #b9a99b;
  --amber: #e8b87d;
  --line: rgba(232, 184, 125, .22);
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  color: var(--paper);
  background: radial-gradient(ellipse at 85% 4%, rgba(111, 62, 31, .18), transparent 32%), var(--background);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }
::selection { background: #e8b87d; color: #15100e; }

.skip-link { position: fixed; top: 12px; left: 12px; z-index: 20; padding: 12px 20px; background: var(--paper); color: var(--background); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  padding: 16px max(32px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(21, 16, 14, .94);
}
@supports (backdrop-filter: blur(16px)) {
  .site-header { background: rgba(21, 16, 14, .86); backdrop-filter: blur(16px); }
}
.wordmark { display: flex; align-items: center; gap: 14px; font-family: var(--serif); font-size: 16px; letter-spacing: .12em; }
.wordmark-caption { display: block; margin-top: 5px; color: var(--muted); font-family: var(--sans); font-size: 8px; letter-spacing: .28em; }
.brand-symbol { position: relative; width: 30px; height: 30px; flex-shrink: 0; border: 1px solid var(--amber); border-radius: 50%; }
.brand-symbol::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--amber); border-radius: 50%; }
.brand-symbol::after { content: ""; position: absolute; width: 5px; height: 5px; top: -2px; left: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px rgba(232, 184, 125, .4); }
.character-nav { display: flex; gap: 32px; }
.character-nav a { position: relative; padding: 12px 2px; color: var(--muted); font-size: 12px; letter-spacing: .16em; transition: color .2s ease; }
.character-nav a::after { content: ""; position: absolute; bottom: 2px; left: 0; right: 2px; height: 1px; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.character-nav a:hover, .character-nav a[aria-current] { color: var(--amber); }
.character-nav a:hover::after, .character-nav a[aria-current]::after { transform: scaleX(1); }
main { max-width: 1160px; margin-inline: auto; }

.stories { padding-top: 34px; }
.story { position: relative; margin-bottom: 30px; scroll-margin-top: 16px; }
.story-misaki { --story-accent: #edbd87; --story-background: #20140f; --story-art: url("https://tonari-no-roulette-misaki.pages.dev/optimized-images/cg/misaki/title.png.32901c3c2d342794.webp"); }
.story-yoru { --story-accent: #d8bfdc; --story-background: #1b1420; --story-art: url("https://tonari-no-roulette-yoru.pages.dev/optimized-images/cg/yoru/title.png.ef3419c10ef92aee.webp"); }
.story-shizuku { --story-accent: #b7d3c8; --story-background: #14211e; --story-art: url("https://tonari-no-roulette-shizuku.pages.dev/optimized-images/cg/shizuku/title.png.201ae05a7cbe6d0e.webp"); }
.story-link { position: relative; display: flex; align-items: center; min-height: 548px; isolation: isolate; border: 1px solid rgba(245, 234, 221, .12); background: var(--story-background); transition: border-color .35s ease, box-shadow .35s ease; }
.story-art, .story-shade { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.story-art { left: 30%; background: var(--story-art) center 35% / cover no-repeat; }
.story-art::after { content: ""; position: absolute; inset: 0; background: var(--story-background); opacity: .08; transition: opacity .5s ease; }
.story-shade { background: linear-gradient(90deg, var(--story-background) 10%, var(--story-background) 28%, transparent 80%), linear-gradient(0deg, rgba(13, 10, 9, .48), transparent 32%); }
.story-copy { width: 56%; padding: 42px 54px; }
.story-meta { display: flex; align-items: center; gap: 15px; margin: 0 0 24px; color: var(--story-accent); font-size: 10px; letter-spacing: .14em; }
.story-number { font-family: Georgia, serif; font-size: 20px; font-style: italic; }
.meta-rule { width: 25px; height: 1px; flex-shrink: 0; background: var(--story-accent); opacity: .5; }
.story h2 { margin: 0; font-family: var(--serif); font-size: clamp(35px, 4.1vw, 50px); font-weight: 500; line-height: 1.5; letter-spacing: .13em; text-shadow: 0 2px 16px rgba(0, 0, 0, .25); }
.story h2 span { display: block; }
.story-character { display: flex; align-items: center; gap: 16px; margin: 18px 0 20px; color: var(--story-accent); font-size: 14px; letter-spacing: .2em; }
.story-character span { font-size: 8px; letter-spacing: .3em; }
.story-description { max-width: 345px; margin: 0; color: #e4d9d0; font-size: 12px; line-height: 2.2; letter-spacing: .05em; text-wrap: pretty; }
.story-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 245px; min-height: 48px; margin-top: 28px; padding-bottom: 9px; border-bottom: 1px solid rgba(245, 234, 221, .35); font-size: 12px; letter-spacing: .1em; transition: color .25s ease, border-color .25s ease; }
.action-arrow { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(245, 234, 221, .25); border-radius: 50%; font-size: 18px; transition: transform .25s ease, background .25s ease; }
.story-art-caption { position: absolute; bottom: 26px; right: 28px; color: #f5eadd; font-size: 8px; letter-spacing: .22em; text-shadow: 0 1px 5px #15100e; opacity: .85; }
.story-link:hover, .story-link:focus-visible { border-color: var(--story-accent); box-shadow: 0 14px 48px rgba(0, 0, 0, .2); }
.story-link:hover .story-art::after { opacity: 0; }
.story-link:hover .story-action, .story-link:focus-visible .story-action { color: var(--story-accent); border-color: var(--story-accent); }
.story-link:hover .action-arrow, .story-link:focus-visible .action-arrow { transform: translate(2px, -2px); background: rgba(245, 234, 221, .08); }
.story.is-entering .story-copy { animation: story-arrive .75s ease both; }
@keyframes story-arrive { from { opacity: .4; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.site-footer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; max-width: 1160px; margin: 0 auto; padding: 32px 0 38px; border-top: 1px solid var(--line); }
.footer-brand { display: flex; align-items: center; gap: 20px; font-family: var(--serif); font-size: 13px; letter-spacing: .1em; }
.footer-brand span[lang] { color: var(--muted); font-family: var(--sans); font-size: 8px; letter-spacing: .2em; }
.content-note { grid-row: 2; margin: 0; color: var(--muted); font-size: 10px; line-height: 2; }
.content-note span { display: inline-block; margin-right: 8px; padding: 0 5px; border: 1px solid var(--line); color: var(--amber); font-size: 9px; }
.creator-link { grid-column: 2; grid-row: 1 / 3; display: inline-flex; align-items: center; gap: 18px; min-height: 44px; color: var(--muted); font-size: 11px; }
.creator-link:hover { color: var(--amber); }

@media (max-width: 1240px) {
  main, .site-footer { margin-inline: 40px; }
  .site-header { padding-inline: 40px; }
  .story-copy { width: 60%; padding-inline: 40px; }
}

@media (max-width: 900px) {
  .story-link { min-height: 520px; }
  .story-copy { width: 70%; padding: 34px; }
  .story-art { left: 22%; }
  .story-shade { background: linear-gradient(90deg, var(--story-background) 0%, var(--story-background) 15%, transparent 100%), linear-gradient(0deg, rgba(13, 10, 9, .45), transparent); }
  .story-art-caption { font-size: 6px; right: 20px; }
  .footer-brand { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 85px; }
  main, .site-footer { margin-inline: 20px; }
  .site-header { min-height: 74px; padding: 12px 20px; gap: 12px; }
  .wordmark { gap: 9px; font-size: 12px; letter-spacing: .04em; }
  .wordmark-caption { font-size: 6px; letter-spacing: .2em; }
  .brand-symbol { width: 23px; height: 23px; }
  .brand-symbol::before { inset: 5px; }
  .brand-symbol::after { width: 4px; height: 4px; left: 9px; }
  .character-nav { gap: 15px; }
  .character-nav a { font-size: 10px; letter-spacing: .05em; }
  .stories { padding-top: 26px; }
  .story { margin-bottom: 24px; }
  .story-link { align-items: flex-end; min-height: 690px; }
  .story-art { left: 0; bottom: 22%; background-position: center 25%; }
  .story-shade { background: linear-gradient(0deg, var(--story-background) 0%, var(--story-background) 21%, transparent 86%); }
  .story-copy { width: 100%; padding: 235px 25px 34px; }
  .story-meta { gap: 11px; margin-bottom: 15px; font-size: 9px; letter-spacing: .09em; }
  .story-number { font-size: 18px; }
  .meta-rule { width: 19px; }
  .story h2 { font-size: 39px; line-height: 1.45; letter-spacing: .1em; }
  .story-character { margin: 15px 0 17px; font-size: 13px; }
  .story-description { max-width: 100%; font-size: 12px; line-height: 2.1; }
  .story-action { max-width: 100%; margin-top: 23px; }
  .story-art-caption { top: 20px; bottom: auto; left: 20px; right: auto; font-size: 7px; letter-spacing: .16em; }
  .site-footer { grid-template-columns: 1fr auto; gap: 20px 12px; padding-block: 26px 30px; }
  .footer-brand { gap: 7px; font-size: 12px; }
  .footer-brand span[lang] { font-size: 7px; }
  .content-note { grid-column: 1 / -1; font-size: 9px; }
  .creator-link { grid-row: 1; font-size: 10px; gap: 10px; }
}

@media (max-width: 360px) {
  main, .site-footer { margin-inline: 16px; }
  .site-header { padding-inline: 16px; }
  .wordmark { font-size: 11px; }
  .brand-symbol { display: none; }
  .character-nav { gap: 12px; }
  .story-copy { padding-inline: 22px; }
  .story h2 { font-size: 34px; }
  .story-meta { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
