:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --panel: #fffdfa;
  --ink: #1f2a2a;
  --muted: #657170;
  --line: #dfd8cd;
  --coral: #e96550;
  --mint: #4ba985;
  --gold: #d6a53e;
  --blue: #3d6f9e;
  --shadow: 0 18px 50px rgba(39, 42, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(75, 169, 133, 0.14), transparent 32%),
    linear-gradient(315deg, rgba(233, 101, 80, 0.12), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.masthead {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  padding: 8px 2px 10px;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.78);
  color: var(--muted);
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(214, 165, 62, 0.14);
}

.status-pill.online .status-dot {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(75, 169, 133, 0.14);
}

.status-pill.offline .status-dot {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(233, 101, 80, 0.14);
}

.composer,
.board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.88);
  box-shadow: var(--shadow);
}

.composer {
  position: sticky;
  top: 20px;
  padding: 18px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

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

input {
  height: 46px;
  padding: 0 12px;
}

textarea {
  min-height: 130px;
  resize: vertical;
  padding: 12px;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(61, 111, 158, 0.14);
}

.form-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

fieldset {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.swatch-option {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.swatch-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatch {
  width: 30px;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 999px;
}

.swatch-option input:checked + .swatch {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(31, 42, 42, 0.12);
}

.coral {
  background: var(--coral);
}

.mint {
  background: var(--mint);
}

.gold {
  background: var(--gold);
}

.ink {
  background: var(--ink);
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

#submit-button {
  min-width: 96px;
  height: 46px;
  padding: 0 18px;
  background: var(--ink);
  color: #fffdfa;
}

.ghost-button,
.delete-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.ghost-button {
  height: 38px;
  padding: 0 13px;
}

.delete-button {
  align-self: start;
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
}

.board {
  min-height: 520px;
  padding: 18px;
}

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

h2 {
  font-size: 1.1rem;
}

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

.note {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.note-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.note-accent {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--coral);
}

time {
  color: var(--muted);
  font-size: 0.8rem;
}

h3 {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  line-height: 1.28;
}

.note p {
  overflow-wrap: anywhere;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding: 18px 0;
  }

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

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

  .composer {
    position: static;
  }

  .form-row {
    align-items: stretch;
    flex-direction: column;
  }

  #submit-button {
    width: 100%;
  }
}
