@font-face {
  font-family: "Cal Sans";
  src: local("CalSans-Regular");
}

@font-face {
  font-family: "Gabarito";
  src: local("Gabarito-Regular");
}

:root {
  --app-background: #fcf5f1;
  --panel: #ffffff;
  --primary: #2d2b41;
  --secondary: #978e8e;
  --accent: #ff5509;
  --soft: #faead1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--app-background);
  color: var(--primary);
  font-family: "Gabarito", system-ui, sans-serif;
}

button,
input,
a {
  font: inherit;
}

.flow-shell {
  min-height: 100vh;
  background: var(--app-background);
}

.nav {
  height: 80px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  padding: env(safe-area-inset-top) 20px 0;
}

.nav h1 {
  margin: 0;
  font-family: "Cal Sans", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  font-size: 34px;
  line-height: 1;
}

.step {
  display: none;
  min-height: calc(100vh - 80px);
  padding: 16px 25px calc(25px + env(safe-area-inset-bottom));
}

.step.active {
  display: grid;
  align-items: start;
}

.content-card {
  width: min(100%, 340px);
  margin: 0 auto;
  padding-top: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 700;
}

h2 {
  margin: 0 0 30px;
  font-family: "Cal Sans", system-ui, sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
}

label {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(151, 142, 142, 0.2);
  border-radius: 12px;
  background: var(--panel);
  color: var(--primary);
  font-size: 17px;
  outline: 0;
  padding: 0 16px;
  box-shadow: none;
}

.primary-button,
.primary-link-button,
.secondary-button,
.dark-button,
.marker-button,
.text-button,
.text-link-button {
  cursor: pointer;
}

.primary-button,
.primary-link-button {
  width: 100%;
  min-height: 62px;
  margin-top: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.primary-button:disabled {
  opacity: 0.72;
}

.choice-stack {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.choice-button {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 20px;
  border: 0;
  border-radius: 10px;
  background: var(--panel);
  color: var(--primary);
  text-align: left;
  box-shadow: 0 10px 28px rgba(45, 43, 65, 0.08);
}

.choice-button strong {
  font-size: 19px;
  font-weight: 800;
}

.choice-button span {
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.35;
}

.primary-choice {
  background: var(--accent);
  color: white;
}

.primary-choice span {
  color: rgba(255, 255, 255, 0.82);
}

.secondary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--app-background);
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
}

.dark-button {
  width: 100%;
  min-height: 62px;
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-size: 18px;
  font-weight: 800;
}

.text-button,
.text-link-button {
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.body-copy,
.muted {
  color: var(--secondary);
  font-size: 17px;
  line-height: 1.45;
}

.recording-step {
  padding: 0;
}

.recording-step.active {
  display: block;
}

.recording-panel {
  min-height: calc(100vh - 80px);
  padding: 26px 0 calc(24px + env(safe-area-inset-bottom));
  background: var(--app-background);
  border-radius: 0;
  text-align: center;
}

.recording-copy {
  width: min(332px, calc(100vw - 48px));
  margin: 0 auto 44px;
}

.recording-copy h2 {
  margin-bottom: 10px;
  text-align: center;
}

.recording-copy p {
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
  color: var(--secondary);
  font-size: 18px;
  line-height: 1.2;
}

.context {
  min-height: 15px;
  margin: 0 24px 4px;
  color: var(--secondary);
  font-size: 13px;
}

.timer {
  font-family: "Cal Sans", system-ui, sans-serif;
  font-size: 32px;
  line-height: 1.2;
}

.mic-orb {
  width: 106px;
  height: 106px;
  margin: 48px auto 43px;
  border-radius: 999px;
  border: 10px solid rgba(255, 85, 9, 0.2);
  background: var(--accent);
  position: relative;
}

.mic-orb::before {
  content: "";
  position: absolute;
  left: 39px;
  top: 25px;
  width: 26px;
  height: 38px;
  border-radius: 14px;
  background: white;
}

.mic-orb::after {
  content: "";
  position: absolute;
  left: 32px;
  top: 55px;
  width: 40px;
  height: 27px;
  border: 4px solid white;
  border-top: 0;
  border-radius: 0 0 24px 24px;
}

.marker-button {
  width: 223px;
  margin-top: 0;
  padding: 20px;
  border: 0;
  border-radius: 10px;
  background: var(--app-background);
  color: var(--primary);
  font-size: 18px;
  transition: transform 160ms ease, background 160ms ease;
}

.marker-button.confirmed {
  transform: scale(1.04);
  background: #f9dfcb;
}

.marker-count {
  margin: 13px 0 0;
  color: var(--secondary);
  font-size: 13px;
}

.waveform {
  display: block;
  width: 120vw;
  height: 64px;
  margin: 50px 0 0 -10vw;
}

.bottom-actions {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-top: 78px;
}

.stop-button {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
}

.stop-button span {
  width: 27px;
  height: 27px;
  position: relative;
}

.stop-button span::before,
.stop-button span::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  width: 3px;
  height: 27px;
  border-radius: 999px;
  background: white;
}

.stop-button span::before {
  transform: rotate(45deg);
}

.stop-button span::after {
  transform: rotate(-45deg);
}

.bottom-actions p {
  margin: 0;
  color: var(--secondary);
  font-size: 13px;
}

.autosave {
  margin-top: 33px !important;
}

audio {
  width: 100%;
  margin: 10px 0 8px;
}

.checkout-preview {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 4px 0 22px;
  text-align: center;
}

.checkout-preview[hidden] {
  display: none;
}

.checkout-cover {
  width: 168px;
  height: 196px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.68) 0 16%, transparent 17%),
    radial-gradient(circle at 31% 62%, rgba(45, 43, 65, 0.18) 0 14%, transparent 15%),
    linear-gradient(145deg, #8fd7ee, #ffb99f 58%, #a68edc);
  box-shadow: 0 18px 34px rgba(45, 43, 65, 0.16);
}

.checkout-preview > strong {
  margin-top: 9px;
  font-family: "Cal Sans", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 400;
}

.checkout-preview > span {
  color: var(--secondary);
  font-size: 16px;
  font-weight: 700;
}

.price-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
  padding: 18px;
  border-radius: 10px;
  background: white;
  border: 1px solid rgba(250, 234, 209, 0.95);
  text-align: left;
}

.price-row strong {
  font-size: 23px;
}

.price-row span {
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.25;
}

.claim-link {
  overflow-wrap: anywhere;
  margin: 22px 0 4px;
  padding: 16px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--primary);
  font-size: 15px;
}

.error-box {
  margin: 18px 0 0;
  padding: 16px;
  border-radius: 16px;
  background: #fff2ed;
  color: var(--primary);
  text-align: left;
}

.error-box strong {
  display: block;
  font-size: 16px;
}

.error-box p {
  margin: 6px 0 0;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.4;
}

.technical-error {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px !important;
  overflow-wrap: anywhere;
}

.claim-shell .step {
  align-items: start;
  padding-top: 92px;
}

.claim-card h2 {
  margin-bottom: 20px;
}
