* { box-sizing: border-box; }
html { scroll-behavior: auto; }
:root {
  --pink: #df9093;
  --pink-deep: #cf7f85;
  --pink-soft: #f6e8e9;
  --bg: #efefef;
  --card: #ffffff;
  --border: #d9d9d9;
  --text: #33363b;
  --muted: #85878d;
  --line: #cfcfcf;
  --accent: #e28e96;
  --green: #a4c04e;
  --truth-bg: #2f272a;
  --truth-card: #3b3135;
  --truth-line: rgba(255,255,255,.1);
  --truth-text: #f1e7e8;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.page-shell { min-height: 100vh; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--pink);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.site-header.truth {
  background: linear-gradient(180deg, #5a3438, #462a2e);
}
.header-shell {
  max-width: 820px;
  margin: 0 auto;
}
.topbar {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) 46px 46px;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
}
.topbar-button {
  height: 58px;
  border: 2px solid rgba(255,255,255,.62);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  position: relative;
}
.topbar-button .icon {
  font-size: 26px;
  line-height: 1;
}
.topbar-button .label {
  font-size: 10px;
  margin-top: 2px;
}
.topbar-button .count {
  position: absolute;
  top: -8px;
  left: -4px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  background: #6dc6bf;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  border: 1px solid rgba(0,0,0,.1);
}
.branding {
  min-width: 0;
  text-align: center;
}
.branding-copy {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  opacity: .95;
}
.branding-title {
  margin-top: 2px;
  font-size: clamp(24px, 8vw, 38px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .02em;
}
.category-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0 8px;
  background: #f2efe8;
  border-top: 1px solid rgba(0,0,0,.06);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  flex: 0 0 auto;
  padding: 14px 16px;
  font-size: 17px;
  color: #2d2d2d;
  position: relative;
}
.category-tab + .category-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: #bfb9ab;
}
.category-tab.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 5px;
  background: var(--accent);
}
.category-tab.truth-tab.active::after { background: #c68e92; }

.layout {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 0 28px;
}
.breadcrumb-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  font-size: 16px;
  background: #fff;
  border-bottom: 1px solid #e2e2e2;
}

.notice-card,
.search-card,
.threads-card,
.detail-card,
.share-card {
  background: transparent;
}
.notice-card.truth-card,
.detail-card.truth-card,
.threads-card.truth-card,
.share-card.truth-card {
  color: var(--truth-text);
}
.notice-shell {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 14px;
}
.notice-banner {
  background: var(--pink);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(22px, 7vw, 30px);
  font-weight: 700;
}
.notice-banner .bubble {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255,255,255,.88);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
}
.notice-content {
  padding: 16px;
}
.notice-desc {
  margin: 0 0 14px;
  font-size: clamp(17px, 4.8vw, 20px);
  line-height: 1.5;
}
.notice-box {
  border: 2px solid #adc454;
  background: #fff;
  padding: 16px 14px 14px;
  position: relative;
}
.notice-label {
  position: absolute;
  top: -13px;
  left: 12px;
  display: inline-block;
  background: #98c64c;
  color: #fff;
  border-radius: 18px;
  padding: 4px 14px;
  font-size: 14px;
  font-weight: 700;
}
.notice-title {
  margin: 8px 0 4px;
  font-size: clamp(18px, 5.4vw, 26px);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.notice-sub,
.notice-text { margin: 0; color: #54575b; }
.notice-sub { margin-bottom: 6px; }

.search-card {
  padding: 12px 16px 0;
}
.search-card-inner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.search-inline-head strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}
.search-feedback {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.search-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 88px;
  gap: 8px;
}
.search-form input {
  min-width: 0;
  border: 1px solid #cfd1d5;
  border-radius: 6px;
  padding: 12px 12px;
  background: #fff;
}
.search-form button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
}

.threads-card {
  padding: 14px 16px 0;
}
.section-ribbon {
  position: relative;
  background: transparent;
  margin-bottom: 10px;
}
.section-ribbon::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 6px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 12px solid var(--accent);
}
.section-ribbon h2 {
  margin: 0;
  font-size: clamp(24px, 8vw, 32px);
  font-weight: 500;
}
.section-caption {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}
.thread-list {
  display: grid;
  gap: 14px;
}
.thread-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 14px;
  position: relative;
}
.thread-item::after {
  content: "›";
  position: absolute;
  right: 10px;
  top: 18px;
  color: #c4c4c4;
  font-size: 24px;
}
.thread-thumb { display: none; }
.thread-head-meta {
  display: none;
}
.thread-title {
  margin: 0 24px 10px 0;
  font-size: clamp(21px, 7vw, 28px);
  font-weight: 500;
  line-height: 1.38;
}
.thread-excerpt {
  margin: 0 18px 10px 0;
  color: #73767b;
  font-size: clamp(16px, 4.6vw, 18px);
  line-height: 1.6;
}
.thread-meta {
  font-size: clamp(15px, 4.2vw, 17px);
  color: #9a9ca1;
}
.thread-meta .response { color: var(--accent); }
.thread-meta .eye { margin-left: 4px; }
.thread-date { display: none; }
.thread-arrow { display: none; }

.detail-card {
  padding: 18px 16px 0;
}
.detail-inner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.detail-top {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr);
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbf1f2;
}
.detail-avatar {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d9c7ca;
}
.detail-top h3 {
  margin: 0 0 4px;
  font-size: clamp(20px, 6vw, 26px);
  font-weight: 500;
  line-height: 1.35;
}
.meta-muted {
  color: #8e6d72;
  font-size: 14px;
}
.detail-description {
  margin: 0;
  padding: 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.post-list {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.post-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #fcf3f4;
  color: #9d6269;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.post-text {
  margin: 0;
  padding: 14px 12px 16px;
  white-space: pre-wrap;
  font-size: clamp(17px, 5vw, 20px);
  line-height: 1.7;
}
.deleted-post {
  opacity: .46;
  text-decoration: line-through;
  filter: blur(.7px);
}
.deleted-post.visible {
  opacity: 1;
  text-decoration: none;
  filter: none;
}

.share-card {
  padding: 18px 16px 0;
}
.share-inner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
}
.share-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}
.share-card p {
  margin: 0 0 12px;
  color: #6d6f75;
}
.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 6px;
  background: #111722;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.site-footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 22px 16px 36px;
  color: #777b82;
  font-size: 12px;
}
.site-footer p { margin: 6px 0; }

.truth-card .notice-shell,
.truth-card .detail-inner,
.truth-card .share-inner,
.truth-card.thread-item,
.truth-card .thread-item {
  background: var(--truth-card);
  border-color: var(--truth-line);
  color: var(--truth-text);
}
.site-header.truth + .layout .breadcrumb-bar,
.truth-card .notice-content,
.truth-card .detail-description,
.truth-card .post-item,
.truth-card .share-inner,
.truth-card .search-card-inner,
.truth-card .threads-card { color: var(--truth-text); }
.notice-card.truth-card .notice-shell { background: var(--truth-card); border-color: var(--truth-line); }
.notice-card.truth-card .notice-banner { background: #7a4c52; }
.notice-card.truth-card .notice-box { background: rgba(255,255,255,.02); border-color: rgba(214,160,165,.55); }
.notice-card.truth-card .notice-label { background: #9b666d; }
.notice-card.truth-card .notice-sub,
.notice-card.truth-card .notice-text,
.threads-card.truth-card .section-caption,
.detail-card.truth-card .meta-muted,
.detail-card.truth-card .post-meta,
.share-card.truth-card p,
.search-card.truth-card .search-feedback { color: #d3bec1; }
.threads-card.truth-card .thread-item,
.detail-card.truth-card .detail-inner,
.detail-card.truth-card .post-item,
.share-card.truth-card .share-inner,
.search-card.truth-card .search-card-inner {
  background: var(--truth-card);
  border-color: var(--truth-line);
}
.threads-card.truth-card .thread-title,
.detail-card.truth-card .detail-top h3,
.share-card.truth-card h3 { color: #f3dde0; }
.threads-card.truth-card .thread-excerpt,
.threads-card.truth-card .thread-meta,
.detail-card.truth-card .detail-description,
.detail-card.truth-card .post-text { color: #efe5e6; }
.detail-card.truth-card .detail-top,
.detail-card.truth-card .post-meta { background: rgba(255,255,255,.04); border-color: var(--truth-line); }

#noise-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7,7,10,.78);
  z-index: 9999;
  cursor: pointer;
  overflow: hidden;
}
#noise-overlay.is-active { display: flex; }
.noise-layer {
  position: absolute;
  inset: -10%;
  opacity: .2;
  mix-blend-mode: screen;
}
.noise-layer-1 {
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.14) 0 2px, rgba(0,0,0,.18) 2px 4px);
  animation: noiseShift1 .18s steps(2) infinite;
}
.noise-layer-2 {
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 3px, rgba(0,0,0,.15) 3px 6px);
  animation: noiseShift2 .22s steps(2) infinite;
}
.noise-layer-3 {
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.12), transparent 22%), radial-gradient(circle at 70% 65%, rgba(255,255,255,.1), transparent 18%);
  animation: flicker .4s linear infinite;
}
.overlay-panel {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 28px 22px;
  width: min(92vw, 520px);
  border-radius: 18px;
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.12);
}
.overlay-title {
  margin: 0 0 8px;
  color: #a31414;
  font-size: clamp(28px, 8vw, 44px);
  font-weight: 700;
  text-shadow: 0 0 4px rgba(255,255,255,.15), 0 0 14px rgba(163,20,20,.5);
}
.overlay-sub {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 14px;
}
#noise-overlay.intensity-light .overlay-panel { transform: scale(.98); }
#noise-overlay.intensity-medium .overlay-panel { transform: scale(1); }
#noise-overlay.intensity-strong .overlay-panel { transform: scale(1.02); }

@keyframes noiseShift1 {
  0% { transform: translate(0,0); }
  50% { transform: translate(-1.5%, 1.2%); }
  100% { transform: translate(1%, -1%); }
}
@keyframes noiseShift2 {
  0% { transform: translate(0,0); }
  50% { transform: translate(1.4%, -1.2%); }
  100% { transform: translate(-1%, 1%); }
}
@keyframes flicker {
  0%, 100% { opacity: .18; }
  50% { opacity: .28; }
}

@media (min-width: 860px) {
  .topbar {
    grid-template-columns: 74px minmax(0,1fr) 74px 74px;
    padding: 12px 18px;
  }
  .topbar-button {
    height: 74px;
  }
  .layout {
    padding-bottom: 40px;
  }
  .search-form { grid-template-columns: minmax(0,1fr) 100px; }
}

@media (max-width: 430px) {
  .topbar { gap: 8px; padding: 10px 12px; }
  .branding-copy { font-size: 11px; }
  .branding-title { font-size: 22px; }
  .category-tab { padding: 13px 14px; font-size: 15px; }
  .breadcrumb-bar { font-size: 15px; }
  .thread-item { padding: 14px 12px; }
  .thread-title { font-size: 19px; }
  .thread-excerpt { font-size: 15px; }
  .thread-meta { font-size: 14px; }
  .post-text { font-size: 16px; }
}
