:root {
  /* Colors */
  --bg:        #e3edef;
  --panel:     #f5f5f5;
  --ink:       #1f1f1f;
  --muted:     #6f6a63;
  --sub:       #555;
  --sub-light: #666;
  --line:      rgba(0, 0, 0, .08);
  --glass:     rgba(255, 255, 255, .55);
  --accent-bg: rgba(233, 225, 215, .78);

  /* Typography */
  --font-body:    "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Cormorant Garamond", serif;

  /* Layout */
  --max: 1080px;
}

/* =========================
   Base
========================= */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  letter-spacing: .02em;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container {
  width: min(var(--max), calc(100% - 56px));
  margin-inline: auto;
}

/* =========================
   Header
========================= */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px 0 14px;
  gap: 24px;
}
.brand small {
  display: block;
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 14px;
  letter-spacing: .28em;
  color: var(--muted);
  margin-bottom: 6px;
}
.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: .08em;
}
.brand p {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 640px;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 14px;
  letter-spacing: .22em;
  color: var(--ink);
  white-space: nowrap;
}
nav a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  opacity: .9;
}
nav a:hover {
  border-bottom-color: rgba(0, 0, 0, .35);
  opacity: 1;
}

/* =========================
   Hero
========================= */
.hero {
  padding: 22px 0 34px;
}
.hero-frame {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}
.hero-img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

/* =========================
   Sections
========================= */
section {
  padding: 60px 0;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 44px;
  letter-spacing: .18em;
  margin: 0 0 26px;
  text-align: center;
}
.subtle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* =========================
   Works — Shelf grid
========================= */
.works-shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 22px;
}
.shelf-item {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  width: 180px;
  max-width: 180px;
  transition: transform .25s ease, filter .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.shelf-item:hover {
  transform: translateY(-4px);
}
.shelf-item:focus-visible {
  outline: 2px solid rgba(0, 103, 136, .5);
  outline-offset: 6px;
  border-radius: 4px;
}
.shelf-cover {
  position: relative;
  width: 100%;
  max-width: 180px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px;
  box-shadow: 2px 3px 10px rgba(0,0,0,.06);
  transition: box-shadow .25s ease;
}
.shelf-item:hover .shelf-cover {
  box-shadow: 3px 6px 18px rgba(0,0,0,.1);
}
.shelf-cover > img {
  width: 100%;
  height: auto;
  display: block;
}
.shelf-label {
  font-size: 12px;
  line-height: 1.5;
  color: var(--sub);
  letter-spacing: .04em;
}

/* Status tag on cover */
.shelf-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 3px 8px;
  font-size: 10px !important;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.4;
  border-radius: 2px;
  pointer-events: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  max-width: 60px;
  text-align: center;
}
.tag-new {
  background: rgba(0, 103, 136, .85);
  color: #fff;
}
.tag-live {
  background: rgba(72, 133, 105, .82);
  color: #fff;
}
.tag-published {
  background: rgba(0, 0, 0, .06);
  color: var(--muted);
  border: 1px solid rgba(0, 0, 0, .1);
}
.tag-wip {
  background: rgba(253, 210, 43, .8);
  color: #fff;
}

/* Active thumbnail indicator */
.shelf-item.is-active .shelf-cover {
  box-shadow: 0 0 0 2px rgba(0, 103, 136, .45), 3px 6px 18px rgba(0,0,0,.1);
}
.shelf-item.is-active .shelf-label {
  color: var(--ink);
  font-weight: 500;
}

/* =========================
   Works — Detail panel
========================= */
.work-detail-area {
  margin-top: 32px;
}
.work-detail {
  position: relative;
  background: rgba(255, 255, 255, .35);
  border: 1px solid var(--line);
  padding: 20px;
  animation: detailFadeIn .35s ease;
}
@keyframes detailFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.detail-close {
  all: unset;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  transition: color .2s;
  z-index: 2;
}
.detail-close:hover { color: var(--ink); }
.detail-close:focus-visible {
  outline: 2px solid rgba(0, 103, 136, .5);
  outline-offset: 2px;
}

.work-inner {
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  padding: 40px;
  align-items: start;
}
.work-media {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.work-media img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.work-meta {
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
}
.work-meta h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .14em;
}
.work-meta p {
  line-height: 1.8;
  color: var(--sub);
  font-size: 13px;
}
.work-meta dl {
  margin: 0;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px 4px;
  font-size: 12px;
  color: var(--muted);
}
.work-meta dt { letter-spacing: .12em; }
.work-meta dd { margin: 0; }
.work-actions {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  letter-spacing: .18em;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, .18);
  background: rgba(255, 255, 255, .55);
  transition: .2s;
}
.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .75);
}

/* =========================
   About
========================= */
.about {
  padding: 120px 20px;
  display: flex;
  justify-content: center;
}
.about-wrapper {
  width: 100%;
  max-width: 820px;
}
.about-card {
  background: var(--glass);
  border: 1px solid var(--line);
  padding: 60px 70px;
  backdrop-filter: blur(6px);
}
.about-title {
  font-family: var(--font-display);
  font-size: 48px;
  letter-spacing: .2em;
  margin: 0 0 50px;
  text-align: center;
}
.about-name {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: .12em;
  margin: 0 0 6px;
}
.about-role {
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--sub-light);
  margin: 0 0 24px;
}
.about-text {
  line-height: 1.6;
  color: var(--sub);
  margin-bottom: 40px;
}
.list {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.list h4 {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .15em;
  margin-bottom: 18px;
}
.list ul {
  list-style: none;
  padding-left: 0;
  line-height: 1.6;
  color: var(--sub);
}
.list ul li {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 0 .5em;
  margin-bottom: 6px;
}
.media-links {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
.media-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(0, 0, 0, .7);
  letter-spacing: .08em;
  white-space: nowrap;
}
.media-links a::before {
  content: "❖";
  opacity: .6;
}
.media-links a:hover {
  color: rgba(0, 0, 0, .95);
}

/* =========================
   Contact
========================= */
.contact-panel {
  width: min(720px, 100%);
  margin-inline: auto;
  background: var(--glass);
  border: 1px solid var(--line);
  padding: 44px 34px;
}
.send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: #006788;
  color: #fff;
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 20px;
  letter-spacing: .22em;
  cursor: pointer;
  text-decoration: none;
  transition: .2s;
}
.send:hover {
  transform: translateY(-1px);
  opacity: .92;
}
.contact-actions {
  margin-top: 18px;
}
.contact-note {
  text-align: center;
  margin: 12px 0 0;
}

/* =========================
   Footer
========================= */
footer {
  padding: 30px 0 60px;
  color: rgba(0, 0, 0, .35);
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 16px;
  text-align: center;
}

/* =========================
   Responsive
========================= */
@media (max-width: 900px) {
  .nav { align-items: flex-start; flex-direction: column; }
  nav ul { gap: 16px; flex-wrap: wrap; }
  .about-card { padding: 40px 28px; }
  .brand h1 { font-size: 28px; }
  .section-title { font-size: 36px; }
  .work-detail { padding: 8px; }
  .work-inner { grid-template-columns: 1fr; padding: 24px 16px; gap: 20px; }
  .work-media img { width: min(280px, 100%); }
  .work-meta { padding: 0; }
  .work-meta dl { grid-template-columns: 5em 1fr; gap: 6px 10px; }
  .work-meta p { line-height: 1.9; }
  .work-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .work-actions .btn {
    width: 100%;
    text-align: center;
    padding: 12px 14px;
    white-space: nowrap;
  }
  .works-shelf {
    gap: 20px 14px;
  }
  .shelf-item,
  .shelf-cover {
    width: 140px;
    max-width: 140px;
  }
}

/* =========================
   Novels — Shelf grid
   (mirrors Works shelf)
========================= */
.novels-shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 22px;
}

/* =========================
   Novel TOC page
========================= */
.toc-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.toc-page main {
  flex: 1;
}
.toc-hero {
  padding: 40px 0 0;
  text-align: center;
}
.toc-hero-img {
  width: min(320px, 60%);
  margin-inline: auto;
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px;
  box-shadow: 2px 3px 10px rgba(0,0,0,.06);
}
.toc-hero-img img {
  width: 100%;
  height: auto;
}
.toc-synopsis {
  max-width: 660px;
  margin: 28px auto 0;
  padding: 0 20px;
  line-height: 1.9;
  color: var(--sub);
  font-size: 14px;
  text-align: left;
}
.toc-meta {
  max-width: 660px;
  margin: 16px auto 0;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .06em;
}
.toc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.toc-meta-item::before {
  content: "―";
  opacity: .4;
}
.toc-actions {
  max-width: 660px;
  margin: 28px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.toc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border: 1px solid rgba(0, 0, 0, .18);
  background: rgba(255, 255, 255, .55);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--ink);
  transition: .2s;
  text-decoration: none;
}
.toc-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .8);
}

/* Episode list */
.toc-section {
  padding: 40px 0 80px;
}
.toc-list {
  max-width: 660px;
  margin-inline: auto;
  padding: 0 20px;
}
.toc-heading {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .15em;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

/* Latest episode highlight */
.toc-latest {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.toc-latest-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  padding: 3px 10px;
  background: rgba(0, 103, 136, .85);
  color: #fff;
  border-radius: 2px;
  margin-bottom: 10px;
}
.toc-latest-link {
  display: block;
  text-decoration: none;
  color: var(--ink);
  transition: opacity .2s;
}
.toc-latest-link:hover {
  opacity: .7;
}
.toc-latest-title {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 4px;
  letter-spacing: .04em;
}
.toc-latest-date {
  font-size: 12px;
  color: var(--muted);
}

/* Episode list items */
.toc-ep-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-ep-item {
  border-bottom: 1px solid var(--line);
}
.toc-ep-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  text-decoration: none;
  color: var(--ink);
  transition: background .2s, opacity .2s;
}
.toc-ep-link:hover {
  background: rgba(255, 255, 255, .4);
  opacity: .8;
}
.toc-ep-title {
  font-size: 14px;
  letter-spacing: .04em;
}
.toc-ep-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  margin-left: 16px;
}

/* =========================
   Episode reading page
========================= */
.ep-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.ep-page main {
  flex: 1;
}

/* Episode navigation */
.ep-nav {
  max-width: 660px;
  margin-inline: auto;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.ep-nav a,
.ep-nav span {
  padding: 8px 14px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: rgba(255, 255, 255, .45);
  color: var(--sub);
  text-decoration: none;
  letter-spacing: .06em;
  transition: .2s;
}
.ep-nav a:hover {
  background: rgba(255, 255, 255, .75);
  color: var(--ink);
}
.ep-nav .ep-nav-disabled {
  opacity: .35;
  pointer-events: none;
}

/* Episode header */
.ep-header {
  max-width: 660px;
  margin: 32px auto 0;
  padding: 0 20px;
  text-align: center;
}
.ep-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .1em;
  margin: 0 0 8px;
  color: var(--ink);
}
.ep-date {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
}

/* Episode body */
.ep-body {
  max-width: 660px;
  margin: 36px auto 0;
  padding: 40px 48px 60px;
  font-family: "游明朝", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "HG明朝E", "Noto Serif JP", serif !important;
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--ink);
  letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
  background: #faf8f5;
  border: 1px solid var(--line);
}
.ep-body p {
  margin: 0 0 1.6em;
  text-indent: 1em;
}
.ep-body p.no-indent {
  text-indent: 0;
}

/* Dash (——) kerning fix */
.ep-dash {
  letter-spacing: -.26em;
  margin-right: .3em;
}

/* Scene break */
.ep-scene-break {
  text-align: center;
  margin: 2.4em 0;
  color: var(--muted);
  letter-spacing: .6em;
  font-size: 13px;
}

/* Share */
.ep-share {
  max-width: 660px;
  margin: 0 auto 40px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
}
.ep-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: rgba(255, 255, 255, .45);
  color: var(--sub);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .06em;
  transition: .2s;
}
.ep-share-btn:hover {
  background: rgba(255, 255, 255, .75);
  color: var(--ink);
}

/* Bottom nav */
.ep-nav-bottom {
  padding-bottom: 40px;
}

/* =========================
   Responsive — Novel pages
========================= */
@media (max-width: 900px) {
  .novels-shelf {
    gap: 20px 14px;
  }
  .novels-shelf .shelf-item,
  .novels-shelf .shelf-cover {
    width: 140px;
    max-width: 140px;
  }
  .toc-hero-img {
    width: 70%;
  }
  .toc-actions {
    grid-template-columns: 1fr;
  }
  .ep-title {
    font-size: 22px;
  }
  .ep-body {
    font-size: 15px;
    line-height: 1.9;
    padding: 40px 20px 48px;
    background: #faf8f5;
    border: 1px solid var(--line);
  }
  .ep-nav {
    gap: 6px;
    font-size: 12px;
  }
  .ep-nav a,
  .ep-nav span {
    padding: 7px 10px;
  }
}
