/* ============================================================
   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;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
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; }

/* ============ ヘッダー ============ */
.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: 7px; 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: 16px; 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;
}
.btn:hover { background: var(--blue-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-outline { background: #fff; border: 1.5px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: #eff6ff; }
.btn-ghost { background: transparent; border: 1px solid var(--border2); color: var(--t3); }
.btn-ghost:hover { background: #f1f5f9; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.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: 11px; color: var(--t3); margin-top: 3px; }

/* ============ ログイン ============ */
.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: 12px 12px 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 12px 12px; 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; }

.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; }
.post-row:hover { 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: 10px; font-weight: 700; padding: 1px 7px; border-radius: 9px; flex-shrink: 0; }
.badge-imp { background: #fee2e2; color: var(--red); border: 1px solid #fca5a5; font-size: 10px; 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: 10px; 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; }
.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: 11px; 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; }
.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-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: 6px; }
/* 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: 5px; 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: #94a3b8; }
.emoji-pop {
  position: absolute; background: #fff; border: 1px solid var(--border2); border-radius: 10px;
  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: 6px; 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: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.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: 22px; 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: var(--green); }
.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;
}
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 12px; 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; }
.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: 11px;
  font-weight: 700; padding: 1px 7px; border-radius: 5px;
}
.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: 11px; 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: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 9px; 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: 10px; padding: 1px 8px; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
/* ★2026-08-28 追加: Good投稿（例: インスタの素晴らしい投稿の紹介）バッジ */
.badge-good {
  display: inline-flex; align-items: center; gap: 4px;
  background: #d1fae5; color: #059669; border: 1px solid #6ee7b7;
  border-radius: 10px; padding: 1px 8px; font-size: 11px; 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: #94a3b8; 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; }
}

/* ============ 起動中の表示 ============ */
.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-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% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* 新規投稿画面の投稿者表示 */
.poster-chip {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  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: 9px; 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: 10px; 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; }
}

/* ============ スマホ ============ */
@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: 11px; }
  .form-inline > * { min-width: 100%; }
  .rt-btn { min-width: 34px; height: 34px; }
  .tab-btn { padding: 9px 12px; font-size: 12px; }
  .tbl { font-size: 12px; }
  .modal-overlay { padding-top: 30px; }
}
