/* ============================================================
   Pinkちゃんねる避難所 — 2ch/bbspink classic style
   ============================================================ */

/* ── reset ──────────────────────────────────────────────── */
body { background: #f5eef2 url('/bbspink/assets/images/ba.gif') repeat; margin: 0; padding: 0; font-family: 'Hiragino Kaku Gothic Pro', Meiryo, 'MS PGothic', sans-serif; font-size: 13px; color: #000; }
a { color: #0000cc; }
a:visited { color: #660099; }
a:hover { text-decoration: underline; }
* { box-sizing: border-box; }

/* ── サイトヘッダー ─────────────────────────────────────── */
.bbs-site-header {
    background: #cc0066;
    border-bottom: 2px solid #990044;
    padding: 0 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.bbs-site-header-inner {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 42px;
    gap: 10px;
}
.bbs-site-logo {
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}
.bbs-logo-pink  { font-size: 1.1rem; font-weight: bold; color: #fff; }
.bbs-logo-chan  { font-size: 0.95rem; color: #ffccdd; font-weight: bold; }
.bbs-logo-hinan { font-size: 0.75rem; color: #ffaacc; }

.bbs-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bbs-user-menu { display: flex; align-items: center; }

/* ── ドロップダウン ─────────────────────────────────────── */
.bbs-dropdown-menu {
    display: none;
    position: absolute;
    top: 38px;
    right: 0;
    min-width: 200px;
    background: #111;
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    padding: 6px 0;
    z-index: 9999;
    font-size: 0.85rem;
}
.bbs-dropdown-menu.active { display: block; }
.bbs-dropdown-welcome { padding: 8px 14px 6px; font-size: 0.78rem; color: #aaa; border-bottom: 1px solid #333; margin-bottom: 4px; pointer-events: none; }
.bbs-dropdown-welcome strong { color: #fff; }
.bbs-dropdown-menu a { display: block; padding: 5px 18px; text-decoration: none; color: #fff; transition: background 0.15s; font-size: 0.85rem; }
.bbs-dropdown-menu a:visited { color: #fff; }
.bbs-dropdown-menu a:hover { background: #222; color: #fff; text-decoration: none; }
.bbs-dropdown-menu .dropdown-wallet-connect { font-weight: bold; color: #ffd700 !important; }
.bbs-dropdown-menu .dropdown-wallet-disconnect { color: #ff6666 !important; }
.bbs-dropdown-divider { height: 1px; background: #222; margin: 3px 0; }
.bbs-dropdown-group-title { padding: 6px 14px 2px; font-size: 0.72rem; color: #888; pointer-events: none; display: flex; align-items: center; gap: 4px; }

.bbs-wallet-btn { border: none; border-radius: 4px; cursor: pointer; font-size: 0.78rem; display: flex; align-items: center; gap: 5px; white-space: nowrap; line-height: 1.3; }
.bbs-wallet-btn--connect { background: #fff; color: #cc0066; padding: 5px 12px; font-weight: bold; border: 1px solid #ffaacc; }
.bbs-wallet-btn--connect:hover { background: #ffeeee; }
.bbs-wallet-btn--auth { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.4) !important; padding: 4px 10px; }
.bbs-wallet-btn--auth:hover { background: rgba(255,255,255,0.25); }
.bbs-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,0.5); }

/* ── サイトフッター ─────────────────────────────────────── */
.bbs-site-footer { background: #fff0f5; border-top: 1px solid #ffaacc; text-align: center; padding: 8px; font-size: 0.78rem; color: #aa4466; margin-top: 20px; }
.bbs-site-footer a { color: #cc0033; }
.bbs-footer-sep { margin: 0 8px; color: #cc99aa; }

/* ── 板エリア全体 ───────────────────────────────────────── */
.bbs-wrap {
    width: 97%;
    max-width: 97%;
    margin: 10px auto 0;
    padding: 0 0 32px;
    font-size: 13px;
    line-height: 1.5;
}

/* ── 板ヘッダー ─────────────────────────────────────────── */
.bbs-board-header {
    background: #ffccdd;
    color: #660033;
    padding: 8px 12px;
    border: 1px solid #ffaacc;
    border-bottom: 2px solid #ff6699;
    margin-bottom: 0;
}
.bbs-board-title { font-size: 1.1rem; font-weight: bold; }
.bbs-board-sub { font-size: 0.75rem; color: #993355; margin-top: 2px; }

/* ── ツールバー ─────────────────────────────────────────── */
.bbs-toolbar {
    background: #fff8fb;
    border: 1px solid #ffaacc;
    border-top: none;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 0.82rem;
}
.bbs-count { font-size: 0.78rem; color: #888; }
.bbs-btn-new {
    background: #cc0066;
    color: #fff;
    border: 1px solid #990044;
    border-radius: 2px;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1.5;
}
.bbs-btn-new:hover { background: #aa0055; }
.bbs-auth-note { font-size: 0.75rem; color: #cc6688; }

/* ── ソート・検索 ───────────────────────────────────────── */
.bbs-sort-btns { display: flex; gap: 3px; }
.bbs-sort-btn {
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid #ffaacc;
    background: #fff;
    color: #cc0033;
    font-size: 0.78rem;
    text-decoration: none;
    line-height: 1.6;
    white-space: nowrap;
}
.bbs-sort-btn:hover { background: #fff0f5; text-decoration: none; }
.bbs-sort-btn.active { background: #cc0066; color: #fff; border-color: #990044; font-weight: bold; }
.bbs-search-form { display: flex; gap: 0; margin-left: auto; }
.bbs-search-input {
    padding: 3px 7px;
    border: 1px solid #ffaacc;
    border-right: none;
    border-radius: 2px 0 0 2px;
    font-size: 0.78rem;
    width: 150px;
    background: #fff;
    color: #222;
}
.bbs-search-input:focus { outline: none; border-color: #cc0066; }
.bbs-search-btn {
    padding: 3px 8px;
    border: 1px solid #ffaacc;
    border-radius: 0 2px 2px 0;
    background: #ffddee;
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1.5;
}
.bbs-search-btn:hover { background: #ffccdd; }
.bbs-search-result-note {
    font-size: 0.78rem;
    color: #993355;
    background: #fff0f5;
    border: 1px solid #ffaacc;
    padding: 4px 10px;
    margin-bottom: 5px;
}
.bbs-search-result-note a { color: #cc0033; margin-left: 8px; }

/* ── スレッド一覧（2ch.sc風コンパクト） ─────────────────── */
.bbs-thread-list { margin-bottom: 6px; }

.bbs-thread-compact {
    background: #fff0f5;
    border: 1px solid #ffaacc;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.9;
    word-break: break-all;
}
.bbs-tc-item { white-space: nowrap; }
.bbs-tc-no { color: #888; font-size: 0.85em; }
.bbs-tc-res { color: #555; font-size: 0.85em; }
.bbs-thread-compact a { color: #0000cc; font-weight: normal; }
.bbs-thread-compact a:visited { color: #660099; }
.bbs-thread-compact a:hover { text-decoration: underline; }
.bbs-tc-sep { color: #ccc; margin: 0 3px; }
.bbs-tc-foot { text-align: right; font-size: 0.78rem; margin-top: 4px; border-top: 1px solid #ffccdd; padding-top: 4px; }
.bbs-tc-foot a { color: #cc0033; }
.bbs-lock { font-size: 0.72rem; margin-left: 2px; }

.bbs-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    background: #fff8fb;
    border: 1px solid #ffccdd;
    font-size: 0.85rem;
}

/* ── ページャー ─────────────────────────────────────────── */
.bbs-pager { font-size: 0.8rem; padding: 4px 0; color: #666; }
.bbs-pager a { color: #0000cc; margin: 0 1px; text-decoration: none; }
.bbs-pager a:hover { text-decoration: underline; }
.pager-cur { color: #cc0033; font-weight: bold; margin: 0 1px; }

/* ── パンくず ───────────────────────────────────────────── */
.bbs-breadcrumb { font-size: 0.78rem; color: #888; margin-bottom: 5px; }
.bbs-breadcrumb a { color: #0000cc; }

/* ── スレッドタイトルバー ────────────────────────────────── */
.bbs-thread-title-bar {
    background: #ffccdd;
    border: 1px solid #ffaacc;
    padding: 6px 10px;
    font-weight: bold;
    font-size: 1rem;
    color: #cc0000;
    margin-bottom: 5px;
    word-break: break-all;
}
.bbs-thread-no { color: #888; font-size: 0.8rem; margin-right: 4px; font-weight: normal; }
.bbs-thread-meta { color: #999; font-size: 0.78rem; font-weight: normal; margin-left: 4px; }

/* ── 投稿エリア ─────────────────────────────────────────── */
.bbs-posts { border: 1px solid #ddd; background: #fff; margin-bottom: 5px; }
.bbs-post { border-bottom: 1px solid #f0e8ec; padding: 5px 10px; }
.bbs-post:last-child { border-bottom: none; }
.bbs-post:nth-child(even) { background: #fdf8fa; }

.bbs-post-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 2px;
    font-size: 0.8rem;
    line-height: 1.4;
}
.bbs-post-no a { color: #cc0033; font-weight: bold; font-size: 0.8rem; text-decoration: none; }
.bbs-post-no a:hover { text-decoration: underline; }
.bbs-post-name { color: #117711; font-weight: bold; }
.bbs-name-auth { color: #117711; font-weight: bold; text-decoration: none; }
.bbs-name-auth:hover { text-decoration: underline; color: #0a550a; }
.bbs-name-auth:visited { color: #117711; }
.bbs-post-date { color: #888; }
.bbs-post-id { color: #996600; font-size: 0.78rem; }
.bbs-post-wallet { color: #bbb; font-size: 0.72rem; cursor: help; }
.bbs-post-body { font-size: 0.88rem; line-height: 1.7; word-break: break-word; padding-left: 2px; color: #111; }
.bbs-post-body a { color: #0000cc; }
.bbs-post-body a:visited { color: #660099; }
.bbs-anchor { color: #cc0033; cursor: pointer; font-weight: bold; }
.bbs-anchor:hover { text-decoration: underline; }
.bbs-post-img { margin-top: 5px; }
.bbs-post-img img { max-width: 300px; max-height: 300px; border: 1px solid #ccc; cursor: pointer; display: block; }
.bbs-post-img img:hover { opacity: 0.85; }
.bbs-idx-dd .bbs-post-img img { max-width: 200px; max-height: 200px; }

.bbs-post-auth-badge { font-size: 0.75rem; color: #117711; background: #f0fff0; border: 1px solid #aaddaa; padding: 3px 8px; margin-bottom: 6px; }
.bbs-post-auth-badge a { color: #117711; }
.bbs-post-anon-note { font-size: 0.75rem; color: #888; margin-bottom: 6px; }
.bbs-post-anon-note a { color: #cc0033; }

/* ── 書き込みフォーム ────────────────────────────────────── */
.bbs-write-area {
    background: #fff8fb;
    border: 1px solid #ffaacc;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.bbs-write-title { font-weight: bold; color: #993355; margin-bottom: 6px; font-size: 0.85rem; }
.bbs-form-table { border-collapse: collapse; width: 100%; }
.bbs-form-table th {
    background: #ffddee;
    border: 1px solid #ffaacc;
    padding: 4px 8px;
    text-align: right;
    color: #993355;
    font-size: 0.78rem;
    white-space: nowrap;
    width: 52px;
    vertical-align: middle;
}
.bbs-form-table td { border: 1px solid #ffccdd; padding: 3px 5px; background: #fff; }
.bbs-form-table input[type=text],
.bbs-form-table textarea {
    width: 100%;
    border: 1px solid #ffaacc;
    padding: 4px 7px;
    font-size: 0.88rem;
    font-family: inherit;
    color: #222;
    background: #fff;
    resize: vertical;
    box-sizing: border-box;
}
.bbs-form-table input[type=text]:focus,
.bbs-form-table textarea:focus { outline: none; border-color: #cc0066; background: #fff8fb; }
.bbs-form-msg { font-size: 0.78rem; color: #cc0000; min-height: 16px; margin-top: 5px; }
.bbs-form-msg.ok { color: #008800; }
.bbs-form-actions { margin-top: 6px; }
.bbs-btn-submit {
    background: #cc0066;
    color: #fff;
    border: 1px solid #990044;
    border-radius: 2px;
    padding: 5px 18px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
}
.bbs-btn-submit:hover { background: #aa0055; }
.bbs-auth-note {
    font-size: 0.82rem;
    color: #aa4466;
    padding: 6px 4px;
    border: 1px dashed #ffaacc;
    text-align: center;
    background: #fff0f5;
}
.bbs-auth-note a { color: #cc0033; }

/* ── モーダル ───────────────────────────────────────────── */
.bbs-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 9999; align-items: center; justify-content: center; padding: 16px; }
.bbs-modal-overlay.active { display: flex; }
.bbs-modal { background: #fff8fb; border: 2px solid #cc0066; border-radius: 4px; padding: 18px; width: 500px; max-width: 100%; max-height: 90vh; overflow-y: auto; }
.bbs-modal-title { font-weight: bold; color: #990044; margin-bottom: 10px; font-size: 0.9rem; }
.bbs-btn-cancel { background: #eee; color: #555; border: 1px solid #ccc; border-radius: 2px; padding: 5px 14px; font-size: 0.85rem; cursor: pointer; margin-left: 8px; }
.bbs-btn-cancel:hover { background: #ddd; }

/* ── インデックス展開スレッド (2ch.sc風) ───────────────── */
.bbs-idx-thread {
    border: 1px solid #aaa;
    margin-bottom: 10px;
    background: #fff;
}
.bbs-idx-thread-head {
    background: #ffccdd;
    border-bottom: 1px solid #ffaacc;
    padding: 3px 6px;
    font-size: 0.82rem;
    font-weight: bold;
    word-break: break-all;
    line-height: 1.6;
}
.bbs-idx-nav {
    color: #0000cc;
    text-decoration: none;
    font-size: 0.8rem;
    margin-right: 2px;
}
.bbs-idx-nav:hover { text-decoration: underline; }
.bbs-idx-thread-num { color: #555; font-weight: normal; margin-right: 3px; font-size: 0.78rem; }
.bbs-idx-thread-title { color: #cc0000; font-weight: bold; text-decoration: none; }
.bbs-idx-thread-title:hover { text-decoration: underline; }
.bbs-idx-thread-title:visited { color: #880000; }

.bbs-idx-posts {
    margin: 0;
    padding: 2px 8px 4px;
    background: #efefef;
    list-style: none;
}
.bbs-idx-dt {
    font-size: 0.78rem;
    color: #444;
    margin: 5px 0 1px;
    padding: 0 0 2px;
    border-bottom: 1px dotted #ccc;
}
.bbs-idx-no { color: #cc0033; font-weight: bold; margin-right: 3px; }
.bbs-idx-dd {
    margin: 0 0 3px 12px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #111;
    word-break: break-word;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 3px 6px;
}
.bbs-idx-more {
    margin: 3px 0 3px 12px;
    font-size: 0.78rem;
    color: #888;
}
.bbs-idx-more a { color: #0000cc; }

.bbs-idx-thread-foot {
    background: #f0f0e8;
    border-top: 1px solid #ccc;
    padding: 3px 8px;
    font-size: 0.78rem;
}
.bbs-idx-thread-foot a { color: #0000cc; margin-right: 6px; }
.bbs-idx-reply-toggle {
    background: none;
    border: none;
    color: #cc0033;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
}
.bbs-idx-reply {
    background: #fff8fb;
    border-top: 1px solid #ffaacc;
    padding: 6px 8px;
}
.bbs-bottom-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding: 8px 4px;
    border-top: 1px solid #ffaacc;
}

/* ── スマホ対応 ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .bbs-wrap { width: 100%; padding: 0 0 24px; }
    .bbs-thread-compact { padding: 6px 8px; font-size: 12px; }
    .bbs-post-header { gap: 3px; font-size: 0.72rem; }
    .bbs-post-wallet { display: none; }
    .bbs-form-table th { width: 44px; font-size: 0.75rem; padding: 4px 5px; }
    .bbs-thread-title-bar { font-size: 0.9rem; }
    .bbs-board-title { font-size: 1rem; }
    .bbs-search-form { margin-left: 0; width: 100%; }
    .bbs-search-input { width: 100%; flex: 1; }
    .bbs-sort-btns { flex-shrink: 0; }
    .bbs-site-header-inner { height: 40px; }
}
