:root {
  --bg: #f4ede2;
  --card: rgba(255, 249, 242, 0.92);
  --ink: #2f241e;
  --muted: #6e6055;
  --line: rgba(72, 49, 35, 0.14);
  --accent: #8f4a2d;
  --accent-dark: #6d341d;
  --shadow: 0 18px 45px rgba(93, 58, 34, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(177, 98, 51, 0.2), transparent 26%),
    linear-gradient(180deg, #fbf7f1 0%, #efe4d3 100%);
}

.app-shell {
  width: min(760px, calc(100% - 20px));
  margin: 0 auto;
  padding: 14px 0 96px;
}

.card {
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.eyebrow,
.result-label {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 8vw, 3.3rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 6vw, 2.3rem);
  line-height: 1;
}

.subheadline,
.status,
.result-caption,
.result-cta {
  color: var(--muted);
  line-height: 1.6;
}

.status[data-error="true"] {
  color: #a12323;
}

.input-group {
  display: block;
  margin: 18px 0 14px;
}

.input-group span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
}

textarea {
  width: 100%;
  min-height: 96px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font: inherit;
  padding: 14px;
  resize: vertical;
}

.top-actions,
.share-bar,
.helper-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-bar,
.helper-bar {
  margin-top: 12px;
}

button,
a.share-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.primary-btn,
.primary-share,
.review-btn {
  background: var(--accent);
  color: #fff8f2;
  border-color: transparent;
}

.image-frame {
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 22px;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, rgba(143, 74, 45, 0.1), rgba(255, 255, 255, 0.3));
}

.image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hashtags {
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-weight: 700;
  line-height: 1.6;
}

.mobile-dock {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 30;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 249, 242, 0.96);
  box-shadow: 0 16px 35px rgba(93, 58, 34, 0.18);
  backdrop-filter: blur(10px);
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 820px) {
  .mobile-dock {
    display: grid;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: calc(100% - 16px);
    padding-bottom: 106px;
  }

  .card {
    padding: 16px;
    border-radius: 22px;
  }

  .top-actions,
  .share-bar,
  .helper-bar,
  .mobile-dock {
    grid-template-columns: 1fr;
  }
}
