/* Hallmark · pre-emit critique: P5 H5 E5 S5 R4 V5
 * Hallmark · genre: tabloid · macrostructure: thread index · mood: vulgar late-night image board
 */
:root {
  --color-page: oklch(0.94 0.018 89);
  --color-page-grid: oklch(0.78 0.018 88 / 0.22);
  --color-surface: oklch(0.985 0.006 86);
  --color-surface-alt: oklch(0.91 0.026 86);
  --color-ink: oklch(0.18 0.014 32);
  --color-muted: oklch(0.45 0.015 47);
  --color-rule: oklch(0.24 0.012 35);
  --color-rule-soft: oklch(0.69 0.022 60);
  --color-header: oklch(0.14 0.014 30);
  --color-header-2: oklch(0.2 0.02 28);
  --color-on-dark: oklch(0.97 0.012 88);
  --color-red: oklch(0.53 0.2 28);
  --color-red-dark: oklch(0.39 0.16 28);
  --color-yellow: oklch(0.87 0.17 91);
  --color-link: oklch(0.41 0.2 264);
  --color-pr: oklch(0.53 0.2 28);
  --color-focus: oklch(0.65 0.18 255);
  --color-overlay: oklch(0.08 0.01 30 / 0.9);
  --color-shadow: oklch(0.08 0.01 30 / 0.22);
  --font-display: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-body: "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --font-mono: "SFMono-Regular", Menlo, monospace;
  --space-3xs: .25rem;
  --space-2xs: .5rem;
  --space-xs: .75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
  --radius-input: .15rem;
  --radius-card: .2rem;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur-short: 140ms;
  --bg: var(--color-page);
  --panel: var(--color-surface);
  --paper: var(--color-surface);
  --red: var(--color-red);
  --gold: var(--color-yellow);
  --muted: var(--color-muted);
  --line: var(--color-rule-soft);
  --ink: var(--color-ink);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { background: var(--color-page); scroll-padding-top: 7rem; }
body {
  margin: 0;
  background-color: var(--color-page);
  background-image: linear-gradient(var(--color-page-grid) 1px, transparent 1px), linear-gradient(90deg, var(--color-page-grid) 1px, transparent 1px);
  background-size: 1rem 1rem;
  color: var(--color-ink);
  font-family: var(--font-body);
}
body::before { display: none; }
button, a, select { font-family: var(--font-body); }
button, a { transition: color var(--dur-short) var(--ease-out), background var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 4.35rem;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-inline: max(var(--space-sm), calc((100% - 76rem) / 2));
  border: 0;
  border-bottom: .28rem solid var(--color-red);
  background: var(--color-header);
  color: var(--color-on-dark);
  box-shadow: none;
  backdrop-filter: none;
}
.brand {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--color-on-dark);
  font-family: var(--font-display);
  text-decoration: none;
}
.brand small { color: var(--color-yellow); font-size: .55rem; font-weight: 800; letter-spacing: .16em; line-height: 1; }
.brand strong { font-size: clamp(1rem,3vw,1.45rem); font-weight: 900; letter-spacing: -.045em; line-height: 1.25; white-space: nowrap; }
.brand > span { color: var(--color-red); }
.public-nav, .header-labels { display: flex; align-items: stretch; gap: 0; }
.public-nav a, .public-nav b, .header-labels b {
  min-height: 100%;
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-sm);
  border: 0;
  border-left: 1px solid var(--color-header-2);
  border-radius: 0;
  background: var(--color-header);
  color: var(--color-on-dark);
  font-size: .68rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.public-nav b, .header-labels b { background: var(--color-red); color: var(--color-on-dark); }
.notice-strip { border-bottom: 1px solid var(--color-red-dark); background: var(--color-red); color: var(--color-on-dark); }
.notice-strip > div { width: min(76rem,calc(100% - 2rem)); min-height: 2rem; display: flex; align-items: center; gap: var(--space-sm); margin-inline: auto; font-size: .65rem; }
.notice-strip b { color: var(--color-yellow); white-space: nowrap; }
.notice-strip span { opacity: .88; }
.notice-strip a { margin-left: auto; color: var(--color-on-dark); font-weight: 800; text-underline-offset: .16rem; white-space: nowrap; }

main { width: min(76rem,calc(100% - 2rem)); margin-inline: auto; }
.thread-index-view { padding-block: var(--space-lg) var(--space-2xl); }
.thread-index-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  border: 2px solid var(--color-rule);
  background: var(--color-surface);
}
.thread-index-head > div { min-width: 0; padding: var(--space-xs) var(--space-sm); border-left: .55rem solid var(--color-red); }
.thread-index-head small { color: var(--color-red-dark); font-family: var(--font-mono); font-size: .56rem; font-weight: 800; letter-spacing: .08em; }
.thread-index-head p { margin: .15rem 0 0; color: var(--color-ink); font-family: var(--font-display); font-size: clamp(1.2rem,4vw,1.75rem); font-weight: 900; line-height: 1.1; }
.thread-total { min-width: 8.5rem; display: flex; align-items: center; justify-content: center; gap: var(--space-2xs); padding-inline: var(--space-sm); border-left: 1px solid var(--color-rule-soft); background: var(--color-yellow); white-space: nowrap; }
.thread-total strong { color: var(--color-red-dark); font-family: var(--font-display); font-size: 2rem; font-weight: 900; }
.thread-total small { color: var(--color-ink); font-size: .62rem; font-weight: 800; letter-spacing: 0; }
.thread-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--space-sm); }
.thread-card {
  min-width: 0;
  overflow: clip;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--color-rule);
  border-radius: 0;
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: .25rem .25rem 0 var(--color-shadow);
  text-decoration: none;
}
.thread-cover { position: relative; aspect-ratio: 4/3; overflow: hidden; border-bottom: 1px solid var(--color-rule); background: var(--color-header); }
.thread-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transition: transform 240ms var(--ease-out); }
.thread-cover span { position: absolute; right: 0; bottom: 0; padding: .35rem .55rem; border: 0; border-radius: 0; background: var(--color-red); color: var(--color-on-dark); font-family: var(--font-body); font-size: .65rem; font-weight: 900; }
.thread-card-copy { display: flex; flex-direction: column; min-width: 0; padding: var(--space-xs); }
.thread-card-copy > small { color: var(--color-muted); font-family: var(--font-mono); font-size: .54rem; letter-spacing: 0; }
.thread-card-copy h3 { min-height: 2.65em; margin: .35rem 0 var(--space-xs); color: var(--color-link); font-family: var(--font-display); font-size: clamp(1rem,2.2vw,1.2rem); font-style: normal; font-weight: 900; line-height: 1.35; letter-spacing: -.02em; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16rem; overflow-wrap: anywhere; }
.thread-card-copy p { display: flex; justify-content: space-between; gap: var(--space-2xs); margin: auto 0 0; padding-top: var(--space-2xs); border-top: 1px dotted var(--color-rule-soft); color: var(--color-muted); font-size: .58rem; }
.thread-card-copy p b { color: var(--color-red-dark); font-size: .64rem; white-space: nowrap; }
.empty { border: 2px dashed var(--color-rule-soft); border-radius: 0; background: var(--color-surface); color: var(--color-muted); }

.thread-detail-view { padding-block: var(--space-md) 0; }
.back-to-threads { min-height: 2.2rem; display: inline-flex; align-items: center; margin-bottom: var(--space-xs); padding-inline: var(--space-xs); border: 1px solid var(--color-rule); border-radius: 0; background: var(--color-surface); color: var(--color-link); font-size: .68rem; font-weight: 800; text-decoration: underline; white-space: nowrap; }
.thread-head { display: grid; grid-template-columns: minmax(0,1fr) minmax(14rem,20rem); gap: var(--space-lg); align-items: end; padding: var(--space-sm); border: 2px solid var(--color-rule); border-left: .55rem solid var(--color-red); background: var(--color-surface); }
.thread-head small { color: var(--color-red-dark); font-family: var(--font-mono); font-size: .56rem; }
.thread-head h2 { margin: .35rem 0 0; color: var(--color-ink); font-family: var(--font-display); font-size: clamp(1.55rem,4.5vw,2.8rem); font-style: normal; font-weight: 900; line-height: 1.15; letter-spacing: -.035em; overflow-wrap: anywhere; }
.thread-head p { margin: 0; color: var(--color-muted); font-size: .68rem; line-height: 1.7; }
.thread-content-layout { display: grid; grid-template-columns: minmax(0,48rem) minmax(14rem,1fr); gap: var(--space-lg); align-items: start; padding-block: var(--space-md) var(--space-2xl); }
.thread-primary { min-width: 0; }
.posts { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--space-lg); width: 100%; padding: 0; }
.post { min-width: 0; }
.post-no { padding: .35rem .55rem; border: 1px solid var(--color-rule); border-bottom: 0; background: var(--color-yellow); color: var(--color-red-dark); font-family: var(--font-mono); font-size: .62rem; font-weight: 900; }
.post-card { overflow: clip; border: 1px solid var(--color-rule); border-radius: 0; background: var(--color-surface); color: var(--color-ink); box-shadow: .2rem .2rem 0 var(--color-shadow); }
.post-meta { display: flex; justify-content: flex-end; padding: .4rem .55rem; border-bottom: 1px dotted var(--color-rule-soft); color: var(--color-muted); font-family: var(--font-mono); font-size: .5rem; }
.post-image { width: 100%; height: min(68dvh,40rem); min-height: 0; padding: 0; border: 0; background: var(--color-header); cursor: zoom-in; }
.post-image img { display: block; width: 100%; height: 100%; max-height: min(68dvh,40rem); object-fit: contain; }
.labels { top: var(--space-2xs); left: var(--space-2xs); gap: var(--space-3xs); }
.labels span { padding: .3rem .45rem; border: 1px solid var(--color-on-dark); border-radius: 0; background: var(--color-header); color: var(--color-on-dark); font-family: var(--font-mono); font-size: .5rem; font-weight: 800; }
.labels .pr { background: var(--color-pr); color: var(--color-on-dark); }
.post-copy { min-height: 0; padding: var(--space-xs); border-top: 1px solid var(--color-rule); }
.tags { gap: var(--space-3xs); margin: 0; }
.tag { border: 1px solid var(--color-rule-soft); border-radius: 0; background: var(--color-surface-alt); color: var(--color-muted); }
.affiliate { margin-top: var(--space-xs); border: 2px solid var(--color-rule); border-radius: 0; background: var(--color-yellow); color: var(--color-ink); }
.affiliate small { color: var(--color-red-dark); }
.blog-sidebar { position: sticky; top: 11.5rem; display: grid; gap: var(--space-sm); min-width: 0; }
.sidebar-block { border: 1px solid var(--color-rule); background: var(--color-surface); box-shadow: .18rem .18rem 0 var(--color-shadow); }
.sidebar-title { display: flex; align-items: stretch; justify-content: space-between; min-height: 2.5rem; border-bottom: 1px solid var(--color-rule); background: var(--color-header); color: var(--color-on-dark); }
.sidebar-title h3 { display: flex; align-items: center; margin: 0; padding-inline: var(--space-xs); font-size: .78rem; font-weight: 900; }
.ranking-tabs { display: flex; }
.ranking-tabs button { min-width: 3rem; border: 0; border-left: 1px solid var(--color-header-2); background: transparent; color: var(--color-on-dark); font-size: .58rem; font-weight: 900; cursor: pointer; }
.ranking-tabs button.active { background: var(--color-red); color: var(--color-on-dark); }
.ranking-block ol, .sidebar-links { margin: 0; padding: 0; list-style: none; }
.ranking-block li + li, .sidebar-links li + li { border-top: 1px dotted var(--color-rule-soft); }
.ranking-block a { position: relative; display: grid; grid-template-columns: 3.65rem minmax(0,1fr); min-height: 4.5rem; color: var(--color-ink); text-decoration: none; }
.ranking-block img { width: 3.65rem; height: 4.5rem; object-fit: cover; object-position: 50% 20%; background: var(--color-header); }
.rank-number { position: absolute; top: 0; left: 0; z-index: 1; min-width: 1.25rem; padding: .18rem; background: var(--color-yellow); color: var(--color-red-dark); font-family: var(--font-mono); font-size: .58rem; font-weight: 900; text-align: center; }
.rank-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: .28rem; padding: .45rem .55rem; }
.rank-copy b { display: -webkit-box; overflow: hidden; color: var(--color-link); font-size: .68rem; line-height: 1.4; text-decoration: underline; text-underline-offset: .12rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.rank-copy small { color: var(--color-muted); font-family: var(--font-mono); font-size: .48rem; }
.sidebar-links li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); min-height: 2.15rem; padding-inline: var(--space-xs); color: var(--color-ink); font-size: .66rem; }
.sidebar-links b { color: var(--color-red-dark); font-family: var(--font-mono); font-size: .56rem; }

.thread-pager { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-xs); margin-top: var(--space-lg); }
.thread-pager.single { grid-template-columns: minmax(0,1fr); }
.thread-pager a { display: flex; min-width: 0; min-height: 5.2rem; flex-direction: column; justify-content: center; gap: .35rem; padding: var(--space-xs); border: 1px solid var(--color-rule); background: var(--color-surface); color: var(--color-link); box-shadow: .18rem .18rem 0 var(--color-shadow); text-decoration: none; }
.thread-pager small { color: var(--color-red-dark); font-family: var(--font-mono); font-size: .55rem; font-weight: 900; }
.thread-pager b { overflow: hidden; font-size: .76rem; line-height: 1.5; text-decoration: underline; text-underline-offset: .15rem; white-space: nowrap; text-overflow: ellipsis; }
.related-threads { margin-top: var(--space-xl); padding-top: var(--space-sm); border-top: .35rem solid var(--color-header); }
.related-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-xs); margin-bottom: var(--space-xs); }
.related-heading small { color: var(--color-red-dark); font-family: var(--font-mono); font-size: .55rem; font-weight: 900; }
.related-heading h3 { margin: 0; font-family: var(--font-display); font-size: 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--space-xs); }
.related-grid > a { min-width: 0; overflow: hidden; border: 1px solid var(--color-rule); background: var(--color-surface); color: var(--color-link); box-shadow: .15rem .15rem 0 var(--color-shadow); text-decoration: none; }
.related-grid img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: 50% 20%; border-bottom: 1px solid var(--color-rule); }
.related-grid span { display: grid; gap: .3rem; padding: .55rem; }
.related-grid small { color: var(--color-red-dark); font-family: var(--font-mono); font-size: .5rem; }
.related-grid b { overflow: hidden; font-size: .66rem; line-height: 1.45; text-decoration: underline; text-underline-offset: .12rem; white-space: nowrap; text-overflow: ellipsis; }
.related-grid em { color: var(--color-muted); font-family: var(--font-mono); font-size: .5rem; font-style: normal; }

footer { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--space-2xs); padding: var(--space-lg) max(var(--space-sm),calc((100% - 76rem)/2)); border-top: .3rem solid var(--color-red); background: var(--color-header); color: var(--color-on-dark); }
footer p { max-width: 76rem; margin: 0; font-size: .62rem; line-height: 1.65; }
footer a { color: var(--color-yellow); text-underline-offset: .18rem; }
.age-gate { background: var(--color-overlay); backdrop-filter: none; }
.gate-card { width: min(31rem,100%); padding: 0; overflow: clip; border: 3px solid var(--color-rule); border-radius: 0; background: var(--color-surface); color: var(--color-ink); box-shadow: .5rem .5rem 0 var(--color-shadow); backdrop-filter: none; }
.gate-card small { display: block; padding: .55rem var(--space-sm); background: var(--color-red); color: var(--color-on-dark); font-family: var(--font-mono); font-weight: 900; }
.gate-card h1 { margin: var(--space-md) var(--space-md) var(--space-xs); color: var(--color-ink); font-family: var(--font-display); font-size: clamp(1.65rem,7vw,2.35rem); font-style: normal; font-weight: 900; }
.gate-card p { margin: 0 var(--space-md); padding: var(--space-xs); border: 1px solid var(--color-rule-soft); background: var(--color-yellow); color: var(--color-ink); font-size: .78rem; line-height: 1.7; }
.gate-card div { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xs); margin: var(--space-md); }
.gate-card button, .gate-card a { min-height: 3rem; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--color-rule); border-radius: 0; color: var(--color-ink); font-weight: 900; text-decoration: none; white-space: nowrap; }
.gate-card button { background: var(--color-red); color: var(--color-on-dark); }
.gate-card a { background: var(--color-surface-alt); }
.lightbox { border-radius: 0; background: var(--color-header); color: var(--color-on-dark); }
.lightbox::backdrop { background: var(--color-overlay); backdrop-filter: none; }
.legal-document { width: min(48rem,100%); margin: 0 auto; padding: var(--space-xl) var(--space-sm) var(--space-2xl); }
.legal-document > p:first-child { margin: 0 0 var(--space-lg); }
.legal-document a { color: var(--color-link); text-underline-offset: .18rem; }
.legal-document h1 { max-width: 18em; margin: 0 0 var(--space-lg); padding: var(--space-sm); border: 2px solid var(--color-rule); border-left: .55rem solid var(--color-red); background: var(--color-surface); font-family: var(--font-display); font-size: clamp(1.7rem,6vw,2.7rem); font-weight: 900; line-height: 1.15; letter-spacing: -.04em; }
.legal-document h2 { margin: var(--space-lg) 0 var(--space-2xs); padding: .45rem .6rem; border: 0; border-left: .35rem solid var(--color-red); background: var(--color-surface-alt); font-size: .95rem; }
.legal-document p { color: var(--color-muted); font-size: .8rem; line-height: 1.9; }

@media (hover:hover) and (pointer:fine) {
  .public-nav a:hover { background: var(--color-header-2); color: var(--color-yellow); }
  .thread-card:hover { transform: translate(-2px,-2px); box-shadow: .38rem .38rem 0 var(--color-red-dark); }
  .thread-card:hover .thread-cover img { transform: scale(1.025); }
  .thread-card:hover h3 { color: var(--color-red-dark); }
  .back-to-threads:hover { color: var(--color-red-dark); }
}

@media (min-width: 40rem) {
  .thread-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  footer { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (min-width: 64rem) {
  .thread-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .thread-card:first-child { grid-column: span 2; grid-row: span 2; }
  .thread-card:first-child .thread-cover { aspect-ratio: 16/10; }
  .thread-card:first-child .thread-card-copy h3 { font-size: clamp(1.45rem,2.6vw,2.05rem); }
}

@media (max-width: 63.99rem) {
  .thread-content-layout { grid-template-columns: minmax(0,1fr); }
  .blog-sidebar { position: static; order: -1; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ranking-block { grid-row: span 2; }
}

@media (max-width: 39.99rem) {
  html { scroll-padding-top: 6rem; }
  header { height: 3.8rem; padding-inline: var(--space-2xs); }
  .brand small { font-size: .45rem; }
  .brand strong { font-size: 1rem; }
  .public-nav a { display: none; }
  .public-nav b { padding-inline: var(--space-xs); }
  .notice-strip > div { width: calc(100% - 1rem); gap: var(--space-2xs); }
  .notice-strip span { display: none; }
  .notice-strip a { font-size: .56rem; }
  main { width: min(100% - 1rem,76rem); }
  .thread-index-head { align-items: stretch; }
  .thread-index-head > div { padding-inline: var(--space-xs); }
  .thread-index-head p { font-size: 1.1rem; }
  .thread-total { min-width: 5.6rem; padding-inline: var(--space-2xs); }
  .thread-total strong { font-size: 1.55rem; }
  .thread-total small { font-size: .52rem; }
  .thread-card-copy h3 { min-height: 0; }
  .thread-head { grid-template-columns: minmax(0,1fr); gap: var(--space-xs); padding: var(--space-xs); }
  .thread-content-layout { gap: var(--space-sm); }
  .blog-sidebar { grid-template-columns: minmax(0,1fr); }
  .ranking-block { grid-row: auto; }
  .thread-head h2 { font-size: 1.55rem; }
  .post-image { height: min(72dvh,36rem); }
  .post-image img { max-height: min(72dvh,36rem); }
  .thread-pager { grid-template-columns: minmax(0,1fr); }
  .related-grid { grid-template-columns: minmax(0,1fr); }
  .related-grid > a { display: grid; grid-template-columns: 5.5rem minmax(0,1fr); }
  .related-grid img { height: 5.5rem; aspect-ratio: 1; border-right: 1px solid var(--color-rule); border-bottom: 0; }
  .gate-card div { grid-template-columns: minmax(0,1fr); }
  .lightbox[open] { grid-template-columns: 2.5rem minmax(0,1fr) 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; }
  button:active, a:active { transform: none; }
}
