:root {
  color-scheme: light dark;
  --page: #f7f5f0;
  --surface: #ffffff;
  --surface-muted: #eeece6;
  --ink: #232a29;
  --ink-soft: #5f6865;
  --line: #deded6;
  --accent: #9f4d38;
  --accent-dark: #843b2c;
  --accent-soft: #f7e8e1;
  --hero: #ece8dc;
  --shadow: 0 18px 45px rgba(36, 43, 39, 0.06);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  line-height: 1.7;
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; width: 100%; height: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.section { padding-block: 92px; }

.skip-link {
  position: absolute;
  z-index: 20;
  top: -100px;
  left: 20px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--surface);
}
.skip-link:focus { top: 12px; }

.notice-bar { background: #283331; color: #f7f4ea; }
.notice-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 32px;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.notice-bar__separator { width: 1px; height: 12px; background: rgba(255, 255, 255, 0.36); }

.site-header { position: relative; z-index: 2; background: var(--page); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; justify-content: space-between; align-items: center; min-height: 76px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; white-space: nowrap; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}
.brand__name { font-size: 20px; font-weight: 800; letter-spacing: -0.05em; }
.brand__name span, .site-footer__brand span { color: var(--accent); font-family: Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.03em; }
.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a { font-size: 13px; font-weight: 700; text-decoration: none; }
.site-nav a:hover { color: var(--accent-dark); }

.hero { overflow: hidden; background: var(--hero); }
.hero__inner { display: grid; grid-template-columns: 1.08fr 0.92fr; align-items: center; min-height: 510px; }
.hero__copy { padding-block: 78px 90px; position: relative; z-index: 1; }
.eyebrow, .section-heading__eyebrow, .results-toolbar__eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font: 700 11px/1.5 Arial, sans-serif;
  letter-spacing: 0.18em;
}
.eyebrow { display: flex; align-items: center; gap: 13px; }
.eyebrow__line { width: 34px; height: 1px; background: var(--accent); }
.hero h1 {
  margin: 27px 0 21px;
  font-size: clamp(38px, 4.5vw, 62px);
  line-height: 1.35;
  letter-spacing: -0.055em;
  font-weight: 800;
}
.hero h1 span { color: var(--accent-dark); }
.hero__description { max-width: 450px; margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 2; }
.hero__action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  min-width: 184px;
  margin-top: 34px;
  padding: 13px 19px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.hero__action:hover { background: var(--accent-dark); transform: translateY(-2px); }
.hero__action span { font-size: 19px; font-weight: 400; line-height: 1; }
.hero__visual { position: relative; width: min(100%, 500px); aspect-ratio: 1; justify-self: end; }
.hero__orbit { position: absolute; border: 1px solid rgba(160, 113, 88, 0.3); border-radius: 50%; }
.hero__orbit--outer { inset: 3%; }
.hero__orbit--inner { inset: 15%; border-style: dashed; }
.hero__visual::before, .hero__visual::after { content: ""; position: absolute; border-radius: 50%; }
.hero__visual::before { inset: 26%; background: #ddc7ae; box-shadow: 0 0 0 25px rgba(255,255,255,0.17); }
.hero__visual::after { width: 18%; aspect-ratio: 1; top: 8%; right: 10%; background: #b7674c; }
.hero__visual-center {
  position: absolute;
  z-index: 1;
  inset: 30%;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: #f7eee0;
  box-shadow: 0 15px 45px rgba(77, 55, 42, 0.14);
  color: #7f4838;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.5;
}
.hero__spark { position: absolute; z-index: 1; color: #b86d50; }
.hero__spark--one { top: 17%; left: 10%; font-size: 36px; }
.hero__spark--two { right: 12%; bottom: 17%; font-size: 29px; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 32px; }
.section-heading h2, .about h2 { margin: 7px 0 0; font-size: clamp(27px, 3vw, 36px); line-height: 1.45; letter-spacing: -0.04em; }
.section-heading__description { max-width: 350px; margin: 0 0 3px; color: var(--ink-soft); font-size: 13px; }

.media-section { padding-bottom: 24px; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.media-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 190px; padding: 22px 25px; border-radius: 9px; color: #fff; text-decoration: none; background: #536d69; transition: transform 0.2s; }
.media-tile:hover { transform: translateY(-3px); }
.media-tile::after { content: ""; position: absolute; width: 210px; height: 210px; right: -65px; top: -45px; border: 1px solid rgba(255,255,255,0.36); border-radius: 50%; box-shadow: 0 0 0 38px rgba(255,255,255,0.07); }
.media-tile--doujin { background: #8f6574; }
.media-tile--video { background: #8c5a42; }
.media-tile__number { position: relative; z-index: 1; font: 700 10px/1.4 Arial, sans-serif; letter-spacing: 0.15em; }
.media-tile strong { position: relative; z-index: 1; margin-top: 19px; font-size: 33px; line-height: 1.3; }
.media-tile > span:last-child { position: relative; z-index: 1; align-self: flex-end; font-size: 12px; font-weight: 700; }

.search-panel { padding: 30px 34px 27px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.search-form label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.search-form__row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 5px 5px 5px 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--page); }
.search-form__row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-form__icon { width: 21px; height: 21px; flex: none; color: var(--ink-soft); }
.search-form input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.search-form input::placeholder { color: #888f8a; }
.search-form button, .empty-state button { flex: none; border: 0; border-radius: 5px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.search-form button { min-width: 119px; padding: 11px 16px; }
.search-form button:hover, .empty-state button:hover { background: var(--accent-dark); }
.search-form button span { margin-left: 9px; font-size: 17px; font-weight: 400; }
.genre-filter { display: flex; align-items: center; gap: 20px; margin-top: 23px; }
.genre-filter__label { color: var(--ink-soft); font-size: 12px; font-weight: 700; white-space: nowrap; }
.genre-filter__buttons { display: flex; flex-wrap: wrap; gap: 9px; }
.genre-button { min-width: 77px; padding: 7px 18px; border: 1px solid var(--line); border-radius: 100px; background: var(--surface); color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.genre-button:hover { border-color: var(--accent); color: var(--accent-dark); }
.genre-button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); }

.results-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 55px 0 22px; }
.results-toolbar h3 { display: flex; align-items: baseline; gap: 15px; margin: 4px 0 0; font-size: 22px; line-height: 1.4; }
.results-toolbar h3 span { color: var(--accent-dark); font-size: 14px; font-weight: 700; }
.results-toolbar__note { margin: 0 0 3px; color: var(--ink-soft); font-size: 11px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.work-card { overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); transition: transform 0.2s, box-shadow 0.2s; }
.work-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.work-card__artwork-link { display: block; text-decoration: none; }
.work-card__artwork { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; height: 176px; padding: 18px 22px; color: #fff; background: #536d69; }
.work-card--doujin .work-card__artwork { background: #8f6574; }
.work-card--video .work-card__artwork { background: #8c5a42; }
.work-card__artwork::before, .work-card__artwork::after { content: ""; position: absolute; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 50%; }
.work-card__artwork::before { width: 190px; height: 190px; right: -12px; top: -70px; }
.work-card__artwork::after { width: 140px; height: 140px; right: 55px; top: 80px; }
.work-card__number, .work-card__artwork-label { position: relative; z-index: 1; font: 700 10px/1.4 Arial, sans-serif; letter-spacing: 0.15em; }
.work-card__artwork-label { align-self: end; font-family: inherit; font-size: 28px; font-weight: 700; letter-spacing: 0.1em; }
.work-card__shape { position: absolute; top: 20px; left: 42%; width: 120px; height: 120px; border-radius: 48% 52% 43% 57%; background: rgba(255, 255, 255, 0.14); transform: rotate(25deg); }
.work-card__body { padding: 19px 21px 21px; }
.work-card__genre { display: inline-block; padding: 2px 9px; border-radius: 3px; background: var(--surface-muted); color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.work-card h3, .work-card h4 { margin: 11px 0 6px; font-size: 17px; letter-spacing: -0.02em; }
.work-card__title-link { text-decoration: none; }
.work-card__title-link:hover { color: var(--accent-dark); text-decoration: underline; }
.work-card__body p { min-height: 44px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.work-card__sample-note { display: block; margin-top: 19px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 18px; color: var(--ink-soft); font-size: 11px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.category-hero { overflow: hidden; background: var(--hero); }
.category-hero__inner { position: relative; display: flex; align-items: center; min-height: 225px; }
.category-hero h1 { position: relative; z-index: 1; margin: 7px 0; font-size: clamp(31px, 4vw, 46px); line-height: 1.4; }
.category-hero p:last-child { position: relative; z-index: 1; margin: 0; color: var(--ink-soft); font-size: 14px; }
.category-hero__mark { position: absolute; right: 5%; top: -53px; color: var(--accent); opacity: 0.12; font-size: 230px; font-weight: 800; line-height: 1.2; white-space: nowrap; }

.detail { padding: 38px 0 92px; }
.detail__grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 48px; }
.detail__main { min-width: 0; }
.detail__artwork { position: relative; overflow: hidden; border-radius: 10px; }
.detail__artwork .work-card__artwork { height: clamp(260px, 35vw, 390px); padding: 27px 32px; }
.detail__artwork .work-card__artwork::before { width: 420px; height: 420px; right: 5%; top: -170px; }
.detail__artwork .work-card__artwork::after { width: 260px; height: 260px; right: 40%; top: 180px; }
.detail__artwork .work-card__artwork-label { font-size: 54px; }
.detail__sample { position: absolute; left: 22px; bottom: 21px; z-index: 1; padding: 5px 10px; border-radius: 4px; background: rgba(25, 30, 29, 0.7); color: #fff; font-size: 10px; }
.detail__intro { padding: 33px 0 38px; }
.detail__intro h1 { margin: 13px 0 8px; font-size: clamp(29px, 4vw, 42px); line-height: 1.45; letter-spacing: -0.04em; }
.detail__lead { margin: 0; color: var(--ink-soft); font-size: 14px; }
.detail__intro .tag-list { margin-top: 22px; }
.detail__mobile-actions { display: none; }
.detail-section { padding: 37px 0; border-top: 1px solid var(--line); }
.detail-section h2 { margin: 9px 0 15px; font-size: 23px; line-height: 1.5; }
.detail-section p:not(.section-heading__eyebrow) { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 2; }
.detail-section .detail-section__sample-note { margin-top: 17px !important; font-size: 12px !important; }
.safety-note { padding: 33px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; background: var(--surface); }
.detail__bottom-cta { margin-top: 40px; }
.detail__bottom-cta .affiliate-actions { margin-top: 23px; }
.detail__side { position: sticky; top: 24px; }
.detail-panel { padding: 26px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.detail-panel__eyebrow { margin: 0; color: var(--accent-dark); font: 700 10px/1.5 Arial, sans-serif; letter-spacing: 0.16em; }
.detail-panel h2 { margin: 7px 0 0; font-size: 20px; }
.detail-panel__genre { margin: 4px 0 19px; color: var(--ink-soft); font-size: 12px; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 20px; padding: 16px 0; border-block: 1px solid var(--line); }
.detail-stats div { text-align: center; }
.detail-stats dt { color: var(--ink-soft); font-size: 10px; white-space: nowrap; }
.detail-stats dd { margin: 5px 0 0; font-size: 19px; font-weight: 800; }
.favorite-button { width: 100%; padding: 11px; border: 1px solid var(--accent); border-radius: 5px; background: transparent; color: var(--accent-dark); font-size: 13px; font-weight: 700; }
.favorite-button:not(:disabled):hover, .favorite-button[aria-pressed="true"] { background: var(--accent-soft); }
.rating-control { margin-top: 21px; }
.rating-control p { margin: 0 0 8px; color: var(--ink-soft); font-size: 11px; }
.rating-control > div { display: flex; gap: 3px; }
.rating-control button { width: 42px; height: 42px; border: 0; border-radius: 5px; background: var(--surface-muted); color: var(--ink-soft); font-size: 24px; }
.rating-control button:not(:disabled):hover, .rating-control button.is-filled { color: var(--accent-dark); background: var(--accent-soft); }
.detail-panel__status { min-height: 30px; margin: 13px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.affiliate-actions { display: grid; gap: 8px; }
.detail-panel .affiliate-actions { margin-top: 19px; padding-top: 20px; border-top: 1px solid var(--line); }
.affiliate-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; padding: 11px 14px; border: 0; border-radius: 5px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; text-align: center; text-decoration: none; }
.affiliate-button:not(:disabled):hover { background: var(--accent-dark); }
.affiliate-button:disabled { cursor: not-allowed; opacity: 0.55; }
.affiliate-actions p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.6; }
.related { border-top: 1px solid var(--line); background: var(--surface-muted); }
.related .section-heading a { font-size: 13px; font-weight: 700; text-decoration: none; }
.related .section-heading a:hover { text-decoration: underline; }

.empty-state { padding: 70px 24px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); text-align: center; }
.empty-state__icon { display: block; color: var(--accent); font-size: 54px; line-height: 1; }
.empty-state h3 { margin: 15px 0 6px; font-size: 19px; }
.empty-state p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.empty-state button { margin-top: 24px; padding: 11px 22px; }

.about { border-top: 1px solid var(--line); background: var(--surface-muted); }
.about__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.about h2 { margin-top: 12px; }
.about__body { max-width: 510px; padding-top: 15px; }
.about__body p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 2.1; }
.about__body .about__caution { margin-top: 16px; font-size: 12px; }

.site-footer { background: #283331; color: #e7e8df; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 32px; padding-block: 42px; }
.site-footer__brand { margin: 0 0 9px !important; color: #fff; font-size: 24px !important; font-weight: 800; letter-spacing: -0.05em; }
.site-footer__brand span { color: #e9a58e; }
.site-footer p { margin: 0; font-size: 11px; }
.site-footer__meta { text-align: right; align-self: end; }
.site-footer__meta p + p { margin-top: 8px; color: #bdc7c1; }
.site-footer__meta a { color: inherit; }

.error-page { display: grid; place-items: center; min-height: 100svh; padding: 32px; }
.error-page__content { width: min(100%, 560px); }
.error-page h1 { margin: 12px 0; font-size: clamp(28px, 5vw, 42px); line-height: 1.4; }
.error-page p:not(.section-heading__eyebrow) { color: var(--ink-soft); }

@media (max-width: 850px) {
  .hero__inner { grid-template-columns: 1.2fr 0.8fr; min-height: 440px; }
  .hero__visual { width: 360px; max-width: 120%; margin-right: -60px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about__inner { gap: 36px; }
  .detail__grid { grid-template-columns: minmax(0, 1fr) 285px; gap: 25px; }
  .detail-panel { padding: 20px; }
  .rating-control button { width: 37px; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 36px, 1180px); }
  .section { padding-block: 65px; }
  .notice-bar__inner { gap: 9px; font-size: 9px; }
  .site-header__inner { min-height: 67px; }
  .brand__mark { width: 32px; height: 32px; font-size: 17px; }
  .brand__name { font-size: 18px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 11px; }
  .site-header:not(.site-header--sections) .site-nav a:last-child { display: none; }
  .site-header--sections .site-nav { gap: 9px; }
  .hero__inner { display: block; position: relative; min-height: 0; }
  .hero__copy { padding-block: 67px 74px; }
  .hero h1 { position: relative; z-index: 1; margin: 21px 0 17px; font-size: clamp(37px, 9vw, 49px); }
  .hero__description { position: relative; z-index: 1; max-width: 320px; font-size: 13px; }
  .hero__action { position: relative; z-index: 1; margin-top: 28px; }
  .hero__visual { position: absolute; right: -155px; bottom: 20px; width: 320px; opacity: 0.35; }
  .section-heading { display: block; margin-bottom: 25px; }
  .section-heading__description { margin-top: 9px; }
  .media-section { padding-bottom: 0; }
  .media-grid { grid-template-columns: 1fr; gap: 12px; }
  .media-tile { min-height: 128px; }
  .media-tile strong { margin-top: 5px; font-size: 28px; }
  .search-panel { padding: 22px 18px; }
  .search-form__row { gap: 8px; padding-left: 12px; }
  .search-form button { min-width: 74px; padding-inline: 10px; font-size: 11px; }
  .search-form button span { display: none; }
  .search-form input { font-size: 12px; }
  .genre-filter { display: block; margin-top: 20px; }
  .genre-filter__label { display: block; margin-bottom: 9px; }
  .genre-filter__buttons { gap: 7px; }
  .genre-button { min-width: 0; padding: 6px 14px; }
  .results-toolbar { display: block; margin-top: 42px; }
  .results-toolbar__note { margin-top: 8px; }
  .card-grid { grid-template-columns: 1fr; gap: 15px; }
  .work-card__artwork { height: 160px; }
  .work-card__body p { min-height: 0; }
  .about__inner { display: block; }
  .about__body { padding-top: 20px; }
  .site-footer__inner { display: block; padding-block: 35px; }
  .site-footer__meta { margin-top: 26px; text-align: left; }
  .category-hero__inner { min-height: 185px; }
  .category-hero__mark { right: -18px; top: -9px; font-size: 125px; }
  .detail { padding: 13px 0 62px; }
  .detail__grid { display: flex; flex-direction: column; gap: 25px; }
  .detail__main, .detail__side { width: 100%; }
  .detail__side { position: static; }
  .detail__artwork .work-card__artwork { height: 245px; }
  .detail__artwork .work-card__artwork-label { font-size: 38px; }
  .detail__intro { padding: 25px 0; }
  .detail__mobile-actions { display: block; margin-bottom: 28px; }
  .detail__side .affiliate-actions { display: none; }
  .detail-section { padding-block: 28px; }
  .safety-note { padding: 23px; }
  .detail__bottom-cta { margin-top: 15px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #171d1c;
    --surface: #222a28;
    --surface-muted: #2b3431;
    --ink: #edf0e9;
    --ink-soft: #b8c2bb;
    --line: #414a45;
    --accent: #ca806a;
    --accent-dark: #e4a28e;
    --accent-soft: #49332e;
    --hero: #26302c;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.15);
  }
  .hero__visual::before { background: #735a4c; }
  .hero__visual::after { background: #b77158; }
  .hero__visual-center { background: #ad8b71; color: #251c18; }
  .hero__spark { color: #dca18a; }
  .brand__mark, .search-form button, .empty-state button { color: #171d1c; }
  .affiliate-button { color: #171d1c; }
  .hero__action, .genre-button[aria-pressed="true"] { background: #edf0e9; color: #171d1c; }
  .hero__action:hover { background: #e4a28e; }
  .search-form input::placeholder { color: #9eaaa3; }
  .site-footer { background: #111716; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__action, .work-card, .media-tile { transition: none; }
}
