:root {
  color-scheme: light;
  --bg: #f3efe7;
  --surface: #fbfaf7;
  --surface-soft: #eee7dc;
  --text: #2c2a26;
  --muted: #777167;
  --line: #d8d0c2;
  --accent: #6f6659;
  --accent-strong: #4f473d;
  --success: #5f7257;
  --warning: #9a7a43;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  background-image:
    linear-gradient(90deg, rgba(216, 208, 194, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(216, 208, 194, 0.16) 1px, transparent 1px);
  background-size: 28px 28px;
}

.page-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 14px 14px 120px;
}

.hero {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 4.7;
  object-fit: cover;
}

.content {
  position: relative;
  padding: 26px 4px 8px;
}

.content::before {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  margin: 0 0 18px;
  background: var(--accent);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0;
}

.copy-panel {
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 16px 36px rgba(74, 66, 55, 0.08);
}

.copy-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.status {
  flex: 0 0 auto;
  color: var(--warning);
}

.status.ready {
  color: var(--success);
}

.status.error {
  color: var(--accent);
}

.copy-text {
  min-height: 132px;
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.78;
  white-space: pre-wrap;
  word-break: break-word;
}

.message {
  min-height: 22px;
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.message.error {
  color: var(--accent);
}

.action-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(12px);
}

.primary-button {
  width: min(100%, 524px);
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.primary-button:active {
  background: var(--accent-strong);
}

.primary-button:disabled {
  background: #c9c2bb;
}

.fallback-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

@media (min-width: 720px) {
  body {
    padding: 24px 0;
  }

  .page-shell {
    padding-right: 0;
    padding-left: 0;
  }
}
