:root {
  --bg: #fff8ec;
  --surface: #ffffff;
  --surface-2: #fbefdc;
  --ink: #3b2412;
  --ink-soft: #7a5a43;
  --brand: #6b3e1f;
  --brand-ink: #fff8ec;
  --brand-hover: #55301a;
  --accent: #ffc93c;
  --border: #ead7bc;
  --danger: #b4372b;
  --sign: #1d7047;
  --shadow: 0 1px 0 rgba(59, 36, 18, 0.06), 0 6px 20px -8px rgba(59, 36, 18, 0.18);
  --radius: 18px;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b120b;
    --surface: #271a11;
    --surface-2: #322218;
    --ink: #f6e9d5;
    --ink-soft: #c4a68a;
    --brand: #e0a066;
    --brand-ink: #1b120b;
    --brand-hover: #eeb47f;
    --border: #46301f;
    --danger: #e0685a;
    --sign: #1f7a4d;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 24px -10px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-top: 24px;
  padding-bottom: 48px;
}

a {
  color: var(--brand);
  text-underline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin: 0 0 8px;
}

h2 {
  font-size: 1.5rem;
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header & footer */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.35rem;
  white-space: nowrap;
}

.logo-emoji {
  font-size: 1.6rem;
  display: inline-block;
  transition: transform 0.2s;
}

.logo:hover .logo-emoji {
  transform: rotate(-12deg) scale(1.1);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 0;
}

.nav a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.nav a:not(.btn):hover {
  color: var(--ink);
}

@media (max-width: 420px) {
  .logo-text {
    display: none;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 32px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
}

.footer-tag {
  margin: 0 0 8px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 0;
}

.footer-links a {
  color: var(--ink-soft);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  font: inherit;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}

.btn:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-big {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.35rem;
  padding: 14px 30px;
  letter-spacing: 0.02em;
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.9rem;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--brand);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  filter: brightness(1.1);
}

.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inline-form {
  display: inline;
  margin: 0;
}

/* Hero & stats */
.hero {
  text-align: center;
  padding: 24px 0 8px;
}

.hero-kicker {
  display: inline-block;
  background: var(--accent);
  color: #3b2412;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(2.6rem, 10vw, 4.2rem);
}

.hero-accent {
  color: var(--brand);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 12px auto 24px;
}

.hero-streak {
  margin-top: 18px;
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 32px 0;
}

@media (min-width: 620px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
  color: var(--brand);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.section-title {
  margin: 8px 0 16px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--sev, var(--border));
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  scroll-margin-top: 80px;
}

.sev-1 { --sev: #e8d5a8; --sev-bg: rgba(232, 213, 168, 0.35); }
.sev-2 { --sev: #c89f6a; --sev-bg: rgba(200, 159, 106, 0.22); }
.sev-3 { --sev: #8b5a2b; --sev-bg: rgba(139, 90, 43, 0.18); }
.sev-4 { --sev: #e0782c; --sev-bg: rgba(224, 120, 44, 0.18); }
.sev-5 { --sev: #d33a2c; --sev-bg: rgba(211, 58, 44, 0.16); }

.card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.sev-badge,
.setting-badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.sev-badge {
  background: var(--sev-bg);
  border: 1px solid var(--sev);
}

.setting-badge {
  background: var(--surface-2);
  color: var(--ink-soft);
}

.card-who {
  margin: 0 0 6px;
  font-weight: 600;
}

.card-who a {
  font-weight: 800;
}

.card-who time {
  color: var(--ink-soft);
}

.hidden-tag {
  color: var(--danger);
}

.story {
  margin: 0 0 14px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.story-empty {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95rem;
}

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

.support-form {
  margin: 0;
}

.support {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 12px 5px 9px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s, border-color 0.15s;
}

.support:hover {
  border-color: var(--border);
}

.support.on {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
}

.support.pop .s-emoji {
  animation: pop 0.35s ease;
}

@keyframes pop {
  50% { transform: scale(1.5) rotate(-10deg); }
}

.s-emoji {
  font-size: 1.1rem;
  display: inline-block;
}

.s-count {
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

@media (max-width: 520px) {
  .s-label {
    display: none;
  }
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 0.85rem;
}

.muted-link {
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
}

.muted-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.report summary {
  list-style: none;
}

.report summary::-webkit-details-marker {
  display: none;
}

.report[open] {
  flex-basis: 100%;
}

.report form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.report select {
  flex: 1;
  min-width: 0;
}

.thanks {
  color: var(--ink-soft);
  font-style: italic;
}

/* Panels & forms */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

@media (min-width: 620px) {
  .panel {
    padding: 32px;
  }
}

.narrow {
  max-width: 480px;
  margin: 0 auto;
}

.center {
  text-align: center;
}

.lede {
  color: var(--ink-soft);
  font-size: 1.08rem;
  margin: 0 0 20px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.field-label {
  font-weight: 800;
  font-size: 1.02rem;
  padding: 0;
}

.optional {
  font-weight: 500;
  color: var(--ink-soft);
}

.hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

input[type="email"],
input[type="text"],
input[type="date"],
textarea,
select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
}

select {
  width: auto;
  padding: 6px 10px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
.btn:focus-visible,
.support:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 2px;
  border-color: var(--brand);
}

.handle-input {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 1.2rem;
}

.sev-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 620px) {
  .sev-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.sev-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "emoji name" "emoji blurb";
  column-gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  background: var(--bg);
  transition: border-color 0.15s, background 0.15s;
}

@media (min-width: 620px) {
  .sev-option {
    grid-template-columns: 1fr;
    grid-template-areas: "emoji" "name" "blurb";
    text-align: center;
    padding: 14px 8px;
  }
}

.sev-option input,
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sev-emoji {
  grid-area: emoji;
  font-size: 1.8rem;
}

.sev-name {
  grid-area: name;
  font-weight: 800;
  line-height: 1.2;
}

.sev-blurb {
  grid-area: blurb;
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.3;
}

.sev-option:has(input:checked) {
  border-color: var(--sev);
  background: var(--sev-bg);
  box-shadow: inset 0 0 0 1px var(--sev);
}

.sev-option:has(input:focus-visible),
.chip:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 2px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip span {
  display: inline-block;
  padding: 7px 14px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.15s, background 0.15s;
}

.chip input:checked + span {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
}

.alert {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  border: 2px solid var(--danger);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-weight: 600;
}

.dev-note {
  background: var(--accent);
  color: #3b2412;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
}

.dev-note a {
  color: #3b2412;
}

/* The safety sign */
.sign {
  background: var(--sign);
  color: #fff;
  border-radius: 14px;
  border: 6px solid #fff;
  box-shadow: 0 0 0 2px var(--sign), var(--shadow);
  text-align: center;
  overflow: hidden;
  margin: 8px 0 18px;
  text-transform: uppercase;
}

.sign-top {
  background: repeating-linear-gradient(-45deg, var(--accent) 0 18px, #1d1d1d 18px 36px);
  color: transparent;
  height: 22px;
  font-size: 0;
}

.sign-body {
  padding: 22px 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  letter-spacing: 0.04em;
}

.sign-line {
  font-size: clamp(1.15rem, 4.5vw, 1.7rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.sign-num {
  background: #fff;
  color: #1d1d1d;
  font-size: clamp(4rem, 20vw, 7rem);
  line-height: 1;
  min-width: 1.6em;
  padding: 10px 22px 6px;
  border-radius: 10px;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.08), 0 4px 0 rgba(0, 0, 0, 0.25);
  font-variant-numeric: tabular-nums;
}

.sign-foot {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 10px 16px 18px;
  opacity: 0.9;
}

.sign-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
}

/* Misc */
.empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-soft);
}

.empty-emoji {
  font-size: 3.2rem;
  margin: 0 0 8px;
  line-height: 1;
}

.more {
  text-align: center;
}

.single-cta {
  text-align: center;
  color: var(--ink-soft);
}

.prose p,
.prose li {
  font-size: 1.05rem;
}

.prose li {
  margin-bottom: 6px;
}

.prose h2 {
  margin-top: 28px;
}

.danger-zone {
  margin-top: 40px;
  box-shadow: none;
}

.danger-zone h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--shadow);
  z-index: 20;
}

.cf-turnstile {
  min-height: 65px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
