/* ---- Theme: colors lifted straight from the blog's own palette ---- */
:root {
  --bg: #f6f1e4;
  --panel-bg: #fffdf7;
  --stripe-bg: #efe6d2;
  --text: #2a251d;
  --muted: #8a7f66;
  --accent: #a8432b;
  --accent-hover: #7a2f1d;
  --border: #d8cdb4;
  --font: Verdana, Geneva, Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 320px;
  border: 1px solid var(--border);
}

#app-header {
  padding: 8px 10px;
  background: var(--panel-bg);
  border-bottom: 3px double var(--accent);
  flex-shrink: 0;
}

#app-title {
  font-weight: bold;
  font-size: 13px;
}

#messages {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
}

.message {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.message:nth-child(even) {
  background: var(--stripe-bg);
}

.message .name {
  color: var(--accent);
  font-weight: bold;
  margin-right: 4px;
}

.message .name::after {
  content: ":";
}

.message .time {
  color: var(--muted);
  font-size: 10px;
  margin-left: 6px;
}

.message .text {
  white-space: pre-wrap;
}

#post-form {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 8px 10px 10px;
  background: var(--panel-bg);
}

.form-row {
  margin-bottom: 6px;
}

.form-row:last-child {
  margin-bottom: 0;
}

#name-input,
#text-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  padding: 4px 6px;
  font-family: inherit;
  font-size: 12px;
  resize: none;
}

#name-input:focus,
#text-input:focus {
  outline: 1px solid var(--accent);
  outline-offset: 0;
}

#submit-btn {
  width: 100%;
  border: 1px solid var(--accent-hover);
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

#submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#submit-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

#status {
  min-height: 1.2em;
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 4px;
}

#status:empty {
  margin-bottom: 0;
}

/* Honeypot field: visually hidden but present in the DOM */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  margin: 0;
}
