:root {
  --ink: #f3efe6;
  --muted: #a39e94;
  --line: #3a3834;
  --paper: #0e0d0c;
  --card: transparent;
  --accent: #ffbc00;
  --header: #0a0a09;
  --header-text: #f3efe6;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  line-break: strict;
  text-wrap: pretty;
}
a { color: inherit; }
img { max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 32px;
  background: var(--header);
  color: var(--header-text);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: "Zen Old Mincho", serif;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  gap: 22px;
  margin-right: auto;
}
.site-nav a,
.header-actions a {
  color: var(--header-text);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.header-actions { display: flex; gap: 10px; align-items: center; }
.header-actions a {
  border: 1px solid rgba(243, 239, 230, 0.45);
  padding: 6px 12px;
}
.header-actions a.header-buy {
  background: #ffbc00;
  color: #161513;
  border-color: #ffbc00;
}

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.section { padding: 48px 0; }
.section + .section { border-top: 1px solid var(--line); }
.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.18em;
}
h1, h2, h3 { font-family: "Zen Old Mincho", serif; font-weight: 500; line-height: 1.4; text-wrap: balance; word-break: auto-phrase; }
h1 { font-size: clamp(36px, 5vw, 56px); margin: 0 0 12px; }
h2 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 20px; letter-spacing: -0.03em; }
h3 { font-size: 22px; margin: 0 0 8px; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  min-height: auto;
  padding: 56px 0 48px;
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -12%;
  top: -40%;
  width: 82%;
  height: 180%;
  background: radial-gradient(ellipse at 64% 38%, rgba(255, 222, 158, 0.26), rgba(255, 188, 0, 0.08) 34%, transparent 68%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 900;
  font-size: clamp(48px, 6.4vw, 76px);
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0 0 14px;
}
.hero-copy {
  margin: 0 0 18px;
  font-family: "Zen Old Mincho", serif;
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.45;
}
.release-mark {
  margin: 0 0 18px;
  color: rgba(243, 239, 230, 0.72);
  font-size: 12px;
  letter-spacing: 0.28em;
}
.release-date {
  display: block;
  margin-top: 6px;
  color: #ffbc00;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.14em;
}
.hero .lead {
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 500;
  max-width: none;
}
.gold { color: #ffbc00; }
.hero-author { margin: 16px 0 0; line-height: 1.6; }
.hero-author .role { color: var(--muted); font-size: 13px; }
.hero-author { font-size: 18px; }
.offer-band {
  display: flex;
  align-items: stretch;
  width: min(100%, 420px);
  margin-top: 22px;
  border: 1px solid #c4a15a;
  text-decoration: none;
  color: inherit;
}
.offer-label {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #ffbc00;
  color: #161513;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.offer-body {
  padding: 8px 14px;
  color: #ffbc00;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.book-frame { position: relative; padding: 48px 18px 18px 36px; overflow: visible; }
.book-frame::before {
  content: "";
  position: absolute;
  top: 4%;
  left: 0;
  width: 68%;
  aspect-ratio: 1;
  border: 2px solid #c9a45a;
  box-shadow: 0 0 40px rgba(255, 188, 0, 0.1);
  background: linear-gradient(145deg, rgba(255, 210, 120, 0.08), transparent 42%);
  pointer-events: none;
}
.book-frame::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 22%;
  bottom: 6px;
  width: 62%;
  height: 36px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%);
  pointer-events: none;
}
.book-frame .b3d-tilt { position: relative; z-index: 1; display: block; margin-left: auto; }
.b3d-tilt {
  --b3d-w: 300px;
  --b3d-h: 441px;
  width: var(--b3d-w);
  height: var(--b3d-h);
  perspective: 1400px;
}
.b3d-tilt .b3d-book {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(3deg);
  transition: transform .12s ease-out;
}
.b3d-tilt .b3d-book.is-idle {
  animation: b3d-idle 4s ease-in-out infinite;
}
@keyframes b3d-idle {
  0%, 100% { transform: rotateY(-24deg) rotateX(1deg) translateY(0); }
  50% { transform: rotateY(-6deg) rotateX(9deg) translateY(-16px); }
}
.b3d-tilt .b3d-spine {
  position: absolute;
  left: -8px;
  top: 2px;
  width: 8px;
  height: calc(100% - 4px);
  background: linear-gradient(90deg, #040403, #19180f);
  transform: rotateY(-90deg);
  transform-origin: right center;
}
.b3d-tilt .b3d-pages {
  position: absolute;
  right: -11px;
  top: 3px;
  width: 11px;
  height: calc(100% - 6px);
  background: repeating-linear-gradient(180deg, #f7f6f0 0px, #e6e3d8 1.5px, #f7f6f0 3px);
  transform: rotateY(90deg);
  transform-origin: left center;
}
.b3d-tilt .b3d-cover {
  position: absolute;
  inset: 0;
  border-radius: 1px 3px 3px 1px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 34px -10px rgba(0, 0, 0, .55);
}
.b3d-tilt .b3d-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.qa-label {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.world { text-align: center; }
.world h2 {
  max-width: 14em;
  margin: 0 auto 22px;
  font-size: clamp(34px, 4.6vw, 56px);
  letter-spacing: 0.02em;
}
.world h2 span { display: block; }
.world-line { font-size: 0.58em; font-weight: 500; }
.world .lead,
.world-close,
.hero-copy,
.hero .lead {
  word-break: auto-phrase;
}
.world .lead {
  max-width: 52em;
  margin: 0 auto 36px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.9;
}
.qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
}
.card.qa-card {
  background: #f4efe4;
  color: #1c1915;
  border: none;
  border-radius: 14px;
  padding: 22px 20px;
}
.card.qa-card h3,
.card.qa-card p {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
}
.card.qa-card h3 { margin: 0 0 12px; }
.qa-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45em;
  height: 1.45em;
  margin-right: 8px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  vertical-align: 0.05em;
}
.qa-mark.q { background: #1c1915; color: #f4efe4; }
.qa-mark.a { background: #ffbc00; color: #161513; }
.world-close {
  max-width: 40em;
  margin: 36px auto 0;
  color: rgba(243, 239, 230, 0.86);
  font-size: 14px;
  line-height: 1.95;
}
.world-close p { margin: 0; }
.world-sign { margin-top: 1.3em; }
.lead { max-width: 28em; font-size: 20px; }
.intro {
  max-width: 32em;
  margin: 0 0 40px;
  font-family: "Zen Old Mincho", serif;
  font-size: 18px;
  line-height: 1.9;
}
.intro p { margin: 0 0 1em; }
.intro p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-block;
  padding: 12px 18px;
  text-decoration: none;
  background: #ffbc00;
  color: #161513;
  font-size: 14px;
  border: 0;
}
.button.secondary { background: transparent; color: #f3efe6; border: 1px solid #f3efe6; }
.button.ghost { background: transparent; color: var(--paper); border: 1px solid rgba(247, 244, 238, 0.5); }

.cover {
  aspect-ratio: 3 / 4;
  background: #ffbc00;
  color: #161513;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  font-family: "Zen Old Mincho", serif;
  box-shadow: none;
}
.cover small { letter-spacing: 0.14em; opacity: 0.7; }
.cover strong { font-size: 36px; font-weight: 500; }
.cover.book-cover {
  aspect-ratio: 143 / 210;
  padding: 0;
  background: #fff;
  overflow: hidden;
}
.cover.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.cover.profile-cover {
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  align-self: start;
  height: auto;
}
.cover.profile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.colophon { display: grid; gap: 10px; margin: 28px 0 12px; }
.colophon div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; }
.colophon dt { margin: 0; color: var(--muted); }
.colophon dd { margin: 0; }

.cards, .quote-grid, .term-list { display: grid; gap: 16px; }
.cards { grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.card, .term-card, .quote, .empty {
  background: var(--card);
  border: none;
  border-top: 1px solid var(--line);
  padding: 22px 0;
}
.card p, .term-card p, .quote p { margin: 0; }

.toc { display: grid; gap: 0; }
.toc-row {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  margin: 0;
  font-family: "Zen Old Mincho", serif;
  font-size: 16px;
}
#profile .cards {
  grid-template-columns: minmax(220px, 320px) 1fr;
  align-items: start;
}
#profile { word-break: auto-phrase; }
#profile .cover { width: 100%; max-width: 320px; }
.section-quiet { padding-top: 28px; padding-bottom: 12px; }
.section-quiet h2 { font-size: 22px; }
#contact {
  background: #f4efe4;
  color: #1c1915;
}
#contact h2,
#contact p { font-family: "Zen Old Mincho", serif; color: #1c1915; }
#contact .button { background: #ffbc00; color: #161513; }

.quote-grid { grid-template-columns: repeat(3, 1fr); }
.term-list { grid-template-columns: 1fr; }
.term-card h3 { margin-bottom: 4px; }
.term-card-link { display: block; color: inherit; text-decoration: none; }
.term-card-link:hover h3 { color: var(--accent); }
.yomi { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.tag {
  display: block;
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.skip {
  position: absolute;
  left: 16px;
  top: 8px;
  transform: translateY(-160%);
  z-index: 20;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
}
.skip:focus { transform: none; }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.tab-labels label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.prose { max-width: 740px; }
.prose h1 + p,
.term-card p { word-break: auto-phrase; }
.prose h1 .muted { display: block; margin-top: 4px; font-size: 0.42em; letter-spacing: 0.04em; }
.prose p { margin: 0 0 1em; }
blockquote {
  margin: 0 0 1em;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: #1c1915;
  color: var(--muted);
}
.prose .term-list { margin: 0 0 1em; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; }

.tab-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.tab-labels { display: flex; gap: 8px; margin: 20px 0; }
.tab-labels label {
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 16px;
  cursor: pointer;
}
#tab-list:checked ~ .tab-labels label[for="tab-list"],
#tab-kana:checked ~ .tab-labels label[for="tab-kana"],
#tab-chapter:checked ~ .tab-labels label[for="tab-chapter"] {
  background: #ffbc00;
  color: #161513;
}
#tab-list:focus-visible ~ .tab-labels label[for="tab-list"],
#tab-kana:focus-visible ~ .tab-labels label[for="tab-kana"],
#tab-chapter:focus-visible ~ .tab-labels label[for="tab-chapter"] {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.panel { display: none; }
#tab-list:checked ~ .panels .panel-list,
#tab-kana:checked ~ .panels .panel-kana,
#tab-chapter:checked ~ .panels .panel-chapter { display: block; }
.index-group { margin: 0 0 28px; }
.index-group h2 { font-size: 22px; }
input, textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #1c1915;
  color: var(--ink);
}
.site-footer {
  background: #11100e;
  color: #f3efe6;
  padding: 40px 0 28px;
}
.site-footer .brand { white-space: normal; max-width: 18em; font-size: 26px; }
.site-footer .brand .footer-subtitle { display: block; font-size: 14px; letter-spacing: 0.04em; margin-top: 4px; }
.site-footer a { color: #f3efe6; }
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.site-footer a.footer-action {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid rgba(243, 239, 230, 0.45);
  text-decoration: none;
}
.site-footer a.footer-buy {
  background: #ffbc00;
  color: #161513;
  border-color: #ffbc00;
}
.crumb { font-size: 14px; color: var(--muted); }
.crumb a { color: var(--accent); }

.bg-motion {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
main > *:not(.bg-motion) {
  position: relative;
  z-index: 1;
}
.orbit-ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(70vmin, 620px);
  height: min(70vmin, 620px);
  margin: calc(min(70vmin, 620px) / -2) 0 0 calc(min(70vmin, 620px) / -2);
  border: 1px solid rgba(255, 188, 0, 0.1);
  border-radius: 50%;
  animation: spin 36s linear infinite;
}
.orbit-ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: rgba(255, 188, 0, 0.5);
}
.orbit-ring-b {
  width: min(96vmin, 860px);
  height: min(96vmin, 860px);
  margin: calc(min(96vmin, 860px) / -2) 0 0 calc(min(96vmin, 860px) / -2);
  border-color: rgba(255, 188, 0, 0.06);
  animation: spin 58s linear infinite reverse;
}
.orbit-ring-b::after {
  width: 4px;
  height: 4px;
  top: -2px;
  margin-left: -2px;
  background: rgba(255, 188, 0, 0.35);
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .orbit-ring { animation: none; }
  .b3d-tilt .b3d-book.is-idle { animation: none; }
}

@media (max-width: 800px) {
  .site-header { flex-wrap: wrap; padding: 12px 16px; }
  .site-nav { order: 3; width: 100%; gap: 14px; }
  .hero, .cards, .qa-grid, .quote-grid, #profile .cards { grid-template-columns: 1fr; }
  .wrap { width: min(var(--max), calc(100% - 28px)); }
}
