/*
Theme Name: AGORA Child
Template: twentytwentyfive
Version: 1.0.2-style-full
Description: Comic AGORA custom child theme (full stylesheet).
*/

/* =========================
   Base variables
========================= */
:root{
  --ag-bg:#f7f9fb;
  --ag-card:#f7f9fb;
  --ag-ink:#111;
  --ag-muted:#666;
  --ag-title-band:#f3ecff;

  /* energetic orange border */
  --ag-border-a:#ff9a3c;
  --ag-border-b:#ffd1a6;
}

/* =========================
   TOP / SINGLE 共通：最上部サイトタイトル（Aboutの雰囲気）
   - 中央
   - 上下ライン
   - 大きすぎない
========================= */
.wp-block-site-title{
  font-size: 20px;                  /* 大きすぎる → 控えめに */
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  margin: 10px 0 14px;
  padding: 10px 0;
  border-top: 1px solid rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(0,0,0,0.25);
}
.wp-block-site-title a{
  text-decoration: none;
  color: inherit;
}

/* =========================
   二番目タイトル（子テーマ側 COMIC AGORA）は出さない
========================= */
.agora-title{
  display: none !important;
}

/* 親テーマの左下「powered by」など（自動クレジット）を消す */
.wp-block-site-generator,
footer .site-info,
footer .powered-by{
  display:none !important;
}

/* =========================
   Layout
========================= */
.agora-wrap{
  max-width: 1400px; /* 横幅が広いと4列/5列に増える */
  margin: 0 auto;
  padding: 0px 16px 54px;
}

.agora-hero{
margin-bottom: 10px; }

/* TOP上部：produced と About を同じ行で置けるようにする（右寄せは produced） */
.agora-topbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 0 0 10px;
}
.agora-topbar .agora-aboutchip{
  margin-right:auto; /* 左側 */
}
.agora-topbar .agora-produced{
  margin-left:auto;  /* 右側 */
  text-align:right;
  font-size: 12px;
  color: #777;
}
.agora-produced a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Writer chips */
.agora-writerbar{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin: 0 0 18px;
  overflow-x:hidden;
}
.agora-chip{
  display:inline-flex;
  align-items:center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration:none;
  font-size: 13px;
  font-weight: 800;
  background: rgba(0,0,0,.06);
  color: var(--ag-ink);
  border: 1px solid rgba(0,0,0,.10);
}
.agora-chip:hover{ background: rgba(0,0,0,.10); }
.agora-chip.is-active{
  background: var(--ag-ink);
  color:#fff;
  border-color: var(--ag-ink);
}

/* Aboutボタン（同じチップ系で） */
.agora-aboutchip{
  display:inline-flex;
  align-items:center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration:none;
  font-size: 13px;
  font-weight: 900;
  background: rgba(0,0,0,.06);
  color: var(--ag-ink);
  border: 1px solid rgba(0,0,0,.10);
}
.agora-aboutchip:hover{ background: rgba(0,0,0,.10); }

/* =========================
   Grid (auto-fit)
========================= */
.agora-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  align-items: stretch;
  grid-auto-flow: row dense;
}

/* =========================
   Tiles
========================= */
.agora-tile{
  position: relative;
  border-radius: 18px;
  background: var(--ag-card);
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
  overflow:hidden;
}

/* Gradient border */
.agora-tile::before{
  content:"";
  position:absolute;
  inset:0;
  padding: 2px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--ag-border-a), var(--ag-border-b));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
}

.agora-tile-link{
  display:block;
  padding: 14px 14px 12px;
  text-decoration:none;
  color: inherit;
}

.agora-meta{
  display:flex;
  justify-content: space-between;
  align-items:flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.agora-meta-left{ min-width:0; }
.agora-author{ font-weight: 900; font-size: 13px; color: #222; }
.agora-date{ display:block; font-size: 12px; color: #777; margin-top: 2px; }

.agora-comment-badge{
  font-size: 12px;
  font-weight: 900;
  color: #111;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.16);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* タイル見出し（もうワンサイズ大きく） */
.agora-tile-title{
  margin: 0 0 10px;
  font-size: 17px;                 /* ← 1サイズUP */
  line-height: 1.35;
  font-weight: 900;
  color: #111;
  background: var(--ag-title-band);
  border-radius: 12px;
  padding: 10px 12px;
  display:block;
  width:100%;
  box-sizing:border-box;
}

.agora-body{
  display:grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  align-items: stretch;
}
.agora-excerpt{ margin:0; font-size:14px; line-height:1.75; color:#333; }

.agora-sideimg{
  width: 120px;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(0,0,0,.04);
}
.agora-sideimg img{ width:100%; height:100%; object-fit:cover; display:block; }

.agora-foot{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(0,0,0,.10);
  font-size: 12px;
  color: #666;
}
.agora-read{ font-weight: 900; }
.agora-ext-flag{ font-weight: 900; display:inline-flex; align-items:center; gap:6px; }
.agora-ext-flag::before{ content:"🔗"; }

/* Mobile */
@media (max-width: 640px){
  .agora-grid{ grid-template-columns: 1fr; }
  .agora-body{ grid-template-columns: 1fr; }
  .agora-sideimg{ width: 100%; height: 170px; }
}

/* Infinite loader */
/*.agora-infinite{display:none;margin:18px auto 0;text-align:center;color:#777;padding:14px 0 0;}
.agora-infinite.is-active{display:block;}*/
/*---下方スクロールするように修正追加 2026/2/4--- */
/* Infinite loader: sentinel must exist in layout for IntersectionObserver */
.agora-infinite{
  display:block;
  margin:18px auto 0;
  text-align:center;
  color:#777;
  padding:14px 0 0;

  opacity:0;              /* 普段は見えない */
  pointer-events:none;    /* クリック等も無効 */
}
.agora-infinite.is-active{
  opacity:1;              /* 読み込み中だけ見せる */
  pointer-events:auto;
}

/*---修正追加ここまで--- */
.agora-spinner{width:26px;height:26px;margin:0 auto 8px;border-radius:999px;border:2px solid rgba(0,0,0,.12);border-top-color:rgba(0,0,0,.45);animation:agoraSpin .9s linear infinite;}
@keyframes agoraSpin{to{transform:rotate(360deg);}}
.agora-loading-text{margin:0;font-size:12px;}

/* =========================
   Single page
========================= */
.agora-post-wrap{background:var(--ag-bg);padding:26px 16px 70px;}
.agora-post-card{
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
  padding: 18px 22px 26px;
}

/* 記事タイトル（読みやすさ重視） */
.agora-post-title{
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 900;
  background: var(--ag-title-band);
  border-radius: 14px;
  padding: 10px 12px;
  display:block;
  width:100%;
  box-sizing:border-box;
}

.agora-post-meta{
  font-size: 13px;
  color: #666;
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  align-items:center;
}
.agora-post-author{ font-weight: 900; color:#333; }
.agora-post-dot{ color:#aaa; }
.agora-comment-link{ text-decoration:none; font-weight: 900; }

/* Home icon */
.agora-home-icon{
  margin-left:auto;
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.14);
  text-decoration:none;
  font-weight: 900;
}
.agora-home-icon:hover{ background: rgba(0,0,0,0.10); }

.agora-post-rule{margin-top:14px;border-top:1px solid rgba(0,0,0,.10);}
.agora-post-body{margin-top:18px;font-size:16px;line-height:1.9;color:#222;}
.agora-post-body img{max-width:100%;height:auto;width:auto;display:block;margin:18px auto;}
.agora-post-body figure{margin:18px auto;}
.agora-post-body figcaption{color:#666;font-size:13px;text-align:center;}

/* =========================
   Comments (single)
========================= */

/* “◯件のフィードバック”は不要 */
.comments-title{ display:none !important; }

/* 見出しは「コメント」だけ */
#comments{
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.14);
}
#comments::before{
  content: "コメント";
  display:block;
  font-size: 12px;
  font-weight: 900;
  color: #555;
  margin: 0 0 10px;
}

/* 注記（少し大きく） */
.agora-comment-note{
  font-size: 13px !important;
  color: #666 !important;
  margin: 6px 0 10px !important;
}

/* ログイン文は小さく */
.logged-in-as{
  font-size: 12px !important;
  color: #666 !important;
  margin: 0 0 10px !important;
}
.logged-in-as a{ color:#555; }

/* 番号(1,2)と名前を同じくらいの大きさに */
ol.comment-list{
  list-style: decimal !important;
  padding-left: 1.4em !important;
  margin: 8px 0 0 !important;
}

/* 1コメントカード */
.comment-list .comment{
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0;
  background: rgba(0,0,0,0.02);
  font-size: 14px; /* ← ここが番号の基準サイズ */
}

/* 「〜より」を消す（TanuKumaだけにする） */
.comment-author .says{ display:none !important; }

/* 名前を少し強く・大きく */
.comment-author .fn{
  font-size: 14px;      /* 1,2 と同程度 */
  font-weight: 900;
  color: #222;
}

/* 日時 */
.comment-metadata{
  font-size: 12px;
  color: #777;
  margin-top: 2px;
}

/* 本文：読みやすく */
.comment-content{
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.8;
  color: #222;
}

/* 返信/編集を控えめ */
.reply a,
.comment-edit-link{
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #555 !important;
}

/* フォーム全体：シャープに横幅に馴染む */
#respond{
  margin-top: 14px;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}

/* ラベル（コメント※）は小さく */
#comments label{
  font-size: 12px !important;
  color: #666 !important;
}

/* 入力枠：横長 / 2行程度 / 入力文字は大きく */
#comments textarea{
  width: 100% !important;
  min-height: 3.2em !important;  /* 約2行 */
  font-size: 16px !important;    /* 入力文字を大きく */
  line-height: 1.6 !important;
}

/* 送信ボタン：美しく（控えめなオレンジグラデ） */
#comments input[type="submit"],
#comments .submit{
  background: linear-gradient(180deg, rgba(255,154,60,0.20), rgba(255,209,166,0.18)) !important;
  color: #111 !important;
  border: 1px solid rgba(0,0,0,0.14) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-weight: 900 !important;
  font-size: 13px !important;
  box-shadow: none !important;
}
#comments input[type="submit"]:hover,
#comments .submit:hover{
  background: linear-gradient(180deg, rgba(255,154,60,0.28), rgba(255,209,166,0.24)) !important;
}

/* Bottom nav (if used) */
.agora-bottom-nav{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;}
.agora-iconbtn{width:38px;height:38px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:#111;background:rgba(0,0,0,0.06);border:1px solid rgba(0,0,0,0.14);}
.agora-iconbtn:hover{background:rgba(0,0,0,0.10);}

/* Footer credits（右下だけ残す想定） */
.agora-credits{
  max-width: 1020px;
  margin: 0 auto;
  padding: 10px 16px 18px;
  text-align: right;
  font-size: 11px;
  color: #777;
}
.agora-credits a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================
   TOP Header: match About look (site title)
   - smaller title
   - thin top/bottom lines
========================= */
.wp-block-site-title{
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  text-align: left; /* block theme default; keep */
  margin: 8px 0 14px !important;
  padding: 10px 0 !important;
  border-top: 1px solid rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(0,0,0,0.25);
}
.wp-block-site-title a{
  text-decoration: none !important;
  color: inherit !important;
}

/* produced line: right aligned, smaller; About bold */
.agora-producedline{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap: 10px;
  margin: 6px 0 10px;
}
.agora-about-link{
  color:#000;
  font-weight: 900;
  text-decoration: none;
}
.agora-about-link:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.agora-produced-text{
  font-size: 12px;
  color: rgba(0,0,0,0.65);
}
.agora-produced-text a{
  color: rgba(0,0,0,0.65);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================
   TOP Tiles: height unify + prevent bottom cut-off
========================= */
@media (min-width: 720px){
  .agora-tile{
    height: 280px; /* was too tall/too short; adjust here */
  }
  .agora-tile-link{
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .agora-body{ flex: 1 1 auto; min-height: 0; }
  .agora-foot{ margin-top: auto; }
}

/* Clamp to fit inside fixed height */
.agora-tile-title{
  display:-webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.agora-excerpt{
  display:-webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Keep side image from stretching too much */
.agora-sideimg{
  height: 120px;
}
.agora-sideimg img{
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* Ensure footer row always visible */
.agora-foot{
  padding-top: 8px;
  margin-top: 10px;
}

/* Footer credit (Policy A) */
.agora-footer{
  padding: 10px 16px 18px;
}
.agora-credits{
  max-width: 1020px;
  margin: 0 auto;
  text-align: right;
  font-size: 11px;
  color: #777;
}
.agora-credits a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* =========================
   TOP Fixes: title, produced line, tile height
========================= */

/* Force site title styling (About/default look) */
header .wp-block-site-title,
.wp-block-site-title{
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-align: center !important;
  margin: 10px 0 14px !important;
  padding: 10px 0 !important;
  border-top: 1px solid rgba(0,0,0,0.25) !important;
  border-bottom: 1px solid rgba(0,0,0,0.25) !important;
}
header .wp-block-site-title a,
.wp-block-site-title a{
  text-decoration: none !important;
  color: inherit !important;
}

/* Right-aligned About + produced line (single line) */
.agora-producedline{
  display:flex !important;
  justify-content:flex-end !important;
  align-items:baseline !important;
  gap: 10px !important;
  margin: 8px 0 10px !important;
}
.agora-about-link{
  font-weight: 900 !important; /* About is bold */
  font-size: 13px !important;
  color: #000 !important;
  text-decoration: none !important;
}
.agora-about-link:hover{
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.agora-produced-text{
  font-size: 12px !important;
  color: rgba(0,0,0,0.65) !important;
}
.agora-produced-text a{
  color: rgba(0,0,0,0.65) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Hide any legacy produced paragraph if still present somewhere */
.agora-produced{ display:none !important; }

/* TOP tiles: unify height so bottom content won't be cut */
@media (min-width: 720px){
  .agora-tile{ height: 280px; }
  .agora-tile-link{
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .agora-body{ flex: 1 1 auto; min-height: 0; }
  .agora-foot{ margin-top: auto; }
}

/* Clamp title/excerpt */
.agora-tile-title{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.agora-excerpt{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

/* Ensure external flag is visible even with tighter tiles */
.agora-ext-flag{ white-space: nowrap; }

/* =========================
   Comment UI restore (kept)
========================= */

/* Remove the unnecessary “required field” message (in case it renders) */
.comment-notes,
.required-field-message,
.wp-block-post-comments-form .required-field-message{
  display: none !important;
}

/* Text color: true black for post body & comment body */
.wp-block-post-content, .wp-block-post-content *,
.entry-content, .entry-content *,
.agora-post-body, .agora-post-body *{
  color: #000 !important;
}
.wp-block-comment-content, .wp-block-comment-content *,
.comment-content, .comment-content *{
  color: #000 !important;
}

/* Comment textarea: compact height (about 2–3 lines) */
#respond textarea,
.comment-respond textarea,
.comment-form-comment textarea,
.wp-block-post-comments-form textarea,
.wp-block-comments textarea{
  width: 100% !important;
  min-height: 3.0em !important;
  max-height: 6.0em !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
}

/* Submit button: Style B (white + orange border) */
#comments input[type="submit"],
#comments .submit,
.wp-block-post-comments-form input[type="submit"]{
  background: #fff !important;
  color: #111 !important;
  border: 2px solid rgba(255,154,60,0.95) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-weight: 900 !important;
  font-size: 13px !important;
  box-shadow: none !important;
}
#comments input[type="submit"]:hover,
#comments .submit:hover,
.wp-block-post-comments-form input[type="submit"]:hover{
  background: rgba(255,154,60,0.10) !important;
}

/* Remove underlines in comment meta links (hover only) */
.comment-author a,
.comment-metadata a,
.reply a,
.comment-edit-link,
.wp-block-comment-date a,
.wp-block-comment-author-name a,
.wp-block-comment-reply-link a{
  text-decoration: none !important;
  border-bottom: none !important;
}
.comment-author a:hover,
.comment-metadata a:hover,
.reply a:hover,
.comment-edit-link:hover,
.wp-block-comment-date a:hover,
.wp-block-comment-author-name a:hover,
.wp-block-comment-reply-link a:hover{
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Short divider line between comments */
.wp-block-comment-template > li,
.wp-block-comment-template .wp-block-comment,
.comment-list > li,
.comment-list li.comment,
.commentlist > li{
  list-style: none !important;
  margin-bottom: 18px !important;
  padding-bottom: 12px !important;
  position: relative;
}
.wp-block-comment-template > li:not(:last-child)::after,
.wp-block-comment-template .wp-block-comment:not(:last-child)::after,
.comment-list > li:not(:last-child)::after,
.comment-list li.comment:not(:last-child)::after,
.commentlist > li:not(:last-child)::after{
  content: "";
  display: block;
  width: 38%;
  height: 1px;
  background: rgba(0,0,0,0.22);
  margin-top: 12px;
}


/* Hide any legacy left produced block if it exists */
.agora-produced{
  display:none !important;
}

/* =========================
   Header title (all pages)
   Target: #header #headering h1 a
   Goal:
   - Smaller title
   - Short top/bottom lines around the title (not page-wide)
   - Add left padding (breathing room)
========================= */

/* Give the header area a little left padding so the title doesn't stick to the edge */
#header{
  padding: 10px 0 8px 14px !important; /* top right bottom left */
  margin: 0 0 10px !important;
  border: none !important;            /* avoid page-wide lines */
}

/* Remove default underline */
#header #headering h1,
#header #headering h1 a{
  text-decoration: none !important;
}

/* Title styling + lines */
#header #headering h1{
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

#header #headering h1 a{
  font-size: 16px !important;         /* smaller */
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  color: #000 !important;

  display: inline-block !important;
  position: relative !important;
  padding: 10px 0 !important;         /* room for lines */
}

/* Top line (short; matches title width) */
#header #headering h1 a::before{
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  right: 6px !important;
  top: 2px !important;
  height: 1px !important;
  background: rgba(0,0,0,0.30) !important;
}

/* Bottom line (short; matches title width) */
#header #headering h1 a::after{
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  right: 6px !important;
  bottom: 2px !important;
  height: 1px !important;
  background: rgba(0,0,0,0.30) !important;
}
