@import "../styles.css";

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background: linear-gradient(180deg, var(--sage-soft), var(--paper) 340px);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vh, 24px);
  overflow: auto;
}

.phone-shell {
  width: 414px;
  height: min(868px, calc(100dvh - 48px));
  max-width: calc(100vw - 48px);
  display: flex;
  position: relative;
  overflow: hidden;
  padding: 12px;
  background: #11150f;
  border-radius: 56px;
  box-shadow:
    0 26px 72px -36px rgba(20, 25, 20, 0.82),
    0 2px 0 rgba(255, 255, 255, 0.06) inset;
}

.phone-screen {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border-radius: 46px;
}

.app-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  padding-top: 8px;
}

.ios-island {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 5;
  width: 108px;
  height: 30px;
  border-radius: 999px;
  background: #11150f;
  transform: translateX(-50%);
}

.ios-statusbar {
  height: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 28px 8px;
  color: #172119;
  font-size: 12px;
  font-weight: 700;
  position: relative;
  z-index: 4;
  pointer-events: none;
}

.ios-statusbar.on-dark {
  color: rgba(246, 249, 244, 0.9);
}

.ios-status-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ios-signal {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.ios-signal i {
  display: block;
  width: 3px;
  border-radius: 999px;
  background: currentColor;
}

.ios-signal i:nth-child(1) {
  height: 4px;
}

.ios-signal i:nth-child(2) {
  height: 6px;
}

.ios-signal i:nth-child(3) {
  height: 8px;
}

.ios-signal i:nth-child(4) {
  height: 10px;
}

.ios-wifi {
  width: 12px;
  height: 9px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  transform: scaleX(0.9);
}

.ios-battery {
  width: 21px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
  position: relative;
}

.ios-battery::before {
  content: "";
  position: absolute;
  inset: 2px 4px 2px 2px;
  border-radius: 1px;
  background: currentColor;
}

.ios-battery::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 2px;
  height: 4px;
  border-radius: 0 2px 2px 0;
  background: currentColor;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 8px;
  position: relative;
  z-index: 3;
}

.brand {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0;
  min-width: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.account-chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0 12px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
  transition-property: transform, background-color, color, border-color, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.account-chip.is-signed-in {
  min-width: 40px;
  padding: 0 9px;
  background: var(--sage-soft);
  color: var(--sage-ink);
  font-variant-numeric: tabular-nums;
}

.account-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--card);
  color: var(--sage-ink);
  box-shadow: 0 10px 22px -17px rgba(40, 48, 42, 0.5);
}

.account-chip:active:not(:disabled) {
  transform: scale(0.96);
}

.lang-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card);
  box-shadow:
    0 1px 2px -1px rgba(40, 48, 42, 0.14),
    0 12px 30px -24px rgba(40, 48, 42, 0.55);
}

.lang-toggle button {
  border: 0;
  min-width: 40px;
  min-height: 40px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.lang-toggle button.is-active {
  background: var(--sage);
  color: #fff;
  box-shadow: 0 7px 18px -11px color-mix(in srgb, var(--sage) 80%, transparent);
}

.lang-toggle button:hover:not(:disabled):not(.is-active) {
  background: color-mix(in srgb, var(--sage-soft) 58%, transparent);
  color: var(--sage-ink);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--sage-ink);
  display: grid;
  place-items: center;
  font-size: 17px;
  box-shadow: 0 10px 24px -18px rgba(40, 48, 42, 0.52);
  transition-property: transform, background-color, color, border-color, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.icon-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--sage) 28%, var(--line));
  background: color-mix(in srgb, var(--card) 82%, var(--sage-soft));
  box-shadow: 0 14px 28px -20px rgba(40, 48, 42, 0.56);
}

.safety-help-button {
  background: #fff8f3;
  color: #8a3d2c;
  border-color: #ead0c4;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 24px -18px rgba(138, 61, 44, 0.48);
}

.safety-help-button:hover:not(:disabled) {
  border-color: #d6a28f;
  background: #fff2eb;
  color: #7c3022;
  box-shadow: 0 14px 30px -20px rgba(138, 61, 44, 0.58);
}

.view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 22px 32px;
  display: flex;
  flex-direction: column;
  scroll-padding-bottom: 32px;
  scrollbar-width: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.view::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.view.no-nav {
  padding-bottom: 28px;
}

.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
}

.view-copy {
  width: 100%;
  max-width: 370px;
  margin: 0 auto;
}

.view-copy .lede {
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.view-copy .button-stack {
  margin-top: 18px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin-top: 8px;
}

.account-sync-list {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 2px 0 4px;
  text-align: left;
}

.account-sync-list span {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--sage-soft) 64%, var(--card));
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
  text-wrap: pretty;
}

.account-sync-list span::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--sage) 16%, transparent);
  flex: 0 0 auto;
}

.account-sync-note {
  margin-top: -6px;
}

.spacer {
  flex: 1;
}

.nav-clearance {
  flex: 0 0 112px;
  width: 100%;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sage);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(29px, 8.2vw, 38px);
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}

.onboarding-title {
  font-size: clamp(26px, 6.4vw, 31px);
  line-height: 1.16;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.title em {
  color: var(--sage-ink);
  font-style: italic;
}

.section-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
  text-wrap: balance;
}

.lede,
.helper,
.small {
  color: var(--ink-2);
  line-height: 1.58;
  text-wrap: pretty;
}

.lede {
  margin: 0;
  font-size: 16px;
}

.helper {
  margin: 12px 0 0;
  font-size: 14px;
}

.small {
  margin: 0;
  font-size: 13px;
}

.field-error {
  margin: 8px 2px 0;
  color: #8a3d2c;
  font-size: 13px;
  font-weight: 560;
  line-height: 1.42;
  text-wrap: pretty;
}

.progress-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 18px;
}

.progress-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  transition-property: width, background-color, opacity;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.progress-dots span.is-active {
  width: 22px;
  background: var(--sage);
}

.card,
.choice,
.memory-item,
.soft-panel,
.letter-box,
.settings-panel {
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: var(--r-md);
  box-shadow:
    0 0 0 1px rgba(40, 48, 42, 0.035),
    0 1px 2px -1px rgba(40, 48, 42, 0.12),
    0 26px 70px -54px rgba(40, 48, 42, 0.58);
}

.card {
  padding: 22px;
}

.question-card {
  margin-top: 4px;
  padding: 20px;
}

.arrival-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--sage) 22%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--sage-soft) 70%, var(--card));
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.42;
}

.arrival-card p {
  margin: 0;
  text-wrap: pretty;
}

.arrival-label {
  margin-bottom: 2px;
  color: var(--sage-ink);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.arrival-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #b7775f;
  box-shadow: 0 0 0 4px rgba(183, 119, 95, 0.14);
  flex: 0 0 auto;
}

.question-text {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(25px, 6vw, 30px);
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}

.answer-area,
.text-field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition-property: border-color, box-shadow, background-color;
  transition-duration: 0.18s;
  transition-timing-function: ease;
}

.answer-area {
  min-height: 108px;
  resize: vertical;
  padding: 18px;
  line-height: 1.5;
  margin-top: 16px;
}

.answer-area.tall {
  min-height: 240px;
  font-family: var(--serif);
  font-size: 20px;
}

.text-field {
  min-height: 52px;
  padding: 0 16px;
}

.answer-area:focus,
.text-field:focus {
  border-color: var(--sage);
  box-shadow: var(--focus-ring);
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-row .text-field {
  flex: 1;
}

.choice-stack,
.action-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
}

.choice,
.action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px;
  color: var(--ink);
  text-align: left;
  transition-property: transform, background-color, color, border-color, box-shadow, opacity;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.choice {
  border-radius: 15px;
}

.choice.is-selected,
.action.primary {
  border-color: var(--sage);
  background: var(--sage-soft);
  color: var(--sage-ink);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--sage) 26%, transparent),
    0 16px 34px -26px color-mix(in srgb, var(--sage) 62%, transparent);
}

.choice-mark {
  color: var(--sage);
  opacity: 0;
}

.choice.is-selected .choice-mark {
  opacity: 1;
}

.choice:hover:not(:disabled),
.action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--sage) 18%, transparent),
    0 18px 38px -30px rgba(40, 48, 42, 0.52);
}

.choice:active:not(:disabled),
.action:active:not(:disabled) {
  transform: scale(0.96);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--ink-2);
  padding: 11px 15px;
  min-height: 42px;
  font-size: 14px;
  transition-property: transform, background-color, color, border-color, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.chip.is-selected {
  border-color: var(--sage);
  background: var(--sage-soft);
  color: var(--sage-ink);
}

.chip:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--sage) 28%, var(--line));
  color: var(--sage-ink);
  box-shadow: 0 12px 24px -18px rgba(40, 48, 42, 0.48);
}

.chip:active:not(:disabled) {
  transform: scale(0.96);
}

.mood-check {
  display: grid;
  gap: 9px;
  margin: 13px 0 2px;
}

.mood-label {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
}

.mood-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mood-chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0 12px;
  background: color-mix(in srgb, var(--card) 86%, var(--paper));
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1;
  transition-property: transform, background-color, color, border-color, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.mood-chip.is-selected {
  border-color: #d6a08c;
  background: #fff4ee;
  color: #7d4f3f;
  box-shadow: 0 10px 22px -18px rgba(125, 79, 63, 0.42);
}

.mood-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--sage) 26%, var(--line));
  color: var(--sage-ink);
}

.button-row,
.button-stack {
  display: flex;
  gap: 11px;
  width: 100%;
}

.button-stack {
  flex-direction: column;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 52px;
  border-radius: var(--r-pill);
  padding: 0 22px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  text-decoration: none;
  font-weight: 560;
  transition-property: transform, background-color, color, border-color, box-shadow, opacity;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.primary-button {
  background: var(--sage);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.secondary-button {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-btn-ghost);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  min-height: 40px;
  padding: 0 10px;
  box-shadow: none;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-hover);
}

.secondary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--sage) 26%, var(--line));
  box-shadow: 0 12px 24px -16px rgba(40, 48, 42, 0.5);
}

.text-button:hover:not(:disabled) {
  color: var(--sage-ink);
  background: color-mix(in srgb, var(--sage-soft) 54%, transparent);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.text-button:active:not(:disabled),
.icon-button:active:not(:disabled),
.lang-toggle button:active:not(:disabled),
.mood-chip:active:not(:disabled),
.mic-button:active:not(:disabled),
.rating-row button:active:not(:disabled) {
  transform: scale(0.96);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible,
.icon-button:focus-visible,
.choice:focus-visible,
.action:focus-visible,
.chip:focus-visible,
.mood-chip:focus-visible,
.account-chip:focus-visible,
.lang-toggle button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.mic-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
}

.mic-button {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 0;
  background: var(--sage);
  color: #fff;
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--sage) 10%, transparent),
    0 18px 34px -14px color-mix(in srgb, var(--sage) 70%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  position: relative;
  display: grid;
  place-items: center;
  transition-property: transform, box-shadow, background-color;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.mic-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--sage) 32%, transparent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.mic-button.is-listening::before {
  animation: pulse 1.6s var(--ease-calm) infinite;
}

.mic-glyph {
  width: 23px;
  height: 32px;
  border: 3px solid currentColor;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  position: relative;
}

.mic-glyph::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 3px;
  height: 11px;
  background: currentColor;
  transform: translateX(-50%);
  border-radius: 3px;
}

.mic-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 24px;
  height: 12px;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-radius: 0 0 16px 16px;
  transform: translateX(-50%);
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

.answer-preview {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
  text-wrap: pretty;
}

.today-question-flow {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.today-question-flow .day-progress {
  margin-bottom: 11px;
}

.today-question-flow .arrival-card {
  margin-bottom: 10px;
  padding: 10px 12px;
}

.today-question-flow > .eyebrow {
  margin-bottom: 9px;
}

.today-question-flow .question-card {
  padding: 15px 17px;
}

.today-question-flow .question-text {
  font-size: clamp(22px, 5.35vw, 26px);
  line-height: 1.1;
}

.today-question-flow .question-card .helper {
  display: none;
}

.today-question-flow .mood-check {
  margin-top: 10px;
}

.today-question-flow .mood-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  padding-bottom: 0;
}

.today-question-flow .mood-row::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.today-question-flow .mood-chip {
  min-width: 0;
  min-height: 36px;
  padding: 0 6px;
  font-size: 11px;
}

.today-question-flow .mic-area {
  gap: 6px;
  margin: 8px 0 0;
}

.today-question-flow .mic-button {
  width: 60px;
  height: 60px;
}

.today-question-flow .mic-glyph {
  width: 20px;
  height: 28px;
}

.today-question-flow .answer-area {
  min-height: 72px;
  margin-top: 10px;
  padding: 13px 15px;
}

.today-question-flow .spacer {
  flex: 0 0 10px;
}

.today-question-flow .bottom-cta {
  min-height: 48px;
  margin-top: 6px;
}

.answer-flow .mood-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  padding-bottom: 0;
}

.answer-flow .mood-row::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.answer-flow .mood-chip {
  min-width: 0;
  min-height: 36px;
  padding: 0 6px;
  font-size: 11px;
}

.day-progress {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.day-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.day-progress-copy span:first-child {
  color: var(--sage);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.day-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--line) 66%, transparent);
}

.day-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), color-mix(in srgb, var(--sage-glow) 42%, var(--sage)));
  transition-property: width;
  transition-duration: 0.28s;
  transition-timing-function: var(--ease-calm);
}

.question-text.compact {
  font-size: clamp(22px, 6.4vw, 30px);
  line-height: 1.18;
  margin-bottom: 16px;
}

.voice-live-card,
.answer-card,
.rating-card,
.delivery-panel {
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(40, 48, 42, 0.025),
    0 24px 70px -56px rgba(40, 48, 42, 0.58);
}

.voice-live-card,
.answer-card {
  padding: 22px;
}

.voice-live-card {
  min-height: 190px;
  display: flex;
  align-items: flex-start;
  margin-top: 4px;
}

.voice-live-card p,
.answer-card p {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.48;
  text-wrap: pretty;
}

.voice-timer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  color: var(--sage-ink);
}

.voice-timer span {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.voice-timer small {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.3;
  text-align: right;
}

.voice-time-track {
  height: 6px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.voice-time-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), color-mix(in srgb, var(--sage-glow) 45%, var(--sage)));
  transition: width 0.25s linear;
}

.voice-wave {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 18px 0 4px;
}

.voice-wave span {
  width: 4px;
  height: 30px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sage) 82%, white);
  animation: voiceBar 1s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.07s);
}

.voice-wave span:nth-child(3n) {
  height: 42px;
}

.voice-wave span:nth-child(4n) {
  height: 24px;
}

.mic-area.recording {
  margin-top: 8px;
}

.mic-button.is-recording {
  width: 78px;
  height: 78px;
}

.mic-button.is-recording .mic-glyph {
  display: none;
}

.stop-glyph {
  width: 15px;
  height: 15px;
  border-radius: 2px;
  background: currentColor;
}

.answer-flow,
.reflection-page,
.send-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.send-flow .spacer {
  flex: 0 0 12px;
}

.reflection-page {
  padding-bottom: 24px;
}

.answer-actions {
  margin-top: 4px;
}

.memory-seed-card {
  padding: 14px 16px;
  border: 1px solid #ecd6c9;
  border-radius: 18px;
  background: #fff8f3;
  color: #6c5147;
  box-shadow:
    0 0 0 1px rgba(139, 90, 72, 0.03),
    0 16px 34px -28px rgba(139, 90, 72, 0.34);
}

.memory-seed-card .eyebrow {
  margin-bottom: 7px;
  color: #9a654f;
}

.memory-seed-card p:not(.eyebrow) {
  margin: 0;
  font-size: 13px;
  line-height: 1.46;
  text-wrap: pretty;
}

.mood-summary {
  margin: -2px 2px 0;
  color: #7d4f3f;
}

.done-note,
.send-footer {
  text-align: center;
}

.account-save-card {
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--sage) 30%, var(--line));
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sage-soft) 82%, var(--card)), var(--card));
  scroll-margin-bottom: 132px;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--sage) 10%, transparent),
    0 18px 40px -30px color-mix(in srgb, var(--sage) 52%, transparent);
}

.account-save-card .eyebrow {
  margin-bottom: 8px;
}

.account-save-card .section-title {
  margin-bottom: 8px;
  font-size: 22px;
}

.account-save-actions {
  margin-top: 12px;
  flex-wrap: wrap;
}

.account-save-actions .primary-button,
.account-save-actions .secondary-button {
  flex: 1 1 136px;
  min-height: 46px;
  padding: 0 16px;
  font-size: 13px;
  scroll-margin-bottom: 132px;
}

.small-answer {
  padding: 18px;
}

.small-answer .eyebrow {
  margin-bottom: 12px;
}

.small-answer p:last-child {
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
}

.paper-quote {
  position: relative;
  margin: 32px 0 12px;
  padding: 16px 0 16px 20px;
}

.paper-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: var(--sage);
}

.paper-quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(25px, 7vw, 33px);
  line-height: 1.22;
  color: var(--ink);
  text-wrap: pretty;
}

.paper-quote.quiet {
  margin-top: 22px;
}

.paper-quote.quiet p {
  color: var(--ink-2);
  font-size: clamp(23px, 6.4vw, 30px);
}

.rating-card,
.delivery-panel {
  padding: 16px;
}

.rating-card {
  margin-top: 18px;
  scroll-margin-bottom: 32px;
}

.delivery-panel {
  margin-top: auto;
}

.rating-card .small {
  margin-bottom: 12px;
}

.rating-row.light button {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: 0 10px 22px -20px rgba(40, 48, 42, 0.55);
}

.feedback-card {
  margin-top: 30px;
}

.delivery-pills {
  margin: 12px 0;
}

.delivery-actions {
  display: grid;
  gap: 10px;
}

.letter-loading {
  min-height: 210px;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 28px;
  text-align: center;
  background: color-mix(in srgb, var(--card) 78%, var(--sage-soft));
  border: 1px solid color-mix(in srgb, var(--sage) 26%, var(--line));
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(40, 48, 42, 0.025),
    0 24px 70px -56px rgba(40, 48, 42, 0.58);
}

.letter-loading p {
  max-width: 260px;
  margin: 0;
  color: var(--ink-2);
  line-height: 1.45;
}

.letter-message {
  padding: 18px;
  border: 1px solid color-mix(in srgb, #b7775f 34%, var(--line));
  border-radius: 18px;
  background: #fff8f3;
  color: #7d4f3f;
  box-shadow:
    0 0 0 1px rgba(125, 79, 63, 0.025),
    0 18px 44px -34px rgba(125, 79, 63, 0.36);
}

.letter-message p:last-child {
  margin: 0;
  line-height: 1.5;
  text-wrap: pretty;
}

.letter-box-compact {
  min-height: 132px;
}

.bottom-cta {
  margin-top: 12px;
}

.skip-day-button {
  align-self: center;
  margin: 0;
}

.skip-state {
  justify-content: flex-start;
  padding-top: 4px;
}

.skip-state .day-progress {
  width: 100%;
  margin-bottom: 10px;
}

.primer-flow {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.primer-flow .lede {
  margin-top: 12px;
}

.primer-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.primer-item {
  justify-content: flex-start;
  padding: 14px 16px;
}

.note-soft {
  margin: 28px 0 0;
  color: var(--sage-ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.notification-button {
  position: relative;
  color: var(--sage-ink);
  font-size: 13px;
  font-weight: 800;
}

.notification-button.has-new {
  border-color: color-mix(in srgb, var(--sage) 38%, var(--line));
  background: var(--sage-soft);
}

.notification-button::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--sage);
}

.section-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-row .section-title {
  margin-bottom: 0;
}

.reply-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: var(--sage);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.reply-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.reply-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 88%, var(--sage-soft));
}

.reply-item.is-new {
  border-color: color-mix(in srgb, var(--sage) 45%, var(--line));
  box-shadow: 0 16px 30px -26px color-mix(in srgb, var(--sage) 55%, transparent);
}

.reply-item > p:not(.memory-meta) {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.42;
  text-wrap: pretty;
}

.reply-item .compact-button {
  min-height: 40px;
  margin-top: 12px;
  padding: 0 16px;
  font-size: 13px;
}

.receiver-outcome {
  gap: 24px;
  width: 100%;
}

.receiver-outcome .empty-icon {
  margin: 0 auto;
}

.receiver-reply-card {
  width: 100%;
}

.receiver-reply-card .memory-meta {
  margin: 0 0 10px;
  color: var(--on-dark-muted);
}

.receiver-reply-card p:not(.memory-meta),
.receiver-next p:not(.eyebrow) {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.42;
  color: #f6f9f4;
  text-wrap: pretty;
}

.receiver-next {
  width: 100%;
  padding: 0 4px;
}

.receiver-next .eyebrow {
  margin-bottom: 8px;
}

.letter-open-stage {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 24px 0 4px;
  text-align: center;
}

.letter-envelope-button {
  width: min(100%, 260px);
  min-height: 238px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  border: 0;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  color: #f6f9f4;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 34px 78px -54px rgba(0, 0, 0, 0.66);
  cursor: pointer;
  transition:
    transform var(--dur-fast) ease-out,
    background-color var(--dur-fast) ease-out,
    box-shadow var(--dur-fast) ease-out;
}

.letter-envelope-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.11);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 38px 82px -54px rgba(0, 0, 0, 0.72);
}

.letter-envelope {
  position: relative;
  width: 150px;
  height: 104px;
  display: block;
  perspective: 520px;
}

.letter-sheet,
.letter-flap,
.letter-front {
  position: absolute;
  inset: 0;
  border-radius: 10px;
}

.letter-sheet {
  inset: 12px 14px 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 242, 234, 0.96));
  box-shadow: 0 14px 30px -22px rgba(0, 0, 0, 0.5);
  animation: letterPeek 1.8s var(--ease-calm) infinite;
}

.letter-front {
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(214, 232, 216, 0.98), rgba(151, 187, 158, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 -28px 52px -38px rgba(17, 43, 28, 0.74);
}

.letter-front::before,
.letter-front::after {
  content: "";
  position: absolute;
  bottom: -1px;
  width: 55%;
  height: 72%;
  background: rgba(82, 133, 92, 0.36);
}

.letter-front::before {
  left: -8px;
  clip-path: polygon(0 100%, 100% 100%, 0 0);
}

.letter-front::after {
  right: -8px;
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.letter-flap {
  transform-origin: top center;
  background: linear-gradient(180deg, rgba(223, 238, 224, 0.98), rgba(134, 174, 143, 0.96));
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  border-radius: 10px 10px 3px 3px;
  animation: letterFlap 1.8s var(--ease-calm) infinite;
}

.letter-open-copy {
  font-weight: 700;
  letter-spacing: 0;
}

.letter-paper.is-opened {
  animation: letterArrive 0.52s var(--ease-calm) both;
}

@keyframes letterFlap {
  0%,
  55%,
  100% {
    transform: rotateX(0deg);
  }

  26%,
  42% {
    transform: rotateX(58deg);
  }
}

@keyframes letterPeek {
  0%,
  52%,
  100% {
    transform: translateY(0);
  }

  28%,
  42% {
    transform: translateY(-18px);
  }
}

@keyframes letterArrive {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes voiceBar {
  0%,
  100% {
    transform: scaleY(0.58);
    opacity: 0.62;
  }

  50% {
    transform: scaleY(1.12);
    opacity: 1;
  }
}

.action {
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--card);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--line) 72%, transparent),
    0 16px 34px -30px rgba(40, 48, 42, 0.46);
}

.action-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--sage-soft);
  color: var(--sage);
  transition-property: transform, background-color, color, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.action:hover:not(:disabled) .action-icon {
  transform: scale(1.03);
}

.action.warm {
  border-color: #ecd6c9;
  background: #fff8f3;
}

.action.warm .action-icon {
  background: #f3d8c9;
  color: #8b5a48;
}

.action.warm:hover:not(:disabled) {
  box-shadow:
    0 0 0 1px rgba(183, 119, 95, 0.12),
    0 18px 38px -30px rgba(139, 90, 72, 0.48);
}

.action-copy {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.action-copy small {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.35;
  text-wrap: pretty;
}

.answer-actions .action {
  justify-content: flex-start;
}

.dark-view {
  background: linear-gradient(180deg, color-mix(in srgb, var(--sage-deep) 88%, #ffffff 12%), var(--sage-deep));
  color: var(--on-dark);
  min-height: 100%;
}

.dark-view .view {
  color: var(--on-dark);
}

.dark-view .eyebrow,
.dark-view .small,
.dark-view .helper,
.dark-view .lede {
  color: var(--on-dark-muted);
}

.dark-view .text-button {
  color: var(--on-dark-muted);
}

.dark-view .primary-button {
  background: color-mix(in srgb, var(--sage-glow) 38%, var(--sage) 62%);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 18px 42px -24px rgba(0, 0, 0, 0.58);
}

.dark-view .primary-button:hover:not(:disabled) {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 22px 48px -24px rgba(0, 0, 0, 0.62);
}

.dark-view .safety-link {
  color: #f6f9f4;
}

.dark-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  padding: 24px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 80px -44px rgba(0, 0, 0, 0.55);
}

.reflection-text {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.42;
  color: #f6f9f4;
  text-wrap: pretty;
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.rating-row button {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--on-dark);
  transition-property: transform, background-color, border-color, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.rating-row.light button {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}

.vent-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.letter-box {
  width: 100%;
  min-height: 230px;
  resize: vertical;
  padding: 20px;
  line-height: 1.5;
  font-family: var(--serif);
  font-size: 19px;
  outline: none;
  text-wrap: pretty;
}

.link-box {
  width: 100%;
  padding: 15px;
  border: 1px dashed var(--sage);
  border-radius: 16px;
  color: var(--sage-ink);
  background: var(--sage-soft);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-all;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.memory-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.memory-room-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--sage) 24%, var(--line));
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--sage-soft) 70%, var(--card)), var(--card));
  box-shadow:
    0 0 0 1px rgba(40, 48, 42, 0.025),
    0 22px 50px -42px rgba(40, 48, 42, 0.48);
}

.memory-room-card .section-title {
  margin-bottom: 8px;
  font-size: 24px;
}

.room-mark-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}

.room-mark-row span {
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--sage) 24%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--sage-soft) 64%, var(--card));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.room-mark-row span.has-reflection {
  background: #fff4ee;
  border-color: #e1b9a8;
}

.memory-item {
  padding: 17px;
}

.memory-meta {
  margin: 0 0 8px;
  color: var(--sage);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.memory-answer {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.42;
  text-wrap: pretty;
}

.memory-mood {
  margin: 10px 0 0;
  color: #7d4f3f;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-wrap: pretty;
}

.memory-reflection {
  margin: 13px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.48;
  text-wrap: pretty;
}

.memory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.memory-actions button {
  flex: 1 1 104px;
  min-height: 42px;
  padding: 0 12px;
  font-size: 13px;
}

.warm-send {
  border-color: #ecd6c9;
  background: #fff8f3;
  color: #7d4f3f;
}

.warm-send:hover:not(:disabled) {
  border-color: #d6a08c;
  color: #7d4f3f;
  box-shadow: 0 12px 24px -18px rgba(139, 90, 72, 0.42);
}

.path {
  position: relative;
  padding-left: 26px;
  margin: 18px 0 18px;
}

.path::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  bottom: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--sage), color-mix(in srgb, var(--sage) 18%, transparent));
}

.node {
  position: relative;
  margin-bottom: 20px;
}

.node:last-child {
  margin-bottom: 0;
}

.node::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--sage);
}

.node.is-filled::before {
  background: var(--sage);
}

.node-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
}

.node-body {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

.settings-panel {
  padding: 18px;
  margin-top: 14px;
}

.settings-panel .section-title {
  font-size: 22px;
}

.trust-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.trust-list span {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 72%, var(--paper));
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.36;
  text-wrap: pretty;
}

.trust-list span::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: #b7775f;
  flex: 0 0 auto;
}

.code-pill {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--sage-soft);
  color: var(--sage-ink);
  font-family: var(--mono);
  font-weight: 650;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.safety-link {
  margin-top: 14px;
  color: var(--sage-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.bottom-nav {
  position: relative;
  z-index: 4;
  flex: 0 0 82px;
  min-height: 82px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 -14px 34px -30px rgba(40, 48, 42, 0.45);
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  font-size: 11px;
  min-width: 0;
  transition-property: transform, color, background-color;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}

.bottom-nav button:active:not(:disabled) {
  transform: scale(0.96);
}

.bottom-nav span:first-child {
  font-size: 18px;
}

.bottom-nav button.is-active {
  color: var(--sage);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(22px);
  background: var(--sage-deep);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 11px 17px;
  max-width: min(360px, calc(100vw - 40px));
  text-align: center;
  text-wrap: pretty;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
  box-shadow: 0 18px 44px -24px rgba(0, 0, 0, 0.45);
}

.app-shell[data-shell-nav="true"] + .toast {
  bottom: 104px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pulse-mark {
  width: 112px;
  height: 112px;
  position: relative;
  display: grid;
  place-items: center;
}

.pulse-mark span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--sage) 50%, transparent);
  animation: pulse 2.2s var(--ease-calm) infinite;
}

.pulse-mark span:nth-child(2) {
  animation-delay: 0.7s;
}

.pulse-mark i {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff, var(--sage-2));
  box-shadow: 0 0 34px 4px color-mix(in srgb, var(--sage-glow) 48%, transparent);
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--sage-soft);
  color: var(--sage);
  display: grid;
  place-items: center;
  font-size: 26px;
  margin: 0 auto 18px;
}

.safety-icon {
  background: #fff2eb;
  color: #8a3d2c;
  box-shadow:
    0 0 0 1px #ead0c4,
    0 18px 38px -28px rgba(138, 61, 44, 0.42);
  font-family: var(--sans);
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  html,
  body {
    min-height: 100dvh;
  }

  body {
    overflow-x: hidden;
  }

  .app-shell {
    min-height: 100dvh;
    padding: 0;
    display: block;
    overflow: visible;
  }

  .phone-shell {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    max-height: none;
    max-width: 100vw;
    padding: 0;
    background: var(--paper);
    border: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
  }

  .phone-screen {
    min-height: 100dvh;
    border-radius: 0;
    overflow: visible;
  }

  .ios-island,
  .ios-statusbar {
    display: none;
  }

  .app-frame {
    min-height: 100dvh;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
  }

  .view {
    flex: 1 0 auto;
    overflow: visible;
    padding: 12px 20px calc(118px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
  }

  .view.no-nav {
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: calc(82px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .view-copy {
    max-width: 350px;
  }

  .view-copy .button-stack {
    margin-top: 20px;
  }

  .question-card {
    padding: 22px 20px;
  }

  .question-text {
    font-size: clamp(26px, 7.4vw, 31px);
  }

  .question-text.compact {
    font-size: clamp(22px, 6vw, 28px);
  }

  .mic-area {
    gap: 8px;
    margin: 14px 0 0;
  }

  .mic-button {
    width: 72px;
    height: 72px;
  }

  .mic-glyph {
    width: 21px;
    height: 30px;
  }

  .answer-area {
    min-height: 104px;
    margin-top: 12px;
  }

  .voice-live-card {
    min-height: 170px;
    padding: 20px;
  }

  .account-save-card {
    padding: 14px;
    margin-bottom: 112px;
  }

  .paper-quote {
    margin-top: 22px;
  }

  .rating-card,
  .delivery-panel {
    padding: 14px;
  }

  .letter-box {
    min-height: 260px;
    font-size: 18px;
  }

  .send-flow .letter-box {
    min-height: 230px;
  }

  .toast {
    border-radius: 20px;
  }

  .app-shell[data-shell-nav="true"] + .toast {
    bottom: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
