:root {
  color-scheme: light;
  --ink: #202020;
  --muted: #5c5c5b;
  --line: #ded9d0;
  --paper: #f7f7f2;
  --white: #ffffff;
  --warm: #feaf50;
  --warm-strong: #fdcb5b;
  --blue: #186ec5;
  --purple: #6d5a9c;
  --shadow: 0 18px 50px rgb(32 32 32 / 12%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: linear-gradient(135deg, rgb(254 175 80 / 14%), transparent 30%),
    linear-gradient(160deg, var(--paper) 0%, var(--white) 48%, #efe9df 100%);
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border: 4px solid var(--ink);
  border-radius: 8px;
  background: linear-gradient(
      135deg,
      transparent 0 42%,
      var(--warm) 42% 58%,
      transparent 58%
    ),
    linear-gradient(90deg, var(--blue), var(--purple));
  box-shadow: 8px 8px 0 var(--warm-strong);
}

.eyebrow,
.featured p,
.comment-card time {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 2px 0 0;
  font-size: clamp(2rem, 6vw, 4.75rem);
  line-height: 0.95;
}

.wall-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 10px 24px rgb(32 32 32 / 8%);
}

.live-pill span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 6px rgb(24 110 197 / 14%);
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.media-rail {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 16px;
}

.announcement,
.agenda-grid img,
.qr-card {
  display: block;
  width: 100%;
  border: 1px solid rgb(32 32 32 / 10%);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.announcement {
  max-height: 58vh;
  object-fit: contain;
}

.qr-card {
  display: grid;
  gap: 12px;
  align-items: center;
  justify-items: center;
  padding: 18px;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}

.qr-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 0 20px 56px rgb(32 32 32 / 14%);
}

.qr-code {
  display: block;
  width: min(100%, 360px);
  aspect-ratio: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.qr-card span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.qr-card strong {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1;
}

.qr-card small {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.agenda-grid {
  display: grid;
  gap: 16px;
}

.agenda-grid img {
  aspect-ratio: 600 / 337;
  object-fit: cover;
}

.wall {
  display: grid;
  gap: 18px;
}

.comment-form,
.featured {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 12px 34px rgb(32 32 32 / 10%);
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) minmax(260px, 1fr);
  gap: 14px;
  padding: 16px;
}

.comment-form label {
  display: grid;
  gap: 8px;
}

.comment-form label span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.message-field {
  grid-column: span 1;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d7d2c9;
  border-radius: 6px;
  background: #fcfbf8;
  color: var(--ink);
  outline: none;
}

input {
  min-height: 52px;
  padding: 0 14px;
}

textarea {
  min-height: 112px;
  padding: 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgb(24 110 197 / 14%);
}

.form-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.form-actions p {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

#charCount {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

button {
  min-width: 112px;
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-weight: 900;
  box-shadow: 6px 6px 0 var(--warm);
}

button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 var(--warm);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.featured {
  display: grid;
  gap: 6px;
  padding: 20px;
  border-left: 8px solid var(--warm);
}

.featured blockquote {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2.65rem);
  font-weight: 900;
  line-height: 1.05;
}

.comments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.comment-card {
  min-height: 160px;
  display: grid;
  gap: 12px;
  align-content: space-between;
  padding: 18px;
  border: 1px solid rgb(32 32 32 / 10%);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 26px rgb(32 32 32 / 10%);
}

.comment-card:nth-child(3n + 1) {
  border-top: 8px solid var(--warm);
}

.comment-card:nth-child(3n + 2) {
  border-top: 8px solid var(--blue);
}

.comment-card:nth-child(3n + 3) {
  border-top: 8px solid var(--purple);
}

.comment-card p {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.comment-card footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.comment-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 2px dashed #d7d2c9;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .media-rail {
    position: static;
    grid-template-columns: minmax(220px, 0.7fr) 1fr;
    align-items: start;
  }

  .agenda-grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .announcement {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .wall-meta {
    width: 100%;
    justify-content: space-between;
  }

  .media-rail,
  .comment-form {
    grid-template-columns: 1fr;
  }

  .agenda-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    grid-template-columns: 1fr auto;
  }

  .form-actions p {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .comment-card {
    animation: rise 220ms ease-out both;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
