:root {
  --paper: #F6F1E7;
  --card: #FFFDF8;
  --ink: #22201C;
  --ink-soft: #4A463E;
  --muted: #8A8377;
  --line: #E6DECC;
  --accent: #E8622C;
  --accent-soft: #FBE7DD;
  --ok: #2F7D63;
  --shadow: 0 10px 30px rgba(60, 45, 20, 0.08);
  --shadow-sm: 0 3px 10px rgba(60, 45, 20, 0.06);
  --radius: 16px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 15% 12%, rgba(232, 98, 44, 0.06), transparent 40%),
    radial-gradient(circle at 85% 8%, rgba(47, 125, 99, 0.05), transparent 38%);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 56px;
}

/* ---------- Hero ---------- */

.hero { text-align: center; }

.avatar {
  width: 148px;
  height: 148px;
  margin: 0 auto 22px;
  border-radius: 50%;
  padding: 5px;
  background: var(--card);
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  filter: saturate(1.02);
}

.hero-title {
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-transform: uppercase;
}

.hero-line {
  display: block;
  font-size: clamp(1.5rem, 6vw, 2.05rem);
}

.hero-line--big {
  font-size: clamp(1.9rem, 8vw, 2.75rem);
  margin-top: 2px;
}

.tagline {
  max-width: 460px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.leaf {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: -4px;
  margin-left: 2px;
  color: var(--ok);
}

/* ---------- Board ---------- */

.main { margin-top: 40px; }

.board-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.board-title {
  margin: 0;
  font-size: clamp(1.6rem, 6vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.chat-doodle {
  width: 34px;
  height: 34px;
  color: var(--accent);
  flex: none;
}

.board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 60px;
}

.board-status {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.msg {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  animation: pop 0.35s ease both;
}

.msg--sample { border-style: dashed; }

.msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.msg-meta {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.msg-icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent);
  opacity: 0.9;
}

.msg-body {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 14px;
  align-self: center;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Composer ---------- */

.composer { margin-top: 26px; }

.post-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr auto auto;
  gap: 12px;
  align-items: stretch;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.field label {
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  padding-left: 2px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea { min-height: 78px; }

.field input::placeholder,
.field textarea::placeholder { color: #B4AC9E; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.composer-avatar {
  align-self: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
}

.composer-avatar svg { width: 26px; height: 26px; }

.post-btn {
  align-self: center;
  flex: none;
  border: none;
  border-radius: 11px;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--card);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.post-btn:hover { background: var(--accent); transform: translateY(-1px); }
.post-btn:active { transform: translateY(0); }
.post-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  min-height: 22px;
  margin: 12px 4px 0;
  font-size: 0.92rem;
  text-align: center;
  color: var(--muted);
}

.form-note--ok { color: var(--ok); font-weight: 600; }
.form-note--error { color: var(--accent); font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1.5px solid var(--line);
  text-align: center;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 14px;
}

.socials a {
  width: 26px;
  height: 26px;
  color: var(--ink-soft);
  transition: color 0.15s ease, transform 0.15s ease;
}

.socials a:hover { color: var(--accent); transform: translateY(-2px); }
.socials svg { width: 100%; height: 100%; }

.copyright {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 620px) {
  .post-form { grid-template-columns: 1fr 1fr; }
  .field--name { grid-column: 1 / -1; }
  .field--body { grid-column: 1 / -1; }
  .composer-avatar { justify-self: start; }
  .post-btn { justify-self: stretch; }
}

@media (max-width: 400px) {
  .avatar { width: 124px; height: 124px; }
}

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