:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #65716c;
  --surface: #fffdf8;
  --line: #dfe6df;
  --accent: #276b53;
  --accent-hover: #1d523f;
  --accent-soft: #dcece4;
  --warm: #f1b56a;
  --danger: #a83d3d;
  --shadow: 0 18px 55px rgba(35, 58, 49, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f2f5ef;
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.site-header {
  padding: 70px 24px 105px;
  color: white;
  background:
    radial-gradient(circle at 78% 24%, rgba(241, 181, 106, 0.32), transparent 24%),
    linear-gradient(135deg, #183e32, #2d755b);
}

.header-content, .layout, footer { width: min(1040px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow, .section-label { margin: 0 0 8px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.eyebrow { color: #b9decf; }
.site-header h1 { margin: 0; font-size: clamp(2.25rem, 6vw, 4.5rem); letter-spacing: -0.045em; }
.site-header p:last-child { max-width: 620px; margin: 16px 0 0; color: #d8ebe3; font-size: 1.05rem; line-height: 1.7; }

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(340px, 1.18fr);
  gap: 28px;
  margin-top: -62px;
}

.card, .feed {
  border: 1px solid rgba(223, 230, 223, 0.9);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card { padding: 28px; align-self: start; }
.feed { min-height: 430px; padding: 28px; }
.section-heading, .feed-heading, .form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h2 { margin: 0; font-size: 1.45rem; letter-spacing: -0.02em; }
.section-label { color: var(--accent); }
.status-dot { width: 12px; height: 12px; border: 3px solid #b8d7c9; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }

form { margin-top: 24px; }
label { display: block; margin: 17px 0 8px; font-size: 0.86rem; font-weight: 750; }
input, textarea {
  width: 100%;
  border: 1px solid #ccd7cf;
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.form-footer { margin-top: 16px; }
#character-count { color: var(--muted); font-size: 0.8rem; }
button { border: 0; border-radius: 999px; padding: 11px 18px; color: white; background: var(--accent); font: inherit; font-weight: 750; cursor: pointer; transition: transform 0.15s, background 0.15s; }
button:hover { background: var(--accent-hover); transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: 0.65; transform: none; }
.secondary-button { padding: 9px 14px; color: var(--accent); background: var(--accent-soft); font-size: 0.82rem; }
.secondary-button:hover { color: white; }
.message { min-height: 1.3em; margin: 14px 0 0; font-size: 0.86rem; }
.message.error { color: var(--danger); }
.message.success { color: var(--accent); }

.posts { display: grid; gap: 14px; margin-top: 24px; }
.post { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.post-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.post-username { font-weight: 800; }
.post-time { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.post-content { margin: 12px 0 0; line-height: 1.68; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-state { margin: 50px 0; color: var(--muted); text-align: center; line-height: 1.7; }
footer { padding: 32px 0 42px; color: var(--muted); font-size: 0.8rem; text-align: center; }

@media (max-width: 760px) {
  .site-header { padding-top: 48px; }
  .layout { grid-template-columns: 1fr; }
  .card, .feed { padding: 22px; border-radius: 18px; }
}

