:root {
  color-scheme: dark;
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
  color: #f1f1ed;
  background: #101516;
  --surface: #181f20;
  --surface-raised: #202829;
  --line: #394342;
  --muted: #acb7b3;
  --red: #d82f37;
  --gold: #f1bf56;
  --green: #70ce9a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; line-height: 1.45; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 72px; padding: 0 clamp(18px, 3vw, 48px); display: flex; align-items: center; gap: 30px; border-bottom: 1px solid #303a39; background: #0b1011; }
.brand { text-decoration: none; display: inline-flex; gap: 8px; align-items: baseline; flex-shrink: 0; font-family: "Arial Narrow", Impact, sans-serif; font-size: 27px; font-weight: 800; line-height: 1; }
.brand strong { color: var(--red); font-weight: 900; }
.main-nav { height: 100%; margin-left: auto; display: flex; align-items: stretch; gap: 24px; }
.nav-button { border: 0; border-bottom: 2px solid transparent; padding: 2px 0 0; background: none; color: #abb5b1; font-size: 13px; font-weight: 700; white-space: nowrap; }
.nav-button:hover { color: #fff; }
.nav-button.active { border-bottom-color: var(--red); color: #fff; }
.nav-count { background: #333a3a; padding: 1px 6px; border-radius: 4px; font-size: 11px; margin-left: 4px; }
main { flex: 1; }

.world-banner { position: relative; display: flex; align-items: center; min-height: 250px; background: #4b554f url("assets/checkpoint.png") center 48% / cover no-repeat; border-bottom: 1px solid #474d49; isolation: isolate; }
.world-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 12, 13, .82) 0%, rgba(7, 12, 13, .50) 42%, rgba(7, 12, 13, .10) 100%); z-index: -1; }
.banner-content { margin-left: clamp(22px, 4vw, 64px); max-width: 620px; padding: 30px 18px 30px 0; }
.banner-kicker, .eyebrow { color: var(--gold); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.banner-content h1 { margin: 8px 0 12px; font-family: "Arial Narrow", Impact, sans-serif; font-size: 64px; line-height: 1; text-transform: uppercase; }
.banner-content p { margin: 0; color: #ebeeeb; font-size: 16px; line-height: 1.45; }
.content-wrap { max-width: 1550px; margin: 0 auto; padding: 0 clamp(18px, 3vw, 48px); }
.section-heading { padding: 34px 0 20px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.section-heading h2, .checkout-heading h2 { margin: 5px 0 0; font-size: 24px; line-height: 1.2; }
.section-heading p { margin: 0 0 3px; color: var(--muted); font-size: 13px; text-align: right; }
.store-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 350px); gap: 28px; align-items: start; padding-bottom: 64px; }
.package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.package-card { min-width: 0; min-height: 176px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid #35403e; border-radius: 6px; padding: 18px; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.package-card:hover { border-color: #87948e; background: #1d2626; transform: translateY(-2px); }
.package-card.selected { border-color: var(--red); background: #251b1e; }
.coin-mark { width: 38px; height: 38px; border: 2px solid var(--gold); border-radius: 50%; display: grid; place-items: center; color: var(--gold); font-size: 19px; font-family: Georgia, serif; font-weight: bold; background: #30291b; flex-shrink: 0; }
.package-card h3 { margin: 17px 0 18px; font-size: 21px; line-height: 1.15; }
.card-bottom { margin-top: auto; padding-top: 13px; border-top: 1px solid #39423f; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-bottom strong { color: var(--gold); font-size: 18px; white-space: nowrap; }
.select-button { min-height: 35px; border: 1px solid #6e7975; border-radius: 4px; background: transparent; color: #f4f4f1; padding: 7px 11px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.select-button:hover, .package-card.selected .select-button { border-color: var(--red); background: var(--red); color: #fff; }

.checkout-panel { position: sticky; top: 20px; border: 1px solid #46504c; border-top: 3px solid var(--red); border-radius: 5px; background: #1b2222; padding: 23px; }
.checkout-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.checkout-heading h2 { font-size: 22px; }
.selected-package { padding: 18px 0; margin-bottom: 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.selected-package small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.selected-package b { font-size: 17px; }
.selected-package strong { color: var(--gold); white-space: nowrap; font-size: 16px; }
.field-group { margin: 0 0 17px; }
.field-group label, .payment-fieldset legend { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 750; color: #d7dcda; }
.field-group input { width: 100%; height: 44px; border: 1px solid #4d5b56; border-radius: 4px; padding: 0 12px; color: #fff; background: #111718; outline: none; font-size: 13px; }
.field-group input::placeholder { color: #7c8986; }
.field-group input:focus { border-color: var(--gold); }
.field-group input.invalid { border-color: var(--red); }
.payment-fieldset { border: 0; padding: 0; margin: 2px 0 18px; min-width: 0; }
.payment-method { display: flex; align-items: center; height: 43px; border: 1px solid var(--gold); border-radius: 4px; padding: 0 14px; background: #302919; color: #ffdb80; font-size: 13px; font-weight: 700; }
.coupon-row { display: flex; gap: 7px; }
.coupon-row input { min-width: 0; }
.outline-button, .back-button { border: 1px solid #72807a; border-radius: 4px; background: transparent; color: #f2f5f1; padding: 10px 13px; font-size: 12px; font-weight: 750; }
.outline-button:hover, .back-button:hover { background: #333d3b; }
.field-message { display: block; min-height: 16px; margin-top: 5px; color: var(--green); font-size: 11px; }
.field-message.error { color: #ff8589; }
.total-row { border-top: 1px solid var(--line); padding: 19px 0 17px; margin-top: 4px; display: flex; justify-content: space-between; align-items: baseline; }
.total-row span { color: #c9d0cd; font-size: 14px; }
.total-row strong { color: var(--gold); font-size: 24px; }
.form-error { color: #ff979b; font-size: 12px; line-height: 1.4; margin: 0 0 11px; }
.primary-button { width: 100%; min-height: 48px; border: 1px solid #dd3941; border-radius: 4px; padding: 10px 15px; background: #c9242d; color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.primary-button:hover { background: #e0353f; }
.primary-button span { font-size: 21px; line-height: 1; }
.checkout-notice { margin: 12px 0 0; color: #acb5b0; font-size: 11px; line-height: 1.4; }

.page-heading { padding: 46px 0 28px; border-bottom: 1px solid var(--line); }
.page-heading h1 { margin: 6px 0; font-size: 36px; }
.page-heading p { color: var(--muted); margin: 0; }
.orders-list { padding: 22px 0 60px; }
.order-row { width: 100%; display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(90px, .7fr) minmax(95px, .8fr) minmax(110px, .9fr) auto; gap: 16px; align-items: center; text-align: left; border: 0; border-bottom: 1px solid var(--line); padding: 19px 8px; background: none; color: #f1f2ee; }
.order-row:hover { background: #1b2221; }
.order-row strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.order-row small { color: var(--muted); font-size: 11px; }
.order-row .row-arrow { font-size: 20px; }
.status-pill { display: inline-block; border: 1px solid #8e7337; color: #ffd77a; padding: 5px 8px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status-pill.queued { border-color: #5c9c80; color: #8ee3b4; }
.status-pill.delivered { border-color: #489767; color: #9de7b5; }
.status-pill.canceled { border-color: #727776; color: #b6bfba; }
.empty-orders { padding: 48px 0; max-width: 420px; }
.empty-orders h2 { margin-bottom: 5px; }
.empty-orders p { color: var(--muted); line-height: 1.5; }
.empty-orders .outline-button { margin-top: 12px; }
.back-button { margin: 30px 0 23px; }
.order-detail-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.order-detail-head h1 { font-size: 32px; margin: 5px 0; overflow-wrap: anywhere; }
.order-detail-head p { margin: 0; color: var(--muted); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 36px; padding: 28px 0 65px; }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 28px; }
.timeline-step { border-top: 3px solid #586260; padding-top: 11px; color: #98a19e; font-size: 12px; font-weight: 750; }
.timeline-step.done { border-color: var(--green); color: #cdebd8; }
.timeline-step.current { border-color: var(--gold); color: #ffe0a0; }
.detail-section { border-top: 1px solid var(--line); padding: 20px 0; }
.detail-section h2 { margin: 0 0 13px; font-size: 17px; }
.detail-pairs { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 11px 18px; margin: 0; font-size: 14px; }
.detail-pairs dt { color: var(--muted); }
.detail-pairs dd { margin: 0; overflow-wrap: anywhere; }
.order-actions { border: 1px solid var(--line); border-top: 3px solid var(--gold); background: #191f1f; padding: 22px; align-self: start; }
.order-actions h2 { margin: 3px 0 8px; font-size: 20px; }
.order-actions p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.order-actions button { margin-top: 10px; width: 100%; justify-content: center; }
.payment-instructions { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.payment-instructions h3 { margin: 0 0 12px; font-size: 15px; }
.payment-instructions label { display: block; margin: 12px 0 5px; font-size: 12px; font-weight: 700; }
.payment-instructions textarea { width: 100%; min-height: 74px; resize: vertical; border: 1px solid var(--line); padding: 9px; background: #0e1213; color: #eee; font: 11px/1.4 monospace; overflow-wrap: anywhere; }
.pix-qr { display: block; width: min(210px, 100%); height: auto; margin: 0 auto; background: #fff; padding: 8px; }
.checkout-link { text-decoration: none; margin-top: 14px; justify-content: space-between; }
.danger-button { min-height: 42px; border: 1px solid #b83a40; border-radius: 3px; background: #401b20; color: #ffb8bb; padding: 9px 12px; font-size: 12px; font-weight: 750; }
.danger-button:hover { background: #60252b; }
.footer { padding: 22px clamp(18px, 3vw, 48px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #84908c; font-size: 10px; font-weight: 800; }
.confirm-dialog { width: min(390px, calc(100vw - 32px)); border: 1px solid #535d59; border-radius: 4px; background: #1b2121; color: #f5f5f0; padding: 22px; }
.confirm-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.confirm-dialog h2 { margin: 0 0 10px; font-size: 19px; }
.confirm-dialog p { color: var(--muted); font-size: 13px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 21px; }

@media (max-width: 1160px) {
  .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-layout { grid-template-columns: minmax(0, 1fr) minmax(290px, 330px); gap: 18px; }
}

@media (max-width: 790px) {
  .store-layout, .detail-layout { grid-template-columns: 1fr; }
  .checkout-panel { position: static; }
  .section-heading { align-items: start; }
  .section-heading p { max-width: 210px; }
  .order-row { grid-template-columns: 1fr auto; gap: 7px 12px; }
  .order-row > :nth-child(2), .order-row > :nth-child(3), .order-row > :nth-child(4) { grid-row: 2; }
  .order-row > :nth-child(4) { grid-column: 1 / -1; grid-row: 3; }
  .order-row .row-arrow { grid-column: 2; grid-row: 1; }
}

@media (max-width: 560px) {
  .topbar { height: auto; min-height: 66px; padding: 10px 16px; flex-wrap: wrap; gap: 8px 14px; }
  .brand { font-size: 22px; }
  .main-nav { order: 3; width: 100%; height: 36px; gap: 24px; }
  .nav-button { font-size: 13px; }
  .world-banner { min-height: 200px; background-position: 60% center; }
  .world-banner::before { background: rgba(7, 12, 13, .55); }
  .banner-content { margin-left: 19px; padding-right: 14px; }
  .banner-content h1 { font-size: 43px; }
  .banner-content p { font-size: 13px; max-width: 245px; }
  .section-heading { display: block; padding-top: 25px; }
  .section-heading h2 { font-size: 23px; }
  .section-heading p { text-align: left; max-width: none; margin-top: 7px; }
  .package-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .package-card { min-height: 174px; padding: 12px; }
  .coin-mark { width: 34px; height: 34px; font-size: 17px; }
  .package-card h3 { font-size: 16px; margin: 14px 0 12px; }
  .card-bottom { align-items: stretch; flex-direction: column; padding-top: 12px; }
  .card-bottom strong { font-size: 16px; }
  .select-button { padding: 7px; width: 100%; }
  .checkout-panel { margin-top: 10px; }
  .order-detail-head { align-items: start; flex-direction: column; }
  .order-detail-head h1 { font-size: 26px; }
  .detail-pairs { grid-template-columns: minmax(0, 130px) minmax(0, 1fr); font-size: 12px; }
  .footer { font-size: 9px; }
}

@media (max-width: 380px) {
  .package-card { padding: 10px; }
  .package-card h3 { font-size: 15px; }
  .checkout-panel { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .package-card { transition: none; }
  .package-card:hover { transform: none; }
}
