:root {
  --bg: #f4f7f6;
  --paper: #fff;
  --ink: #19372f;
  --muted: #596e66;
  --accent: #146552;
  --deep: #104d40;
  --soft: #e8f3ee;
  --line: #dce5e0;
  --warm: #80540d;
  --warm-bg: #fff4dc;
  --red: #a22e30;
  --r: 16px;
  --sm: 10px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s7: 32px;
  --s8: 40px;
  --s9: 48px;
  --body: 1rem;
  --small: 0.875rem;
  --big: 2rem;
  --control: 52px;
  --motion: 160ms;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    400 var(--body)/1.55 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ba7510;
  outline-offset: 3px;
}
button {
  transition: background var(--motion);
}
button:hover {
  filter: brightness(0.97);
}
button:active {
  transform: translateY(1px);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.4;
}
h3 {
  font-size: 1rem;
}
small,
.small {
  font-size: var(--small);
}
.muted {
  color: var(--muted);
}
.money {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}
.stack {
  display: grid;
  gap: var(--s4);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s1) var(--s3);
  border-radius: 99px;
  background: var(--soft);
  color: var(--accent);
  font-size: var(--small);
  font-weight: 600;
}
.tag.warm {
  background: var(--warm-bg);
  color: var(--warm);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  border: 0;
  min-height: var(--control);
  padding: var(--s3) var(--s5);
  border-radius: var(--sm);
  background: var(--accent);
  color: white;
  font-weight: 600;
  text-decoration: none;
  width: 100%;
}
.btn.secondary {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.quiet {
  background: var(--soft);
  color: var(--accent);
}
.link {
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  padding: var(--s3) 0;
  min-height: 44px;
  text-decoration: none;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
}
.demo-bar {
  position: relative;
  background: #e7eeeb;
  min-height: 44px;
  padding: var(--s2) var(--s4);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s4);
  font-size: var(--small);
  color: #3b554b;
}
.demo-bar button {
  background: none;
  border: 0;
  color: var(--accent);
  font-weight: 600;
  min-height: 44px;
  padding: var(--s2);
}
.workspace {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 80px;
  padding: var(--s9) var(--s8);
}
.intro {
  padding-top: 80px;
  position: sticky;
  top: 40px;
  align-self: start;
}
.brand {
  display: flex;
  gap: var(--s3);
  align-items: center;
  font-weight: 700;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.intro h1 {
  font-size: 3.4rem;
  max-width: 440px;
  margin-top: var(--s8);
  letter-spacing: -0.05em;
  line-height: 1.12;
}
.intro p {
  color: var(--muted);
  margin-top: var(--s5);
  max-width: 350px;
}
.intro-rule {
  width: 48px;
  height: 4px;
  background: var(--accent);
  margin: var(--s7) 0;
}
.intro-note {
  font-size: var(--small);
}
.role-tabs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--sm);
  padding: var(--s1);
  margin-top: var(--s6);
  max-width: 340px;
  gap: var(--s1);
}
.role-tabs button {
  flex: 1;
  border: 0;
  min-height: 44px;
  background: none;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 600;
}
.role-tabs button.selected {
  background: var(--accent);
  color: white;
}
.phone {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  min-width: 0;
  position: relative;
  box-shadow: 0 16px 60px #19372f0b;
}
.app-header {
  padding: var(--s5) var(--s6);
  border-bottom: 1px solid var(--line);
  min-height: 80px;
}
.app-header .brand {
  font-size: 1rem;
}
.app-header .brand-mark {
  width: 36px;
  height: 36px;
}
.app-header small {
  display: block;
  font-size: var(--small);
  font-weight: 400;
  color: var(--muted);
}
.screen {
  padding: var(--s6);
  min-height: 620px;
  display: grid;
  align-content: start;
  gap: var(--s6);
}
.greeting {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  align-items: center;
}
.greeting h1 {
  font-size: 1.5rem;
}
.avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}
.eyebrow {
  font-size: var(--small);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.campaign {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.campaign-top {
  padding: var(--s5);
  background: var(--soft);
  position: relative;
}
.campaign-top h2 {
  max-width: 250px;
  margin-top: var(--s3);
  font-size: 1.25rem;
  line-height: 1.25;
}
.campaign-top p {
  margin-top: var(--s2);
  max-width: 220px;
  padding-right: var(--s5);
  color: #426355;
  font-size: var(--small);
}
.book-art {
  position: absolute;
  right: 12px;
  bottom: 16px;
  width: 48px;
  height: 48px;
  color: var(--accent);
  opacity: 0.85;
}
.campaign-body {
  padding: var(--s5);
}
.progress-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
  margin-top: var(--s1);
}
.progress-amount span {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.progress {
  height: 8px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin: var(--s4) 0 var(--s2);
}
.progress > div {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}
.cost-details {
  margin-top: var(--s2);
}
.cost-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: var(--small);
  color: var(--accent);
}
.cost-details summary:after {
  content: "+";
  font-size: 1.25rem;
}
.cost-details[open] summary:after {
  content: "−";
}
.cost-details .totals {
  margin: 0 0 var(--s4);
}
.totals {
  margin: var(--s5) 0;
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--s2);
  font-size: var(--small);
}
.totals .row {
  align-items: start;
}
.totals strong {
  text-align: right;
  white-space: nowrap;
}
.family-card {
  background: var(--bg);
  padding: var(--s4);
  border-radius: var(--sm);
  margin-bottom: var(--s3);
}
.family-card strong {
  font-size: 1.5rem;
}
.note {
  font-size: var(--small);
  color: var(--muted);
  line-height: 1.55;
}
.notice {
  padding: var(--s4);
  border-radius: var(--sm);
  background: var(--soft);
  color: var(--deep);
  font-size: var(--small);
}
.notice.warm {
  background: var(--warm-bg);
  color: var(--warm);
}
.notice strong {
  display: block;
  font-size: 1rem;
  margin-bottom: var(--s1);
}
.section-title {
  margin-bottom: var(--s3);
}
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  text-align: left;
  color: var(--ink);
}
.list-item .tile {
  width: 44px;
  height: 44px;
  border-radius: var(--sm);
  background: var(--bg);
  display: grid;
  place-items: center;
  flex: none;
}
.list-item .content {
  flex: 1;
}
.list-item .content p {
  font-size: var(--small);
  color: var(--muted);
  margin-top: var(--s1);
}
.nav {
  display: flex;
  background: white;
  border-top: 1px solid var(--line);
  padding: var(--s2) var(--s3) calc(var(--s2) + env(safe-area-inset-bottom));
  position: sticky;
  bottom: 0;
  z-index: 5;
}
.nav button {
  flex: 1;
  background: none;
  border: 0;
  min-height: 58px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--s1);
  font-size: var(--small);
  color: var(--muted);
  border-radius: var(--sm);
}
.nav button.active {
  color: var(--accent);
  background: var(--soft);
  font-weight: 600;
}
.back {
  justify-content: flex-start;
  gap: var(--s2);
  display: flex;
  align-items: center;
}
.back .icon {
  width: 18px;
}
.field {
  display: grid;
  gap: var(--s2);
}
label {
  font-weight: 600;
  font-size: var(--small);
}
input,
select {
  width: 100%;
  min-height: var(--control);
  border: 1px solid #acbeb4;
  border-radius: var(--sm);
  padding: var(--s3) var(--s4);
  background: white;
  color: var(--ink);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23146552' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.error {
  color: var(--red);
  font-size: var(--small);
}
.error:empty {
  display: none;
}
.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
}
.choice {
  min-height: 48px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--sm);
  color: var(--ink);
  font-weight: 600;
  padding: var(--s2) var(--s1);
}
.choice.selected {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.amount-input {
  font-size: 2rem;
  font-weight: 700;
  padding-right: var(--s8);
}
.input-wrap {
  position: relative;
}
.input-wrap span {
  position: absolute;
  right: var(--s4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.step-head {
  display: grid;
  gap: var(--s2);
}
.step-head .eyebrow {
  color: var(--accent);
}
.payment-total {
  text-align: center;
  padding: var(--s4) 0;
}
.payment-total strong {
  display: block;
  font-size: 2.5rem;
  color: var(--accent);
}
.qr-placeholder {
  margin: auto;
  width: 190px;
  height: 190px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--s3);
  border: 1px dashed #9ab2a6;
  border-radius: var(--sm);
  background: var(--bg);
  padding: var(--s4);
  text-align: center;
}
.qr-placeholder .icon {
  width: 48px;
  height: 48px;
  color: var(--muted);
}
.detail-line {
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
}
.detail-line span {
  color: var(--muted);
  font-size: var(--small);
}
.detail-line strong {
  display: block;
  font-size: 1rem;
}
.status-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent);
  margin: var(--s2) auto;
}
.status-icon .icon {
  width: 36px;
  height: 36px;
}
.center {
  text-align: center;
}
.receipt {
  background: var(--bg);
  border-radius: var(--r);
  padding: var(--s5);
}
.receipt .row {
  padding: var(--s2) 0;
}
.receipt .row:last-child {
  border-top: 1px solid var(--line);
  margin-top: var(--s2);
  padding-top: var(--s4);
}
.receipt strong {
  white-space: nowrap;
}
.subtle {
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--sm);
}
.tabs {
  display: flex;
  gap: var(--s2);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
}
.tabs button {
  border: 0;
  border-radius: var(--sm);
  padding: var(--s3);
  min-height: 44px;
  background: var(--bg);
  color: var(--muted);
}
.tabs button.selected {
  background: var(--soft);
  color: var(--accent);
  font-weight: 600;
}
.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s5);
}
.admin-card .btn {
  margin-top: var(--s4);
}
.admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}
.admin-stats > div {
  padding: var(--s4);
  background: var(--soft);
  border-radius: var(--sm);
}
.admin-stats strong {
  font-size: 1.5rem;
  display: block;
}
.empty {
  padding: var(--s7) var(--s4);
  background: var(--bg);
  border-radius: var(--sm);
  text-align: center;
}
.empty p {
  margin-top: var(--s2);
}
.screen-foot {
  padding-top: var(--s2);
  text-align: center;
  color: var(--muted);
  font-size: var(--small);
}
dialog {
  padding: 0;
  border: 0;
  border-radius: var(--r);
  width: calc(100% - 32px);
  max-width: 420px;
  max-height: 85dvh;
  color: var(--ink);
  box-shadow: 0 24px 80px #19372f30;
}
dialog::backdrop {
  background: #0b211d80;
}
dialog .dialog-inner {
  padding: var(--s6);
  display: grid;
  gap: var(--s5);
}
dialog .row h2 {
  flex: 1;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  width: 370px;
  background: var(--deep);
  color: white;
  padding: var(--s4);
  border-radius: var(--sm);
  z-index: 50;
  font-size: var(--small);
  box-shadow: 0 8px 30px #19372f20;
}
.toast[hidden] {
  display: none;
}
.mobile-role {
  display: none;
}
@media (max-width: 860px) {
  .workspace {
    display: block;
    padding: 0;
    max-width: 480px;
  }
  .intro {
    display: none;
  }
  .phone {
    border-radius: 0;
    border: 0;
    box-shadow: none;
    min-height: calc(100dvh - 60px);
    display: flex;
    flex-direction: column;
  }
  .screen {
    flex: 1;
    min-height: calc(100dvh - 220px);
  }
  .app-header {
    padding: var(--s3) var(--s5);
    min-height: 72px;
  }
  .screen {
    padding: var(--s4) var(--s5);
    gap: var(--s4);
  }
  .campaign-top,
  .campaign-body {
    padding: var(--s4);
  }
  .demo-bar {
    gap: var(--s2);
    font-size: var(--small);
    padding: var(--s1) var(--s3);
  }
  .mobile-role {
    display: block;
  }
  .phone {
    padding-bottom: 80px;
  }
  .nav {
    position: fixed;
    bottom: 0;
    width: min(480px, 100%);
    left: 50%;
    transform: translateX(-50%);
  }
  .demo-bar .reset {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.nav[hidden] {
  display: none;
}
.bank-picker {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: var(--s3);
}
.bank-picker legend {
  font-weight: 600;
  font-size: var(--small);
  padding: 0;
  margin-bottom: var(--s2);
}
.bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
}
.bank-option {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--sm);
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s3) var(--s1);
  color: var(--ink);
  font-size: var(--small);
  overflow-wrap: anywhere;
}
.bank-option img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--sm);
}
.bank-option.selected {
  background: var(--soft);
  border: 2px solid var(--accent);
  padding: calc(var(--s3) - 1px) calc(var(--s1) - 1px);
}
.bank-option.selected span {
  font-weight: 700;
  color: var(--accent);
}
.bank-picker .note {
  margin-top: var(--s2);
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--sm);
  font-size: var(--body);
  font-weight: 400;
  cursor: pointer;
  min-height: 44px;
}
.consent input {
  appearance: auto;
  accent-color: var(--accent);
  width: 24px;
  height: 24px;
  min-height: 24px;
  flex: none;
  padding: 0;
  margin: 0;
  margin-top: var(--s1);
}
.qr-save {
  justify-self: center;
  width: 100%;
  max-width: 280px;
  gap: var(--s2);
}
.preview-switch {
  padding: var(--s2) var(--s5);
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: var(--s3);
  justify-content: space-between;
  font-size: var(--small);
}
.preview-switch span {
  max-width: 180px;
}
.preview-switch a {
  color: var(--accent);
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
  text-align: right;
}
.admin-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}
.admin-shortcuts .btn {
  font-size: var(--small);
  padding: var(--s3) var(--s2);
  flex-direction: column;
}
.phone:has(.nav[hidden]) {
  padding-bottom: 0;
}
.contacts-input {
  font: inherit;
  padding: var(--s3);
  border: 1px solid #acbeb4;
  border-radius: var(--sm);
  width: 100%;
  resize: vertical;
  min-height: 104px;
  color: var(--ink);
  background: var(--paper);
}
.live-workspace {
  padding-top: 32px;
}
.payment-qr {
  width: min(260px, 100%);
  height: auto;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: var(--sm);
}
.block {
  display: block;
}
.receipt strong {
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: right;
}
.receipt .row > div {
  min-width: 0;
}
.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
}
.campaign-top h2 {
  max-width: none;
}
.campaign-top p {
  max-width: none;
  padding: 0;
}
.bank-option span {
  overflow-wrap: anywhere;
}
.field textarea {
  max-width: 100%;
}
.form-error:empty {
  display: none;
}
.admin-card > .row strong,
.list-item .content {
  min-width: 0;
  overflow-wrap: anywhere;
}
.phone .screen {
  min-width: 0;
}
@media (max-width: 860px) {
  .live-workspace {
    padding: 0;
  }
  .phone {
    min-height: 100dvh;
  }
  .screen {
    min-height: calc(100dvh - 152px);
  }
  .phone:has(.nav[hidden]) .screen {
    min-height: calc(100dvh - 72px);
  }
}
