/* ============================================================================================
   THE SHOP, AS A TELEGRAM MINI APP.
   ============================================================================================

   ONE PALETTE, AND IT IS THE SHOP'S OWN. The owner asked for the look in a screenshot: a near-black
   studio panel, warm amber gradients, and cards that carry a tiny label above a big Khmer title.
   Those colours cannot be derived from Telegram's variables - Telegram's accent is a blue the USER
   picks in their own settings, and its dark themes run from navy to pure black - so every colour in
   this app is declared once, in :root below, and the shop looks the same on every phone.

   THE COST IS ACCEPTED DELIBERATELY: the shop stays dark for somebody running Telegram in light
   mode. That is the trade for a brand that does not change shape between two customers, and it is
   how the screenshot looks. app.js reads --bg straight out of this file and hands it to Telegram's
   own header and background, so there is no seam across the top and no second copy of the palette
   to keep in step.

   TEXT ON AMBER IS DARK INK, NOT WHITE. White on a warm gradient measures about 2:1 where the
   gradient is lightest, which is unreadable in daylight on a phone; the same ink on the same amber
   is over 8:1. It also reads as more expensive, which is the point of the screenshot.

   THE ANIMATION IS CSS AND SVG, WITH NOTHING FETCHED. Telegram's own animated custom emoji only
   work in MESSAGE text - there is no Mini App API that renders them - so the liveliness here is
   done by moving the ordinary system emoji glyph: a slow float, a bounce, a wiggle. It costs
   nothing, works on every phone, and cannot break when somebody else's server does.

   AND IT ALL STOPS FOR ANYONE WHO ASKED. prefers-reduced-motion is honoured at the bottom of this
   file, for every animation in it.
   ============================================================================================ */

:root {
  /* --- THE PALETTE. The only place in the app where a colour is chosen. -------------------
     app.js reads --bg, --brand, --brand-fg and --danger back out of here with getPropertyValue and
     hands them to Telegram, for the strip above the page and for its bottom button. Each of those
     four is written as a plain six-digit hex on a line of its own, with nothing after it: that is
     the only form Telegram's setParams accepts, and it is the form the reader in app.js checks
     for. */
  --bg:        #0b0b0e;
  --surface:   #14141a;
  --surface-2: #1c1c24;
  --surface-3: #23232c;
  --fg:        #f4f4f7;
  --dim:       #9a9aa8;

  /* The warm accent of the screenshot, its light end, the dark ink that sits ON the amber, and
     amber used as text on a dark surface. */
  --brand:     #f97316;
  --brand-2:   #f5a524;
  --brand-fg:  #17120a;
  --brand-dim: #ffb454;

  --ok:     #22c55e;
  --warn:   #f5b544;
  --danger: #f4544c;

  /* Plain rgba rather than color-mix: these have to render on the oldest Android webview a customer
     might be carrying, and a tint that fails to parse takes the whole rule with it. */
  /* --bg again, with a little transparency, for the two bars that blur what is behind them. It is a
     second writing of the same colour, so it lives here beside the first rather than inline in two
     rules a hundred lines apart. */
  --bg-glass: rgba(11,11,14,.9);

  --line:   rgba(255,255,255,.075);
  --line-2: rgba(255,255,255,.145);
  --sunk:   rgba(255,255,255,.05);
  --tint:   rgba(249,115,22,.14);   /* the warm wash behind anything active */
  --tint-2: rgba(249,115,22,.30);
  /* The same idea in red, for a row that cannot be bought. */
  --out:    rgba(244,84,76,.16);
  --out-2:  rgba(244,84,76,.30);
  /* And in pale blue, for one that can. Cool against the warm shell, so 'buyable' and 'brand' never
     compete: everything amber in this app is something to press, and the glass is something to read. */
  --ice:    rgba(126,192,255,.14);
  --ice-2:  rgba(150,205,255,.20);
  --ice-3:  rgba(126,192,255,.16);
  /* And in green, for the one box in the app that holds the thing somebody actually came for: the
     licence or the link that was just delivered.
     A GLASS, NOT A PAINTED BLOCK. This was 40% and it read as a solid green slab with a black hole
     in the middle of it - the tint was competing with the text it was supposed to be framing. Soft
     like every other tinted surface in this file (--ice .14, --out .16, --tint .14), with the EDGE
     carrying the colour instead of the fill. The app's own text on it measures about 15:1. */
  --mint:   rgba(34,197,94,.13);
  --mint-2: rgba(34,197,94,.34);
  --mint-3: rgba(34,197,94,.55);

  /* Named after the role, so a rule reads as what it is for rather than what colour it is. */
  --panel:     var(--surface);
  --section:   var(--surface);
  --accent:    var(--brand);
  --accent-fg: var(--brand-fg);
  --link:      var(--brand-dim);

  --r-xs: 10px;
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;

  /* Overshoot, so a tap feels like it lands rather than fades. */
  --spring: cubic-bezier(.34, 1.46, .64, 1);
  --ease:   cubic-bezier(.32, .72, 0, 1);

  --lift: 0 14px 34px -22px rgba(0,0,0,.95);
  --glow: 0 10px 26px -14px rgba(249,115,22,.55);

  /* One row of header. Only what the first paint uses; measureTop() replaces it with the real one. */
  --top-h: 64px;
  --tab-h: 66px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ============================================================================================
   THE KHMER RULE, AND IT APPLIES TO EVERY RULE BELOW.
   ============================================================================================
   Reported: the Khmer is hard to read in places. It was, and this file was the cause of it.

   1. TRACKING IS FOR FIGURES, NEVER FOR KHMER. Khmer writes its vowels and its second consonant as
      marks above, below and around the base letter. letter-spacing inserts room between the pieces of
      one syllable, so '-.02em' on a heading pushed the next cluster INTO the marks of the last, and
      '.1em' on a small label pulled a vowel off the letter it belongs to. Both read as broken
      rendering rather than as a style. Negative tracking is kept on prices and counts, which are
      Latin digits and genuinely tighter for it - $51.29, 2934.

   2. KHMER NEEDS THE VERTICAL ROOM. A subscript consonant hangs below the baseline and a vowel sits
      above the x-height, so a line box that fits Latin clips Khmer. Nothing that can wrap goes below
      1.45, and the two-line product name is at 1.5.

   3. AND IT DOES NOT GO SMALL. 10px Khmer on a phone is a smudge: the marks are a third of the glyph
      and they merge. Nothing holding Khmer is under 11.5px.

   4. UPPER-CASING DOES NOTHING TO KHMER. It was set on the small labels for a Latin small-caps look,
      which Khmer has no way to give - so it only ever reached the Latin words mixed in with the
      Khmer, and made just those shout. Gone, and the test forbids it coming back: which is why this
      note does not spell the property out.
   ============================================================================================ */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* THE BACKGROUND IS ON html AND NOT ON body, and that is load-bearing. The warm bloom below is a
   body::before at z-index -1, and a negative-z child paints AFTER its parent's background but BEFORE
   the background of a block-level descendant - so an opaque body would bury it. html's background
   still fills the whole viewport, so there is no white flash before the first paint either. */
html { background: var(--bg); }

html, body {
  margin: 0;
  padding: 0;
  color: var(--fg);
  /* ONE FACE NAMED FOR EACH SCRIPT, AND THE LATIN ONE FIRST.
     A browser falls back PER CHARACTER, not per element: it takes each letter from the first font in
     this list that actually has it. So a Latin face at the front does not touch the Khmer - it has no
     Khmer glyphs to give - and the Khmer faces behind it are still what every Khmer letter is drawn
     with, stacked vowels and subscripts included.
     THE ORDER USED TO BE THE OTHER WAY, and that is what made the Latin words look thin: 'Ai Store KH'
     and 'Products' were being drawn with the LATIN glyphs of a Khmer font, which are an afterthought in
     those fonts and have no real bold. Reported as exactly that - the English is not bold enough.
     The original bug this stack was written for was different: it named no Khmer font at all, so Khmer
     fell through to whatever the system chose. Naming both, in this order, fixes both faults.
     One Khmer name per platform, because none of them is everywhere: Kantumruy Pro or Khmer OS where
     somebody installed them, Noto Sans Khmer on Android, Khmer Sangam MN on iOS and macOS, Khmer UI on
     Windows. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               "Kantumruy Pro", "Noto Sans Khmer", "Khmer OS Battambang", "Khmer OS",
               "Khmer Sangam MN", "Khmer MN", "Khmer UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overscroll-behavior-y: none;
}

/* A single warm bloom behind the whole page, fixed so it does not scroll. It is what stops a very
   dark screen reading as switched-off. */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 46vh;
  z-index: -1;
  background:
    radial-gradient(90% 70% at 6% 0%, rgba(249,115,22,.17), transparent 62%),
    radial-gradient(70% 60% at 96% 4%, rgba(245,165,36,.09), transparent 60%);
  pointer-events: none;
}

/* --top-h IS MEASURED, NOT DECLARED. The value in :root above is only what the first paint uses
   before JS has run; measureTop() overwrites it with the header's real offsetHeight.

   It used to be a hard-coded 152px that dropped to 62px on a deep screen - and the balance card was
   never actually hidden, so the header stayed 131px tall while the content was told to start at 62.
   Every product page and the whole KHQR screen slid up underneath the card: the heading vanished
   and the top of the QR was covered. A number that has to agree with rendered content, and is
   written in a different file from that content, is a number that will disagree.

   THE HEADER IS NOW ONE ROW ON EVERY SCREEN. The card became a chip beside the name, so there is
   nothing left to hide on a deep screen and no second height for the two files to disagree about.
   It is still measured rather than declared, because the Khmer font, a long name, the on-screen
   keyboard and the safe-area inset all still move it. */
body {
  padding-top: var(--top-h);
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  min-height: 100vh;
}

button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-dim); outline-offset: 2px; border-radius: 8px; }

/* ============================================================== header */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  padding: calc(var(--safe-t) + 8px) 14px 12px;
  background:
    linear-gradient(180deg, rgba(249,115,22,.10), transparent 78%),
    var(--bg-glass);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line);
  transition: padding .2s var(--ease);
}

.top-row { display: flex; align-items: center; gap: 10px; min-height: 34px; }

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.brand-text { display: grid; min-width: 0; gap: 1px; }
/* The customer's own name, and the largest thing on the row. It was 15px and held the shop's name,
   which Telegram already shows in its own bar above. */
.brand-name {
  font-size: 17px; font-weight: 750; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================================== the avatar
   THE PROFILE PHOTO, WITH INITIALS BEHIND IT. Telegram hands over photo_url only when the user's
   privacy settings allow it, so 'no photo' is the normal case and not an error: the same box then
   holds the first letters of the name on the brand gradient. The letters are drawn even when a photo
   IS coming, and the image covers them once it arrives - so a slow network shows a finished-looking
   avatar rather than an empty hole, and a photo that fails to load falls back to them by itself. */
.ava {
  position: relative;
  flex: 0 0 40px; width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  box-shadow: var(--glow);
  color: var(--brand-fg);
  font-size: 15px; font-weight: 800;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}
.ava img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  /* Fades in over the initials instead of replacing them in one frame. */
  animation: fade .28s var(--ease);
}
/* An emoji stands in when there is no name to take letters from either. */
.ava.glyph { font-size: 21px; font-weight: 400; }
.ava-lg.glyph { font-size: 46px; }

/* The big one on the account screen. */
.ava-lg {
  flex: 0 0 92px; width: 92px; height: 92px;
  border-radius: 28px;
  font-size: 34px;
  margin-bottom: 10px;
}

/* --- the status line, as in the screenshot's green tick under the licence name --- */
.st { display: flex; align-items: center; gap: 6px; min-width: 0; }
.st-dot {
  flex: 0 0 7px; width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
  animation: breathe 2.6s ease-in-out infinite;
}
.st.shut .st-dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(245,181,68,.18); }
.st-dot.shut, .st-dot.bad, .st-dot.danger {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(244,84,76,.25);
}
.brand-sub {
  font-size: 12px; color: var(--dim); line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.chip-back {
  flex: 0 0 34px; width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
  transition: transform .16s var(--spring), background .16s, border-color .16s;
}
.chip-back:active { transform: scale(.88); background: var(--surface-3); }
.chip-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --- the balance, as a chip on the name's own row ---------------------------------------------
   THE CARD IS GONE. It was full width, 106px tall, gradient, with a sheen crossing it - and it was
   there on every screen, pushing the shop down by that much. The owner asked for the space, and the
   card was the most expensive thing in the app per fact conveyed: one number, one word, one link.

   As a chip it keeps all three - the figure is still the brightest thing on the row, it still leads
   to the account, and it is now in the SAME PLACE ON EVERY SCREEN, which the card never was because
   it was hidden on deep ones to buy back exactly this space. That hiding is what made the header two
   different heights and put the KHQR screen under the card; there is nothing left to hide. */
.cash {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 46%;
  padding: 7px 8px 7px 11px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  color: var(--brand-fg);
  background: linear-gradient(118deg, var(--brand) 6%, var(--brand-2) 98%);
  box-shadow: var(--glow);
  transition: transform .16s var(--spring), box-shadow .16s;
}
.cash:active { transform: scale(.95); box-shadow: 0 4px 12px -10px rgba(249,115,22,.7); }
.cash-mark { font-size: 14px; line-height: 1; }
.cash-sum {
  font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
  white-space: nowrap;
}
.cash-sum.bump { animation: bump .5s var(--spring); }
.cash-go {
  width: 15px; height: 15px; flex: 0 0 15px;
  fill: none; stroke: currentColor; stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: .65;
}

/* ============================================================== toast */
.toast {
  position: fixed;
  top: calc(var(--safe-t) + 10px);
  left: 12px; right: 12px;
  z-index: 60;
  max-height: 0;
  padding: 0 15px;
  overflow: hidden;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.85);
  transition: max-height .22s var(--ease), padding .22s var(--ease), transform .22s var(--spring);
  transform: translateY(-8px);
}
.toast.show { max-height: 46vh; padding: 12px 15px; overflow-y: auto; transform: none; }
.toast.bad  { background: var(--danger); color: #17120a; }
.toast.good { background: var(--ok);     color: #07130c; }
.toast.info { background: var(--surface-3); color: var(--fg); border: 1px solid var(--line-2); }

/* ============================================================== layout */
main { padding: 14px 14px 20px; animation: enter .26s var(--ease); }
main:focus { outline: none; }

h1 { font-size: 21px; font-weight: 800; line-height: 1.45; margin: 2px 0 12px; }
h2 { font-size: 14.5px; font-weight: 700; color: var(--dim); margin: 22px 0 9px; line-height: 1.45; }
p  { margin: 8px 0; }

.dim { color: var(--dim); }
.small { font-size: 13px; }
.center { text-align: center; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

/* ============================================================== the amber banner
   The single most recognisable thing in the screenshot: a full-width gradient block with a short
   bold line and a Khmer line under it. Here it names the shop, so the customer can see whose shop
   they are standing in before anything has loaded. */
.banner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1px;
  width: 100%;
  margin: 0 0 14px;
  padding: 15px 18px 16px;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  color: var(--brand-fg);
  background: linear-gradient(104deg, var(--brand) 4%, var(--brand-2) 98%);
  box-shadow: var(--glow);
  text-align: center;
  animation: pop .4s var(--spring) both;
}
.banner-glow {
  position: absolute; inset: -70% -25%;
  background: radial-gradient(42% 38% at 50% 50%, rgba(255,255,255,.32), transparent 70%);
  animation: sheen 8s ease-in-out infinite;
  pointer-events: none;
}
/* An h1, so the screen has a real heading - hence the margin reset. The shop's name is the first
   thing on the first screen, so it carries the heaviest weight and the largest size in the banner.
   Completely stable, high-contrast title with smooth ambient light shimmer and ZERO layout movement. */
.banner-name,
.banner-title {
  margin: 0;
  padding: 2px 4px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.45;
  color: var(--brand-fg);
  display: inline-block;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
  animation: titleGlow 4s ease-in-out infinite;
}
@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 1px 0 rgba(255, 255, 255, .35), 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    text-shadow: 0 1px 0 rgba(255, 255, 255, .6), 0 0 12px rgba(255, 255, 255, .55), 0 0 20px rgba(249, 115, 22, .3);
  }
}
.banner-sub {
  font-size: 12.5px;
  font-weight: 600;
  opacity: .78;
}

/* ============================================================== section cards
   A panel with a tiny label over a big Khmer title, exactly as the screenshot lays out its forms.
   The kicker is what makes a long screen feel ordered: '១.', '២.', '៣.' answers 'how much more of
   this is there' without the customer having to scroll to find out. */
.sec {
  margin: 0 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--lift);
  overflow: hidden;
  animation: rise .3s var(--ease) both;
}
.sec-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 11px;
  background: linear-gradient(180deg, var(--tint), transparent);
  border-bottom: 1px solid var(--line);
}
.sec-ico {
  flex: 0 0 30px; width: 30px; height: 30px;
  display: grid; place-items: center;
  margin-top: 1px;
  border-radius: 10px;
  background: var(--tint-2);
  color: var(--brand-dim);
  font-size: 15px; line-height: 1;
}
.sec-words { display: grid; gap: 1px; min-width: 0; }
.sec-kicker {
  font-size: 11.5px; font-weight: 700; color: var(--brand-dim);
  line-height: 1.45;
}
/* Resets the global h2, which is the small dim all-caps label used above plain lists. */
.sec-title {
  font-size: 16.5px; font-weight: 850; color: var(--fg);
  line-height: 1.45;
  margin: 0;
}
.sec-body { padding: 13px 14px 14px; display: grid; gap: 11px; }
/* The grid gap does all the spacing inside a section, so its children drop their own margins -
   otherwise every element brings its own idea of the distance and the panel breathes unevenly. */
.sec-body > * { margin-top: 0; margin-bottom: 0; }

/* --- the lighter header for a plain list: no panel, same shape of information --- */
.head { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.head-ico {
  flex: 0 0 28px; width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--tint-2);
  color: var(--brand-dim);
  font-size: 14px; line-height: 1;
}
.head-words { display: grid; gap: 0; min-width: 0; flex: 1; }
.head-kicker { font-size: 11.5px; font-weight: 700; color: var(--brand-dim); line-height: 1.45; }
/* An h2 normally, an h1 when the row is the screen's title - so both reset the heading defaults. */
.head-title {
  margin: 0;
  font-size: 15.5px; font-weight: 800; color: var(--fg);
  line-height: 1.45;
}
h1.head-title { font-size: 19px; }
.head-end { font-size: 12px; color: var(--dim); flex: 0 0 auto; }

/* ============================================================== labelled fields
   Label above, field below, both inside the section - the screenshot's form pattern. A placeholder
   is not a label: it disappears the moment somebody types, and then nothing on screen says what the
   number they are looking at is for. */
.field { display: grid; gap: 6px; }
.field-label { font-size: 12.5px; font-weight: 650; color: var(--dim); }
.field-note { font-size: 12px; color: var(--dim); line-height: 1.5; }

/* ============================================================== search + filters */
.seek { position: relative; margin: 0 0 14px; }
.seek svg {
  position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%;
  width: 17px; height: 17px; fill: none; stroke: var(--brand-dim);
  stroke-width: 2.2; stroke-linecap: round; pointer-events: none;
  transition: stroke .2s ease, transform .2s ease;
}
.seek input {
  width: 100%;
  padding: 13px 14px 13px 40px;
  border: 1.5px solid var(--brand);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.14), inset 0 0 0 1px rgba(249, 115, 22, 0.08);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.seek input::placeholder { color: var(--dim); }
.seek input:hover {
  border-color: var(--brand-2);
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.25), inset 0 0 0 1px rgba(249, 115, 22, 0.15);
}
.seek input:focus {
  border-color: var(--brand-2);
  background: var(--surface-3);
  outline: none;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.38), 0 0 0 2px rgba(249, 115, 22, 0.28);
}
.seek:focus-within svg {
  stroke: var(--brand);
  transform: translateY(-50%) scale(1.08);
}

.filters {
  display: flex; gap: 7px; margin: 0 0 13px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: 0 0 auto;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s var(--spring), background .16s, border-color .16s, color .16s,
              box-shadow .18s var(--ease);
}
.filter:active { transform: scale(.94); }
.filter[aria-pressed="true"] {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: var(--brand-fg);
  border-color: transparent;
  box-shadow: var(--glow);
}

/* ============================================================== product tiles
   A BUYABLE PRODUCT IS PALE BLUE GLASS. Two translucent layers - a white sheen falling from the top
   left, and the blue wash under it - over a hairline lit edge and one inset highlight along the top.
   The page's own dark shows through both, which is what makes it read as glass rather than as a blue
   card.

   NO backdrop-filter HERE, DELIBERATELY. That is the honest way to blur what is behind a panel, and
   it is also the classic scroll stutter on a mid-range Android once there is one per row in a list of
   twenty-two. The page behind these rows is nearly flat dark, so a real blur would buy almost
   nothing for that price. The two bars that DO blur - the header and the tab bar - are one element
   each and never scroll. */
.tile {
  border: 1px solid var(--ice-2);
  border-radius: var(--r);
  background:
    linear-gradient(150deg, rgba(255,255,255,.07), rgba(255,255,255,.012) 44%),
    linear-gradient(118deg, var(--ice), rgba(126,192,255,.045) 74%);
  box-shadow: 0 12px 28px -22px rgba(0,0,0,.95),
              inset 0 1px 0 rgba(255,255,255,.08);
  overflow: hidden;
  position: relative;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
  /* Each tile arrives a beat after the one above it. Set per tile in JS.
     BACKWARDS, NOT BOTH, and that is not a detail. 'rise' has no 100% keyframe, so the browser makes
     one out of the element's own style - and a forwards fill keeps applying it after the animation
     ends, at a priority above ordinary declarations. It would beat the hover transform below and the
     card would refuse to lift. Backwards gives the stagger everything it needs: the from-state while
     the tile waits its turn, and nothing at all afterwards. */
  animation: rise .34s var(--ease) backwards;
}

/* The sheen that comes up under the pointer. A layer of its own because background-image does not
   interpolate - swapping the gradient would snap, and an opacity does not. */
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(255,255,255,.10), rgba(255,255,255,.015) 58%);
  opacity: 0;
  transition: opacity .22s var(--ease);
  pointer-events: none;
}

.tile-tap {
  position: relative;
  /* Above the hover sheen, so the sheen lights the card and not the words on it. */
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: start;
  cursor: pointer;
  transition: transform .14s var(--spring), background .14s;
}
/* ROOM AT THE END, ONLY ON THE ROWS THAT HAVE A PIN. The class is put on by addPin rather than
   inferred with :has(), which is a 2022 selector: on a webview without it the price would print under
   the pin, and a layout that breaks silently on an older phone is not worth the shorter rule. The
   order history, the plan list and the wallet statement have no pin and keep the whole width. */
.tile.pinnable .tile-tap { padding-inline-end: 46px; }
/* Pressing LIGHTENS the glass instead of sinking it. On a translucent surface a darker press
   reads as a hole in the card; a lighter one reads as the light catching it. */
.tile-tap:active { transform: scale(.975); background: rgba(255,255,255,.055); }
.tile-static { cursor: default; }
.tile-static:active { transform: none; background: transparent; }
/* The statement rows are not products and there are forty of them: they stay flat and quiet. */
.tile-flat { background: none; border-color: var(--line); box-shadow: none; }

.tile-art {
  position: relative;
  flex: 0 0 46px; width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  /* A lighter tone of the same glass, so the row reads as one object and the product's own emoji
     keeps its colours. */
  background: var(--ice-3);
  border: 1px solid rgba(255,255,255,.09);
  font-size: 23px;
  line-height: 1;
}
.tile-emoji { display: block; will-change: transform; }

/* THE OWNER'S PICTURE, LAID OVER THE EMOJI RATHER THAN INSTEAD OF IT.
   The emoji is always drawn; this covers it once the file has arrived. That is what gives a slow
   connection a finished-looking row instead of an empty square, and it means a picture that fails to
   load - the file deleted under it - reveals the emoji again with no error handling to write.
   object-fit: cover because an upload is any shape and a squashed product is worse than a cropped one.
   Nothing is drawn over it any more: the in-stock light used to sit on this box's corner and now sits
   in front of the stock words instead, which is partly why it was moved. */
.tile-art .art,
.hero-art .art,
.cart-card-art .art {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  animation: fade .28s var(--ease) both;
}

/* The two buttons under a row on the picture tool, side by side and full width between them. */
.art-row { display: flex; gap: 9px; padding: 0 14px 12px; }
.art-row .btn { flex: 1; margin: 0; padding: 10px 12px; font-size: 13px; }

.tile-mid { display: grid; gap: 2px; min-width: 0; flex: 1; }
.tile-name {
  /* 1.5, so a subscript consonant on the first line is not clipped by the second. */
  font-size: 15px; font-weight: 650; line-height: 1.5;
  /* Two lines then ellipsis: some of these names are very long and a single clipped line loses the
     part that tells them apart - '6 MONTHS' against '12 MONTHS'. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-meta { font-size: 12.5px; line-height: 1.5; color: var(--dim);
             display: flex; flex-wrap: wrap; gap: 6px; }

/* THE PADDING IS WHAT KEEPS THE DISCOUNT TAB OFF THE OLD PRICE. The tab is pinned to this corner and
   the struck-through price is the first thing in this column, so the two were landing on the same
   pixels: '−5%' printed across '$4.00', and neither was readable. The tab is shorter now and the
   column starts below it. */
.tile-end { display: grid; justify-items: end; gap: 0; flex: 0 0 auto; padding-top: 4px; }
.tile-was { font-size: 11.5px; color: var(--dim); }
.tile-now { font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; }

.tile-flag {
  position: absolute; top: 0; inset-inline-end: 0;
  padding: 1px 9px 2px;
  border-start-end-radius: 0;
  border-end-start-radius: 11px;
  font-size: 11px; font-weight: 800; line-height: 1.35;
  background: var(--ok); color: #07130c;
}
.tile-flag:empty { display: none; }
.tile-flag.hot { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: var(--brand-fg); }
.tile-flag.folder { background: #2563eb; color: #ffffff; }

/* --- the pin -----------------------------------------------------------------------------------
   A SECOND CONTROL ON THE ROW, so it gets its own column at the end rather than a corner. Corners
   were both taken: the discount tab is in one, and the price is under it. Giving the pin the right
   edge also pushes the price column in, away from that tab - the two used to print on top of each
   other. Thirty-four pixels square, which is the smallest a finger reliably hits. */
.pin {
  position: absolute;
  inset-inline-end: 7px;
  top: 50%;
  translate: 0 -50%;
  /* Above the hover sheen, like the row's own button. */
  z-index: 2;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  font-size: 15.5px;
  line-height: 1;
  cursor: pointer;
  /* Clearly visible and tactile so customers immediately spot the Pin feature */
  opacity: .88;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  transition: transform .18s var(--spring), opacity .18s, background .18s, border-color .18s, box-shadow .18s;
}
.pin:active { transform: scale(.86); }
.pin[aria-pressed="true"] {
  opacity: 1;
  filter: none;
  background: var(--tint-2);
  border-color: var(--brand);
  box-shadow: 0 0 10px rgba(249, 115, 22, .45);
}
/* And the whole row carries a warm edge, so a pinned product is recognisable while scrolling past. */
.tile.pinned { border-color: var(--tint-2); }
.tile.pinned.gone { border-color: rgba(244,84,76,.42); }

/* --- THE GREEN LIGHT: THIS ONE CAN BE BOUGHT ----------------------------------------------------
   IN FRONT OF THE WORDS IT IS ABOUT, and half the size it used to be.
   It was a 13px disc on the corner of the product's icon, borrowed from where a chat app puts
   'online'. Two things were wrong with that. The icon is now the 46px box the owner's own picture
   goes into, so the disc was covering the corner of the thing it was meant to draw the eye to; and it
   sat at the opposite end of the row from 'មាន 73', the words it is a second reading of. A small
   light immediately before those words is read together with them, in one glance.

   A LIGHT, NOT A DISC. No dark ring cutting it out of the background - just the colour and a bloom
   around it, which is what lets 7px still catch the eye where 13px needed a ring to be seen at all.

   IT IS DECORATION, AND ONLY DECORATION. The row already says 'មាន 73' or 'អស់ស្តុក' in words, so the
   light is a second reading of a fact that is written down - which is what makes it safe for somebody
   who cannot separate green from grey. A pseudo-element, so there is nothing in the markup for a
   screen reader to announce twice.

   STATIC, NOT PULSING. The header's status dot breathes because there is one of it; twenty of them
   breathing in unison, in a list somebody is trying to read, is a different thing entirely. The glow
   is what carries the eye instead. */
.stock {
  /* inline-flex, so the light and the words travel as one thing when the meta line wraps. */
  display: inline-flex; align-items: center; gap: 6px;
}
.stock::before {
  content: '';
  flex: 0 0 7px; width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  /* The bloom IS the light: a tight ring for the bulb, a wide soft one for the glow around it. */
  box-shadow: 0 0 4px rgba(34,197,94,.95), 0 0 10px rgba(34,197,94,.5);
}
/* The product's own page says it in a pill of larger type, so the light grows one pixel with it. */
.tag.stock::before {
  flex: 0 0 8px; width: 8px; height: 8px;
  box-shadow: 0 0 5px rgba(34,197,94,.95), 0 0 12px rgba(34,197,94,.55);
}

/* --- AND THE PRICE OF SOMETHING YOU CAN BUY GLOWS THE SAME GREEN --------------------------------
   Asked for right after the light: the figure itself, glowing - not a second dot. One light and one
   green number per row is one message read twice; two dots would be two things to look at saying the
   same thing.

   text-shadow rather than a box, because the glow has to follow the shape of the digits.

   ONLY WHERE THERE IS SOMETHING TO BUY. The order history and the wallet statement are built from the
   same row template as the shop, and green on a receipt would say 'you can buy this' about money that
   is already spent. So this class is added where a buyable row is built - never in the stylesheet for
   every .tile-now. The struck-through old price beside it stays dim: it is the number that is NOT
   being charged. */
.lit { color: var(--ok); text-shadow: 0 0 9px rgba(34,197,94,.42); }
/* The product's own page prints the price at 34px, where that same glow would read as a haze. */
.price-big strong.lit { text-shadow: 0 0 16px rgba(34,197,94,.34); }

/* OUT OF STOCK IS A COLOUR, NOT A FADE.
   It used to be opacity .58 with the emoji turned grey, which is the same trick used for a disabled
   control - and these rows are not disabled: the card behind them still carries the description and
   the restock promise, and they are meant to be tapped. Faded text is also simply harder to read,
   and it was the price and the name that faded.
   Tinted red instead, with the icon chip and the border taking the same colour, the way the owner's
   reference marks a row out. The words 'អស់ស្តុក' are on the row as well, so colour is not the only
   signal - which is what makes this safe for somebody who cannot separate red from grey.
   The tint is kept low: an unavailable product must read as unavailable, not become the brightest
   thing in a list of things that CAN be bought. */
.tile.gone {
  /* The same glass, in red. Built the same way as the blue so the two sit in one list without one of
     them looking like a different kind of card. Pale and dimmed so customers immediately recognize it as out of stock. */
  border-color: var(--out-2);
  background:
    linear-gradient(150deg, rgba(255,255,255,.03), rgba(255,255,255,.005) 44%),
    linear-gradient(118deg, var(--out), rgba(244,84,76,.03) 74%);
  opacity: .62;
  transition: opacity .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.tile.gone .tile-name { color: var(--dim); }
.tile.gone .tile-now { color: rgba(244,244,247,.55); }
.tile.gone .tile-art {
  background: var(--out);
  border-color: var(--out-2);
  opacity: .75;
  filter: saturate(.45) brightness(.85);
}
.tile.gone .tile-flag {
  opacity: .45;
  filter: saturate(.4);
}
.tile.gone .pin {
  opacity: .5;
}
.gone-word { color: var(--danger); font-weight: 650; }
/* And the product's own page agrees with the row that led to it. */
.hero.gone .hero-art {
  border-color: var(--out-2);
  background:
    linear-gradient(150deg, rgba(255,255,255,.06), rgba(255,255,255,.01) 46%),
    linear-gradient(118deg, var(--out), rgba(244,84,76,.04) 74%);
}

/* ============================================================== the identity card
   The screenshot's licence card: the app mark, the name, a badge for the plan, and one line of
   status under a coloured tick. Here it is the customer's own account. It carries NO button - the
   screen's one action belongs to Telegram's bottom button, and a second copy of it here is the
   exact fault that put three ways to top up on one screen. */
.profile {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin: 0 0 14px;
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(80% 60% at 50% 0%, var(--tint), transparent 70%),
    var(--surface);
  box-shadow: var(--lift);
  text-align: center;
}
.profile .ava-lg { animation: pop .42s var(--spring) both; }
.profile-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
/* The screen's h1, hence the reset - and the biggest name in the app, which is the point of it. */
.profile-title { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.45; }
.profile-at { font-size: 13.5px; font-weight: 650; color: var(--brand-dim); }
/* The balance, at the size the removed header card used to give it - on the one screen it is about. */
.profile-label { margin-top: 12px; font-size: 12px; font-weight: 650; color: var(--dim); }
.profile-big {
  font-size: 36px; font-weight: 850; letter-spacing: -.035em; line-height: 1.15;
  color: var(--brand-dim);
}
/* The gradient across the figure is behind a support query ON PURPOSE. background-clip:text needs
   color:transparent to show, and on a webview that does not do it the customer would be looking at
   an invisible balance. Plain amber first, the gradient only where it can actually work. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .profile-big {
    background: linear-gradient(112deg, var(--brand-2), var(--brand-dim));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.profile-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px;
                color: var(--dim); margin-top: 8px; }

.badge {
  padding: 2px 9px 3px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: var(--brand-fg);
  font-size: 11.5px; font-weight: 800; line-height: 1.4;
}
.badge.quiet { background: var(--surface-3); color: var(--dim); }

/* --- the ticked benefits list, as in the screenshot's plan card --- */
.perks { display: grid; gap: 8px; }
.perk { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.perk-tick {
  flex: 0 0 18px; width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: rgba(34,197,94,.16);
  color: var(--ok);
  font-size: 11px; font-weight: 800;
}
.perk.off { opacity: .5; }
.perk.off .perk-tick { background: var(--sunk); color: var(--dim); }

/* --- a row that is a link onward: icon chip, label, chevron --- */
.navrow {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--fg);
  text-align: start;
  cursor: pointer;
  transition: transform .15s var(--spring), background .15s, border-color .15s,
              box-shadow .18s var(--ease);
}
.navrow:active { transform: scale(.98); background: var(--surface-3); }
.navrow.on { background: var(--tint); border-color: var(--tint-2); }
.navrow-ico {
  flex: 0 0 32px; width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--surface-3);
  font-size: 16px; line-height: 1;
}
.navrow.on .navrow-ico { background: var(--tint-2); }
.navrow-txt { flex: 1; min-width: 0; display: grid; gap: 0; }
.navrow-name { font-size: 14.5px; font-weight: 650; }
.navrow-note { font-size: 12px; color: var(--dim); line-height: 1.45; }
.navrow-end { flex: 0 0 auto; color: var(--dim); font-size: 17px; line-height: 1; }

/* ============================================================== product detail */
.hero {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 8px 0 4px;
  text-align: center;
}
/* The same glass as the row that led here, at four times the size. It was amber, which made the
   product look like a different thing on the page from the thing in the list. */
.hero-art {
  /* So the in-stock dot is placed against the icon rather than against the page. */
  position: relative;
  width: 88px; height: 88px;
  display: grid; place-items: center;
  border-radius: 28px;
  background:
    linear-gradient(150deg, rgba(255,255,255,.08), rgba(255,255,255,.015) 46%),
    linear-gradient(118deg, var(--ice-3), rgba(126,192,255,.05) 74%);
  border: 1px solid var(--ice-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
  font-size: 44px;
  line-height: 1;
  animation: pop .42s var(--spring) both;
}
/* The screen's h1, hence the reset. */
.hero-name { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.5; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tag {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.tag.ok   { background: rgba(34,197,94,.14);  color: var(--ok);     border-color: rgba(34,197,94,.22); }
.tag.warn { background: rgba(245,181,68,.14); color: var(--warn);   border-color: rgba(245,181,68,.22); }
.tag.bad  { background: rgba(244,84,76,.14);  color: var(--danger); border-color: rgba(244,84,76,.22); }
.tag.cut  { background: var(--tint);          color: var(--brand-dim); border-color: var(--tint-2); }

.price-big {
  display: flex; align-items: baseline; justify-content: center; gap: 9px;
  margin: 6px 0 2px;
}
.price-big strong { font-size: 34px; font-weight: 850; letter-spacing: -.03em; }
.price-big s { font-size: 16px; color: var(--dim); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  margin: 13px 0;
}
.card.plain { background: var(--surface-2); }
/* Inside a section the card is already on a panel, so it drops its own frame. */
.sec-body > .card { margin: 0; background: var(--surface-2); }

.desc {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14.5px;
  line-height: 1.65;
}

.facts { display: grid; gap: 9px; }
.fact { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; font-size: 14px; }
.fact > span:first-child { color: var(--dim); flex: 0 0 auto; }
.fact > span:last-child { text-align: end; font-weight: 600; overflow-wrap: anywhere; }
/* The last fact of a total is the one being decided on, so it is given the weight. */
.fact.lead > span:last-child { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }

/* ============================================================== quantity stepper */
.step {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 10px;
  margin: 0;
}
.step-btn {
  flex: 0 0 46px; width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-3);
  font-size: 24px; font-weight: 700;
  cursor: pointer;
  transition: transform .14s var(--spring), opacity .14s, background .16s, border-color .16s;
}
.step-btn:active { transform: scale(.9); }
.step-btn:disabled { opacity: .35; cursor: default; }
.step-num { display: grid; justify-items: center; gap: 0; flex: 1; }
.step-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.step-value.bump { animation: bump .34s var(--spring); }
.step-hint { font-size: 12px; color: var(--dim); line-height: 1.45; }

.quick { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; }

/* ============================================================== buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 15px;
  border: 0;
  border-radius: var(--r);
  background: linear-gradient(118deg, var(--brand) 6%, var(--brand-2) 98%);
  color: var(--brand-fg);
  font-weight: 750;
  font-size: 15.5px;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: transform .15s var(--spring), opacity .15s,
              box-shadow .2s var(--ease), background .2s, border-color .2s;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }

/* THE SCREEN'S ONE PRIMARY ACTION, IN THE PAGE. It used to be Telegram's own bottom button, which the
   client draws below the whole web view - under our tab bar, two bands of chrome away from the total
   it commits to. It sits at the end of the content now, so it is the last step of the form and reads
   as one. Slightly taller than the other buttons, because it is the one being aimed at. */
.btn.primary {
  margin-top: 4px;
  padding: 17px;
  font-size: 16.5px;
  border-radius: 17px;
}
/* Working. The spinner is a ::before, so setting the label's text cannot wipe it. */
.btn.busy::before {
  content: '';
  width: 16px; height: 16px;
  flex: 0 0 16px;
  border: 2.4px solid rgba(23,18,10,.3);
  border-top-color: var(--brand-fg);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
.btn.ghost { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); box-shadow: none; }
.btn.line  { background: transparent; border: 1px solid var(--line-2); color: var(--fg); box-shadow: none; }
.btn.danger { background: var(--danger); color: #17120a; box-shadow: none; }

/* TWO TINTED BUTTONS, THE SAME VOCABULARY THE TAGS ALREADY USE: .danger is the solid one, .bad is
   the soft one - exactly as .tag.bad is the soft version of red beside it. Both are glass in their
   own colour, with the colour in the border and the label rather than in a filled slab.
   .ok goes with what was delivered: Copy, បើក, Copy ទាំងអស់.
   .bad goes on 'រាយការណ៍បញ្ហា', which is the one button on the screen you press when something is
   wrong - asked for in soft red so it is recognisable without being alarming. It reuses --out, the
   red this app already tints a sold-out row with, so there is one soft red in the shop and not two. */
.btn.ok  { background: var(--mint); border: 1px solid var(--mint-2); color: var(--ok);
           box-shadow: none; }
.btn.bad { background: var(--out);  border: 1px solid var(--out-2);  color: var(--danger);
           box-shadow: none; }
.btn + .btn { margin-top: 9px; }
.btn-row { display: flex; gap: 9px; }
.btn-row > .btn { margin-top: 0; }

/* ============================================================== licences */
.licence {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  margin: 9px 0;
  display: grid;
  gap: 10px;
  transition: border-color .2s;
}
.licence-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.licence-num { font-size: 12px; font-weight: 700; color: var(--brand-dim); line-height: 1.45; }

/* --- THE BOX THAT HOLDS WHAT WAS DELIVERED, IN SOFT GREEN ---------------------------------------
   Asked for: the box you copy the licence or the link out of should be green, so the eye lands on it
   without reading a word. It is the only thing on this screen that the customer came for.

   ONLY THE DELIVERED CREDENTIALS, hence the second class instead of colouring .licence itself. The
   same frame is used by the invite list and by the User ID box on the support screen, and green on
   those would say 'done' about an invite that is still pending, and nothing at all about a user id.

   THE TEXT STAYS ON THE DARK PANEL INSIDE. A 240-character URL is read one character at a time, and
   near-black behind white monospace is the highest contrast this app has anywhere. So the FRAME is
   what turned green; the thing being copied is left as legible as it can be. */
.licence.delivered {
  background: var(--mint);
  border-color: var(--mint-2);
  /* One hairline of light along the top edge and a soft green pool under the box. That is what makes
     a 13% tint read as a lit pane of glass rather than as a slightly-off rectangle. */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 14px 30px -24px rgba(34,197,94,.55);
}
/* The panel the text sits on stays dark - a 240-character URL is read one character at a time and
   this is the highest contrast in the app - but only 55% dark, so the green shows through it and the
   box reads as one object instead of a frame with a hole in it. */
.licence.delivered code { background: rgba(11,11,14,.55); border-color: var(--mint-2); }
/* The amber 'ទី ១' counter would fight the green. It is a number, not a brand mark. */
.licence.delivered .licence-num { color: var(--fg); }
/* Copy and បើក are the same green family, one step brighter than the box, so they read as raised
   rather than as panels cut out of it. */
.licence.delivered .btn.ok { background: rgba(34,197,94,.22); }

/* --- ONE ACCOUNT, THREE FIELDS, ONE COPY EACH ---------------------------------------------------
   A login form asks for the email, then the password, then a six-digit code. That is three separate
   pastes in a row on a phone, and they used to come out of one selectable block of 12px monospace.
   Each field gets its own panel, its own label and its own 📋 - and the value is still selectable for
   anyone who would rather long-press it. */
.creds { display: grid; gap: 8px; }
.cred {
  /* The same dark panel the raw block uses, so a split-up account and a bare licence key still look
     like the same kind of thing inside the same green box. */
  background: rgba(11,11,14,.55);
  border: 1px solid var(--mint-2);
  border-radius: 10px;
  padding: 8px 10px 9px;
  display: grid;
  gap: 3px;
}
.cred-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* 11.5px is the floor for Khmer in this file, and this label is Latin - see the type note at the top. */
.cred-k { font-size: 11.5px; font-weight: 700; color: var(--ok); line-height: 1.45; }
.cred-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.6;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}
.cred-v.dim { color: var(--dim); font-size: 11.5px; }
/* The 📋 on a row: one emoji wide, a real 32px target, and no filled slab - the row is the object
   here and the button is a mark on it. */
.cred-copy {
  flex: 0 0 auto;
  min-width: 32px; height: 28px;
  display: grid; place-items: center;
  font-size: 14px; line-height: 1;
  border-radius: 8px;
  background: rgba(34,197,94,.16);
  border: 1px solid var(--mint-2);
  color: var(--fg);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .16s, transform .12s var(--ease);
}
.cred-copy:active { transform: scale(.92); background: rgba(34,197,94,.3); }

/* --- THE CODE ITSELF, WHICH IS THE POINT OF THE 2FA ROW ---
   Grouped 123 456, because six digits read in threes - and grouped with a SPACE rather than with
   letter-spacing, which this file does not use anywhere: it opens up Khmer text elsewhere and it
   would have to be undone for the copy. tabular-nums so the code does not jiggle as it changes. */
.cred.otp { background: rgba(11,11,14,.62); }
.otp-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.otp-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 25px; font-weight: 800; line-height: 1.25;
  font-variant-numeric: tabular-nums;
  color: var(--ok);
  user-select: all;
  -webkit-user-select: all;
}
.otp-left { font-size: 11.5px; font-weight: 650; color: var(--dim); line-height: 1.45; }
/* Thirty seconds, draining. The bar is decoration: the same number is in words beside the label. */
.otp-bar { height: 3px; border-radius: 999px; background: rgba(255,255,255,.09); overflow: hidden; }
.otp-bar > span {
  display: block; height: 100%;
  background: var(--ok);
  border-radius: inherit;
  transition: width .95s linear;
}
.otp-seed {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 3px;
  font-size: 11.5px; font-weight: 650; color: var(--dim); line-height: 1.45;
}
.licence code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  /* anywhere, not break-all: these are long URLs with no spaces and they must be readable whole,
     because copying them is the entire point of the screen. */
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  max-height: 132px;
  overflow-y: auto;
}

/* ============================================================== top up */
.qr-wrap { display: grid; justify-items: center; gap: 12px; margin: 2px 0; }
/* THE ONE HARD-CODED BACKGROUND IN THIS FILE THAT IS NOT PART OF THE PALETTE, and it is not a style
   choice. A QR code is read by contrast, and a bank app pointed at dark modules on a dark
   background does not scan. The padding is the quiet zone the format requires, for the same
   reason. */
.qr {
  width: min(72vw, 272px); height: auto;
  border-radius: var(--r);
  background: #fff;
  padding: 12px;
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.9);
  animation: pop .4s var(--spring) both;
}
.qr-wait { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }

.btn-aba {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 14px;
  border: 1px solid rgba(0, 180, 216, 0.4);
  background: linear-gradient(135deg, #005f73 0%, #0a9396 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px -4px rgba(10, 147, 150, 0.5);
  transition: transform .15s, box-shadow .15s;
}
.btn-aba:active {
  transform: scale(0.98);
}
.aba-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.btn-secondary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-secondary-action:active {
  background: var(--surface-3);
}
.qr-actions-box {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 290px;
  margin: 4px auto;
}

.amount {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--fg);
  font: inherit;
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -.02em;
}
.amount::placeholder { color: var(--dim); }
.amount:focus { border-color: var(--brand); background: var(--surface-3); outline: none; }

textarea.amount { font-size: 15px; font-weight: 400; text-align: start; letter-spacing: 0; }

/* ============================================================== states */
.blank { display: grid; justify-items: center; gap: 6px; padding: 46px 16px; text-align: center; }
.blank-art { font-size: 52px; line-height: 1; animation: float 4s ease-in-out infinite; }
.blank-title { font-size: 16px; font-weight: 700; }
.blank-note { font-size: 13.5px; color: var(--dim); max-width: 30ch; }

.tick { width: 76px; height: 76px; }
.tick-ring, .tick-mark { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tick-ring { stroke: var(--ok); stroke-width: 2.6; stroke-dasharray: 152; stroke-dashoffset: 152;
             animation: draw .5s var(--ease) forwards; }
.tick-mark { stroke: var(--ok); stroke-width: 3.6; stroke-dasharray: 40; stroke-dashoffset: 40;
             animation: draw .34s var(--ease) .38s forwards; }

.spin {
  width: 17px; height: 17px;
  border: 2.4px solid var(--line-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .75s linear infinite;
  flex: 0 0 auto;
}

/* --- skeletons. A shape that becomes the thing, rather than a spinner over nothing. --- */
.skel { display: flex; align-items: center; gap: 12px; padding: 12px 14px; animation: none; }
.skel-art, .skel-line, .skel-price {
  background: linear-gradient(100deg, var(--sunk) 30%, var(--line-2) 50%, var(--sunk) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.25s linear infinite;
  border-radius: 8px;
}
.skel-art { flex: 0 0 46px; height: 46px; border-radius: 14px; }
.skel-lines { flex: 1; display: grid; gap: 7px; }
.skel-line { height: 12px; }
.skel-line.short { width: 45%; }
.skel-price { flex: 0 0 54px; height: 17px; }

/* ============================================================== bottom sheet */
.sheet-veil {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(3px);
  animation: fade .2s var(--ease);
}
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 71;
  max-height: 88vh;
  overflow-y: auto;
  padding: 8px 16px calc(18px + var(--safe-b));
  border-start-start-radius: var(--r-lg);
  border-start-end-radius: var(--r-lg);
  background: var(--surface);
  border-top: 1px solid var(--line-2);
  box-shadow: 0 -22px 50px -18px rgba(0,0,0,.9);
  animation: slide-up .3s var(--ease);
}
.sheet-grip {
  display: block;
  width: 42px; height: 5px;
  margin: 4px auto 12px;
  padding: 0;
  border: 0; border-radius: 999px;
  background: var(--line-2);
  cursor: pointer;
  transition: background .18s;
}
.sheet-title { font-size: 17px; font-weight: 800; line-height: 1.45; margin: 0 0 10px;
                color: var(--fg); }
.sheet-body { display: grid; gap: 2px; }

/* ============================================================== tab bar */
.tabs {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid var(--line);
}

/* The moving highlight behind the active tab. One element that slides, rather than four that
   fade: the movement is what tells you which way you went.
   THE DIVISOR IS THE NUMBER OF TABS, and it is the only thing here that has to change when a tab is
   added - tabTo()'s arithmetic is written in terms of the pill's OWN width, so i * 100% + 24i + 12
   lands 12px inside tab i whatever that width turns out to be. It was 3; the Support tab made it 4. */
.tabs-pill {
  position: absolute;
  top: 7px;
  left: 0;
  width: calc(100% / 4 - 24px);
  height: calc(var(--tab-h) - 14px);
  border-radius: 15px;
  background: var(--tint);
  border: 1px solid var(--tint-2);
  transition: transform .32s var(--spring);
  pointer-events: none;
}

.tab {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  gap: 1px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  padding: 8px 0;
  transition: color .2s;
}
.tab-ico { font-size: 21px; line-height: 1.1; transition: transform .3s var(--spring); }
/* NOWRAP, because the bar has a fixed height that the page's top padding is measured against.
   'បានទិញហើយ' is long enough to wrap on a narrow phone, and a label on two lines would grow the bar
   past --tab-h and be clipped by it. */
/* Ellipsis rather than overlap. With four tabs on a narrow phone there is about 80px each, and
   'បានទិញហើយ' is close to that: if it ever does not fit it has to be cut, not printed over its
   neighbour. */
.tab-txt {
  white-space: nowrap; font-size: 11.5px; line-height: 1.4;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.tab[aria-current="page"] { color: var(--brand-dim); }
.tab[aria-current="page"] .tab-ico { transform: translateY(-1px) scale(1.16); }

/* ============================================================== emoji motion
   Assigned in JS by hashing the emoji, so one product always moves the same way - a list that
   reshuffles its own animations on every draw reads as broken rather than lively. */
.e-float  { animation: float  4.5s ease-in-out infinite; }
.e-bounce { animation: bounce 2.6s ease-in-out infinite; }
.e-wiggle { animation: wiggle 3.4s ease-in-out infinite; }
.e-pulse  { animation: pulse  2.9s ease-in-out infinite; }
.e-swing  { animation: swing  4.2s ease-in-out infinite; }

@keyframes float  { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-4.5px) } }
@keyframes bounce { 0%,72%,100% { transform: translateY(0) scale(1) }
                    82% { transform: translateY(-6px) scale(1.07) }
                    90% { transform: translateY(0) scale(.95) } }
@keyframes wiggle { 0%,68%,100% { transform: rotate(0) } 76% { transform: rotate(-11deg) }
                    84% { transform: rotate(9deg) } 92% { transform: rotate(-4deg) } }
@keyframes pulse  { 0%,100% { transform: scale(1) } 50% { transform: scale(1.11) } }
@keyframes swing  { 0%,100% { transform: rotate(-6deg) } 50% { transform: rotate(6deg) } }

@keyframes spin    { to { transform: rotate(360deg) } }
@keyframes shimmer { to { background-position: -220% 0 } }
@keyframes sheen   { 0%,100% { transform: translateX(-22%) } 50% { transform: translateX(22%) } }
@keyframes breathe { 0%,100% { opacity: 1 } 50% { opacity: .45 } }
@keyframes draw    { to { stroke-dashoffset: 0 } }
@keyframes fade    { from { opacity: 0 } }
@keyframes enter   { from { opacity: 0; transform: translateY(7px) } }
@keyframes rise    { from { opacity: 0; transform: translateY(11px) } }
@keyframes pop     { from { opacity: 0; transform: scale(.72) } }
@keyframes bump    { 0%,100% { transform: scale(1) } 40% { transform: scale(1.13) } }
@keyframes slide-up { from { transform: translateY(100%) } }

/* ============================================================== hover: things lift
   ONLY WHERE THERE IS A POINTER TO HOVER WITH. This whole section is behind (hover: hover) and
   (pointer: fine) on purpose. A phone reports itself as hovering the last thing it touched, so
   :hover sticks after a tap: the card you just opened stays lit when you come back to the list, and
   nothing you do clears it except tapping something else. Telegram Desktop and Telegram Web have a
   real mouse and get the lift; a phone keeps the press feedback it already had.

   :not(:active) ON EVERYTHING THAT ALSO HAS A PRESS. These rules come after the :active ones in the
   file, so without it a lifted button would stay lifted while being clicked and the press would
   never show. Excluded rather than reordered, because the order that matters here is the one a
   reader follows - press feedback beside the thing it presses. */
@media (hover: hover) and (pointer: fine) {
  /* The product row: up two pixels, a brighter edge, a deeper shadow, and the sheen fades in. */
  .tile:hover {
    transform: translateY(-2px);
    border-color: rgba(160,210,255,.34);
    box-shadow: 0 20px 38px -24px rgba(0,0,0,1),
                0 0 0 1px rgba(150,205,255,.10),
                inset 0 1px 0 rgba(255,255,255,.13);
  }
  .tile:hover::after { opacity: 1; }
  /* A sold-out row lifts too - it is still a card worth opening - but in its own colour. */
  .tile.gone:hover { border-color: rgba(255,120,112,.42); }

  /* Anything amber lifts into its own glow. */
  .btn:hover:not(:active):not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px -14px rgba(249,115,22,.7);
  }
  .btn.ghost:hover:not(:active):not(:disabled),
  .btn.line:hover:not(:active):not(:disabled) {
    background: var(--surface-3);
    border-color: var(--line-2);
    box-shadow: 0 14px 30px -20px rgba(0,0,0,.95);
  }
  .cash:hover:not(:active) {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 14px 28px -12px rgba(249,115,22,.7);
  }

  /* Chips and rows: the same idea, smaller. */
  .filter:hover:not(:active) {
    transform: translateY(-1px);
    border-color: var(--line-2);
    background: var(--surface-3);
  }
  .filter[aria-pressed="true"]:hover:not(:active) {
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    border-color: transparent;
    box-shadow: 0 14px 28px -12px rgba(249,115,22,.7);
  }
  .navrow:hover:not(:active) {
    transform: translateY(-1px);
    background: var(--surface-3);
    border-color: var(--line-2);
    box-shadow: 0 14px 28px -22px rgba(0,0,0,.95);
  }
  .navrow:hover:not(:active) .navrow-ico { background: var(--tint-2); }
  .chip-back:hover:not(:active),
  .step-btn:hover:not(:active):not(:disabled) {
    transform: translateY(-1px);
    background: var(--surface-3);
    border-color: var(--line-2);
  }
  .licence:hover { border-color: var(--line-2); }
  /* Its own hover, or the grey one above would win on specificity and take the green edge off. */
  .licence.delivered:hover { border-color: var(--mint-3); }
  /* The two tinted buttons deepen in their own colour instead of going grey like .ghost and .line. */
  .btn.ok:hover:not(:active):not(:disabled)  { background: rgba(34,197,94,.24); }
  .btn.bad:hover:not(:active):not(:disabled) { background: rgba(244,84,76,.26); }
  .licence.delivered .btn.ok:hover:not(:active):not(:disabled) { background: rgba(34,197,94,.32); }

  /* The pin comes out of grey when the pointer is anywhere on the row, so it is discoverable without
     being decoration on twenty-two rows at once. */
  .tile:hover .pin { opacity: 1; border-color: rgba(255, 255, 255, .22); }
  .pin:hover:not(:active) { opacity: 1; filter: none; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); transform: scale(1.1); }
  .pin[aria-pressed="true"]:hover:not(:active) { background: var(--tint-2); border-color: var(--brand-dim); }

  /* The tab bar nudges its icon rather than the whole tab. The row is the floor of the app, and
     a floor that moves is unsettling in a way a card that moves is not. */
  .tab:hover { color: var(--fg); }
  .tab:hover .tab-ico { transform: translateY(-2px) scale(1.1); }
  .tab[aria-current="page"]:hover { color: var(--brand-dim); }
  .tab[aria-current="page"]:hover .tab-ico { transform: translateY(-3px) scale(1.2); }

  .sheet-grip:hover { background: var(--dim); }
}

.aba-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  margin: 9px 0;
  display: grid;
  gap: 10px;
  transition: border-color .2s;
}
.aba-box:hover { border-color: var(--line-2); }
.aba-box code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
}

/* ============================================================== upload zone */
.upload-zone {
  border: 2px dashed var(--line-2);
  border-radius: var(--r);
  padding: 18px 14px;
  text-align: center;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0;
  user-select: none;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--brand-dim);
  background: var(--surface-2);
}
.upload-zone.has-file {
  border-color: var(--ok);
  background: var(--mint);
}
.upload-ico {
  font-size: 26px;
  line-height: 1;
}
.upload-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
}
.upload-sub {
  font-size: 11px;
  color: var(--dim);
}
.upload-preview {
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px;
}
.upload-preview img {
  display: block;
  max-height: 200px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.upload-file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}
.upload-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================== SHOPPING CART */

.chip-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s ease, background-color .15s ease;
}
.chip-cart:active {
  transform: scale(0.92);
}
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--brand);
  color: var(--brand-fg);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.35);
}
.cart-badge[hidden],
[hidden] {
  display: none !important;
}

/* Floating cart-bar disabled to prevent obstructing action buttons */
.cart-bar {
  display: none !important;
}
.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.cart-bar-icon {
  font-size: 20px;
}
.cart-bar-count {
  background: var(--brand);
  color: var(--brand-fg);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}
.cart-bar-sep {
  color: var(--dim);
}
.cart-bar-total {
  color: var(--brand);
  font-weight: 700;
  font-size: 15px;
}
.cart-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}
.cart-bar-arr {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* Inside Cart Sheet */
.cart-sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cart-clear-btn {
  background: transparent;
  border: none;
  color: var(--danger, #ff4757);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  max-height: 46vh;
  overflow-y: auto;
  padding-right: 2px;
}
.cart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.cart-card-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.cart-card-art {
  position: relative;
  overflow: hidden;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.cart-card-emoji {
  display: block;
  line-height: 1;
  user-select: none;
}
.cart-card-text {
  flex: 1;
  min-width: 0;
}
.cart-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-card-sub {
  font-size: 12px;
  color: var(--dim);
  margin-top: 2px;
}
.cart-del-btn {
  background: transparent;
  border: none;
  color: var(--dim);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 6px;
  transition: color .15s ease;
}
.cart-del-btn:hover {
  color: var(--danger, #ff4757);
}
.cart-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
}
.cart-stepper {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.cart-step-btn {
  width: 32px;
  height: 30px;
  background: transparent;
  border: none;
  color: var(--fg);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .15s ease;
}
.cart-step-btn:active {
  background: rgba(255, 255, 255, 0.1);
}
.cart-step-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.cart-step-val {
  min-width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
}
.cart-item-subtotal {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
}

.cart-checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.pick-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  align-items: stretch;
  flex-wrap: wrap;
}
.pick-actions-row .cart-add-btn {
  flex: 1 1 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 10px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--brand);
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.pick-actions-row .cart-add-btn:active {
  transform: scale(0.97);
  background: rgba(245, 166, 35, 0.12);
  border-color: var(--brand);
}
.pick-actions-row .btn.primary {
  flex: 1.3 1 150px;
  margin-top: 0;
  padding: 14px 12px;
  font-size: 15px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Sequential order receipts for cart */
.order-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 10px;
  color: var(--fg);
  line-height: 1.4;
}
.order-seq-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: var(--brand-fg);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

/* ============================================================== website auth & account linking */
.auth-wrap {
  max-width: 440px;
  margin: 10px auto 32px;
  padding: 0 2px;
}
.auth-hero {
  text-align: center;
  padding: 18px 14px 16px;
}
.auth-hero-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 6px;
}
.auth-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.auth-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px -8px rgba(0, 149, 255, .52), 0 0 0 2px rgba(249, 115, 22, .35);
}
.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.auth-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--fg);
}
.auth-sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--dim);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 18px 16px 20px;
  box-shadow: var(--lift);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.auth-tab {
  padding: 10px 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.auth-tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--brand-fg);
  box-shadow: var(--glow);
}
.auth-field {
  margin-bottom: 12px;
}
.auth-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dim);
  margin-bottom: 5px;
  line-height: 1.45;
}
.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--fg);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.45;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--tint);
}
.auth-input::placeholder {
  color: var(--dim);
  opacity: .75;
}
.auth-hint {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--brand-dim);
}
.auth-err {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--out);
  border: 1px solid var(--out-2);
  color: #ffd0ce;
  font-size: 13px;
  line-height: 1.5;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  color: var(--dim);
  font-size: 12.5px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-2);
}
.auth-widget-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  margin-bottom: 10px;
}
.auth-tg-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border: 1px solid rgba(42, 171, 238, 0.45);
  border-radius: 14px;
  background: linear-gradient(135deg, #229ED9, #1b87bd);
  color: #ffffff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
  box-shadow: 0 8px 22px -12px rgba(34, 158, 217, 0.65);
  transition: transform .14s ease, filter .14s ease;
}
.auth-tg-btn:active {
  transform: scale(0.98);
}
.auth-tg-wait {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--ice);
  border: 1px solid var(--ice-2);
  text-align: center;
}
.auth-tg-wait-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 6px;
  line-height: 1.45;
}
.auth-tg-wait-sub {
  font-size: 12.5px;
  color: var(--dim);
  margin: 0 0 10px;
  line-height: 1.5;
}
.auth-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-dim);
  margin: 4px 0 10px;
  cursor: pointer;
}
.auth-guest-row {
  margin-top: 14px;
  text-align: center;
}
.auth-guest-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
}
.guest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--tint);
  border: 1px solid var(--tint-2);
}
.guest-bar-txt {
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg);
}
.guest-bar-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--brand-fg);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.invite-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  margin-top: 8px;
}
.invite-code-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-dim);
  word-break: break-all;
}
.btn-logout {
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--out-2);
  background: var(--out);
  color: #ffb8b5;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
}
body.auth-screen-open #tabs,
body.auth-screen-open #top,
body.auth-screen-open #cart-bar {
  display: none !important;
}
body.auth-screen-open main#view {
  padding-top: 16px !important;
  padding-bottom: 32px !important;
}

/* ============================================================== website light theme (toggled via Dark/Light button; never affects Mini App) */
html[data-theme="light"] {
  --bg:        #f4f5f8;
  --surface:   #ffffff;
  --surface-2: #f1f3f7;
  --surface-3: #e5e8f0;
  --fg:        #111827;
  --dim:       #5b6375;

  --brand:     #f97316;
  --brand-2:   #f59e0b;
  --brand-fg:  #17120a;
  --brand-dim: #c2410c;

  --ok:     #16a34a;
  --warn:   #d97706;
  --danger: #dc2626;

  --bg-glass: rgba(255, 255, 255, .92);

  --line:   rgba(15, 23, 42, .085);
  --line-2: rgba(15, 23, 42, .15);
  --sunk:   rgba(15, 23, 42, .04);
  --tint:   rgba(249, 115, 22, .12);
  --tint-2: rgba(249, 115, 22, .26);
  --out:    rgba(220, 38, 38, .10);
  --out-2:  rgba(220, 38, 38, .28);
  --ice:    rgba(37, 99, 235, .10);
  --ice-2:  rgba(37, 99, 235, .24);
  --ice-3:  rgba(37, 99, 235, .16);
  --mint:   rgba(22, 163, 74, .11);
  --mint-2: rgba(22, 163, 74, .32);
  --mint-3: rgba(22, 163, 74, .50);

  --lift: 0 10px 26px -16px rgba(15, 23, 42, .18);
  --glow: 0 8px 20px -10px rgba(249, 115, 22, .42);
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(85% 65% at 8% 0%, rgba(249, 115, 22, .10), transparent 62%),
    radial-gradient(70% 55% at 94% 4%, rgba(245, 165, 36, .08), transparent 60%);
}
html[data-theme="light"] .lang-menu {
  background: #ffffff;
  border-color: rgba(15, 23, 42, .14);
  box-shadow: 0 18px 42px -12px rgba(15, 23, 42, .22);
}
html[data-theme="light"] .pcard-num {
  background: rgba(255, 255, 255, .90);
  border-color: rgba(15, 23, 42, .14);
  color: #111827;
}
html[data-theme="light"] .pcard.pinned .pcard-num {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: var(--brand-fg);
}
html[data-theme="light"] .pcard-pin {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(15, 23, 42, .14);
}
html[data-theme="light"] .pcard-badge.folder {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(37, 99, 235, .28);
  color: #1d4ed8;
}
html[data-theme="light"] .hrow-tag.folder {
  background: rgba(37, 99, 235, .10);
  color: #1d4ed8;
}
html[data-theme="light"] .pcard-add.in-cart,
html[data-theme="light"] .hrow-add.in-cart {
  color: #15803d;
}
html[data-theme="light"] .hero-cover {
  background: #eef0f5;
}
html[data-theme="light"] .licence.delivered code,
html[data-theme="light"] .cred,
html[data-theme="light"] .cred.otp {
  background: #f1f3f7;
}
html[data-theme="light"] .auth-err {
  color: #b91c1c;
}
html[data-theme="light"] .sheet {
  background: #ffffff;
  box-shadow: 0 -18px 48px -12px rgba(15, 23, 42, .22);
}
html[data-theme="light"] .tabs {
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, .22);
}
html[data-theme="light"] .pcard-foot {
  background: rgba(15, 23, 42, .018);
}

/* ============================================================== website sidebar, top header, theme toggle & list cart */
.web-sidebar {
  display: none;
}
.web-page-head {
  display: none;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.web-page-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dark / Light Theme Toggle Button (Website mode only) */
.chip-theme {
  display: none;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--fg);
  cursor: pointer;
  transition: transform .15s var(--spring), border-color .15s ease, background .15s ease, color .15s ease;
}
body.web-mode .chip-theme {
  display: inline-grid;
  place-items: center;
}
.chip-theme:hover {
  border-color: var(--brand);
  background: var(--surface-3);
  color: var(--brand-dim);
}
.chip-theme:active {
  transform: scale(0.92);
}
.theme-ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Dark mode shows Sun (click for Light); Light mode shows Moon (click for Dark) */
.theme-moon { display: none; }
.theme-sun { display: block; }
html[data-theme="light"] .theme-sun { display: none; }
html[data-theme="light"] .theme-moon { display: block; }

/* In Website mode, Cart moves out of the top header to right above the Product list! */
body.web-mode #nav-cart {
  display: none !important;
}

/* Product-list Cart Button (sits right above the product list in Shop & Folder!) */
.head-end-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.list-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s var(--spring), border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.list-cart-btn:hover {
  border-color: var(--brand);
  background: var(--surface-3);
}
.list-cart-btn:active {
  transform: scale(0.94);
}
.list-cart-btn.has-items {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: var(--brand-fg);
  box-shadow: var(--glow);
}
.list-cart-ico {
  font-size: 15px;
  line-height: 1;
}
.list-cart-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--fg);
  font-size: 11.5px;
  font-weight: 850;
  line-height: 18px;
  text-align: center;
}
.list-cart-btn.has-items .list-cart-count {
  background: rgba(23, 18, 10, .18);
  border-color: transparent;
  color: var(--brand-fg);
}
.list-cart-total {
  font-size: 12.5px;
  font-weight: 800;
  opacity: .92;
}
.list-cart-btn.bump {
  animation: bump .42s var(--spring);
}

/* Inline Language Dropdown Popover (no separate sheet / modal!) */
.lang-wrap {
  position: relative;
  flex: 0 0 auto;
}
.chip-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s var(--spring), border-color .15s ease, background .15s ease;
}
.chip-lang:hover {
  border-color: var(--brand);
  background: var(--surface-3);
}
.chip-lang:active {
  transform: scale(0.94);
}
.chip-lang .lang-ico {
  font-size: 14px;
  line-height: 1;
}
.chip-lang .lang-code {
  line-height: 1;
}
.chip-lang .lang-name {
  display: none;
  line-height: 1.2;
}
@media (min-width: 640px) {
  body.web-mode .chip-lang .lang-code { display: none; }
  body.web-mode .chip-lang .lang-name { display: inline; }
}
.chip-lang .lang-caret {
  font-size: 10px;
  opacity: .75;
  line-height: 1;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 95;
  min-width: 196px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 6px;
  border-radius: 15px;
  background: #17171f;
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 44px -10px rgba(0, 0, 0, .92);
  display: grid;
  gap: 3px;
  animation: fade .14s var(--ease);
}
.lang-menu[hidden] {
  display: none !important;
}
.lang-opt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.lang-opt:hover {
  background: var(--surface-3);
}
.lang-opt.active {
  background: var(--tint);
  color: var(--brand-dim);
  font-weight: 750;
}

/* Mobile & Tablet Website container */
body.web-mode .top-row,
body.web-mode main#view {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}
body.web-mode .tabs {
  max-width: 560px;
  left: 50%;
  right: auto;
  width: calc(100% - 24px);
  transform: translateX(-50%);
  bottom: calc(var(--safe-b) + 10px);
  border-radius: 20px;
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 36px -12px rgba(0, 0, 0, .85);
}

/* StoreBat-inspired Desktop Sidebar + Clean Top Bar in Ai Store KH Amber Style (>= 900px) */
@media (min-width: 900px) {
  body.web-mode:not(.auth-screen-open) {
    --side-w: 244px;
    padding-bottom: 24px;
  }
  body.web-mode:not(.auth-screen-open) .web-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--side-w);
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 12px 14px;
    background:
      linear-gradient(180deg, rgba(249, 115, 22, .08), transparent 22%),
      var(--surface);
    border-right: 1px solid var(--line);
    overflow: hidden;
  }
  body.web-mode:not(.auth-screen-open) .top {
    left: var(--side-w);
    padding: 11px 24px;
  }
  body.web-mode:not(.auth-screen-open) .top-row {
    max-width: none;
    margin: 0;
  }
  body.web-mode:not(.auth-screen-open) .top .brand {
    display: none;
  }
  body.web-mode:not(.auth-screen-open) .web-page-head {
    display: flex;
  }
  body.web-mode:not(.auth-screen-open) main#view {
    margin-left: var(--side-w);
    margin-right: 0;
    max-width: none;
    padding: 18px 24px 40px;
  }
  body.web-mode .tabs {
    display: none;
  }
  body.web-mode:not(.auth-screen-open) .folder-bar {
    display: none;
  }
}

/* Sidebar internals */
.wside-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 6px 8px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}
.wside-brand:hover {
  background: var(--surface-2);
}
.wside-logo {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 6px 18px -6px rgba(0, 149, 255, .55), 0 0 0 1.5px rgba(249, 115, 22, .35);
}
.wside-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.banner-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.banner-brand-logo {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .45), 0 0 0 2px rgba(255, 255, 255, .45);
}
.banner-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.banner-brand-txt {
  text-align: left;
  min-width: 0;
}
.wside-brand-txt {
  display: grid;
  min-width: 0;
  gap: 1px;
}
.wside-brand-name {
  font-size: 16px;
  font-weight: 850;
  line-height: 1.3;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wside-brand-sub {
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wside-nav {
  display: grid;
  gap: 4px;
}
.wside-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.wside-btn:hover {
  background: var(--surface-2);
  color: var(--fg);
}
.wside-btn[aria-current="page"] {
  background: var(--tint);
  border-color: var(--brand);
  color: var(--brand-dim);
}
.wside-ico {
  flex: 0 0 22px;
  text-align: center;
  font-size: 15px;
  line-height: 1;
}
.wside-link {
  text-decoration: none;
}
.wside-ext {
  margin-left: auto;
  font-size: 11.5px;
  opacity: .55;
  flex: 0 0 auto;
}
.api-key-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.api-key-code {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--fg);
  word-break: break-all;
}
.api-ep-list {
  display: grid;
  gap: 7px;
}
.api-ep {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
}
.api-ep-method {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--tint);
  color: var(--brand-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}
.api-ep-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--fg);
}
.api-ep-desc {
  margin-left: auto;
  color: var(--dim);
  font-size: 12px;
}
.wside-divider {
  height: 1px;
  background: var(--line);
  margin: 2px 4px;
}
.wside-folders-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wside-section-title {
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 750;
  color: var(--dim);
  line-height: 1.4;
}
.wside-folders {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 2px;
  scrollbar-width: thin;
}
.wside-folder {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.wside-folder:hover {
  background: var(--surface-2);
  color: var(--fg);
}
.wside-folder[aria-current="page"] {
  background: var(--tint);
  border-color: var(--brand);
  color: var(--brand-dim);
  font-weight: 750;
}
.wside-folder-ico {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: 13px;
  line-height: 1;
}
.wside-folder-ico img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wside-folder-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wside-folder-cnt {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--dim);
  opacity: .8;
}
.wside-foot {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.wside-user {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.wside-user:hover {
  border-color: var(--tint-2);
  background: var(--surface-3);
}
.wside-ava {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 12.5px;
}
.wside-user-txt {
  display: grid;
  min-width: 0;
  gap: 0;
}
.wside-user-name {
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wside-user-sub {
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quick Folder Pills above the Catalog (shown on Mobile/Tablet Website < 900px) */
.folder-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 7px;
  padding: 2px 0 8px;
  margin-bottom: 4px;
  scrollbar-width: none;
}
.folder-bar::-webkit-scrollbar {
  display: none;
}
.folder-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--dim);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.folder-pill:hover {
  color: var(--fg);
  border-color: var(--tint-2);
}
.folder-pill[aria-pressed="true"] {
  background: var(--tint);
  border-color: var(--brand);
  color: var(--brand-dim);
}

/* Storefront Toolbar: Filters + 3-Format Size Switcher (1:1 | 16:9 | Original) */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 12px;
}
.shop-toolbar .filters {
  margin: 0;
  flex: 1 1 auto;
}
.view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  flex-shrink: 0;
}
.view-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s var(--ease), color .16s var(--ease), transform .14s var(--spring);
}
.view-pill:hover {
  color: var(--fg);
}
.view-pill:active {
  transform: scale(0.95);
}
.view-pill[aria-pressed="true"] {
  background: linear-gradient(125deg, var(--brand), var(--brand-2));
  color: var(--brand-fg);
  box-shadow: var(--glow);
}

/* Visual Product Card Grid (1:1 = 5 per row on Desktop, 16:9 = Widescreen) */
.pgrid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
  align-items: stretch;
}
/* 1:1 Square Grid — 5 products per row on desktop! */
.pgrid.mode-1-1 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 560px) {
  .pgrid.mode-1-1 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}
@media (min-width: 800px) {
  .pgrid.mode-1-1 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
  }
}
@media (min-width: 1020px) {
  .pgrid.mode-1-1 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
  }
}
@media (min-width: 1180px) {
  .pgrid.mode-1-1 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }
}
/* 16:9 Widescreen Banner Grid */
.pgrid.mode-16-9 {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .pgrid.mode-16-9 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }
}
@media (min-width: 1020px) {
  .pgrid.mode-16-9 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--lift);
  transition: transform .18s var(--ease), border-color .18s ease, box-shadow .18s ease;
  animation: rise .24s var(--ease) both;
}
.pcard:hover {
  transform: translateY(-2px);
  border-color: var(--tint-2);
}
.pcard.pinned {
  border-color: var(--brand);
}
.pcard.gone {
  border-color: var(--out-2);
  opacity: .66;
}
.pcard-tap {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.pcard-media {
  position: relative;
  width: 100%;
  background:
    radial-gradient(75% 75% at 50% 25%, rgba(249, 115, 22, .16), transparent 72%),
    linear-gradient(155deg, var(--surface-3), var(--surface-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.pcard.gone .pcard-media {
  background:
    radial-gradient(75% 75% at 50% 25%, rgba(244, 84, 76, .18), transparent 72%),
    linear-gradient(155deg, var(--surface-3), var(--surface-2));
}
.pgrid.mode-1-1 .pcard-media {
  aspect-ratio: 1 / 1;
}
.pgrid.mode-16-9 .pcard-media {
  aspect-ratio: 16 / 9;
}
.pcard-emoji {
  font-size: 46px;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .45));
}
.pgrid.mode-16-9 .pcard-emoji {
  font-size: 54px;
}
.pcard-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* Sequence number badge (#1, #2, #3...) — updates dynamically when user pins products */
.pcard-num {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 8px;
  background: rgba(11, 11, 14, .78);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--fg);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  letter-spacing: -.01em;
}
.pcard.pinned .pcard-num {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: var(--brand-fg);
  box-shadow: var(--glow);
}
.pcard-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pcard-badge.hot {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: var(--brand-fg);
  box-shadow: var(--glow);
}
.pcard-badge.folder {
  background: rgba(15, 23, 42, .86);
  border: 1px solid var(--ice-2);
  color: #cfe7ff;
}
.pcard-pin {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(11, 11, 14, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
  cursor: pointer;
  filter: grayscale(.85);
  transition: transform .15s var(--spring), background .15s ease, border-color .15s ease;
}
.pcard-pin:active {
  transform: scale(.88);
}
.pcard.pinned .pcard-pin {
  filter: none;
  background: var(--tint-2);
  border-color: var(--brand);
}

.pcard-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 11px 8px;
  flex: 1;
}
.pcard-title {
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.42;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.84em;
}
.pcard-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--dim);
}
.pcard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 11px 10px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .015);
}
.pcard-prices {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}
.pcard-price {
  font-size: 15.5px;
  font-weight: 850;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.pcard-was {
  font-size: 11.5px;
  color: var(--dim);
  opacity: .75;
}
/* Direct Add to Cart button on every card front */
.pcard-add,
.hrow-add {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--tint-2);
  background: var(--tint);
  color: var(--brand-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .13s var(--spring), background .14s ease, border-color .14s ease, color .14s ease;
}
.pcard-add:hover,
.hrow-add:hover {
  background: linear-gradient(125deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: var(--brand-fg);
}
.pcard-add:active,
.hrow-add:active {
  transform: scale(0.93);
}
.pcard-add.in-cart,
.hrow-add.in-cart {
  background: var(--mint);
  border-color: var(--mint-2);
  color: #86efac;
}
.pcard-add.muted,
.hrow-add.muted {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--dim);
  cursor: default;
}

/* Original Size = Horizontal Row Layout (like the Purchased / Orders list!) */
.hlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.hrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: var(--lift);
  transition: border-color .16s ease, transform .16s var(--ease), background .16s ease;
  animation: rise .22s var(--ease) both;
}
.hrow:hover {
  border-color: var(--tint-2);
  background: var(--surface-2);
}
.hrow.pinned {
  border-color: var(--brand);
}
.hrow.gone {
  border-color: var(--out-2);
  opacity: .66;
}
.hrow-num {
  flex: 0 0 auto;
  min-width: 30px;
  height: 26px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
}
.hrow.pinned .hrow-num {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: var(--brand-fg);
}
.hrow-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.hrow-art {
  position: relative;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--surface-3), var(--surface-2));
  display: grid;
  place-items: center;
  font-size: 24px;
}
.hrow-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hrow-mid {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hrow-title {
  font-size: 14.5px;
  font-weight: 750;
  line-height: 1.4;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hrow-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--dim);
}
.hrow-tag {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}
.hrow-tag.hot {
  background: var(--tint);
  color: var(--brand-dim);
}
.hrow-tag.folder {
  background: var(--ice);
  color: #cfe7ff;
}
.hrow-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hrow-prices {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.hrow-pin {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 14px;
  cursor: pointer;
  filter: grayscale(.85);
}
.hrow.pinned .hrow-pin {
  filter: none;
  background: var(--tint-2);
  border-color: var(--brand);
}
@media (max-width: 560px) {
  .hrow {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hrow-right {
    width: 100%;
    justify-content: space-between;
    padding-top: 7px;
    border-top: 1px solid var(--line);
  }
  .hrow-prices {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }
}

/* Website Product Detail Full Visual Banner */
.hero-cover {
  width: 100%;
  margin: 0 auto 14px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #0f0f14;
  box-shadow: var(--lift);
}
.hero-cover.mode-1-1 {
  max-width: 420px;
  aspect-ratio: 1 / 1;
}
.hero-cover.mode-16-9 {
  max-width: 720px;
  aspect-ratio: 16 / 9;
}
.hero-cover.mode-original {
  max-width: 720px;
}
.hero-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-cover.mode-original img {
  height: auto;
  object-fit: contain;
}

/* Admin Art Uploader Ratio Controls */
.admin-ratio-card {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  display: grid;
  gap: 12px;
}
.admin-ratio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.admin-ratio-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.45;
}

/* Minimalist Website Footer */
.web-footer {
  margin-top: 32px;
  padding: 18px 14px 8px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--dim);
  font-size: 12.5px;
}
.web-footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
}
.web-footer-link {
  color: var(--brand-dim);
  text-decoration: none;
  font-weight: 650;
}
.web-footer-link:hover {
  text-decoration: underline;
}

/* ============================================================== reduced motion
   Everything above becomes still. Not shortened - still. Somebody who turned this on in their
   phone's accessibility settings has asked for no movement, and a faster wiggle is still a wiggle.

   The hover lifts above survive as STATES rather than as movement: the transition is cut to nothing,
   so the card is simply two pixels higher while the pointer is on it. That is a change of position,
   not an animation, and it is the part that tells somebody the row can be clicked. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  /* The two that carry meaning rather than decoration are kept, slowly: a spinner that does not
     spin looks like a frozen app, and the tick is the confirmation that money moved. */
  .spin { animation: spin 1.4s linear infinite !important; }
  .tick-ring, .tick-mark { stroke-dashoffset: 0 !important; }
}
