:root {
  --bg: #f4f1eb;
  --paper: #fffdf8;
  --ink: #181714;
  --muted: #6f6a60;
  --line: rgba(48, 43, 35, 0.14);
  --soft: rgba(255, 255, 255, 0.72);
  --accent: #566f4f;
  --accent-dark: #314d3b;
  --gold: #a27d37;
  --rose: #b78372;
  --shadow: 0 18px 45px rgba(48, 43, 35, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.58), rgba(246,241,233,0.94)),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 18px calc(env(safe-area-inset-bottom) + 24px);
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 20px;
}

.topbar h1,
.section-heading h2,
.hero h2,
.rehearsal-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 24px;
  line-height: 1.08;
  max-width: 270px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--soft);
  box-shadow: 0 10px 25px rgba(48, 43, 35, 0.08);
}

.icon-button span {
  width: 4px;
  height: 4px;
  display: block;
  border-radius: 50%;
  background: var(--ink);
}

.hero,
.panel {
  margin-top: 6px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: 12px 0 16px;
}

.pill {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 7px 10px;
  border: 1px solid rgba(31, 107, 93, 0.18);
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(31, 107, 93, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.hero h2,
.section-heading h2 {
  font-size: 34px;
  line-height: 1.02;
}

.hero p,
.section-heading p,
.privacy-note {
  color: var(--muted);
  line-height: 1.45;
}

.hero-copy p:last-child,
.section-heading p {
  margin: 14px 0 0;
  font-size: 16px;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.signal-strip div {
  min-width: 0;
  min-height: 86px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(246, 241, 233, 0.72);
}

.signal-strip strong {
  display: block;
  font-size: 25px;
  line-height: 1;
}

.signal-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.primary,
.secondary,
.text-link {
  width: 100%;
  min-height: 52px;
  border-radius: 17px;
  font-weight: 750;
}

.primary {
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  box-shadow: 0 16px 30px rgba(31, 107, 93, 0.24);
}

.link-button {
  text-decoration: none;
}

.secondary {
  display: grid;
  place-items: center;
  margin-top: 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.text-link {
  margin-top: 8px;
  border: 0;
  color: var(--accent-dark);
  background: transparent;
}

.hidden {
  display: none;
}

.section-heading {
  margin-bottom: 18px;
}

.scenario-grid {
  display: grid;
  gap: 12px;
}

.scenario-card,
.price-card {
  width: 100%;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
}

.scenario-card.selected,
.price-card.selected,
.segmented button.selected {
  border-color: rgba(31, 107, 93, 0.42);
  background: rgba(31, 107, 93, 0.10);
}

.scenario-card strong,
.price-card strong {
  display: block;
  font-size: 18px;
}

.scenario-card span,
.price-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.segmented button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 750;
}

.field-label {
  display: block;
  margin: 14px 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  line-height: 1.35;
  outline: none;
}

textarea {
  resize: vertical;
}

input {
  min-height: 52px;
}

input:focus,
textarea:focus {
  border-color: rgba(31, 107, 93, 0.5);
  box-shadow: 0 0 0 4px rgba(31, 107, 93, 0.10);
}

.privacy-note {
  margin: 10px 0 16px;
  font-size: 13px;
}

.rehearsal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.score-mini {
  min-width: 58px;
  padding: 9px 10px;
  border-radius: 14px;
  color: var(--accent-dark);
  background: rgba(31, 107, 93, 0.10);
  font-weight: 800;
  text-align: center;
}

.prompt-card {
  padding: 18px;
  border-radius: 20px;
  background: #20201d;
  color: #fff9ef;
}

.prompt-card p {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.score-card {
  display: grid;
  place-items: center;
  min-height: 156px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255,255,255,0.32), transparent 32%),
    linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: white;
}

.score-card span {
  font-size: 56px;
  font-weight: 850;
  line-height: 1;
}

.score-card p {
  margin: 4px 0 0;
  color: rgba(255,255,255,0.78);
  font-weight: 700;
}

.draft-card {
  min-height: 210px;
  padding: 18px;
  border: 1px solid rgba(49, 77, 59, 0.18);
  border-radius: 22px;
  background: #20201d;
  color: #fff9ef;
  font-size: 16px;
  line-height: 1.42;
  white-space: pre-wrap;
  box-shadow: 0 18px 36px rgba(48, 43, 35, 0.12);
}

.feedback-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.feedback-list article,
.history-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.66);
}

.feedback-list h3,
.history-item h3 {
  margin: 0 0 7px;
  font-size: 15px;
}

.feedback-list p,
.history-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.feedback-list a {
  color: var(--accent-dark);
  font-weight: 760;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.access-form {
  margin-top: 18px;
  padding-top: 4px;
}

.price-card {
  min-height: 102px;
  text-align: center;
}

.history-list {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
}

.history-empty {
  padding: 20px;
  border: 1px dashed rgba(48, 43, 35, 0.24);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 620px) {
  .app-shell {
    padding-left: 28px;
    padding-right: 28px;
  }

  .hero,
  .panel {
    padding: 30px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: 100vw;
    max-width: 100vw;
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero,
  .panel {
    width: 100%;
    max-width: calc(100vw - 28px);
    padding: 22px;
    border-radius: 24px;
  }

  .hero h2,
  .section-heading h2 {
    font-size: 31px;
  }

  .signal-strip {
    gap: 8px;
  }

  .signal-strip div {
    padding: 13px 8px;
  }
}
