/* assets/css/site.css */

*,
*::before,
*::after { box-sizing: border-box; }

:root{
  --bg: #ffffff;                 /* 全体背景 */
  --panel: #ffffff;              /* カード背景 */
  --panel2: #f1f6ff;             /* ホバー時 */
  --text: #1a1f2b;               /* メイン文字 */
  --muted: #6b7280;              /* サブ文字 */
  --line: #e5e7eb;               /* ボーダー */
  --brand: #4faaff;              /* アクセント */
  --brand2: #2e8df0;             /* 濃いブルー */
  --radius: 14px;
}

html, body{ height: 100%; }
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}


a{ color: inherit; text-decoration: none; }
img{ max-width:100%; display:block; }

.container{
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}


.site-header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
	 margin-bottom: 10px;
}


.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  transition: height .2s ease;

}

.page-top .logo img{
  height: 124px;
}

.page-viewer .logo img{
  height: 64px;
}
/* ===== TOP ===== */
.page-top .header-inner{
  height: 124px;
}

/* ===== VIEWER ===== */
.page-viewer .header-inner{
  height: 64px;
}

.logo{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .02em;
}

box-shadow: 0 10px 25px rgba(0,0,0,.35);
}

/* Hero slider (簡易) */
.hero{ width: 100%; margin: 14px 0 0;}
.hero .hero-wrap{
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}
.hero-track{ display:flex; transition: transform .55s ease; }
.hero-slide{
	flex: 0 0 100%;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;   /* PC */
  max-height: none;
}
.hero-dots{ display:flex; gap:8px; justify-content:center; margin: 10px 0 6px; }
.hero-dots button{
  width: 8px; height: 8px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.18);
  cursor:pointer;
}
.hero-dots button.is-active{
  width: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border-color: transparent;
}
.hero-slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* World text */
.world{
  margin: 18px 0 18px;
  padding: 14px 16px;

  background: var(--panel);
  color: var(--muted);
  line-height: 1.7;
}

/* Episode cards */
.cards{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 6px 0 24px;
}
@media (max-width: 1100px){ .cards{ grid-template-columns: repeat(3,1fr);} }
@media (max-width: 820px){ .cards{ grid-template-columns: repeat(2,1fr);} }

.card{
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  position: relative;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .2s ease, filter .2s ease;
}
.card:hover{
  transform: translateY(-2px);
  background: var(--panel2);
  border-color: rgba(69,212,146,.35);
}
.card .thumb{ aspect-ratio: 3 / 4; background: #000; }
.card .thumb img{ width:100%; height:100%; object-fit: cover; }
.card .meta{ padding: 10px 12px 12px; }
.card .title{ font-weight: 800; margin: 0 0 6px; }
.card .sub{
  font-size: 12px;
  color: var(--muted);
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap: wrap;
}

.badge{
  position:absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  padding: 7px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

/* 最新話を強調（先頭カード） */
.cards .card.is-latest{
  border-color: rgba(79,170,255,.45);
  background: #ffffff;
  box-shadow:
    0 12px 30px rgba(79,170,255,.15),
    0 0 0 1px rgba(79,170,255,.10) inset;
}

.cards .card.is-latest .thumb{
  aspect-ratio: 3 / 4; /* ヒーロー感 */
}

/* レスポンシブ（最新話の占有を調整） */
@media (max-width: 1100px){
  .cards .card.is-latest{ grid-column: span 3; grid-row: span 1; }
}
@media (max-width: 820px){
  .cards .card.is-latest{ grid-column: span 2; grid-row: span 1; }
	  .hero-slide{
    aspect-ratio: 1 / 1;  /* SP */
    max-height: none;
  }
	  .page-top .header-inner{
    height: 72px;
  }

  .page-viewer .header-inner{
    height: 48px;
  }
	  .page-top .logo img{
    height: 72px;
  }

  .page-viewer .logo img{
    height: 48px;
  }
}

/* 最新話：演出強化 */
.cards .card.is-latest{
  position: relative;
  border: 2px solid #d4af37; /* 金 */
  background: #ffffff;
  box-shadow:
    0 10px 25px rgba(212,175,55,.25);

}
.cards .card.is-latest .thumb{ position: relative; }

.cards .card.is-latest .meta{
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  padding: 0;
  z-index: 2;
}
.cards .card.is-latest .title{
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 8px;
  text-shadow: 0 12px 24px rgba(0,0,0,.55);
}
.cards .card.is-latest .sub{
  font-size: 13px;
  color: rgba(255,255,255,.82);
  text-shadow: 0 10px 22px rgba(0,0,0,.50);
}
.cards .card.is-latest .badge{ left: 12px; top: 12px; }

/* LATESTラベル */
.latest-pill{
  position:absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e10600; /* 赤 */
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(225,6,0,.3);
}


/* 進捗表示（カード内） */
.progress{
  margin-top: 10px;
  display:flex;
  align-items:center;
  gap:10px;
}
.progress-label{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.progress-bar{
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
  overflow: hidden;
}
.progress-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}

/* 既読（100%） */
.card.is-read{
  opacity: .65;
  filter: grayscale(.4);
}
.card.is-read:hover{
  opacity: .75;
  filter: grayscale(.3);
}
.read-pill{
  position:absolute;
  bottom: 12px;
  right: 12px;
  z-index: 4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.85);
}

/* Footer */
.site-footer{
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 13px;
}

/* =========================
   Viewer
   ========================= */

.viewer{
  width: 100%;
  height: calc(100vh - 64px);
  display:flex;
  flex-direction: column;
}

.viewer-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
margin: 0 23px;
}

.viewer-title{
  font-weight: 900;
  letter-spacing: .02em;
}

.viewer-actions{
  display:flex;
  align-items:center;
  gap: 8px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor:pointer;
  user-select:none;
}
.btn:hover{ background: var(--panel2); }
.btn:active{ transform: translateY(1px); }

.stage{
  flex: 1;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
	margin: 0 20px 20px; 
}
.viewer-actions.bottom-nav{
  justify-content: center;
  padding: 12px 0 20px; /* 下20px */
}
.stage-inner{
  position:absolute;
  inset:0;
  display:flex;
  will-change: transform;
  transition: transform 260ms ease;
}

.page{
  min-width: 100%;
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.page img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.nav-hit{
  position:absolute;
  top:0;
  bottom:0;
  width: 35%;
  z-index: 5;
}
.nav-hit.left{ left:0; }
.nav-hit.right{ right:0; }

.page-indicator{
  position:absolute;
  right: 12px;
  bottom: 12px;
  z-index: 6;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.85);
  font-size: 12px;
}

/* モバイル */
@media (max-width: 520px){
  .header-inner{ height: 58px; }
  .viewer{ height: calc(100vh - 58px); }
  .btn{ height: 34px; padding: 0 10px; border-radius: 10px; }
	  .hero-slide{
    aspect-ratio: 1 / 1;  /* SP */
    max-height: none;
  }
}
