:root {
  --ink: #172033;
  --muted: #606575;
  --paper: #f4f7fb;
  --yellow: #ffd43b;
  --line: #d8dce4;
  --red: #b32d38;
  --green: #246647;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Trebuchet MS", sans-serif; line-height: 1.5; }
button, input, textarea { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.masthead { min-height: 78px; padding: 20px max(24px, calc((100% - 1120px) / 2)); display: flex; gap: 24px; justify-content: space-between; align-items: center; background: var(--yellow); border-bottom: 2px solid var(--ink); }
.brand { font-size: 16px; font-weight: 800; text-decoration: none; }
.brand span { font-weight: 400; }
.home-link { font-size: 13px; text-underline-offset: 4px; }
.home-link span { margin-left: 6px; }
main { max-width: 1168px; margin: 0 auto; padding: 0 24px 64px; }
.page-heading { padding: 42px 0 30px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 700; color: var(--muted); }
h1 { margin: 0; font-size: 42px; line-height: 1.15; letter-spacing: 0; }
.heading-dot { color: var(--red); }
.noah-car { width: 220px; height: 138px; object-fit: contain; mix-blend-mode: multiply; }
.guestbook-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 60px; padding-top: 32px; }
.section-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.section-number { width: 30px; height: 30px; display: grid; place-items: center; background: var(--yellow); font-size: 11px; font-weight: 700; border: 1px solid var(--ink); }
h2 { font-size: 21px; line-height: 1.3; margin: 0; }
label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
input, textarea { display: block; width: 100%; background: white; color: var(--ink); border: 1px solid #aeb5c2; border-radius: 4px; padding: 12px 14px; }
input { height: 48px; margin-bottom: 24px; }
textarea { resize: vertical; min-height: 160px; max-height: 500px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#character-count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.submit-button { margin-top: 20px; width: 100%; min-height: 48px; padding: 12px 18px; border: 1px solid var(--ink); border-radius: 4px; background: var(--yellow); color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 700; }
.submit-button:hover { background: #ffe376; }
button:disabled { cursor: wait; opacity: 0.65; }
.status { margin: 12px 0 0; font-size: 14px; overflow-wrap: anywhere; }
#form-status { min-height: 42px; }
.status.error { color: var(--red); }
.status.success { color: var(--green); }
.list-status { margin: 0 0 16px; color: var(--muted); }
.messages { min-height: 100px; }
.message-entry { padding: 22px 0; border-bottom: 1px solid var(--line); animation: arrive 240ms ease-out; }
.message-entry:first-child { padding-top: 0; }
.message-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.message-name { font-size: 16px; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.message-meta time { font-size: 11px; color: var(--muted); }
.message-body { font-size: 16px; margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.secondary-button { min-height: 42px; padding: 9px 14px; background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.secondary-button:hover { border-color: var(--ink); }
.list-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
footer { max-width: 1120px; margin: 0 auto; padding: 24px 0; border-top: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; font-size: 12px; color: var(--muted); }
@keyframes arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
  .masthead { padding: 16px 20px; min-height: 70px; }
  .brand { font-size: 13px; }
  .brand span { display: none; }
  .home-link { font-size: 12px; max-width: 110px; text-align: right; }
  main { padding: 0 20px 40px; }
  .page-heading { padding: 26px 0 24px; gap: 12px; }
  h1 { font-size: 30px; max-width: 240px; }
  .noah-car { width: 100px; height: 90px; }
  .guestbook-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: 24px; }
  .section-heading { margin-bottom: 22px; }
  h2 { font-size: 19px; }
  footer { margin: 0 20px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .message-entry { animation: none; } }