/* Lado do cliente — mobile first. No desktop aparece dentro de um "celular". */
body { display: flex; justify-content: center; align-items: center;
  background: radial-gradient(900px 500px at 50% -10%, #2a2013 0%, var(--black) 60%); }
.stage-note { display: none; }
.app {
  position: relative; width: 100%; max-width: 430px; height: 100dvh; background: var(--cream);
  display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 620px) {
  body { padding: 24px; }
  .app { height: min(900px, calc(100dvh - 48px)); border-radius: 38px; box-shadow: 0 0 0 10px #17130e, 0 0 0 12px #3b2f1d, 0 40px 120px rgba(0, 0, 0, .7); }
  .stage-note { display: block; position: fixed; left: 28px; bottom: 24px; color: #8d7b5c; font-size: 13px; line-height: 1.5; max-width: 220px; }
  .stage-note b { color: var(--gold); font-family: var(--script); font-size: 26px; font-weight: 400; display: block; }
}
#screen { flex: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; padding-bottom: 24px; }
#screen::-webkit-scrollbar { width: 0; }

/* ---------- topo e hero ---------- */
.hero {
  position: relative; background: var(--black); color: var(--cream); padding: 18px 20px 26px; text-align: center; overflow: hidden;
  border-radius: 0 0 34px 34px;
}
.hero::before { content: ''; position: absolute; inset: -40% -20% auto; height: 120%;
  background: radial-gradient(closest-side, rgba(212, 166, 74, .35), transparent 70%); animation: floaty 7s ease-in-out infinite; }
.hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(246, 220, 140, .35) 1px, transparent 1.4px); background-size: 26px 26px; opacity: .18;
  mask-image: linear-gradient(#000, transparent 80%); }
.hero > * { position: relative; z-index: 1; }
.hero-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .08); border: 1px solid rgba(212, 166, 74, .35); color: var(--cream); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(79, 154, 91, .6); animation: pulse 1.8s infinite; }
.pill.closed i { background: var(--bad); animation: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(212, 166, 74, .35); color: var(--gold-hi); transition: transform .2s var(--spring); }
.icon-btn:active { transform: scale(.9); }
.icon-btn svg, .ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logo { width: 128px; height: 128px; margin: 4px auto 6px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(212, 166, 74, .6), 0 0 50px rgba(212, 166, 74, .35); animation: pop .8s var(--spring) both; }
.hero .tag { font-family: var(--script); font-size: 30px; line-height: 1; margin-top: 4px; }
.hero-info { display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.hero-info span { font-size: 12.5px; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .07); color: #e8dcc0; }

/* ---------- categorias e produtos ---------- */
.chips { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; padding: 14px 16px 10px; background: linear-gradient(var(--cream) 80%, transparent); overflow-x: auto; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 16px; border-radius: 99px; font-weight: 600; font-size: 14px; background: var(--paper); border: 1px solid var(--cream-2); color: var(--muted); transition: all .25s var(--ease); }
.chip.on { background: var(--black); color: var(--gold-hi); border-color: var(--black); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.sec-title { font-family: var(--serif); font-size: 22px; font-weight: 700; padding: 14px 20px 6px; display: flex; align-items: center; gap: 10px; }
.sec-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.card {
  display: flex; gap: 14px; margin: 10px 16px; padding: 12px; background: var(--paper); border-radius: 22px; border: 1px solid var(--cream-2);
  box-shadow: 0 1px 0 #fff inset, 0 8px 22px rgba(60, 40, 10, .07); text-align: left; width: calc(100% - 32px);
  animation: rise .5s var(--ease) both; transition: transform .25s var(--spring), box-shadow .25s;
}
.card:active { transform: scale(.975); }
.card.off { opacity: .55; filter: grayscale(.7); pointer-events: none; }
.card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card h3 { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.card p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .row { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; }
.price { font-weight: 700; font-size: 15px; }
.price small { font-weight: 500; color: var(--muted); font-size: 12px; }
.add { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--black); box-shadow: 0 4px 12px rgba(169, 122, 34, .45); }
.badge-off { font-size: 11px; font-weight: 700; color: var(--bad); text-transform: uppercase; letter-spacing: .05em; }
.art { width: 104px; height: 104px; flex: none; border-radius: 18px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 20%, #3a2c18, #140f0a); }
.art svg { width: 100%; height: 100%; }
.art img { width: 100%; height: 100%; object-fit: cover; }

/* barra do carrinho */
.cartbar { margin: 0 14px 14px; padding: 14px 18px; border-radius: 22px; background: var(--black); color: var(--cream); display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(212, 166, 74, .45); animation: rise .45s var(--spring) both; width: calc(100% - 28px); }
.cartbar .n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 99px; background: var(--gold-grad); color: var(--black); font-weight: 800; font-size: 13px; margin-right: 10px; }
.cartbar b { color: var(--gold-hi); font-size: 16px; }
.dock { flex: none; background: linear-gradient(transparent, var(--cream) 40%); padding-top: 10px; }

/* ---------- telas internas ---------- */
.top { display: flex; align-items: center; gap: 12px; padding: 16px; position: sticky; top: 0; z-index: 4; background: var(--cream); }
.top h2 { font-family: var(--serif); font-size: 21px; flex: 1; }
.back { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--cream-2); }
.pad { padding: 0 16px; }
.box { background: var(--paper); border: 1px solid var(--cream-2); border-radius: 20px; padding: 14px; margin-bottom: 12px; animation: rise .4s var(--ease) both; }
.box h4 { font-family: var(--serif); font-size: 16px; margin-bottom: 8px; }
.line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; font-size: 14px; }
.line.total { font-weight: 800; font-size: 18px; border-top: 1px dashed #d9c9a4; margin-top: 8px; padding-top: 12px; }
.muted { color: var(--muted); font-size: 13px; }
.sel { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }

.btn { width: 100%; padding: 16px; border-radius: 18px; font-weight: 700; font-size: 16px; background: var(--black); color: var(--gold-hi); box-shadow: 0 10px 26px rgba(0, 0, 0, .25), 0 0 0 1px rgba(212, 166, 74, .5); transition: transform .2s var(--spring); display: flex; justify-content: space-between; align-items: center; }
.btn.center { justify-content: center; }
.btn:active { transform: scale(.97); }
.btn.gold { background: var(--gold-grad); color: var(--black); box-shadow: 0 10px 26px rgba(169, 122, 34, .4); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--gold); }
.link { color: var(--gold-lo); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--cream); border-radius: 99px; padding: 3px; }
.stepper button { width: 30px; height: 30px; border-radius: 50%; background: var(--paper); font-weight: 800; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.stepper span { min-width: 26px; text-align: center; font-weight: 700; }
.x { color: var(--bad); font-size: 12.5px; font-weight: 600; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--cream-2); border-radius: 18px; margin-bottom: 14px; }
.seg button { padding: 12px; border-radius: 14px; font-weight: 700; color: var(--muted); transition: all .25s var(--ease); }
.seg button.on { background: var(--black); color: var(--gold-hi); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.field { display: block; margin-bottom: 10px; }
.field span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--cream-2); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 166, 74, .2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2.wide { grid-template-columns: 2fr 1fr; }

.opt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--cream-2); background: #fff; margin-bottom: 8px; width: 100%; text-align: left; transition: all .2s var(--ease); }
.opt .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cdbb94; display: grid; place-items: center; flex: none; transition: all .2s; }
.opt.sq .dot { border-radius: 7px; }
.opt.on { border-color: var(--gold); background: #fff8e4; box-shadow: 0 0 0 3px rgba(212, 166, 74, .18); }
.opt.on .dot { background: var(--gold-grad); border-color: var(--gold-lo); }
.opt.on .dot::after { content: ''; width: 6px; height: 11px; border: solid var(--black); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.opt b { flex: 1; font-weight: 600; font-size: 15px; }
.opt em { font-style: normal; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.opt .ico { width: 22px; height: 22px; }

.qr { margin: 6px auto 0; width: 190px; padding: 12px; background: #fff; border-radius: 18px; box-shadow: 0 8px 22px rgba(0, 0, 0, .12); }
.copy { margin-top: 10px; font-size: 11.5px; word-break: break-all; background: var(--cream); padding: 10px; border-radius: 12px; color: var(--muted); text-align: center; }

/* ---------- sheet do produto ---------- */
#sheet { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
#sheet.open { pointer-events: auto; }
#sheet .veil { position: absolute; inset: 0; background: rgba(8, 6, 3, .6); opacity: 0; transition: opacity .3s; backdrop-filter: blur(3px); }
#sheet.open .veil { opacity: 1; }
#sheet .panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92%; display: flex; flex-direction: column; background: var(--cream); border-radius: 30px 30px 0 0; transform: translateY(100%); transition: transform .45s var(--ease); }
#sheet.open .panel { transform: none; }
.panel .scroll { overflow-y: auto; padding: 0 16px 8px; }
.panel .grab { width: 44px; height: 5px; border-radius: 9px; background: #cdbb94; margin: 10px auto; flex: none; }
.panel .head { display: flex; gap: 14px; align-items: center; padding: 0 16px 12px; }
.panel .head .art { width: 84px; height: 84px; }
.panel .head h3 { font-family: var(--serif); font-size: 21px; }
.panel .foot { padding: 12px 16px 16px; display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--cream-2); background: var(--paper); }
.panel .foot .btn { flex: 1; }
.gt { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 8px; }
.gt h4 { font-family: var(--serif); font-size: 17px; }
.gt small { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--cream-2); color: var(--muted); }
.gt small.req { background: var(--black); color: var(--gold-hi); }
.gt small.ok { background: var(--ok); color: #fff; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }

/* ---------- acompanhamento ---------- */
.done { text-align: center; padding: 26px 16px 8px; }
.check { width: 92px; height: 92px; margin: 0 auto 12px; border-radius: 50%; background: var(--gold-grad); display: grid; place-items: center; animation: pop .6s var(--spring) both; box-shadow: 0 0 0 10px rgba(212, 166, 74, .2); }
.check svg { width: 46px; height: 46px; stroke: var(--black); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0 } }
.done h2 { font-family: var(--serif); font-size: 26px; }
.done .script { font-family: var(--script); font-size: 34px; line-height: 1; }
.steps { position: relative; padding: 6px 0 2px 6px; }
.steps::before { content: ''; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 3px; background: var(--cream-2); border-radius: 3px; }
.step { position: relative; display: flex; gap: 16px; align-items: center; padding: 11px 0; color: var(--muted); font-weight: 600; }
.step .d { width: 31px; height: 31px; border-radius: 50%; background: var(--paper); border: 3px solid var(--cream-2); display: grid; place-items: center; z-index: 1; flex: none; transition: all .4s var(--ease); font-size: 14px; }
.step.past { color: var(--text); }
.step.past .d { background: var(--gold-grad); border-color: var(--gold-lo); }
.step.now { color: var(--text); font-size: 17px; }
.step.now .d { background: var(--black); border-color: var(--gold); color: var(--gold-hi); animation: pulse 1.6s infinite; }
.step small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .9 } }

.empty { text-align: center; padding: 50px 24px; color: var(--muted); }
.empty .art { margin: 0 auto 14px; width: 120px; height: 120px; }
.toast { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); background: var(--black); color: var(--gold-hi); padding: 11px 18px; border-radius: 99px; font-weight: 600; font-size: 14px; z-index: 40; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: rise .3s var(--ease) both; white-space: nowrap; }
.closed-banner { margin: 14px 16px 0; padding: 14px; border-radius: 18px; background: #3a1512; color: #ffd9d4; font-weight: 600; font-size: 14px; text-align: center; border: 1px solid #7a2a22; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream-2); border-radius: 18px; padding: 5px; margin-bottom: 16px; }
.tabs button { padding: 12px; border-radius: 14px; font-weight: 700; color: var(--muted); }
.tabs button.on { background: var(--black); color: var(--gold-hi); }
.code-in { text-align: center; letter-spacing: .5em; font-size: 24px !important; font-weight: 700; }
.logo { object-fit: cover; }
