/* Client (mobile) app */
.screen {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 24px;
}

.brand { display: flex; justify-content: center; padding: 4px 0 16px; }
.brand img { display: block; width: 220px; height: auto; }

/* Home */
.hero { background: var(--accent-soft); border-radius: 28px; padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.hero-pics { display: flex; gap: 10px; justify-content: center; align-items: flex-end; height: 130px; }
.hero-pics span { display: block; border-radius: 12px; box-shadow: 0 8px 18px rgba(138, 109, 59, .18); }
.hero-pics .p1 { width: 78px; height: 108px; background: linear-gradient(160deg, #e8c39b, #b97d5b); transform: rotate(-7deg); }
.hero-pics .p2 { width: 90px; height: 128px; background: linear-gradient(160deg, #c9d3c2, #7d8f7a); }
.hero-pics .p3 { width: 78px; height: 108px; background: linear-gradient(160deg, #ecd9a8, #c49a4a); transform: rotate(7deg); }
.hero h1 { font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.hero p { color: var(--muted); font-weight: 500; }

.home-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.steps { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.steps b { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.foot { margin-top: auto; padding-top: 20px; text-align: center; font-size: 13px; color: var(--muted-2); }

.notice { border-radius: 16px; background: var(--accent-soft); padding: 14px 16px; font-weight: 600; font-size: 14px; color: var(--accent-dark); margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }

/* Top bar for inner screens */
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.topbar h1 { flex: 1; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.topbar .btn { min-height: 40px; padding: 0 12px; font-size: 14px; }
#selError { margin-bottom: 10px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.lead { color: var(--muted); font-weight: 500; font-size: 15px; margin-bottom: 14px; }

/* Photo grid */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: #ece6d9; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: var(--muted); text-align: center; padding: 6px; }
.tile .remove { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(31, 28, 24, .75); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.add-more { margin-bottom: 12px; }

/* Sticky bottom bars */
.bar { position: sticky; bottom: 0; margin: auto -20px -24px; padding: 14px 20px calc(20px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #ebe5d8; box-shadow: 0 -8px 24px rgba(31, 28, 24, .07); display: flex; flex-direction: column; gap: 12px; }
.screen > .bar { margin-top: auto; }
.counter { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 17px; }
.counter b { color: var(--accent); }
.counter small { font-size: 13px; color: var(--muted-2); font-weight: 600; }

/* Formats */
.formats { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.format { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 2px solid #e8e2d5; background: #fff; border-radius: 18px; padding: 12px 16px; cursor: pointer; }
.format .shape { flex: none; width: 44px; height: 62px; border-radius: 5px; background: #ece6d9; }
.format .info { flex: 1; display: flex; flex-direction: column; }
.format .name { font-size: 19px; font-weight: 800; }
.format .price { font-size: 14px; font-weight: 800; color: var(--muted-2); }
.format .radio { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #cfc7b5; display: flex; align-items: center; justify-content: center; }
.format .radio svg { display: none; }
.format[aria-checked='true'] { border: 2.5px solid var(--accent); background: var(--accent-soft); padding: 11.5px 15.5px; }
.format[aria-checked='true'] .shape { background: linear-gradient(150deg, #c9d3c2, #7d8f7a); }
.format[aria-checked='true'] .price { color: var(--accent-dark); }
.format[aria-checked='true'] .radio { background: var(--accent); border-color: var(--accent); }
.format[aria-checked='true'] .radio svg { display: block; }

.summary { border-radius: 16px; background: var(--bg-soft); padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.summary .row { display: flex; justify-content: space-between; }
.summary .row b { color: var(--text); font-weight: 800; }
.summary .total { border-top: 1px solid #e0d9c8; padding-top: 8px; margin-top: 2px; color: var(--text); font-weight: 800; font-size: 16px; align-items: baseline; }
.summary .total b { font-size: 22px; color: var(--accent); }

/* Centered result screens */
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; }
.center h1 { font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.ring { position: relative; width: 170px; height: 170px; }
.ring svg { display: block; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--accent-soft); stroke-width: 14; }
.ring .value { fill: none; stroke: var(--accent); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 490; stroke-dashoffset: 490; transition: stroke-dashoffset .3s; }
.ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 42px; font-weight: 800; letter-spacing: -0.02em; }
.sub { font-size: 17px; font-weight: 700; color: var(--accent); }
.hint { font-size: 15px; font-weight: 500; color: var(--muted); }
.warn { width: 100%; text-align: left; border-radius: 16px; background: #fff6e5; border: 1.5px solid #f3d38a; padding: 14px 16px; font-size: 14px; font-weight: 600; color: #6b4a00; }
.fail { width: 100%; text-align: left; border-radius: 16px; background: #fdecea; border: 1.5px solid #f5c2bd; padding: 14px 16px; font-size: 14px; font-weight: 600; color: var(--danger); }
.badge { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.badge.ok { background: #e3f6ea; }
.badge.wait { background: #fff0cf; }
.badge .dot { width: 68px; height: 68px; border-radius: 50%; background: var(--ok); display: flex; align-items: center; justify-content: center; }

.card { width: 100%; border-radius: 22px; background: var(--accent-soft); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.card.plain { background: var(--bg-soft); }
.card .label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card .number { font-size: 17px; font-weight: 800; color: var(--accent); word-break: break-all; }
.card .row { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 700; }
.card .row span { min-width: 0; overflow-wrap: anywhere; }
.card .row span:last-child { text-align: right; }
.card .row span:first-child { color: var(--muted); font-weight: 600; }
.card .row.total { font-weight: 800; align-items: baseline; }
.card .row.total span:last-child { font-size: 22px; color: var(--accent); }
.card hr { border: 0; height: 1px; background: var(--accent-line); width: 100%; margin: 0; }

.pinbox { width: 100%; border: 2px dashed var(--accent); border-radius: 22px; padding: 14px 20px; display: flex; align-items: center; gap: 16px; text-align: left; }
.pinbox .txt { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--muted-2); line-height: 1.4; }
.pinbox .txt b { display: block; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.pinbox .pin { font-size: 34px; font-weight: 800; letter-spacing: .14em; color: var(--accent); }

.pin-input { text-align: center; font-size: 32px; letter-spacing: .5em; height: 72px; padding-left: .5em; }

.stepper { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.stepper .line { display: flex; align-items: center; justify-content: center; gap: 8px; }
.stepper .node { width: 14px; height: 14px; border-radius: 50%; background: #e2dccf; }
.stepper .seg { width: 40px; height: 4px; border-radius: 2px; background: #e2dccf; }
.stepper .on { background: var(--accent); }
.stepper .labels { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted-2); }
.stepper.done .on { background: var(--ok); }
.stepper .labels .cur { color: var(--accent-dark); }
.stepper.done .labels .cur { color: var(--ok-dark); }

.min-hint { font-size: 13px; font-weight: 700; color: var(--danger); line-height: 1.4; }
.contact-fields { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.card-summary { margin-top: 6px; }

/* Optional email */
.optional { font-weight: 600; color: var(--muted-2); font-size: 13px; margin-left: 6px; }
.hint-box { display: block; background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--muted); margin-top: 4px; }

/* Long names / emails must never widen the page: a wider page makes the phone browser zoom everything out. */
.screen { overflow-x: clip; }
.screen * { min-width: 0; }
.screen p, .screen h1, .hint { overflow-wrap: anywhere; }
.btn, .btn * { min-width: auto; }
