/* =========================================
   naname/ p engine
   note-like white theme (cleaned)
   - 重複整理（後勝ち上書き事故を除去）
   - a:hover の空指定修正
   - 全角スペース混入修正
   - site-profile / site-name / site-desc の二重定義整理
   - newsCardThumb の二重定義整理（最後のfixを採用）
   ========================================= */

:root{
  --bg:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --muted2:#9ca3af;
  --link:#000;
  --border:#e5e7eb;
  --tag:#f3f4f6;
  --soft:#f9fafb;

  --nav-h: 56px;
  --floatbar-h: 52px; /* 固定バーの実質高さ */
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }

body{
  font-family:
    "Noto Sans JP",
    -apple-system,BlinkMacSystemFont,
    "Segoe UI",
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    Meiryo,system-ui,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height: 1.9;
  font-size: 16px;
}

/* links */
a{ color:var(--link); text-decoration:none; }
a:hover{ text-decoration: underline; }

/* layout */
.container{
  max-width: 760px;
  margin: 0 auto;
  padding: 0px 32px 64px;
}
@media (max-width:600px){
  .container{ padding:0px 30px 56px; }
}


/* header */
    .nanameNav{
      margin: 0 0 12px;
    }
    .nanameHeaderLink{
      display:block;
      text-decoration:none;

    }
    .nanameHeaderImg{
      display:block;
      width:100%;
      height:auto;
    }
    .nanameNavRow{
      margin-top:10px;
      display:flex;
      flex-wrap:wrap;
      gap:8px;
      align-items:center;
    }
    .nanameNavBtn{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      padding:10px 12px;
      border-radius:12px;
      border:1px solid rgba(36,50,68,0.9);
      background: rgba(11,18,32,0.9);
      color: #e5e7eb;
      text-decoration:none;
      font-weight:800;
      white-space:nowrap;
    }
    .nanameNavBtn.on{
      border-color:#2b4a78;
      background:#0b1b33;
    }

.icon{
	
}
.header{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 18px;
}
.brand{
  display:flex;
  gap:14px;
  align-items:center;
}
.logo{
  width:44px;
  height:44px;
  border-radius:12px;
  background: var(--border);
}
.title{
  font-size:20px;
  font-weight:700;
}
.catch{
  font-size:13px;
  color:var(--muted);
}

/* nav buttons */
.nav{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.btn{
  font-size:13px;
  padding: 8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  cursor: pointer;
}
.btn:hover{ background: var(--soft); }
.btn:active{ transform: translateY(0.5px); }

/* danger btn */
.btn.danger{
  border-color: rgba(239,68,68,.35);
  color: rgb(185,28,28);
  background: rgba(239,68,68,.06);
}
.btn.danger:hover{
  background: rgba(239,68,68,.10);
}

/* small helper */
.small{ font-size:12px; color: var(--muted2); }

/* tabs */
.tabs{
  display:flex;
  gap:10px;
  align-items:center;
  margin: 6px 0 12px;
}
.tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  background:#fff;
}
.tab:hover{ background: var(--soft); }
.tab.is-active{
  background:#111827;
  color:#fff;
  border-color:#111827;
  text-decoration:none;
}

/* lines */
hr{
  border:0;
  border-top:1px solid var(--border);
  margin: 0 0 6px;
}

/* empty */
.empty{
  padding: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

/* =========================================
   cards (admin / pages)
   ========================================= */
.card{
  background:#fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 16px;
  padding: 18px 18px;
  box-shadow: 0 1px 0 rgba(17,24,39,.02);
}
@media (max-width:600px){
  .card{ padding: 16px 14px; border-radius: 14px; }
}

/* =========================================
   note-like LIST (public)
   ========================================= */
.post-list{ margin-top: 6px; }

.post-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration:none;
}
.post-row:hover{ background: rgba(0,0,0,0.02); }

/* list thumbnail */
.list-thumb{
  flex: 0 0 120px;
  width: 120px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  display:block;
}
.list-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.list-thumb.is-empty{ background: #f3f4f6; }

.post-main{ flex: 1 1 auto; min-width: 0; }

.row-title{
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.row-title a{ color: var(--text); text-decoration:none; }
.row-title a:hover{ text-decoration: underline; }

.row-meta{
  display:flex;
  align-items:center;
  gap:8px;
  font-size: 12px;
  color: var(--muted2);
}
.author-dot{
  width:16px;
  height:16px;
  border-radius:999px;
  background: var(--border);
  display:inline-block;
}
.row-date{ margin-left: 4px; color: var(--muted2); }

@media (max-width: 520px){
  .list-thumb{
    width: 96px;
    height: 64px;
    flex-basis: 96px;
  }
}

/* more button */
.more{
  display:flex;
  justify-content:center;
  padding: 22px 0 4px;
}
.more-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 44px;
  min-width: 220px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background:#fff;
  color: var(--text);
  font-weight: 700;
}
.more-btn:hover{ background: var(--soft); }

/* tags chips (each article in list) */
.row-tags{
  margin-top: 8px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.tag-chip{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  font-size:12px;
  color: rgba(17,24,39,.78);
  text-decoration:none;
}
.tag-chip:hover{ opacity:.85; }

/* =========================================
   post page
   ========================================= */
.topbar{ margin: 0 0 10px; }
.back{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}
.back:hover{ text-decoration: underline; }

.meta{
  font-size: 13px;
  color: rgba(17,24,39,.60);
  margin: 0 0 10px;
}

/* title */
.h1{
  font-family:
    "Zen Kaku Gothic New",
    "Noto Sans JP",
    sans-serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
@media (max-width:680px){
  .h1{ font-size: 20px; }
}

/* tags */
.tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.tag{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  background:var(--tag);
  color:#374151;
}

/* hero base (mobile full-bleed default) */
.hero{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0px;
  margin-bottom: 60px;
  overflow: hidden;
  border-radius: 0;
}
.hero img{
  width: 100%;
  height: auto;
  display: block;
  max-height: 420px;
  object-fit: cover;
  margin-left:auto;
  margin-right:auto;
}

/* PC：拡大を途中で止める */
@media (min-width: 768px){
  .hero{
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }
  .hero img{
    max-width: 760px;
    width: 100%;
  }
}

/* toc */
.toc{
  margin: 20px 0 28px;
  padding: 16px 18px;
}
.toc-title{
  font-size: 16px;
  font-weight: 700;
  color:#000;
  margin-bottom: 8px;
}
.toc a{ color:#111827; text-decoration:none; }
.toc a:hover{ opacity:.85; }
.toc ul{ margin: 0; padding-left: 1.2em; }
.toc li{ margin: 6px 0; }
.toc .lv3{ margin-left: 10px; font-size: 0.95em; opacity: 0.95; }

/* article */
.article-body{
  margin-top:24px;
  max-width: 720px;
  margin-left:auto;
  margin-right:auto;

  /* 文字サイズはここで一括管理 */
  font-size: 17px;        /* PC基準 */
  line-height: 1.95;
}
.article-body > p:first-of-type{
  margin-top: 8px;
  margin-bottom: 22px;
  font-size: inherit;     /* ← ここを固定しない（本文に追従） */
}
.article-body h2,
.article-body h3{
  font-family:
    "Zen Kaku Gothic New",
    "Noto Sans JP",
    sans-serif;
}
.article-body h2{
  font-size: 22px;
  font-weight: 800;
  margin: 40px 0 14px;
  line-height: 1.35;
}
.article-body h3{
  font-size: 19px;
  font-weight: 800;
  margin: 28px 0 10px;
  line-height: 1.45;
}
.article-body p{
  margin: 0 0 18px;
  line-height: 2;
}
.article-body ul,
.article-body ol{ margin: 0 0 18px 1.2em; }
.article-body li{ margin: 0 0 8px; }

/* スマホ */
@media (max-width:680px){
  .article-body{
    font-size: 17px;    /* スマホでも小さくしない（読みやすさ優先） */
    line-height: 2.0;
  }
  .article-body h2{ font-size: 20px; }
  .article-body h3{ font-size: 18px; }
}

/* navsite link */
.navsite a{ color: #000; font-weight: bolder; }

/* prev/next nav */
.post-nav{
  display:flex;
  gap: 12px;
  justify-content: space-between;
  align-items:center;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);

  width:100%;
  font-size:14px;
}
.post-nav a{
  color: var(--text);
  font-weight: 700;
}
.post-nav a:hover{ text-decoration: underline; }

.prev,.next{ width:40%; }

/* =========================================
   admin (forms / tables)
   ========================================= */
.adminbar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

/* 既存テーブルも使えるように残す */
.table{
  width:100%;
  border-collapse:collapse;
}
.table th,
.table td{
  padding:12px 6px;
  border-bottom:1px solid var(--border);
  font-size:14px;
  vertical-align: top;
}
.table th{
  color:var(--muted);
  font-weight:600;
}

/* inputs */
input[type="text"],
textarea,
select{
  width:100%;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid var(--border);
  font-size:14px;
}
textarea{
  min-height:260px;
  font-family: ui-monospace, Menlo, monospace;
}
input[type="file"]{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fff;
  font-size:14px;
}

/* =========================================
   admin list row (あなたの admin-row 用)
   ========================================= */
.admin-row{
  display:flex;
  gap: 14px;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(17,24,39,.08);
}
.admin-row:hover{ background: rgba(0,0,0,0.02); }

.admin-main{
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  display:block;
  padding: 6px 6px;
  border-radius: 12px;
}
.admin-main:hover{ background: rgba(17,24,39,.02); }

.admin-title{
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 8px;
  word-break: break-word;
}

.admin-meta{
  display:flex;
  align-items:center;
  gap: 10px;
  font-size: 12px;
  color: rgba(17,24,39,.55);
  flex-wrap: wrap;
}
.admin-meta .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(17,24,39,.14);
  display:inline-block;
}

.admin-right{
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  gap: 10px;
}

.admin-thumb{
  width: 96px;
  height: 72px;
  border-radius: 12px;
  overflow:hidden;
  background:#f3f4f6;
  border:1px solid rgba(17,24,39,.10);
  display:block;
}
.admin-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.thumb-empty{
  width:100%;
  height:100%;
  background:#f3f4f6;
}

.admin-actions{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-actions form{ margin:0; }

@media (max-width: 640px){
  .admin-row{
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-right{
    width: 100%;
    justify-content: space-between;
  }
  .admin-thumb{
    width: 110px;
    height: 78px;
  }
}

/* footer */
.footer{
  margin-top:64px;
  font-size:12px;
  color:var(--muted);
  text-align:center;
}

/* =========================================
   note風：上部ヘッダー
   ========================================= */
.site-top{
  background:#fff;
  border-bottom: none !important;
  box-shadow: none !important;
}

.site-cover{
  width:100%;
  background:#f3f4f6;
}
.site-cover-img{
  display:block;
  width:100%;
  height:160px;
  object-fit:cover;
}
.site-cover-img.is-empty{ height:160px; }

.site-head-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 16px 0; /* カバー直下に余白 */
}

/* 1段目：アバター＋タイトル / 2段目：概要（全幅） */
.site-profile{
  display: grid;
  grid-template-columns: 78px 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 12px;
  row-gap: 8px;

  align-items: start;
}

/* アバター：左上 */
.site-avatar{
  grid-column: 1;
  grid-row: 1;
  width: 56px;
  height: 56px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(17,24,39,.10);
  overflow:hidden;
}
.site-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.site-avatar-empty{
  width:100%;
  height:100%;
  background:#e5e7eb;
}

/* タイトル：右上 */
.site-titlebox{
  grid-column: 2;
  grid-row: 1;
  padding-top: 2px;
}
.site-name{
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color:#111827;
  text-align:left;
}

/* 概要：2段目 全幅 */
.site-desc{
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(17,24,39,.75);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-align:left;
}

/* メタ：3段目 全幅 */
.site-meta{
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 8px;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  color: rgba(17,24,39,.6);
  font-size: 12px;
}

.meta-item{
  padding: 3px 8px;
  border:1px solid rgba(17,24,39,.10);
  border-radius: 999px;
  background:#fff;
}
.meta-link{
  color: rgba(17,24,39,.75);
  text-decoration:none;
  border-bottom: 1px solid rgba(17,24,39,.25);
}
.meta-link:hover{ opacity:.85; }

@media (max-width: 520px){
  .site-cover-img{ height:140px; }
  .site-avatar{ width:56px; height:56px; }
}

/* =========================================
   noteっぽい：スクロール固定バー
   ========================================= */
.site-floatbar{
  height:50px;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);

  opacity: 0;
  transform: translateY(-110%);
  transition: transform .22s ease, opacity .22s ease;
  pointer-events: none;
}
.site-floatbar.is-on{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.site-floatbar.is-on.is-hide{
  transform: translateY(-110%);
}
.site-float-inner{
  max-width: 920px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-float-left{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.site-float-avatar{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.site-float-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.site-float-avatar-empty{
  width: 100%;
  height: 100%;
  display: block;
  background: #e5e7eb;
}
.site-float-title{
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.site-float-tabs{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 初回だけアニメ無しで表示 */
.site-floatbar.no-anim{ transition:none !important; }

@media (max-width: 520px){
  .site-float-title{ max-width: 130px; }
  .site-float-inner{ padding: 8px 10px; }
}

body.has-floatbar{
  padding-top: var(--floatbar-h);
}

/* =========================================
   note風：2段タブ
   ========================================= */
.site-tabs-note{
  margin-top: 10px;
  padding: 8px 0 6px;
  border-bottom: none !important;
  box-shadow: none !important;
}
.note-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.note-row-tags{
  gap:16px;
  margin-bottom: 14px; /* タグ列と新着/注目の間 */
}

/* ピル（新着/注目） */
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.14);
  background:#fff;
  color: rgba(17,24,39,.86);
  font-size: 13px;

  line-height: 1;
  text-decoration:none;
}
.pill:hover{ opacity:.9; }
.pill.is-active{
  background:#111827;
  color:#fff;
  border-color:#111827;
}

/* タグ（下線リンク） */
.taglink{
  position:relative;
  display:inline-flex;
  align-items:center;
  padding: 8px 0;
  color: rgba(17,24,39,.70);
  text-decoration:none;
  font-size: 14px;
}
.taglink::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:2px;
  background: rgba(17,24,39,.16);
  transform: scaleX(0);
  transform-origin:left;
  transition: transform .18s ease;
}
.taglink:hover::after{ transform: scaleX(1); }
.taglink.is-active{
  color:#111827;
  font-weight:600;
}
.taglink.is-active::after{
  transform: scaleX(1);
  background: rgba(17,24,39,.55);
}

@media (max-width:640px){
  .site-tabs-note{ margin-top: 8px; }
  .note-row-tags{ gap:12px; margin-bottom: 12px; }
  .pill{ padding: 9px 12px; font-size: 12.5px; }
}

/* =========================================
   note-like news card
   ========================================= */
.newsCardWrap{ margin:18px 0 6px; }
.newsCardLabel{
  font-size:12px;
  color:var(--muted,#6b7280);
  margin:0 0 8px;
  letter-spacing:.02em;
}
.newsCard{
  display:flex;
  gap:12px;
  align-items:stretch;
  border:1px solid var(--border,#e5e7eb);
  border-radius:14px;
  background: #fff;
  overflow:hidden;
  text-decoration:none;
}
.newsCard:hover{ box-shadow: 0 6px 18px rgba(0,0,0,.06); }

/* サムネ（X in-app browser 対策込みの最終形） */
.newsCardThumb{
  overflow: hidden;
  border-radius: 12px;
  background: #f3f4f6;
  flex: 0 0 140px;
  height: 92px;
}
.newsCardThumb img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.newsCardBody{ padding:12px 12px; min-width:0; flex:1 1 auto; }
.newsCardTitle{
  font-size:14px;
  font-weight:700;
  line-height:1.45;
  color: var(--text,#111827);
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.newsCardMeta{
  margin-top:8px;
  display:flex;
  gap:8px;
  align-items:center;
  font-size:12px;
  color:var(--muted,#6b7280);
  flex-wrap:wrap;
}
.newsCardDot{ opacity:.6; }

@media (max-width: 520px){
  .newsCard{ display:block; }
  .newsCardThumb{
    width: 100%;
    flex: none;
    height: 180px;
    margin-bottom: 10px;
    border-radius: 14px;
  }
  .newsCardBody{ padding:10px; }
}
/* =========================
   note風 3列グリッド
   ========================= */
.post-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 16px;
}

.post-card{
  display:block;
  text-decoration:none;
  color:inherit;
}

.post-card-thumb{
  width:100%;
  aspect-ratio: 16 / 9;
  border-radius:14px;
  overflow:hidden;
  background:#f3f4f6;
  margin-bottom:10px;
}

.post-card-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.post-card-title{
  font-weight:700;
  font-size:15px;
  line-height:1.4;
  margin-bottom:6px;
}

.post-card-meta{
  font-size:12px;
  color:var(--muted2);
}

/* タブレット */
@media (max-width: 1024px){
  .post-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

/* スマホ */
@media (max-width: 640px){
  .post-grid{
    grid-template-columns: 1fr;
  }
}

