:root {
  --red: #f20d18;
  --red-dark: #c4070f;
  --black: #0a0a0a;
  --ink: #111;
  --card: #161616;
  --line: #2a2a2a;
  --paper: #fffdf6;
  --white: #fff;
  --muted: #9a9a9a;
  --radius: 18px;
  --logo: "Comic Neue", "Comic Sans MS", "Chalkboard SE", cursive;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; opacity: 0; }

/* ---------- ticker ---------- */
.ticker {
  background: var(--black);
  border-bottom: 2px solid var(--black);
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ticker-track {
  display: inline-block;
  padding: 8px 0;
  animation: scroll 40s linear infinite;
}
.ticker span {
  margin: 0 22px;
  color: #bbb;
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- hero ---------- */
.hero {
  background: var(--red);
  color: var(--white);
  padding: 0 16px 64px;
  position: relative;
}
.nav {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--logo);
  font-weight: 700;
  font-size: 24px;
  text-decoration: none;
}
.nav-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid var(--black);
  object-fit: cover;
}
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 700; }
.nav-links a:not(.btn):hover { text-decoration: underline; }

.hero-body {
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
  padding-top: 40px;
}
.mascot {
  display: block;
  width: clamp(140px, 26vw, 210px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 6px solid var(--black);
  box-shadow: 0 8px 0 rgba(0,0,0,.25);
  transform: rotate(-4deg);
  transition: transform .2s ease;
}
.mascot:hover { transform: rotate(3deg) scale(1.04); }
.logo {
  font-family: var(--logo);
  font-weight: 700;
  font-size: clamp(56px, 14vw, 150px);
  line-height: .95;
  margin: 0;
  letter-spacing: -.01em;
  text-shadow: 0 6px 0 rgba(0,0,0,.12);
}
.logo.small { font-size: 36px; text-shadow: none; }
.tagline {
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 700;
  margin: 18px 0 30px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero-stats div {
  background: var(--black);
  border-radius: 14px;
  padding: 12px 20px;
  min-width: 170px;
}
.hero-stats strong { display: block; font-size: 28px; font-weight: 800; }
.hero-stats span { font-size: 13px; color: #ccc; }

.x-link {
  display: inline-flex;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
}
.x-link svg { width: 17px; height: 17px; fill: currentColor; }
.x-link:hover { background: #222; }

/* ---------- contract address ---------- */
.ca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-top: 28px;
  padding: 8px 8px 8px 16px;
  background: var(--black);
  border-radius: 999px;
  font-size: 14px;
}
.ca-label {
  font-weight: 800;
  color: var(--red);
  letter-spacing: .08em;
}
.ca-value {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  color: #ddd;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ca-copy, .ca-pump {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.ca-copy { background: var(--red); color: var(--white); }
.ca-copy:hover { background: var(--red-dark); }
.ca-pump { background: var(--white); color: var(--black); }
.ca-pump:hover { background: #e9e9e9; }
.ca:not(.has-ca) .ca-value { font-family: var(--body); font-style: italic; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, opacity .15s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-big { padding: 15px 30px; font-size: 18px; }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: #222; }
.btn-light { background: var(--white); color: var(--black); box-shadow: 0 5px 0 var(--black); }
.btn-light:hover { background: #f1f1f1; }
.btn-red { background: var(--red); color: var(--white); box-shadow: 0 5px 0 var(--black); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--line); }
.btn-outline:hover { border-color: var(--white); }

/* ---------- layout ---------- */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 80px;
}
.panel {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  border: 3px solid var(--black);
  box-shadow: 0 10px 0 var(--red);
  padding: 24px;
  margin-top: -36px;
  position: relative;
}

/* ---------- confess form ---------- */
.memo-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-direction: row-reverse;
  font-family: "Courier New", monospace;
  font-size: 14px;
  border-bottom: 2px dashed #bbb;
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.memo-head > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
}
.memo-label { font-weight: 700; }
.stamp {
  color: var(--red);
  border: 3px solid var(--red);
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: 800;
  letter-spacing: .12em;
  transform: rotate(-8deg);
  font-family: var(--body);
  font-size: 13px;
  opacity: .9;
  flex-shrink: 0;
}

textarea, input, select {
  width: 100%;
  border: 2px solid var(--black);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--white);
  color: var(--ink);
  outline: none;
}
textarea { resize: vertical; min-height: 130px; font-size: 17px; }
textarea:focus, input:focus, select:focus { box-shadow: 0 0 0 4px rgba(242, 13, 24, .25); border-color: var(--red); }
.counter { text-align: right; font-size: 12px; color: #777; margin: 4px 2px 12px; }
.counter.warn { color: var(--red); font-weight: 700; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field .muted { font-weight: 400; color: #777; }

.fineprint { font-size: 13px; color: #555; margin: 16px 0; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.form-msg { margin: 0; font-weight: 700; font-size: 14px; flex: 1; min-width: 180px; }
.form-msg.error { color: var(--red); }
.form-msg.ok { color: #0a7a2f; }

/* ---------- feed ---------- */
.feed { margin-top: 64px; }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.feed-head h2 { font-family: var(--logo); font-size: 36px; margin: 0; }
.sort, .filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { margin: 16px 0 24px; }

.chip {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  cursor: pointer;
}
.chip:hover { border-color: #555; }
.chip.active { background: var(--red); border-color: var(--red); }
.chip.small { font-size: 13px; padding: 5px 12px; }

.list { display: grid; gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--red);
  border-radius: 14px;
  padding: 18px 20px;
  animation: pop .25s ease;
}
.card.fresh { border-color: var(--red); box-shadow: 0 0 0 3px rgba(242, 13, 24, .25); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: #2a0a0b;
  color: #ff6b72;
  padding: 3px 9px;
  border-radius: 999px;
}
.time { font-size: 13px; color: var(--muted); }
.card-text { font-size: 18px; margin: 0 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.role { font-size: 13px; color: var(--muted); font-style: italic; }
.role::before { content: "— "; }
.reacts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.react {
  background: #1f1f1f;
  border: 1px solid var(--line);
  color: var(--white);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.react:hover { border-color: #555; }
.react.on { background: var(--red); border-color: var(--red); }
.react b { font-weight: 800; }
.report {
  background: none;
  border: 0;
  color: #555;
  cursor: pointer;
  font-size: 15px;
  padding: 4px 6px;
}
.report:hover { color: var(--red); }
.report.done { color: var(--red); cursor: default; }

.empty, .loading {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  border: 2px dashed var(--line);
  border-radius: 14px;
}
.more-wrap { text-align: center; margin-top: 24px; }

/* ---------- footer ---------- */
.footer {
  background: var(--red);
  text-align: center;
  padding: 40px 16px;
  font-weight: 700;
}
.footer p { margin: 6px 0; }
.footer-x { text-decoration: underline; text-underline-offset: 3px; }
.footer .muted { color: rgba(255,255,255,.75); font-weight: 400; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  .row { grid-template-columns: 1fr; }
  .memo-head { flex-direction: column-reverse; }
  .nav-links a:not(.btn) { display: none; }
  .react span { display: none; }
  .form-foot .btn { width: 100%; }
  .panel { padding: 18px; }
  .ca { display: flex; flex-wrap: wrap; justify-content: center; border-radius: 16px; padding: 10px 12px; }
  .ca-value { flex-basis: 100%; order: 3; text-align: center; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
  .card { animation: none; }
}
