:root {
  color-scheme: light;
  --bg: #f5f5f2;
  --panel: #ffffff;
  --text: #171717;
  --muted: #6b6b6b;
  --line: #deded8;
  --accent: #111111;
  --soft: #efefe9;
  --ok: #216e3a;
  --error: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell { width: min(720px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 40px; }
.hero { margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
h1 { margin: 0; font-size: clamp(38px, 9vw, 64px); line-height: .98; letter-spacing: -.05em; }
h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.sub { margin: 16px 0 0; color: var(--muted); font-size: 17px; line-height: 1.5; }

.card, .message {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,.04);
}

.compose { padding: 22px; }
.card-head, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-head { margin-bottom: 20px; }
.price { font-weight: 800; font-size: 17px; }

label { display: block; margin: 16px 0 7px; font-size: 14px; font-weight: 700; }
label span { color: var(--muted); font-weight: 500; }
input, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text);
  font: inherit; padding: 12px 13px; outline: none;
}
input:focus, textarea:focus { border-color: var(--text); }
textarea { min-height: 125px; resize: vertical; }
.counter { text-align: right; margin-top: 5px; font-size: 12px; color: var(--muted); }

.payment-box { margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--soft); }
.payment-box p { margin: 6px 0 11px; color: var(--muted); font-size: 13px; line-height: 1.45; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

.button, .text-button { font: inherit; cursor: pointer; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; text-decoration: none; font-weight: 800; }
.button.primary { width: 100%; margin-top: 18px; background: var(--accent); color: white; }
.button.secondary { background: white; color: var(--text); border-color: var(--line); }
.text-button { border: 0; background: transparent; color: var(--muted); padding: 4px; }

.status { min-height: 20px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.error { color: var(--error); }

.wall { margin-top: 34px; }
.messages { display: grid; gap: 12px; margin-top: 14px; }
.message { padding: 18px; }
.message-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.message-text { margin: 11px 0 0; font-size: 17px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { margin: 0; color: var(--muted); padding: 22px 0; }
footer { margin-top: 30px; text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 520px) {
  .shell { width: min(100% - 20px, 720px); padding-top: 32px; }
  .compose { padding: 17px; }
  h1 { font-size: 42px; }
}
