:root {
  color-scheme: dark;
  --ink: #24161f;
  --plum: #3b2233;
  --rose: #d95c75;
  --rose-dark: #a63e5a;
  --cream: #fff6e7;
  --paper: #fffaf1;
  --gold: #e7b665;
  --muted: #a8949f;
  --line: rgba(255, 246, 231, 0.14);
  font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    radial-gradient(circle at 18% 6%, rgba(217, 92, 117, 0.19), transparent 32rem),
    radial-gradient(circle at 92% 42%, rgba(231, 182, 101, 0.1), transparent 28rem),
    var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

main {
  position: relative;
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 88px;
}

[hidden] { display: none !important; }

h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 7vw, 4.7rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.045em;
}
h1 span { color: var(--rose); font-size: 0.72em; }
h2 { margin-bottom: 0; font-size: 2rem; font-weight: 400; }

.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.27);
  backdrop-filter: blur(16px);
}

.login {
  width: min(480px, 100%);
  margin: 8vh auto 0;
  padding: clamp(32px, 7vw, 58px);
}

.mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--cream);
  background: var(--rose);
  box-shadow: 0 12px 35px rgba(217, 92, 117, 0.32);
  font-size: 28px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.18em;
}

.lede {
  color: #d8cad0;
  font-size: 1.15rem;
  line-height: 1.6;
}

header, .section-heading, .send-row, .message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

header { margin-bottom: 42px; }

label {
  display: block;
  margin-bottom: 9px;
  color: #d9cbd2;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

label span { color: var(--muted); font-weight: 500; }

input, textarea, button {
  font: inherit;
}

input, textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  outline: none;
  color: var(--cream);
  background: rgba(16, 8, 14, 0.38);
}

input { min-height: 48px; padding: 0 15px; }
textarea {
  padding: 18px;
  resize: vertical;
  font-size: 1.18rem;
  line-height: 1.55;
}

input:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(231, 182, 101, 0.12);
}

button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--rose);
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 750;
}

button:hover { background: var(--rose-dark); }
button:disabled { cursor: wait; opacity: 0.55; }
.quiet { color: #d8cbd1; background: rgba(255,255,255,.08); }

.login form { margin-top: 32px; }
.login button { width: 100%; margin-top: 18px; }

.composer { padding: clamp(24px, 5vw, 46px); }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 26px;
}

.under-text {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
}

.image-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 20px;
  padding: 17px;
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: 17px;
  cursor: pointer;
}
.image-picker:hover { border-color: var(--gold); }
.image-picker input { display: none; }
.image-picker small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }
.image-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--gold) !important;
  background: rgba(231,182,101,.1);
  font-size: 1.3rem;
}

.image-preview {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  border-radius: 18px;
}
.image-preview img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.image-preview button { position: absolute; right: 12px; bottom: 12px; min-height: 38px; }

.send-row { min-height: 52px; }
.send-row button { margin-left: auto; padding-inline: 31px; }
.error { min-height: 1.2em; margin: 12px 0 0; color: #ff9aad; font: 0.78rem ui-sans-serif, system-ui, sans-serif; }

.history { margin-top: 64px; }
.section-heading { margin-bottom: 22px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.message-list { display: grid; gap: 13px; }

.message-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.045);
}
.message-card.scheduled { border-color: rgba(231,182,101,.34); }
.message-copy { min-width: 0; flex: 1; }
.message-meta { align-items: baseline; }
.message-meta strong { font-size: 1.08rem; font-weight: 400; }
.message-meta span { color: var(--muted); font: 0.68rem ui-sans-serif, system-ui, sans-serif; }
.message-card p { margin: 13px 0 0; color: #ddd0d5; line-height: 1.55; white-space: pre-wrap; }
.history-image { width: min(100%, 380px); max-height: 280px; margin-top: 16px; border-radius: 13px; object-fit: cover; }
.delete-button { min-width: 38px; min-height: 38px; padding: 0; color: var(--muted); background: transparent; font-size: 1.4rem; }
.delete-button:hover { color: white; background: rgba(217,92,117,.18); }
.empty { padding: 34px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; }

@media (max-width: 620px) {
  main { width: min(100% - 20px, 900px); padding-top: 28px; }
  header { align-items: flex-start; }
  .field-row { grid-template-columns: 1fr; }
  .under-text { display: block; }
  .under-text span { display: block; margin-top: 5px; }
  .send-row { display: block; }
  .send-row button { width: 100%; }
  .message-meta { display: block; }
  .message-meta span { display: block; margin-top: 6px; }
}

