/* ============================================
   夜の告白 - Main Stylesheet
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-bg:         #0d0d12;
  --color-bg2:        #13131a;
  --color-bg3:        #1a1a24;
  --color-surface:    #1e1e2a;
  --color-surface2:   #252535;
  --color-border:     rgba(255,255,255,0.07);
  --color-primary:    #e0507a;
  --color-primary-h:  #f06090;
  --color-primary-d:  #c03060;
  --color-accent:     #9b59b6;
  --color-gold:       #d4a84b;
  --color-text:       #e8e8f0;
  --color-text-muted: #888899;
  --color-text-dim:   #555566;
  --font-body:        'Noto Sans JP', sans-serif;
  --font-display:     'Playfair Display', serif;
  --radius-sm:        6px;
  --radius-md:        12px;
  --radius-lg:        20px;
  --radius-xl:        32px;
  --shadow-sm:        0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:        0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:        0 20px 60px rgba(0,0,0,0.5);
  --shadow-glow:      0 0 30px rgba(224,80,122,0.25);
  --transition:       0.25s cubic-bezier(0.4,0,0.2,1);
  --max-width:        1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; display: block; }

::selection { background: rgba(224,80,122,0.3); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-primary-d); border-radius: 3px; }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-d));
  color: #fff;
  box-shadow: 0 4px 20px rgba(224,80,122,0.35);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-primary-h), var(--color-primary));
  box-shadow: 0 6px 28px rgba(224,80,122,0.5);
  transform: translateY(-1px);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid rgba(255,255,255,0.2);
}
.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(224,80,122,0.08);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
}
.btn--ghost:hover {
  color: var(--color-text);
  border-color: rgba(255,255,255,0.2);
}

.btn--lg { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn--sm { padding: 8px 16px; font-size: 0.85rem; }

/* ============================================
   AGE GATE
   ============================================ */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at center, #1a0a14 0%, #0a0a10 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.age-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.age-gate__box {
  text-align: center;
  max-width: 480px;
  padding: 60px 48px;
  background: var(--color-surface);
  border: 1px solid rgba(224,80,122,0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 80px rgba(224,80,122,0.1);
  animation: fadeInUp 0.6s ease;
}

.age-gate__logo {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.age-gate__notice {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.age-gate__notice strong { color: var(--color-text); }

.age-gate__question {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 24px 0 32px;
}

.age-gate__buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.age-gate__disclaimer {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  line-height: 1.6;
}
.age-gate__disclaimer a { color: var(--color-text-muted); text-decoration: underline; }

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0;
}
.header.scrolled {
  background: rgba(13,13,18,0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--color-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}

.header__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), #ff8fb0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon { -webkit-text-fill-color: var(--color-primary); }

.header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--color-text); background: rgba(255,255,255,0.06); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header.scrolled {
  background: rgba(13,13,18,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 24px;
  background: var(--color-bg2);
  border-top: 1px solid var(--color-border);
}
.mobile-menu a {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 1rem;
}
.mobile-menu a:hover { color: var(--color-text); background: rgba(255,255,255,0.06); }
.mobile-menu.open { display: flex; }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 72px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(224,80,122,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(155,89,182,0.1) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(224,80,122,0.06) 0%, transparent 50%);
}

.hero__particles {
  position: absolute;
  inset: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 80px 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(224,80,122,0.12);
  border: 1px solid rgba(224,80,122,0.25);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-bottom: 28px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease 0.2s both;
}
.hero__title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--color-primary), #ff9bb5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 32px;
  animation: fadeInUp 0.6s ease 0.5s both;
}

.stat { text-align: center; }
.stat__number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.stat__divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

.hero__scroll { display: none; }
.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-text-dim), transparent);
  animation: scrollPulse 2s ease infinite;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 96px 0;
}

.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  position: relative;
  padding-left: 20px;
}
.section__title::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
  border-radius: 2px;
}

.section__subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-top: 8px;
  padding-left: 20px;
}

.section__more {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}
.section__more:hover { color: var(--color-primary-h); text-decoration: underline; }

/* ============================================
   CATEGORIES
   ============================================ */
.categories-section { background: var(--color-bg2); }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.category-card {
  position: relative;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}

.category-card--couple::before  { background: linear-gradient(135deg, rgba(224,80,122,0.15), rgba(155,89,182,0.1)); }
.category-card--affair::before  { background: linear-gradient(135deg, rgba(155,89,182,0.15), rgba(52,73,94,0.2)); }
.category-card--first::before   { background: linear-gradient(135deg, rgba(255,154,162,0.15), rgba(224,80,122,0.1)); }
.category-card--encounter::before { background: linear-gradient(135deg, rgba(255,165,0,0.1), rgba(224,80,122,0.1)); }
.category-card--work::before    { background: linear-gradient(135deg, rgba(52,152,219,0.12), rgba(155,89,182,0.1)); }
.category-card--other::before   { background: linear-gradient(135deg, rgba(212,168,75,0.12), rgba(224,80,122,0.08)); }

.category-card:hover { transform: translateY(-4px); border-color: rgba(224,80,122,0.3); box-shadow: var(--shadow-md), var(--shadow-glow); }
.category-card:hover::before { opacity: 1; }

.category-card__icon {
  font-size: 1.5rem;
  display: block;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.category-card__title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  position: relative;
  z-index: 1;
  flex: 1;
}

.category-card__desc { display: none; }

.category-card__count {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 500;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  margin-left: auto;
}

/* ============================================
   POSTS GRID
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(224,80,122,0.25);
  box-shadow: var(--shadow-md), 0 0 20px rgba(224,80,122,0.1);
}

.post-card__header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.post-card__category {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(224,80,122,0.15);
  color: var(--color-primary);
  border: 1px solid rgba(224,80,122,0.2);
}

.post-card__new {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--color-primary);
  color: #fff;
  letter-spacing: 0.05em;
}

.post-card__body {
  padding: 0 24px;
  flex: 1;
}

.post-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card:hover .post-card__title { color: var(--color-primary-h); }

.post-card__excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 20px;
}

.post-card__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

.post-card__meta span { display: flex; align-items: center; gap: 4px; }

.post-card__read {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 500;
}

/* ============================================
   POPULAR LIST
   ============================================ */
.popular-section { background: var(--color-bg2); }

.popular-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.popular-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
  cursor: pointer;
}
.popular-item:last-child { border-bottom: none; }
.popular-item:hover { background: var(--color-surface2); }

.popular-item__rank {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-text-dim);
  width: 36px;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.popular-item:nth-child(1) .popular-item__rank { color: var(--color-gold); }
.popular-item:nth-child(2) .popular-item__rank { color: #aaa; }
.popular-item:nth-child(3) .popular-item__rank { color: #cd7f32; }

.popular-item__content { flex: 1; min-width: 0; }

.popular-item__title {
  font-size: 0.975rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.popular-item:hover .popular-item__title { color: var(--color-primary-h); }

.popular-item__meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

.popular-item__stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  padding: 80px 0;
}

.cta-banner {
  background: var(--color-surface);
  border: 1px solid rgba(224,80,122,0.2);
  border-radius: var(--radius-xl);
  padding: 64px 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 100% 50%, rgba(224,80,122,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner__content { flex: 1; position: relative; z-index: 1; }

.cta-banner__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: rgba(224,80,122,0.15);
  border: 1px solid rgba(224,80,122,0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.cta-banner__title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 16px;
}

.cta-banner__desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

.cta-banner__visual {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}
.cta-visual-circle {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(224,80,122,0.25);
  animation: rotateSlow linear infinite;
}
.cta-visual-circle.c1 { inset: 0; animation-duration: 20s; }
.cta-visual-circle.c2 { inset: 20px; animation-duration: 15s; animation-direction: reverse; border-color: rgba(155,89,182,0.2); }
.cta-visual-circle.c3 { inset: 40px; animation-duration: 25s; border-color: rgba(224,80,122,0.15); }
.cta-visual-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 3rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   TAG CLOUD
   ============================================ */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.875rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.tag:hover {
  background: rgba(224,80,122,0.12);
  border-color: rgba(224,80,122,0.3);
  color: var(--color-primary);
  transform: translateY(-2px);
}
.tag--hot {
  background: rgba(224,80,122,0.1);
  border-color: rgba(224,80,122,0.2);
  color: var(--color-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-bg2);
  border-top: 1px solid var(--color-border);
  padding: 72px 0 0;
}

.footer__inner {
  display: flex;
  gap: 80px;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

.footer__brand { flex: 1; min-width: 200px; }

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), #ff9bb5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.footer__tagline {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.footer__age-notice {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  padding: 8px 14px;
  background: rgba(224,80,122,0.08);
  border: 1px solid rgba(224,80,122,0.15);
  border-radius: var(--radius-sm);
  display: inline-block;
}

.footer__links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 120px;
}
.footer__col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.footer__col a {
  font-size: 0.875rem;
  color: var(--color-text-dim);
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--color-text); }

.footer__bottom {
  border-top: 1px solid var(--color-border);
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom p {
  font-size: 0.8rem;
  color: var(--color-text-dim);
}
.footer__disclaimer {
  text-align: right;
  max-width: 460px;
  line-height: 1.5;
}

/* ============================================
   POSTS PAGE
   ============================================ */
.page-header {
  padding: 140px 0 60px;
  background: var(--color-bg2);
  border-bottom: 1px solid var(--color-border);
}
.page-header__title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.page-header__subtitle { color: var(--color-text-muted); }

.posts-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  padding: 60px 0 96px;
  align-items: start;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(224,80,122,0.08);
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-list-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: all var(--transition);
  cursor: pointer;
}
.post-list-item:hover {
  border-color: rgba(224,80,122,0.25);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}
.post-list-item__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.post-list-item__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.5;
}
.post-list-item:hover .post-list-item__title { color: var(--color-primary-h); }
.post-list-item__excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-list-item__meta {
  display: flex;
  gap: 20px;
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

/* Sidebar */
.sidebar { position: sticky; top: 100px; }
.sidebar-widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.sidebar-widget__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================
   POST DETAIL
   ============================================ */
.post-detail {
  padding: 140px 0 96px;
}
.post-detail__layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.article {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.article__header {
  padding: 48px 56px 40px;
  border-bottom: 1px solid var(--color-border);
}

.article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.article__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 20px;
}

.article__stats {
  display: flex;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

.article__body {
  padding: 48px 56px;
  font-size: 1rem;
  line-height: 2;
  color: var(--color-text);
}
.article__body p { margin-bottom: 24px; }

.article__footer {
  padding: 28px 56px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Comments */
.comments {
  margin-top: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.comments__header {
  padding: 32px 40px;
  border-bottom: 1px solid var(--color-border);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.comment-item {
  padding: 24px 40px;
  border-bottom: 1px solid var(--color-border);
}
.comment-item:last-child { border-bottom: none; }
.comment-item__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.comment-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.comment-item__name { font-size: 0.9rem; font-weight: 600; color: var(--color-text); }
.comment-item__date { font-size: 0.8rem; color: var(--color-text-dim); }
.comment-item__body { font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.7; }

.comment-form { padding: 28px 40px; background: var(--color-bg2); }
.comment-form__title { font-size: 0.9rem; font-weight: 600; color: var(--color-text); margin-bottom: 16px; }

/* ============================================
   SUBMIT FORM
   ============================================ */
.submit-page {
  padding: 140px 0 96px;
}
.submit-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
}

.form-group { margin-bottom: 28px; }
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
}
.form-label span { color: var(--color-primary); margin-left: 4px; }
.form-hint { font-size: 0.8rem; color: var(--color-text-dim); margin-top: 6px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(224,80,122,0.12);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-dim);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888899' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}
.form-select option { background: var(--color-bg2); }

.form-textarea { resize: vertical; min-height: 280px; line-height: 1.8; }

.char-count {
  text-align: right;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  margin-top: 6px;
}
.char-count.over { color: var(--color-primary); }

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.form-checkbox span { font-size: 0.875rem; color: var(--color-text-muted); line-height: 1.6; }
.form-checkbox a { color: var(--color-primary); }

.submit-btn-wrap { text-align: center; margin-top: 40px; }

/* Submit sidebar */
.submit-guide {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.guide-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.guide-card__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.guide-card__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}
.guide-card__list li {
  display: flex;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.guide-card__list li::before {
  content: '✓';
  color: var(--color-primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.1); }
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes particle-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50%       { transform: translateY(-20px) scale(1.1); opacity: 0.6; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid      { grid-template-columns: repeat(2, 1fr); }
  .posts-layout    { grid-template-columns: 1fr; }
  .sidebar         { position: static; }
  .post-detail__layout { grid-template-columns: 1fr; }
  .submit-layout   { grid-template-columns: 1fr; }
  .submit-guide    { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
  .cta-banner      { padding: 48px; }
  .footer__inner   { gap: 48px; }
}

@media (max-width: 768px) {
  .header__nav { display: none; }
  .hamburger   { display: flex; }
  .header__actions .btn-primary { font-size: 0.8rem; padding: 8px 14px; }
  .header__inner { gap: 8px; }

  .hero__content { max-width: 100%; padding: 60px 0; }
  .hero__title   { font-size: 2rem; }
  .hero__stats   { gap: 20px; }
  .hero__scroll  { display: none; }
  .stat__number  { font-size: 1.4rem; }

  .categories-grid { grid-template-columns: 1fr; }
  .posts-grid      { grid-template-columns: 1fr; }

  .section       { padding: 64px 0; }
  .section__header { flex-direction: column; align-items: flex-start; }

  .cta-banner        { flex-direction: column; padding: 40px 32px; }
  .cta-banner__visual { display: none; }
  .cta-banner__title  { font-size: 1.5rem; }

  .footer__inner   { flex-direction: column; gap: 40px; }
  .footer__links   { gap: 32px; }
  .footer__bottom  { flex-direction: column; text-align: center; }
  .footer__disclaimer { text-align: center; }

  .article__header { padding: 32px; }
  .article__body   { padding: 32px; }
  .article__footer { padding: 20px 32px; }

  .form-card { padding: 32px 28px; }
  .submit-guide { grid-template-columns: 1fr; }

  .age-gate__box { padding: 40px 28px; margin: 20px; }

  .popular-item { flex-wrap: wrap; }
  .popular-item__stats { width: 100%; justify-content: flex-end; }
}

/* ============================================
   BBS (掲示板) スタイル
   ============================================ */

/* --- 掲示板ヘッダー --- */
.bbs-header {
  padding: 100px 0 0;
  background: var(--color-bg2);
}

.bbs-header__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 0;
  flex-wrap: wrap;
  gap: 12px;
}

.bbs-board-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bbs-board-name .bbs-board-icon {
  font-size: 1.2rem;
}

.bbs-board-desc {
  font-size: 0.82rem;
  color: var(--color-text-dim);
  margin-top: 4px;
}

.bbs-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-top: 20px;
  overflow-x: auto;
}

.bbs-tab {
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-body);
  text-decoration: none;
  display: inline-block;
}
.bbs-tab:hover { color: var(--color-text); }
.bbs-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* --- スレッドツールバー --- */
.bbs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}

.bbs-toolbar__left {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bbs-sort-btn {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  transition: all 0.2s;
}
.bbs-sort-btn:hover { color: var(--color-text); border-color: rgba(255,255,255,0.2); }
.bbs-sort-btn.active { border-color: var(--color-primary); color: var(--color-primary); background: rgba(224,80,122,0.08); }

.bbs-count { font-size: 0.8rem; color: var(--color-text-dim); }

/* --- スレッドテーブル --- */
.bbs-table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bbs-thread-table {
  width: 100%;
  border-collapse: collapse;
}

.bbs-thread-table thead tr {
  background: var(--color-bg2);
}

.bbs-thread-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.bbs-thread-table th.th-no    { width: 40px; text-align: center; }
.bbs-thread-table th.th-title { min-width: 200px; }
.bbs-thread-table th.th-cat   { width: 100px; }
.bbs-thread-table th.th-res   { width: 60px; text-align: center; }
.bbs-thread-table th.th-view  { width: 72px; text-align: center; }
.bbs-thread-table th.th-date  { width: 90px; }

.bbs-thread-row {
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
  cursor: pointer;
}
.bbs-thread-row:last-child { border-bottom: none; }
.bbs-thread-row:hover { background: rgba(255,255,255,0.03); }
.bbs-thread-row.is-hot { background: rgba(224,80,122,0.03); }
.bbs-thread-row.is-hot:hover { background: rgba(224,80,122,0.06); }

.bbs-thread-row td {
  padding: 11px 14px;
  vertical-align: middle;
  font-size: 0.875rem;
}

.td-no {
  text-align: center;
  color: var(--color-text-dim);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  width: 40px;
}

.td-title a {
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.5;
  transition: color 0.15s;
}
.td-title a:hover { color: var(--color-primary-h); }

.td-title .thread-badges {
  display: inline-flex;
  gap: 5px;
  margin-left: 8px;
  vertical-align: middle;
}

.thread-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}
.thread-badge--new  { background: var(--color-primary); color: #fff; }
.thread-badge--hot  { background: rgba(255,140,0,0.2); color: #ffa500; border: 1px solid rgba(255,140,0,0.3); }
.thread-badge--pick { background: rgba(155,89,182,0.2); color: #bb88ff; border: 1px solid rgba(155,89,182,0.3); }

.td-cat { white-space: nowrap; }

.bbs-cat-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(224,80,122,0.12);
  color: var(--color-primary);
  border: 1px solid rgba(224,80,122,0.2);
  white-space: nowrap;
}

.td-res {
  text-align: center;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.td-res .res-count { font-weight: 700; color: #fff; }
.td-res .res-new   { color: var(--color-primary); font-size: 0.7rem; }

.td-view {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  font-variant-numeric: tabular-nums;
}

.td-date {
  font-size: 0.78rem;
  color: var(--color-text-dim);
  white-space: nowrap;
}

/* モバイル用カード表示 */
@media (max-width: 768px) {
  .bbs-thread-table thead { display: none; }
  .bbs-thread-row { display: flex; flex-direction: column; padding: 12px 16px; gap: 6px; }
  .bbs-thread-row td { display: block; padding: 0; border: none; width: 100% !important; }
  .td-no { text-align: left; }
  .bbs-thread-row .td-meta-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
  }
}

/* --- スレッド本文（post.html） --- */
.thread-wrap {
  padding: 110px 0 60px;
}

.thread-header {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 28px;
  border-bottom: 1px solid var(--color-border);
}

.thread-header__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 12px;
}

.thread-header__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

.thread-header__tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* レス（スレッド投稿） */
.thread-posts {
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}

.res-item {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
}
.res-item:last-child { border-bottom: none; }
.res-item:hover { background: rgba(255,255,255,0.015); }
.res-item.res-item--op { background: rgba(224,80,122,0.04); }

.res-num-col {
  width: 48px;
  padding: 14px 0 14px 14px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.res-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.res-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-surface2), var(--color-bg2));
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--color-text-dim);
  flex-shrink: 0;
}
.res-item--op .res-avatar {
  background: linear-gradient(135deg, rgba(224,80,122,0.25), rgba(155,89,182,0.15));
  border-color: rgba(224,80,122,0.3);
  color: var(--color-primary);
}

.res-body-col {
  flex: 1;
  padding: 12px 16px 12px 10px;
  min-width: 0;
}

.res-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.res-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.res-item--op .res-name { color: var(--color-primary); }

.res-date {
  font-size: 0.75rem;
  color: var(--color-text-dim);
}

.res-op-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(224,80,122,0.15);
  color: var(--color-primary);
  border: 1px solid rgba(224,80,122,0.25);
}

.res-text {
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--color-text);
  word-break: break-word;
  white-space: pre-wrap;
}

.res-actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
}
.res-action-btn {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  cursor: pointer;
  transition: color 0.15s;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}
.res-action-btn:hover { color: var(--color-primary); }

/* コメント投稿フォーム（BBS版） */
.bbs-reply-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 24px;
}
.bbs-reply-form__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}
.bbs-reply-form__inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.bbs-reply-form .reply-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- BBS全体レイアウト --- */
.bbs-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  padding: 24px 0 80px;
  align-items: start;
}

.bbs-main { min-width: 0; }

.bbs-sidebar { position: sticky; top: 88px; }

.bbs-widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.bbs-widget__title {
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--color-bg2);
  border-bottom: 1px solid var(--color-border);
}
.bbs-widget__body { padding: 4px 0; }

.bbs-widget-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: background 0.15s;
  border-bottom: 1px solid var(--color-border);
}
.bbs-widget-link:last-child { border-bottom: none; }
.bbs-widget-link:hover { background: rgba(255,255,255,0.03); color: var(--color-text); }
.bbs-widget-link .count { color: var(--color-text-dim); font-size: 0.78rem; }

.bbs-ranking-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
  cursor: pointer;
}
.bbs-ranking-item:last-child { border-bottom: none; }
.bbs-ranking-item:hover { background: rgba(255,255,255,0.03); }

.rank-num {
  font-size: 0.9rem;
  font-weight: 900;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.rank-1 { color: #d4a84b; }
.rank-2 { color: #aaa; }
.rank-3 { color: #cd7f32; }
.rank-other { color: var(--color-text-dim); }

.rank-title {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  flex: 1;
}
.bbs-ranking-item:hover .rank-title { color: var(--color-text); }
.rank-count { font-size: 0.75rem; color: var(--color-text-dim); white-space: nowrap; }

/* thread layout */
.thread-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: start;
  padding: 0 0 80px;
}
.thread-main { min-width: 0; }
.thread-sidebar { position: sticky; top: 88px; }

@media (max-width: 1024px) {
  .bbs-layout { grid-template-columns: 1fr; }
  .bbs-sidebar { position: static; }
  .thread-layout { grid-template-columns: 1fr; }
  .thread-sidebar { position: static; }
}
@media (max-width: 768px) {
  .bbs-thread-table { display: block; }
  .bbs-thread-table thead { display: none; }
  .bbs-thread-table tbody { display: block; }
  .bbs-thread-row { display: block; padding: 14px 16px; }
  .bbs-thread-row td { display: inline; }
  .td-no { display: inline-block !important; margin-right: 8px; }
  .td-title { display: block !important; margin: 4px 0; }
  .td-cat, .td-res, .td-view, .td-date { font-size: 0.78rem; margin-right: 12px; }
}

/* ============================================
   h-ken 風リストスタイル (Feed)
   ============================================ */

/* --- フィードコンテナ --- */
.feed-wrap {
  border-top: 1px solid var(--color-border);
}

.feed-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  transition: background 0.15s;
}
.feed-item:hover { background: rgba(255,255,255,0.012); }
.feed-item.is-hot { border-left: 3px solid var(--color-primary); padding-left: 16px; }

/* フラグ行 */
.feed-item__flags {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.flag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.flag--new     { background: var(--color-primary); color: #fff; }
.flag--hot     { background: rgba(255,100,0,0.2); color: #ff8040; border: 1px solid rgba(255,100,0,0.3); }
.flag--pick    { background: rgba(155,89,182,0.2); color: #bb88ff; border: 1px solid rgba(155,89,182,0.3); }
.flag--series  { background: rgba(52,152,219,0.2); color: #6bb8f0; border: 1px solid rgba(52,152,219,0.3); }
.flag--cat {
  background: rgba(224,80,122,0.1);
  color: var(--color-primary);
  border: 1px solid rgba(224,80,122,0.2);
}

/* タイトル */
.feed-item__title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 8px;
}
.feed-item__title a {
  color: #fff;
  transition: color 0.15s;
}
.feed-item__title a:hover { color: var(--color-primary-h); }

/* 著者・メタ行 */
.feed-item__author {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}
.feed-item__author .author-name { color: var(--color-text-muted); font-weight: 500; }
.feed-item__author .read-time   { color: var(--color-text-dim); }
.feed-item__author .post-time   { margin-left: auto; white-space: nowrap; }

/* プレビュー本文 */
.feed-item__preview {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* タグ */
.feed-item__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.feed-tag {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  padding: 2px 0;
  transition: color 0.15s;
}
.feed-tag:hover { color: var(--color-primary); }

/* 最新コメントプレビュー */
.feed-item__comment {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.025);
  border-left: 2px solid rgba(255,255,255,0.1);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  line-height: 1.5;
}
.feed-item__comment .comment-label {
  color: var(--color-text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.feed-item__comment .comment-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  color: var(--color-text-muted);
}

/* アクション行 */
.feed-item__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.clip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-dim);
  font-family: var(--font-body);
  transition: all 0.2s;
}
.clip-btn:hover { border-color: var(--color-gold); color: var(--color-gold); }
.clip-btn.clipped { border-color: var(--color-gold); color: var(--color-gold); background: rgba(212,168,75,0.1); }

.read-more-btn {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--color-primary);
  font-weight: 600;
  transition: color 0.15s;
}
.read-more-btn:hover { color: var(--color-primary-h); text-decoration: underline; }

/* --- 文字サイズ調整 --- */
.font-sizer {
  display: flex;
  gap: 4px;
  align-items: center;
}
.font-sizer__label { font-size: 0.75rem; color: var(--color-text-dim); margin-right: 4px; }
.font-sizer__btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-dim);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.font-sizer__btn:hover, .font-sizer__btn.active { border-color: var(--color-primary); color: var(--color-primary); background: rgba(224,80,122,0.08); }

/* --- ページネーション (h-ken風) --- */
.hken-pagination {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}
.hken-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.hken-page-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.hken-page-btn.active { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.hken-page-btn.disabled { opacity: 0.3; pointer-events: none; }

/* --- 記事本文 (post.html) --- */
.article-page {
  padding: 88px 0 60px;
}

.article-page__layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  align-items: start;
}

.article-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 28px;
}

.article-header__flags {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.article-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 16px;
}

.article-header__meta {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--color-text-dim);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.article-header__controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* 記事本文 */
.article-text {
  font-size: 1rem;
  line-height: 2.1;
  color: var(--color-text);
  word-break: break-all;
}
.article-text p { margin-bottom: 1.5em; }
.article-text.font-sm { font-size: 0.875rem; }
.article-text.font-lg { font-size: 1.125rem; }
.article-text.font-xl { font-size: 1.25rem; }

/* 記事フッター */
.article-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* コメント (h-ken風) */
.comments-section {
  margin-top: 40px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.comments-section__header {
  padding: 16px 24px;
  background: var(--color-bg2);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.comment-list { padding: 0 24px; }
.comment-entry {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.comment-entry:last-child { border-bottom: none; }
.comment-entry__num {
  font-size: 0.72rem;
  color: var(--color-primary);
  font-weight: 700;
  width: 28px;
  flex-shrink: 0;
  padding-top: 2px;
}
.comment-entry__body { flex: 1; min-width: 0; }
.comment-entry__meta {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  margin-bottom: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.comment-entry__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  word-break: break-word;
}

.comment-form-wrap {
  padding: 20px 24px;
  background: var(--color-bg2);
  border-top: 1px solid var(--color-border);
}
.comment-form-wrap__title {
  font-size: 0.82rem;
  color: var(--color-text-dim);
  margin-bottom: 10px;
}

/* --- hken風ページレイアウト --- */
.hken-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  padding: 28px 0 80px;
  align-items: start;
}
.hken-main { min-width: 0; }
.hken-sidebar { position: sticky; top: 80px; }

/* hken サイドバーウィジェット */
.hw {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}
.hw__head {
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--color-bg2);
  border-bottom: 1px solid var(--color-border);
}
.hw__body { padding: 4px 0; }
.hw__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  font-size: 0.83rem;
  color: var(--color-text-muted);
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.hw__link:last-child { border-bottom: none; }
.hw__link:hover { background: rgba(255,255,255,0.03); color: var(--color-text); }
.hw__link .c { color: var(--color-text-dim); font-size: 0.75rem; }

.hw-rank {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
  transition: background 0.15s;
}
.hw-rank:last-child { border-bottom: none; }
.hw-rank:hover { background: rgba(255,255,255,0.03); }
.hw-rank__n { font-size: 0.85rem; font-weight: 900; width: 18px; flex-shrink: 0; }
.r1 { color: #d4a84b; } .r2 { color: #aaa; } .r3 { color: #cd7f32; } .r4,.r5 { color: var(--color-text-dim); }
.hw-rank__t { font-size: 0.82rem; color: var(--color-text-muted); line-height: 1.4; flex: 1; }
.hw-rank:hover .hw-rank__t { color: var(--color-text); }

/* --- hken ページヘッダー --- */
.hken-page-header {
  padding: 80px 0 0;
  background: var(--color-bg2);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}
.hken-page-header__inner {
  padding-bottom: 0;
}
.hken-board-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hken-board-sub {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  margin-bottom: 14px;
}

/* タブナビ */
.hken-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 2px solid var(--color-border);
  margin-top: 4px;
}
.hken-tab {
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.hken-tab:hover { color: var(--color-text); }
.hken-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* ツールバー */
.hken-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  flex-wrap: wrap;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
}
.hken-toolbar__left { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hken-toolbar__right { display: flex; gap: 8px; align-items: center; }
.hken-sort-btn {
  padding: 5px 13px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  transition: all 0.2s;
}
.hken-sort-btn:hover { color: var(--color-text); border-color: rgba(255,255,255,0.2); }
.hken-sort-btn.active { border-color: var(--color-primary); color: var(--color-primary); background: rgba(224,80,122,0.08); }
.hken-total { font-size: 0.78rem; color: var(--color-text-dim); }

@media (max-width: 1024px) {
  .hken-layout        { grid-template-columns: 1fr; }
  .hken-sidebar       { position: static; }
  .article-page__layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .feed-item__author .post-time { margin-left: 0; }
}

/* ================================================================
   h-ken 風 新スタイル（posts.html / post.html 共通）
   ================================================================ */

/* ---- ヘッダー ---- */
.hken-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,18,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.hken-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hken-header__logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  margin-right: 8px;
}
.hken-header__nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
  flex: 1;
}
.hken-header__nav a {
  padding: 6px 14px;
  font-size: 0.83rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.hken-header__nav a:hover { color: var(--color-text); background: rgba(255,255,255,0.04); }
.hken-post-btn,
.hken-header__post-btn {
  padding: 7px 16px;
  border-radius: 6px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}
.hken-post-btn:hover,
.hken-header__post-btn:hover { background: var(--color-primary-h); }

/* ---- 広告バー ---- */
.hken-ad-bar {
  background: var(--color-bg2);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: center;
  padding: 8px 0;
  min-height: 60px;
}

/* ---- レイアウト wrapper ---- */
.hken-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 80px;
}

/* ---- ページヘッダー ---- */
.hken-page-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 0 12px;
  background: transparent;
  border-bottom: 1px solid var(--color-border);
}
.hken-page-header__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}
.hken-page-header__count {
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

/* ---- フィードリスト ---- */
.feed-wrap {
  list-style: none;
  margin: 0;
  padding: 0;
}
.feed-item {
  padding: 18px 0 18px 12px;
  border-bottom: 1px solid var(--color-border);
  border-left: 3px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.feed-item:hover {
  border-left-color: var(--color-primary);
  background: rgba(224,80,122,0.025);
}
.feed-loading, .feed-empty, .feed-error {
  padding: 40px 0;
  text-align: center;
  color: var(--color-text-dim);
  font-size: 0.9rem;
  list-style: none;
}

/* フラグ行 */
.feed-flags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.flag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}
.flag--new  { background: rgba(0,180,120,0.15); color: #00c985; border: 1px solid rgba(0,201,133,0.3); }
.flag--hot  { background: rgba(224,80,122,0.15); color: var(--color-primary); border: 1px solid rgba(224,80,122,0.3); }
.feed-cat {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* タイトル */
.feed-title {
  display: block;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.55;
  margin-bottom: 6px;
  transition: color 0.15s;
  text-decoration: none;
}
.feed-title:hover { color: var(--color-primary); text-decoration: none; }

/* メタ情報行 */
.feed-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--color-text-dim);
}
.feed-author { color: var(--color-text-muted); font-size: 0.78rem; }
.feed-readtime { color: #6a9f8a; }

/* プレビューテキスト */
.feed-preview {
  font-size: 0.87rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}

/* フッター行（タグ + アクション） */
.feed-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.feed-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.feed-tag {
  font-size: 0.72rem;
  color: var(--color-text-dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  border-radius: 10px;
  transition: all 0.15s;
}
.feed-tag:hover { color: var(--color-primary); border-color: rgba(224,80,122,0.3); }
.feed-actions { display: flex; align-items: center; gap: 8px; }
.feed-more {
  font-size: 0.8rem;
  color: #fff;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 5px;
  border: none;
  background: var(--color-primary);
  transition: all 0.2s;
  white-space: nowrap;
}
.feed-more:hover { background: var(--color-primary-h); opacity: 0.9; }

/* あとで見るボタン */
.clip-btn {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}
.clip-btn:hover { color: var(--color-text-muted); border-color: rgba(255,255,255,0.15); }
.clip-btn.clipped { color: var(--color-gold); border-color: rgba(212,168,75,0.3); }

/* ---- フォントサイズ調整 ---- */
.font-sizer {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--color-text-dim);
}
.fs-btn {
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: none;
  color: var(--color-text-dim);
  font-size: 0.72rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}
.fs-btn:hover { color: var(--color-text); }
.fs-btn.active { border-color: var(--color-primary); color: var(--color-primary); background: rgba(224,80,122,0.08); }

/* ---- ページネーション ---- */
.hken-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 32px 0 16px;
}
.hken-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}
.hken-page-btn:hover { border-color: rgba(255,255,255,0.2); color: var(--color-text); }
.hken-page-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.hken-page-ellipsis { line-height: 36px; color: var(--color-text-dim); padding: 0 4px; }

/* ---- サイドバー ウィジェット ---- */
.hw__title {
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-bg2);
  border-bottom: 1px solid var(--color-border);
}
.hw-rank {
  list-style: none;
  padding: 4px 0;
  margin: 0;
}
.hw-rank__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
}
.hw-rank__item:last-child { border-bottom: none; }
.hw-rank__item:hover { background: rgba(255,255,255,0.03); }
.hw-rank__num {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 18px;
  color: var(--color-text-dim);
  flex-shrink: 0;
}
.hw-rank__item:nth-child(1) .hw-rank__num { color: #d4a84b; }
.hw-rank__item:nth-child(2) .hw-rank__num { color: #aaa; }
.hw-rank__item:nth-child(3) .hw-rank__num { color: #cd7f32; }
.hw-rank__link {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  flex: 1;
  transition: color 0.15s;
}
.hw-rank__link:hover { color: var(--color-primary); }
.hw-rank__views { font-size: 0.7rem; color: var(--color-text-dim); white-space: nowrap; margin-left: auto; }

.hw-cats {
  list-style: none;
  padding: 4px 0;
  margin: 0;
}
.hw-cats li a {
  display: block;
  padding: 9px 14px;
  font-size: 0.83rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: all 0.15s;
}
.hw-cats li:last-child a { border-bottom: none; }
.hw-cats li a:hover { color: var(--color-primary); background: rgba(255,255,255,0.03); }

.hw-tags {
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hw-tags a {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--color-border);
  color: var(--color-text-dim);
  transition: all 0.15s;
}
.hw-tags a:hover { color: var(--color-primary); border-color: rgba(224,80,122,0.3); }

.hw-submit-btn {
  display: block;
  margin: 12px;
  padding: 10px;
  text-align: center;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s;
}
.hw-submit-btn:hover { background: var(--color-primary-h); }

/* ---- 記事ページ ---- */
.hken-breadcrumb {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hken-breadcrumb a { color: var(--color-text-dim); }
.hken-breadcrumb a:hover { color: var(--color-primary); }

.article-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}
.article-flags {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.article-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: 12px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--color-text-dim);
  margin-bottom: 10px;
}
.article-author { color: var(--color-text-muted); font-size: 0.82rem; }
.article-tags   { display: flex; gap: 6px; flex-wrap: wrap; }

.article-text {
  font-size: var(--font-size-base, 16px);
  line-height: 2;
  color: var(--color-text);
}
.article-text p {
  margin-bottom: 1.4em;
}

.article-actions {
  display: flex;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 24px 0;
  flex-wrap: wrap;
}
.like-btn, .share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border);
  background: none;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}
.like-btn:hover  { border-color: #e05082; color: #e05082; }
.like-btn.liked  { border-color: #e05082; color: #e05082; background: rgba(224,80,122,0.08); }
.share-btn:hover { border-color: rgba(255,255,255,0.2); color: var(--color-text); }

/* ---- コメントセクション（h-ken版） ---- */
.comments-section {
  margin-top: 32px;
}
.comments-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
}
.comment-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
.comment-form__textarea {
  width: 100%;
  background: var(--color-bg2);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  font-size: 0.88rem;
  font-family: var(--font-body);
  padding: 10px 12px;
  resize: vertical;
  transition: border-color 0.2s;
}
.comment-form__textarea:focus { outline: none; border-color: var(--color-primary); }
.comment-form__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.comment-form__count { font-size: 0.75rem; color: var(--color-text-dim); }
.comment-form__submit {
  padding: 7px 20px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s;
}
.comment-form__submit:hover    { background: var(--color-primary-h); }
.comment-form__submit:disabled { opacity: 0.5; cursor: not-allowed; }

.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.comment-item:last-child { border-bottom: none; }
.comment-item__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.comment-item__num { font-size: 0.72rem; color: var(--color-primary); font-weight: 700; }
.comment-item__author { font-size: 0.78rem; color: var(--color-text-muted); }
.comment-item__date   { font-size: 0.72rem; color: var(--color-text-dim); margin-left: auto; }
.comment-item__body {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  word-break: break-word;
}
.comment-empty, .comment-error {
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
  color: var(--color-text-dim);
  list-style: none;
}

/* ---- 関連記事 ---- */
.related-section { margin-top: 40px; }
.related-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
}

/* ---- フッター ---- */
.hken-footer {
  background: var(--color-bg2);
  border-top: 1px solid var(--color-border);
  padding: 32px 24px;
}
.hken-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.hken-footer__logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.hken-footer__nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 16px;
}
.hken-footer__nav a {
  font-size: 0.8rem;
  color: var(--color-text-dim);
}
.hken-footer__nav a:hover { color: var(--color-text-muted); }
.hken-footer__copy { font-size: 0.72rem; color: var(--color-text-dim); }

/* ---- ソートボタン（.hken-sort-btns ラッパー） ---- */
.hken-sort-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- レスポンシブ ---- */
@media (max-width: 900px) {
  .hken-layout { grid-template-columns: 1fr; padding: 16px; }
  .hken-sidebar { display: none; }
}
@media (max-width: 600px) {
  .article-title { font-size: 1.1rem; }
  .feed-title    { font-size: 0.95rem; }
  .hken-header__nav { display: none; }
}

/* ============================================
   スクロールトップボタン
   ============================================ */
#scroll-top {
  position: fixed;
  bottom: 28px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 900;
  box-shadow: 0 4px 16px rgba(224,80,122,0.4);
}
#scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#scroll-top:hover { background: var(--color-primary-h); }

/* ============================================
   広告プレースホルダー 改善
   ============================================ */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.02),
    rgba(255,255,255,0.02) 4px,
    transparent 4px,
    transparent 12px
  );
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.2);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================
   フィード コメントプレビュー
   ============================================ */
.feed-comment-preview {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  padding: 8px 10px;
  margin: 8px 0;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid var(--color-border);
  border-radius: 0 4px 4px 0;
  line-height: 1.5;
}
.feed-comment-preview::before { content: '最新コメント: '; color: var(--color-text-dim); font-size: 0.72rem; }
