/* ---- 全体基本 ---- */
body {
    background-image: url('png/background.jpg');
    background-repeat: repeat;
    background-position: top left;
    background-attachment: scroll; /* 普通にスクロール */
    background-size: auto;   /* coverを消す */
    background-color: #000;  /* 念のため黒で塗りつぶす */
    color: #ff0000;
    font-family: "DotGothic16", sans-serif;
    font-size: 24px;
    text-align: center;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.dotgothic16-regular {
    font-family: "DotGothic16", sans-serif;
    font-weight: 400;
    font-style: normal;
}
.exbutton {
    display: inline-block;
    font-size: 30px;
    color: #6640ff;
    text-decoration: none;
    margin-top: 20px;
    margin-bottom: 20px;   /* ← これを追加！ */
}


/* ---- ヘッダー・ロゴ ---- */
.header {
    background: #000;
    padding: 10px;
}
.logo {
  width: 70%;
  height: auto;  
  max-width: 70%; 
  display: block; 
  margin: 0 auto; 
}
.container {
    
    max-width: 800px;
    margin: 20px auto;
    background: #000;
    padding: 20px;
    border: 5px solid #ff0000;
    box-shadow: 0 0 20px #ff0000;
}

/* ---- タイトル系 ---- */
h1 {
    color: #ff0000;
    font-weight: bold;
    font-size: 30px;
    margin: 10px 0;
    text-align: left;
}
h2 {
    color: #ff0000;
    text-shadow: 2px 2px 5px #fff;
    font-size: 32px;
    margin: 20px 0;
}
h3 {
    color: #ff0000;
    font-weight: bold;
    font-size: 20px;
    margin: 10px 0;
    text-align: left;
}
h4 {
    color: #ff3636;
    font-weight: bold;
    font-size: 40px;
    margin: 2px 0;
    text-align: center;
    text-shadow: 1px 1px #0000006a;
}

.flash-title{
  font-size:60px;
  font-weight:bold;
  color:#7b64d6;
  margin:0px;
  height: 100px;
  display:inline-block;
  padding:6px 16px;
  align-items: center;
  justify-content: center;
  background:#120214;
  border:4px solid rgba(255,255,255,0.08);
  border-radius:6px;
  text-shadow:4px 4px 0 #331975; 
  animation:flicker 2.6s infinite;
}
@keyframes flicker{
  0%,100%{ color:#360b6b; }
  50%{ color:#a9a6ff; } 
}


/* ---- リンク一覧 ---- */
.link-list {
    list-style: none;
    padding: 0;
}
.link-list li {
    margin: 12px 0;
}
.link-list a {
    display: block;
    padding: 16px;
    background: #660000;
    color: white;
    text-decoration: none;
    border: 2px solid #ff0000;
    border-radius: 5px;
    font-size: 24px;
}
.link-list a:hover {
    background: #ff0000;
    color: #000;
}

.back-link {
    font-size: 24px;   /* 文字大きめ */
    font-weight: bold; /* 太字にする場合 */
}

/* ---- SNSリンク ---- */
.sns-links {
    margin-top: 20px;
}
.sns-links a {
    margin: 0 10px;
    color: #ff0000;
    font-size: 20px;
    text-decoration: none;
}

/* ---- 点滅 ---- */
.blink {
    animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* ---- カウンターやテキスト装飾 ---- */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

.counter-title,
.counter-footer {
    font-size: 24px;
    margin: 10px 0;
    letter-spacing: 1px;
}
.counter-box {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 10px 0;
}
.counter-box .digit {
    background-color: #111;
    border: 2px solid #ff0000;
    padding: 12px;
    color: #ffffff;
    font-size: 28px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    box-shadow: inset 2px 2px 0 #330000, inset -2px -2px 0 #ff6666;
    text-shadow: 3px 0px 0 #5d0000, -3px 0px 0 #ff4444;
}

/* ---- フォーム（ウインドウ） ---- */
.form-group { margin: 15px 0; text-align: left; }
label { color: #ff0000; font-weight: bold; }
input, textarea {
    resize: none;
    width: 90%;
    padding: 8px;
    font-size: 24px;
    background: #222;
    color: #fff;
    border: 2px solid #ff0000;
    border-radius: 5px;
}
aside {
    width: 100%;
    background-color: #540000;
    padding: 20px;
    box-sizing: border-box;
}

/* ---- ボタン ---- */
button {
    background: #660000;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 24px;
}
button:hover {
    background: #ff0000;
    color: #000;
}

/* ---- メールリンクなど ---- */
.email-link { margin-top: 20px; font-size: 16px; }

/* ---- Web拍手風ボタン ---- */
.web-clap { margin-top: 20px; }
.web-clap button {
    background: #ff0000;
    border: 2px solid #660000;
    color: white;
}

/* ---- サムネイル ---- */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.thumb {
  position: relative; /* アイコン配置の基準 */
  display: inline-block;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}

/* 複数枚投稿アイコン → サムネ右下に重ねる */
.thumb[data-type="comic"]::after {
  content: "";
  position: absolute;
  bottom: 65px;   /* サムネ下からの距離 */
  right: 8px;    /* サムネ右からの距離 */
  width: 64px;   /* アイコン大きさ（ここを大きめに） */
  height: 64px;
  background: url("logo/icon1.png") center/contain no-repeat;

  z-index: 20;   /* タグやタイトルより前面 */
  pointer-events: none;
}

/* サムネのタイトル（上に重ねる） */
.thumb-title {
  position: absolute;
  top: 6px;
  left: 4px;
  font-size: 24px;
  background: rgba(44, 44, 44, 0.6);
  padding: 0 4px;
  color: #fff;
  z-index: 6; /* アイコンよりも上でもOK */
}
.tags {
    margin-top: 4px;
    font-size: 12px;
    text-align: left;
    color: #ff0095;
}
.tag {
    display: inline-block;
    margin: 2px;
    padding: 2px 6px;
    background: #eee;
    border: 1px solid #999;
    cursor: pointer;
}

/* ---- ビューア ---- */
.viewer, .comicViewer {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow: auto;
    cursor: pointer;
}
.viewer img {
    max-width: 90%;
    margin: 10px auto;
    display: block;
    box-shadow: 0 0 10px #000;
}
.comicViewer {
    overflow-y: auto;
    text-align: center;
    padding: 20px 0;
}
.comicViewer img {
    max-width: 90%;
    height: auto;
    margin: 20px auto;
    display: block;
    box-shadow: 0 0 10px #000;
}

/* ---- フッター ---- */
.footer {
    text-align: center;
    font-size: 12px;
    margin-top: 10px;
    border-top: 1px dotted #000;
    padding-top: 5px;
}

/* ---- パスワードポップアップ ---- */
.popup-overlay {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.popup-window {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}
.popup-window .popup-bg {
    width: 100%;
    height: auto;         /* ← 追加: 比率維持して全体表示 */
    object-fit: contain;  /* ← 追加: はみ出さないように */
    display: block;
}
.popup-content {
    position: relative;  
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    width: 100%;
    height: 100%;
}

.popup-content input {
    width: 80%;
    padding: 4px;
    margin: 5px 0;
}


/* ポップアップ */
.popup-overlay{
    position:fixed;
    top:0;left:0;right:0;bottom:0;
    background:rgba(0,0,0,0.8);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:2000;
}
.popup-window{
    position:relative;
    max-width:90%;
    max-height:90%;
}
.popup-window .popup-bg {
    width:100%;
    height:auto;          /* ← 修正: 固定値を解除 */
    object-fit:contain;   /* ← 修正: 比率維持 */
}

/* 入力エリア（文字だけ） */
.popup-content {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #ffffff00;

    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

/* 入力フォーム */
#passwordInput {
    width: 48%;
    height: 30%;
    margin-top: 26%;
    font-size: 40px;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    background: #fff;
    color: #000;
    border: 2px solid #00f;
    border-radius: 5px;
    box-sizing: border-box;

    pointer-events: auto;
}

#passwordError{
    transform: translateY(-14px);
    font-size:16px;
    color:red;
    visibility: hidden;
}
#passwordError.active{
    visibility: visible;
}

.popup-close {
    position: absolute;
    top: 6%;
    right: 5%;
    width: 8%;     
    height: auto;
    cursor: pointer;
    z-index: 10;
}
.popup-enter {
    position: absolute;
    bottom: 5%;
    right: 7%;
    width: 15%;     
    height: auto;
    cursor: pointer;
    z-index: 10;
}

        /* 🔽 横スクロール禁止 */
html, body {
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

.viewer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  z-index: 1000;
  overflow: auto;
  cursor: pointer;

  align-items: center;
  justify-content: center;
}

.viewer img {
  max-width: 90%;
  max-height: 90vh;
  margin: 10px auto;
  display: block;
  box-shadow: 0 0 10px #000;
  object-fit: contain;
}

.comicViewer {
  position: fixed;
  margin-top: 20;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  z-index: 1000;
  overflow: auto;
  cursor: pointer;
}

/* リーダーモード対策 */
@media (reader) {
  body {
    display: none !important;
  }
}

@media (reader) {
  /* ポップアップ全体を隠す */
  .popup-overlay,
  .popup-window,
  .popup-content,
  .banner-area {
    display: none !important;
  }
}

/* 18コメント */



 /* 6件目以降は非表示 */
.hidden-update {
    display: none;
}