:root {
  --bg: #f2efe8;
  --panel: #ffffff;
  --paper: #171616;
  --red: #d94f3d;
  --gold: #8b642d;
  --muted: #716c65;
  --line: #1d191416;
  --ink: #fffaf4;
  color-scheme: light;
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-optical-sizing: auto;
}
html { background: var(--bg); scroll-padding-top: 76px; }
body { background: var(--bg); color: #171614; letter-spacing: 0; }
body::before { display: none; }
button, a { -webkit-tap-highlight-color: transparent; transition: transform 120ms ease-out, background-color 180ms ease, border-color 180ms ease, color 180ms ease; }
button:active, a:active { transform: scale(.97); transition-duration: 60ms; }
button:focus-visible, a:focus-visible { outline: 3px solid #d94f3d33; outline-offset: 3px; }

header { height: 64px; padding-inline: max(16px,calc((100% - 1280px)/2)); border: 0; background: rgba(250,248,242,.88); color: #171614; box-shadow: 0 1px var(--line); backdrop-filter: blur(24px) saturate(150%); }
.brand { color: #171614; font: 720 15px -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif; letter-spacing: -.025em; }
.brand span { color: var(--red); }
.header-labels { gap: 6px; }
.header-labels b, .header-labels a { border-color: var(--line); background: #fff; color: #625c55; }
.header-labels a { color: #171614; font-weight: 650; }
main { width: min(1280px,calc(100% - 32px)); }

.hero { min-height: 255px; padding: 54px 0 28px; border: 0; }
.hero p, .thread-head small { color: var(--red); letter-spacing: .1em; }
.hero h1 { margin-top: 7px; color: #171614; font: 720 clamp(42px,5.8vw,76px)/.95 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", sans-serif; letter-spacing: -.065em; }
.hero h1 br { display: initial; }
.hero h1 em { margin-left: 0; color: #8c867d; font-style: normal; font-weight: 500; }
.hero aside { width: 140px; border: 0; border-radius: 16px; padding: 16px; background: #e7e0d5; }
.hero aside strong { color: #171614; font-family: inherit; font-weight: 280; letter-spacing: -.07em; }
.hero aside span { color: #716b63; }

.policy-strip { gap: 7px; padding: 0 0 22px; border: 0; }
.policy-strip span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #6d675f; }

.thread-tabs { margin: 0; padding: 0; gap: 7px; scrollbar-width: none; scroll-snap-type: x proximity; }
.thread-tabs::-webkit-scrollbar { display: none; }
.thread-tab { min-width: 210px; max-width: 280px; padding: 12px 14px; border-color: var(--line); border-radius: 12px; background: #f4f1eb; color: #676159; scroll-snap-align: start; }
.thread-tab span { color: #37332f; font: 670 12px -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif; }
.thread-tab small { color: #8b8379; }
.thread-tab.active { border-color: #171614; background: #171614; color: #fff; }
.thread-tab.active span, .thread-tab.active small { color: #fff; }
.thread-tab:hover { transform: translateY(-1px); }

.thread-tabs + .thread-head { padding-top: 0; }
.thread-head { grid-template-columns: minmax(0,1fr) minmax(280px,380px); gap: 34px; padding: 48px 0 20px; }
.thread-head h2 { margin-top: 5px; color: #171614; font: 720 clamp(32px,4vw,52px)/1.05 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", sans-serif; letter-spacing: -.052em; }
.thread-head p { color: var(--muted); line-height: 1.75; }

.posts { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding-bottom: 90px; }
.post { display: block; min-width: 0; }
.post-no { padding: 0 0 7px 4px; color: #8a8278; font: 700 10px ui-monospace, monospace; }
.post-card { height: calc(100% - 24px); overflow: hidden; border-color: var(--line); border-radius: 16px; background: #fff; color: #171614; box-shadow: 0 14px 36px #2a211814; }
.post-card:hover { border-color: #1d191432; transform: translateY(-2px); }
.post-meta { padding: 10px 12px; border-color: var(--line); color: #8b847b; }
.post-meta b { color: var(--red); }
.post-content, .post-content.image-only { display: flex; flex-direction: column; }
.post-image { min-height: 0; aspect-ratio: 3/4; background: #171614; }
.post-image img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.labels { top: 8px; left: 8px; gap: 4px; }
.labels span { border-color: #ffffff45; background: rgba(20,18,17,.72); color: white; backdrop-filter: blur(12px); }
.labels .pr { background: var(--red); }
.post-copy { min-height: 62px; display: flex; flex-direction: column; gap: 8px; padding: 11px 12px; border-top: 1px solid var(--line); }
.tags { margin: 0; }
.tag { background: #f1eee8; color: #6c655d; }
.affiliate { margin: 0; border-radius: 10px; background: #171614; color: white; }
.affiliate small { color: #e9a99f; }
.empty { border-color: var(--line); background: #fff; color: var(--muted); }

footer { gap: 42px; padding: 38px max(16px,calc((100% - 1280px)/2)); border-color: var(--line); background: #e6e0d6; color: #6d675f; }
footer b { color: #171614; }
.age-gate { background: rgba(30,25,22,.76); backdrop-filter: blur(24px) saturate(120%); }
.gate-card { border: 1px solid #ffffff2a; border-radius: 22px; background: rgba(255,252,247,.94); color: #171614; box-shadow: 0 42px 130px #17100d66; backdrop-filter: blur(28px); animation: gate-in 240ms cubic-bezier(.2,.8,.2,1); }
.gate-card small { color: var(--red); }
.gate-card h1 { color: #171614; font-family: inherit; font-weight: 720; letter-spacing: -.045em; }
.gate-card p { color: #6f6860; }
.gate-card button, .gate-card a { border-color: var(--line); border-radius: 12px; color: #171614; }
.gate-card button { border: 0; background: #171614; color: white; }
@keyframes gate-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1040px) { .posts { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) {
  main { width: min(100% - 18px,1280px); }
  header { padding-inline: 10px; }
  .header-labels b { display: none; }
  .hero { min-height: 205px; padding: 42px 3px 22px; }
  .hero h1 { font-size: clamp(36px,10vw,52px); }
  .hero h1 br { display: initial; }
  .hero h1 em { display: block; margin: 0; }
  .policy-strip { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .policy-strip span { flex: 0 0 auto; }
  .thread-tab { min-width: 190px; }
  .thread-head { grid-template-columns: 1fr; gap: 8px; padding-top: 34px; }
  .thread-head h2 { font-size: 32px; }
  .posts { grid-template-columns: 1fr; }
  .post-image { aspect-ratio: 3/4; }
  footer { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } button:active,a:active { transform: none; } }
@media (prefers-reduced-transparency: reduce) { header,.gate-card { background: #fff; backdrop-filter: none; } }
@media (prefers-contrast: more) { :root { --line: #1d191455; --muted: #49443e; } header,.post-card,.gate-card { border: 1px solid #1d191455; } }

/* Compact navigation and direct image viewing. */
.post-image { width: 100%; padding: 0; border: 0; cursor: zoom-in; }
.post-image:focus-visible { outline: 4px solid var(--red); outline-offset: -4px; }
.post-meta b { display: none; }
.labels span { font-size: 7px; }
.lightbox { width: min(94vw,1050px); max-width: none; height: min(92vh,980px); padding: 0; overflow: hidden; border: 0; border-radius: 18px; background: #111; color: #fff; box-shadow: 0 40px 140px #0009; }
.lightbox::backdrop { background: #16110ee6; backdrop-filter: blur(16px); }
.lightbox[open] { display: grid; grid-template-columns: 54px minmax(0,1fr) 54px; grid-template-rows: 48px minmax(0,1fr); }
.lightbox-bar { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: center; padding: 0 10px 0 16px; border-bottom: 1px solid #ffffff1f; color: #d6d0c9; font-size: 11px; }
.lightbox-bar button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #ffffff18; color: #fff; cursor: pointer; }
.lightbox img { grid-column: 2; grid-row: 2; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox-nav { grid-row: 2; border: 0; background: transparent; color: white; font-size: 42px; cursor: pointer; }
.lightbox-nav:disabled { opacity: .2; cursor: default; }
.lightbox-nav.prev { grid-column: 1; }.lightbox-nav.next { grid-column: 3; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid #a92f22; outline-offset: 3px; }

.thread-index-view { padding: 40px 0 90px; }
.thread-index-head { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,380px); gap: 32px; align-items: end; margin-bottom: 22px; }
.thread-index-head small { color: var(--red); font: 750 8px ui-monospace,monospace; letter-spacing: .12em; }
.thread-index-head h2 { margin: 5px 0 0; font: 720 clamp(34px,4vw,52px)/1 -apple-system,BlinkMacSystemFont,"SF Pro Display","Hiragino Sans",sans-serif; letter-spacing: -.05em; }
.thread-index-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.thread-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 16px; }
.thread-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: #171614; text-decoration: none; box-shadow: 0 16px 38px #2a211814; }
.thread-card:hover { transform: translateY(-3px); border-color: #1d191435; box-shadow: 0 22px 48px #2a211820; }
.thread-cover { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #171614; }
.thread-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: transform 320ms cubic-bezier(.2,.8,.2,1); }
.thread-card:hover .thread-cover img { transform: scale(1.025); }
.thread-cover span { position: absolute; right: 10px; bottom: 10px; padding: 6px 8px; border: 1px solid #ffffff45; border-radius: 999px; background: #171614cc; color: white; font: 750 8px ui-monospace,monospace; backdrop-filter: blur(12px); }
.thread-card-copy { padding: 16px; }
.thread-card-copy > small { color: var(--red); font: 750 8px ui-monospace,monospace; letter-spacing: .1em; }
.thread-card-copy h3 { min-height: 2.6em; margin: 7px 0 15px; font-size: 18px; line-height: 1.3; letter-spacing: -.025em; }
.thread-card-copy p { display: flex; justify-content: space-between; gap: 10px; margin: 0; color: var(--muted); font-size: 9px; }
.thread-card-copy p b { color: #171614; font-size: 10px; }
.thread-detail-view { padding: 28px 0 0; }
.back-to-threads { display: inline-flex; align-items: center; min-height: 38px; margin-bottom: 14px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #171614; text-decoration: none; font-size: 11px; font-weight: 700; }
body[data-board-view="detail"] .hero, body[data-board-view="detail"] .policy-strip { display: none; }

@media (max-width:760px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .lightbox[open] { grid-template-columns: 42px minmax(0,1fr) 42px; }
  .thread-index-view { padding-top: 30px; }
  .thread-index-head { grid-template-columns: 1fr; gap: 8px; }
  .thread-index-head p { font-size: 11px; }
  .thread-grid { grid-template-columns: 1fr; gap: 12px; }
  .thread-cover { aspect-ratio: 16/10; }
  .thread-card-copy h3 { min-height: 0; }
  .thread-detail-view { padding-top: 18px; }
}
