:root {
  color-scheme: light;
  --bg: #f7efe5;
  --bg-accent: #f2d2b6;
  --surface: rgba(255, 252, 248, 0.88);
  --surface-strong: #fffaf4;
  --border: rgba(92, 61, 46, 0.14);
  --text: #2f241f;
  --muted: #6e5b52;
  --primary: #c85f2d;
  --primary-dark: #9b431a;
  --shadow: 0 20px 50px rgba(82, 48, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 32%),
    linear-gradient(160deg, var(--bg) 0%, #f5e0ce 48%, var(--bg-accent) 100%);
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.hero {
  padding: 16px 0 28px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.hero h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.96;
}

.lead {
  max-width: 86ch;
  margin: 16px 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}

.card,
.note {
  backdrop-filter: blur(10px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.card {
  margin-top: 20px;
  padding: 24px;
}

.note {
  margin-top: 20px;
  padding: 18px 20px;
  color: var(--muted);
  line-height: 1.5;
}

.row {
  display: flex;
  gap: 18px;
}

.channel-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: start;
}

.row + .row,
.row + .actions,
.actions + .row,
.actions + .actions {
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.row-wrap {
  flex-wrap: wrap;
}

.grow {
  flex: 1;
  min-width: 260px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}

.field label {
  font-size: 0.92rem;
  color: var(--muted);
}

input,
textarea,
.received {
  width: 100%;
  border: 1px solid rgba(102, 65, 43, 0.16);
  border-radius: 16px;
  background: var(--surface-strong);
  padding: 14px 16px;
  color: var(--text);
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(200, 95, 45, 0.22);
  border-color: rgba(200, 95, 45, 0.3);
}

textarea {
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.qr-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.qr-frame {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 204px;
  border: 1px solid rgba(102, 65, 43, 0.16);
  border-radius: 22px;
  background: var(--surface-strong);
  padding: 12px;
}

.qr-frame canvas {
  display: block;
  width: min(180px, 100%);
  height: auto;
}

.qr-caption {
  margin: 0;
  text-align: center;
  color: var(--muted);
  line-height: 1.5;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--primary);
  color: #fffaf7;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--primary-dark);
}

button.secondary {
  background: rgba(92, 61, 46, 0.08);
  color: var(--text);
}

button.secondary:hover {
  background: rgba(92, 61, 46, 0.14);
}

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

.section-title h2 {
  margin: 0 0 6px;
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

.received {
  margin: 0;
  min-height: 220px;
  white-space: pre-wrap;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 960px);
    padding-top: 28px;
    padding-bottom: 40px;
  }

  .channel-layout {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
  }

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

  .actions {
    width: 100%;
  }

  .actions button {
    flex: 1;
    min-width: 180px;
  }
}
