:root {
  color-scheme: light;
  --font-system: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f5f5f7;
  --bg-elevated: #fbfbfd;
  --panel: #ffffff;
  --panel-soft: #f7f8fb;
  --soft: #eef2f7;
  --text: #14171f;
  --text-strong: #050816;
  --muted: #667085;
  --subtle: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --blue: #0071e3;
  --blue-dark: #005bb8;
  --blue-soft: #e8f2ff;
  --green: #147a3f;
  --green-soft: #e9f7ee;
  --amber: #946200;
  --amber-soft: #fff4d8;
  --orange: #b45309;
  --orange-soft: #fff0df;
  --red: #b42318;
  --red-soft: #fee4e2;
  --purple: #5b44c4;
  --purple-soft: #eeeaff;
  --slate: #475467;
  --slate-soft: #eef2f6;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 16px 44px rgba(16, 24, 40, .08);
  --shadow-strong: 0 24px 70px rgba(16, 24, 40, .14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, .9), transparent 34%),
    linear-gradient(180deg, #f8f8fa 0%, var(--bg) 38%, #f1f3f6 100%);
  color: var(--text);
  font-family: var(--font-system);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  color: var(--text-strong);
  font-size: clamp(20px, 4.8vw, 26px);
  font-weight: 850;
  line-height: 1.05;
}

h2 {
  color: var(--text-strong);
  font-size: clamp(22px, 5.4vw, 30px);
  font-weight: 850;
  line-height: 1.08;
}

h3 {
  color: var(--text-strong);
  font-size: clamp(17px, 4.2vw, 20px);
  font-weight: 820;
  line-height: 1.16;
}

h4 {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 820;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease, opacity .14s ease;
  -webkit-tap-highlight-color: transparent;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none;
  box-shadow: none;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  padding: 12px 14px;
  color: var(--text-strong);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

input::placeholder,
textarea::placeholder {
  color: var(--subtle);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(0, 113, 227, .72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .12), var(--shadow-sm);
}

main {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 14px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(228, 231, 236, .78);
  background: rgba(245, 245, 247, .86);
  backdrop-filter: blur(18px);
}

.topbar > div:nth-child(2) {
  min-width: 0;
}

.home-btn,
.orders-btn,
.cart-btn,
.ghost,
.small-btn,
.video-btn,
.primary,
.success,
.warning,
.danger,
.admin-login button,
.search-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--radius);
  padding: 0 15px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.home-btn,
.orders-btn,
.cart-btn,
.ghost {
  border: 1px solid rgba(228, 231, 236, .95);
  background: rgba(255, 255, 255, .88);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}

.home-btn {
  border-radius: 999px;
}

.quick-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-actions .orders-btn,
.quick-actions .cart-btn {
  min-height: 54px;
  border-radius: var(--radius-lg);
  font-size: 16px;
}

.cart-btn b {
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 6px 16px rgba(0, 113, 227, .22);
}

.primary,
.search-row button,
.admin-login button {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 113, 227, .18);
}

.primary:hover,
.search-row button:hover,
.admin-login button:hover {
  background: var(--blue-dark);
}

.success {
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 28px rgba(20, 122, 63, .16);
}

.warning {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 12px 28px rgba(180, 83, 9, .15);
}

.danger {
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 28px rgba(180, 35, 24, .15);
}

.small-btn {
  min-height: 40px;
  border: 1px solid rgba(0, 113, 227, .13);
  background: var(--blue-soft);
  color: var(--blue);
  padding: 0 13px;
  border-radius: 12px;
  box-shadow: none;
}

.remove-btn {
  border-color: rgba(180, 35, 24, .14);
  background: var(--red-soft);
  color: var(--red);
}

.link-btn {
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
}

.search-panel,
.card,
.summary-box,
.admin-login,
.admin-panel,
.notice,
.kpi {
  border: 1px solid rgba(228, 231, 236, .9);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.search-panel {
  padding: 18px;
}

.search-panel label,
.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--slate);
  font-size: 13px;
  font-weight: 780;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 10px;
}

.result-area {
  margin-top: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 24px 0 12px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.desc {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.46;
  overflow-wrap: anywhere;
}

.product-list,
.stack,
.summary-grid {
  display: grid;
  gap: 11px;
}

.card {
  padding: 15px;
}

.product-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.vtp-list-head,
.vtp-line-summary {
  display: grid;
  grid-template-columns: 34px minmax(120px, 1.1fr) 110px minmax(170px, 1.5fr) 95px 95px 95px minmax(180px, 1.2fr);
  gap: 8px;
  align-items: center;
}

.vtp-list-head {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.vtp-one-row {
  border-left: 5px solid transparent;
}

.vtp-one-row summary {
  cursor: pointer;
  list-style: none;
}

.vtp-one-row summary::-webkit-details-marker {
  display: none;
}

.vtp-old-row {
  background: #fff8db;
  border-left-color: #d69e2e;
}

.vtp-new-row {
  background: #eefaf4;
  border-left-color: #2f9e6d;
}

.vtp-deferred-row {
  background: #fff0e5;
  border-left-color: var(--orange);
}

.vtp-hard-row {
  background: #fff2f2;
  border-left-color: var(--red);
}

.vtp-soft-row {
  border-left-color: var(--orange);
}

.vtp-line-codes {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vtp-line-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.vtp-merge-alert {
  border: 2px solid #d69e2e;
}

.vtp-subtabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f3f1;
}

.vtp-subtabs button {
  min-height: 42px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.vtp-subtabs button.active {
  border-color: var(--line);
  background: #fff;
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}

.vtp-subtabs button span {
  display: inline-grid;
  min-width: 23px;
  min-height: 23px;
  place-items: center;
  margin-left: 5px;
  border-radius: 999px;
  background: #e8e8e4;
  font-size: 12px;
}

.vtp-detail-label {
  pointer-events: none;
}

.vtp-excluded-row {
  background: #f4f4f2;
  border-left: 5px solid #77736b;
}

.vtp-exclude-dialog {
  width: min(680px, 100%);
}

.vtp-exclude-dialog > h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.vtp-exclude-summary {
  margin-top: 12px;
}

.vtp-exclude-summary .summary-line {
  align-items: flex-start;
}

.vtp-exclude-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d69e2e;
  border-radius: 7px;
  background: #fff8db;
  font-weight: 800;
}

.vtp-exclude-confirm input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.vtp-exclude-actions {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .vtp-list-head {
    display: none;
  }

  .vtp-line-summary {
    grid-template-columns: 28px 1fr;
  }

  .vtp-line-summary > span,
  .vtp-line-summary > strong {
    grid-column: 2;
  }

  .vtp-subtabs {
    grid-template-columns: 1fr;
  }
}

.product-card-unavailable {
  border-color: #d8d8d4;
  background: #f7f6f2;
}

.product-main {
  min-width: 0;
}

.code {
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.price {
  margin-top: 6px;
  color: var(--text-strong);
  font-size: 19px;
  font-weight: 880;
}

.sold-banner {
  display: grid;
  gap: 3px;
  margin-top: 11px;
  padding: 11px 12px;
  border: 2px solid #b42318;
  border-radius: 8px;
  background: #fff1ee;
  color: #7a1b14;
}

.sold-banner strong {
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
}

.sold-banner span {
  font-weight: 850;
}

.sold-banner small {
  color: #6f625d;
  line-height: 1.35;
}

.sold-banner.exported {
  border-color: #57534e;
  background: #efefec;
  color: #292524;
}

.sold-disabled {
  border-color: #d8d8d4;
  background: #e7e5df;
  color: #57534e;
  cursor: not-allowed;
}

.public-product-status {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #d8d8d4;
  border-left-width: 5px;
  border-radius: 8px;
  background: #f7f7f5;
  color: #292524;
}

.public-product-status strong {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
}

.public-product-status span,
.public-product-status small {
  line-height: 1.45;
}

.public-product-status small {
  color: #57534e;
}

.public-product-status.available {
  border-color: #27845a;
  background: #eaf7f0;
  color: #12653f;
}

.public-product-status.held {
  border-color: #c77a08;
  background: #fff7df;
  color: #7a4700;
}

.public-product-status.sold {
  border-color: #c43d32;
  background: #fff0ed;
  color: #8b2119;
}

.public-product-status.exported {
  border-color: #2878a8;
  background: #edf7fc;
  color: #165a82;
}

.focused-result-wrap {
  width: min(680px, 100%);
  margin: 18px auto;
}

.search-focus-card {
  grid-template-columns: 1fr;
  padding: 24px;
  text-align: center;
  border-width: 2px;
}

.search-focus-card .product-main,
.search-focus-card .public-product-status {
  justify-items: center;
}

.search-focus-card .result-label,
.search-focus-card .gas-warning,
.search-focus-card .meta-row {
  margin-right: auto;
  margin-left: auto;
}

.search-focus-card .code {
  margin-top: 6px;
  color: #1c1917;
  font-size: 42px;
  line-height: 1.05;
}

.search-focus-card .price {
  font-size: 24px;
}

.search-focus-card .public-product-status {
  width: min(520px, 100%);
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.search-focus-card > .action-row {
  width: min(520px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.buy-now-btn,
.checkout-now-btn {
  width: 100%;
  min-height: 52px;
  border-color: #137a4b;
  background: #168653;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.buy-now-btn:hover,
.checkout-now-btn:hover {
  background: #116a40;
}

.public-product-status.held-self {
  border-color: #2878a8;
  background: #edf7fc;
  color: #165a82;
}

.order-nav-help {
  margin-top: 10px;
}

.resolved-warning-summary {
  border-color: #b7dec8;
  background: #f0faf5;
}

.resolved-warning-summary strong {
  color: #18794e;
}

.cart-stuck-card {
  border-left: 4px solid #b45309;
}

.cart-stuck-warning {
  color: #8a4b12;
  font-weight: 820;
}

.cart-stuck-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ded8ce;
}

.product-tags,
.tag-chip-grid,
.tag-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.product-tags {
  margin-top: 8px;
}

.product-tag,
.tag-filter,
.tag-check span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.product-tag {
  padding: 6px 9px;
}

.tag-filter {
  min-height: 38px;
  padding: 0 13px;
  cursor: pointer;
}

.tag-filter.active,
.tag-check input:checked + span {
  border-color: rgba(180, 35, 24, .32);
  background: #fff2f0;
  color: var(--brand-dark);
}

.tag-check {
  cursor: pointer;
}

.tag-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tag-check span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
}

.product-tag-field {
  grid-column: 1 / -1;
}

.gas-warning {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(180, 35, 24, .24);
  border-radius: 6px;
  background: #fff3e8;
  color: #9f1d16;
  font-size: 13px;
  font-weight: 900;
}

.featured-result {
  border-color: rgba(0, 113, 227, .42);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 20px 58px rgba(0, 113, 227, .13);
}

.result-label {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  margin-bottom: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.meta-row,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 850;
}

.available { background: var(--green-soft); color: var(--green); }
.held { background: var(--amber-soft); color: var(--amber); }
.awaiting_payment { background: var(--blue-soft); color: var(--blue); }
.pending { background: var(--blue-soft); color: var(--blue); }
.reserved { background: var(--amber-soft); color: var(--amber); }
.cod_approved,
.deposited,
.paid,
.sold { background: var(--slate-soft); color: var(--slate); }
.issue { background: var(--orange-soft); color: var(--orange); }
.price_issue { background: var(--orange-soft); color: var(--orange); }
.cancelled { background: var(--red-soft); color: var(--red); }
.exported { background: var(--slate-soft); color: var(--slate); }

.video-btn {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 13px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 24px rgba(17, 24, 39, .16);
}

.notice {
  padding: 13px;
  box-shadow: none;
}

.notice.soft {
  background: var(--slate-soft);
}

.cart-warning {
  background: var(--blue-soft);
  border-color: rgba(0, 113, 227, .2);
}

.empty-state {
  text-align: center;
  padding: 20px;
}

.summary-box {
  margin-top: 14px;
  padding: 16px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.summary-line:last-child {
  border-bottom: 0;
}

.summary-line span {
  min-width: 0;
}

.summary-line strong {
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 850;
  text-align: right;
}

.checkout-grid {
  display: grid;
  gap: 12px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 13px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.choice input {
  width: auto;
  min-height: auto;
  box-shadow: none;
}

.choice:has(input:checked) {
  border-color: rgba(0, 113, 227, .58);
  background: var(--blue-soft);
}

.qr-box {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed #c8ced8;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #fff, #f8fafc);
  text-align: center;
  color: var(--muted);
}

.qr-box img {
  width: min(270px, 80vw);
  max-height: 270px;
  object-fit: contain;
}

.success-screen {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 18px 0;
}

.success-card {
  width: min(540px, 100%);
}

.admin-login {
  padding: 20px;
}

.admin-login p {
  margin: 8px 0 14px;
  color: var(--muted);
}

.admin-panel {
  padding: 14px;
  box-shadow: none;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 24, 39, .28) transparent;
  -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
  display: block;
  height: 7px;
}

.tabs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(17, 24, 39, .22);
}

.tabs::-webkit-scrollbar-track {
  background: transparent;
}

.tab {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 15px;
  background: var(--slate-soft);
  color: var(--slate);
  font-weight: 850;
}

.tab.active {
  background: var(--text-strong);
  color: #fff;
  box-shadow: 0 12px 26px rgba(17, 24, 39, .14);
}

.admin-product-pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.admin-product-pager .action-row {
  margin-top: 0;
}

.small-btn.active-page {
  background: var(--text-strong);
  color: #fff;
  border-color: var(--text-strong);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--soft);
}

.segmented button {
  min-height: 42px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
}

.segmented button.active {
  color: var(--text-strong);
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .08);
}

.vtp-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vtp-check input {
  width: 17px;
  height: 17px;
}

.form-grid {
  display: grid;
  gap: 11px;
}

.checkline {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--slate);
  font-weight: 760;
}

.checkline input {
  width: auto;
  min-height: auto;
  box-shadow: none;
}

.address-field {
  position: relative;
}

.suggest-list {
  display: none;
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-strong);
  padding: 6px;
}

.suggest-list.show {
  display: block;
}

.suggest-item {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  border-radius: 10px;
}

.suggest-item:hover {
  background: var(--soft);
}

.order-mini {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  padding: 13px;
  box-shadow: var(--shadow-sm);
}

.customer-group {
  border-color: rgba(0, 113, 227, .18);
}

.approved-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.approved-block h4 {
  margin-bottom: 8px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 10px;
  margin: 12px 0;
}

.tag-filter-bar {
  margin: 10px 0 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 9px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--slate);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kpi {
  padding: 15px;
  box-shadow: var(--shadow-sm);
}

.kpi span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.kpi b {
  display: block;
  margin-top: 6px;
  color: var(--text-strong);
  font-size: 28px;
  line-height: 1;
}

.announcement-banner {
  width: min(1040px, calc(100% - 24px));
  margin: 12px auto 0;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(0, 113, 227, .16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .9);
  color: var(--text);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.announcement-banner span {
  color: var(--slate);
  line-height: 1.4;
}

.announcement-banner.info {
  background: var(--blue-soft);
}

.announcement-banner.warning {
  background: var(--amber-soft);
  border-color: rgba(154, 103, 0, .22);
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 14, 24, .48);
  display: grid;
  place-items: center;
  padding: 16px;
}

.video-dialog {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(228, 231, 236, .8);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-strong);
}

.video-frame {
  display: grid;
  place-items: center;
  min-height: 230px;
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 90;
  display: none;
  max-width: 540px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: rgba(17, 24, 39, .94);
  color: #fff;
  padding: 13px 15px;
  box-shadow: var(--shadow-strong);
}

.toast.show {
  display: block;
}

.toast.admin-toast {
  top: max(8px, env(safe-area-inset-top));
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 16px));
  padding: 10px 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  pointer-events: none;
}

.toast.success {
  background: rgba(20, 122, 63, .96);
}

.toast.warning {
  background: rgba(148, 98, 0, .96);
}

.toast.error {
  background: rgba(180, 35, 24, .96);
}

.toast-sub {
  margin-top: 4px;
  color: rgba(255, 255, 255, .84);
  font-size: 13px;
  line-height: 1.35;
}

.toast-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.toast-actions button {
  min-height: 40px;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-weight: 850;
}

.compact-money-field {
  margin-top: 10px;
}

.compact-money-field input {
  max-width: 190px;
}

.customer-suggest {
  display: grid;
  gap: 3px;
  text-align: left;
}

.customer-suggest span,
.history-address strong {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
}

footer {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 12px 16px 28px;
  text-align: center;
}

@media (min-width: 760px) {
  main {
    padding: 24px;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    padding: 14px 24px;
  }

  .quick-actions {
    grid-column: auto;
    display: flex;
    gap: 10px;
  }

  .quick-actions .orders-btn,
  .quick-actions .cart-btn {
    min-height: 46px;
    border-radius: 999px;
    font-size: 15px;
  }

  .form-grid.two,
  .checkout-grid.two {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card {
    padding: 17px;
  }
}

@media (max-width: 520px) {
  main {
    padding: 12px;
  }

  .choice-grid,
  .filters,
  .product-card {
    grid-template-columns: 1fr;
  }

  .summary-line {
    align-items: flex-start;
  }

  .summary-line strong {
    font-size: 15px;
  }

  .search-row {
    grid-template-columns: 1fr 78px;
  }

}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }


  main,
  .topbar {
    width: min(100%, 454px);
    margin-left: auto;
    margin-right: auto;
  }

  main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar {
    justify-items: stretch;
  }

  .topbar > div:nth-child(2) {
    justify-self: center;
    text-align: center;
    width: 100%;
  }

  .quick-actions {
    justify-self: center;
    width: 100%;
  }

  .search-panel,
  .card,
  .summary-box,
  .admin-login,
  .admin-panel {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  #shopView > .section-head,
  #cartView > .section-head,
  #checkoutView > .section-head,
  #ordersView > .section-head {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  #shopView .search-panel {
    text-align: center;
  }

  #shopView .search-row input,
  .card,
  .summary-box,
  .notice,
  .admin-panel,
  .admin-login {
    text-align: left;
  }

  #pagedProducts,
  #searchResult,
  #cartItems,
  #ordersContent,
  #checkoutContent,
  #productPager,
  .checkout-grid {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  #productPager,
  #shopView > .action-row,
  .empty-state {
    justify-content: center;
    text-align: center;
  }

  .product-card {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .product-card > .action-row {
    justify-content: center;
  }

  .product-card > .action-row .small-btn {
    flex: 1 1 100%;
    min-height: 46px;
  }

  .checkout-grid > .card {
    width: 100%;
  }

  .qr-box {
    margin-left: auto;
    margin-right: auto;
  }

  .admin-head {
    align-items: flex-start;
    text-align: left;
  }
}

/* Long Lua design system - 2026 */
:root {
  --bg: #f4f4f2;
  --bg-elevated: #fafaf8;
  --panel: #ffffff;
  --panel-soft: #f7f7f5;
  --soft: #efefec;
  --text: #252321;
  --text-strong: #151412;
  --muted: #6f6b66;
  --subtle: #96918b;
  --line: #dedbd6;
  --line-strong: #c9c5bf;
  --blue: #2563a6;
  --blue-dark: #1d4f86;
  --blue-soft: #eaf2fb;
  --green: #18794e;
  --green-soft: #e8f5ee;
  --amber: #9a6500;
  --amber-soft: #fff3d5;
  --orange: #a4510b;
  --orange-soft: #fff0df;
  --red: #a61b1b;
  --red-soft: #fdebea;
  --purple: #7251a6;
  --purple-soft: #f1ebf8;
  --slate: #57534e;
  --slate-soft: #efefec;
  --brand: #b42318;
  --brand-dark: #861b14;
  --brand-soft: #fff0ee;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, .05);
  --shadow: 0 8px 24px rgba(28, 25, 23, .07);
  --shadow-strong: 0 18px 48px rgba(28, 25, 23, .14);
}

html { scroll-padding-top: 86px; }
body {
  background: var(--bg);
  font-family: var(--font-system);
  font-size: 15px;
  line-height: 1.5;
}
h1 { font-size: 23px; line-height: 1.15; font-weight: 800; }
h2 { font-size: 25px; line-height: 1.2; font-weight: 800; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 800; }
h4 { font-size: 14px; }
button { letter-spacing: 0; }
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(180, 35, 24, .22);
  outline-offset: 2px;
}
input,
textarea,
select {
  min-height: 46px;
  border-radius: 6px;
  border-color: var(--line-strong);
  background: #fff;
  box-shadow: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .1);
}

main { width: min(1120px, 100%); padding: 20px; }
body[data-view="adminView"] main { width: min(1500px, 100%); }

.topbar {
  min-height: 72px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 10px max(18px, calc((100vw - 1440px) / 2));
  border-bottom-color: var(--line);
  background: rgba(250, 250, 248, .96);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.brand-copy { min-width: 0; }
.brand-copy h1 { white-space: nowrap; }
.brand-copy p { margin-top: 1px; color: var(--muted); font-size: 12px; font-weight: 650; }
.home-btn,
.orders-btn,
.cart-btn,
.ghost,
.small-btn,
.video-btn,
.primary,
.success,
.warning,
.danger,
.admin-login button,
.search-row button {
  min-height: 42px;
  border-radius: 6px;
  font-weight: 750;
  box-shadow: none;
}
.home-btn,
.orders-btn,
.cart-btn,
.ghost { background: #fff; border-color: var(--line); }
.home-btn:hover,
.orders-btn:hover,
.cart-btn:hover,
.ghost:hover { background: var(--soft); }
.quick-actions { display: flex; gap: 8px; grid-column: auto; }
.quick-actions .orders-btn,
.quick-actions .cart-btn { min-height: 44px; border-radius: 6px; font-size: 14px; }
.cart-btn b { background: var(--brand); box-shadow: none; }
.primary,
.search-row button,
.admin-login button { background: var(--brand); box-shadow: none; }
.primary:hover,
.search-row button:hover,
.admin-login button:hover { background: var(--brand-dark); }
.small-btn { border-color: var(--line); background: #fff; color: var(--text-strong); }
.product-select-btn { background: var(--brand); border-color: var(--brand); color: #fff; }
.product-select-btn:hover { background: var(--brand-dark); }
.video-btn { background: var(--text-strong); border-radius: 6px; box-shadow: none; }

.search-panel,
.card,
.summary-box,
.admin-login,
.admin-panel,
.notice,
.kpi {
  border-radius: 8px;
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.search-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-color: #25211e;
  background: #1d1b19;
  color: #fff;
  box-shadow: var(--shadow);
}
.search-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--brand);
}
.search-panel label { margin: 5px 0 10px; color: #fff; font-size: 15px; }
.search-kicker { color: #e7aaa5; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.search-help { margin-top: 9px; color: #bbb5ae; font-size: 12px; }
.search-row { grid-template-columns: minmax(0, 1fr) 104px; }
.search-row input { min-height: 50px; border: 0; }
.search-row button { min-height: 50px; }
.section-head { margin: 28px 0 13px; }
.eyebrow { color: var(--brand); font-weight: 800; }

.product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card { min-width: 0; align-items: stretch; padding: 17px; }
.product-card .action-row { align-self: center; margin-top: 0; }
.product-card .code { font-size: 21px; }
.product-card .price { color: var(--brand-dark); font-size: 18px; }
.featured-result { border-color: rgba(180,35,24,.35); background: #fff; box-shadow: 0 10px 28px rgba(180,35,24,.08); }
.result-label { border-radius: 4px; background: var(--brand); }
.pill { border-radius: 4px; min-height: 27px; font-size: 11px; }
.empty-state { min-height: 150px; display: grid; place-items: center; }
.summary-box { border-top: 3px solid var(--brand); }

.admin-login {
  width: min(430px, 100%);
  margin: 8vh auto 0;
  padding: 30px;
  border-top: 4px solid var(--brand);
}
.admin-login .admin-brand-mark { margin-bottom: 20px; }
.admin-login label { display: block; margin: 16px 0 7px; color: var(--slate); font-size: 13px; font-weight: 750; }
.admin-login button { width: 100%; margin-top: 12px; }

.admin-panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
.admin-head {
  margin-bottom: 14px;
  padding: 2px 2px 14px;
  border-bottom: 1px solid var(--line);
}
.admin-role-note { color: var(--muted); font-size: 12px; font-weight: 700; }
.admin-workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.tabs {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 4px;
  overflow: visible;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.tab {
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  border-radius: 5px;
  padding: 0 12px;
  background: transparent;
  color: var(--slate);
  text-align: left;
  font-weight: 700;
}
.tab:hover { background: var(--soft); transform: none; }
.tab.active { background: var(--text-strong); color: #fff; box-shadow: none; }
.admin-main { min-width: 0; }
.admin-main > #adminContent { min-width: 0; }
.admin-main .card { box-shadow: none; }
.admin-main .card + .card { margin-top: 10px !important; }
.kpi-grid { gap: 8px; }
.kpi { padding: 13px; box-shadow: none; }
.kpi b { font-size: 24px; }
.segmented { border-radius: 6px; }
.segmented button { border-radius: 4px; white-space: normal; }
.order-mini { border-radius: 6px; background: #fff; box-shadow: none; }
.admin-table th { background: var(--panel-soft); color: var(--muted); }
.admin-table th,
.admin-table td { padding: 10px 8px; }
.table-wrap { border: 1px solid var(--line); border-radius: 6px; }
.filters { grid-template-columns: minmax(0, 1fr) minmax(150px, 220px); }

/* A warning panel is not a destructive button. Keep it readable and bounded. */
.notice.danger {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #efb5b0;
  background: var(--red-soft);
  color: var(--text);
  padding: 14px;
  white-space: normal;
  box-shadow: none;
}
.notice.warning { border-color: #e8c77a; background: var(--amber-soft); color: var(--text); }
.notice.danger > strong { color: var(--red); }
.notice.danger .kpi { min-width: 0; background: rgba(255,255,255,.72); color: var(--text); }
.notice.danger .stack,
.notice.danger .summary-line,
.notice.warning .stack,
.notice.warning .summary-line { min-width: 0; max-width: 100%; }
.notice.danger .summary-line span,
.notice.danger .summary-line strong,
.notice.warning .summary-line span,
.notice.warning .summary-line strong { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
#adminContent,
#adminContent > *,
#adminContent .notice { max-width: 100%; min-width: 0; }

.toast { border-radius: 6px; }
.toast.admin-toast { border-radius: 8px; }

@media (min-width: 760px) {
  .topbar { padding-left: max(24px, calc((100vw - 1440px) / 2)); padding-right: max(24px, calc((100vw - 1440px) / 2)); }
  .form-grid.two,
  .checkout-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .admin-workspace { grid-template-columns: 1fr; }
  .tabs {
    position: sticky;
    top: 72px;
    z-index: 20;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 7px;
  }
  .tab { width: auto; flex: 0 0 auto; padding: 0 13px; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 150px; }
  body { font-size: 14px; }
  h1 { font-size: 20px; }
  h2 { font-size: 22px; }
  h3 { font-size: 17px; }
  main { padding: 12px; }
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 10px;
    width: 100%;
    padding: 9px 12px 10px;
  }
  .brand { justify-content: center; padding-right: 48px; }
  .brand-mark { flex-basis: 34px; width: 34px; height: 34px; font-size: 12px; }
  .brand-copy p { display: none; }
  .home-btn { width: 44px; padding: 0; }
  .home-btn span:last-child { display: none; }
  .quick-actions { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .quick-actions .orders-btn,
  .quick-actions .cart-btn { min-height: 44px; }
  .search-panel { padding: 18px 16px; }
  .search-row { grid-template-columns: minmax(0, 1fr) 86px; gap: 7px; }
  .search-row button { padding: 0 10px; }
  .product-list { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: minmax(0, 1fr) auto; }
  .product-card > .action-row { justify-content: flex-end; }
  .product-card > .action-row .small-btn { min-height: 44px; width: auto; }
  #shopView > .section-head,
  #cartView > .section-head,
  #checkoutView > .section-head,
  #ordersView > .section-head { align-items: flex-start; text-align: left; }
  #shopView .search-panel { text-align: left; }
  .admin-head { align-items: flex-start; }
  .admin-role-note { display: none; }
  .admin-workspace { gap: 10px; }
  .tabs { top: 126px; margin: 0 -4px; }
  .admin-main .card { padding: 14px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 21px; overflow-wrap: anywhere; }
  .filters { grid-template-columns: 1fr; }
  .summary-line { gap: 10px; }
  .summary-line > * { min-width: 0; overflow-wrap: anywhere; }
  .segmented { grid-template-columns: 1fr 1fr; }
  .toast.admin-toast { width: calc(100vw - 12px); padding: 9px 12px; font-size: 14px; }
  body.commerce-flow .summary-box { position: sticky; bottom: 8px; z-index: 18; box-shadow: var(--shadow); }
}

@media (max-width: 420px) {
  .product-card { grid-template-columns: 1fr; }
  .product-card > .action-row { justify-content: stretch; }
  .product-card > .action-row .small-btn { width: 100%; }
  .search-help { display: none; }
}

.admin-product-pager .small-btn { min-width: 42px; }
.checkline input[type='checkbox'] { min-width: 20px; min-height: 20px; }

.checkout-grid,
.checkout-grid > *,
.choice-grid,
.form-grid,
.field {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 520px) {
  .choice-grid { grid-template-columns: minmax(0, 1fr); }
  .checkout-grid > .card { width: auto; }
}

.notice.warning { display: block; width: 100%; max-width: 100%; min-width: 0; white-space: normal; box-shadow: none; }
.notice.warning .desc { min-width: 0; overflow-wrap: anywhere; }


.reservation-row { align-items: center; gap: 12px; }
.reservation-countdown { min-width: 112px; color: var(--orange); text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  .reservation-row { align-items: flex-start; }
  .reservation-row > .action-row { width: 100%; justify-content: flex-start; }
  .reservation-countdown { min-width: 0; width: 100%; text-align: left; }
}

.hold-phone-dialog {
  width: min(440px, 100%);
  padding: 20px;
}

.hold-phone-dialog h3 {
  margin: 6px 0 14px;
  font-size: 24px;
  line-height: 1.18;
}

.hold-phone-field {
  margin-top: 14px;
}

.hold-phone-field input {
  min-height: 58px;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
  text-align: center;
}

.field-error {
  margin-top: 8px;
  color: var(--red);
  font-weight: 800;
  line-height: 1.35;
}

.hold-phone-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 120px;
}

.hold-phone-actions button {
  min-height: 52px;
}

@media (max-width: 520px) {
  .hold-phone-dialog {
    align-self: end;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 18px;
  }

  .hold-phone-actions {
    grid-template-columns: 1fr;
  }
}


/* Address confirmation is part of checkout safety, not a decorative notice. */
.notice.address-confirm {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  border: 2px solid #1b7f4b;
  background: #eef9f2;
  color: var(--text);
}
.address-confirm-value {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #b8d9c5;
  border-radius: 6px;
  background: #fff;
  color: var(--text-strong);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.address-confirm-actions { margin-top: 12px; }
.address-confirm-actions button { min-height: 46px; }
.address-confirm-editor { margin-top: 12px; }
.address-admin-warning {
  margin: 8px 0;
  color: var(--orange);
  font-weight: 850;
}
@media (max-width: 520px) {
  .address-confirm-actions { display: grid; grid-template-columns: 1fr; }
  .address-confirm-actions button { width: 100%; min-height: 50px; }
}

/* Customer storefront polish: clear states, safe mobile layout, prominent payment action. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body,
main,
.topbar,
.view,
.card,
.notice,
.summary-box,
.product-main,
.summary-line,
.summary-line > *,
.meta-row,
.action-row {
  min-width: 0;
  max-width: 100%;
}

body {
  overflow-x: clip;
}

.pill {
  max-width: 100%;
  min-height: 28px;
  padding: 5px 10px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pill.available {
  border: 1px solid #b7dec8;
  background: #eaf7f0;
  color: #18794e;
}

.pill.held,
.pill.reserved,
.pill.awaiting_payment,
.pill.pending,
.pill.cod_approved,
.pill.deposited,
.pill.paid,
.pill.sold,
.pill.issue,
.pill.price_issue,
.pill.cancelled,
.pill.exported,
.pill.hidden {
  border: 1px solid #d8d8d4;
  background: #efefec;
  color: #57534e;
}

.payment-overview {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid #e1b7b3;
  border-radius: 8px;
  background: #fff6f4;
}

.payment-overview span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.payment-overview strong {
  color: var(--brand-dark);
  font-size: 30px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.transfer-content strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}

.payment-help {
  margin-top: 12px;
  padding: 12px;
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  color: var(--text);
  font-weight: 750;
  line-height: 1.45;
}

.payment-action-bar {
  margin-top: 12px;
}

.payment-action-bar .wide-action {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 850;
}

.qr-box {
  padding: 14px;
  overflow: hidden;
  background: #fff;
}

.qr-box img {
  display: block;
  width: min(270px, 100%);
  height: auto;
}

.payment-action-top {
  margin: 0 0 12px;
}

.payment-help-top {
  margin: 0 0 12px;
}

.checkout-qr-main {
  width: 100%;
  min-height: 340px;
  margin: 0 0 12px;
  padding: 10px;
}

.checkout-qr-main img {
  width: min(560px, 100%);
  max-height: none;
}

.shipping-info-warning,
.shipping-completion-card {
  margin-top: 12px;
  border-color: #d88b18;
  background: #fff8e8;
}

@media (max-width: 640px) {
  body {
    overflow-x: clip;
    font-size: 16px;
  }

  main {
    width: 100%;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .topbar {
    width: 100%;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .brand {
    padding-right: 44px;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-card > .action-row {
    width: 100%;
    justify-content: stretch;
  }

  .product-card > .action-row .small-btn {
    width: 100%;
    min-height: 48px;
  }

  .product-card .desc {
    font-size: 15px;
  }

  .summary-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .summary-line span {
    flex: 1 1 170px;
  }

  .summary-line strong {
    flex: 0 1 auto;
  }

  .payment-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin: 14px -12px calc(-12px - env(safe-area-inset-bottom));
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 24px rgba(28, 25, 23, .08);
    backdrop-filter: blur(10px);
  }

  .toast {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .toast-actions {
    grid-template-columns: 1fr;
  }

  .toast-actions button {
    min-height: 48px;
    border-radius: 7px;
  }
}

/* Library / SEO content */
.brand-library-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
}

.library-page {
  background: #f5f5f7;
}

.library-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 12px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
  border-bottom: 1px solid rgba(228, 231, 236, .82);
  background: rgba(245, 245, 247, .88);
  backdrop-filter: blur(18px);
}

.library-back,
.library-brand,
.library-read,
.library-card a {
  color: var(--text-strong);
  text-decoration: none;
}

.library-back {
  color: var(--blue);
  font-weight: 800;
}

.library-brand {
  font-weight: 900;
  letter-spacing: .01em;
}

.library-wrap,
.library-article {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 22px 16px 56px;
}

.library-hero {
  padding: 42px 0 28px;
  text-align: center;
}

.library-hero h1,
.library-article h1 {
  max-width: 780px;
  margin-right: auto;
  margin-left: auto;
  color: var(--text-strong);
  font-size: clamp(34px, 8vw, 58px);
  font-weight: 900;
  line-height: 1.02;
}

.library-hero p,
.library-lead {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(17px, 3.8vw, 21px);
  line-height: 1.45;
}

.library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.library-feed {
  display: grid;
  gap: 14px;
}

.library-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(228, 231, 236, .9);
  border-radius: 26px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
}

.library-featured-cover {
  display: block;
  min-height: 360px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #111827, #b42318);
}

.library-featured-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-featured-copy {
  padding: 14px 10px;
}

.library-featured h2 {
  margin-top: 13px;
  font-size: clamp(30px, 5.2vw, 48px);
  line-height: 1.02;
}

.library-featured h2 a {
  color: var(--text-strong);
  text-decoration: none;
}

.library-featured p {
  margin-top: 13px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.library-card,
.library-empty {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(228, 231, 236, .92);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.library-card:hover {
  transform: translateY(-2px);
  border-color: rgba(180, 35, 24, .2);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

.library-cover {
  display: block;
  min-height: 135px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #111827, #b42318);
}

.library-cover img,
.library-article-cover,
.library-content figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-card-mark {
  display: grid;
  height: 100%;
  min-height: 135px;
  place-items: center;
  color: #fff;
  font-size: 32px;
  font-weight: 900;
}

.library-tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--slate-soft);
  color: var(--slate);
  font-size: 12px;
  font-weight: 850;
}

.pill.manual-source {
  border: 1px solid #b7dec8;
  background: #eaf7f0;
  color: #18794e;
}

.pill.web-source {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.manual-source-line {
  margin: -2px 0 8px;
}

.order-search-panel {
  margin-bottom: 12px;
}

.compact-select {
  min-height: 36px;
  width: auto;
  max-width: 190px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-weight: 750;
}

.library-card-meta,
.library-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.library-card h2 {
  margin-top: 10px;
  font-size: clamp(21px, 4vw, 30px);
  line-height: 1.08;
}

.library-card p {
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.5;
}

.library-read {
  display: inline-flex;
  margin-top: 14px;
  color: var(--blue);
  font-weight: 850;
}

.library-article {
  width: min(780px, 100%);
}

.library-article-cover {
  max-height: 460px;
  margin-top: 22px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.library-cover-figure {
  margin-top: 22px;
}

.library-cover-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.library-toc {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(228, 231, 236, .92);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .82);
}

.library-toc strong {
  color: var(--text-strong);
}

.library-toc-link {
  color: var(--blue);
  font-weight: 780;
  text-decoration: none;
}

.library-toc-link.is-child {
  padding-left: 14px;
  color: var(--muted);
}

.library-content {
  margin-top: 28px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.72;
}

.library-content h2 {
  margin-top: 34px;
  font-size: clamp(25px, 5vw, 36px);
}

.library-content h3 {
  margin-top: 26px;
  font-size: clamp(20px, 4vw, 26px);
}

.library-content p,
.library-content ul,
.library-content figure {
  margin-top: 16px;
}

.library-content ul {
  padding-left: 22px;
}

.library-content strong {
  color: var(--text-strong);
  font-weight: 880;
}

.library-content a {
  color: var(--blue);
  font-weight: 780;
}

.library-content figure img {
  max-height: 520px;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.library-content figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.library-cta {
  margin-top: 34px;
  padding: 22px;
  border: 1px solid rgba(228, 231, 236, .92);
  border-radius: var(--radius-xl);
  background: #fff;
}

.library-faq,
.library-references,
.library-related {
  margin-top: 32px;
}

.library-faq h2,
.library-references h2,
.library-related h2 {
  color: var(--text-strong);
  font-size: clamp(22px, 4.8vw, 32px);
}

.library-faq-item {
  margin-top: 10px;
  border: 1px solid rgba(228, 231, 236, .92);
  border-radius: var(--radius-lg);
  background: #fff;
}

.library-faq-item summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--text-strong);
  font-weight: 850;
}

.library-faq-item p {
  padding: 0 16px 16px;
  color: var(--text);
  line-height: 1.6;
}

.library-references ul {
  margin-top: 10px;
  padding-left: 20px;
}

.library-related > div {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.library-related-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(228, 231, 236, .92);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--text-strong);
  text-decoration: none;
}

.library-related-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.library-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  gap: 12px;
  align-items: start;
}

.library-admin-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.library-editor {
  min-height: 360px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
}

.library-form-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.library-form-section h4 {
  margin-bottom: 10px;
  color: var(--text-strong);
  font-size: 15px;
}

.library-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  color: var(--text);
  font-weight: 780;
}

.library-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.library-preview-meta {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.library-preview-meta strong {
  color: var(--text-strong);
  font-size: 12px;
}

.library-preview-meta span {
  color: var(--muted);
  font-size: 13px;
}

.library-preview-card {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}

.library-admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.library-admin-row h4 {
  margin-top: 8px;
  font-size: 17px;
}

@media (max-width: 760px) {
  .library-card,
  .library-featured,
  .library-admin-grid,
  .library-admin-row,
  .library-admin-head {
    grid-template-columns: 1fr;
  }

  .payment-action-top {
    position: static;
    margin: 0 0 12px;
    padding: 0;
    border-top: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .checkout-qr-main {
    min-height: 280px;
    margin-right: -4px;
    margin-left: -4px;
    width: calc(100% + 8px);
    padding: 4px;
  }

  .checkout-qr-main img {
    width: 100%;
  }

  .library-admin-head {
    display: grid;
  }

  .library-upload-row {
    grid-template-columns: 1fr;
  }

  .library-cover {
    min-height: 190px;
  }

  .library-featured-cover {
    min-height: 260px;
  }

  .library-featured {
    border-radius: 20px;
    padding: 12px;
  }

  .library-preview-card {
    position: static;
    max-height: none;
  }

  .library-topbar {
    min-height: 56px;
  }
}

/* Library visual polish: public reading experience */
.library-page {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -220px, rgba(180, 35, 24, .08), transparent 360px),
    #f5f5f7;
  color: #171717;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.library-topbar {
  min-height: 64px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(245, 245, 247, .78);
  box-shadow: 0 1px 0 rgba(17, 24, 39, .04);
}

.library-back,
.library-brand {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.library-back {
  padding: 0 12px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(228, 231, 236, .78);
  color: #0f172a;
}

.library-brand {
  color: #111;
  font-size: 16px;
}

.library-wrap {
  width: min(1080px, 100%);
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 28px) 72px;
}

.library-article {
  width: min(760px, 100%);
  padding: clamp(22px, 4vw, 42px) clamp(18px, 4vw, 26px) 76px;
}

.library-hero {
  min-height: clamp(260px, 38vw, 420px);
  display: grid;
  align-content: center;
  padding: 28px 0 34px;
}

.library-hero .eyebrow,
.library-article .eyebrow {
  letter-spacing: 0;
}

.library-hero h1 {
  max-width: 820px;
  font-size: clamp(38px, 8vw, 72px);
  letter-spacing: 0;
}

.library-hero p {
  max-width: 640px;
  color: #565b66;
}

.library-section-head {
  margin: clamp(28px, 5vw, 48px) 0 16px;
  text-align: center;
}

.library-section-head h2 {
  max-width: 620px;
  margin: 4px auto 0;
  color: #111;
  font-size: clamp(24px, 4.5vw, 38px);
  line-height: 1.08;
}

.library-featured {
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: clamp(18px, 3vw, 34px);
  padding: clamp(12px, 2.4vw, 22px);
  border-radius: 28px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

.library-featured-cover,
.library-cover {
  aspect-ratio: 4 / 3;
  min-height: 0;
  background: #161616;
}

.library-featured-cover {
  border-radius: 22px;
}

.library-featured-copy {
  padding: clamp(8px, 2vw, 22px);
}

.library-featured h2 {
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: 0;
}

.library-featured p,
.library-card p {
  color: #5f636b;
}

.library-feed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.library-card,
.library-empty {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 34px rgba(15, 23, 42, .045);
}

.library-cover {
  border-radius: 18px;
}

.library-card h2 {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0;
}

.library-card > div {
  padding: 2px 4px 6px;
}

.library-tag {
  background: #f2f4f7;
  color: #414651;
}

.library-read {
  color: #b42318;
}

.library-article h1 {
  max-width: 760px;
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
  text-align: left;
}

.library-article .eyebrow,
.library-article .library-lead,
.library-article .library-meta {
  margin-right: 0;
  margin-left: 0;
  text-align: left;
}

.library-lead {
  color: #555b64;
}

.library-meta {
  margin-top: 14px;
  color: #69707a;
}

.library-cover-figure {
  margin-top: clamp(22px, 4vw, 34px);
}

.library-article-cover,
.library-content figure img {
  aspect-ratio: 16 / 10;
  max-height: none;
  border-radius: 22px;
  background: #eee;
  box-shadow: none;
}

.library-content {
  margin-top: clamp(30px, 5vw, 44px);
  color: #25272b;
  font-size: clamp(18px, 2.7vw, 20px);
  line-height: 1.78;
}

.library-content h2 {
  margin-top: clamp(42px, 7vw, 62px);
  color: #111;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}

.library-content h3 {
  margin-top: clamp(28px, 5vw, 40px);
  color: #202124;
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.2;
  letter-spacing: 0;
}

.library-content p,
.library-content ul,
.library-content figure {
  margin-top: 18px;
}

.library-content ul {
  padding-left: 24px;
}

.library-content li + li {
  margin-top: 8px;
}

.library-content figcaption,
.library-cover-figure figcaption {
  color: #747b86;
  font-size: 13px;
}

.library-toc {
  grid-template-columns: 1fr;
  margin-top: clamp(22px, 4vw, 34px);
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

.library-toc-link {
  min-height: 34px;
  display: flex;
  align-items: center;
  color: #344054;
}

.library-toc-link:hover {
  color: #b42318;
}

.library-faq-item,
.library-related-card,
.library-cta {
  border-radius: 20px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .045);
}

.library-faq h2,
.library-references h2,
.library-related h2,
.library-cta h2 {
  letter-spacing: 0;
}

.library-cta {
  padding: clamp(18px, 4vw, 28px);
  background: #fff;
}

.library-cta .library-actions {
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .library-feed {
    grid-template-columns: 1fr;
  }

  .library-featured {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .library-wrap,
  .library-article {
    padding-right: 14px;
    padding-left: 14px;
  }

  .library-topbar {
    gap: 8px;
  }

  .library-back {
    padding: 0 10px;
    font-size: 14px;
  }

  .library-brand {
    font-size: 15px;
  }

  .library-hero {
    min-height: 230px;
  }

  .library-hero h1 {
    font-size: clamp(34px, 11vw, 46px);
  }

  .library-featured h2,
  .library-article h1 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .library-content {
    font-size: 18px;
    line-height: 1.72;
  }

  .library-featured,
  .library-card {
    border-radius: 18px;
  }

  .library-article-cover,
  .library-content figure img,
  .library-featured-cover,
  .library-cover {
    border-radius: 16px;
  }

  .library-cta .library-actions {
    justify-content: stretch;
  }

  .library-cta .library-actions a {
    width: 100%;
  }
}

button.buy-now-btn,
button.checkout-now-btn {
  border-color: #137a4b;
  background: #168653;
  color: #fff;
}

button.buy-now-btn:hover,
button.checkout-now-btn:hover {
  background: #116a40;
}

/* Focused customer checkout: keep payment decisions and confirmation in one clear flow. */
body[data-view="checkoutView"] .topbar {
  display: flex;
  justify-content: center;
  min-height: 64px;
  padding: 8px max(16px, calc((100vw - 720px) / 2));
}

body[data-view="checkoutView"] .topbar .brand,
body[data-view="checkoutView"] .topbar .quick-actions {
  display: none;
}

body[data-view="checkoutView"] .topbar .home-btn {
  display: flex;
  justify-content: center;
  width: min(680px, 100%);
  min-height: 48px;
  margin: 0 auto;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 850;
}

body[data-view="checkoutView"] .topbar .home-btn span:last-child {
  display: inline;
}

body[data-view="checkoutView"] main {
  width: min(720px, 100%);
}

#checkoutView > .checkout-head {
  width: min(680px, 100%);
  margin: 0 auto 12px;
  padding: 0;
}

#checkoutView > .checkout-head h2 {
  font-size: 26px;
}

.checkout-focus {
  width: min(680px, 100%);
  margin: 0 auto;
  gap: 12px;
}

.checkout-order-brief {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkout-order-brief-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.checkout-order-brief-main > strong {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.checkout-order-brief-main > span {
  color: var(--muted);
  white-space: nowrap;
}

.checkout-order-brief-main b {
  color: var(--text-strong);
  font-size: 18px;
}

.checkout-items-details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.checkout-items-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 800;
}

.checkout-items-list {
  margin-top: 8px;
}

.checkout-payment-card,
.checkout-shipping-card {
  border-radius: 8px;
}

.checkout-payment-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.checkout-payment-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.checkout-payment-choice:only-child {
  grid-column: 1 / -1;
}

.checkout-payment-choice:has(input:checked) {
  border-color: #b42318;
  background: #fff3f1;
  box-shadow: inset 0 0 0 1px #b42318;
}

.checkout-payment-choice input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin: 0;
  box-shadow: none;
}

.checkout-choice-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.checkout-choice-copy strong,
.checkout-choice-copy small {
  overflow-wrap: anywhere;
}

.checkout-choice-copy strong {
  font-size: 15px;
}

.checkout-choice-copy small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.checkout-payment-card .checkout-qr-main {
  width: 100%;
  min-height: 300px;
  margin: 0 0 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkout-payment-card .checkout-qr-main img {
  width: min(440px, 100%);
  max-height: none;
}

.checkout-payment-card .payment-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.checkout-payment-card .payment-overview strong {
  font-size: 28px;
  text-align: right;
}

.checkout-payment-card .transfer-content {
  align-items: center;
}

.checkout-payment-card .checkout-submit-bar {
  position: static;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

.checkout-payment-card .checkout-submit-bar .wide-action {
  min-height: 58px;
  font-size: 18px;
}

.checkout-payment-help {
  margin: 8px 0 0;
  padding: 9px 11px;
  font-size: 14px;
}

@media (max-width: 640px) {
  body[data-view="checkoutView"] .topbar {
    width: 100%;
    min-height: 58px;
    padding: max(7px, env(safe-area-inset-top)) 10px 7px;
  }

  body[data-view="checkoutView"] .topbar .home-btn {
    width: 100%;
    min-height: 46px;
  }

  body[data-view="checkoutView"] main {
    padding: 10px;
  }

  #checkoutView > .checkout-head {
    align-items: flex-start;
    margin-bottom: 10px;
  }

  #checkoutView > .checkout-head h2 {
    font-size: 23px;
  }

  .checkout-order-brief {
    padding: 11px 12px;
  }

  .checkout-order-brief-main {
    gap: 8px;
  }

  .checkout-order-brief-main > strong {
    font-size: 15px;
  }

  .checkout-order-brief-main b {
    font-size: 16px;
  }

  .checkout-payment-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  .checkout-payment-choice {
    min-height: 70px;
    gap: 7px;
    padding: 9px;
  }

  .checkout-choice-copy strong {
    font-size: 14px;
  }

  .checkout-choice-copy small {
    font-size: 13px;
  }

  .checkout-payment-card .checkout-qr-main {
    width: 100%;
    min-height: 270px;
    margin: 0 0 8px;
    padding: 4px;
  }

  .checkout-payment-card .checkout-qr-main img {
    width: 100%;
  }

  .checkout-payment-card .payment-overview {
    padding: 11px 12px;
  }

  .checkout-payment-card .payment-overview strong {
    font-size: 25px;
  }
}
