/* Website editor: big, simple, phone first. */
:root {
  --bg: #f6f4f0;
  --card: #fff;
  --ink: #1f2420;
  --muted: #5d655f;
  --line: #d9d5cc;
  --brand: #2f5d46;
  --brand-ink: #fff;
  --danger: #a3271f;
  --you: #e4efe7;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main, .top, .foot { max-width: 46rem; margin: 0 auto; padding-inline: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding-block: calc(env(safe-area-inset-top, 0px) + 12px) 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.top h1 { margin: 0; font-size: 1.3rem; }
.tabs { display: flex; gap: 6px; }
.tab {
  font: inherit;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
}
.tab[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

.btn {
  font: inherit;
  font-weight: 600;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--photo { display: inline-flex; align-items: center; }

.draft {
  margin-block: 16px;
  padding: 14px 16px;
  background: var(--card);
  border: 2px solid var(--brand);
  border-radius: 14px;
}
.draft__title { margin: 0 0 4px; font-weight: 700; }
.draft__changes { margin: 0 0 8px; padding-left: 1.2em; }
.draft__preview { margin: 0 0 12px; color: var(--muted); }
.draft__preview a { color: var(--brand); font-weight: 700; }
.draft__actions, .confirm { display: flex; flex-wrap: wrap; gap: 10px; }
.confirm { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); align-items: center; }
.confirm p { margin: 0; flex-basis: 100%; }

.messages { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.msg {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 92%;
}
.msg--you { align-self: flex-end; background: var(--you); border-color: var(--you); }
.msg--note { align-self: center; background: none; border: none; color: var(--muted); font-size: 0.9rem; text-align: center; }
.msg--error { border-color: var(--danger); color: var(--danger); }
.msg--busy { color: var(--muted); font-style: italic; }

.composer {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding-block: 8px calc(env(safe-area-inset-bottom, 0px) + 12px);
}
.composer textarea {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  resize: vertical;
}
.composer__row { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.photos:empty { display: none; }
.photo { position: relative; }
.photo img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; display: block; }
.photo button {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  font: inherit;
  line-height: 1;
}

.hint { color: var(--muted); }
.history { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.history li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.history .meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 4px; }
.history .summary { margin: 0 0 10px; font-weight: 600; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--line); font-size: 0.9rem; }

.foot { padding-block: 8px 24px; color: var(--muted); font-size: 0.85rem; }
