@charset "UTF-8";

/* =========================================================
   Gallery Base / Page Layout
========================================================= */

body.is-viewer-open {
  overflow: hidden;
  background: #000;
}

.gallery-page {
  margin: 0;
  padding: 0;
  color: var(--site-text);
  background: #ffffff;
  font-family: var(--site-font);
  font-size: 90%;
  line-height: 1.7;
  overflow-x: hidden;
}

/*
  Gallery page frame
  - PC: body = outer background / .gallery-wrap = white center box
  - Mobile: plain white single page
*/
.gallery-wrap {
  width: min(100% - 20px, 680px);
  margin: 0 auto;
  padding: 24px 0 56px;
  box-sizing: border-box;
  background: #ffffff;
}

@media screen and (min-width: 835px) {
  .gallery-wrap {
    width: min(calc(100% - clamp(32px, 6vw, 80px)), 1160px);
    margin: 0 auto;
    padding: clamp(34px, 4vw, 48px) clamp(20px, 3.5vw, 40px) 72px;
  }
}

@media screen and (max-width: 834px) {
  body.gallery-page {
    background: #ffffff;
  }
}

/* common mobile-page style header */
.gallery-site-header {
  margin: 0 0 20px;
  padding: 0;
  line-height: 1 !important;
}

.gallery-site-header a {
  display: inline-block;
}

.gallery-site-header #head-delta {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto;
}

.gallery-site-header h1 {
  margin: 0;
  padding: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--site-heading);
}

.gallery-intro {
  max-width: 680px;
  margin: 0 auto 42px;
  text-align: center;
  color: var(--site-subtext);
}

.gallery-intro p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
}

.gallery-section {
  margin-top: 64px;
}

.gallery-intro + .gallery-section {
  margin-top: 0;
}

.gallery-section h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55em;
  margin: 0 0 24px;
  padding: 0;
  border-bottom: 0;
  font-family: var(--site-font-en), var(--site-font), sans-serif;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: 0.03em;
  color: var(--site-heading);
}

.gallery-section h2::before {
  content: "";
  flex: 0 0 auto;
  width: 26px;
  height: 2px;
  background: var(--site-black);
}

.gallery-subtitle {
  display: flex;
  align-items: center;
  gap: 0.35em;
  margin: 46px 0 16px;
  padding: 0 0 6px;
  font-family: var(--site-font-en), var(--site-font), sans-serif;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: var(--site-heading);
  border-bottom: 0;
}

.gallery-subtitle::before {
  content: "▼";
  font-size: 0.72em;
  color: var(--site-gray);
}

.gallery-heading-note {
  margin-left: 0.8em;
  font-family: var(--site-font), sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--site-subtext);
}

@media screen and (max-width: 834px) {
  .pc-only {
    display: none !important;
  }
}

/* operation help tooltip
-------------------------------- */

.gallery-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.35em;
  vertical-align: middle;
}

.gallery-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--site-subtext);
  font-family: var(--site-font-en), var(--site-font), sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1;
  cursor: help;
  opacity: 0.75;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.gallery-help:hover .gallery-help-icon {
  opacity: 1;
  transform: translateY(-1px);
}


.gallery-help-popup {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 30;
  width: max-content;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  font-family: var(--site-font), sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.02em;
  text-align: left;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
  pointer-events: none;
  white-space: nowrap;
}

.gallery-help-popup::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: rgba(0, 0, 0, 0.88);
  transform: translateX(-50%) rotate(45deg);
}

.gallery-help:hover .gallery-help-popup,
.gallery-help:focus-within .gallery-help-popup {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}


.gallery-empty {
  margin: 0;
  color: var(--site-subtext);
  font-size: 0.9rem;
}

.gallery-masonry {
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.gallery-masonry.is-changing {
  opacity: 0;
  transform: translateY(6px);
}

@media screen and (max-width: 834px) {
  .gallery-page {
    font-size: 88%;
  }

  .gallery-wrap {
    width: min(100% - 20px, 680px);
    padding: 24px 0 56px;
  }

  .gallery-site-header {
    margin-bottom: 18px;
  }

  .gallery-site-header h1 {
    font-size: 22px;
  }

  .gallery-intro {
    margin-bottom: 34px;
  }

  .gallery-section {
    margin-top: 48px;
  }

  .gallery-section h2 {
    margin-bottom: 16px;
    font-size: 1.18rem;
  }

  .gallery-subtitle {
    margin-top: 38px;
  }
}

/* =========================================================
   Gallery Filter
========================================================= */

.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 30px;
}

.gallery-filter-button {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--site-text);
  padding: 4px 12px;
  font-family: var(--site-font-en), var(--site-font), sans-serif;
  font-size: 0.78rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    opacity 0.16s ease,
    transform 0.16s ease;
}

.gallery-filter-button:hover {
  background: var(--site-black-soft);
  border-color: var(--site-black-soft);
  color: var(--site-white);
}

.gallery-filter-button.is-active {
  background: var(--site-black);
  border-color: var(--site-black);
  color: var(--site-white);
  cursor: default;
}

.gallery-filter-button.is-active:hover {
  transform: none;
}

@media screen and (max-width: 834px) {
  .gallery-filter {
    gap: 6px;
    margin-bottom: 18px;
  }

  .gallery-filter-button {
    padding: 4px 9px;
    font-size: 0.72rem;
  }
}

/* =========================================================
   Masonry-ish Grid
========================================================= */

.gallery-masonry {
  column-count: 7;
  column-gap: 6px;
}

.gallery-item {
  break-inside: avoid;
  display: block;
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.gallery-item-title {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--site-subtext);
}


/* --------------------------------
   thumbnail hover effect
-------------------------------- */

.gallery-item img,
.comic-card img {
  opacity: 1;
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}

.gallery-item:hover img,
.comic-card:hover img {
  opacity: 0.6;
  transition:
    opacity 0.08s ease-out,
    transform 0.12s ease-out;
}

/* --------------------------------
   comic list
-------------------------------- */

.comic-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 160px);
  gap: 18px 24px;
  justify-content: start;
  width: 100%;
  max-width: none;
  margin: 0;
}

.comic-card {
  display: block;
  width: 160px;
  max-width: none;
  color: inherit;
  text-decoration: none;
}

.comic-card:hover {
  color: inherit;
  text-decoration: none;
}

.comic-card-thumb {
  position: relative;
  display: block;
}

.comic-card img {
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.comic-card-body {
  display: block;
  padding: 8px 2px 0;
  text-align: center;
}

.comic-card-title {
  position: relative;
  display: block;
  padding: 0px 8px 6px;
  font-family: var(--site-font-en), var(--site-font), sans-serif;
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.04em;
  color: var(--site-text);
}

.comic-card-title::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 28px;
  height: 3px;
  transform: translateX(-50%);
  background: var(--site-gray);
  transition: width 0.22s ease;
}

.comic-card:hover .comic-card-title::before {
  width: 64px;
}

.comic-card-meta {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4em;
  min-height: 2.1em;
  box-sizing: border-box;
  padding: 0 0.45em;
  background: rgba(0, 0, 0, 0.76);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.78);
  font-family: var(--site-font-en), var(--site-font), sans-serif;
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

@media screen and (max-width: 1235px) {
  .comic-list {
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
    gap: 14px;
    width: 100%;
    max-width: none;
    margin: 0;
    justify-content: center;
  }

  .comic-card {
    width: 100%;
    max-width: 150px;
    justify-self: center;
  }
}

/* =========================================================
   Page Link
========================================================= */

.page-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-link-list li {
  margin: 0.4em 0;
}

/* =========================================================
   Lightbox
========================================================= */

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.gallery-lightbox.is-active {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox.is-black {
  background: var(--site-black);
}

.gallery-lightbox.is-white {
  background: #ffffff;
}

.gallery-lightbox-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.995);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}


.gallery-lightbox-button {
  position: fixed;
  z-index: 10000;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--site-font-en);
  font-weight: 400;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
}

.gallery-lightbox.is-white .gallery-lightbox-button {
  background: transparent;
  color: rgba(0, 0, 0, 0.35);
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.65);
}

.gallery-lightbox.is-ui-visible .gallery-lightbox-button {
  opacity: 1;
}

.gallery-lightbox-close {
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  font-size: 20px;
  line-height: 1;
  z-index: 10002;
  justify-content: center;
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
  top: 0;
  bottom: 0;
  transform: none;
  width: 20%;
  height: 100%;
  font-size: 34px;
  line-height: 1;
}

.gallery-lightbox-prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 14px;
}

.gallery-lightbox-next {
  right: 0;
  justify-content: flex-end;
  padding-right: 14px;
}

.gallery-lightbox-caption {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 10000;
  padding: 0 72px;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #ffffff;
  pointer-events: none;
}

.gallery-lightbox.is-white .gallery-lightbox-caption {
  color: #000000;
}

.gallery-lightbox-caption {
  display: none;
}

.gallery-lightbox,
.gallery-lightbox * {
  user-select: none;
  -webkit-user-select: none;
}

.gallery-lightbox {
  touch-action: pan-x pan-y pinch-zoom;
}

.gallery-lightbox-image {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

.gallery-lightbox-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.gallery-lightbox-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translateX(0);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

.gallery-lightbox-image.is-current {
  opacity: 1;
  transform: translateX(0);
}

.gallery-lightbox-image.is-enter-from-right {
  opacity: 0;
  transform: translateX(1.5%);
}

.gallery-lightbox-image.is-enter-from-left {
  opacity: 0;
  transform: translateX(-1.5%);
}

.gallery-lightbox-image.is-exit-to-left {
  opacity: 0;
  transform: translateX(-1.5%);
}

.gallery-lightbox-image.is-exit-to-right {
  opacity: 0;
  transform: translateX(1.5%);
}

.gallery-lightbox-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-lightbox.is-zoomed .gallery-lightbox-stage {
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  cursor: zoom-out;
}

.gallery-lightbox.is-zoomed .gallery-lightbox-image {
  display: none;
}

.gallery-lightbox.is-zoomed .gallery-lightbox-image.is-current {
  display: block;
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  opacity: 1;
  transform: none;
}

.gallery-lightbox.is-zoom-animating .gallery-lightbox-image.is-current {
  animation: galleryZoomPop 0.16s ease;
}

@keyframes galleryZoomPop {
  0% {
    opacity: 1;
    transform: scale(0.995);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================================================
   Responsive
========================================================= */

@media screen and (max-width: 834px) {
  .gallery-masonry {
    column-count: 5;
    column-gap: 4px;
  }

  .gallery-item {
    margin-bottom: 4px;
  }

  .gallery-lightbox-button,
  .gallery-lightbox-caption {
    display: none;
  }

}

@media screen and (max-width: 520px) {
  .gallery-masonry {
    column-count: 3;
    column-gap: 3px;
  }

  .gallery-item {
    margin-bottom: 3px;
  }

  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    width: 38px;
    height: 64px;
  }

  .gallery-lightbox-caption {
    padding: 0 56px;
  }
}

/* --------------------------------
   fancybox override
-------------------------------- */

.fancybox-container.is-black .fancybox-bg {
  background: #000000;
  opacity: 1;
}

.fancybox-container.is-white .fancybox-bg {
  background: #ffffff;
  opacity: 1;
}

.fancybox-container.is-custom-bg .fancybox-bg {
  opacity: 1;
}

.fancybox-caption {
  display: none;
}

/* 余白を消す */
.fancybox-slide {
  padding: 0;
}

/* fancybox本来のズーム計算を壊さない */
.fancybox-image,
.fancybox-spaceball {
  max-width: 100%;
  max-height: 100%;
}

/* --------------------------------
   fancybox buttons / navigation
-------------------------------- */

/* fancybox標準のグレー背景を消す */
.fancybox-button {
  background: transparent !important;
  box-shadow: none !important;
}

/* hover / focus 時も背景を出さない */
.fancybox-button:hover,
.fancybox-button:focus {
  background: transparent !important;
  box-shadow: none !important;
}

/* ボタン内のSVGを薄いグレーにする */
.fancybox-button svg {
  color: rgba(180, 180, 180, 0.7) !important;
  fill: rgba(180, 180, 180, 0.7) !important;
  stroke: rgba(180, 180, 180, 0.7) !important;
}

/* SVG内のパーツにも念押し */
.fancybox-button svg path,
.fancybox-button svg line,
.fancybox-button svg polyline,
.fancybox-button svg polygon,
.fancybox-button svg rect {
  fill: rgba(180, 180, 180, 0.7) !important;
  stroke: rgba(180, 180, 180, 0.7) !important;
}

/* 矢印ボタン内側の標準背景も消す */
.fancybox-navigation .fancybox-button div {
  background: transparent !important;
  box-shadow: none !important;
}

/* ツールバーは基本非表示 */
.fancybox-toolbar {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

/* 矢印は通常時、fancybox標準の show-nav が付いても強制非表示 */
.fancybox-container .fancybox-navigation .fancybox-button,
.fancybox-container.fancybox-show-nav .fancybox-navigation .fancybox-button {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

/* 画像切替直後だけ矢印を表示 */
.fancybox-container.show-nav-once .fancybox-navigation .fancybox-button {
  opacity: 0.6 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* 表示中に矢印へhoverした時だけ少し濃く */
.fancybox-container.show-nav-once .fancybox-navigation .fancybox-button:hover {
  opacity: 0.85 !important;
}

/* 画像切替直後だけ×を表示 */
.fancybox-container.show-nav-once .fancybox-button--close {
  opacity: 0.6 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ×もhover時だけ少し濃く */
.fancybox-container.show-nav-once .fancybox-button--close:hover {
  opacity: 0.85 !important;
}
/* モバイルでは操作ボタン非表示、スワイプ中心 */
@media screen and (max-width: 834px) {
  .fancybox-button--arrow_left,
  .fancybox-button--arrow_right,
  .fancybox-button--close,
  .fancybox-toolbar {
    display: none;
  }
}

/* --------------------------------
   desktop custom viewer
   PC only
-------------------------------- */

.desktop-viewer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  touch-action: none;
  cursor: default;
}

.desktop-viewer.is-open {
  display: flex;
}

.desktop-viewer.is-black {
  background: #000000;
}

.desktop-viewer.is-white {
  background: #ffffff;
}

.desktop-viewer.is-custom-bg {
  background: transparent;
}

.desktop-viewer.is-zoomable {
  cursor: zoom-in;
}

.desktop-viewer.is-zoomed {
  cursor: zoom-out;
}

.desktop-viewer.is-zoomed.is-dragging {
  cursor: grabbing;
}

.desktop-viewer-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}

.desktop-viewer-image.is-natural-size {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.desktop-viewer.is-zoomed .desktop-viewer-image {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.desktop-viewer-close,
.desktop-viewer-nav {
  position: fixed;
  z-index: 100000;
  border: 0;
  background: transparent;
  color: rgba(210, 210, 210, 0.85);
  font-family: Arial, sans-serif;
  line-height: 1;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.18s ease;
  cursor: pointer;
}


.desktop-viewer.show-nav-once .desktop-viewer-close,
.desktop-viewer.show-nav-once .desktop-viewer-nav {
  opacity: 0.6;
}

.desktop-viewer.show-nav-once .desktop-viewer-close:hover,
.desktop-viewer.show-nav-once .desktop-viewer-nav:hover {
  opacity: 0.85;
}

.desktop-viewer-close {
  top: 12px;
  right: 14px;
  z-index: 100001;
  font-size: 26px;
}

.desktop-viewer-nav {
  top: 0;
  bottom: 0;
  width: 18%;
  height: auto;
  transform: none;
  font-size: 56px;
  padding: 0;
  display: flex;
  align-items: center;
}

.desktop-viewer-prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 18px;
}

.desktop-viewer-next {
  right: 0;
  justify-content: flex-end;
  padding-right: 18px;
}

/* スマホでは自作PCビューアは使わない */
@media screen and (max-width: 834px) {
  .desktop-viewer {
    display: none !important;
  }
}

/* --------------------------------
   comic viewer
-------------------------------- */

.comic-viewer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  overflow: hidden;
  box-sizing: border-box;
}

.comic-viewer.is-open {
  display: block;
}

.comic-viewer.is-white {
  background: #ffffff;
  color: #222222;
}

.comic-viewer.is-black {
  background: #000000;
  color: #eeeeee;
}

.comic-viewer.is-custom-bg {
  color: #222222;
}

.comic-viewer-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.comic-viewer-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.comic-viewer-close,
.comic-viewer-nav {
  position: fixed;
  border: 0;
  background: transparent;
  color: currentColor;
  font-family: var(--site-font-en), var(--site-font), sans-serif;
  line-height: 1;
  cursor: pointer;
}

.comic-viewer-close {
  top: 12px;
  right: 14px;
  z-index: 100004;
  width: 40px;
  height: 40px;
  font-size: 28px;
  opacity: 0.42;
  transition: opacity 0.18s ease;
}

.comic-viewer-close:hover {
  opacity: 0.86;
}

.comic-viewer-nav {
  z-index: 100002;
  top: 0;
  bottom: 0;
  width: 22%;
  min-width: 72px;
  height: auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  font-size: 42px;
  opacity: 0.18;
  transition: opacity 0.18s ease;
}

.comic-viewer-nav:hover {
  opacity: 0.58;
}

.comic-viewer-next {
  left: 0;
  justify-content: flex-start;
  text-align: left;
}

.comic-viewer-prev {
  right: 0;
  justify-content: flex-end;
  text-align: right;
}

.comic-viewer.is-first .comic-viewer-prev {
  opacity: 0;
  pointer-events: none;
}

.comic-viewer-info {
  display: none;
}

@media screen and (max-width: 834px) {
  .comic-viewer {
    overflow: hidden;
  }

  .comic-viewer-stage {
    height: calc(100% - 54px);
    padding: 10px 0 0;
    box-sizing: border-box;
  }

  .comic-viewer-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .comic-viewer-close {
    top: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
    font-size: 23px;
    opacity: 0.32;
  }

  .comic-viewer-nav {
    top: auto;
    bottom: 0;
    width: 56px;
    min-width: 0;
    height: 54px;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    opacity: 0.72;
  }

  .comic-viewer-nav:hover {
    opacity: 0.72;
  }

  .comic-viewer-next {
    left: calc(50% - 92px);
  }

  .comic-viewer-prev {
    right: calc(50% - 92px);
  }

  .comic-viewer.is-first .comic-viewer-prev {
    opacity: 0.22;
    pointer-events: none;
  }

  .comic-viewer-info {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 100002;
    display: block;
    transform: translateX(-50%);
    color: currentColor;
    font-size: 0.78rem;
    line-height: 1.4;
    opacity: 0.68;
    pointer-events: none;
  }

  .comic-viewer-title {
    display: none;
  }

  .comic-viewer-page {
    font-family: var(--site-font-en), var(--site-font), sans-serif;
    letter-spacing: 0.05em;
  }
}


/* --------------------------------
   page link grid
-------------------------------- */

/* 広いPC：普通の横並び。左起点。最大4列 */
.page-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
  gap: 28px 32px;
  justify-content: start;
  max-width: none;
  margin: 0;
}

/* 各リンクブロック */
.page-link-block {
  min-width: 0;
}

.page-link-block h3 {
  margin: 0 0 0.65em;
  padding: 0 0 0.35em;
  font-family: var(--site-font-en), var(--site-font), sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--site-text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.page-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-link-list li {
  margin: 0 0 0.55em;
}

.page-link-list a {
  display: inline-block;
  position: relative;
  padding-left: 1.1em;
  color: var(--site-text);
  text-decoration: none;
}

.page-link-list a::before {
  content: "○";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--site-gray);
  font-size: 0.72em;
}

.page-link-list a:hover {
  color: var(--site-accent);
}

/* 4列が窮屈になる幅：Masonry風へ切り替え */
@media screen and (max-width: 834px) {
  .page-link-grid {
    display: block;
    column-count: 3;
    column-gap: 28px;
    max-width: none;
    margin: 0;
  }

  .page-link-block {
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin: 0 0 24px;
  }
}

/* さらに狭い幅：2列Masonry */
@media screen and (max-width: 500px) {
  .page-link-grid {
    column-count: 2;
    column-gap: 22px;
    max-width: none;
    margin: 0;
  }
}

/* スマホ：1列 */
@media screen and (max-width: 390px) {
  .page-link-grid {
    column-count: 1;
    max-width: none;
    margin: 0 clamp(16px, 6vw, 28px);
  }
}


/* リストに挿絵 */
.page-link-image {
  margin: 1.1em 0;
  text-align: center;
}

.page-link-image img {
  display: block;
  width: 82%;
  max-width: 180px;
  height: auto;
  margin: 0 auto;
  box-sizing: border-box;
  border: none;
  background: transparent;
}

/* リストにコメント */
.page-link-note {
  margin: 0.9em 0 1.2em;
  padding: 0.25em 0.4em 0.25em 1.1em;
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--site-subtext);
}



/* --------------------------------
   ギャラリーindexレイアウト
-------------------------------- */

.mobile-header-image {
  display: none !important;
}

@media screen and (max-width: 834px) {
  .mobile-header-image {
    display: block !important;
    width: 100vw;
    margin: 28px 0;
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .mobile-header-image img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
  }
}

@media screen and (min-width: 835px) {
  .mobile-header-image {
    display: none !important;
  }
  .gallery-page #site-footer {
    display: none;
  }
}

/* Footer
---------------------------------------- */

#site-footer {
  width: 100%;
  height: auto;
  color: var(--site-white);
  background-color: var(--site-black);
  line-height: 1;
  font-size: 9px;
  text-align: center;
  font-family: var(--site-font-en);
  padding: 20px 0 30px 0;
}

#site-footer img {
  width: 150px;
  height: auto;
  margin-bottom: 3px;
}



/* ラベル */

.slash-label {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 14px 6px;
  background: var(--site-black);
  transform: skewX(-12deg);
}

.slash-label span {
  display: inline-block;
  transform: skewX(12deg);
  color: #fff;
  font-family: var(--site-font-en);
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.18em;
}

.slash-label.is-white {
  background: #fff;
}

.slash-label.is-white span {
  color: var(--site-black);
}


/* =========================================================
   Genre specific styles
========================================================= */


/*---------------------------------------- 
	 オリジナル専用
---------------------------------------- */

.gallery-original .original-top-archive {
  margin: 88px auto 0;
}

.gallery-original .original-top-archive-title {
  position: relative;
  width: 100vw;
  margin: 100px 0 42px;
  margin-left: 50%;
  padding: 52px clamp(20px, 6vw, 72px) 56px;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--site-black);
  color: #fff;
  text-align: center;
  transform: translateX(-50%);
  clip-path: polygon(0 16%, 100% 0, 100% 84%, 0 100%);
}

.gallery-original .original-top-archive-title h2 {
  margin: 0;
  color: #fff;
  font-family: var(--site-font-en);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.gallery-original .original-top-archive-title > p:not(.slash-label) {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  line-height: 1.8;
  letter-spacing: 0.14em;
}

@media screen and (max-width: 834px) {
  .gallery-original .original-top-archive {
    margin-top: 72px;
  }

  .gallery-original .original-top-archive-title {
    padding: 60px 20px 64px;
    clip-path: polygon(0 12%, 100% 0, 100% 88%, 0 100%);
  }

  .gallery-original .original-top-archive-title h2 {
    font-size: clamp(2rem, 11vw, 3.4rem);
  }
}

.gallery-original .toplist {
  margin: 0 0 34px;
}

.gallery-original .toplist h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  color: var(--site-black);
  font-family: var(--site-font-en);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
}

.gallery-original .toplist h3::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--site-black);
}

.gallery-original .toplist-order {
  display: inline-block;
  padding: 3px 8px 4px;
  border: 1px solid var(--site-border);
  color: var(--site-subtext);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1;
}


.gallery-original .toplist-images {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  justify-items: start;
}

.gallery-original .toplist-images img {
  display: block;
  width: 100%;
  max-width: 208px;
  height: auto;
  aspect-ratio: 220 / 140;
  object-fit: contain;
}

@media screen and (max-width: 834px) {
  .gallery-original .toplist-images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .gallery-original .toplist-images img {
    max-width: 220px;
  }
}

@media screen and (max-width: 520px) {
  .gallery-original .toplist-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
}


/* ---------------------------------------- 
	落乱専用
---------------------------------------- */

.gallery-rkrn .rkrn-footer-banner {
  margin: 88px auto 0;
  padding: 34px clamp(18px, 4vw, 40px) 38px;
  background: #ecf2ea;
  text-align: center;
}

.gallery-rkrn .rkrn-footer-banner h2 {
  display: inline-block;
  margin: 0 0 16px;
  padding: 2px 14px 3px;
  background: var(--site-black);
  color: #fff;
  font-family: var(--site-font-en);
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: skewX(-12deg);
}

.gallery-rkrn .rkrn-footer-banner h2 span {
  display: inline-block;
  transform: skewX(12deg);
}

.gallery-rkrn .rkrn-footer-banner p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--site-subtext);
  font-size: 0.82rem;
  line-height: 1.9;
}

/*---------------------------------------- 
	笛専用
---------------------------------------- */

body.gallery-whistle {
  --whistle-bg: #bcc7bf;
  --whistle-pink: #ffd5d1;
}


@media screen and (min-width: 835px) {
  body.gallery-whistle {
    background: var(--whistle-bg);
  }
}


/* 選択範囲色指定 */
body.gallery-whistle ::selection {
  background-color: var(--whistle-pink);
  color: var(--site-black);
}

body.gallery-whistle ::-moz-selection {
  background-color: var(--whistle-pink);
  color: var(--site-black);
}




/*Illust & Text グリッド調整*/
.gallery-whistle .page-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 34px;
  align-items: start;
}

.gallery-whistle .page-link-block {
  box-sizing: border-box;
  padding: 22px 24px 24px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.gallery-whistle .page-link-block h3 {
  margin: 0 0 0.9em;
  padding: 0 0 0.45em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
}

.gallery-whistle .page-link-block h3 + .page-link-list + h3 {
  margin-top: 1.8em;
}

.gallery-whistle .page-link-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}



.gallery-whistle .page-link-block .page-link-image.is-wide img {
  max-width: none;
  width: 100%;
}


.gallery-whistle .page-link-block .page-link-image {
  margin: 1.1em 0 1.2em;
}

.gallery-whistle .page-link-block .page-link-image:first-child {
  margin-top: 0;
}

.gallery-whistle .page-link-block .page-link-image:last-child {
  margin-bottom: 0;
}

.gallery-whistle .page-link-block .page-link-image img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
  box-sizing: border-box;
  border: 0;
  background: transparent;
}

@media screen and (max-width: 834px) {
  .gallery-whistle .page-link-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media screen and (min-width: 521px) and (max-width: 834px) {
  .gallery-whistle .page-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}



/* 笛メモカード */
.gallery-whistle .page-link-block-wmemo {
  padding: 0;
}

.gallery-whistle .whistle-wmemo-card {
  display: block;
  box-sizing: border-box;
  min-height: 100%;
  padding: 22px 24px 20px;
  background: #fff;
  color: var(--site-text);
  text-decoration: none;
  border-bottom: 4px solid #ed7a6f;
}

.gallery-whistle .whistle-wmemo-card:hover {
  background: rgba(255, 255, 255, 0.82);
}

.gallery-whistle .whistle-wmemo-label {
  display: block;
  margin-bottom: 8px;
  color: #ed7a6f;
  font-family: var(--site-font-en), var(--site-font), sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-align: center;
}

.gallery-whistle .whistle-wmemo-title {
  display: block;
  margin-bottom: 14px;
  font-size: 1.25rem;
  line-height: 1.5;
  text-align: center;
}

.gallery-whistle .whistle-wmemo-text {
  display: block;
  font-size: 0.84rem;
  line-height: 1.9;
}

.gallery-whistle .whistle-wmemo-more {
  display: block;
  margin-top: 10px;
  text-align: right;
  font-family: var(--site-font-en), var(--site-font), sans-serif;
}

.gallery-whistle .whistle-wmemo-card .page-link-image.is-wide {
  margin: -22px -24px 18px;
}

.gallery-whistle .whistle-wmemo-card .page-link-image.is-wide img {
  max-width: none;
  width: 100%;
}

/*同盟*/
.gallery-whistle .whistle-union {
  margin: 88px auto 0;
  padding: 34px clamp(18px, 4vw, 40px) 38px;
  border: 0;
  background: rgba(188, 199, 191, 0.28);
  text-align: center;
}

.gallery-whistle .whistle-union h2 {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 14px 3px;
  background: #ed7a6f;
  color: #fff;
  font-family: var(--site-font-en);
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: skewX(-12deg);
}

.gallery-whistle .whistle-union h2 span {
  display: inline-block;
  transform: skewX(12deg);
}

.gallery-whistle .whistle-union-note {
  margin: 8px 0 24px;
  color: var(--site-subtext);
  font-size: 0.72rem;
  line-height: 1.8;
  letter-spacing: 0.08em;
}

.gallery-whistle .whistle-union-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 10px;
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 18px;
  background: #fff;
  box-sizing: border-box;
}

.gallery-whistle .whistle-union-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.gallery-whistle .whistle-union-list img {
  display: block;
  width: auto;
  max-width: min(100%, 200px);
  height: auto;
  image-rendering: auto;
  vertical-align: middle;
}

.gallery-whistle .whistle-union-list a:hover img {
  opacity: 0.65;
  transition: opacity 0.12s ease-out;
}


@media screen and (max-width: 834px) {
.gallery-whistle .whistle-union {
  background: #bcc7bf;
 }
.gallery-whistle .whistle-union-note {
  color: #ffffff;
 }
}


/*---------------------------------------- 
	アンジェ専用
---------------------------------------- */

.gallery-ange .ange-afterword {
  margin: 88px auto 0;
  padding: 34px clamp(18px, 4vw, 40px) 38px;
  background: #fff2f2;
  text-align: center;
}

.gallery-ange .ange-afterword h2 {
  display: inline-block;
  margin: 0 0 16px;
  padding: 2px 14px 3px;
  background: var(--site-black);
  color: #fff;
  font-family: var(--site-font-en);
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: skewX(-12deg);
}

.gallery-ange .ange-afterword h2 span {
  display: inline-block;
  transform: skewX(12deg);
}

.gallery-ange .ange-afterword p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--site-subtext);
  font-size: 0.82rem;
  line-height: 1.9;
}


/* 選択範囲色指定 */
body.gallery-ange ::selection {
  background-color: #ddece7;
  color: var(--site-black);
}

body.gallery-ange ::-moz-selection {
  background-color: #ddece7;
  color: var(--site-black);
}

