:root {
  --bg: #eef5f3;
  --phone: #fbfefd;
  --ink: #12201e;
  --muted: #657672;
  --line: #d8e5e1;
  --teal: #08685f;
  --teal-2: #0c8277;
  --mint: #dff2ec;
  --amber: #d79036;
  --danger: #9b3f36;
  --shadow: 0 18px 50px rgba(16, 44, 40, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--phone);
  box-shadow: var(--shadow);
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px 10px;
  background: rgba(251, 254, 253, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.app-top strong,
.app-top span {
  display: block;
}

.app-top strong {
  font-size: 15px;
}

.app-top span {
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-size: 13px;
  font-weight: 850;
}

.icon-button.ghost {
  background: var(--mint);
  color: var(--teal);
}

main {
  flex: 1;
  padding: 16px 16px 92px;
}

.screen {
  display: none;
  animation: screen-in 180ms ease-out;
}

.screen.active {
  display: block;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notice,
.result-card,
.form-card,
.message-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.result-card span,
.message-card span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.notice p,
.result-card p,
.message-card p {
  margin: 8px 0 0;
  color: inherit;
}

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

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

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

h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.screen-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.back-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.action-grid {
  display: grid;
  gap: 10px;
}

.action-card,
.row-action,
.option-list button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  text-align: left;
}

.action-card {
  min-height: 106px;
  padding: 16px;
}

.action-card.slim {
  min-height: 82px;
}

.action-card.primary {
  background: var(--teal);
  color: white;
}

.action-card span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.action-card.primary span {
  color: #ffdca9;
}

.action-card strong,
.action-card small {
  display: block;
}

.action-card strong {
  font-size: 19px;
}

.action-card small,
.row-action small,
.option-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.action-card.primary small {
  color: rgba(255, 255, 255, 0.78);
}

.notice {
  margin-top: 14px;
  padding: 14px;
  color: var(--danger);
}

.notice p {
  color: #76524e;
  font-size: 13px;
}

.seo-pocket {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbfa;
}

.seo-pocket summary {
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
}

.seo-pocket p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stepper {
  display: grid;
  gap: 12px;
}

.wizard {
  display: grid;
  gap: 12px;
}

.progress-dots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.progress-dots span {
  height: 5px;
  border-radius: 999px;
  background: var(--line);
}

.progress-dots span.active {
  background: var(--teal);
}

.flow-step {
  display: none;
  min-height: 236px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.flow-step.active {
  display: grid;
  align-content: start;
  gap: 12px;
}

.flow-step > span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.flow-step h3 {
  margin: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choice-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.choice-grid button,
.choice-list button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbfa;
  color: var(--ink);
  font-weight: 850;
}

.choice-grid button {
  min-height: 92px;
  padding: 10px;
  text-align: center;
}

.choice-grid small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-list button {
  min-height: 42px;
  padding: 0 12px;
  text-align: left;
}

.choice-grid button.selected,
.choice-list button.selected {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal);
}

.wizard-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.step > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
}

.step > strong {
  padding-top: 3px;
}

.segmented,
.option-list {
  grid-column: 1 / -1;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.segmented[data-group="cobertura"] {
  grid-template-columns: repeat(3, 1fr);
}

.segmented button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbfa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.segmented button.selected,
.row-action.selected,
.option-list button.selected {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal);
}

.option-list {
  display: grid;
  gap: 8px;
}

.option-list button,
.row-action {
  min-height: 68px;
  padding: 12px;
}

.option-list strong,
.row-action strong {
  display: block;
}

.result-card,
.message-card,
.form-card {
  margin-top: 14px;
  padding: 16px;
}

.sticky-result {
  position: sticky;
  bottom: 72px;
  z-index: 4;
  box-shadow: 0 12px 28px rgba(16, 44, 40, 0.12);
}

.sticky-result h3 {
  margin-bottom: 4px;
  font-size: 18px;
}

.sticky-result p {
  margin-top: 0;
  font-size: 13px;
}

.summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.summary-pills li {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal);
  font-size: 11px;
  font-weight: 850;
}

.result-card p,
.message-card p {
  color: var(--muted);
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.button {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
}

.button.primary {
  background: var(--teal);
  color: white;
}

.button.soft {
  background: var(--mint);
  color: var(--teal);
}

.button.full-width {
  width: 100%;
  margin-top: 12px;
}

.payment-panel,
.fees-card,
.bank-card {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.payment-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
}

.payment-main {
  display: grid;
  gap: 4px;
}

.payment-main span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.payment-main h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.payment-main strong {
  color: var(--teal);
  font-size: 34px;
  line-height: 1;
}

.payment-main p {
  margin: 2px 0 0;
  color: var(--muted);
}

.mp-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #fff7e9;
  color: #6d4d1c;
  font-size: 12px;
  font-weight: 750;
}

.pay-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.payment-panel .row-action {
  position: relative;
  min-height: 64px;
  padding-right: 32px;
  border-radius: var(--radius);
}

.payment-panel .row-action::after {
  position: absolute;
  right: 12px;
  top: 50%;
  color: var(--amber);
  content: ">";
  font-weight: 900;
  transform: translateY(-50%);
}

.payment-panel .row-action small {
  color: var(--teal);
  font-size: 15px;
  font-weight: 900;
}

.fees-card {
  padding: 14px;
}

.fees-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.fees-head h3 {
  margin: 0;
}

.fees-head span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.fee-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.fee-tabs button {
  min-height: 36px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbfa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.fee-tabs button.selected {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal);
}

.fee-list {
  display: grid;
  gap: 0;
}

.fee-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.fee-list span {
  font-weight: 850;
}

.fee-list small {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
}

.fee-list strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--teal);
  font-size: 17px;
  text-align: right;
  white-space: nowrap;
}

.fee-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.bank-card {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

.bank-card button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f7fbfa;
  color: var(--ink);
  text-align: left;
}

.bank-card button:last-child {
  border-bottom: 0;
}

.bank-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.bank-card strong {
  font-size: 13px;
  text-align: right;
}

.form-card {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
}

.message-card p {
  min-height: 58px;
  padding: 12px;
  border-radius: var(--radius);
  background: #f5faf8;
}

.message-actions,
.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  width: min(100%, 460px);
  margin: 0 auto;
}

.action-sheet[hidden],
.toast[hidden] {
  display: none;
}

.sheet-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 31, 28, 0.42);
}

.sheet-panel {
  position: relative;
  z-index: 1;
  padding: 18px 16px 16px;
  border-radius: 18px 18px 0 0;
  background: white;
  box-shadow: 0 -16px 42px rgba(13, 37, 34, 0.22);
}

.sheet-close {
  float: right;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.sheet-panel span {
  display: block;
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.sheet-panel h2 {
  margin-bottom: 8px;
  padding-right: 74px;
}

.sheet-panel p {
  color: var(--muted);
}

.action-output {
  margin: 12px 0;
}

textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbfa;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 78px;
  left: 16px;
  z-index: 25;
  width: min(calc(100% - 32px), 428px);
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 8px 8px 10px;
  background: rgba(251, 254, 253, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.bottom-nav button.selected {
  background: var(--mint);
  color: var(--teal);
}

@media (min-width: 760px) {
  body {
    padding: 28px 0;
  }

  .app-shell {
    min-height: calc(100vh - 56px);
    border-radius: 18px;
    overflow: hidden;
  }

  .bottom-nav {
    position: sticky;
    width: 100%;
  }
}

@media (max-width: 360px) {
  main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .segmented[data-group="cobertura"],
  .result-actions,
  .message-actions,
  .sheet-actions {
    grid-template-columns: 1fr;
  }
}
