/* ===== 韓つぶ CSS — Young K-Culture Design ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6C5CE7;
  --primary-dark: #5A4BD1;
  --primary-light: #A29BFE;
  --accent: #E84393;
  --accent-light: #FD79A8;
  --bg: #FAFAFA;
  --white: #fff;
  --text: #1A1A2E;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 16px rgba(108,92,231,0.15);
  --transition: 0.2s ease;
}

html { font-size: 15px; }

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.main-content { flex: 1; padding: 24px 0; }

/* ===== ヘッダー ===== */
.site-header { background: var(--white); border-bottom: 3px solid var(--primary); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.header-top { display: flex; align-items: center; padding: 10px 0; gap: 16px; flex-wrap: wrap; }

.site-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.logo-icon { font-size: 32px; }
.logo-text { font-size: 26px; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; }
.logo-sub { font-size: 11px; color: var(--text-light); display: none; }

.header-search { flex: 1; max-width: 360px; }
.search-form { display: flex; }
.search-input { flex: 1; padding: 10px 16px; border: 2px solid var(--border); border-radius: var(--radius-pill) 0 0 var(--radius-pill); font-size: 14px; outline: none; transition: border-color var(--transition); }
.search-input:focus { border-color: var(--primary-light); }
.search-btn { padding: 10px 20px; background: var(--primary); color: #fff; border: none; border-radius: 0 var(--radius-pill) var(--radius-pill) 0; cursor: pointer; font-size: 14px; font-weight: 500; transition: background var(--transition); }
.search-btn:hover { background: var(--primary-dark); }

.header-user { display: flex; align-items: center; gap: 8px; }
.user-info { display: flex; align-items: center; gap: 10px; }
.user-link { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 500; }
.user-badge { font-size: 20px; }
.user-level { font-size: 12px; color: var(--text-light); background: var(--bg); padding: 2px 6px; border-radius: var(--radius-pill); }
.btn-header { padding: 8px 18px; border-radius: var(--radius-pill); font-size: 14px; border: 2px solid var(--border); color: var(--text); font-weight: 500; transition: all var(--transition); }
.btn-header:hover { background: var(--bg); text-decoration: none; border-color: var(--primary-light); }
.btn-register { background: var(--primary); color: #fff !important; border-color: var(--primary); }
.btn-register:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-logout { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: none; cursor: pointer; font-size: 12px; color: var(--text-light); transition: all var(--transition); }
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }
.logout-form { display: inline; }

/* ハンバーガーメニュー */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; width: 44px; height: 44px; position: relative; }
.menu-icon { display: block; width: 22px; height: 2px; background: var(--text); position: relative; transition: background var(--transition); }
.menu-icon::before, .menu-icon::after { content: ''; display: block; width: 22px; height: 2px; background: var(--text); position: absolute; left: 0; transition: transform var(--transition); }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

.category-nav { border-top: 1px solid var(--border); }
.nav-list { display: flex; list-style: none; overflow-x: auto; gap: 4px; padding: 8px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav-list::-webkit-scrollbar { display: none; }
.nav-item a { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: var(--radius-pill); font-size: 14px; color: var(--text); white-space: nowrap; font-weight: 500; transition: all var(--transition); min-height: 44px; }
.nav-item a:hover { background: rgba(108,92,231,0.08); color: var(--primary); text-decoration: none; }
.nav-item.active a { background: var(--primary); color: #fff; }
.nav-icon { font-size: 20px; }

/* ===== フッター ===== */
.site-footer { background: #1A1A2E; color: #D1D5DB; padding: 40px 0 20px; margin-top: 48px; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-section h4 { margin-bottom: 10px; font-size: 14px; color: #fff; font-weight: 600; }
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 6px; }
.footer-section a { color: #9CA3AF; font-size: 13px; transition: color var(--transition); }
.footer-section a:hover { color: var(--primary-light); }
.footer-bottom { text-align: center; margin-top: 32px; padding-top: 20px; border-top: 1px solid #2D2D44; font-size: 12px; color: #6B7280; }

/* ===== ボタン ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: var(--radius); border: none; cursor: pointer; font-size: 14px; font-weight: 600; text-align: center; text-decoration: none; transition: all var(--transition); min-height: 44px; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(108,92,231,0.25); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(108,92,231,0.35); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; min-height: 36px; }
.btn-lg { padding: 14px 36px; font-size: 16px; min-height: 48px; }
.btn-block { display: flex; width: 100%; }

/* ===== トップページ ===== */
.notice-bar { background: linear-gradient(135deg, rgba(108,92,231,0.06), rgba(232,67,147,0.06)); border: 1px solid rgba(108,92,231,0.15); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 20px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.notice-label { font-weight: 700; margin-right: 8px; color: var(--primary); white-space: nowrap; }
.notice-text { font-size: 14px; }
.notice-more { font-size: 13px; color: var(--primary); white-space: nowrap; margin-left: auto; font-weight: 500; }
.notice-more:hover { text-decoration: underline; }

/* ===== お知らせページ ===== */
.announcements-page { max-width: 800px; margin: 0 auto; }
.announcement-list { margin-bottom: 20px; }
.announcement-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 10px; transition: box-shadow var(--transition); }
.announcement-item:hover { box-shadow: var(--shadow-hover); }
.announcement-item.pinned { border-left: 4px solid var(--accent); }
.announcement-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.announcement-pin { color: var(--accent); font-weight: 600; }
.announcement-category { padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.announcement-cat-general { background: rgba(108,92,231,0.1); color: var(--primary); }
.announcement-cat-maintenance { background: rgba(232,67,147,0.1); color: var(--accent); }
.announcement-cat-update { background: rgba(0,206,201,0.1); color: #00b894; }
.announcement-date { color: var(--text-light); }
.announcement-title { font-size: 15px; font-weight: 600; }
.announcement-title a { color: var(--text); }
.announcement-title a:hover { color: var(--primary); }
.no-announcements { color: var(--text-light); text-align: center; padding: 40px; background: var(--white); border-radius: var(--radius); }
.announcement-detail { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.announcement-detail-header { padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--bg); }
.announcement-detail-title { font-size: 20px; line-height: 1.5; margin-top: 8px; }
.announcement-detail-body { padding: 24px; line-height: 1.8; word-break: break-word; }
.announcement-detail-footer { padding: 16px 24px; border-top: 1px solid var(--border); }

.index-main { display: flex; gap: 24px; }
.sidebar { width: 300px; flex-shrink: 0; }
.main-area { flex: 1; min-width: 0; }

.sidebar-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; transition: box-shadow var(--transition); }
.sidebar-section:hover { box-shadow: var(--shadow-hover); }
.sidebar-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.sidebar-category { margin-bottom: 14px; }
.category-label { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.category-label a { color: var(--text); }
.category-label a:hover { color: var(--primary); }
.new-thread-list { list-style: none; padding-left: 8px; }
.new-thread-list li { font-size: 13px; padding: 4px 0; display: flex; justify-content: space-between; align-items: center; }
.new-thread-list a { color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color var(--transition); }
.new-thread-list a:hover { color: var(--primary); }
.comment-badge { background: var(--accent); color: #fff; border-radius: var(--radius-pill); padding: 2px 8px; font-size: 11px; font-weight: 600; margin-left: 6px; flex-shrink: 0; }
.new-thread-list .empty { color: var(--text-light); font-style: italic; }

.ranking-list { list-style: none; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.rank-num { width: 28px; height: 28px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.rank-1 .rank-num { background: linear-gradient(135deg, #f1c40f, #f39c12); color: #fff; }
.rank-2 .rank-num { background: linear-gradient(135deg, #bdc3c7, #95a5a6); color: #fff; }
.rank-3 .rank-num { background: linear-gradient(135deg, #e67e22, #cd7f32); color: #fff; }
.rank-stats { font-size: 12px; color: var(--text-light); flex-shrink: 0; }
.ranking-list .empty { color: var(--text-light); font-style: italic; }

/* ===== スレッド一覧 ===== */
.list-controls { margin-bottom: 16px; }
.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.list-title { font-size: 18px; font-weight: 700; }
.filter-bar { display: flex; align-items: center; gap: 8px; }
.filter-form { display: flex; align-items: center; gap: 8px; }
.filter-select { padding: 8px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--white); transition: border-color var(--transition); min-height: 40px; }
.filter-select:focus { border-color: var(--primary-light); outline: none; }
.total-count { font-size: 13px; color: var(--text-light); font-weight: 500; }

.subcategory-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sub-tab { padding: 6px 16px; border-radius: var(--radius-pill); font-size: 13px; border: 2px solid var(--border); color: var(--text); font-weight: 500; transition: all var(--transition); min-height: 36px; display: inline-flex; align-items: center; }
.sub-tab:hover { border-color: var(--primary-light); color: var(--primary); text-decoration: none; }
.sub-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.thread-table { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.thread-row { display: flex; align-items: center; padding: 12px 18px; border-bottom: 1px solid #F3F4F6; gap: 14px; transition: background var(--transition); }
.thread-row:hover { background: rgba(108,92,231,0.02); }
.thread-row.even { background: #FAFBFC; }
.thread-row.even:hover { background: rgba(108,92,231,0.04); }
.thread-header { background: #F9FAFB; font-weight: 600; font-size: 13px; color: var(--text-light); }
.thread-header:hover { background: #F9FAFB; }
.th-category, .td-category { width: 120px; flex-shrink: 0; }
.th-title, .td-title { flex: 1; min-width: 0; }
.th-comments, .td-comments { width: 70px; text-align: center; flex-shrink: 0; font-size: 13px; }
.th-views, .td-views { width: 50px; text-align: center; flex-shrink: 0; font-size: 13px; }
.th-time, .td-time { width: 80px; text-align: right; flex-shrink: 0; font-size: 12px; color: var(--text-light); }
.th-no, .td-no { width: 40px; text-align: center; flex-shrink: 0; font-size: 13px; }

.cat-badge { font-size: 12px; padding: 3px 8px; background: rgba(108,92,231,0.08); border-radius: var(--radius-pill); color: var(--primary-dark); font-weight: 500; }
.thread-link { color: var(--text); font-weight: 600; font-size: 15px; }
.thread-link:hover { color: var(--primary); }
.author-badge { font-size: 12px; color: var(--accent); margin-left: 6px; font-weight: 500; }
.sub-badge { font-size: 11px; color: var(--text-light); background: #F3F4F6; padding: 2px 6px; border-radius: var(--radius-pill); margin-left: 4px; }
.empty-row { justify-content: center; color: var(--text-light); padding: 48px; font-size: 15px; }

/* ===== ページネーション ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.page-link { padding: 8px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--text); font-weight: 500; transition: all var(--transition); min-height: 40px; display: inline-flex; align-items: center; }
.page-link:hover { background: rgba(108,92,231,0.06); border-color: var(--primary-light); text-decoration: none; }
.page-link.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-dots { padding: 8px 4px; color: var(--text-light); }

.bottom-actions { text-align: center; margin-top: 28px; }

/* ===== スレッド詳細 ===== */
.breadcrumb { font-size: 13px; color: var(--text-light); margin-bottom: 16px; padding: 8px 0; }
.breadcrumb a { color: var(--primary); }

/* パンくずリストナビ（layout共通） */
nav.breadcrumb { background: var(--white); border-bottom: 1px solid var(--border); margin-bottom: 0; padding: 10px 0; }
.breadcrumb-list { display: flex; flex-wrap: wrap; list-style: none; gap: 4px; font-size: 13px; color: var(--text-light); }
.breadcrumb-list li::after { content: '>'; margin-left: 4px; color: var(--text-light); }
.breadcrumb-list li:last-child::after { content: ''; }
.breadcrumb-list li a { color: var(--primary); text-decoration: none; }
.breadcrumb-list li a:hover { text-decoration: underline; }

.thread-detail { margin-bottom: 28px; }
.thread-header-detail { margin-bottom: 16px; }
.thread-title { font-size: 22px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.thread-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-light); }

.thread-body-card, .comment-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 12px; transition: box-shadow var(--transition); }
.thread-body-card:hover, .comment-card:hover { box-shadow: var(--shadow-hover); }
.post-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #F3F4F6; }
.post-number { background: var(--primary); color: #fff; padding: 2px 10px; border-radius: var(--radius-pill); font-weight: 700; font-size: 12px; }
.registered-user { color: var(--primary); font-weight: 600; }
.anon-user { color: var(--success); font-weight: 500; }
.level-badge { font-size: 11px; background: rgba(108,92,231,0.1); color: var(--primary-dark); padding: 2px 6px; border-radius: var(--radius-pill); font-weight: 600; }
.trip { color: #9b59b6; font-size: 12px; }
.post-id { color: var(--text-light); font-size: 12px; }
.post-wacchoi { color: #e67e22; font-size: 12px; }
.post-host { color: var(--text-light); font-size: 11px; }
.post-time { color: var(--text-light); font-size: 12px; margin-left: auto; }
.post-body { line-height: 1.8; word-break: break-word; font-size: 15px; }
.post-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #F3F4F6; flex-wrap: wrap; }

.btn-reaction, .btn-report, .btn-delete-request { padding: 8px 14px; border: 2px solid var(--border); border-radius: var(--radius-pill); background: none; cursor: pointer; font-size: 13px; color: var(--text-light); transition: all var(--transition); min-height: 36px; display: inline-flex; align-items: center; gap: 4px; }
.btn-reaction:hover { background: rgba(108,92,231,0.06); border-color: var(--primary-light); color: var(--primary); }
.btn-reaction.reacted { background: rgba(108,92,231,0.08); border-color: var(--primary); color: var(--primary); }
.btn-report:hover { background: rgba(249,115,22,0.06); border-color: #F97316; color: #F97316; }
.btn-delete-request:hover { background: rgba(239,68,68,0.06); border-color: var(--danger); color: var(--danger); }
.count { font-weight: 600; }

.delete-section { background: rgba(249,115,22,0.06); border: 2px solid rgba(249,115,22,0.2); border-radius: var(--radius); padding: 14px 18px; margin-top: 12px; }
.delete-notice { font-size: 12px; color: var(--text-light); margin-top: 8px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.input-sm { padding: 8px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; width: 200px; transition: border-color var(--transition); }
.input-sm:focus { border-color: var(--primary-light); outline: none; }

/* ===== コメントセクション ===== */
.comments-section { margin-bottom: 24px; }
.section-title { font-size: 18px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.no-comments { color: var(--text-light); text-align: center; padding: 32px; }

/* ===== フォーム ===== */
.form-page, .auth-page { max-width: 600px; margin: 0 auto; }
.auth-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; }
.auth-title { text-align: center; margin-bottom: 28px; font-size: 24px; font-weight: 700; }
.auth-links { text-align: center; margin-top: 20px; font-size: 14px; }
.auth-info { font-size: 13px; color: var(--text-light); margin-top: 6px; }

.page-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.required { color: var(--accent); }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; transition: border-color var(--transition); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-hint { display: block; font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-row { display: flex; gap: 16px; }
.form-group.half { flex: 1; }
.form-fieldset { border: 2px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.form-fieldset legend { font-weight: 600; padding: 0 8px; color: var(--text); }
.form-notice { background: rgba(108,92,231,0.04); border: 1px solid rgba(108,92,231,0.12); border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; font-size: 13px; }
.form-notice p { margin-bottom: 4px; }
.create-form, .comment-form, .auth-form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }

.checkbox-group { margin-bottom: 10px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.policy-summary { background: #F9FAFB; border-radius: var(--radius-sm); padding: 14px; margin-top: 12px; font-size: 13px; }
.policy-summary h4 { margin-bottom: 8px; font-weight: 600; }
.policy-summary ul { padding-left: 20px; }
.policy-summary li { margin-bottom: 4px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.alert-danger { background: rgba(239,68,68,0.08); border: 2px solid rgba(239,68,68,0.2); color: var(--danger); }

/* ===== マイページ ===== */
.profile-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 20px; }
.profile-header { display: flex; align-items: center; gap: 20px; }
.profile-badge { font-size: 52px; }
.profile-stats { display: flex; gap: 16px; margin-top: 6px; }
.stat { font-size: 14px; }
.progress-bar { height: 10px; background: #E5E7EB; border-radius: var(--radius-pill); overflow: hidden; margin-top: 10px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: var(--radius-pill); transition: width 0.3s; }
.progress-text { font-size: 13px; color: var(--text-light); margin-top: 6px; }
.max-level { color: var(--warning); font-weight: 600; margin-top: 8px; }
.profile-meta { font-size: 13px; color: var(--text-light); margin-top: 14px; padding-top: 14px; border-top: 1px solid #F3F4F6; }

.info-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.info-card h3 { margin-bottom: 12px; }
.rules-table { width: 100%; font-size: 14px; }
.rules-table td { padding: 6px 12px; border-bottom: 1px solid #f0f0f0; }
.points-plus { color: var(--success); font-weight: 500; text-align: right; }
.points-minus { color: var(--danger); font-weight: 500; text-align: right; }

.mypage-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.mypage-section h3 { margin-bottom: 12px; }
.my-list { list-style: none; }
.my-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.my-list li.deleted a { color: var(--text-light); text-decoration: line-through; }
.my-meta { font-size: 12px; color: var(--text-light); margin-left: 8px; }
.deleted-badge { background: var(--danger); color: #fff; padding: 1px 6px; border-radius: 3px; font-size: 11px; }
.comment-preview { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.empty-text { color: var(--text-light); font-style: italic; }

.history-table { width: 100%; font-size: 14px; border-collapse: collapse; }
.history-table th { text-align: left; padding: 8px; border-bottom: 2px solid var(--border); font-size: 13px; }
.history-table td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; }

/* ===== 検索ページ ===== */
.search-form-full { margin-bottom: 20px; }
.search-form-full .form-row { display: flex; gap: 8px; align-items: center; }

/* ===== リリースノートページ ===== */
.release-notes-page h2 { border-left: 4px solid var(--accent); padding-left: 10px; }
.release-notes-page h3 { color: #333; }
.release-notes-page hr { border: none; border-top: 2px solid #e0e0e0; margin: 24px 0; }
.release-notes-page li { margin-bottom: 4px; list-style-type: disc; margin-left: 20px; }
.release-notes-page pre { background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: var(--radius); padding: 12px; overflow-x: auto; font-size: 13px; margin: 10px 0; }
.release-notes-page code { background: #f0f0f0; padding: 1px 4px; border-radius: 3px; font-size: 13px; }
.release-notes-page pre code { background: none; padding: 0; }
.release-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.release-table th { background: #f0f4f8; text-align: left; padding: 8px 12px; border: 1px solid var(--border); font-weight: 600; }
.release-table td { padding: 6px 12px; border: 1px solid #eee; }
.release-table tr:nth-child(even) td { background: #fafbfc; }
.search-input-lg { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 15px; }
.search-info { margin-bottom: 16px; font-size: 14px; }

/* ===== エラーページ ===== */
.error-page { text-align: center; padding: 60px 0; }
.error-page h1 { font-size: 28px; margin-bottom: 16px; }
.error-page p { margin-bottom: 24px; color: var(--text-light); }

/* ===== 静的ページ ===== */
.static-page { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; max-width: 800px; margin: 0 auto; }
.static-page h1 { font-size: 24px; margin-bottom: 8px; }
.static-page h2 { font-size: 18px; margin: 24px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.static-page p, .static-page li { font-size: 14px; line-height: 1.8; }
.static-page ul { padding-left: 24px; margin-bottom: 12px; }

/* ===== レベルアップガイドページ ===== */
.guide-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.guide-table th { background: var(--bg); text-align: left; padding: 10px 12px; border: 1px solid var(--border); font-weight: 600; color: var(--primary); }
.guide-table td { padding: 10px 12px; border: 1px solid var(--border); }
.guide-table tbody tr:nth-child(even) { background: #fafafa; }
.guide-table .badge-cell { font-size: 1.4rem; text-align: center; }
.point-positive { color: var(--success); font-weight: 700; }
.point-negative { color: var(--danger); font-weight: 700; }
.guide-note { font-size: 13px; color: #666; margin-top: 8px; }
.info-box { background: #fff3e0; border: 1px solid #ffcc80; border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.info-box h3 { margin: 0 0 8px; font-size: 16px; color: #e65100; }
.info-box p { margin-bottom: 6px; }
.info-box p:last-child { margin-bottom: 0; }
.tip-box { background: #e8f5e9; border: 1px solid #a5d6a7; border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.tip-box h3 { margin: 0 0 8px; font-size: 16px; color: var(--success); }
.tip-box ul { padding-left: 20px; margin: 8px 0 0; }
.tip-box li { margin-bottom: 4px; }
.manner-intro { background: var(--bg); padding: 16px; border-radius: var(--radius); margin-bottom: 20px; }
.faq-section { margin: 12px 0; }
.faq-section details { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.faq-section summary { padding: 12px 16px; cursor: pointer; font-weight: 600; background: #f5f5f5; }
.faq-section summary:hover { background: var(--bg); }
.faq-section details[open] summary { border-bottom: 1px solid var(--border); }
.faq-section details p { padding: 12px 16px; margin: 0; }
.cta-box { text-align: center; background: var(--bg); border-radius: var(--radius); padding: 24px; margin: 24px 0 0; }
.cta-box p { margin-bottom: 12px; font-size: 15px; font-weight: 600; }
.cta-box .btn { margin: 0 6px; }
.table-responsive { overflow-x: auto; }

/* ===== モーダル ===== */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; background: var(--white); border-radius: var(--radius); padding: 24px; max-width: 500px; width: 90%; z-index: 1; }
.modal-content h3 { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }

/* ===== 管理者ボタン ===== */
.btn-admin { background: var(--warning); color: var(--text) !important; border-color: var(--warning); font-weight: 600; }
.btn-admin:hover { background: #e08e0a; border-color: #e08e0a; }

/* ===== 管理画面 ===== */
.admin-page { max-width: 1200px; margin: 0 auto; }
.admin-header { margin-bottom: 24px; }
.admin-header h1 { font-size: 24px; margin-bottom: 12px; }

.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.admin-nav-link { padding: 8px 16px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-size: 14px; font-weight: 500; color: var(--text-light); transition: all var(--transition); }
.admin-nav-link:hover { background: rgba(108,92,231,0.06); color: var(--primary); text-decoration: none; }
.admin-nav-link.active { background: var(--primary); color: #fff; }

.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.admin-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; align-items: center; gap: 16px; }
.admin-card-alert { border-left: 4px solid var(--danger); }
.admin-card-icon { font-size: 36px; }
.admin-card-value { font-size: 28px; font-weight: 700; color: var(--text); }
.admin-card-label { font-size: 13px; color: var(--text-light); font-weight: 500; }
.admin-card-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 24px; }
.admin-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.admin-section h2 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.admin-section h3 { font-size: 14px; margin-bottom: 8px; }
.admin-more { font-size: 12px; color: var(--primary); margin-left: auto; font-weight: 400; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: #f0f4f8; text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--border); font-weight: 600; white-space: nowrap; }
.admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:hover { background: rgba(108,92,231,0.03); }
.admin-table a { font-weight: 500; }

.admin-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.admin-tab { padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--text-light); background: var(--bg); transition: all var(--transition); }
.admin-tab:hover { background: rgba(108,92,231,0.08); color: var(--primary); text-decoration: none; }
.admin-tab.active { background: var(--primary); color: #fff; }

.admin-filter { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.admin-input { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; min-width: 200px; }
.admin-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--white); }
.admin-count { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.admin-empty { color: var(--text-light); font-size: 14px; text-align: center; padding: 32px; }

.admin-alert { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; border-radius: var(--radius-sm); padding: 10px 16px; margin-bottom: 16px; font-size: 14px; }
.admin-alert-error { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }

.admin-pagination { display: flex; gap: 4px; justify-content: center; margin-top: 20px; }
.page-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text); background: var(--white); border: 1px solid var(--border); }
.page-link:hover { background: var(--bg); text-decoration: none; border-color: var(--primary-light); }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-dots { display: inline-flex; align-items: center; padding: 0 4px; color: var(--text-light); font-size: 14px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; }
.badge-thread { background: #e8f0fe; color: #1967d2; }
.badge-comment { background: #fce8e6; color: #c5221f; }
.badge-deleted { background: #f3e8fd; color: #7627bb; margin-left: 4px; }
.badge-count { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.badge-admin { background: #fff3cd; color: #856404; margin-left: 4px; }
.badge-banned { background: #f8d7da; color: #721c24; }
.badge-active { background: #d4edda; color: #155724; }
.badge-status-pending { background: #fff3cd; color: #856404; }
.badge-status-resolved, .badge-status-approved { background: #d4edda; color: #155724; }
.badge-status-rejected { background: #f8d7da; color: #721c24; }
.badge-status-reviewed { background: #cce5ff; color: #004085; }

.row-deleted td { opacity: 0.5; }
.row-banned td { background: #fff5f5; }
.row-admin td { background: #fffbeb; }

.inline-form { display: inline-flex; gap: 4px; align-items: center; }
.btn-sm { padding: 4px 12px; font-size: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white); cursor: pointer; font-weight: 500; transition: all var(--transition); }
.btn-sm:hover { background: var(--bg); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; }
.btn-muted { background: var(--bg); color: var(--text-light); }
.btn-muted:hover { background: #e5e7eb; }
.text-muted { color: var(--text-light); font-size: 12px; }

/* ===== レスポンシブ ===== */
@media (max-width: 1024px) {
  .sidebar { width: 260px; }
}

@media (max-width: 768px) {
  html { font-size: 14px; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .header-top { flex-wrap: wrap; padding: 8px 0; }
  .header-actions { display: none; width: 100%; flex-direction: column; gap: 8px; }
  .header-actions.open { display: flex; }
  .header-search { max-width: 100%; }
  .header-user { justify-content: center; }
  .category-nav { display: none; }
  .category-nav.open { display: block; }
  .index-main { flex-direction: column; }
  .sidebar { width: 100%; order: 1; }
  .main-area { order: 0; }
  .form-row { flex-direction: column; gap: 0; }
  .form-group.half { width: 100%; }
  .thread-row { flex-wrap: wrap; padding: 10px 14px; }
  .th-category, .td-category { display: none; }
  .th-views, .td-views { display: none; }
  .nav-list { gap: 2px; }
  .nav-item a { padding: 8px 12px; font-size: 13px; }
  .footer-links { flex-direction: column; gap: 20px; }
  .auth-card { padding: 24px 18px; }
  .create-form, .comment-form { padding: 18px; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-stats { justify-content: center; flex-wrap: wrap; }
  .thread-title { font-size: 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .header-inner { padding: 0 12px; }
  .logo-text { font-size: 22px; }
  .thread-row { padding: 10px 12px; gap: 8px; }
  .thread-link { font-size: 14px; }
  .th-time, .td-time { display: none; }
  .th-no, .td-no { display: none; }
  .post-header { gap: 4px; font-size: 12px; }
  .post-body { font-size: 14px; }
  .post-actions { gap: 4px; }
  .btn-reaction, .btn-report, .btn-delete-request { padding: 6px 10px; font-size: 12px; }
  .sidebar-section { padding: 14px; }
  .thread-body-card, .comment-card { padding: 14px; }
  .nav-item a { padding: 6px 10px; font-size: 12px; min-height: 38px; }
  .nav-icon { font-size: 16px; }
  .btn { padding: 10px 20px; font-size: 14px; }
  .btn-lg { padding: 12px 24px; }
}

/* ===== 管理画面レスポンシブ ===== */
@media (max-width: 768px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-nav { gap: 2px; }
  .admin-nav-link { padding: 6px 12px; font-size: 13px; }
  .admin-filter { flex-direction: column; }
  .admin-input { min-width: unset; width: 100%; }
}
@media (max-width: 480px) {
  .admin-cards { grid-template-columns: 1fr; }
  .admin-table { font-size: 12px; }
  .admin-table th, .admin-table td { padding: 6px 6px; }
}

/* ===== Cookie同意バナー ===== */
#cookie-consent-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; background: rgba(26,26,46,0.95); backdrop-filter: blur(8px); color: #fff; padding: 16px 20px; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); }
.cookie-consent-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cookie-consent-inner p { flex: 1; font-size: 13px; line-height: 1.6; min-width: 200px; }
.cookie-consent-inner a { color: var(--primary-light); }
.cookie-consent-buttons { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-consent-buttons .btn { padding: 8px 20px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 500; cursor: pointer; border: none; text-decoration: none; }
.cookie-consent-buttons .btn-primary { background: var(--primary); color: #fff; }
.cookie-consent-buttons .btn-primary:hover { background: var(--primary-dark); }
.cookie-consent-buttons .btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.cookie-consent-buttons .btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* ===== お問い合わせ・About ===== */
.contact-info { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 16px 0; }
.contact-email { font-size: 20px; font-weight: 700; }
.contact-email a { color: var(--primary); }
.info-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.info-table th, .info-table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.info-table th { background: var(--bg); font-weight: 500; width: 140px; }
.info-table a { color: var(--primary); }
