/* ========================================
   掲示板機能 スタイルシート
   ======================================== */

/* 基本設定 - より具体的な選択子を使用 */
.main .board-archive,
.main .board-post-page,
.main .board-profile-page,
.main .board-mypage {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

/* 詳細ページのみ2カラムレイアウト */
.main .board-single {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    display: grid !important;
    grid-template-columns: 1fr 300px !important;
    gap: 20px !important;
}

/* パンくずリスト（サイト統一スタイル対応） */
.main .board-single .breadcrumbs {
    grid-column: 1 / -1;
    margin-bottom: 10px;
}

.main .board-single .breadcrumbs_current {
    color: #666;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 968px) {
    .main .board-single {
        grid-template-columns: 1fr !important;
    }
}

.main .board-archive h1,
.main .board-post-page h1,
.main .board-profile-page h1,
.main .board-mypage h1 {
    font-size: 28px !important;
    font-weight: bold !important;
    margin-bottom: 30px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #e1e1e1 !important;
    width: 100% !important;
}

/* ========================================
   一覧ページ（archive-board.php）
   ======================================== */

.main .board-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    .main .board-list {
        grid-template-columns: 1fr !important;
    }
}

/* 投稿カード（card.php） */
.main .board-card {
    background: #fff !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    transition: box-shadow 0.3s ease !important;
    margin-bottom: 20px !important;
}

.main .board-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.main .board-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block !important;
}

.main .board-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 15px !important;
}

.main .board-card-author {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.main .avatar-small {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.main .board-card-author .nickname {
    font-size: 14px !important;
    color: #333 !important;
    font-weight: 500 !important;
}

.main .board-card-date {
    font-size: 12px !important;
    color: #999 !important;
}

.main .board-card-title {
    font-size: 18px !important;
    font-weight: bold !important;
    margin-bottom: 10px !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

.main .board-card-excerpt {
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.main .board-card-meta {
    margin-bottom: 15px !important;
}

.main .board-card-meta .tag {
    display: inline-block !important;
    padding: 4px 10px !important;
    margin-right: 8px !important;
    margin-bottom: 8px !important;
    background: #f0f0f0 !important;
    color: #333 !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    text-decoration: none !important;
}

.main .board-card-meta .tag:hover {
    background: #e0e0e0 !important;
}

.main .board-card-stats {
    display: flex !important;
    gap: 15px !important;
    font-size: 14px !important;
    color: #999 !important;
}

.main .board-card-stats .stat-item {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

/* ページネーション */
.main .board-pagination {
    margin-top: 40px !important;
    text-align: center !important;
}

/* ========================================
   詳細ページ（single-board.php）
   ======================================== */

.main .board-main {
    background: #fff !important;
    padding: 30px !important;
    border-radius: 8px !important;
    border: 1px solid #e1e1e1 !important;
}

/* 投稿者情報 */
.main .board-author {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid #e1e1e1 !important;
}

.main .board-author .avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.main .author-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.main .author-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.main .author-info .nickname {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #333 !important;
}

.main .author-info .user-handle {
    font-size: 13px !important;
    color: #666 !important;
    font-weight: normal !important;
}

.main .author-info .date {
    font-size: 14px !important;
    color: #999 !important;
}

/* カテゴリ・タグ */
.main .board-meta {
    margin-bottom: 20px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
}

.main .board-meta .feed-card-category {
    margin: 0 !important;
}

.main .board-meta .tag {
    display: inline-block !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    background: #f0f0f0 !important;
    color: #333 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    text-decoration: none !important;
}

.main .board-meta .tag:hover {
    background: #e0e0e0 !important;
}

/* タイトル */
.main .board-title {
    font-size: 28px !important;
    font-weight: bold !important;
    margin-bottom: 20px !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

/* 本文 */
.main .board-content {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #333 !important;
    margin-bottom: 30px !important;
}

.main .board-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 4px !important;
    margin: 20px 0 !important;
}

/* リアクション（reactions.php） */
/* board-reactions と feed-reactions を統一 */
.main .board-reactions {
    position: relative !important; /* ポップアップの基準位置 */
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    padding: 20px 0 !important;
    border-top: 1px solid #e1e1e1 !important;
    border-bottom: 1px solid #e1e1e1 !important;
    margin-bottom: 30px !important;
}

/* 既存の reaction-btn スタイルを feed-reaction-btn と統一 */
.main .board-reactions .reaction-btn,
.main .board-reactions .feed-reaction-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 14px !important;
    color: #666 !important;
}

.main .board-reactions .reaction-btn:hover:not(:disabled),
.main .board-reactions .feed-reaction-btn:hover:not(:disabled) {
    background: #f5f5f5 !important;
}

.main .board-reactions .reaction-btn.active,
.main .board-reactions .feed-reaction-btn.active {
    background: #fff3e0 !important;
    color: #ff9800 !important;
}

.main .board-reactions .reaction-btn:disabled,
.main .board-reactions .feed-reaction-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.main .board-reactions .reaction-btn .icon,
.main .board-reactions .reaction-btn .emoji-icon {
    font-size: 18px !important;
    line-height: 1 !important;
}

.main .board-reactions .reaction-btn .count,
.main .board-reactions .reaction-btn .reaction-count {
    font-weight: 500 !important;
    color: #333 !important;
}

/* ブックマークボタンのスタイル */
.main .board-reactions .bookmark-btn svg {
    width: 22px !important;
    height: 22px !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}

.main .board-reactions .feed-reaction-btn svg {
    width: 22px !important;
    height: 22px !important;
    fill: currentColor !important;
}

/* コメント（comments.php） */
.main .board-comments {
    margin-top: 30px !important;
}

.main .board-comments h3 {
    font-size: 20px !important;
    font-weight: bold !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e1e1e1 !important;
}

.main .comment-list {
    margin-bottom: 30px !important;
}

.main .comment-item {
    padding: 15px !important;
    margin-bottom: 15px !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
    border-left: 3px solid #e1e1e1 !important;
}

.main .comment-author {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
}

.main .comment-author .avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.main .comment-author .nickname {
    font-weight: 500 !important;
    color: #333 !important;
}

.main .comment-author .date {
    font-size: 12px !important;
    color: #999 !important;
    margin-left: auto !important;
}

.main .comment-content {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    margin-bottom: 10px !important;
}

.main .reply-btn {
    background: none !important;
    border: none !important;
    color: #666 !important;
    font-size: 12px !important;
    cursor: pointer !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    transition: background 0.3s ease !important;
}

.main .reply-btn:hover {
    background: #e8e8e8 !important;
}

.main .comment-form {
    margin-top: 20px !important;
}

.main .comment-form .form-row {
    display: flex !important;
    gap: 10px !important;
}

.main .comment-form input[type="text"] {
    flex: 1 !important;
    padding: 10px !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
}

.main .comment-form button[type="submit"] {
    padding: 10px 20px !important;
    background: #009de0 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: background 0.3s ease !important;
}

.main .comment-form button[type="submit"]:hover {
    background: #0088c7 !important;
}

/* サイドバー（sidebar-related.php） */
.main .board-sidebar {
    position: sticky !important;
    top: 100px !important; /* header の高さを考慮 */
    height: fit-content !important;
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
}

.main .board-sidebar-related {
    background: #fff !important;
    padding: 20px !important;
    border-radius: 8px !important;
    border: 1px solid #e1e1e1 !important;
}

.main .board-sidebar-related h3 {
    font-size: 16px !important;
    font-weight: bold !important;
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e1e1e1 !important;
    color: #333 !important;
}

.main .related-posts-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.main .related-post-item {
    margin-bottom: 16px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.main .related-post-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 関連投稿リンク */
.main .related-post-link {
    display: flex !important;
    gap: 12px !important;
    text-decoration: none !important;
    color: #333 !important;
}

.main .related-post-link:hover .related-post-title {
    color: #0066cc !important;
}

/* 投稿内容（左側） */
.main .related-post-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.main .related-post-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 0 6px !important;
    line-height: 1.4 !important;
    color: #333 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    transition: color 0.2s !important;
}

.main .related-post-excerpt {
    font-size: 12px !important;
    color: #666 !important;
    margin: 0 0 8px !important;
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* メタ情報（作者 + 日付） */
.main .related-post-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}

.main .related-post-author {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.main .related-post-author .author-avatar {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.main .related-post-author .author-name {
    font-size: 12px !important;
    color: #666 !important;
    max-width: 80px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.main .related-post-author .verified-badge {
    flex-shrink: 0 !important;
    width: 14px !important;
    height: 14px !important;
}

.main .related-post-date {
    font-size: 11px !important;
    color: #999 !important;
    white-space: nowrap !important;
}

/* サムネイル（右側） */
.main .related-post-thumbnail {
    flex-shrink: 0 !important;
    width: 80px !important;
    height: 60px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.main .related-post-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* ========================================
   投稿フォーム（page-board-post.php）
   ======================================== */

.main .board-post-form {
    max-width: 800px !important;
    margin: 0 auto !important;
    background: #fff !important;
    padding: 30px !important;
    border-radius: 8px !important;
    border: 1px solid #e1e1e1 !important;
}

.main .form-group {
    margin-bottom: 25px !important;
}

.main .form-group label {
    display: block !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
    color: #333 !important;
}

.main .form-group .required {
    color: #e74c3c !important;
}

.main .form-group input[type="text"],
.main .form-group input[type="url"],
.main .form-group select {
    width: 100% !important;
    padding: 12px !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    transition: border-color 0.3s ease !important;
}

.main .form-group input:focus,
.main .form-group select:focus {
    outline: none !important;
    border-color: #009de0 !important;
}

.main .form-group small {
    display: block !important;
    margin-top: 5px !important;
    font-size: 12px !important;
    color: #999 !important;
}

.main .form-actions {
    display: flex !important;
    gap: 15px !important;
    margin-top: 30px !important;
}

.main .btn-submit {
    padding: 12px 30px !important;
    background: #009de0 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
}

.main .btn-submit:hover {
    background: #0088c7 !important;
}

.main .btn-cancel {
    padding: 12px 30px !important;
    background: #f5f5f5 !important;
    color: #333 !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: background 0.3s ease !important;
}

.main .btn-cancel:hover {
    background: #e8e8e8 !important;
}

/* ========================================
   プロフィール設定（page-board-profile.php）
   ======================================== */

.main .board-profile-form {
    max-width: 600px !important;
    margin: 0 auto !important;
    background: #fff !important;
    padding: 30px !important;
    border-radius: 8px !important;
    border: 1px solid #e1e1e1 !important;
}

/* ========================================
   マイページ（page-board-mypage.php）
   ======================================== */

/* ユーザーヘッダー */
.main .mypage-header {
    display: flex !important;
    align-items: flex-start !important;
    gap: 24px !important;
    padding: 30px !important;
    background: #fff !important;
    border-radius: 12px !important;
    border: 1px solid #e1e1e1 !important;
    margin-bottom: 24px !important;
}

.main .mypage-avatar {
    flex-shrink: 0 !important;
    position: relative !important;
}

.main .mypage-avatar img {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.main .mypage-user-info {
    flex: 1 !important;
}

.main .mypage-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
}

.main .mypage-nickname {
    font-size: 24px !important;
    font-weight: bold !important;
    color: #333 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.main .mypage-user-info .verified-badge {
    flex-shrink: 0 !important;
}

/* 管理员徽章（头像右下角）- 通用样式 */
.main .mypage-avatar,
.main .author-avatar,
.main .author-avatar-wrapper,
.main .comment-avatar-wrapper,
.main .related-post-author .author-avatar-wrapper {
    position: relative !important;
}

.main .admin-badge-avatar {
    position: absolute;
    bottom: -2px;
    right: -2px;
    display: inline-block;
    padding: 2px 6px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 3px;
    line-height: 1.3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    white-space: nowrap;
}

/* 大尺寸头像（个人页面）的徽章 */
.main .mypage-avatar .admin-badge-avatar {
    bottom: -3px;
    right: -3px;
    padding: 3px 8px;
    font-size: 11px;
}

/* 中等尺寸头像（卡片、详情页）的徽章 */
.main .author-avatar .admin-badge-avatar,
.main .author-avatar-wrapper .admin-badge-avatar {
    bottom: -2px;
    right: -2px;
    padding: 2px 6px;
    font-size: 10px;
}

/* 小尺寸头像（评论、相关文章）的徽章 */
.main .comment-avatar-wrapper .admin-badge-avatar,
.main .related-post-author .author-avatar-wrapper .admin-badge-avatar {
    bottom: -1px;
    right: -1px;
    padding: 1px 4px;
    font-size: 9px;
}

/* 管理员标签（按钮中的"（管理）"） */
.admin-label {
    display: inline-block;
    margin-left: 4px;
    font-size: 12px;
    color: #333;
    vertical-align: middle;
    line-height: 1;
}

.main .mypage-handle {
    font-size: 14px !important;
    color: #666 !important;
    display: block !important;
    margin-bottom: 8px !important;
}

.main .mypage-bio {
    font-size: 14px !important;
    color: #444 !important;
    line-height: 1.6 !important;
    margin: 0 0 12px !important;
}

.main .mypage-stats {
    display: flex !important;
    gap: 20px !important;
    margin-bottom: 16px !important;
}

.main .mypage-stats .stat-item {
    font-size: 14px !important;
    color: #666 !important;
}

.main .mypage-stats .stat-item strong {
    color: #333 !important;
    font-weight: 600 !important;
}

.main .btn-edit-profile {
    display: inline-block !important;
    padding: 8px 20px !important;
    font-size: 14px !important;
    color: #009de0 !important;
    background: transparent !important;
    border: 1px solid #009de0 !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}

.main .btn-edit-profile:hover {
    color: #fff !important;
    background: #009de0 !important;
}

/* タブナビゲーション */
.main .mypage-tabs {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 30px !important;
    border-bottom: 2px solid #e1e1e1 !important;
}

.main .tab-btn {
    padding: 12px 24px !important;
    background: none !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #666 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-bottom: -2px !important;
}

.main .tab-btn:hover {
    color: #009de0 !important;
}

.main .tab-btn.active {
    color: #009de0 !important;
    border-bottom-color: #009de0 !important;
}

.main .tab-content {
    display: none !important;
}

.main .tab-content.active {
    display: block !important;
}

.main .tab-content h2 {
    font-size: 20px !important;
    font-weight: bold !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e1e1e1 !important;
}

.main .mypage-posts-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.main .no-posts {
    text-align: center !important;
    padding: 40px 20px !important;
    color: #999 !important;
    font-size: 14px !important;
}

/* ユーザーリンクスタイル */
.main .author-name-link,
.main .author-avatar-link {
    text-decoration: none !important;
    color: inherit !important;
    display: inline-block !important;
}

.main .author-avatar-wrapper {
    position: relative !important;
    display: inline-block !important;
}

.main .author-name-link:hover .nickname {
    color: #009de0 !important;
}

.main .comment-avatar {
    text-decoration: none !important;
    display: inline-block !important;
}

.main .comment-avatar-wrapper {
    position: relative !important;
    display: inline-block !important;
}

.main .related-post-author .author-avatar-wrapper {
    position: relative !important;
    display: inline-block !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .main .board-archive,
    .main .board-single,
    .main .board-post-page,
    .main .board-profile-page,
    .main .board-mypage {
        padding: 15px !important;
    }
    
    .main .board-main {
        padding: 20px !important;
    }
    
    .main .board-title {
        font-size: 24px !important;
    }
    
    .main .mypage-tabs {
        flex-direction: column !important;
    }
    
    .main .tab-btn {
        text-align: left !important;
        border-bottom: 1px solid #e1e1e1 !important;
        border-left: 3px solid transparent !important;
    }
    
    .main .tab-btn.active {
        border-left-color: #009de0 !important;
        border-bottom-color: #e1e1e1 !important;
    }
    
    .main .form-actions {
        flex-direction: column !important;
    }
    
    .main .btn-submit,
    .main .btn-cancel {
        width: 100% !important;
        text-align: center !important;
    }
}

/* ========================================
   Feed スタイル（archive-board.php）
   ======================================== */

/* Feed コンテナ */
.main .board-feed {
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

.main .board-feed-container {
    width: 100% !important;
}

/* Feed ヘッダー */
.main .board-feed-header {
    margin-bottom: 30px !important;
}

.main .board-feed-title-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.main .board-feed-title {
    font-size: 24px !important;
    font-weight: bold !important;
    margin: 0 !important;
    color: #333 !important;
}

/* 投稿作成ボタン */
.main .btn-create-post {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: linear-gradient(135deg, #009de0 0%, #0077b6 100%) !important;
    border: none !important;
    border-radius: 24px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 157, 224, 0.3) !important;
}

.main .btn-create-post:hover {
    background: linear-gradient(135deg, #0088c7 0%, #005a8c 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 157, 224, 0.4) !important;
    transform: translateY(-1px) !important;
}

.main .btn-create-post svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

.main .btn-create-post span {
    white-space: nowrap !important;
}

/* フィルターボタン */
.main .board-feed-filters {
    margin-bottom: 20px !important;
}

.main .feed-filter-list {
    display: flex !important;
    gap: 0 !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid #e1e1e1 !important;
}

.main .feed-filter-list li {
    margin: 0 !important;
}

.main .feed-filter-btn {
    display: inline-block !important;
    padding: 12px 24px !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    color: #666 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-bottom: -1px !important;
}

.main .feed-filter-btn:hover {
    color: #009de0 !important;
    background: rgba(0, 157, 224, 0.05) !important;
}

.main .feed-filter-btn.active {
    color: #009de0 !important;
    border-bottom-color: #009de0 !important;
    background: rgba(0, 157, 224, 0.05) !important;
}

/* Feed リスト */
.main .board-feed-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.main .feed-item {
    margin-bottom: 20px !important;
}

/* Feed カード */
.main .feed-card {
    background: #fff !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    transition: box-shadow 0.3s ease !important;
}

.main .feed-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.main .feed-card-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

/* 投稿者情報エリア */
.main .feed-card-author {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

.main .author-link {
    text-decoration: none !important;
    flex-shrink: 0 !important;
}

.main .author-avatar {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50% !important;
    overflow: visible !important;
    background: #f0f0f0 !important;
    position: relative !important;
}

.main .avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

.main .author-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.main .author-name-link {
    text-decoration: none !important;
    color: inherit !important;
}

.main .author-name {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.main .author-name .nickname {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #333 !important;
}

.main .verified-badge {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.main .verified-badge svg {
    width: 16px !important;
    height: 16px !important;
}

.main .author-meta {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.main .member-level {
    display: inline-block !important;
    padding: 4px 10px !important;
    background: #f5f5f5 !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #666 !important;
}

.main .post-time {
    font-size: 13px !important;
    color: #999 !important;
}

/* コンテンツエリア */
.main .feed-card-content {
    position: relative !important;
}

.main .feed-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block !important;
}

.main .feed-card-title {
    font-size: 18px !important;
    font-weight: bold !important;
    margin-bottom: 10px !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

.main .feed-card-text {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #666 !important;
    margin-bottom: 15px !important;
}

/* 画像エリア（右側） */
.main .feed-card-image {
    margin-top: 15px !important;
    margin-left: auto !important;
    max-width: 300px !important;
}

.main .feed-image {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    object-fit: cover !important;
}

/* カテゴリタグ */
.main .feed-card-category {
    margin-top: 10px !important;
}

.main .category-label {
    display: inline-block !important;
    padding: 6px 12px !important;
    background: #f0f0f0 !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    color: #666 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s !important;
}

.main .category-label:hover {
    background: #e0e0e0 !important;
    color: #0692cc !important;
}

/* インタラクションエリア */
.main .feed-card-interactions {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding-top: 15px !important;
    border-top: 1px solid #f0f0f0 !important;
}

/* リアクションボタン */
.main .feed-reactions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.main .feed-reaction-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 14px !important;
    color: #666 !important;
}

.main .feed-reaction-btn:hover {
    background: #f5f5f5 !important;
}

/* active状態（点击过的按钮）- 列表と詳細で統一 */
.main .feed-reaction-btn.active {
    background: #fff3e0 !important;
    border: 1px solid #ff9800 !important;
    color: #ff9800 !important;
}

.main .feed-reaction-btn svg {
    width: 22px !important;
    height: 22px !important;
    fill: currentColor !important;
}

.main .feed-reaction-btn .emoji-icon {
    font-size: 18px !important;
    line-height: 1 !important;
}

.main .feed-reaction-btn .reaction-count {
    font-weight: 500 !important;
    color: #333 !important;
}

/* テキストリアクションボタン */
.main .feed-reaction-btn.text-reaction-btn {
    padding: 6px 12px !important;
}

.main .feed-reaction-btn .reaction-text-icon {
    font-size: 13px !important;
    font-weight: 500 !important;
    margin-right: 4px !important;
}

/* カウントが0の場合は非表示 */
.main .feed-reaction-btn.hidden-count .reaction-count {
    display: none !important;
}

.main .feed-reaction-btn.hidden-count {
    opacity: 0.6 !important;
}

.main .add-reaction-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    color: #999 !important;
}

.main .add-reaction-btn:hover {
    background: #f5f5f5 !important;
    color: #666 !important;
}

.main .add-reaction-btn svg {
    width: 22px !important;
    height: 22px !important;
}

/* リアクション選択ポップアップ（参考UIスタイル） */
.reaction-picker-popup {
    position: absolute !important;
    z-index: 99999 !important;
    background: #fff !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    padding: 12px !important;
    width: 400px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.reaction-picker {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
}

.reaction-picker-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 60px !important;
    min-height: 50px !important;
    padding: 8px 12px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 20px !important;
}

.reaction-picker-item:hover {
    background: #f5f5f5 !important;
    transform: scale(1.05) !important;
}

.reaction-picker-item .emoji-large {
    font-size: 28px !important;
    line-height: 1 !important;
    display: block !important;
}

.reaction-picker-item.text-reaction {
    min-width: auto !important;
    padding: 6px 10px !important;
}

.reaction-picker-item .reaction-text {
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

/* スクロールバーのスタイル */
.reaction-picker-popup::-webkit-scrollbar {
    width: 6px !important;
}

.reaction-picker-popup::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 3px !important;
}

.reaction-picker-popup::-webkit-scrollbar-thumb {
    background: #ccc !important;
    border-radius: 3px !important;
}

.reaction-picker-popup::-webkit-scrollbar-thumb:hover {
    background: #999 !important;
}

/* コメントプレビュー */
.main .feed-comments-preview {
    margin-top: 8px !important;
}

.main .comments-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    color: #666 !important;
    font-size: 13px !important;
}

.main .comment-avatars {
    display: flex !important;
    align-items: center !important;
    gap: -8px !important;
}

.main .comment-avatar-item {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
    margin-left: -8px !important;
}

.main .comment-avatar-item:first-child {
    margin-left: 0 !important;
}

.main .comment-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.main .comment-count-text {
    font-weight: 500 !important;
    color: #333 !important;
}

.main .last-comment-time {
    color: #999 !important;
    font-size: 12px !important;
}

/* ページネーション */
.main .board-feed-pagination {
    margin-top: 40px !important;
    text-align: center !important;
}

.main .board-feed-pagination .page-numbers {
    display: inline-flex !important;
    gap: 8px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.main .board-feed-pagination .page-numbers a,
.main .board-feed-pagination .page-numbers span {
    display: inline-block !important;
    padding: 8px 12px !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    color: #333 !important;
    transition: all 0.3s ease !important;
}

.main .board-feed-pagination .page-numbers a:hover {
    background: #f5f5f5 !important;
    border-color: #009de0 !important;
}

.main .board-feed-pagination .page-numbers .current {
    background: #009de0 !important;
    color: #fff !important;
    border-color: #009de0 !important;
}

/* 空状態 */
.main .board-feed-empty {
    text-align: center !important;
    padding: 60px 20px !important;
}

.main .empty-message {
    font-size: 16px !important;
    color: #999 !important;
}

/* レスポンシブ対応（Feed） */
@media (max-width: 768px) {
    .main .board-feed {
        padding: 15px !important;
    }
    
    .main .author-avatar {
        width: 60px !important;
        height: 60px !important;
    }
    
    .main .feed-card-image {
        max-width: 100% !important;
        margin-left: 0 !important;
    }
    
    .main .feed-filter-list {
        flex-wrap: wrap !important;
    }
    
    .main .feed-filter-btn {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
}

/* ============================================
   リアクション汇总テキスト
   ============================================ */
.reaction-summary {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.reaction-summary-link {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.reaction-summary-link:hover {
    color: #333;
}

.reaction-summary .summary-user {
    color: #333;
    font-weight: 500;
}

.reaction-summary .summary-others {
    color: #666;
}

.reaction-summary .summary-text {
    color: #999;
}

/* ============================================
   リアクション詳細弹窗
   ============================================ */
.reaction-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-detail-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* ヘッダー */
.reaction-detail-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.reaction-detail-header .back-btn {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: rgba(0, 0, 0, 0.87);
    border-radius: 50%;
    transition: background 0.2s;
}

.reaction-detail-header .back-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.reaction-detail-header .modal-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* タブ */
.reaction-detail-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.reaction-detail-tabs::-webkit-scrollbar {
    display: none;
}

.reaction-detail-tabs .reaction-tab {
    flex: 1;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.reaction-detail-tabs .reaction-tab:hover {
    background: #f5f5f5;
}

.reaction-detail-tabs .reaction-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #009de0;
}

.reaction-detail-tabs .tab-icon {
    font-size: 20px;
    line-height: 1;
    margin-bottom: 4px;
}

.reaction-detail-tabs .tab-count {
    font-size: 12px;
    color: #666;
}

/* ユーザーリスト */
.reaction-detail-users {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.reaction-detail-users .loading,
.reaction-detail-users .error,
.reaction-detail-users .no-users {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.reaction-user-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.reaction-user-item:hover {
    background: #f5f5f5;
}

.reaction-user-item .user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.reaction-user-item .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reaction-user-item .user-info {
    flex: 1;
    min-width: 0;
}

.reaction-user-item .user-nickname {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reaction-user-item .user-handle {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* レスポンシブ */
@media (max-width: 480px) {
    .reaction-detail-content {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }
    
    .reaction-detail-tabs .reaction-tab {
        min-width: 60px;
        padding: 10px 12px;
    }
}

/* ============================================
   コメント区域スタイル（リニューアル）
   ============================================ */
.board-comments {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.board-comments h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.comment-list {
    margin-bottom: 20px;
}

/* コメントアイテム */
.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item.comment-reply {
    margin-left: 40px;
    padding-left: 16px;
    border-left: 2px solid #e0e0e0;
}

/* コメントヘッダー */
.comment-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.comment-avatar .avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author-info {
    flex: 1;
    min-width: 0;
}

.author-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.comment-author-info .nickname {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.comment-author-info .user-handle {
    font-size: 13px;
    color: #666;
}

.author-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 会員レベルバッジ */
.comment-author-info .member-level {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #666;
}

.comment-author-info .member-level.level-welcome {
    background: #e8f5e9;
    color: #2e7d32;
}

.comment-author-info .member-level.level-bronze {
    background: #fff3e0;
    color: #e65100;
}

.comment-author-info .member-level.level-silver {
    background: #eceff1;
    color: #546e7a;
}

.comment-author-info .member-level.level-gold {
    background: #fff8e1;
    color: #f9a825;
}

.comment-author-info .member-level.level-regular {
    background: #e3f2fd;
    color: #1565c0;
}

.comment-author-info .date {
    font-size: 12px;
    color: #999;
}

/* コメント内容 */
.comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 12px;
    padding-left: 56px; /* アバター幅 + gap */
}

/* コメントフッター */
.comment-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-left: 56px;
}

/* 返信ボタン（リニューアル） */
.comment-footer .reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-footer .reply-btn:hover {
    background: #e8e8e8;
    color: #333;
}

.comment-footer .reply-btn svg {
    width: 14px;
    height: 14px;
}

/* 返信コメントの入れ子 */
.comment-replies {
    margin-top: 8px;
}

.comment-replies .comment-item {
    padding: 12px 0;
}

.comment-replies .comment-content,
.comment-replies .comment-footer {
    padding-left: 56px;
}

/* コメントフォーム */
.comment-form {
    margin-top: 20px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
}

.comment-form .form-row {
    display: flex;
    gap: 10px;
}

.comment-form input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-form input[type="text"]:focus {
    border-color: #009de0;
}

.comment-form button[type="submit"] {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: #009de0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form button[type="submit"]:hover {
    background: #0088c7;
}

/* 返信フォーム（インライン） */
.comment-reply-form {
    margin: 12px 0 12px 56px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
}

.comment-reply-form .form-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.comment-reply-form input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 16px;
    outline: none;
}

.comment-reply-form button[type="submit"] {
    padding: 8px 16px;
    font-size: 13px;
    color: #fff;
    background: #009de0;
    border: none;
    border-radius: 16px;
    cursor: pointer;
}

.comment-reply-form .cancel-reply {
    padding: 8px 12px;
    font-size: 13px;
    color: #666;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    cursor: pointer;
}

/* レスポンシブ（コメント） */
@media (max-width: 768px) {
    .comment-item.comment-reply {
        margin-left: 20px;
    }
    
    .comment-content,
    .comment-footer {
        padding-left: 0 !important;
    }
    
    .comment-replies .comment-content,
    .comment-replies .comment-footer {
        padding-left: 0 !important;
    }
    
    .comment-reply-form {
        margin-left: 0;
    }
}

/* ========================================
   投稿アクションメニュー（三点メニュー）
   ======================================== */

/* 投稿ヘッダー（投稿者情報 + メニューを横並び） */
.main .board-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

/* アクションメニューコンテナ */
.main .post-action-menu {
    position: relative;
}

/* 三点トリガーボタン */
.main .action-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #666;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.main .action-menu-trigger:hover {
    color: #333;
    background: #f5f5f5;
}

.main .action-menu-trigger svg {
    width: 20px;
    height: 20px;
}

/* ドロップダウンメニュー */
.main .action-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 140px;
    padding: 8px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.main .action-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* メニューアイテム */
.main .action-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.main .action-menu-item:hover {
    background: #f5f5f5;
}

.main .action-menu-item svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #666;
}

/* 削除ボタン（赤色） */
.main .action-menu-item.delete-post-btn:hover {
    color: #dc3545;
    background: #fff5f5;
}

.main .action-menu-item.delete-post-btn:hover svg {
    color: #dc3545;
}

/* 共有モーダル */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.share-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.share-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 360px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.share-modal-overlay.show .share-modal {
    transform: scale(1);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.share-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.share-modal-close:hover {
    background: #f5f5f5;
}

.share-options {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    text-decoration: none;
    color: #333;
}

.share-option:hover {
    background: #f5f5f5;
}

.share-option-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
}

.share-option-icon.twitter {
    background: #1DA1F2;
    color: #fff;
}

.share-option-icon.copy {
    background: #e5e5e5;
    color: #333;
}

.share-option span {
    font-size: 12px;
    color: #666;
}

/* コピー成功通知 */
.copy-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 削除確認モーダル */
.delete-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.delete-confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.delete-confirm-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.delete-confirm-content h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #333;
}

.delete-confirm-content p {
    margin: 0 0 24px;
    color: #666;
    font-size: 14px;
}

.delete-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.delete-confirm-actions button {
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-delete {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
}

.btn-cancel-delete:hover {
    background: #e5e5e5;
}

.btn-confirm-delete {
    background: #dc3545;
    border: none;
    color: #fff;
}

.btn-confirm-delete:hover {
    background: #c82333;
}

/* ========================================
   コメントアクションメニュー
   ======================================== */

/* コメントヘッダーを flex に */
.main .comment-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.main .comment-author-info {
    flex: 1;
}

/* コメントメニューコンテナ */
.main .comment-action-menu {
    position: relative;
    margin-left: auto;
}

/* 三点トリガーボタン */
.main .comment-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: #999;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
}

.main .comment-item:hover .comment-menu-trigger {
    opacity: 1;
}

.main .comment-menu-trigger:hover {
    color: #666;
    background: #f0f0f0;
}

.main .comment-menu-trigger svg {
    width: 16px;
    height: 16px;
}

/* ドロップダウンメニュー */
.main .comment-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 100px;
    padding: 6px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
    z-index: 100;
}

.main .comment-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* メニューアイテム */
.main .comment-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    white-space: nowrap;
}

.main .comment-menu-item:hover {
    background: #f5f5f5;
}

.main .comment-menu-item svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: #666;
}

/* 削除ボタン（赤色） */
.main .comment-menu-item.delete-comment-btn:hover {
    color: #dc3545;
    background: #fff5f5;
}

.main .comment-menu-item.delete-comment-btn:hover svg {
    color: #dc3545;
}

/* ========================================
   コメント行内編集
   ======================================== */

/* 編集フォーム */
.main .comment-edit-form {
    margin-top: 8px;
}

.main .comment-edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.main .comment-edit-textarea:focus {
    border-color: #009de0;
}

.main .comment-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}

.main .comment-edit-actions button {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.main .btn-cancel-edit {
    color: #666;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.main .btn-cancel-edit:hover {
    background: #e5e5e5;
}

.main .btn-save-edit {
    color: #fff;
    background: #009de0;
    border: none;
}

.main .btn-save-edit:hover {
    background: #0088c7;
}

.main .btn-save-edit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 編集中の状態 */
.main .comment-item.editing .comment-text {
    display: none;
}

.main .comment-item.editing .comment-edit-form {
    display: block !important;
}

/* 編集済みマーク */
.main .comment-edited-mark {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
}

/* ========================================
   トースト通知メッセージ
   ======================================== */
.board-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.board-message.show {
    opacity: 1;
    transform: translateX(0);
}

.board-message-success {
    background: #10B981;
    color: white;
}

.board-message-error {
    background: #EF4444;
    color: white;
}

.board-message-info {
    background: #3B82F6;
    color: white;
}

/* 非表示コメント（管理者のみ表示） */
.comment-item.comment-hidden {
    opacity: 0.6;
    background: #fff5f5;
    border-left: 3px solid #EF4444;
}

.comment-hidden-badge {
    display: inline-block;
    background: #EF4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ========================================
   ログイン要求モーダル
   ======================================== */
.login-required-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-required-modal.show {
    opacity: 1;
    visibility: visible;
}

.login-required-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.login-required-modal.show .login-required-content {
    transform: translateY(0);
}

.login-required-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.login-required-close:hover {
    color: #333;
}

.login-required-title {
    font-size: 16px;
    color: #333;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.login-required-subtitle {
    font-size: 16px;
    color: #333;
    margin: 0 0 24px 0;
    font-weight: 500;
}

.login-required-register-btn {
    display: inline-block;
    background: #1DA1F2;
    color: #fff;
    padding: 12px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s;
}

.login-required-register-btn:hover {
    background: #0d8ddb;
    color: #fff;
    text-decoration: none;
}

.login-required-login-link {
    margin-top: 16px;
    font-size: 14px;
}

.login-required-login-link a {
    color: #1DA1F2;
    text-decoration: none;
}

.login-required-login-link a:hover {
    text-decoration: underline;
}

/* 未ログイン時のボタンスタイル（disabledの代わり） */
.reaction-btn.requires-login {
    opacity: 0.6;
    cursor: pointer;
}

.reaction-btn.requires-login:hover {
    opacity: 0.8;
}

/* コメント投稿ログインプロンプト */
.comment-login-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #1DA1F2;
    margin-top: 20px;
}

.comment-login-prompt svg {
    color: #1DA1F2;
    flex-shrink: 0;
}

.comment-login-prompt p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.comment-login-prompt .login-link {
    color: #1DA1F2;
    text-decoration: none;
    font-weight: 500;
    margin: 0 4px;
    transition: color 0.2s;
}

.comment-login-prompt .login-link:hover {
    color: #0d8ddb;
    text-decoration: underline;
}

/* 管理者権限設定/解除ボタン（プロフィール編集ボタンと同じスタイル） */
.main .btn-toggle-admin {
    display: inline-block !important;
    padding: 8px 20px !important;
    font-size: 14px !important;
    color: #009de0 !important;
    background: transparent !important;
    border: 1px solid #009de0 !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
    cursor: pointer !important;
    margin-top: 10px !important;
}

.main .btn-toggle-admin:hover {
    color: #fff !important;
    background: #009de0 !important;
}

/* 解除ボタンの場合は赤色 */
.main .btn-toggle-admin.btn-remove-admin {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.main .btn-toggle-admin.btn-remove-admin:hover {
    color: #fff !important;
    background: #dc3545 !important;
}

.main .btn-toggle-admin:disabled,
.main .btn-toggle-admin.processing {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}