:root {
  color-scheme: light;
  --bg: #fff8ef;
  --panel: #fffdf8;
  --ink: #25211d;
  --muted: #746b62;
  --line: #eadfce;
  --accent: #0f766e;
  --accent-dark: #0b5d57;
  --accent-soft: #d9f0eb;
  --warm: #f6b85b;
  --rose: #e97969;
  --danger: #b42318;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    linear-gradient(135deg, rgba(246, 184, 91, 0.18), transparent 34%),
    linear-gradient(315deg, rgba(15, 118, 110, 0.12), transparent 38%),
    var(--bg);
  background-size:
    28px 28px,
    28px 28px,
    auto,
    auto,
    auto;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

.composer,
.board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(83, 63, 38, 0.12);
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 26px;
  overflow: hidden;
  padding: 34px;
  position: relative;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 12px;
  font-size: 3.7rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.intro {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-copy {
  align-self: center;
}

.scene {
  min-height: 190px;
  align-self: stretch;
  border: 1px solid #efdfc7;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 250, 239, 0.5)),
    #fff4df;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.sun,
.note,
.pencil {
  position: absolute;
  display: block;
}

.sun {
  width: 58px;
  height: 58px;
  top: 22px;
  right: 28px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 10px 24px rgba(246, 184, 91, 0.35);
}

.note {
  width: 98px;
  height: 116px;
  border: 1px solid #ead8bd;
  border-radius: 7px;
  background:
    linear-gradient(#ffffff 0 0) 18px 28px / 62px 3px no-repeat,
    linear-gradient(#ffffff 0 0) 18px 48px / 48px 3px no-repeat,
    linear-gradient(#ffffff 0 0) 18px 68px / 58px 3px no-repeat,
    #f39f92;
  box-shadow: 0 14px 28px rgba(91, 70, 45, 0.16);
}

.note-one {
  left: 30px;
  bottom: 26px;
  transform: rotate(-7deg);
}

.note-two {
  right: 44px;
  bottom: 18px;
  width: 88px;
  height: 104px;
  background:
    linear-gradient(#ffffff 0 0) 16px 28px / 52px 3px no-repeat,
    linear-gradient(#ffffff 0 0) 16px 48px / 42px 3px no-repeat,
    #69b9ad;
  transform: rotate(8deg);
}

.pencil {
  width: 120px;
  height: 16px;
  left: 64px;
  top: 42px;
  border-radius: 12px 2px 2px 12px;
  background:
    linear-gradient(90deg, #2d2a26 0 10px, #f4c15d 10px 92px, #df7b67 92px);
  transform: rotate(-22deg);
}

.form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 16px;
  color: var(--ink);
  background: #fffaf1;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.2);
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.ghost {
  min-height: 40px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fffaf1;
  box-shadow: none;
}

.ghost:hover {
  background: #f4f8f6;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 24px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta-row .error {
  color: var(--danger);
}

.board {
  margin-top: 24px;
  padding: 24px;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.message-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.message {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 18px 16px;
  background:
    linear-gradient(90deg, var(--warm) 0 5px, transparent 5px),
    #fffaf1;
  box-shadow: 0 10px 24px rgba(83, 63, 38, 0.08);
}

.message p {
  overflow-wrap: anywhere;
  margin-bottom: 8px;
  font-size: 1.02rem;
  line-height: 1.6;
}

.message time {
  color: var(--muted);
  font-size: 0.88rem;
}

.empty {
  margin: 22px 0 0;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 960px);
    padding: 20px 0;
  }

  .composer {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .board {
    padding: 20px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .scene {
    min-height: 150px;
    order: -1;
  }

  .sun {
    width: 46px;
    height: 46px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .ghost {
    width: auto;
  }
}
