/* 読者向けビューワー */
:root {
  --black: #000;
  --black-thin: #292929;
  --white: #fff;
  --gray: #404040;
  --lightgray: #666;
  --red: #c1272d;
  --facebook: #3b5998;
  --line: #00b900;
  --twitter: #55acee;
  --header: 48px;
  --footer: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
html { background-color: var(--black); }
body {
  font-family: "Hiragino Kaku Gothic Pro", "Hiragino Kaku Gothic Pro W3", "Hiragino Kaku Gothic W3", "YuGothic", sans-serif;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, p { margin: 0; font-size: 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { pointer-events: none; -webkit-user-drag: none; user-select: none; }
button { font: inherit; }

.layout { position: relative; height: 100%; }

/* header */
.header {
  display: flex;
  align-items: center;
  height: var(--header);
  padding: 0 10px 0 30px;
  background-color: var(--black);
  border-bottom: 2px solid var(--lightgray);
}
@media (min-width: 480px) { .header { padding: 0 15px 0 20px; } }
.header-title { flex-grow: 1; }
.header-title img { display: block; }
.header-back {
  display: flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  color: var(--black);
  background-color: var(--white);
  text-decoration: none;
}
.header-back img { margin-right: 10px; }

.container {
  position: relative;
  height: calc(100% - (var(--header) + var(--footer)));
  background-color: var(--black-thin);
}

/* slider: 右から左へ読む */
.slider {
  display: flex;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  outline: none;
}
.slider::-webkit-scrollbar { display: none; }
@media (min-width: 480px) { .slider { width: calc(100% - 220px); } }
.slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  direction: ltr;
}
.page-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.slider-arrow {
  position: absolute;
  top: calc(50% - 30px);
  z-index: 10;
  display: none;
  width: 60px;
  height: 60px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: var(--black);
  cursor: pointer;
}
@media (min-width: 480px) { .slider-arrow { display: block; } }
.slider-arrow::before {
  position: absolute;
  top: calc(50% - 11px);
  display: block;
  width: 18px;
  height: 18px;
  border-top: 3px solid var(--white);
  border-left: 3px solid var(--white);
  content: "";
}
.slider-arrow.forward { left: 20px; }
.slider-arrow.forward::before { left: calc(50% - 4px); transform: rotate(-45deg); }
.slider-arrow.back { right: 20px; }
.slider-arrow.back::before { left: calc(50% - 14px); transform: rotate(135deg); }
.slider-arrow.hidden { display: none; }

/* footer */
.footer {
  position: absolute;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--footer);
  padding: 0 15px;
  color: var(--white);
  background-color: var(--black);
  border-top: 2px solid var(--lightgray);
}
.footer-button {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: var(--white);
  cursor: pointer;
}
.footer-button::before {
  position: absolute;
  top: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-bottom: 2px solid var(--black);
  border-left: 2px solid var(--black);
  content: "";
}
.footer-button.forward::before { left: calc(50% - 4px); transform: rotate(45deg); }
.footer-button.back::before { right: calc(50% - 4px); transform: rotate(-135deg); }
.footer-button.hidden { visibility: hidden; }
.footer-status {
  flex-grow: 1;
  min-width: 100px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.1em;
}
.footer-status em { font-style: normal; font-size: 24px; }
@media (min-width: 480px) { .footer-status { flex-grow: 0; } }

/* 最終ページ */
.action-slide { overflow-y: auto; }
@media (min-height: 640px) {
  .action-slide { display: flex; align-items: center; justify-content: center; }
}
.action-inner { width: 100%; margin: 0 20px; padding: 20px 0; }
.action-box {
  max-width: 300px;
  min-width: 260px;
  width: 100%;
  margin: 2px auto 0;
  padding: 20px;
  text-align: center;
  background-color: var(--gray);
}
.action-box:first-of-type { margin-top: 0; }
.action-box-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: bold;
  color: var(--white);
}
.action-box-title img { display: inline-block; margin-right: 10px; }

.share { display: flex; align-items: center; justify-content: center; }
.share > li { margin-left: 20px; border-radius: 50%; background-color: var(--white); }
.share > li:first-of-type { margin-left: 0; }
.share > li.facebook { background-color: var(--facebook); }
.share > li.line { background-color: var(--line); }
.share > li.twitter { background-color: var(--twitter); }
.share > li > a, .share > li > button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.share button.copied { outline: 3px solid var(--line); }

.purchase-link {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 120px;
  width: 100%;
  height: 40px;
  margin: 0 auto;
  padding: 0 20px;
  border-radius: 20px;
  background-color: var(--white);
}

.volume-nav { display: flex; max-width: 600px; margin: 20px auto 0; }
.volume-nav > li { display: flex; align-items: center; max-width: 300px; width: 100%; }
.volume-nav.one-nav { justify-content: center; }
@media (min-width: 768px) { .volume-nav.one-nav > li { width: 50%; } }
.volume-link {
  display: flex;
  width: 100%;
  height: 100%;
  text-decoration: none;
  background-color: var(--white);
  overflow: hidden;
}
.volume-link.prev { flex-direction: row-reverse; margin-left: 2px; border-radius: 0 8px 8px 0; }
.volume-link.next { border-radius: 8px 0 0 8px; }
.volume-icon { display: flex; align-items: center; padding: 0 5px; background-color: var(--red); }
@media (min-width: 480px) { .volume-icon { padding: 0 11px; } }
.volume-title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 10px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  color: var(--black);
}
@media (min-width: 480px) { .volume-title { padding: 22px 10px; font-size: 18px; } }

/* こちらもオススメ！ */
.recommended { max-width: 342px; width: 100%; margin: 18px auto 0; }
.recommended-heading { color: var(--white); font-size: 12px; font-weight: bold; }
.recommended-list { display: flex; justify-content: space-between; min-height: 174px; margin-top: 16px; }
.recommended-list > li { width: 30%; }
.recommended-link { display: block; color: var(--white); text-decoration: none; }
.recommended-title { margin-top: 8px; font-size: 12px; }
.recommended-thumb { position: relative; display: block; }
.recommended-thumb::before { content: ""; display: block; padding-top: 100%; }
.recommended-thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 公開期間外 */
.status-slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  max-width: 342px;
  margin: 0 auto;
}
.status-text { padding: 10px 0; font-size: 22px; color: var(--white); text-align: center; }

/* 404 */
.not-found { height: 100%; }
.not-found::before, .not-found::after { content: ""; display: block; background-color: var(--black); }
.not-found::before { height: var(--header); border-bottom: 2px solid var(--lightgray); }
.not-found::after { height: var(--footer); border-top: 2px solid var(--lightgray); }
.not-found .container { padding: 20px 0; }
.not-found-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  max-width: 342px;
  margin: 0 auto;
}
.not-found .status-text { font-size: 20px; }
