:root {
  --accent: #d4916e;
  --accent-dark: #9b573c;
  --blue: #8ea7c2;
  --border: #cdbeb1;
  --surface-primary: #f3ebe2;
  --surface-card: #fff8f0;
  --surface-muted: #e0d7ce;
  --surface-soft: #f8ded0;
  --surface-blue: #dde7f3;
  --text-primary: #1a1a1a;
  --text-secondary: #3d3d3d;
  --text-muted: #6b6b6b;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface-primary);
  color: var(--text-primary);
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
}

.app-shell {
  margin: 0 auto;
  max-width: 430px;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(221, 231, 243, 0.42), rgba(243, 235, 226, 0) 260px),
    var(--surface-primary);
}

.row,
.top-row,
.nav,
.chips,
.stat-row,
.actions {
  display: flex;
  align-items: center;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px 18px 24px;
}

.content.success-content {
  padding-top: 20px;
}

.top-row {
  justify-content: space-between;
  gap: 14px;
}

.brand {
  font-family: "Funnel Sans", Inter, sans-serif;
  font-size: 31px;
  font-weight: 800;
}

.pill,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border: 1px solid #e9d8c8;
  border-radius: 999px;
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 12px;
}

.pill {
  border: 0;
  background: var(--surface-blue);
  color: var(--accent-dark);
}

.pill svg,
.chip svg {
  width: 15px;
  height: 15px;
  color: var(--accent-dark);
}

.intro {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.28;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.balance-card,
.summary-card,
.recipient-card,
.confirm-panel,
.success-card {
  border: 1px solid #ecd8c7;
  border-radius: 24px;
  background: var(--surface-card);
  box-shadow: var(--shadow);
}

.balance-card {
  display: flex;
  gap: 14px;
  padding: 16px;
}

.heat-badge {
  display: grid;
  flex: 0 0 72px;
  height: 72px;
  place-items: center;
  border-radius: 20px;
  background: var(--surface-soft);
  color: var(--accent-dark);
}

.heat-badge strong {
  display: block;
  font-family: "Funnel Sans", Inter, sans-serif;
  font-size: 31px;
  line-height: 0.95;
}

.heat-badge span {
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.balance-copy,
.card-copy,
.selected-copy,
.recipient-copy,
.confirm-copy,
.success-copy {
  display: flex;
  flex-direction: column;
}

.balance-copy {
  gap: 6px;
  min-width: 0;
}

.eyebrow {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.balance-title {
  margin: 0;
  font-family: "Funnel Sans", Inter, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

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

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.section-head h2,
.screen-title,
.confirm-title,
.success-title {
  margin: 0;
  font-family: "Funnel Sans", Inter, sans-serif;
  font-weight: 800;
}

.section-head h2 {
  font-size: 23px;
}

.section-hint {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.hug-grid {
  column-count: 2;
  column-gap: 12px;
}

.hug-card {
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0 0 12px;
  padding: 10px;
  break-inside: avoid;
  border: 1px solid #ecd8c7;
  border-radius: 24px;
  background: var(--surface-card);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.06);
  text-align: left;
}

.hug-card.locked {
  border-color: #d8cbc0;
  background: #eee3da;
  box-shadow: none;
  opacity: 0.72;
}

.hug-photo,
.hero-photo,
.thumb,
.success-illustration {
  display: block;
  width: 100%;
  object-fit: cover;
}

.hug-photo {
  height: var(--photo-height);
  border-radius: 18px;
}

.card-copy {
  gap: 6px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-title {
  margin: 0;
  font-family: "Funnel Sans", Inter, sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.05;
}

.card-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.25;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.price-row svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.locked .price-row,
.locked .price-row svg {
  color: var(--text-muted);
}

.lock-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.locked-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 14px;
  background: #f8f0e8;
  padding: 8px 10px;
}

.locked-info strong {
  color: var(--accent-dark);
  font-size: 11px;
}

.locked-info span {
  color: var(--text-muted);
  font-size: 11px;
}

.nav {
  gap: 12px;
}

.back-button {
  display: grid;
  flex: 0 0 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-card);
}

.back-button svg {
  width: 20px;
  height: 20px;
}

.screen-title {
  font-size: 22px;
  line-height: 1.1;
}

.hero-photo {
  height: 276px;
  border-radius: 30px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.chips {
  flex-wrap: wrap;
  gap: 8px;
}

.detail-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-description,
.confirm-body,
.success-body {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.35;
}

.detail-description {
  font-size: 16px;
}

.stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-row {
  gap: 10px;
  min-height: 42px;
  border: 1px solid #e9d8c8;
  border-radius: 16px;
  background: var(--surface-card);
  padding: 12px 14px;
}

.stat-row svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--accent-dark);
}

.stat-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-value {
  margin-left: auto;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  width: 100%;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

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

.secondary-button {
  background: #d9d0c8;
  color: var(--text-muted);
}

.summary-card,
.recipient-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  box-shadow: none;
}

.thumb {
  flex: 0 0 78px;
  width: 78px;
  height: 78px;
  border-radius: 20px;
}

.selected-copy,
.recipient-copy {
  gap: 5px;
  min-width: 0;
}

.selected-copy h2,
.recipient-name {
  margin: 0;
  font-family: "Funnel Sans", Inter, sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.recipient-card {
  border-color: #c7d6e7;
  border-radius: 26px;
  background: var(--surface-blue);
}

.recipient-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recipient-option {
  width: 100%;
  text-align: left;
}

.recipient-option.selected {
  border-color: var(--accent);
  background: #f8ded0;
}

.recipient-check {
  display: grid;
  flex: 0 0 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-card);
  color: var(--accent-dark);
}

.recipient-check svg {
  width: 17px;
  height: 17px;
}

.empty-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed var(--border);
  border-radius: 24px;
  background: rgba(255, 248, 240, 0.74);
  padding: 18px;
}

.empty-card h2,
.empty-card p {
  margin: 0;
}

.empty-card h2 {
  font-family: "Funnel Sans", Inter, sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.empty-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.3;
}

.avatar {
  display: grid;
  flex: 0 0 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-card);
  color: var(--accent-dark);
  font-family: "Funnel Sans", Inter, sans-serif;
  font-size: 28px;
  font-weight: 800;
}

.recipient-name {
  font-size: 22px;
}

.confirm-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 30px;
  padding: 20px;
}

.confirm-title {
  font-size: 27px;
  line-height: 1.08;
}

.note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 18px;
  background: #f8e5d8;
  padding: 14px;
}

.note strong {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.note p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.3;
}

.actions {
  flex-direction: column;
  gap: 22px;
}

.success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  border-radius: 32px;
  padding: 28px 18px;
}

.success-illustration {
  width: 178px;
  height: 178px;
  border-radius: 38px;
}

.success-title {
  font-size: 28px;
  line-height: 1.35;
  text-align: center;
}

.success-body {
  text-align: center;
}

.toast {
  border: 1px solid #e9d8c8;
  border-radius: 18px;
  background: var(--surface-card);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  padding: 12px 14px;
}

@media (min-width: 520px) {
  body {
    background: #ded3c9;
  }

  .app-shell {
    min-height: min(100dvh, 932px);
    box-shadow: 0 24px 80px rgba(62, 42, 30, 0.18);
  }
}

@media (max-width: 360px) {
  .content {
    padding-inline: 14px;
  }

  .brand {
    font-size: 28px;
  }

  .screen-title {
    font-size: 20px;
  }

  .card-title {
    font-size: 15px;
  }
}
