@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Fraunces:opsz,wght@9..144,600&display=swap");

:root {
  color-scheme: only light;
  --paper: #f7f2e9;
  --ink: #1f1f1a;
  --muted: #5a5a50;
  --accent: #2f6f55;
  --accent-soft: #cfe1d6;
  --shadow: 0 30px 80px rgba(25, 24, 18, 0.2);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 20%, #fceee0 0%, transparent 55%),
    radial-gradient(circle at 90% 10%, #e2efe7 0%, transparent 50%),
    linear-gradient(145deg, #f6efe6 0%, #f3f0e9 45%, #e9f1e7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page {
  width: min(940px, calc(100% - 140px));
  padding: 48px 0 36px;
  display: grid;
  gap: 32px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  position: relative;
  padding-right: 180px;
}

.brand {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 3rem;
  letter-spacing: 0.02em;
}

.tag {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 40px 60px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
  container-type: inline-size;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(47, 111, 85, 0.12), transparent 55%),
    radial-gradient(circle at 90% 90%, rgba(47, 111, 85, 0.08), transparent 60%);
  pointer-events: none;
}

.date {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}

.prompt {
  font-size: 2.3rem;
  line-height: 1.15;
  margin: 0 auto;
  font-weight: 500;
  text-align: center;
  max-width: 100%;
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  text-align: center;
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
}

.share {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.share:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.status {
  font-size: 0.9rem;
  color: var(--muted);
}

.footer {
  font-size: 0.85rem;
  color: var(--muted);
  position: fixed;
  right: 28px;
  bottom: 24px;
  text-align: right;
}

.preview {
  display: none;
  justify-content: center;
}

.preview.is-visible {
  display: flex;
}

.preview img {
  width: min(640px, 100%);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(31, 31, 26, 0.25);
}

#share-canvas {
  display: none;
}

@media (max-width: 640px) {
  .actions {
    flex-direction: column;
    align-items: center;
  }
}
