/* ====== ボケツッコミメーカー｜白黒シンプル 最終整理版（ヘッダー修正版） ====== */
:root{
  --ink:#111;
  --paper:#fff;
  --shadow: 4px 4px 0 #000;
  --radius: 14px;
  --header-h: 60px;
}

/* = Base = */
*{ box-sizing:border-box; }
html,body{
  margin:0; padding:0;
  background:var(--paper); color:var(--ink);
  font-family:"M PLUS Rounded 1c","Hiragino Maru Gothic ProN","Arial Rounded MT Bold",system-ui,sans-serif;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
img{ display:block; max-width:100%; height:auto; }
a{ color:inherit; text-decoration:none; }
button{ cursor:pointer; }

/* = Layout = */
.container{ max-width:960px; margin:0 auto; padding:16px; }
.mt{ margin-top:16px; }
.mt2{ margin-top:28px; }
.mb{ margin-bottom:16px; }
.row{ display:flex; align-items:center; gap:12px; }
.meta{ font-size:12px; opacity:.8; display:flex; gap:10px; flex-wrap:wrap; }

/* = Header（線・影なし） = */
.header{
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background:#fff;
  border:0; box-shadow:none; outline:0;
  display:flex; justify-content:center; /* 中身を中央寄せ（PC） */
}
.header-inner{
  max-width:960px; width:100%;
  display:flex; align-items:center; gap:12px;
  padding:0 16px;
}

/* ロゴ */
.logo{
  display:flex; align-items:center; gap:8px;
  font-weight:900; font-size:20px;
  white-space:nowrap;
}
.logo-img{ width:36px; height:36px; }

/* = Global Nav & Hamburger = */
.nav{ margin-left:auto; display:flex; gap:10px; }
.nav a{
  display:inline-flex; align-items:center; justify-content:center;
  height:38px; padding:0 14px;
  border:2px solid var(--ink);
  border-radius:999px; font-weight:900;
  background:#fff; transition:.12s;
}
.nav a:hover{ background:#000; color:#fff; }

.menu-btn{
  display:none;
  width:42px; height:42px;
  border:2px solid var(--ink);
  border-radius:10px; background:#fff;
  box-shadow:var(--shadow);
  align-items:center; justify-content:center;
  gap:4px; padding:6px; z-index:160;
}
.menu-btn .menu-bar{
  width:22px; height:2px; background:#000; border-radius:2px;
  transition:transform .18s, opacity .18s;
}

/* PC: 横並びナビ */
@media (min-width: 769px){
  .nav{ display:flex; gap:10px; margin-left:auto; }
}

/* SP: ハンバーガー化（改行防止＆右端固定） */
@media (max-width: 768px){
  /* 1行固定レイアウト：左=ロゴ / 右=ハンバーガー */
  .header{ justify-content:stretch; }
  .header-inner{
    max-width:none; width:100%;
    padding:0 12px;
    display:grid; grid-template-columns: 1fr auto;
    align-items:center; gap:8px;
  }

  /* ロゴが長くても落とさない：小さめ＋省略 */
  .logo{
    font-size:20px !important;
    margin:0 !important;
    min-width:0;               /* ellipsis 有効化 */
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .logo-img{ width:36px; height:36px; } /* 画像も少し小さく */

  /* ハンバーガーは必ず右端 */
  .menu-btn{
    display:flex !important;
    justify-self:end;
    margin:0 !important;
  }

  /* ナビはヘッダー直下に固定 */
  .nav{
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background:#fff;
    border:0; box-shadow:none;

    display:flex;
    flex-direction:column;
    gap:0;

    transform: translateY(-120%);
    transition: transform .18s ease-out;

    z-index: 150;
    pointer-events: none;
    overflow:hidden;
  }
  .nav a{
    padding: 14px 16px;
    height: auto;
    border-radius: 0;
    border-bottom: 1px solid #111;
  }
  .nav.is-open{
    transform: translateY(0);
    pointer-events: auto;
  }

  /* ハンバーガー開閉アニメ */
  .menu-btn[aria-expanded="true"] .menu-bar:nth-child(1){ transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-bar:nth-child(2){ opacity:0; }
  .menu-btn[aria-expanded="true"] .menu-bar:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
}

/* = UI Parts = */
.h-title{
  display:inline-block; padding:6px 12px;
  border:2px solid var(--ink); border-radius:var(--radius);
  font-size:18px; font-weight:900; background:#fff; box-shadow:var(--shadow);
}
.tag{
  display:inline-block; padding:4px 10px;
  border:2px solid var(--ink); border-radius:999px;
  font-weight:900; background:#fff; font-size:13px;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 16px; border:2px solid var(--ink); border-radius:var(--radius);
  font-weight:900; background:#fff; box-shadow:var(--shadow); transition:.12s;
}
.btn:hover{ background:#000; color:#fff; }
.btn.sm{ padding:6px 10px; font-size:14px; }
.card{
  background:#fff; border:2px solid var(--ink);
  border-radius:var(--radius); padding:16px; box-shadow:var(--shadow);
}
.grid{ display:grid; gap:16px; }
.grid.cards{ grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); }
.bubble{
  position:relative; border:2px solid var(--ink); border-radius:var(--radius);
  padding:12px 14px; background:#fff; font-weight:900; box-shadow:var(--shadow);
}
.bubble::after{
  content:""; position:absolute; left:20px; bottom:-16px;
  border-left:10px solid transparent; border-right:10px solid transparent; border-top:16px solid var(--ink);
}
.bubble::before{
  content:""; position:absolute; left:22px; bottom:-13px; z-index:2;
  border-left:8px solid transparent; border-right:8px solid transparent; border-top:13px solid #fff;
}

/* = Inputs = */
.input, textarea{
  width:100%; border:2px solid var(--ink); border-radius:var(--radius);
  padding:10px; font-size:15px; font-weight:700; background:#fff;
}
textarea{ min-height:100px; resize:vertical; }

/* = Character picker = */
.char-opts{ display:grid; grid-template-columns:repeat(auto-fill, minmax(120px,1fr)); gap:16px; }
.char{ display:flex; flex-direction:column; align-items:center; gap:8px; padding:4px; border:none; background:transparent; cursor:pointer; }
.char input{ display:none; }
.char .avatar{
  width:110px; height:110px; border-radius:50%;
  border:3px solid #111; background:#fff; object-fit:cover;
}
.char.selected .avatar{ box-shadow:0 0 0 4px #000; }
@media (min-width:768px){ .char .avatar{ width:128px; height:128px; } }

/* = Hero（トップのメインビジュアル） =
   PC：左テキスト / 右画像（2カラム）
   SP：縦並び（テキスト → 画像） */
.hero-split{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 4vw, 36px);
  padding: clamp(24px, 6vw, 64px) clamp(16px, 4vw, 24px);
  background:#fff;
  border-top: 3px solid #111;
  border-bottom: 3px solid #111;
}
.hero-split__copy{
  align-self: center;
  max-width: 640px;
}
.hero-split__title{
  margin: 0 0 .8em;
  font-weight: 900;
  font-size: clamp(22px, 4.6vw, 42px);
  line-height: 1.4;
  letter-spacing: .02em;
}
.hero-split__title .u-em{
  margin-left: .25em;
  padding: .05em .25em;
  background:#000; color:#fff;
  box-shadow: 4px 4px 0 #000;
}
.hero-split__lead{
  margin: .2em 0 1.1em;
  font-weight: 800;
  font-size: clamp(14px, 2.2vw, 18px);
  line-height: 1.7;
  max-width: 48ch;
}
.hero-split__cta{ display:flex; gap:12px; flex-wrap:wrap; }

.hero-split__media{ align-self: end; }
.hero-card{
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  aspect-ratio: 16 / 10;
  transform: rotate(-5deg);
  border: 3px solid #111;
  border-radius: 18px;
  box-shadow: 8px 8px 0 #000;
  background:#000;
  overflow: hidden;
}
.hero-card img{
  width:100%; height:100%;
  object-fit: cover; object-position: center;
  filter: contrast(105%) brightness(92%);
}

/* SP: 縦並び。画像はテキストの下 */
@media (max-width: 768px){
  .hero-split{
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  .hero-split__copy{ order: 1; }
  .hero-split__media{
    order: 2;
    width: 100%; max-width: none;
    margin-top: 8px;
  }
  .hero-card{
    width: calc(100% - 24px);
    margin: 0 auto;
    aspect-ratio: 16 / 10;
    transform: rotate(-3deg);
    box-shadow: 8px 8px 0 #000;
  }
}

/* ===== スマホ時：メニューの白い四角が上に覗くのを完全に隠す ===== */
@media (max-width: 768px){
  .header{ z-index: 1000; }
  .nav{
    z-index: 900;
    top: var(--header-h);
    background:#fff;
    border:0; box-shadow:none; border-radius:0;
    overflow: hidden;
  }
  .nav:not(.is-open){
    transform: translateY(-120%);
    clip-path: inset(0 0 100% 0);
    pointer-events: none;
  }
  .nav.is-open{
    transform: translateY(0);
    clip-path: inset(0);
    pointer-events: auto;
  }
}

/* ================== 一覧カード（topic-card）を1本化 ================== */
.topic-card{
  border: 4px solid #111 !important;
  box-shadow: none !important;
  border-radius: 16px;
}

/* ================== 吹き出しの▽（上側＋アイコン側）を1本化 ================== */
.topic-card .bubble{ position: relative; }
.topic-card .bubble::after{
  content:"";
  position:absolute;
  top:-16px; bottom:auto;
  left:72px;
  width:0; height:0;
  border-left:10px solid transparent;
  border-right:10px solid transparent;
  border-bottom:16px solid #111;
}
.topic-card .bubble::before{
  content:"";
  position:absolute;
  top:-12px; bottom:auto;
  left:74px;
  width:0; height:0;
  border-left:8px solid transparent;
  border-right:8px solid transparent;
  border-bottom:13px solid #fff;
}

/* ===== Footer ===== */
.site-footer{
  margin-top: 28px;
  background: #fff;
  border-top: 3px solid #111;
  box-shadow: 0 -6px 0 #111;
}
.site-footer .footer-inner{
  padding: 24px 0 28px;
}
.footer-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.footer-nav a{
  display: inline-block;
  padding: .45rem .9rem;
  border: 2px solid #111;
  border-radius: 999px;
  background: #fff;
  color: #111;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 3px 3px 0 #111;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.footer-nav a:hover,
.footer-nav a:focus-visible{
  background: #111;
  color: #fff;
  box-shadow: 5px 5px 0 #111;
}
.footer-copy{
  text-align: center;
  font-weight: 700;
  color: #333;
  font-size: .9rem;
}

/* ==== ANDROID対策：SP時に絶対に1行に収め、右端固定 ==== */
html{
  -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
}

@media (max-width: 768px){
  /* 左=ロゴ（伸縮）/ 右=ボタン（固定） */
  .header-inner{
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto; /* ← ロゴ側が縮む許可 */
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: none !important; /* PCの960px制限をSPでは外す */
    padding: 0 12px;
    overflow: hidden;            /* はみ出し時の高さ崩れを防止 */
  }

  /* ロゴは省略可能にして押し出しを防止 */
  .logo{
    min-width: 0;                /* これがないとellipsisが効かない */
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 20px !important;
  }

  /* ハンバーガーは縮まない＆必ず右端 */
  .menu-btn{
    display: flex !important;
    justify-self: end;           /* Grid 右端 */
    align-self: center;
    flex: 0 0 auto;              /* 幅を維持して縮ませない */
    margin: 0 !important;
    position: static !important; /* 位置ずれ防止：絶対配置を無効化 */
  }

  /* ナビはヘッダー直下の固定でOK（既存仕様のまま） */
  .nav{
    position: fixed !important;
    top: var(--header-h) !important;
    left: 0; right: 0;
  }
}

/* HOME: Columns white */
.bk-columns{background:#fff;color:#111;border:1px solid #eee;border-radius:14px;padding:24px 16px;margin:32px auto}
.bk-columns__head{display:flex;gap:12px;align-items:flex-end;justify-content:space-between;margin-bottom:12px}
.bk-columns__title{margin:0;font-size:24px;color:#111}
.bk-columns__more{color:#111;text-decoration:none;font-weight:700}
.bk-columns__more:hover{text-decoration:underline}

.bk-columns__grid{display:grid;gap:16px;grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:1024px){.bk-columns__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.bk-columns__grid{grid-template-columns:1fr}}

.bk-colcard{border:1px solid #e8e8e8;background:#fff;color:#111;border-radius:14px;box-shadow:0 2px 8px rgba(0,0,0,.05);padding:16px;display:flex;flex-direction:column;gap:8px}
.bk-colcard h3{margin:0 0 2px;font-size:18px;line-height:1.4}
.bk-colcard h3 a{color:#111;text-decoration:none}
.bk-colcard h3 a:hover{text-decoration:underline}
.bk-colcard p{margin:0;color:#333}

.bk-btn{display:inline-block;background:#111;color:#fff;padding:6px 12px;border-radius:10px;font-weight:700;text-decoration:none}
.bk-btn:hover{opacity:.9}

/* Rakutenウィジェット中央寄せ（重複を整理） */
.ad-center{
  display:flex; justify-content:center; align-items:center;
  margin:16px 0 8px; text-align:center;
  position: relative;
}
.ad-desktop{ display:none; }
.ad-mobile{ display:block; }
@media (min-width: 768px){
  .ad-desktop{ display:block; }
  .ad-mobile{ display:none; }
}
.ad-center iframe, .ad-center div{ max-width:100%; }

/* === ボケコミとは：広告中央揃え（スマホ幅対応） === */
.ad-center {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px auto 12px;
  text-align: center;
  width: 100%;
  max-width: 100%;
}
.ad-center iframe,
.ad-center div {
  max-width: 100%;
}
@media (max-width: 767px) {
  .ad-center {
    padding: 0 8px; /* スマホで左右に少し余白 */
  }
}

.ad-sp { display: none; }
.ad-pc { display: block; }

@media screen and (max-width: 768px) {
  .ad-sp { display: block; }
  .ad-pc { display: none; }
}