html:root,body {--background:#eff6fc;--surface:#fff;--surface-subtle:#edf5ff;--foreground:#173651;--muted:#48647e;--border:#cfdfed;--primary:#1971bc;--primary-hover:#145da1;--secondary:var(--primary);--accent:var(--primary);--card-bg:var(--surface);--input-bg:var(--surface-subtle);--text-main:var(--foreground);--text-muted:var(--muted);--border-color:var(--border);--sky:url('origami-day.jpg')}
html.dark,body.dark {--background:#0c1528;--surface:#17253b;--surface-subtle:#20324c;--foreground:#f7f1df;--muted:#bacbe0;--border:#384b65;--primary:#97caff;--primary-hover:#b0dbff;--secondary:var(--primary);--accent:var(--primary);--card-bg:var(--surface);--input-bg:var(--surface-subtle);--text-main:var(--foreground);--text-muted:var(--muted);--border-color:var(--border);--sky:url('origami-night.jpg')}
body,body.dark {background:var(--background)!important;color:var(--foreground)}
#hero-banner-card {background:linear-gradient(90deg,#10345bbf,transparent 82%),var(--sky) center 48%/cover!important;min-height:230px;display:grid;align-items:center}
#hero-main-title,#hero-banner-card p {color:white!important;max-width:34ch}
#hero-store-badge,.category-pill.active {background:var(--surface-subtle)!important;color:var(--text-main)!important}
nav .brutal-btn,nav .brutal-btn-icon,#qris-options button {background:var(--surface-subtle)!important;color:var(--foreground)!important}
#btn-submit-qris {background:#1769ad!important;color:white!important}

#qris-options:not([hidden]) {display:grid;grid-template-columns:1fr 1fr;gap:8px}
#qris-options button {min-height:44px}
#qris-options button:disabled {opacity:.45}
#checkout-modal>.brutal-card {max-height:90dvh;overflow-y:auto;overscroll-behavior:contain}
#modal-variations-list button {white-space:normal;overflow-wrap:anywhere}
.catalog-warranty {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.35;
}
.checkout-warranty:not([hidden]) {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  font-size: .8rem;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.checkout-meta-label, .checkout-quantity-heading label { color: var(--foreground); font-weight: 600; }
.checkout-description {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.checkout-description h4 { margin: 0 0 3px; color: var(--foreground); font-weight: 600; }
.checkout-description p { margin: 0; white-space: pre-wrap; }
.checkout-quantity-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  font-size: .85rem;
}
.checkout-stock {
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
@media(max-width:640px){
nav button span,nav a span {display:none!important}
nav .brutal-btn,nav .brutal-btn-icon {width:40px;height:44px;justify-content:center;padding:0}
#hero-banner-card {min-height:190px}


main {padding-bottom:78px!important}
}

/* Tata letak mengikuti preview origami. */
:root {
  --origami-action: #0c65ae;
  --origami-on-action: #fff;
  --origami-overlay: #11284299;
}
html.dark {
  --origami-action: #a3cbf7;
  --origami-on-action: #10233b;
  --origami-overlay: #071020c4;
}
body {
  font-family: "DM Sans", system-ui, sans-serif;
}
nav > div,
main {
  max-width: 1120px;
}
nav .brutal-btn,
nav .brutal-btn-icon {
  min-height: 44px;
  gap: 7px;
}
#store-title {
  text-transform: none;
}
main {
  padding-top: 16px !important;
}
#hero-banner-card {
  position: relative;
  margin: 0 0 22px;
  padding: clamp(24px, 6vw, 64px) !important;
  min-height: clamp(235px, 31vw, 350px);
  border-radius: 18px !important;
  background: linear-gradient(90deg, #0b3b6bd9, #0b3b6b45 65%, transparent), var(--sky) center 48% / cover !important;
}
html.dark #hero-banner-card {
  background: linear-gradient(90deg, #090f26d9, #0a132835 65%, transparent), var(--sky) center 35% / cover !important;
}
#hero-main-title {
  font-size: clamp(32px, 6vw, 64px) !important;
  letter-spacing: -.045em !important;
  margin: 0 !important;
}
#hero-main-title span {
  display: block;
  font-size: .63em;
  letter-spacing: -.025em;
  margin-top: 5px;
}
#hero-banner-card p {
  margin-top: 14px;
}
#hero-banner-card + div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
}
#hero-banner-card + div button,
#btn-submit-qris,
#tos-modal button[onclick="acceptTos()"] {
  background: var(--origami-action) !important;
  color: var(--origami-on-action) !important;
  min-height: 44px;
}
#product-grid > .brutal-card {
  border-radius: 14px !important;
  min-width: 0;
}
#product-grid h3 {
  text-transform: none;
  font-size: clamp(14px, 1.5vw, 19px);
}
#product-grid button {
  min-height: 42px;
}
.modal-backdrop {
  background: var(--origami-overlay) !important;
}
#tos-modal > .brutal-card {
  max-width: 600px;
}
#tos-modal h3 {
  text-transform: none;
  font-size: 1.2rem;
}
#tos-modal .overflow-y-auto > div {
  background: var(--surface-subtle) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px;
  color: var(--foreground) !important;
  padding: 12px;
}
#tos-modal .overflow-y-auto > div p {
  color: var(--foreground) !important;
}




@media (max-width: 640px) {
  nav .brutal-btn, nav .brutal-btn-icon {
    width: 44px;
  }
  main {
    padding-inline: 12px !important;
  }
  #hero-banner-card {
    padding: 24px 16px !important;
    min-height: 220px;
    background-position: center, 64% center !important;
  }
  #hero-banner-card p {
    font-size: 13px !important;
  }
  #product-grid > .brutal-card {
    padding: 12px !important;
  }
}

.store-mark {
  border: 0;
  border-radius: 12px;
  background: var(--surface-subtle);
  color: var(--primary);
}
#store-title { font-weight: 650; letter-spacing: -.025em; }
.hero-eyebrow, .hero-details {
  color: white;
  font-size: .8rem;
  font-weight: 550;
}
.hero-eyebrow { display: block; margin-bottom: .7rem; }
.hero-details {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  list-style: none;
  width: fit-content;
  max-width: 100%;
  margin: 1.25rem 0 0;
  padding: .7rem 0 0;
  border-top: 1px solid #ffffff66;
}
.hero-details li + li::before { content: '·'; margin-right: .8rem; }
.catalog-tabs { gap: 4px; padding: 4px; width: fit-content; border-radius: 12px; background: var(--surface-subtle); border: 1px solid var(--border); }
.catalog-tabs .category-pill {
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-weight: 550;
  text-transform: none;
  min-height: 40px;
}
.catalog-tabs .category-pill.active { background: var(--surface) !important; color: var(--primary) !important; }
.catalog-tabs i { color: inherit; }
#product-grid .catalog-empty { padding: 2.5rem 1rem; }
.catalog-empty h4 { text-transform: none; font-size: 1rem; font-weight: 600; }
.catalog-empty p, footer p { font-size: .8rem; color: var(--muted); font-weight: 400; }
.support-action[aria-disabled="true"] { color: var(--muted) !important; cursor: default; }
.support-action:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }











@media (max-width: 640px) {
  footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

}

/* Storefront typography and touch controls */
html, body, body :where(button,input,textarea,select,h1,h2,h3,h4,p,span,b,strong,small,code,pre),
body [class*="font-mono"] { font-family: "DM Sans", system-ui, sans-serif !important; }
body .font-black, body .font-extrabold { font-weight: 600 !important; }
body .uppercase { text-transform: none; }
.line-icon { display:inline-block; width:1.15em; height:1.15em; flex:none; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
body [class*="border-2"], body [class*="border-3"] { border-width:1px; }
body .brutal-badge, body .brutal-input { border-radius:10px !important; }
#product-grid .catalog-empty .line-icon { width:26px; height:26px; margin-bottom:8px; color:var(--muted); }
#hero-banner-card p { font-weight:400 !important; }
#store-title { font-size:clamp(.95rem,2vw,1.2rem); }
@media(max-width:640px) {
  nav > div { min-height:58px; gap:4px; }
  nav > div > div:first-child { min-width:0; flex-shrink:1; }
  #store-title { overflow-wrap:anywhere; }
  nav > div > div:last-child { gap:2px; }
  nav .brutal-btn, nav .brutal-btn-icon { width:44px; background:transparent !important; border:0 !important; }
  #hero-banner-card { padding:22px 16px !important; }
  #hero-banner-card h2 { font-size:clamp(30px,8vw,42px) !important; }
  .hero-details { gap:.35rem .65rem; font-size:.73rem; }
  .hero-details li + li::before { margin-right:.5rem; }
  .catalog-tabs { width:100%; }
  .catalog-tabs button { flex:1; justify-content:center; min-height:44px; }
  #search-input { font-size:16px; }


}

/* Flat surfaces and readable controls in both themes. */
html body *, html body *::before, html body *::after {
  box-shadow: none !important;
}
.visitor-count { font-variant-numeric: tabular-nums; }
.store-nav-actions :is(.brutal-btn, .brutal-btn-icon) {
  color: var(--foreground) !important;
  border: 1px solid transparent !important;
  background: transparent !important;
}
.store-nav-actions :is(.line-icon, .fa-telegram) {
  width: 18px;
  height: 18px;
  font-size: 18px;
  display: inline-grid;
  place-items: center;
}
.store-nav-actions :is(.brutal-btn, .brutal-btn-icon):hover {
  border-color: var(--border) !important;
  background: var(--surface-subtle) !important;
}
.catalog-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .45rem .9rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
}
.catalog-tab[aria-pressed="true"] {
  background: var(--surface);
  border-color: var(--border);
  color: var(--primary);
}
.catalog-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.catalog-avatar, .catalog-stock {
  background: var(--surface-subtle);
  color: var(--foreground);
}
.catalog-card h3 { font-size: 1rem; font-weight: 600; }
.catalog-card .product-price-value { font-size: .95rem; color: var(--foreground); }
.catalog-buy, #btn-submit-redeem, #btn-copy-redeem {
  min-height: 44px;
  border-radius: 10px;
  background: var(--origami-action) !important;
  color: var(--origami-on-action) !important;
}
.catalog-buy:hover, #btn-submit-redeem:hover, #btn-copy-redeem:hover {
  filter: brightness(.94);
}
.catalog-buy:disabled {
  background: var(--surface-subtle) !important;
  color: var(--muted) !important;
  cursor: default;
}
#redeem-box :is(#redeem-result, #redeem-result-content) {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
}
#redeem-box .brutal-btn { min-height: 44px; }
#redeem-input-code { min-height: 44px; font-size: 16px; letter-spacing: normal; font-weight: 500; }
.store-nav-actions :focus-visible, .catalog-tab:focus-visible, .catalog-buy:focus-visible, #redeem-box button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .catalog-tabs { display: flex; }
  .catalog-tabs .catalog-tab { flex: 1; }
  #product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #product-grid { gap: .65rem; }
}

.support-widget {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 50;
  display: grid;
  justify-items: end;
  gap: 8px;
}
.support-launcher, .support-action {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding: 0 14px;
  font-size: .875rem;
  font-weight: 600;
}
.support-launcher {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--origami-action);
  color: var(--origami-on-action);
}
.support-options:not([hidden]) {
  display: grid;
  padding: 4px;
  width: 155px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.support-action {
  border-radius: 9px;
  color: var(--foreground);
  text-align: left;
}
.support-action:not([aria-disabled="true"]):hover { background: var(--surface-subtle); }
.support-launcher:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@media (max-width: 640px) {
  .support-widget { right: max(12px, env(safe-area-inset-right)); }
  .catalog-buy { font-size: .72rem; line-height: 1.2; padding-inline: .25rem; }
}
@media (min-width: 900px) {
  .store-nav-actions { gap: 12px; }
  nav .store-nav-actions .brutal-btn,
  nav .store-nav-actions .brutal-btn-icon {
    min-height: 52px;
    padding-inline: 14px;
    font-size: .95rem;
  }
  nav .store-nav-actions .brutal-btn-icon { width: 52px; }
  .store-nav-actions :is(.line-icon, .fa-telegram) {
    width: 21px;
    height: 21px;
    font-size: 21px;
  }
}

#ai-chat-modal {
  --chat-surface: #f8fafc;
  --chat-transcript: #eaf0f6;
  --chat-border: #a9bdd1;
  --chat-subtle-border: #bdcddb;
  --chat-message: #ffffff;
  --chat-header: #10385b;
  --chat-header-muted: #d9e8f5;
  position: fixed;
  z-index: 65;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--chat-surface);
  color: var(--foreground);
  border: 1px solid var(--chat-border);
  box-shadow: 0 12px 36px #10264138 !important;
}
html.dark #ai-chat-modal {
  --chat-surface: #162337;
  --chat-transcript: #101b2c;
  --chat-border: #506a8a;
  --chat-subtle-border: #3d5270;
  --chat-message: #20324c;
  --chat-header: #203654;
  --chat-header-muted: #d4e3f4;
  box-shadow: 0 12px 36px #0007 !important;
}
#ai-chat-modal.hidden, #ai-chat-backdrop[hidden], #ai-typing-indicator.hidden { display: none; }
#ai-chat-backdrop { display: none; }
.chat-header {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--chat-header);
  color: #fff;
}
.chat-avatar, #ai-chat-close, #ai-chat-send-btn { display: grid; place-items: center; flex: none; }
.chat-avatar { width: 36px; height: 36px; border: 1px solid #ffffff50; border-radius: 10px; }
.chat-name { flex: 1; min-width: 0; }
.chat-name h3 { font-size: 1rem; font-weight: 650; line-height: 1.25; margin: 0; }
.chat-name p { margin: 2px 0 0; font-size: .75rem; color: var(--chat-header-muted); }
#ai-chat-close {
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff44;
  border-radius: 10px;
  color: #fff;
}
#ai-chat-close:hover { background: #ffffff22; }
.chat-shortcuts {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--chat-subtle-border);
}
.chat-shortcuts button {
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--chat-subtle-border);
  border-radius: 8px;
  color: var(--foreground);
  font-size: .78rem;
}
.chat-shortcuts button:hover { background: var(--chat-transcript); }
#ai-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 12px;
  background: var(--chat-transcript);
}
.chat-row { display: flex; }
.chat-row + .chat-row { margin-top: 10px; }
.chat-row-user { justify-content: flex-end; }
.chat-bubble {
  min-width: 0;
  max-width: 88%;
  padding: 8px 11px;
  border: 1px solid var(--chat-subtle-border);
  border-radius: 12px 12px 12px 4px;
  background: var(--chat-message);
  font-size: .875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chat-row-user .chat-bubble {
  background: var(--origami-action);
  color: var(--origami-on-action);
  border-color: transparent;
  border-radius: 12px 12px 4px 12px;
  white-space: pre-wrap;
}
#ai-typing-indicator {
  flex: none;
  background: var(--chat-transcript);
  color: var(--muted);
  font-size: .75rem;
  padding: 3px 12px 8px;
}
.chat-composer {
  display: flex;
  flex: none;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--chat-subtle-border);
}
#ai-chat-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--chat-subtle-border);
  border-radius: 9px;
  background: var(--chat-message);
  color: var(--foreground);
  font-size: 1rem;
}
#ai-chat-input::placeholder { color: var(--muted); }
#ai-chat-send-btn {
  width: 46px;
  min-height: 44px;
  border-radius: 9px;
  background: var(--origami-action);
  color: var(--origami-on-action);
}
#ai-chat-send-btn:disabled { opacity: .55; }
#ai-chat-modal :is(button, input):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
#ai-chat-close:focus-visible { outline-color: #fff; }

@media (min-width: 641px) {
  #ai-chat-modal {
    right: 20px;
    bottom: 76px;
    width: 390px;
    height: min(500px, calc(100vh - 96px));
    height: min(500px, calc(100dvh - 96px));
    border-radius: 18px;
  }
}
@media (max-width: 640px) {
  body.chat-sheet-open { overflow: hidden; }
  #ai-chat-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 64;
    background: #0e213d59;
    touch-action: none;
  }
  #ai-chat-modal {
    --chat-gap: max(12px, env(safe-area-inset-bottom));
    inset: auto max(14px, env(safe-area-inset-right)) calc(var(--chat-bottom, 0px) + var(--chat-gap)) max(14px, env(safe-area-inset-left));
    width: auto;
    max-width: 410px;
    margin-inline: auto;
    height: min(400px, 64vh);
    height: min(400px, 64dvh, calc(var(--chat-height, 100dvh) - var(--chat-gap) - 12px));
    border-radius: 16px;
  }
  .chat-header { padding: 6px 10px; }
  .chat-shortcuts { flex-wrap: nowrap; overflow-x: auto; padding: 4px 10px; }
  .chat-shortcuts button { min-height: 44px; flex: none; white-space: nowrap; }
  #ai-chat-messages { padding: 10px; }
  .chat-composer { padding: 7px 10px; }
  #ai-chat-modal.chat-with-keyboard {
    --chat-gap: 8px;
    height: min(400px, calc(var(--chat-height, 100dvh) - var(--chat-gap) - 10px));
  }
  #ai-chat-modal.chat-compact .chat-shortcuts { display: none; }

  .modal-backdrop {
    --popup-top: max(12px, env(safe-area-inset-top));
    --popup-bottom: max(12px, env(safe-area-inset-bottom));
    padding: var(--popup-top) max(16px, env(safe-area-inset-right)) var(--popup-bottom) max(16px, env(safe-area-inset-left));
  }
  .modal-backdrop > .brutal-card,
  #checkout-modal > .brutal-card {
    min-width: 0;
    max-height: calc(100vh - var(--popup-top) - var(--popup-bottom));
    max-height: calc(100dvh - var(--popup-top) - var(--popup-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
  }
  .modal-backdrop button,
  #telegram-only-modal a { min-height: 44px; }
  #checkout-modal button[onclick="closeCheckoutModal()"],
  #checkout-modal button[onclick^="changeQty("],
  #telegram-only-modal button[onclick="closeTelegramOnlyModal()"] { min-width: 44px; }
  #checkout-modal #modal-product-name { padding-inline-end: 48px; overflow-wrap: anywhere; }
  #checkout-modal .mb-3\.5 { margin-bottom: .625rem; }
  #checkout-modal :is(#buyer-contact, #order-qty) { min-height: 44px; font-size: 16px; }
  #payment-modal .payment-qr-frame { max-width: clamp(170px, 49vw, 204px); padding: 5px; }
  #pay-order-id, #success-order-id { overflow-wrap: anywhere; }
  .success-order-details { flex-direction: column; gap: 3px; }
  #credentials-text { height: 5.25rem; }
  .success-actions { flex-wrap: wrap; flex-direction: row; }
  .success-actions button { flex: 1 1 9rem; }
  #btn-manual-check, .success-actions button { background: var(--origami-action) !important; color: var(--origami-on-action) !important; }
}

@media (max-width: 360px) {
  .modal-backdrop {
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  }
}
