/* ============================================================
   ZIObit Staff Board - スタイル
   背景クリーム × メイン青（旧掲示板の雰囲気を踏襲）
============================================================ */
:root {
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --navy:        #1e3a8a;
  --cream:       #fdfcee;
  --card:        #ffffff;
  --border:      #d9dfc9;
  --border2:     #cbd5e1;
  --t1:          #1e293b;
  --t2:          #334155;
  --t3:          #64748b;
  --red:         #dc2626;
  --green:       #059669;
  --amber:       #d97706;
  --radius:      8px;   /* ★2026-11-10 角の丸みは 小（印）・中（ボタンと箱＝8px）・丸 の3種類（board-41） */
  --r-s:         4px;
  --r-pill:      999px;
  --primary-light: #dbeafe;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* ★2026-11-16 Tab で移った部品が上の帯の下に隠れないよう、帯の高さ分を空けて表示する（board-20） */
html { scroll-padding-top: 64px; }
@media (max-width: 640px) { html { scroll-padding-top: 116px; } }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo', sans-serif;
  background: var(--cream);
  color: var(--t1);
  font-size: 14px;
  line-height: 1.7;
}
a { color: var(--blue); }
.hidden { display: none !important; }
/* ★2026-11-16 画面に出ない大見出しと、Tab の時だけ出る「本文へ移動」（board-28） */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 300; background: #fff; color: var(--navy); font-weight: 700; padding: 10px 14px; border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.skip-link:focus { top: 8px; }

/* ============ ヘッダー ============ */
.header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
  min-height: 52px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand img { height: 28px; border-radius: 4px; }
.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav button {
  background: transparent; border: none; color: #fff; font-family: inherit;
  font-size: 13px; font-weight: 600; padding: 7px 11px; border-radius: var(--radius); cursor: pointer;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.nav button:hover { background: rgba(255,255,255,0.16); }
.nav button.active { background: rgba(255,255,255,0.24); }
.nav .sep { color: rgba(255,255,255,0.4); font-size: 12px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip {
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--r-pill); padding: 4px 12px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.user-chip .admin-mark { color: #fde047; margin-right: 4px; }
.icon-btn {
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.3); color: #fff;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.icon-btn:hover { background: rgba(255,255,255,0.28); }

/* ============ レイアウト ============ */
.main { max-width: 100%; margin: 0 auto; padding: 14px 22px 70px; }
.card {
  background: var(--card); border: 1px solid var(--border2); border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 12px;
}
.card-pad { padding: 16px 18px; }

/* ============ ボタン・フォーム ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; border: none;
  font-family: inherit; background: var(--blue); color: #fff; transition: background .15s, opacity .15s;
}
@media (hover: hover) { .btn:hover { background: var(--blue-dark); } } /* ★2026-11-16 乗せた色はマウスのある機械だけ（board-21） */
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-outline { background: #fff; border: 1.5px solid var(--blue); color: var(--blue); }
@media (hover: hover) { .btn-outline:hover { background: #eff6ff; } }
.btn-ghost { background: transparent; border: 1px solid var(--border2); color: var(--t3); }
@media (hover: hover) { .btn-ghost:hover { background: #f1f5f9; } }
.btn-danger { background: var(--red); }
@media (hover: hover) { .btn-danger:hover { background: #b91c1c; } }
/* ★2026-11-16 押した瞬間に少し濃くなる（スマホでも押せたと分かる・board-21） */
.btn:active:not(:disabled) { background: var(--blue-dark); }
.btn-outline:active:not(:disabled) { background: #eff6ff; }
.btn-ghost:active:not(:disabled) { background: #f1f5f9; }
.btn-danger:active:not(:disabled) { background: #b91c1c; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; } /* ★2026-11-16 横いっぱいのボタン（高さはほかのボタンと同じ・board-27） */

.form-row { margin-bottom: 13px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--t2); margin-bottom: 4px; }
.form-label .req { color: var(--red); }
.form-control {
  width: 100%; padding: 8px 12px; border: 1.5px solid var(--border2); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--t1); background: #fff; outline: none;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
select.form-control { cursor: pointer; }
.form-inline { display: flex; gap: 12px; flex-wrap: wrap; }
.form-inline > * { flex: 1; min-width: 280px; }
.form-hint { font-size: 12px; color: var(--t3); margin-top: 3px; }
.form-hint-lead { margin-bottom: 12px; }

/* ============ ログイン ============ */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { width: 100%; max-width: 400px; }
.login-head {
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff;
  border-radius: var(--radius) var(--radius) 0 0; padding: 26px 24px; text-align: center;
}
.login-head .sys-icon { font-size: 34px; margin-bottom: 8px; }
.login-head h1 { font-size: 19px; }
.login-head .sub { font-size: 12px; opacity: .8; margin-top: 4px; }
.login-body { background: #fff; border: 1px solid var(--border2); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: 24px; }
.login-error {
  background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b;
  border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; display: none;
}

/* ============ 一覧 ============ */
.list-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.list-toolbar .pageinfo { margin-left: auto; font-size: 13px; color: var(--t2); display: flex; align-items: center; gap: 8px; }
.pager-btn {
  background: #fff; border: 1px solid var(--border2); border-radius: 7px; padding: 5px 12px;
  font-size: 12px; font-weight: 700; color: var(--blue); cursor: pointer; font-family: inherit;
}
.pager-btn:disabled { color: #cbd5e1; cursor: not-allowed; }
.pager-btn:hover:not(:disabled):not(.mode-on), .tab-btn:hover:not(.on), .up-item .del:hover, .att-more:hover { background: #f1f5f9; }

.post-row {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  border-bottom: 1px solid #edf0f4; cursor: pointer; flex-wrap: wrap;
}
.post-row:last-child { border-bottom: none; }
@media (hover: hover) { .post-row:hover { background: #f6f9ff; } }
.post-row:active { background: #f6f9ff; }
.post-row.pinned-row { background: #fffbeb; }
.post-row.pinned-row:hover { background: #fef3c7; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.read-dot   { width: 8px; height: 8px; border-radius: 50%; background: #e2e8f0; flex-shrink: 0; }
.post-title-cell { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 7px; overflow: hidden; }
.post-title-cell .title { font-size: 14px; color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-title-cell .title.unread { font-weight: 700; }
.badge-new { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); flex-shrink: 0; }
.badge-imp { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 4px; flex-shrink: 0; }
.badge-pin { color: var(--amber); font-size: 12px; flex-shrink: 0; }
.badge-cat { background: #eef4ff; color: var(--navy); font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 4px; flex-shrink: 0; }
.post-meta-cell { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--t3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-meta-cell .author { color: var(--t2); font-weight: 600; min-width: 90px; }
.post-meta-cell .replies { color: var(--blue); font-weight: 600; }
.post-meta-cell .no { color: var(--t3); font-size: 12px; min-width: 76px; text-align: right; }

/* ============ 詳細・記事カード ============ */
.article { border: 1px solid var(--border2); border-radius: var(--radius); overflow: visible; background: #fff; margin-bottom: 12px; }
.article-head {
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff;
  /* 2026-08-01: 帯を30pxに細くした（元は42px）。文字の大きさ（15px/13px）は変えていない。
     行の高さだけ詰めてある。35pxの似顔絵は帯より大きいので、
     帯の上下へ少しはみ出して中央に置く（記事の枠で切れないように）。 */
  padding: 1px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  min-height: 30px; line-height: 1.2; border-radius: 8px 8px 0 0;
}
.article-head .a-title { font-size: 15px; font-weight: 700; flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.article-head .a-meta { font-size: 13px; font-weight: 700; opacity: 1; display: flex; gap: 12px; align-items: center; white-space: nowrap; margin-left: auto; }
.article-sub { padding: 6px 14px; background: #f8fafc; border-bottom: 1px solid #edf0f4; font-size: 12px; color: var(--t3); display: flex; gap: 14px; flex-wrap: wrap; }
.article-body { padding: 16px 18px; font-size: 14px; word-break: break-word; }
.article-body p { margin: 0; }
.article-body ul, .article-body ol { margin: 6px 0 6px 24px; }
.article-body h3 { font-size: 16px; margin: 10px 0 4px; color: var(--navy); }
.article-body h4 { font-size: 14px; margin: 8px 0 4px; color: var(--navy); }
.article-body blockquote { border-left: 3px solid var(--border2); color: var(--t3); padding-left: 10px; margin: 6px 0; }
.article-body img { max-width: 100%; height: auto; } /* ★11/2 本文の画像をスマホの幅に収める */
.article-foot { padding: 9px 14px; border-top: 1px solid #edf0f4; background: #fafbfc; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 2026-08-01: 似顔絵が帯からはみ出せるよう .article を overflow:visible にしたので、
   角の丸みは各ブロック自身に持たせる（以前は .article の切り抜きで丸めていた）。 */
.article > *:last-child { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.att-list { padding: 10px 14px; border-top: 1px dashed #e2e8f0; display: flex; flex-wrap: wrap; gap: 10px; }
.att-item {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--border2);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; background: #f8fafc; max-width: 100%;
}
.att-item img.thumb { width: 46px; height: 46px; object-fit: cover; border-radius: var(--radius); }
/* 2026-08-01: 動画の添付は記事の中でそのまま再生する */
.att-item.att-video { flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px; max-width: 100%; }
.att-player { width: 420px; max-width: 100%; max-height: 320px; border-radius: 8px; background: #000; display: block; }
.att-vmeta { display: flex; align-items: center; gap: 10px; font-size: 12px; flex-wrap: wrap; }
.att-thumb.att-vid { background: #0f172a; position: relative; }
.att-thumb.att-vid .att-ph { color: #fff; font-size: 22px; }
/* 動画のこま：表紙の上に再生マークを重ねる */
.att-thumb .att-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(15,23,42,.62); color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.35); pointer-events: none; padding-left: 3px;
}
@media (max-width: 640px) { .att-player { width: 100%; max-height: 240px; } }
.att-item .att-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-img-preview { max-width: 100%; max-height: 420px; border-radius: 8px; border: 1px solid var(--border2); display: block; margin: 8px 0; }
.detail-nav { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.read-info { font-size: 12px; color: var(--t3); }
.read-names { font-size: 12px; color: var(--t2); background: #f8fafc; border-radius: 8px; padding: 8px 12px; margin-top: 6px; line-height: 1.9; }

/* ============ リッチテキストエディター ============ */
.rt-toolbar {
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
  border: 1.5px solid var(--border2); border-bottom: none; border-radius: 8px 8px 0 0;
  background: #f8fafc; padding: 5px 8px;
}
.rt-btn {
  background: #fff; border: 1px solid var(--border2); border-radius: 6px;
  min-width: 30px; height: 28px; cursor: pointer; font-size: 13px; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; color: var(--t2);
}
.rt-btn:hover { border-color: var(--blue); color: var(--blue); }
.rt-color { width: 22px; height: 22px; border-radius: var(--r-s); border: 1px solid var(--border2); cursor: pointer; padding: 0; }
.rt-sep { width: 1px; height: 20px; background: var(--border2); margin: 0 4px; }
.rt-editor {
  border: 1.5px solid var(--border2); border-radius: 0 0 8px 8px; background: #fff;
  min-height: 200px; max-height: 480px; overflow-y: auto; padding: 12px 14px; font-size: 14px; outline: none;
}
.rt-editor:focus { border-color: var(--blue); }
.rt-editor:empty::before { content: attr(data-placeholder); color: #64748b; }
.emoji-pop {
  position: absolute; background: #fff; border: 1px solid var(--border2); border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0,0,0,0.15); padding: 8px; display: grid;
  grid-template-columns: repeat(8, 30px); gap: 2px; z-index: 50;
}
.emoji-pop button { border: none; background: none; font-size: 17px; cursor: pointer; border-radius: var(--radius); height: 30px; }
.emoji-pop button:hover { background: #eff6ff; }

/* ============ アップロード ============ */
.up-zone {
  border: 2px dashed var(--border2); border-radius: 8px; padding: 14px; text-align: center;
  color: var(--t3); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s;
}
.up-zone.drag, .up-zone:hover { border-color: var(--blue); background: #eff6ff; }
.up-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.up-item { display: flex; align-items: center; gap: 10px; background: #f8fafc; border: 1px solid var(--border2); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.up-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-item .prog { width: 90px; height: 6px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.up-item .prog > div { height: 100%; background: var(--blue); width: 0%; }
.up-item .del { background: none; border: none; color: var(--red); cursor: pointer; font-size: 14px; }

/* ============ テーブル（スタッフ管理等） ============ */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { border-bottom: 1px solid #edf0f4; padding: 8px 10px; text-align: left; vertical-align: middle; }
.tbl th { background: #eef4ff; color: var(--navy); font-size: 12px; white-space: nowrap; }
.tbl tr:hover td { background: #f8fafc; }
.status-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); }
.st-active { background: #dcfce7; color: #166534; }
.st-suspended { background: #fef3c7; color: #92400e; }
.st-deleted { background: #fee2e2; color: #991b1b; }

/* ============ その他 ============ */
.view-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.empty { text-align: center; padding: 48px 16px; color: var(--t3); }
.empty i { font-size: 40px; display: block; margin-bottom: 10px; opacity: .45; }
.loading-wrap { text-align: center; padding: 40px; color: var(--t3); }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(90px);
  background: #1e293b; color: #fff; padding: 10px 22px; border-radius: var(--r-pill); font-size: 13px;
  z-index: 999; transition: transform .28s cubic-bezier(0.34,1.56,0.64,1); pointer-events: none;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3); max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.ok { background: #047857; }
.toast.err { background: var(--red); }

.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 200;
  align-items: flex-start; justify-content: center; padding: 60px 12px 20px; overflow-y: auto; overscroll-behavior: contain;
}
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 540px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.modal-head { background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; padding: 12px 18px; display: flex; align-items: center; gap: 10px; }
.modal-head .m-title { font-weight: 700; flex: 1; font-size: 15px; }
.modal-head .m-close { cursor: pointer; opacity: .85; background:none; border:none; color:#fff; font-size:16px; min-width:44px; min-height:44px; margin:-12px -12px -12px 0; display:inline-flex; align-items:center; justify-content:center; } /* ★2026-11-16 押せる広さ44px・帯の高さは変えない（board-5） */
.modal-body { padding: 18px 20px; max-height: 70vh; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid #edf0f4; display: flex; justify-content: flex-end; gap: 8px; background: #fafbfc; }

/* ============ 返信・ツリー（フェーズ2） ============ */
.pager-btn.mode-on { background: var(--blue); color: #fff; border-color: var(--blue); }
.reply-card {
  background: #fff; border: 1px solid var(--border2); border-radius: 8px;
  margin-bottom: 10px; overflow: hidden;
}
.reply-head {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  background: #f1f5f9; border-bottom: 1px solid #edf0f4; font-size: 13px; flex-wrap: wrap;
}
.post-no-badge {
  background: var(--primary-light, #dbeafe); color: var(--blue); font-size: 12px;
  font-weight: 700; padding: 1px 7px; border-radius: var(--r-s);
}
.reply-foot { display: flex; gap: 6px; padding: 5px 10px; border-top: 1px dashed #edf0f4; background: #fafbfc; }
.replies-tree { margin: 6px 0 8px 20px; padding-left: 12px; border-left: 2px solid #cbd5e1; }
.reply-form-slot { padding: 0 10px; }
.reply-form-box {
  background: #eff6ff; border: 1.5px solid #bfdbfe; border-radius: 8px;
  padding: 12px; margin: 8px 4px 12px;
}
#replyFormArea .reply-form-box { margin: 0 12px 12px; }
.mini-editor { background: #fff; }

.tree-thread { padding: 8px 14px; border-bottom: 1px solid #edf0f4; }
.tree-thread:last-child { border-bottom: none; }
.tree-root { display: flex; align-items: center; gap: 7px; cursor: pointer; flex-wrap: wrap; padding: 2px 0; }
.tree-root:hover b { color: var(--blue); text-decoration: underline; }
.tree-reply {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 1px 0 1px 18px; font-size: 13px; color: var(--t2); flex-wrap: wrap;
}
.tree-reply:hover { color: var(--blue); }
.tree-branch { color: #94a3b8; font-weight: 700; }
.tree-meta { font-size: 12px; color: var(--t3); margin-left: auto; white-space: nowrap; }

/* ============ 通知・タブ・確認バー（フェーズ3） ============ */
.notif-badge {
  position: absolute; top: -5px; right: -6px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: var(--r-pill); padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #1e3a8a;
}
.notif-unread { background: #eff6ff; }
.tab-bar { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.tab-btn {
  background: #fff; border: 1.5px solid var(--border2); border-radius: 8px 8px 0 0;
  padding: 8px 16px; font-size: 13px; font-weight: 700; color: var(--t3);
  cursor: pointer; font-family: inherit;
}
.tab-btn.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.confirm-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fef2f2; border-top: 1px solid #fecaca; border-bottom: 1px solid #fecaca;
  padding: 10px 14px; font-size: 13px;
}

/* ============ イイネ ============ */
.like-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff; border: 1.5px solid #fecdd3; color: #e11d48;
  border-radius: 16px; padding: 4px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: transform .12s, background .15s;
}
.like-btn:hover { background: #fff1f2; }
.like-btn.liked { transform: scale(1.18); background: #ffe4e6; }
/* 自分が押し済みのハート（もう一度押すと取り消し） */
.like-btn.mine { background: #e11d48; border-color: #e11d48; color: #fff; }
.like-btn.mine:hover { background: #be123c; }
/* ハートで浮上中の投稿 */
.badge-hot {
  display: inline-flex; align-items: center; gap: 4px;
  background: #ffe4e6; color: #be123c; border: 1px solid #fda4af;
  border-radius: var(--r-pill); padding: 1px 8px; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
/* ★2026-08-28 追加: Good投稿（例: インスタの素晴らしい投稿の紹介）バッジ */
.badge-good {
  display: inline-flex; align-items: center; gap: 4px;
  background: #d1fae5; color: #047857; border: 1px solid #6ee7b7;
  border-radius: var(--r-pill); padding: 1px 8px; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.hot-sep {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 2px 8px; font-size: 12px; color: #be123c; font-weight: 700;
}
.hot-sep::after { content: ''; flex: 1; height: 1px; background: #fecdd3; }

/* ============ 投稿者の似顔絵 ============ */
.author-chip { display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; }
.author-face {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 1px solid #e2e8f0; background: #f1f5f9;
}
.author-face.ini { color: #fff; font-weight: 700; border-color: transparent; line-height: 1; }
.article-head .a-meta .author-chip { font-size: 13px; }
/* 一覧の記事カード：投稿者の似顔絵をタイトルの左に置く（2026-07-31）
   帯（30px）より丸（35px）のほうが大きいので、上下へ2.5pxずつはみ出して中央に置く。
   はみ出した分は上下マージンのマイナスで打ち消し、帯の高さを押し広げない。 */
.article-head .head-face-wrap {
  flex-shrink: 0;
  margin: -9px 0;              /* 帯の中央にまたがらせる */
  position: relative; z-index: 2;
}
.article-head .head-face-wrap .author-face {
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.article-head .a-meta { align-items: center; }
/* ツリー表示：似顔絵・氏名・日付・記事番号を一列にそろえる */
.tree-meta { display: flex; align-items: center; gap: 10px; }
.tree-meta .author-chip { gap: 7px; }
.tree-root, .tree-reply { align-items: center; }
@media print { .author-face { border-color: #ccc; } }

/* ============ 一覧に出す添付画像 ============ */
.article-atts {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 2px 14px 6px;
}
.att-thumb {
  width: 132px; height: 99px; border-radius: 8px; overflow: hidden;
  border: 1px solid #e2e8f0; background: #f1f5f9;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; text-decoration: none; flex-shrink: 0;
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-thumb .att-ph { color: var(--t3); font-size: 20px; }
.att-more {
  font-size: 12px; color: var(--blue); font-weight: 700;
  padding: 4px 10px; border: 1px dashed #cbd5e1; border-radius: 8px; cursor: pointer;
}
@media (max-width: 640px) {
  .att-thumb { width: 104px; height: 78px; }
}

/* ★2026-11-06 画像が1枚だけの投稿は、一覧でも切らずに全体を出す（縦横の比はそのまま） */
.att-thumb.att-one { width: auto; height: auto; min-width: 200px; min-height: 120px; max-width: 100%; background: #f1f5f9; }
.att-thumb.att-one img { width: auto; height: auto; max-width: min(560px, 100%); max-height: 480px; object-fit: contain; }
@media (max-width: 640px) {
  .att-thumb.att-one { width: auto; height: auto; }
  .att-thumb.att-one img { max-height: 420px; }
}

/* ============ 起動中の表示 ============ */
.boot-splash {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  background: #f8fafc;
}
.boot-splash.hidden { display: none !important; }
.boot-card { text-align: center; color: #64748b; }
.boot-icon { font-size: 34px; color: var(--blue); opacity: .9; }
.boot-msg { margin: 14px 0 12px; font-size: 13px; }
.boot-help { margin-top: 14px; }
.boot-help-msg { font-size: 13px; color: var(--t2); margin-bottom: 8px; } /* ★2026-11-16 12pxの薄い字を13px・濃い方の色に（board-25） */
.boot-bar { width: 190px; height: 4px; border-radius: 4px; background: #e2e8f0; overflow: hidden; margin: 0 auto; }
.boot-bar span { display: block; width: 40%; height: 100%; border-radius: 4px; background: var(--blue); animation: bootslide 1.1s ease-in-out infinite; }
@keyframes bootslide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* 新規投稿画面の投稿者表示 */
.poster-chip {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: var(--radius);
  padding: 8px 12px; margin-bottom: 12px;
}
.poster-chip .pc-name { font-weight: 700; color: var(--t1); }
.poster-chip .pc-sub { font-size: 12px; color: var(--t3); }
.likers-row {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 8px 14px; border-top: 1px dashed #fecdd3; background: #fff7f8; font-size: 13px;
}
/* ★確定仕様（2026-07-18 承認済み／2026-07-31 大きさのみ更新）★
   イイネマーク: タイトル文字のすぐ横に配置 / ハート34px・イラスト35px / 枠からのはみ出しOK
   返信・引用なし: article-foot の右側配置（app.js側） */
.likers-inline {
  display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin-left: 6px; vertical-align: middle; font-size: 13px; overflow: visible;
}
.likers-inline.hidden { display: none; }
.likers-inline .heart-mark {
  font-size: 34px; margin: -10px 0;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.45));
}
.likers-inline .heart-mark img {
  width: 35px !important; height: 35px !important;
  border-width: 2px !important; border-color: #fff !important;
  box-shadow: 0 2px 4px rgba(0,0,0,.35);
}
.likers-inline .heart-mark b { font-size: 13px; }
.likers-inline b { color: #fff !important; }
.article-head { overflow: visible; }
.liker-chip {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #f472b6, #e11d48); color: #fff;
  font-size: 13px; font-weight: 700; cursor: default;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.liker-x {
  position: absolute; bottom: -4px; right: -7px;
  background: #1e293b; color: #fff; font-size: 12px; font-weight: 700;
  border-radius: 8px; padding: 0 4px; line-height: 1.5;
}
/* 名前から自動生成するハートマーク */
.heart-mark {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1; color: var(--hc, #e11d48); cursor: default;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
  animation: heartIn .35s cubic-bezier(.34,1.56,.64,1);
}
.heart-mark b {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; padding-bottom: 3px; pointer-events: none;
}
@keyframes heartIn { from { transform: scale(0) rotate(-20deg); } to { transform: scale(1) rotate(0); } }
/* 管理者はハートをクリックで削除できる */
.admin-mode .heart-mark[data-code] { cursor: pointer; }
.admin-mode .heart-mark[data-code]:hover { filter: brightness(1.25) drop-shadow(0 0 4px rgba(225,29,72,.6)); }

/* ============ 印刷 / PDF保存 ============ */
@media print {
  .header, .list-toolbar, .tab-bar, .btn, .pager-btn, button,
  #arcYear, #arcMonth, #arcKw, .form-label, .form-hint, .card-pad:has(#arcLoad) { display: none !important; }
  body { background: #fff; }
  .main { max-width: none; padding: 0; }
  .card, .article, .reply-card { box-shadow: none; border-color: #999; }
  .post-row { page-break-inside: avoid; }
}

/* ★2026-11-10 ボタンの形をそろえる（board-42）：高さ38px・枠1.5px・字13px・角8px。違いは色だけ（小さいボタン btn-sm は今のまま） */
.btn:not(.btn-sm), .pager-btn, .tab-btn, .like-btn, .rt-btn, .icon-btn {
  min-height: 38px; padding-top: 0; padding-bottom: 0; border-width: 1.5px; border-radius: var(--radius); font-size: 13px;
}
.rt-btn { min-width: 38px; }
.icon-btn { width: 38px; height: 38px; }

/* ============ スマホ ============ */
@media (max-width: 640px) {
  .main { padding: 10px 8px 60px; }
  .post-row { padding: 10px 10px; }
  .post-meta-cell { width: 100%; justify-content: space-between; gap: 8px; }
  .post-meta-cell .no { min-width: 0; }
  .nav button { padding: 9px 8px; font-size: 12px; }
  .nav .sep { display: none; }
  .btn { padding: 10px 16px; }
  .header { padding: 6px 8px; gap: 6px; }
  .brand { font-size: 14px; }
  .user-chip { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .article-head .a-meta { width: 100%; justify-content: flex-end; font-size: 12px; }
  /* ★2026-11-16 名前が長くても右へはみ出さないよう、項目ごとに次の段へ送る（board-23） */
  .article-head .a-meta, .post-meta-cell { flex-wrap: wrap; row-gap: 2px; }
  /* ★2026-11-16 ツリーの行は1行44pxで押し間違えない（board-6） */
  .tree-root, .tree-reply { min-height: 44px; }
  .form-inline > * { min-width: 100%; }
  .rt-btn { min-width: 44px; height: 44px; }
  .tab-btn { padding: 9px 12px; font-size: 12px; }
  .tbl { font-size: 12px; }
  .modal-overlay { padding-top: 30px; }
  .icon-btn { width: 44px; height: 44px; }
  .btn, .pager-btn, .tab-btn, .like-btn, .nav button { min-height: 44px; } /* ★2026-11-16 上の帯のメニューも44px（board-7） */
  .up-item .del { min-width: 44px; min-height: 44px; }
  .form-control, .rt-editor, #jumpNo { font-size: 16px !important; }
  #jumpNo { min-height: 44px; }
  /* ★2026-11-10 上の帯のメニューは横1段にして指で横へ送る（帯が2〜3段にならない・board-37） */
  .nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .nav button { flex: none; }
  /* ★2026-11-10 文字色の四角と絵文字も44px（並びきらない分は次の段へ・board-35） */
  .rt-color { width: 44px; height: 44px; }
  .emoji-pop { left: 8px !important; right: 8px; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
  .emoji-pop button { height: 44px; font-size: 22px; }
}

/* ★2026-11-04 右上の名前の前に本人の似顔絵 */
.user-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px 2px 3px; }
.user-chip .uc-face { display: inline-flex; flex: none; }
.user-chip .uc-face .author-face { border: 1.5px solid rgba(255,255,255,.7); }
.user-chip .uc-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ★2026-11-07 プライス発行20枚の投稿止め（原田・妻方）の枠 */
.pgate { margin: 0 0 12px; padding: 12px 16px; border: 1px solid var(--border2); border-radius: var(--radius); background: #fff; font-size: 14px; line-height: 1.6; }
.pgate b { font-size: 16px; }
.pgate.is-ng { border-color: #f59e0b; background: #fffbeb; }
.pgate.is-ok, .pgate.is-fz { border-color: #a7f3d0; background: #ecfdf5; }
.pgate-left { margin-left: 12px; font-weight: 700; color: #b45309; }
.pgate-sub { margin-top: 4px; font-size: 13px; color: var(--t2); }
.pgate-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pgate-sm { margin: 8px 0 0; padding: 8px 12px; }
@media (max-width: 640px) { .pgate-left { display: block; margin-left: 0; } }
/* ★2026-11-12 本日のMVP: パソコンは横長の絵・スマホ（幅 700 以下）は縦長の絵（zbrief-mvp が2枚入れる） */
.article-body img.zmvp-sp { display: none; }
@media (max-width: 700px) { .article-body img.zmvp-pc { display: none; } .article-body img.zmvp-sp { display: block; } }
