
:root {
  --bg: #f7f3ea;
  --bg-deep: #10131b;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --ink: #17202c;
  --muted: #657080;
  --line: rgba(23, 32, 44, 0.12);
  --accent: #ef6f4d;
  --accent-2: #3b82f6;
  --accent-3: #13b981;
  --shadow: 0 24px 70px rgba(14, 22, 36, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --content: min(1120px, calc(100% - 40px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.75;
  background:
    radial-gradient(circle at top left, rgba(239, 111, 77, .22), transparent 30rem),
    radial-gradient(circle at 85% 15%, rgba(59, 130, 246, .17), transparent 28rem),
    linear-gradient(135deg, #fffaf0 0%, #f3f7ff 48%, #f7f3ea 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: -2;
  width: 42vmax;
  height: 42vmax;
  border-radius: 999px;
  filter: blur(60px);
  opacity: .36;
  transform: translate3d(0,0,0);
  animation: drift 18s ease-in-out infinite alternate;
}
body::before { left: -16vmax; top: 12vh; background: #ff8a65; }
body::after { right: -18vmax; bottom: -8vmax; background: #60a5fa; animation-duration: 22s; }

@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(7vmax,-4vmax,0) scale(1.12); }
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(59,130,246,.35); outline-offset: 3px; }

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: .7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.55);
  background: rgba(247, 243, 234, .78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.header-inner {
  width: var(--content);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  text-decoration: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #f59e0b 55%, var(--accent-2));
  box-shadow: 0 12px 30px rgba(239, 111, 77, .28);
}
.brand-text { font-size: clamp(1rem, 2vw, 1.18rem); }
.nav {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  padding: .58rem .85rem;
  border-radius: 999px;
  color: rgba(23, 32, 44, .76);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}
.nav a:hover { background: rgba(255,255,255,.74); color: var(--ink); }
.nav .language-link { border: 1px solid var(--line); background: rgba(255,255,255,.58); }

.hero {
  width: var(--content);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 118px) 0 clamp(34px, 5vw, 62px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr);
  align-items: center;
  gap: clamp(30px, 5vw, 64px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  color: #b45309;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
}
.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(239,111,77,.14);
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: .92;
  letter-spacing: -.08em;
}
.hero-lead {
  max-width: 46rem;
  margin: 1.45rem 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .78rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(14, 22, 36, .08);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(14, 22, 36, .12); background: #fff; }
.btn-primary { border: 0; color: #fff; background: linear-gradient(135deg, var(--ink), #2d3b52); }

.hero-card {
  position: relative;
  min-height: 390px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.45));
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: calc(var(--radius-xl) - 10px);
  border: 1px solid rgba(23, 32, 44, .09);
  background: radial-gradient(circle at 25% 15%, rgba(239,111,77,.28), transparent 15rem), radial-gradient(circle at 80% 82%, rgba(19,185,129,.18), transparent 15rem);
  z-index: -1;
}
.floating-book {
  position: absolute;
  width: 48%;
  max-width: 210px;
  aspect-ratio: 3 / 4.05;
  border-radius: 16px 22px 22px 16px;
  background: linear-gradient(135deg, rgba(23,32,44,.98), rgba(50,62,84,.96));
  box-shadow: 0 26px 55px rgba(14,22,36,.24);
  transform: rotate(-8deg);
  animation: floatBook 5.5s ease-in-out infinite;
}
.floating-book::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 13%;
  width: 8px;
  background: rgba(255,255,255,.18);
}
.floating-book::after {
  content: attr(data-label);
  position: absolute;
  left: 18%;
  right: 13%;
  top: 18%;
  color: #fff;
  font-weight: 900;
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  line-height: 1.2;
  letter-spacing: -.04em;
}
.book-a { left: 10%; top: 16%; }
.book-b { right: 9%; top: 24%; background: linear-gradient(135deg, #ef6f4d, #f59e0b); transform: rotate(10deg) scale(.83); animation-delay: -1.8s; }
.book-c { left: 34%; bottom: 9%; background: linear-gradient(135deg, #2563eb, #13b981); transform: rotate(4deg) scale(.72); animation-delay: -3.2s; }
@keyframes floatBook {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}
.hero-number {
  position: absolute;
  right: 26px;
  bottom: 20px;
  font-size: clamp(3.2rem, 8vw, 6rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.08em;
  color: rgba(23, 32, 44, .12);
}

.stats {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.stat {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 20px;
  background: rgba(255,255,255,.64);
  box-shadow: 0 12px 34px rgba(14,22,36,.08);
}
.stat strong { display: block; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.06em; }
.stat span { color: var(--muted); font-size: .92rem; }

.main {
  width: var(--content);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 86px) 0 72px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -.07em;
}
.section-heading p { margin: .5rem 0 0; color: var(--muted); }

.toolbar {
  position: sticky;
  top: 73px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 24px;
  background: rgba(255,255,255,.74);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(14,22,36,.08);
}
.search {
  width: 100%;
  min-height: 48px;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.84);
  color: var(--ink);
  font: inherit;
}
.filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.filter-btn {
  min-height: 42px;
  padding: .58rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: rgba(23, 32, 44, .72);
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.filter-btn:hover { transform: translateY(-1px); }
.filter-btn.is-active { border-color: transparent; background: var(--ink); color: #fff; }

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 24px);
}
.book-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(108px, 160px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 24px);
  min-height: 100%;
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,255,255,.62));
  box-shadow: 0 18px 50px rgba(14,22,36,.1);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease, box-shadow .28s ease, border-color .28s ease;
}
.book-card.is-visible { opacity: 1; transform: translateY(0); }
.book-card:hover { box-shadow: 0 26px 70px rgba(14,22,36,.16); border-color: rgba(239,111,77,.28); }
.book-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: .9;
}
.cover-wrap {
  align-self: start;
  position: sticky;
  top: 158px;
  perspective: 900px;
}
.cover {
  display: block;
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(14,22,36,.22);
  background: #fff;
  transform: rotateY(-7deg) rotateX(1deg);
  transform-origin: left center;
  transition: transform .35s ease, box-shadow .35s ease;
}
.book-card:hover .cover { transform: rotateY(0) translateY(-4px); box-shadow: 0 24px 48px rgba(14,22,36,.26); }
.book-body { min-width: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: .24rem .62rem;
  border-radius: 999px;
  background: rgba(239,111,77,.12);
  color: #9a3412;
  font-size: .78rem;
  font-weight: 900;
}
.book-title {
  margin: .7rem 0 .9rem;
  font-size: clamp(1.16rem, 2.2vw, 1.55rem);
  line-height: 1.34;
  letter-spacing: -.04em;
}
.book-subtitle {
  margin: -.45rem 0 .9rem;
  color: var(--muted);
  font-size: .96rem;
  font-weight: 700;
  line-height: 1.55;
}
.note {
  margin: 0 0 .85rem;
  padding: .75rem .9rem;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: rgba(239,111,77,.08);
  color: #7c2d12;
  font-weight: 700;
}
.meta {
  color: var(--muted);
  font-size: .96rem;
}
.meta p { margin: 0; }
.meta a { color: var(--ink); font-weight: 800; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1rem;
}
.book-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 38px;
  padding: .48rem .7rem;
  border-radius: 999px;
  background: rgba(23,32,44,.06);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.book-link[href*="amazon."]::before,
.book-link[href$=".zip"]::before {
  content: "";
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}
.book-link[href*="amazon."]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7V6a5 5 0 0 1 10 0v1h3l-1 14H5L4 7h3Zm2 0h6V6a3 3 0 0 0-6 0v1Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7V6a5 5 0 0 1 10 0v1h3l-1 14H5L4 7h3Zm2 0h6V6a3 3 0 0 0-6 0v1Z'/%3E%3C/svg%3E");
}
.book-link[href$=".zip"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m8.7 17.3-5.3-5.3 5.3-5.3 1.4 1.4L6.2 12l3.9 3.9-1.4 1.4Zm6.6 0-1.4-1.4 3.9-3.9-3.9-3.9 1.4-1.4 5.3 5.3-5.3 5.3Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m8.7 17.3-5.3-5.3 5.3-5.3 1.4 1.4L6.2 12l3.9 3.9-1.4 1.4Zm6.6 0-1.4-1.4 3.9-3.9-3.9-3.9 1.4-1.4 5.3 5.3-5.3 5.3Z'/%3E%3C/svg%3E");
}
.book-link:hover { background: rgba(23,32,44,.1); transform: translateY(-1px); }
.no-results {
  display: none;
  margin: 28px 0;
  padding: 1.3rem;
  border: 1px dashed rgba(23,32,44,.22);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}
.no-results.is-visible { display: block; }

.site-footer {
  position: relative;
  padding: 40px 0 54px;
  border-top: 1px solid rgba(23,32,44,.09);
  color: var(--muted);
}
.footer-inner {
  width: var(--content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.to-top {
  border: 0;
  border-radius: 999px;
  padding: .7rem .9rem;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .hero-card { min-height: 320px; }
  .book-grid { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; }
}
@media (max-width: 640px) {
  :root { --content: min(100% - 28px, 1120px); }
  .header-inner { min-height: auto; padding: 12px 0; align-items: flex-start; }
  .nav { gap: .25rem; }
  .nav a { padding: .45rem .58rem; font-size: .85rem; }
  .brand-text { display: none; }
  .stats { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .toolbar { position: static; }
  .book-card { grid-template-columns: 96px 1fr; border-radius: 22px; }
  .cover-wrap { position: static; }
  .cover { max-height: 150px; border-radius: 10px; }
  .actions { gap: .45rem; }
  .book-link { font-size: .84rem; }
}
@media (max-width: 430px) {
  .book-card { grid-template-columns: 1fr; }
  .cover { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
  .book-card { opacity: 1; transform: none; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
