:root {
  --bg: #0c2418;
  --bg-2: #0a1c13;
  --fg: #f4ead8;
  --muted: #8b9d88;
  --rule: #1e3d2c;
  --warm: #d4c4a0;
}
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #2a5640 #0c2418;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, "Menlo", "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a, button {
  cursor: pointer;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
  border: none;
}
::-webkit-scrollbar-thumb {
  background: #2a5640;
  border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #3d6f52;
}
::-webkit-scrollbar-corner {
  background: var(--bg);
}
.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 36px 28px 72px;
}
nav, .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
nav {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
nav .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
}
nav .links a {
  flex: 0 0 auto;
  white-space: nowrap;
}
nav .stamp {
  align-self: flex-end;
}
nav a, .footer a, a {
  color: var(--fg);
  text-decoration: none;
}
nav a:hover, .footer a:hover, a:hover { text-decoration: underline; }
.stamp { color: var(--fg); white-space: nowrap; }
.rule {
  border: none;
  border-top: 1px dashed var(--rule);
  margin: 22px 0 32px;
}
h1 {
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.32em;
  margin: 0 0 24px;
}
h1.small {
  font-size: 15px;
  letter-spacing: 0.08em;
}
p { margin: 0 0 14px; }
.gap { height: 18px; }
.dash { color: var(--fg); margin: 26px 0 18px; }
.label { margin-top: 8px; margin-bottom: 6px; }
.attr { color: var(--muted); margin-bottom: 18px; }
.link { text-decoration: underline; text-underline-offset: 3px; }
a.maker {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}
a.maker:hover {
  color: var(--warm);
  text-decoration: underline;
  text-shadow: 0 0 16px rgba(212, 196, 160, 0.45);
}
.logo {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
  image-rendering: pixelated;
  background: transparent;
  border: none;
  margin: 0 0 28px;
}
.ascii {
  white-space: pre;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.22;
  color: var(--warm);
  margin: 18px 0;
  overflow-x: auto;
  overflow-y: hidden;
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: #2a5640 transparent;
}
.gen-item .ascii {
  margin: 8px 0 10px;
  min-height: 6em;
}
.ascii.center { text-align: center; }
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: flex-start;
}
.face { text-align: center; color: var(--fg); }
.face .label {
  color: var(--muted);
  font-size: 12px;
  margin-top: -2px;
}
.side {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}
.section-label { margin: 36px 0 4px; }
.section-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0 0 14px;
  width: 240px;
}
.tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-left: 10px;
  padding: 1px 7px;
  border: 1px solid var(--rule);
  color: var(--muted);
  vertical-align: middle;
}
.tag.open { color: var(--warm); border-color: var(--warm); }
.tag.done { color: #7d9a7a; }
.bounty-item { margin: 0 0 28px; }
.bounty-item .reward { color: var(--warm); }
.think-list { list-style: none; padding: 0; margin: 4px 0 10px; }
.think-list li {
  margin: 0 0 10px;
  padding-left: 16px;
  text-indent: -16px;
  line-height: 1.7;
}
.think-list li::before { content: "- "; color: var(--muted); }
.think-reason { color: var(--muted); margin-left: 6px; font-size: 12px; }
.think-sub { color: var(--muted); margin: 0 0 12px; font-size: 12.5px; }
.think-last { margin: 4px 0 18px; }
.think-last .kind { color: var(--fg); }
.think-last .body { color: var(--fg); margin-top: 4px; }
.footer { margin-top: 56px; }
.footer .left { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: center; }
.footer .socials { display: inline-flex; gap: 14px; margin-right: 8px; }
.built { color: var(--muted); }
button.ca {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  text-align: right;
  letter-spacing: 0.02em;
}
button.ca:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.entry { margin: 0 0 28px; }
.entry .date { color: var(--muted); margin-bottom: 2px; }
.entry .thought { color: var(--muted); font-size: 12px; }
.meta-row {
  color: var(--muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.meta-row strong { color: var(--fg); font-weight: 500; }
.pill {
  display: inline-block;
  border: 1px solid var(--rule);
  color: var(--muted);
  padding: 2px 8px;
  margin-right: 8px;
  font-size: 12px;
}

/* chat */
.chat-log {
  min-height: 280px;
  max-height: 58vh;
  overflow-y: auto;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
  padding: 18px 0;
  margin: 18px 0;
  scrollbar-width: thin;
  scrollbar-color: #2a5640 transparent;
}
.msg { margin: 0 0 16px; }
.msg .who { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.msg.user .who { color: var(--warm); }
.chat-form {
  display: flex;
  gap: 10px;
}
.chat-form input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  color: var(--fg);
  font: inherit;
  padding: 10px 12px;
  outline: none;
}
.chat-form button {
  background: var(--fg);
  color: var(--bg);
  border: none;
  font: inherit;
  padding: 10px 16px;
  cursor: pointer;
}
.chat-form button:disabled { opacity: 0.5; cursor: wait; }

@media (max-width: 560px) {
  h1 { letter-spacing: 0.18em; font-size: 18px; }
  nav .links { gap: 0 10px; }
  .logo { width: 160px; height: 160px; }
}
