:root {
  color-scheme: light;
  --brand: #e31837;
  --brand-deep: #b80f2a;
  --brand-soft: #fff0f2;
  --gold: #f9bd43;
  --gold-strong: #f3a91a;
  --ink: #20232a;
  --muted: #808691;
  --line: #edf0f3;
  --canvas: #f5f6f8;
  --surface: #fff;
  --mobile-width: 390px;
  --green: #16986f;
  --shadow: 0 7px 24px rgba(27, 32, 44, .07);
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; min-height: 100%; margin: 0; }
body { background: #e9ebef; color: var(--ink); }
button, input, select, textarea { font: inherit; }
svg { display: block; width: 18px; height: 18px; flex: none; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(227, 24, 55, .2); outline-offset: 2px; }

.app-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, var(--mobile-width));
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: var(--canvas);
  box-shadow: 0 0 48px rgba(23, 28, 39, .11);
}
.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  flex: 0 0 60px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  color: #fff;
  background: var(--brand);
}
.brand-lockup { display: flex; min-width: 0; align-items: center; gap: 11px; }
.brand-mark { display: flex; width: 140px; height: 46px; flex: none; align-items: center; justify-content: center; padding: 3px 7px; border: 1px solid rgba(255,255,255,.86); border-radius: 9px; background: #fff; box-shadow: 0 2px 7px rgba(91,0,15,.12); }
.brand-lockup img { display: block; width: 126px; max-height: 41px; object-fit: contain; object-position: center; }
.brand-lockup .page-title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.25px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.icon-button {
  position: relative;
  display: grid;
  width: 37px;
  height: 37px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: rgba(255,255,255,.13);
  cursor: pointer;
}
.icon-button svg { width: 20px; height: 20px; stroke: currentColor; }
.icon-button .count { position: absolute; top: 0; right: -2px; display: grid; min-width: 16px; height: 16px; padding: 0 4px; place-items: center; border: 1.5px solid var(--brand); border-radius: 12px; color: var(--brand); background: #fff; font-size: 9px; font-weight: 800; }
.back-button { margin-right: -3px; background: none; }
.back-button svg { width: 23px; }

.screen-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; }
.screen-scroll::-webkit-scrollbar { display: none; }
.screen-content { padding: 17px 16px 30px; }
.screen-content.home-content { padding-top: 12px; }
.bottom-nav {
  position: relative;
  z-index: 3;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(5, 1fr);
  min-height: 68px;
  padding: 7px 7px calc(7px + var(--wv-bottom, env(safe-area-inset-bottom)));
  border-top: 1px solid #eff0f3;
  background: rgba(255,255,255,.97);
}
.nav-item { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 2px; border: 0; color: #9096a0; background: transparent; font-size: 10px; font-weight: 600; cursor: pointer; }
.nav-item svg { width: 21px; height: 21px; stroke: currentColor; }
.nav-item.active { color: var(--brand); }
.nav-item.active svg { stroke-width: 2.4; }

.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1px; }
.section-heading { display: flex; min-height: 27px; align-items: center; justify-content: space-between; gap: 12px; margin: 23px 0 12px; }
.section-heading h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.section-heading .link-button { flex: none; }
.link-button { padding: 4px 0; border: 0; color: var(--brand); background: none; font-size: 11px; font-weight: 700; cursor: pointer; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 5px 0 13px; }
.welcome-row h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.35px; }
.welcome-row p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.avatar-button { display: grid; width: 40px; height: 40px; flex: none; place-items: center; border: 2px solid white; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #ffd575, #ee843e); box-shadow: 0 2px 7px rgba(0,0,0,.12); font-size: 14px; font-weight: 800; cursor: pointer; }

.balance-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  margin-bottom: 14px;
  padding: 14px 15px;
  overflow: hidden;
  border-radius: 14px;
  color: white;
  background: linear-gradient(112deg, #e31837, #c30c2a 75%, #ad1129);
  box-shadow: 0 6px 16px rgba(227, 24, 55, .19);
}
.balance-card::after { position: absolute; top: -30px; right: 70px; width: 120px; height: 120px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; content: ''; }
.balance-info { position: relative; z-index: 1; }
.balance-caption { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.82); font-size: 10px; font-weight: 600; }
.balance-caption button { display: grid; width: 20px; height: 20px; padding: 0; place-items: center; border: 0; color: white; background: transparent; cursor: pointer; }
.balance-caption svg { width: 15px; height: 15px; }
.balance-amount { margin-top: 3px; font-size: 18px; font-weight: 800; letter-spacing: .2px; }
.balance-actions { position: relative; z-index: 1; display: flex; gap: 7px; }
.balance-actions button { display: flex; min-width: 61px; height: 38px; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; border: 1px solid rgba(255,255,255,.55); border-radius: 9px; color: white; background: rgba(255,255,255,.13); font-size: 10px; font-weight: 700; cursor: pointer; }
.balance-actions button svg { width: 13px; height: 13px; }
.balance-actions button:first-child { color: var(--brand); background: #fff; }

.hero-card { position: relative; display: flex; min-height: 162px; aspect-ratio: 1200 / 461; align-items: flex-end; overflow: hidden; border-radius: 14px; background: #6d100c; box-shadow: var(--shadow); }
.hero-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% center; }
.hero-card::after { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(47,0,8,.72), rgba(68,0,9,.15) 77%), linear-gradient(0deg, rgba(28,0,6,.38), transparent 65%); content: ''; }
.hero-copy { position: relative; z-index: 1; max-width: 62%; padding: 16px; color: white; }
.hero-kicker { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 7px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; color: #ffe7ab; background: rgba(49,0,7,.24); font-size: 9px; font-weight: 700; }
.hero-copy h2 { margin: 0; font-size: 19px; line-height: 1.18; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.hero-copy p { margin: 6px 0 0; color: rgba(255,255,255,.86); font-size: 10px; }
.hero-copy .hero-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 11px; border: 0; border-radius: 8px; color: #7e1c17; background: #ffd66f; font-size: 10px; font-weight: 800; cursor: pointer; }

.product-strip { display: grid; grid-auto-columns: 129px; grid-auto-flow: column; gap: 10px; margin: 0 -16px; padding: 1px 16px 7px; overflow-x: auto; scrollbar-width: none; }
.product-strip::-webkit-scrollbar { display: none; }
.product-card { position: relative; display: flex; min-height: 126px; flex-direction: column; justify-content: space-between; padding: 11px 11px 10px; overflow: hidden; border: 1px solid rgba(30,35,44,.045); border-radius: 13px; background: var(--surface); box-shadow: 0 2px 7px rgba(30,35,44,.035); text-align: left; cursor: pointer; }
.product-card::after { position: absolute; right: -23px; bottom: -37px; width: 88px; height: 88px; border-radius: 50%; background: var(--glow, #fff0dc); content: ''; opacity: .74; }
.product-card img { position: relative; z-index: 1; display: block; width: 91px; height: 49px; object-fit: contain; object-position: center; }
.product-card .product-note { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
.product-card strong { font-size: 11px; }
.product-card small { color: var(--muted); font-size: 9px; }
.product-card .product-arrow { position: absolute; z-index: 1; right: 9px; bottom: 10px; display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); }
.product-arrow svg { width: 13px; height: 13px; }

.draw-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; }
.draw-logo { display: grid; width: 67px; height: 58px; flex: none; place-items: center; border-radius: 10px; background: #fff8eb; }
.draw-logo img { display: block; max-width: 60px; max-height: 41px; object-fit: contain; object-position: center; }
.draw-copy { flex: 1; min-width: 0; }
.draw-copy strong { display: block; font-size: 12px; }
.draw-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.draw-amount { margin-top: 5px; color: #d8970a; font-size: 13px; font-weight: 800; }
.draw-chevron { width: 17px; height: 17px; flex: none; color: #9ca2aa; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.game-grid .product-card { min-height: 126px; }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 2px; border: 0; color: var(--ink); background: transparent; font-size: 9px; font-weight: 600; cursor: pointer; }
.quick-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; color: var(--brand); background: #fff; box-shadow: 0 2px 7px rgba(25,29,38,.055); }
.quick-icon svg { width: 21px; height: 21px; stroke: currentColor; }
.notice-card { display: flex; align-items: flex-start; gap: 9px; margin-top: 17px; padding: 11px 12px; border: 1px solid #f6e7bd; border-radius: 11px; color: #7a5b17; background: #fff9e9; font-size: 9px; line-height: 1.6; }
.notice-card svg { width: 16px; height: 16px; flex: none; }

.chips { display: flex; gap: 7px; margin: 0 -16px 13px; padding: 0 16px 3px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 12px; border: 1px solid #e9ebef; border-radius: 999px; color: #737984; background: white; font-size: 10px; font-weight: 600; cursor: pointer; }
.chip.active { border-color: var(--brand); color: white; background: var(--brand); }
.game-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.game-head img { display: block; width: 98px; height: 65px; flex: none; object-fit: contain; object-position: center; }
.game-head-copy { flex: 1; min-width: 0; }
.game-head-copy h1 { margin: 0 0 4px; font-size: 16px; }
.game-head-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.jackpot-strip { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; padding: 11px 13px; border-radius: 11px; color: #fff; background: linear-gradient(100deg, #a90e2a, #e73548); }
.jackpot-strip span { color: rgba(255,255,255,.78); font-size: 10px; }
.jackpot-strip strong { font-size: 16px; letter-spacing: .25px; }
.panel { margin-bottom: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; font-size: 12px; font-weight: 700; }
.panel-title .subtle { color: var(--muted); font-size: 9px; font-weight: 500; }
.number-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 7px; }
.number-grid.compact { grid-template-columns: repeat(8, minmax(0,1fr)); gap: 6px; }
.ball { position: relative; display: grid; aspect-ratio: 1; min-width: 0; place-items: center; border: 1px solid #e7e9ed; border-radius: 50%; color: #555c66; background: #fff; font-size: 10px; font-weight: 700; cursor: pointer; transition: .14s ease; }
.ball:hover { transform: translateY(-1px); border-color: #f2a8b4; }
.ball.selected { border-color: var(--brand); color: #fff; background: var(--brand); box-shadow: 0 3px 8px rgba(227,24,55,.22); }
.ball.lucky { border-color: var(--gold-strong); color: #fff; background: var(--gold-strong); }
.ball:disabled { cursor: not-allowed; opacity: .32; }
.selection-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px dashed #e7e9ed; color: var(--muted); font-size: 10px; }
.selection-summary strong { color: var(--ink); }
.selection-tools { display: flex; gap: 8px; }
.small-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 33px; padding: 0 10px; border: 1px solid #e8eaee; border-radius: 8px; color: #535963; background: white; font-size: 10px; font-weight: 600; cursor: pointer; }
.small-button svg { width: 13px; height: 13px; }
.small-button.red { border-color: #ffd7dd; color: var(--brand); background: #fff9fa; }
.inline-select { min-height: 38px; padding: 0 10px; border: 1px solid #e7e9ed; border-radius: 9px; color: var(--ink); background: white; font-size: 11px; }
.select-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; font-size: 10px; font-weight: 600; }
.digit-slots { display: flex; justify-content: center; gap: 10px; margin: 15px 0; }
.digit-slot { display: grid; width: 52px; height: 52px; place-items: center; border: 1px dashed #d6d9de; border-radius: 13px; color: #c2c5ca; background: #fafbfc; font-size: 20px; font-weight: 800; }
.digit-slot.filled { border-style: solid; border-color: var(--brand); color: white; background: var(--brand); }
.digit-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.digit-grid .ball { aspect-ratio: 1.38; border-radius: 9px; font-size: 14px; }
.purchase-summary { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px -16px -30px; padding: 11px 16px calc(12px + var(--wv-bottom, env(safe-area-inset-bottom))); border-top: 1px solid var(--line); background: rgba(255,255,255,.98); box-shadow: 0 -5px 18px rgba(25,29,38,.05); }
.summary-total { display: flex; flex-direction: column; gap: 3px; }
.summary-total small { color: var(--muted); font-size: 9px; }
.summary-total strong { color: var(--brand); font-size: 16px; }
.button-primary, .button-secondary, .button-outline { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 0 16px; border: 0; border-radius: 10px; color: white; background: var(--brand); box-shadow: 0 5px 12px rgba(227,24,55,.17); font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .12s, filter .12s; }
.button-primary:active, .button-secondary:active { transform: scale(.98); }
.button-primary svg, .button-secondary svg { width: 16px; height: 16px; }
.button-secondary { color: #78350f; background: #ffd064; box-shadow: none; }
.button-outline { border: 1px solid #f3c0c8; color: var(--brand); background: white; box-shadow: none; }
.button-primary.full, .button-outline.full { width: 100%; }
.button-row { display: flex; gap: 9px; margin-top: 13px; }
.button-row > * { flex: 1; }

.result-hero { position: relative; padding: 17px; overflow: hidden; border-radius: 14px; color: white; background: linear-gradient(115deg,#ca122f,#f0454e); box-shadow: 0 5px 16px rgba(227,24,55,.14); }
.result-hero:after { position: absolute; right: -20px; bottom: -55px; width: 150px; height: 150px; border: 16px solid rgba(255,255,255,.08); border-radius: 50%; content: ''; }
.result-hero h2 { position: relative; z-index: 1; margin: 0 0 5px; font-size: 14px; }
.result-hero p { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.8); font-size: 9px; }
.result-hero .result-jackpot { position: relative; z-index: 1; margin-top: 12px; color: #ffe18d; font-size: 22px; font-weight: 800; }
.result-card { margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.result-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.result-card-title { display: flex; align-items: center; gap: 9px; }
.result-card-title img { display: block; width: 52px; height: 36px; flex: none; object-fit: contain; object-position: center; }
.result-card-title strong { display: block; font-size: 11px; }
.result-card-title small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.result-balls { display: flex; flex-wrap: wrap; gap: 6px; }
.result-ball { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #4c515b; background: #f1f3f5; font-size: 10px; font-weight: 800; }
.result-ball.gold { color: #fff; background: var(--gold-strong); }
.result-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; padding-top: 9px; border-top: 1px solid #f1f2f4; color: var(--muted); font-size: 9px; }
.result-meta strong { color: var(--brand); }

.filter-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.filter-bar select { flex: 1; min-width: 0; }
.ticket-card { position: relative; margin-bottom: 10px; padding: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; }
.ticket-card:after { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--brand); content: ''; }
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ticket-product { display: flex; align-items: center; gap: 9px; }
.ticket-product img { display: block; width: 55px; height: 38px; flex: none; object-fit: contain; object-position: center; }
.ticket-product strong { display: block; font-size: 11px; }
.ticket-product small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.status-pill { padding: 5px 8px; border-radius: 99px; color: #287354; background: #eaf7f0; font-size: 8px; font-weight: 700; }
.status-pill.waiting { color: #a97513; background: #fff5dc; }
.ticket-numbers { display: flex; gap: 6px; margin: 11px 0 8px; }
.ticket-number { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #f0c2c8; border-radius: 50%; color: var(--brand); background: #fffafb; font-size: 9px; font-weight: 700; }
.ticket-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 1px solid #f2f3f5; color: var(--muted); font-size: 9px; }
.ticket-foot strong { color: var(--ink); }

.wallet-card { position: relative; padding: 18px; overflow: hidden; border-radius: 16px; color: #fff; background: linear-gradient(125deg,#b60e2c,#e82742 65%,#f35650); box-shadow: 0 8px 19px rgba(194,13,45,.2); }
.wallet-card:after { position: absolute; right: -25px; bottom: -65px; width: 190px; height: 190px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,255,255,.035), 0 0 0 39px rgba(255,255,255,.03); content: ''; }
.wallet-card .wallet-caption { color: rgba(255,255,255,.75); font-size: 10px; }
.wallet-card .wallet-value { margin: 5px 0 17px; font-size: 24px; font-weight: 800; }
.wallet-quick { position: relative; z-index: 1; display: flex; gap: 9px; }
.wallet-quick button { display: inline-flex; align-items: center; gap: 6px; min-height: 35px; padding: 0 11px; border: 0; border-radius: 8px; color: #9c172e; background: #fff; font-size: 10px; font-weight: 700; cursor: pointer; }
.wallet-quick button svg { width: 15px; height: 15px; }
.wallet-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid #f0f1f3; }
.wallet-row:last-child { border-bottom: 0; }
.wallet-row .quick-icon { width: 38px; height: 38px; border-radius: 11px; background: #f7f8fa; }
.wallet-row .quick-icon svg { width: 18px; height: 18px; }
.wallet-row-copy { flex: 1; min-width: 0; }
.wallet-row-copy strong { display: block; font-size: 10px; }
.wallet-row-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.wallet-row .money { font-size: 10px; font-weight: 700; }
.money.positive { color: var(--green); }
.money.negative { color: var(--brand); }

.profile-banner { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 15px; color: #fff; background: linear-gradient(105deg,#cb1231,#ef4050); }
.profile-avatar { display: grid; width: 49px; height: 49px; flex: none; place-items: center; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; color: #8e2d25; background: linear-gradient(145deg,#ffe4a1,#ffaf64); font-size: 17px; font-weight: 800; }
.profile-copy { flex: 1; min-width: 0; }
.profile-copy strong { display: block; font-size: 13px; }
.profile-copy small { display: block; margin-top: 4px; color: rgba(255,255,255,.8); font-size: 9px; }
.profile-rank { display: flex; align-items: center; gap: 4px; margin-top: 6px; color: #ffe39b; font-size: 8px; font-weight: 700; }
.menu-list { margin-top: 13px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.menu-row { display: flex; width: 100%; align-items: center; gap: 11px; padding: 12px 0; border: 0; border-bottom: 1px solid #f1f2f4; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.menu-row:last-child { border-bottom: 0; }
.menu-row .quick-icon { width: 37px; height: 37px; border-radius: 11px; color: #c5384e; background: #fff4f5; box-shadow: none; }
.menu-row .quick-icon svg { width: 18px; height: 18px; }
.menu-label { flex: 1; font-size: 10px; font-weight: 600; }
.menu-hint { color: var(--muted); font-size: 8px; }
.menu-chevron { width: 15px; height: 15px; color: #9da2aa; }
.account-section-label { margin: 20px 3px 8px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; }

.form-panel { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.field { display: block; margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; margin: 0 0 6px; color: #505660; font-size: 10px; font-weight: 600; }
.field input, .field select, .field textarea, .text-input { display: block; width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #e4e7eb; border-radius: 9px; color: var(--ink); background: #fff; font-size: 11px; }
.field input[type="checkbox"] { display: inline-block; width: auto; min-height: 0; margin: 0 5px 0 0; vertical-align: middle; }
.field textarea { min-height: 90px; padding: 10px 11px; resize: vertical; }
.field .helper { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.radio-row, .amount-options { display: flex; gap: 7px; }
.radio-tile { flex: 1; padding: 10px 8px; border: 1px solid #e6e8ec; border-radius: 9px; color: #656b75; background: white; font-size: 9px; font-weight: 600; text-align: center; cursor: pointer; }
.radio-tile.active { border-color: var(--brand); color: var(--brand); background: #fff6f7; }
.amount-option { flex: 1; padding: 9px 3px; border: 1px solid #e7e9ed; border-radius: 8px; color: #5e646d; background: white; font-size: 9px; font-weight: 600; cursor: pointer; }
.amount-option.active { border-color: var(--brand); color: var(--brand); background: #fff6f7; }
.qr-card { display: grid; width: 170px; height: 170px; margin: 16px auto; padding: 9px; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: white; }
.qr-pattern { display: grid; width: 100%; height: 100%; grid-template-columns: repeat(17,1fr); gap: 2px; }
.qr-pattern i { background: #21242b; }
.qr-pattern i.blank { background: white; }
.info-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f2f4; font-size: 10px; }
.info-line:last-child { border-bottom: 0; }
.info-line span { color: var(--muted); }
.info-line strong { text-align: right; }
.switch { position: relative; width: 39px; height: 22px; flex: none; padding: 0; border: 0; border-radius: 99px; background: #d5d8de; cursor: pointer; }
.switch:after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .18s; content: ''; }
.switch.on { background: var(--green); }
.switch.on:after { transform: translateX(17px); }

.empty-state { display: flex; min-height: 210px; flex-direction: column; align-items: center; justify-content: center; padding: 20px; color: var(--muted); text-align: center; }
.empty-state img { display: block; width: 102px; height: 92px; flex: none; margin-bottom: 7px; object-fit: contain; object-position: center; }
.empty-state strong { color: var(--ink); font-size: 12px; }
.empty-state p { max-width: 245px; margin: 6px 0 13px; font-size: 9px; line-height: 1.6; }
.cart-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f0f1f3; }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { display: block; width: 64px; height: 44px; flex: none; object-fit: contain; object-position: center; }
.cart-item-copy { flex: 1; min-width: 0; }
.cart-item-copy strong { display: block; font-size: 10px; }
.cart-item-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.stepper { display: flex; align-items: center; gap: 9px; }
.stepper button { display: grid; width: 23px; height: 23px; padding: 0; place-items: center; border: 1px solid #e6e8ec; border-radius: 7px; background: white; cursor: pointer; }
.stepper span { min-width: 10px; font-size: 9px; font-weight: 700; text-align: center; }
.cart-price { flex: none; color: var(--brand); font-size: 10px; font-weight: 700; }
.cart-total { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 13px; padding-top: 11px; border-top: 1px dashed #e7e9ed; font-size: 11px; font-weight: 700; }
.cart-total strong { color: var(--brand); font-size: 16px; }

#modal-host:empty { display: none; }
#modal-host { position: fixed; z-index: 20; inset: 0 auto 0 50%; width: min(100%, var(--mobile-width)); transform: translateX(-50%); display: grid; align-items: end; justify-items: center; background: rgba(21,25,32,.45); backdrop-filter: blur(2px); }
.sheet { width: 100%; max-height: min(86dvh,820px); padding: 8px 18px calc(17px + var(--wv-bottom, env(safe-area-inset-bottom))); overflow: auto; border-radius: 19px 19px 0 0; background: #fff; box-shadow: 0 -8px 35px rgba(0,0,0,.14); animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(18px); opacity: .7; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 37px; height: 4px; margin: 2px auto 12px; border-radius: 5px; background: #dfe1e5; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.sheet-head h2 { margin: 0; font-size: 15px; }
.sheet-close { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 50%; color: #777d86; background: #f3f4f6; cursor: pointer; }
.sheet-close svg { width: 17px; height: 17px; }
.toast { position: fixed; z-index: 30; bottom: calc(82px + var(--wv-bottom, env(safe-area-inset-bottom))); left: 50%; width: max-content; max-width: calc(min(100vw, var(--mobile-width)) - 38px); padding: 10px 14px; transform: translateX(-50%); border-radius: 10px; color: white; background: #222831; box-shadow: 0 5px 18px rgba(0,0,0,.2); font-size: 10px; font-weight: 600; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%,8px); } to { opacity: 1; transform: translate(-50%,0); } }
.demo-tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #f3dfaa; border-radius: 99px; color: #936c14; background: #fff8e4; font-size: 8px; font-weight: 700; }
.demo-tag svg { width: 12px; height: 12px; }
.support-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; padding: 14px; border-radius: 13px; color: white; background: linear-gradient(110deg,#a80f2c,#e43145); }
.support-hero img { width: 65px; height: 70px; flex: none; padding: 3px; border-radius: 50%; background: rgba(255,255,255,.16); object-fit: contain; object-position: center; }
.support-hero strong { display: block; font-size: 13px; }
.support-hero p { margin: 5px 0 0; color: rgba(255,255,255,.8); font-size: 9px; line-height: 1.5; }
.faq-item { padding: 12px 0; border-bottom: 1px solid #f0f1f3; }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { color: var(--ink); font-size: 10px; font-weight: 600; cursor: pointer; }
.faq-item p { margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.subpage-copy { margin: 0 0 14px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.muted { color: var(--muted); }
.text-right { text-align: right; }
.spacer-8 { height: 8px; }

.step-progress { display: grid; grid-template-columns: repeat(5,1fr); gap: 3px; margin: 2px 0 18px; }
.step-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; color: #a2a7af; text-align: center; }
.step-node:before { position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: #e8eaee; content: ''; }
.step-node:first-child:before { display: none; }
.step-node span { position: relative; z-index: 1; display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #e1e4e8; border-radius: 50%; color: #8a9099; background: #fff; font-size: 9px; font-weight: 800; }
.step-node.done { color: var(--brand); }
.step-node.done:before { background: #f3a8b3; }
.step-node.done span { border-color: var(--brand); color: #fff; background: var(--brand); }
.step-node small { font-size: 8px; font-weight: 600; }
.identity-choice, .payment-option { display: flex; width: 100%; align-items: center; gap: 10px; margin-top: 9px; padding: 11px; border: 1px solid #e8eaee; border-radius: 11px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.identity-choice > span:nth-child(2), .payment-option > span:nth-child(2) { flex: 1; }
.identity-choice > svg:last-child { width: 17px; color: #969ba4; }
.identity-choice strong, .payment-option strong { display: block; font-size: 10px; }
.identity-choice small, .payment-option small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.identity-choice .quick-icon, .payment-option .quick-icon { width: 37px; height: 37px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); box-shadow: none; }
.verification-card { padding: 21px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: center; }
.verification-icon { display: grid; width: 63px; height: 63px; margin: 0 auto 13px; place-items: center; border-radius: 19px; color: var(--brand); background: var(--brand-soft); }
.verification-icon svg { width: 28px; height: 28px; }
.verification-card h2 { margin: 0 0 8px; font-size: 15px; }
.verification-card p { margin: 0 0 16px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.upload-control { position: relative; }
.upload-control input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.payment-option { margin-top: 8px; }
.payment-option.active { border-color: var(--brand); background: #fff9fa; }
.radio-dot { width: 17px; height: 17px; flex: none; border: 1px solid #cbd0d7; border-radius: 50%; }
.payment-option.active .radio-dot { border: 5px solid var(--brand); }
.order-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f2f4; font-size: 10px; }
.order-line span { min-width: 0; }
.order-line strong { display: block; }
.order-line small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.order-line > strong { flex: none; color: var(--brand); }
.live-period { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 10px; margin-bottom: 13px; padding: 10px; border-radius: 10px; background: #fff7e8; }
.live-period span { color: var(--muted); font-size: 9px; }
.live-period strong { color: #9c6b09; font-size: 14px; }
.live-period small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }
.request-card p { margin: 8px 0; color: #555c66; font-size: 10px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-card > small { color: var(--muted); font-size: 8px; }
.request-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.request-head strong { font-size: 10px; }
.request-head .status-pill { flex: none; }
.field a { color: var(--brand); text-decoration: underline; }
.period-list { display: flex; flex-direction: column; gap: 7px; }
.period-option { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 12px; padding: 10px 12px; border: 1px solid #e8eaee; border-radius: 10px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.period-option span { font-size: 10px; font-weight: 700; }
.period-option small { color: var(--muted); font-size: 8px; }
.period-option svg { grid-column: 2; grid-row: 1 / 3; width: 16px; color: #9298a1; }
.period-option.active { border-color: var(--brand); background: #fff7f8; }
.period-option.active svg { color: var(--brand); }
.welcome-screen { display: flex; min-height: calc(100dvh - 120px); flex-direction: column; justify-content: center; padding: 14px 4px; }
.welcome-logo { display: block; width: 155px; max-height: 54px; margin: 0 auto 10px; object-fit: contain; object-position: center; }
.welcome-art { display: block; width: 185px; height: 190px; flex: none; align-self: center; object-fit: contain; object-position: center; }
.welcome-screen > .eyebrow { margin: 12px 0 5px; text-align: center; }
.welcome-screen h1 { margin: 0; font-size: 23px; text-align: center; }
.welcome-screen p { max-width: 290px; align-self: center; margin: 9px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: center; }
.welcome-screen .demo-tag { align-self: center; margin-top: 17px; }
.assistant-promo { display: flex; width: 100%; align-items: center; gap: 10px; margin-top: 15px; padding: 10px 13px; border: 1px solid #f0e1ba; border-radius: 13px; color: var(--ink); background: linear-gradient(110deg,#fffaf0,#fff); text-align: left; cursor: pointer; }
.assistant-promo img { display: block; width: 45px; height: 45px; flex: none; object-fit: contain; object-position: center; }
.assistant-promo span { flex: 1; }
.assistant-promo strong { display: block; font-size: 10px; }
.assistant-promo small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.assistant-promo > svg { color: #a2a7af; }
.chat-header { display: flex; align-items: center; gap: 11px; margin: -3px -2px 12px; padding: 10px; border-radius: 13px; color: #fff; background: linear-gradient(105deg,#b20f2b,#e73449); }
.chat-header img { width: 45px; height: 48px; flex: none; padding: 2px; border-radius: 50%; background: rgba(255,255,255,.14); object-fit: contain; object-position: center; }
.chat-header strong { display: block; font-size: 11px; }
.chat-header small { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: rgba(255,255,255,.78); font-size: 8px; }
.chat-header i { width: 6px; height: 6px; border-radius: 50%; background: #ffd366; }
.chat-history { display: flex; min-height: 200px; max-height: 46dvh; flex-direction: column; gap: 9px; padding: 11px 0; overflow: auto; }
.chat-bubble { max-width: 84%; padding: 10px 12px; border-radius: 13px; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.chat-bubble.assistant { align-self: flex-start; border: 1px solid var(--line); border-bottom-left-radius: 4px; background: #fff; }
.chat-bubble.user { align-self: flex-end; border-bottom-right-radius: 4px; color: #fff; background: var(--brand); }
.chat-compose { display: flex; gap: 8px; margin-top: 11px; padding: 8px; border: 1px solid #e8eaee; border-radius: 13px; background: #fff; }
.chat-compose input { min-width: 0; flex: 1; padding: 0 6px; border: 0; outline: 0; font-size: 10px; }
.chat-compose .button-primary { width: 40px; min-height: 38px; padding: 0; }

@media (max-width: 360px) {
  .screen-content { padding-right: 13px; padding-left: 13px; }
  .product-strip { margin-right: -13px; margin-left: -13px; padding-right: 13px; padding-left: 13px; }
  .chips { margin-right: -13px; margin-left: -13px; padding-right: 13px; padding-left: 13px; }
  .hero-copy { max-width: 66%; }
  .number-grid { gap: 5px; }
}
