/* =========================================================
   もちとしお 公式サイト スタイルシート
   ---------------------------------------------------------
   色やフォントを変えたいときは、まずこの :root の
   変数(--で始まる部分)をいじってみてください。
   ========================================================= */

:root {
  --cream:  #F7EEDD;   /* ページ背景 (漫画の生成りベージュ) */
  --paper:  #FFFDF6;   /* カードなどの紙色 */
  --ink:    #4A3728;   /* 文字色 (こげ茶。漫画の線の色) */
  --red:    #C8504B;   /* モチのパーカーの赤 */
  --red-deep: #A83E3A; /* 赤の濃いめ (ホバー用) */
  --gray:   #8F8880;   /* シオのグレー */
  --line:   #E5D5B9;   /* 枠線の薄茶 */
  --pink:   #F2B8AC;   /* 肉球ピンク */

  --font-display: "Kiwi Maru", serif;
  --font-body: "Zen Maru Gothic", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  /* うっすら紙のドット模様 */
  background-image: radial-gradient(rgba(74, 55, 40, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

/* =========================================================
   ヘッダー(ナビ)
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(255, 253, 246, 0.92);
  backdrop-filter: blur(4px);
  border-bottom: 2px dashed var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--paper);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background-color 0.2s, color 0.2s;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--red);
  color: #fff;
}

/* =========================================================
   ヒーロー
   ========================================================= */
.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 20px 8px;
  text-align: center;
}

.hero-logo {
  width: min(440px, 82%);
  margin: 0 auto;
}

.hero-copy {
  margin: 20px 0 0;
  font-size: 1.02rem;
  font-weight: 500;
}

/* 肉球の足あと (ヒーロー下の飾り) */
.paw-trail {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 26px;
}

/* ヒーローの「まんがを読む」ボタン */
.hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 30px;
  padding: 14px 40px 14px 46px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--red-deep);
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.2s;
}

.hero-cta:hover { background: #D25B56; }

.hero-cta:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--red-deep);
}

.hero-cta .paw-mark {
  position: absolute;
  left: 20px;
  top: 50%;
  translate: 0 -46%;
  width: 15px;
  height: 13px;
}

.hero-cta .paw-mark::before {
  content: "";
  position: absolute;
  left: 2.5px;
  bottom: 0;
  width: 10px;
  height: 8px;
  border-radius: 50% 50% 45% 45%;
  background: var(--pink);
}

.hero-cta .paw-mark::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 5.5px -2px 0 var(--pink), 11px 0 0 var(--pink);
}

.paw {
  position: relative;
  width: 16px;
  height: 14px;
  opacity: 0.55;
}

.paw::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 0;
  width: 10px;
  height: 8px;
  border-radius: 50% 50% 45% 45%;
  background: var(--red);
}

.paw::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 6px -2px 0 var(--red), 12px 0 0 var(--red);
}

.paw:nth-child(even) { transform: rotate(14deg) translateY(-6px); }
.paw:nth-child(odd)  { transform: rotate(-8deg); }

@keyframes paw-hop {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -7px; }
}

.paw { animation: paw-hop 2.6s ease-in-out infinite; }
.paw.p2 { animation-delay: 0.18s; }
.paw.p3 { animation-delay: 0.36s; }
.paw.p4 { animation-delay: 0.54s; }
.paw.p5 { animation-delay: 0.72s; }

/* =========================================================
   セクション共通
   ========================================================= */
section {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 20px 24px;
  scroll-margin-top: 64px; /* 固定ヘッダーのぶん、リンク移動時にずらす */
}

.section-title {
  margin: 0 0 28px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
}

.section-title span {
  display: inline-block;
  padding: 0 6px 6px;
  /* 手描きふうの下線 */
  background-image:
    radial-gradient(circle at 6px 3px, var(--red) 2.6px, transparent 3px);
  background-size: 14px 6px;
  background-repeat: repeat-x;
  background-position: 0 100%;
}

/* =========================================================
   きょうの1話
   ========================================================= */
.latest { text-align: center; }

.latest-meta {
  margin: -10px 0 22px;
  font-size: 0.95rem;
  color: var(--gray);
  font-weight: 500;
}

.latest-meta strong {
  color: var(--red);
  font-weight: 700;
  margin-right: 0.6em;
}

/* 壁にテープで貼ったような額装 */
.latest-frame {
  position: relative;
  margin: 0 auto;
  max-width: 560px;
  padding: 12px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(74, 55, 40, 0.12);
  transform: rotate(-0.7deg);
}

/* width/height属性を使わないので、CSSで表示領域の比率を確保する
   (画像の読み込み中に他の要素がガタつくのを防ぐため)
   object-fit: contain なので、比率が多少ちがう画像でも切れたり歪んだりしない */
.latest-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
}

.tape {
  position: absolute;
  top: -14px;
  width: 92px;
  height: 30px;
  background: rgba(200, 80, 75, 0.34);
  border-left: 2px dashed rgba(255, 253, 246, 0.7);
  border-right: 2px dashed rgba(255, 253, 246, 0.7);
}

.tape-left  { left: 8%;  transform: rotate(-7deg); }
.tape-right { right: 8%; transform: rotate(6deg); }

.latest-actions { margin-top: 40px; }

.next-info {
  margin: 22px 0 0;
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 500;
}

/* にくきゅうガチャボタン */
.paw-button {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 16px 44px 14px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--red-deep);
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.2s;
}

.paw-button small {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.9;
  letter-spacing: 0.02em;
}

.paw-button:hover { background: #D25B56; }

.paw-button:active {
  transform: translateY(4px) scale(0.98);
  box-shadow: 0 1px 0 var(--red-deep);
}

/* ボタン内の肉球マーク */
.paw-mark {
  position: absolute;
  left: 18px;
  top: 50%;
  translate: 0 -46%;
  width: 15px;
  height: 13px;
}

.paw-mark::before {
  content: "";
  position: absolute;
  left: 2.5px;
  bottom: 0;
  width: 10px;
  height: 8px;
  border-radius: 50% 50% 45% 45%;
  background: var(--pink);
}

.paw-mark::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 5.5px -2px 0 var(--pink), 11px 0 0 var(--pink);
}

/* =========================================================
   まんが一覧
   ========================================================= */
.archive-note {
  margin: -18px 0 26px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 26px 22px;
}

.episode-card {
  position: relative;
  padding: 10px 10px 12px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(74, 55, 40, 0.08);
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.episode-new-label {
  position: absolute;
  z-index: 1;
  top: -10px;
  right: -8px;
  padding: 5px 12px;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--paper);
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(74, 55, 40, 0.18);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

/* 交互にほんの少し傾けて、貼り出した感じに */
.episode-card:nth-child(odd)  { transform: rotate(-0.9deg); }
.episode-card:nth-child(even) { transform: rotate(0.8deg); }

@keyframes card-wiggle {
  0%   { transform: rotate(0deg) translateY(-4px); }
  30%  { transform: rotate(-1.6deg) translateY(-4px); }
  60%  { transform: rotate(1.4deg) translateY(-4px); }
  100% { transform: rotate(0deg) translateY(-4px); }
}

.episode-card:hover,
.episode-card:focus-visible {
  animation: card-wiggle 0.45s ease-in-out forwards;
  box-shadow: 0 10px 18px rgba(74, 55, 40, 0.16);
  border-color: var(--red);
}

.episode-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  border: 1.5px solid var(--line);
}

.episode-title {
  margin: 10px 2px 0;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.5;
}

.episode-title .ep-no {
  color: var(--red);
  margin-right: 0.5em;
}

.episode-date {
  margin: 2px 2px 0;
  font-size: 0.78rem;
  color: var(--gray);
}

.archive-status {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray);
}

.archive-status:empty { display: none; }

.archive-first-link {
  margin: -10px 0 26px;
  text-align: center;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
  border-bottom: 2px dotted var(--red);
  padding-bottom: 1px;
  cursor: pointer;
  transition: color 0.2s;
}

.link-button:hover { color: var(--red-deep); }

/* まんが読み込み中のスケルトン表示 */
.episode-skeleton {
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--paper);
  padding: 10px 10px 12px;
}

.episode-skeleton-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--line) 25%, var(--cream) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.episode-skeleton-line {
  height: 12px;
  margin-top: 10px;
  border-radius: 4px;
  width: 70%;
  background: linear-gradient(90deg, var(--line) 25%, var(--cream) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 既読チェック */
.episode-card.is-read .episode-thumb { opacity: 0.7; }

.episode-read-mark {
  position: absolute;
  z-index: 1;
  bottom: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gray);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(74, 55, 40, 0.2);
}

/* =========================================================
   キャラ紹介
   ========================================================= */
.char-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
  max-width: 760px;
  margin: 0 auto;
}

.char-card {
  position: relative;
  padding: 30px 26px 26px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 6px 14px rgba(74, 55, 40, 0.08);
  text-align: center;
}

.char-mochi { border-top: 6px solid var(--red); }
.char-shio  { border-top: 6px solid var(--gray); }

.char-face {
  width: 110px;
  margin: 0 auto 6px;
  transition: transform 0.25s;
}

.char-card:hover .char-face { transform: rotate(-4deg) scale(1.06); }

.char-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
}

.char-mochi .char-name { color: var(--red); }
.char-shio  .char-name { color: #6E675F; }

.char-tag {
  margin: 0 0 16px;
  font-size: 0.82rem;
  color: var(--gray);
}

.char-profile {
  margin: 0;
  text-align: left;
  font-size: 0.9rem;
}

.char-profile div {
  display: flex;
  gap: 12px;
  padding: 8px 2px;
  border-bottom: 1.5px dashed var(--line);
}

.char-profile dt {
  flex: 0 0 4.5em;
  font-weight: 700;
  color: var(--gray);
}

.char-profile dd { margin: 0; }

/* ふきだし風のひとこと */
.char-quote {
  position: relative;
  margin: 22px 4px 0;
  padding: 10px 14px;
  background: var(--cream);
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 500;
}

.char-quote::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 26px;
  border: 8px solid transparent;
  border-bottom-color: var(--cream);
  border-top: none;
}

/* =========================================================
   SNS
   ========================================================= */
.sns-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 30px 26px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(74, 55, 40, 0.08);
}

.sns-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 2px solid var(--line);
}

.sns-text {
  margin: 0 0 20px;
  font-size: 0.95rem;
}

/* 最新の投稿ミニギャラリー */
.sns-gallery {
  margin: 0 0 22px;
}

.sns-gallery-label {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray);
}

.sns-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}

.sns-gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  transition: transform 0.15s, border-color 0.2s;
}

.sns-gallery-item:hover,
.sns-gallery-item:focus-visible {
  transform: translateY(-3px);
  border-color: var(--red);
}

.sns-gallery-item img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
}

.sns-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 999px;
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, background-color 0.2s, color 0.2s;
}

.btn:active { transform: scale(0.96); }

.btn-follow {
  background: var(--ink);
  color: #fff;
}

.btn-follow:hover { background: #63503F; }

.btn-share {
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
}

.btn-share:hover {
  background: var(--ink);
  color: #fff;
}

/* =========================================================
   フッター
   ========================================================= */
.site-footer {
  margin-top: 48px;
  padding: 28px 20px 34px;
  text-align: center;
  border-top: 2px dashed var(--line);
  color: var(--gray);
}

.footer-paw {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 14px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.footer-paw::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 0;
  width: 10px;
  height: 8px;
  border-radius: 50% 50% 45% 45%;
  background: var(--gray);
}

.footer-paw::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray);
  box-shadow: 6px -2px 0 var(--gray), 12px 0 0 var(--gray);
}

.site-footer small { display: block; font-size: 0.8rem; }

/* =========================================================
   まんがビューア(モーダル)
   ========================================================= */
.viewer { position: fixed; inset: 0; z-index: 100; }

.viewer[hidden] { display: none; }

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(52, 38, 27, 0.62);
}

.viewer-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 620px;
  height: min(92dvh, 1000px);
  margin: 4dvh auto 0;
  background: var(--paper);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: viewer-in 0.22s ease-out;
}

@keyframes viewer-in {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}

.viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 10px 18px;
  border-bottom: 2px dashed var(--line);
}

.viewer-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.viewer-title .ep-no { color: var(--red); margin-right: 0.5em; }

.viewer-close {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.viewer-close:hover { background: var(--red); color: #fff; }

.viewer-body {
  overflow-y: auto;
  background: var(--cream);
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}

.viewer-body img {
  margin: 0 auto;
  border-radius: 6px;
}

.viewer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 2px dashed var(--line);
}

.viewer-nav {
  padding: 9px 14px;
  border: none;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}

.viewer-nav:hover:not(:disabled) { background: var(--red); color: #fff; }

.viewer-nav:disabled { opacity: 0.35; cursor: default; }

.viewer-share-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.viewer-share {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
  border-bottom: 2px dotted var(--red);
  padding-bottom: 1px;
}

.viewer-share:hover { color: var(--red-deep); }

.viewer-hashtag {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--gray);
  border-bottom-color: var(--gray);
}

.viewer-hashtag:hover { color: var(--ink); }

/* ビューアを開いている間、背面のスクロールを止める */
body.viewer-open { overflow: hidden; }

/* =========================================================
   シェア御礼トースト
   ========================================================= */
.share-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(74, 55, 40, 0.24);
  translate: -50% -140%;
  opacity: 0;
  pointer-events: none;
  transition: translate 0.3s ease-out, opacity 0.3s ease-out;
}

.share-toast.is-visible {
  translate: -50% 0;
  opacity: 1;
}

.share-toast-paw {
  position: relative;
  width: 14px;
  height: 12px;
  flex-shrink: 0;
}

.share-toast-paw::before {
  content: "";
  position: absolute;
  left: 2.5px;
  bottom: 0;
  width: 9px;
  height: 7px;
  border-radius: 50% 50% 45% 45%;
  background: var(--pink);
}

.share-toast-paw::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 5px -1.5px 0 var(--pink), 10px 0 0 var(--pink);
}

/* =========================================================
   スクロール追従フォローバー
   ========================================================= */
.follow-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 32px);
  padding: 10px 14px 10px 18px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(74, 55, 40, 0.2);
  translate: -50% 140%;
  opacity: 0;
  transition: translate 0.3s ease-out, opacity 0.3s ease-out;
}

.follow-bar.is-visible {
  translate: -50% 0;
  opacity: 1;
}

.follow-bar-text {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.follow-bar .btn-follow {
  padding: 8px 18px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.follow-bar-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.follow-bar-close:hover { background: var(--line); }

@media (max-width: 600px) {
  .follow-bar-text { display: none; }
  .follow-bar { padding: 8px 10px 8px 16px; }
}

/* =========================================================
   キャラのちいさな動き
   ========================================================= */
@keyframes char-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  96%           { transform: scaleY(0.1); }
}

.char-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: char-blink 5.2s ease-in-out infinite;
}

.char-shio .char-eye { animation-delay: 1.4s; }

@keyframes wing-sway {
  0%, 100% { rotate: 0deg; }
  50%      { rotate: -4deg; }
}

.char-wing {
  transform-box: fill-box;
  transform-origin: 84px 62px;
  animation: wing-sway 3.4s ease-in-out infinite;
}

/* =========================================================
   スクロールでふわっと表示
   ========================================================= */
.fade-item {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 0.7s ease-out, translate 0.7s ease-out;
}

.fade-item.is-visible {
  opacity: 1;
  translate: 0 0;
}

/* =========================================================
   スマホ対応
   ========================================================= */
@media (max-width: 600px) {
  body { font-size: 15px; }

  .site-header { padding: 8px 12px; }
  .brand-name { display: none; } /* 狭い画面ではアイコンだけに */
  .nav a { font-size: 0.82rem; padding: 6px 9px; }

  .hero { padding-top: 40px; }
  .hero-logo { width: 88%; }

  section { padding: 44px 16px 16px; }
  .section-title { font-size: 1.3rem; }

  .latest-frame { padding: 8px; }
  .tape { width: 64px; height: 24px; top: -11px; }

  .paw-button { padding: 14px 40px 12px; font-size: 1.05rem; }

  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 12px;
  }

  .episode-title { font-size: 0.85rem; }

  .viewer-panel {
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .viewer-nav { font-size: 0.8rem; padding: 9px 11px; }
}

/* =========================================================
   アニメーションを減らす設定の人への配慮
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .paw,
  .episode-card:hover,
  .episode-card:focus-visible,
  .char-eye,
  .char-wing,
  .episode-skeleton-thumb,
  .episode-skeleton-line {
    animation: none;
  }

  .fade-item {
    opacity: 1;
    translate: 0 0;
    transition: none;
  }

  .viewer-panel { animation: none; }
  .follow-bar { transition: none; }
  .share-toast { transition: none; }
}

/* =========================================================
   下層ページ共通(about / archive / contact / terms / privacy / episode)
   ========================================================= */
.page-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 20px 8px;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.7rem;
}

.page-hero p {
  margin: 0;
  color: var(--gray);
  font-size: 0.95rem;
}

.back-link {
  display: block;
  margin: 0 0 20px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
}

.back-link::before { content: "← "; }

.back-link:hover { color: var(--red-deep); }

.page-card {
  max-width: 680px;
  margin: 0 auto 28px;
  padding: 28px 26px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 6px 14px rgba(74, 55, 40, 0.08);
  line-height: 1.9;
}

.page-card h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
}

.page-card p { margin: 0 0 14px; }
.page-card p:last-child { margin-bottom: 0; }

.page-card ul,
.page-card ol {
  margin: 0 0 14px;
  padding-left: 1.4em;
}

.page-card + .page-card { margin-top: -12px; }

/* お問い合わせページのボタン */
.page-contact-actions {
  text-align: center;
  margin-top: 20px;
}

/* アーカイブページの月ごとのグループ */
.archive-month {
  max-width: 960px;
  margin: 0 auto 40px;
}

.archive-month h2 {
  margin: 0 0 18px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--red);
}

.archive-month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.archive-month-item {
  display: block;
  padding: 8px 8px 10px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.2s;
}

.archive-month-item:hover,
.archive-month-item:focus-visible {
  transform: translateY(-3px);
  border-color: var(--red);
}

.archive-month-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
}

.archive-month-item .archive-month-title {
  margin: 8px 2px 0;
  font-weight: 700;
  font-size: 0.88rem;
}

.archive-month-item .archive-month-date {
  margin: 2px 2px 0;
  font-size: 0.76rem;
  color: var(--gray);
}

/* エピソード個別ページ */
.episode-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 620px;
  margin: 24px auto 0;
}

/* サイト内共通のフッターリンク */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin: 10px 0 0;
  font-size: 0.78rem;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
}

.footer-links a:hover { color: var(--ink); }

/* グッズ(準備中)バッジ */
.btn-soon {
  background: var(--cream);
  color: var(--gray);
  border: 2px dashed var(--line);
  cursor: default;
}

/* =========================================================
   ダークモード
   ========================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --cream:    #262019;
    --paper:    #322A22;
    --ink:      #F3E9DA;
    --red:      #E07A73;
    --red-deep: #C85F58;
    --gray:     #B6ABA0;
    --line:     #4A3F33;
    --pink:     #F2B8AC;
  }

  body {
    background-image: radial-gradient(rgba(255, 253, 246, 0.045) 1px, transparent 1px);
  }

  .site-header { background: rgba(38, 32, 25, 0.92); }

  .nav a:hover,
  .nav a:focus-visible { color: var(--ink); }

  .hero-cta,
  .paw-button { color: #2A211A; }

  .btn-follow { color: #2A211A; }

  .viewer-close { color: #2A211A; }

  .episode-new-label,
  .episode-read-mark { color: #2A211A; }
}
