@import url("https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@700;900&family=Heebo:wght@400;500;700&display=swap");

/* ==========================================================================
   שש בש עם חברים — מערכת עיצוב (designer)
   Luxury onyx & champagne · RTL · mobile-first
   כל שמות המחלקות מהחוזה נשמרים. אין תלויות, אין תמונות חיצוניות.
   ========================================================================== */

/* ===== 1. Tokens ===== */
:root {
  /* בסיס (חוזה) */
  --bg: #0b0a09;
  --bg-2: #110f0d;
  --surface: #15120f;
  --surface-2: #1c1814;
  --surface-3: #24201b;
  --border: rgba(217,183,122,.16);
  --border-soft: rgba(217,183,122,.09);
  --border-strong: rgba(217,183,122,.28);
  --text: #f4ede1;
  --text-2: #d6cdbf;
  --muted: #a59a8a;
  --primary: #0f5c43;
  --primary-2: #1a7a5a;
  --gold: #d9b77a;
  --gold-2: #e6c98f;
  --gold-3: #f3dfb0;
  --gold-deep: #9c7a45;
  --success: #5cbf98;
  --danger: #c4505c;
  --warning: #d9a35a;
  --info: #9fb4c8;
  --garnet: #7a1f2b;
  --emerald-deep: #0f5c43;
  --felt: #0f5c43;
  --felt-2: #093a2b;
  --wood: #2a241d;
  --wood-2: #1a1612;
  --ink: #1b140a;            /* טקסט חרוט על זהב */

  /* זהב — רדיד אמיתי עם קו ספקולרי */
  --foil: linear-gradient(112deg, #9c7a45 0%, #c9a66b 14%, #e8cf9c 30%, #fff4d8 41%, #f3dfb0 46%, #d9b77a 58%, #b8955c 74%, #d9b77a 88%, #a8864f 100%);
  --foil-v: linear-gradient(180deg, #f9ebc8 0%, #f3dfb0 22%, #d9b77a 50%, #b8955c 76%, #d4b27a 100%);
  --metal-gold: var(--foil);
  --metal-gold-flat: linear-gradient(135deg, #f3dfb0 0%, #d9b77a 45%, #9c7a45 100%);
  --metal-silver: linear-gradient(135deg, #fbfbfa 0%, #d9dcdf 30%, #a7acb2 62%, #e6e8ea 100%);
  --metal-bronze: linear-gradient(135deg, #f2d2b4 0%, #c88d5e 35%, #8c5530 68%, #d7a27a 100%);
  --text-gold: linear-gradient(180deg, #fbf0d4 0%, #f3dfb0 28%, #d9b77a 62%, #b8955c 100%);
  --emerald: linear-gradient(180deg, #17795a 0%, #0f5c43 55%, #0b4734 100%);
  --ruby: linear-gradient(180deg, #8e2a36 0%, #7a1f2b 55%, #5e1620 100%);

  /* רדיוסים */
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 18px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --pill: 999px;

  /* ריווח */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px;

  /* עומק */
  --e1: 0 1px 2px rgba(0,0,0,.5), 0 4px 10px -4px rgba(0,0,0,.5);
  --e2: 0 2px 4px rgba(0,0,0,.35), 0 18px 40px -18px rgba(0,0,0,.85);
  --e3: 0 4px 10px rgba(0,0,0,.4), 0 30px 60px -24px rgba(0,0,0,.9);
  --e4: 0 12px 30px rgba(0,0,0,.55), 0 50px 100px -30px rgba(0,0,0,.95);
  --shadow: var(--e2);
  --hi: inset 0 1px 0 rgba(255,244,220,.06);
  --glow-gold: 0 0 0 1px rgba(217,183,122,.3), 0 8px 28px -6px rgba(217,183,122,.35);
  --glow-green: 0 8px 24px -8px rgba(15,92,67,.6);

  /* משטחים: לכה כהה + קו שמפניה */
  --lacquer: linear-gradient(180deg, #1a1713 0%, #13110e 55%, #0f0d0b 100%);
  --sheen: linear-gradient(180deg, rgba(255,244,220,.045) 0%, rgba(255,244,220,0) 38%);
  --hairline: linear-gradient(165deg, rgba(243,223,176,.5) 0%, rgba(217,183,122,.16) 28%, rgba(217,183,122,.07) 62%, rgba(217,183,122,.2) 100%);
  --hairline-strong: linear-gradient(165deg, #f3dfb0 0%, rgba(217,183,122,.5) 30%, rgba(156,122,69,.25) 65%, rgba(217,183,122,.55) 100%);
  --panel: var(--sheen), var(--lacquer);
  --panel-2: linear-gradient(180deg, #221e19 0%, #17140f 100%);
  --stroke: var(--hairline);
  --stroke-gold: var(--hairline-strong);
  --glass: rgba(14,12,10,.78);

  --font: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: "Frank Ruhl Libre", "Heebo", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-spring: cubic-bezier(.34,1.4,.64,1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --nav-h: 66px;
  --header-h: 60px;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 12'%3E%3Cdefs%3E%3ClinearGradient id='l' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23d9b77a' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23d9b77a'/%3E%3C/linearGradient%3E%3ClinearGradient id='r' x1='1' x2='0'%3E%3Cstop offset='0' stop-color='%23d9b77a' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23d9b77a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='5.5' width='66' height='1' fill='url(%23l)'/%3E%3Crect x='94' y='5.5' width='66' height='1' fill='url(%23r)'/%3E%3Cpath d='M80 1 L85 6 L80 11 L75 6Z' fill='none' stroke='%23e6c98f' stroke-width='1'/%3E%3Ccircle cx='70' cy='6' r='1.2' fill='%23d9b77a'/%3E%3Ccircle cx='90' cy='6' r='1.2' fill='%23d9b77a'/%3E%3C/svg%3E");
  --dice-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 90'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='.5' y2='1'%3E%3Cstop offset='0' stop-color='%23fffdf7'/%3E%3Cstop offset='1' stop-color='%23dcd0bb'/%3E%3C/linearGradient%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f3dfb0'/%3E%3Cstop offset='1' stop-color='%239c7a45'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cellipse cx='60' cy='83' rx='44' ry='5' fill='%23000' opacity='.5'/%3E%3Cg transform='rotate(-12 36 48)'%3E%3Crect x='12' y='24' width='48' height='48' rx='11' fill='url(%23a)' stroke='url(%23g)' stroke-width='2'/%3E%3Cg fill='%2316120e'%3E%3Ccircle cx='24' cy='36' r='4.3'/%3E%3Ccircle cx='36' cy='48' r='4.3'/%3E%3Ccircle cx='48' cy='60' r='4.3'/%3E%3C/g%3E%3C/g%3E%3Cg transform='rotate(10 84 44)'%3E%3Crect x='62' y='20' width='44' height='44' rx='10' fill='url(%23a)' stroke='url(%23g)' stroke-width='2'/%3E%3Cg fill='%2316120e'%3E%3Ccircle cx='73' cy='31' r='3.8'/%3E%3Ccircle cx='95' cy='31' r='3.8'/%3E%3Ccircle cx='84' cy='42' r='3.8'/%3E%3Ccircle cx='73' cy='53' r='3.8'/%3E%3Ccircle cx='95' cy='53' r='3.8'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===== 2. Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg);
  color-scheme: dark;
}
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(70% 42% at 50% -8%, rgba(217,183,122,.13) 0%, rgba(217,183,122,.04) 45%, transparent 75%),
    linear-gradient(180deg, #15120f 0%, #0e0d0b 38%, #0b0a09 100%);
  background-color: var(--bg);
  background-attachment: fixed;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* וינייט רך */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(140% 100% at 50% 30%, transparent 55%, rgba(0,0,0,.6) 100%);
}
/* רעש עדין מאוד */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--noise);
  opacity: .9;
}
img, svg { max-width: 100%; }
a { color: var(--gold-2); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-3); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; color: var(--text); }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
hr { border: 0; height: 1px; margin: var(--s6) 0; background: linear-gradient(90deg, transparent, rgba(217,183,122,.3), transparent); }
strong, b { font-weight: 700; }
code { font-family: ui-monospace, Consolas, monospace; }
:focus { outline: none; }
:focus-visible {
  outline: 1.5px solid var(--gold-3);
  outline-offset: 3px;
  border-radius: 8px;
}
::selection { background: rgba(217,183,122,.85); color: var(--ink); }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(217,183,122,.16); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(217,183,122,.3); }

/* ===== 3. Layout ===== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--s6) var(--s5) var(--s8);
}
.page-title {
  position: relative;
  margin: var(--s2) 0 var(--s6);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--text);
}
.page-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  margin-top: 14px;
  background: linear-gradient(270deg, var(--gold) 0%, rgba(217,183,122,.5) 50%, transparent 100%);
}
[dir="ltr"] .page-title::after { background: linear-gradient(90deg, var(--gold), transparent); }
.subtitle { color: var(--muted); margin: 0 0 var(--s6); font-size: 1rem; line-height: 1.6; }
.page-title + .subtitle { margin-top: calc(var(--s3) * -1); }
.muted { color: var(--muted); }
.grid, .grid-2, .grid-3 { display: grid; gap: var(--s5); grid-template-columns: 1fr; }
.stack { display: flex; flex-direction: column; gap: var(--s5); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.spacer { flex: 1 1 auto; }
main.container > section + section, section + section, section + section.hero { margin-top: var(--s12); }
main.container.stack > * { margin-top: 0; margin-bottom: 0; }
main.container.stack > .page-title { margin-bottom: var(--s1); }

/* ===== 4. Surfaces / cards ===== */
.card {
  position: relative;
  padding: var(--s6) var(--s5);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--sheen) padding-box, var(--lacquer) padding-box, var(--hairline) border-box;
  box-shadow: var(--e2);
  color: var(--text);
}
.card > :last-child { margin-bottom: 0; }
.card.stack > .muted:empty, .stack > .muted:empty { display: none; }
.grid-3 > .card h3::first-letter { color: var(--gold); }
.card h3 { margin-bottom: var(--s2); font-family: var(--font-display); font-size: 1.22rem; font-weight: 700; color: var(--text); }
.card-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin: 0 0 var(--s5);
  padding: 0 0 var(--s4);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.card-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(270deg, rgba(217,183,122,.4), rgba(217,183,122,.08) 60%, transparent);
}
[dir="ltr"] .card-header::after { background: linear-gradient(90deg, rgba(217,183,122,.4), transparent); }
.card-header h2, .card-header h3 { margin: 0; }
.card.stack > .card-header { margin-bottom: 0; }

/* ===== 5. Buttons ===== */
/* .btn בלי מחלקה נוספת = כפתור שקט (tertiary) */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 10px 24px;
  overflow: hidden;
  font: inherit;
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  border: 1px solid rgba(244,237,225,.1);
  border-radius: var(--radius-sm);
  background: rgba(244,237,225,.04);
  box-shadow: none;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease), background-color .25s, border-color .25s, color .25s, opacity .2s;
}
.btn:hover { color: var(--text); text-decoration: none; background-color: rgba(244,237,225,.07); border-color: rgba(244,237,225,.18); }
.btn:active, .btn:active:not(:disabled) { transform: translateY(1px); filter: brightness(.94); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--gold-3), 0 0 22px rgba(217,183,122,.35);
}

/* זהב — פעולה ראשית: רדיד מלא, טקסט חרוט */
.btn-gold, .btn-primary {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: .03em;
  border: 0;
  padding: 11px 25px;
  background: var(--foil);
  background-size: 140% 100%;
  background-position: 50% 0;
  text-shadow: 0 1px 0 rgba(255,246,222,.55), 0 -1px 0 rgba(90,64,26,.22);
  box-shadow:
    inset 0 1px 0 rgba(255,250,235,.85),
    inset 0 -1px 0 rgba(90,64,26,.5),
    inset 0 0 0 1px rgba(156,122,69,.45),
    0 1px 2px rgba(0,0,0,.5),
    0 12px 28px -12px rgba(217,183,122,.55);
}
.btn-gold:hover, .btn-primary:hover {
  color: var(--ink);
  background-color: transparent;
  background-position: 30% 0;
  filter: brightness(1.05) saturate(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255,250,235,.9),
    inset 0 -1px 0 rgba(90,64,26,.5),
    inset 0 0 0 1px rgba(156,122,69,.45),
    0 1px 2px rgba(0,0,0,.5),
    0 16px 34px -12px rgba(217,183,122,.7);
}
.btn-gold:active, .btn-primary:active, .btn-gold:active:not(:disabled), .btn-primary:active:not(:disabled) {
  filter: brightness(.95);
  box-shadow:
    inset 0 2px 4px rgba(90,64,26,.35),
    inset 0 0 0 1px rgba(156,122,69,.5),
    0 1px 1px rgba(0,0,0,.5),
    0 4px 12px -6px rgba(217,183,122,.45);
}
.btn-gold:focus-visible, .btn-primary:focus-visible {
  box-shadow: inset 0 1px 0 rgba(255,250,235,.85), 0 0 0 2px var(--bg), 0 0 0 3.5px var(--gold-3), 0 12px 28px -10px rgba(217,183,122,.6);
}
/* ברק איטי — פעם ב-6 שניות */
.btn-gold::after, .btn-primary::after {
  content: "";
  position: absolute;
  top: -2px; bottom: -2px;
  left: -50%;
  z-index: 1;
  width: 32%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0) 15%, rgba(255,252,240,.6) 50%, rgba(255,255,255,0) 85%, transparent 100%);
  transform: skewX(-20deg) translateX(0);
  animation: shimmer 6s cubic-bezier(.45,.05,.25,1) infinite;
  animation-delay: 1.5s;
  mix-blend-mode: soft-light;
}
.btn-primary::after { animation-delay: 3.5s; }
.btn-sm.btn-gold::after, .btn-sm.btn-primary::after { display: none; }

/* משני — קו זהב דק, טקסט זהב */
.btn-ghost {
  color: var(--gold-2);
  border: 1px solid rgba(217,183,122,.45);
  background: rgba(217,183,122,.02);
  box-shadow: inset 0 1px 0 rgba(243,223,176,.06);
}
.btn-ghost:hover { color: var(--gold-3); border-color: rgba(243,223,176,.75); background: rgba(217,183,122,.07); filter: none; }
.btn-ghost:active, .btn-ghost:active:not(:disabled) { background: rgba(217,183,122,.1); box-shadow: inset 0 2px 6px rgba(0,0,0,.4); }

.btn-danger {
  color: #f6dfe1;
  font-weight: 700;
  border: 1px solid rgba(196,80,92,.45);
  background: var(--ruby);
  box-shadow: inset 0 1px 0 rgba(255,210,215,.18), 0 10px 24px -12px rgba(122,31,43,.8);
}
.btn-danger:hover { color: #fff; border-color: rgba(220,110,120,.6); background: var(--ruby); filter: brightness(1.1); }
.btn-success {
  color: #eaf6f0;
  font-weight: 700;
  border: 1px solid rgba(92,191,152,.4);
  background: var(--emerald);
  box-shadow: inset 0 1px 0 rgba(200,255,230,.16), 0 10px 24px -12px rgba(15,92,67,.9);
}
.btn-success:hover { color: #fff; border-color: rgba(92,191,152,.6); background: var(--emerald); filter: brightness(1.1); }

.btn-sm {
  min-height: 40px;
  padding: 6px 16px;
  font-size: .88rem;
  border-radius: 12px;
}
.btn-sm.btn-gold, .btn-sm.btn-primary { padding: 6px 18px; }
.btn-lg {
  min-height: 56px;
  padding: 14px 34px;
  font-size: 1.06rem;
  border-radius: 16px;
}
.btn-lg.btn-gold, .btn-lg.btn-primary { padding: 15px 36px; letter-spacing: .04em; }
.btn-block { display: flex; width: 100%; }

.btn:disabled, .btn[disabled], .btn.disabled, .btn[aria-disabled="true"] {
  cursor: not-allowed;
  color: rgba(165,154,138,.7);
  text-shadow: none;
  border: 1px solid rgba(244,237,225,.08);
  background: rgba(244,237,225,.025);
  filter: none;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}
.btn:disabled::after, .btn[disabled]::after { display: none; }

/* מצב טעינה */
.btn.loading, .btn.is-loading, .btn[aria-busy="true"] { color: transparent !important; text-shadow: none; pointer-events: none; }
.btn.loading::before, .btn.is-loading::before, .btn[aria-busy="true"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid rgba(244,237,225,.25);
  border-top-color: var(--gold-3);
  animation: spin .8s linear infinite;
}
.btn-gold.loading::before, .btn-gold.is-loading::before, .btn-gold[aria-busy="true"]::before,
.btn-primary.loading::before, .btn-primary[aria-busy="true"]::before { border-color: rgba(27,20,10,.2); border-top-color: var(--ink); }

/* ===== 6. Forms ===== */
.field { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.field > label { font-weight: 500; font-size: .84rem; color: var(--muted); letter-spacing: .04em; }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, .select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  border: 1px solid rgba(217,183,122,.16);
  border-radius: var(--radius-sm);
  background: rgba(6,5,4,.55);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.5);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
textarea.input, .field textarea { min-height: 104px; line-height: 1.55; resize: vertical; }
.input::placeholder, .field textarea::placeholder { color: #6f665a; opacity: 1; }
.input:hover, .select:hover, .field textarea:hover { border-color: rgba(217,183,122,.3); }
.input:focus, .select:focus, .field textarea:focus, .input:focus-visible, .select:focus-visible {
  outline: none;
  border-color: rgba(243,223,176,.7);
  background-color: rgba(6,5,4,.7);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.5), 0 0 0 3px rgba(217,183,122,.14);
}
.input:disabled, .select:disabled, .field textarea:disabled { opacity: .5; cursor: not-allowed; }
.input[aria-invalid="true"], .input.invalid { border-color: rgba(196,80,92,.7); box-shadow: inset 0 1px 3px rgba(0,0,0,.5), 0 0 0 3px rgba(196,80,92,.15); }
input[type="search"].input::-webkit-search-cancel-button { filter: sepia(1) saturate(2) hue-rotate(5deg); }
.select {
  padding-inline-end: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23d9b77a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 18px center;
  background-size: 12px 8px;
}
[dir="ltr"] .select { background-position: right 18px center; }
.select option { background: #15120f; color: var(--text); }
.checkbox { display: inline-flex; align-items: center; gap: var(--s3); min-height: 44px; cursor: pointer; font-weight: 400; user-select: none; }
.checkbox input {
  appearance: none; -webkit-appearance: none;
  display: grid; place-content: center; flex: none;
  width: 22px; height: 22px; margin: 0;
  cursor: pointer;
  border: 1px solid rgba(217,183,122,.4);
  border-radius: 7px;
  background: rgba(6,5,4,.55);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.checkbox input::after { content: ""; width: 11px; height: 6px; margin-top: -3px; border: solid var(--ink); border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transition: transform .2s var(--ease-spring); }
.checkbox input:checked { background: var(--foil); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,250,235,.8), 0 0 14px rgba(217,183,122,.25); }
.checkbox input:checked::after { transform: rotate(-45deg) scale(1); }
.checkbox input:focus-visible { outline: 1.5px solid var(--gold-3); outline-offset: 3px; }

/* ===== 7. Tables ===== */
.table-wrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, #110f0d 30%, rgba(17,15,13,0)) left center / 32px 100% no-repeat local,
    linear-gradient(270deg, #110f0d 30%, rgba(17,15,13,0)) right center / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.6), transparent) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.6), transparent) right center / 14px 100% no-repeat scroll,
    rgba(8,7,6,.45);
}
.card > .table-wrap { margin: 0; border-color: transparent; border-radius: var(--radius-sm); }
.card > .table-wrap .table th { background: #13110e; }
.table { width: 100%; min-width: 520px; border-collapse: separate; border-spacing: 0; font-size: .94rem; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 15px 18px; text-align: start; white-space: nowrap; vertical-align: middle; border-bottom: 1px solid rgba(244,237,225,.055); }
.table th {
  position: sticky; top: 0; z-index: 1;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--muted);
  background: #13110e;
  border-bottom: 1px solid rgba(217,183,122,.18);
}
.table tbody tr { transition: background-color .2s; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(217,183,122,.04); }
.table td.num, .table th.num { font-variant-numeric: tabular-nums; }
.table td.empty { border: 0; }
.table .btn-danger, .list .btn-danger, .btn-sm.btn-danger {
  color: #e7a3aa;
  border-color: rgba(196,80,92,.4);
  background: rgba(122,31,43,.16);
  box-shadow: none;
}
.table .btn-danger:hover, .list .btn-danger:hover, .btn-sm.btn-danger:hover { background: rgba(122,31,43,.3); color: #fff; filter: none; }

/* ===== 8. Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 24px;
  padding: 2px 11px;
  font-size: .74rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .05em;
  white-space: nowrap;
  color: var(--text-2);
  border: 1px solid rgba(244,237,225,.14);
  border-radius: var(--pill);
  background: rgba(244,237,225,.03);
  font-variant-numeric: tabular-nums;
}
.badge-success { color: #8fd6b8; border-color: rgba(92,191,152,.35); background: rgba(15,92,67,.22); }
.badge-danger { color: #e7a3aa; border-color: rgba(196,80,92,.4); background: rgba(122,31,43,.2); }
.badge-gold { color: var(--gold-3); border-color: rgba(217,183,122,.5); background: rgba(217,183,122,.08); }
.badge-muted { color: var(--muted); border-color: rgba(165,154,138,.22); background: transparent; }
.badge-success::before, .badge-danger::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ===== 9. Tabs ===== */
.tabs {
  display: flex;
  gap: var(--s1);
  overflow-x: auto;
  padding: 5px;
  margin-bottom: var(--s5);
  border: 1px solid rgba(217,183,122,.14);
  border-radius: var(--radius);
  background: rgba(6,5,4,.5);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: 1 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px;
  padding: 8px 18px;
  font: inherit;
  font-size: .94rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  transition: color .25s, background-color .25s, border-color .25s, transform .12s;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab:active { transform: scale(.98); }
.tab.active {
  color: var(--gold-3);
  font-weight: 700;
  border-color: rgba(217,183,122,.42);
  background: linear-gradient(180deg, rgba(217,183,122,.14), rgba(217,183,122,.05));
  box-shadow: inset 0 1px 0 rgba(243,223,176,.12), 0 4px 14px -6px rgba(0,0,0,.8);
}
.tab:focus-visible { outline: 1.5px solid var(--gold-3); outline-offset: -3px; }

/* ===== 10. Stats ===== */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
.stat {
  position: relative;
  overflow: hidden;
  padding: var(--s5) var(--s3) var(--s4);
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--sheen) padding-box, var(--lacquer) padding-box, var(--hairline) border-box;
  box-shadow: var(--e2);
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--gold-2);
  background: var(--text-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-label { margin-top: 8px; font-size: .74rem; font-weight: 500; color: var(--muted); letter-spacing: .12em; }
.stats:has(> .stat:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
.card .stats { gap: var(--s2); }
.card .stat { padding: 12px 6px; border-radius: var(--radius-sm); box-shadow: none; background: rgba(6,5,4,.4) padding-box, linear-gradient(180deg, rgba(217,183,122,.2), rgba(217,183,122,.05)) border-box; }
.card .stat-value { font-size: 1.35rem; }
.card .stat-label { margin-top: 2px; font-size: .7rem; }

/* ===== 11. Modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: radial-gradient(80% 60% at 50% 40%, rgba(20,16,12,.6), rgba(4,3,3,.85));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fadeIn .25s var(--ease);
}
.modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 36px var(--s6) calc(var(--s6) + var(--safe-bottom));
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--sheen) padding-box, linear-gradient(180deg, #1b1814, #100e0c) padding-box, var(--hairline-strong) border-box;
  box-shadow: var(--e4);
  animation: sheetUp .38s var(--ease);
}
.modal::before {
  content: "";
  position: absolute;
  top: 12px; left: 50%;
  width: 40px; height: 4px;
  margin-left: -20px;
  border-radius: 4px;
  background: rgba(217,183,122,.3);
}
.modal-title { margin: 0 0 var(--s4); font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1.25; color: var(--text); }
.modal-body { margin-bottom: var(--s6); color: var(--text-2); }
.modal-body > :last-child { margin-bottom: 0; }
.modal-actions { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: flex-end; }
.modal-actions .btn { flex: 1 1 140px; }

/* ===== 12. Toasts ===== */
#toasts {
  position: fixed;
  z-index: 2000;
  top: calc(var(--s3) + var(--safe-top));
  left: var(--s3);
  right: var(--s3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  max-width: 440px;
  min-height: 56px;
  padding: 10px 18px;
  padding-inline-start: 12px;
  font-weight: 500;
  font-size: .95rem;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(28,24,20,.97), rgba(16,14,12,.97)) padding-box, var(--hairline) border-box;
  box-shadow: var(--e3);
  animation: toastIn .4s var(--ease) both;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .toast { background: linear-gradient(180deg, rgba(28,24,20,.86), rgba(16,14,12,.9)) padding-box, var(--hairline) border-box; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
}
.toast::before {
  content: "i";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-3);
  border: 1px solid rgba(217,183,122,.5);
  background: rgba(217,183,122,.08);
}
.toast.success::before { content: "\2713"; font-family: var(--font); color: #8fd6b8; border-color: rgba(92,191,152,.5); background: rgba(15,92,67,.3); }
.toast.error::before { content: "!"; color: #f0b3b9; border-color: rgba(196,80,92,.55); background: rgba(122,31,43,.3); }
.toast.hide { animation: toastOut .28s var(--ease) both; }

/* ===== 13. App header ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: calc(var(--header-h) + var(--safe-top));
  padding: calc(var(--s2) + var(--safe-top)) var(--s4) var(--s2);
  background: rgba(11,10,9,.94);
  box-shadow: 0 14px 34px -18px rgba(0,0,0,.9);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .app-header { background: rgba(11,10,9,.72); -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2); }
}
.app-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(217,183,122,.18) 18%, rgba(243,223,176,.55) 50%, rgba(217,183,122,.18) 82%, transparent 100%);
}
.app-header > .row { flex-wrap: nowrap; gap: var(--s2); }
.app-header .btn-sm { min-height: 36px; padding: 4px 14px; font-size: .84rem; border-radius: 11px; }
.app-header .btn-ghost.btn-sm { color: var(--muted); border-color: rgba(244,237,225,.12); background: transparent; }
.app-header .btn-ghost.btn-sm:hover { color: var(--gold-3); border-color: rgba(217,183,122,.45); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 700;
  color: var(--gold-2);
  text-decoration: none;
  white-space: nowrap;
}
.brand > span, .brand { overflow: hidden; text-overflow: ellipsis; }
.brand > span {
  padding-block: 2px;
  background: var(--text-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand:hover { text-decoration: none; color: var(--gold-3); }
.brand img, .brand svg {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.6), 0 0 18px -4px rgba(217,183,122,.35);
}
.nav {
  display: none;
  align-items: center;
  gap: var(--s1);
  margin-inline-start: var(--s6);
}
.nav a {
  position: relative;
  padding: 10px 14px;
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 10px;
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--text); background: rgba(244,237,225,.04); text-decoration: none; }
.nav a.active { color: var(--gold-3); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 3px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* דף נחיתה: nav עם כפתורי התחברות/הרשמה גם במובייל */
.app-header > .nav:has(.btn) { display: flex; margin-inline-start: auto; gap: var(--s2); }
.app-header > .nav:has(.btn) a:not(.btn) { padding: 8px 10px; }
.app-header > .nav:has(.btn) a:not(.btn)::after { display: none; }
.app-header > .nav:has(.btn) .btn { padding: 4px 18px; }
.nav a.btn-gold, .nav a.btn-primary, .nav a.btn-gold:hover, .nav a.btn-primary:hover { color: var(--ink); background-color: transparent; }
.nav a.btn-ghost { color: var(--gold-2); }
.app-header > .nav:has(.btn) ~ .music-btn { margin-inline-start: 0; }

/* HUD: משתמש + נקודות */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 38px;
  max-width: 170px;
  padding: 2px;
  padding-inline-end: 12px;
  overflow: hidden;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid rgba(244,237,225,.08);
  border-radius: var(--pill);
  background: transparent;
}
.user-chip .avatar { width: 32px; height: 32px; font-size: .88rem; }
.user-chip .user-name { overflow: hidden; text-overflow: ellipsis; }
.points-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 3px 5px;
  padding-inline-end: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.04rem;
  line-height: 1;
  color: var(--gold-2);
  white-space: nowrap;
  text-decoration: none;
  font-variant-numeric: tabular-nums lining-nums;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: linear-gradient(180deg, #15120f, #0c0b09) padding-box, var(--hairline-strong) border-box;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.9), 0 0 18px -8px rgba(217,183,122,.35);
  transition: transform .15s var(--ease), box-shadow .25s;
}
.points-chip:hover { color: var(--gold-3); text-decoration: none; box-shadow: 0 6px 18px -8px rgba(0,0,0,.9), 0 0 22px -6px rgba(217,183,122,.5); }
.points-chip:active { transform: scale(.97); }
/* מטבע */
.points-chip::before {
  content: "";
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 52%, rgba(90,64,26,.55) 54%, transparent 60%),
    var(--foil);
  box-shadow: inset 0 1px 0 rgba(255,250,235,.8), inset 0 -1px 2px rgba(90,64,26,.5), 0 1px 3px rgba(0,0,0,.6);
}
.points-chip [data-points], .points-chip > span:first-of-type {
  padding-block: 2px;
  background: var(--text-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.points-chip .muted { font-family: var(--font); font-size: .7rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); -webkit-text-fill-color: var(--muted); }

/* ===== 14. Bottom nav ===== */
#bottom-nav {
  position: fixed;
  z-index: 100;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding: 6px var(--s2) var(--safe-bottom);
  background: rgba(11,10,9,.96);
  box-shadow: 0 -14px 34px -14px rgba(0,0,0,.9);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #bottom-nav { background: rgba(11,10,9,.78); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2); }
}
#bottom-nav::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217,183,122,.45) 50%, transparent);
}
#bottom-nav a {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 2px;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: #8a8073;
  text-decoration: none;
  border-radius: 14px;
  transition: color .25s;
}
#bottom-nav a .icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 28px;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: var(--pill);
  filter: grayscale(1);
  opacity: .75;
  transition: background-color .25s var(--ease), filter .25s, opacity .25s, transform .25s var(--ease-spring);
}
#bottom-nav a svg { width: 22px; height: 22px; }
#bottom-nav a .label { white-space: nowrap; }
#bottom-nav a:hover { color: var(--text-2); text-decoration: none; }
#bottom-nav a:active .icon { transform: scale(.92); }
#bottom-nav a.active { color: var(--gold-3); }
#bottom-nav a.active .icon {
  filter: none;
  opacity: 1;
  color: var(--gold-2);
  background: rgba(217,183,122,.1);
  box-shadow: inset 0 0 0 1px rgba(217,183,122,.35);
}
#bottom-nav a.active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 22px; height: 2px;
  margin-left: -11px;
  border-radius: 0 0 2px 2px;
  background: var(--foil);
  box-shadow: 0 0 10px rgba(217,183,122,.6);
}
#bottom-nav:empty { display: none; }

/* ===== 15. Landing — luxury splash ===== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: var(--s2) 0 var(--s8);
  padding: var(--s12) var(--s5) var(--s10);
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(70% 55% at 50% 0%, rgba(217,183,122,.16), rgba(217,183,122,.03) 55%, transparent 80%) padding-box,
    radial-gradient(120% 70% at 50% 120%, rgba(0,0,0,.5), transparent 70%) padding-box,
    linear-gradient(180deg, #17140f 0%, #0f0d0b 60%, #0c0b09 100%) padding-box,
    var(--hairline-strong) border-box;
  box-shadow: var(--e3), inset 0 1px 0 rgba(255,244,220,.08);
}
/* לוגו עם הילה זהובה */
.hero::before {
  content: "";
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto var(--s6);
  border-radius: 24px;
  background: url("/assets/logo.svg") center / cover no-repeat;
  box-shadow: 0 18px 40px -10px rgba(0,0,0,.9), 0 0 0 1px rgba(243,223,176,.25), 0 0 60px 6px rgba(217,183,122,.2), 0 0 120px 20px rgba(217,183,122,.08);
  animation: float 8s ease-in-out infinite;
}
section.hero:last-child::before { width: 64px; height: 64px; border-radius: 18px; margin-bottom: var(--s5); }
section.hero:last-child { padding-top: var(--s10); padding-bottom: var(--s10); }
/* קרן אור איטית */
.hero::after {
  content: "";
  position: absolute;
  top: -50%; bottom: -50%;
  left: -40%;
  z-index: -1;
  width: 30%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(243,223,176,.035) 50%, transparent);
  transform: skewX(-18deg);
  animation: sweep 14s ease-in-out infinite;
}
.hero-title {
  margin: 0 auto var(--s5);
  max-width: 13em;
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fffaf0 0%, #f4ede1 45%, #e2c690 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: .06em;
}
.hero-title::after {
  content: "";
  display: block;
  width: 160px;
  height: 12px;
  margin: var(--s5) auto 0;
  background: var(--ornament) center / contain no-repeat;
}
.hero-sub {
  max-width: 32em;
  margin: 0 auto var(--s8);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-2);
  opacity: .9;
}
.hero .muted { color: var(--muted); margin: var(--s5) 0 0; font-size: .86rem; letter-spacing: .04em; }
.hero .muted:empty { display: none; }
.cta-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: var(--s3);
  max-width: 400px;
  margin: 0 auto;
}
.cta-row .btn { width: 100%; }

.feature-grid { display: grid; grid-template-columns: 1fr; gap: var(--s4); margin: var(--s4) 0; }
.feature {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: var(--s5);
  align-items: start;
  padding: var(--s6) var(--s5);
  text-align: start;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--sheen) padding-box, var(--lacquer) padding-box, var(--hairline) border-box;
  box-shadow: var(--e2);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.feature::before {
  content: "";
  grid-row: 1 / 3;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: #f4ede1;
  background-image: radial-gradient(circle, #16120e 0 4.5px, transparent 5px);
  background-repeat: no-repeat;
  box-shadow: inset 0 -3px 0 rgba(120,104,80,.25), inset 0 1px 0 #fff, 0 0 0 1.5px #c9a66b, 0 10px 22px -6px rgba(0,0,0,.8);
  transform: rotate(-5deg);
}
.feature:nth-child(4n+1)::before { background-image: radial-gradient(circle at 50% 50%, #7a1f2b 0 5.5px, transparent 6px); }
.feature:nth-child(4n+2)::before { background-image: radial-gradient(circle at 30% 30%, #16120e 0 4px, transparent 4.5px), radial-gradient(circle at 70% 70%, #16120e 0 4px, transparent 4.5px); }
.feature:nth-child(4n+3)::before { background-image: radial-gradient(circle at 27% 27%, #16120e 0 4px, transparent 4.5px), radial-gradient(circle at 50% 50%, #16120e 0 4px, transparent 4.5px), radial-gradient(circle at 73% 73%, #16120e 0 4px, transparent 4.5px); }
.feature:nth-child(4n+4)::before { background-image: radial-gradient(circle at 28% 28%, #16120e 0 4px, transparent 4.5px), radial-gradient(circle at 72% 28%, #16120e 0 4px, transparent 4.5px), radial-gradient(circle at 28% 72%, #16120e 0 4px, transparent 4.5px), radial-gradient(circle at 72% 72%, #16120e 0 4px, transparent 4.5px); }
.feature:nth-child(even)::before { transform: rotate(4deg); }
.feature h3 { grid-column: 2; margin: 2px 0 6px; font-family: var(--font-display); font-size: 1.24rem; font-weight: 700; color: var(--gold-3); }
.feature p { grid-column: 2; margin: 0; font-size: .94rem; line-height: 1.7; color: var(--text-2); opacity: .82; }

/* ===== 16. Lists, avatar, misc ===== */
.list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(6,5,4,.35);
}
.list:empty { display: none; }
.card .list { background: rgba(6,5,4,.3); }
.list-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 64px;
  padding: 12px var(--s4);
  color: var(--text);
  text-decoration: none;
  transition: background-color .2s;
}
.list-item + .list-item::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 72px;
  inset-inline-end: 0;
  height: 1px;
  background: rgba(244,237,225,.06);
}
.list-item > div { min-width: 0; }
.list-item strong { display: block; font-weight: 500; line-height: 1.35; }
.list-item .muted { font-size: .84rem; line-height: 1.4; }
a.list-item:hover, .list-item.clickable:hover, button.list-item:hover { background: rgba(217,183,122,.05); text-decoration: none; cursor: pointer; color: var(--text); }
a.list-item:active, .list-item.clickable:active { background: rgba(217,183,122,.08); }

.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px; height: 44px;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-3);
  border: 1px solid transparent;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #2a251f, #14110e 75%) padding-box, var(--hairline-strong) border-box;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.8);
}
.list-item:nth-child(3n+2) .avatar { color: #f4ede1; background: radial-gradient(circle at 50% 30%, #1d2a24, #0e1512 75%) padding-box, linear-gradient(165deg, rgba(92,191,152,.6), rgba(15,92,67,.3)) border-box; }
.list-item:nth-child(3n+3) .avatar { color: var(--ink); background: radial-gradient(circle at 50% 30%, #fffaf0, #e2d6c2 75%) padding-box, var(--hairline-strong) border-box; }

.code-box {
  display: block;
  padding: var(--s5) var(--s5);
  text-align: center;
  direction: ltr;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--gold-3);
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: radial-gradient(80% 100% at 50% 0%, rgba(217,183,122,.1), transparent 70%) padding-box, linear-gradient(180deg, #0f0d0b, #090807) padding-box, var(--hairline-strong) border-box;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.6);
}

/* מצב ריק */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: var(--s10) var(--s5);
  text-align: center;
  font-weight: 400;
  color: var(--text-2);
  border: 1px solid rgba(217,183,122,.1);
  border-radius: var(--radius-lg);
  background: radial-gradient(60% 60% at 50% 25%, rgba(217,183,122,.06), transparent 70%), rgba(6,5,4,.25);
}
.empty::before {
  content: "";
  display: block;
  width: 104px;
  height: 78px;
  margin-bottom: var(--s3);
  background: var(--dice-art) center / contain no-repeat;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.5));
  animation: float 7s ease-in-out infinite;
}
td.empty { display: table-cell; border: 0; background: none; padding: var(--s10) var(--s4); white-space: normal; }
td.empty::before { margin: 0 auto var(--s3); }

/* טוען — קובייה מתהפכת */
.loader {
  position: relative;
  width: 36px;
  height: 36px;
  margin: var(--s10) auto;
  border-radius: 9px;
  background:
    radial-gradient(circle at 28% 28%, #16120e 0 3px, transparent 3.5px),
    radial-gradient(circle at 50% 50%, #16120e 0 3px, transparent 3.5px),
    radial-gradient(circle at 72% 72%, #16120e 0 3px, transparent 3.5px),
    linear-gradient(180deg, #fffdf7, #ddd1bc);
  box-shadow: 0 0 0 1.5px #c9a66b, 0 10px 22px -6px rgba(0,0,0,.8), 0 0 30px rgba(217,183,122,.18);
  animation: tumble 1.3s var(--ease) infinite;
}

.announcement {
  position: relative;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  padding: 10px var(--s5);
  text-align: center;
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .03em;
  line-height: 1.45;
  color: var(--gold-3);
  background: linear-gradient(90deg, #0e0c0a, #1a1611 50%, #0e0c0a);
  border-bottom: 1px solid rgba(217,183,122,.28);
}
.announcement::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 10px rgba(217,183,122,.7);
  animation: pulse 2.6s ease-in-out infinite;
}

/* ===== 17. Page-specific polish (no markup changes) ===== */
/* פרופיל: יתרה — ספרה גדולה בסריף זהב */
.card.pf-balance {
  padding: var(--s10) var(--s5) var(--s8);
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(60% 75% at 50% 0%, rgba(217,183,122,.16), rgba(217,183,122,.03) 60%, transparent 85%) padding-box,
    var(--sheen) padding-box,
    linear-gradient(180deg, #19160f, #0e0c0a) padding-box,
    var(--hairline-strong) border-box;
  box-shadow: var(--e3);
}
.card.pf-balance::after {
  content: "";
  display: block;
  width: 140px;
  height: 12px;
  margin: var(--s4) auto 0;
  background: var(--ornament) center / contain no-repeat;
  opacity: .8;
}
.card.pf-balance .big {
  display: inline-block;
  margin: 10px 0 8px;
  padding: 0 .08em .04em;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--gold-2);
  background: var(--text-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 24px rgba(217,183,122,.22));
}
.card.pf-balance #pf-name { font-size: .8rem; font-weight: 500; letter-spacing: .16em; color: var(--muted); }
.card.pf-balance > .muted:last-of-type { font-size: .78rem; letter-spacing: .06em; }
.pf-redeem { align-items: stretch; gap: var(--s2); }
.pf-redeem .btn { flex: none; }
.pf-redeem .input { letter-spacing: .2em; }

/* טבלת מובילים: מדליות */
#lb-body .lb-rank { position: relative; width: 64px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
#lb-body tr:nth-child(-n+3) .lb-rank { font-size: 0; }
#lb-body tr:nth-child(-n+3) .lb-rank::after {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  color: #3a2a12;
  text-shadow: 0 1px 0 rgba(255,250,230,.6);
  border-radius: 50%;
  background: var(--foil);
  box-shadow: inset 0 0 0 1px rgba(255,248,226,.55), inset 0 0 0 4px rgba(156,122,69,.18), 0 0 0 1px rgba(90,64,26,.6), 0 6px 14px -4px rgba(0,0,0,.8), 0 0 18px -2px rgba(217,183,122,.4);
}
#lb-body tr:nth-child(1) .lb-rank::after { content: "1"; }
#lb-body tr:nth-child(2) .lb-rank::after { content: "2"; color: #2a2d31; text-shadow: 0 1px 0 rgba(255,255,255,.6); background: var(--metal-silver); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), inset 0 0 0 4px rgba(120,126,134,.18), 0 0 0 1px rgba(60,64,70,.6), 0 6px 14px -4px rgba(0,0,0,.8), 0 0 16px -4px rgba(220,225,232,.35); }
#lb-body tr:nth-child(3) .lb-rank::after { content: "3"; color: #33190a; text-shadow: 0 1px 0 rgba(255,230,210,.5); background: var(--metal-bronze); box-shadow: inset 0 0 0 1px rgba(255,225,200,.5), inset 0 0 0 4px rgba(120,70,40,.2), 0 0 0 1px rgba(70,36,16,.6), 0 6px 14px -4px rgba(0,0,0,.8), 0 0 16px -4px rgba(200,141,94,.35); }
#lb-body tr:nth-child(1) { background: linear-gradient(270deg, rgba(217,183,122,.12), rgba(217,183,122,0) 65%); }
#lb-body tr:nth-child(2) { background: linear-gradient(270deg, rgba(217,220,223,.06), rgba(217,220,223,0) 65%); }
#lb-body tr:nth-child(3) { background: linear-gradient(270deg, rgba(200,141,94,.07), rgba(200,141,94,0) 65%); }
#lb-body tr:nth-child(1) td:nth-child(2) { color: var(--gold-3); }
#lb-body td:nth-child(2) { font-weight: 500; width: 42%; }
#lb-body td:nth-child(2)::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 26px; height: 26px;
  margin-inline-end: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 40%, rgba(0,0,0,.14) 42%, transparent 46%), radial-gradient(circle at 40% 30%, #fffdf7, #e2d6c2 65%, #bfb19a);
  box-shadow: 0 3px 6px rgba(0,0,0,.6), 0 0 0 1px rgba(217,183,122,.35);
}
#lb-body tr:nth-child(even) td:nth-child(2)::before { background: radial-gradient(circle, transparent 40%, rgba(255,255,255,.07) 42%, transparent 46%), radial-gradient(circle at 40% 30%, #3a342d, #1a1714 65%, #0b0a09); box-shadow: 0 3px 6px rgba(0,0,0,.6), 0 0 0 1px rgba(217,183,122,.35); }
#lb-body td:nth-child(3) {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums lining-nums;
}
#lb-body td:nth-child(4), #lb-body td:nth-child(5) { color: var(--text-2); font-variant-numeric: tabular-nums; }
#lb-body tr.lb-me { background: linear-gradient(270deg, rgba(15,92,67,.28), rgba(15,92,67,.05)); outline: 0; box-shadow: inset 0 0 0 1px rgba(92,191,152,.5); }
#lb-body tr.lb-me td:nth-child(2) { color: #bfe9d6; }
#lb-body td.empty::before { display: block; }
#lb-body td.empty { font-weight: 400; }

/* פרופיל: טרנזקציות */
#pf-tx .pf-plus, #pf-tx .pf-minus { font-weight: 700; font-variant-numeric: tabular-nums; }
#pf-tx .pf-plus { color: var(--success); }
#pf-tx .pf-minus { color: #e08a93; }
#pf-tx td:nth-child(4) { font-variant-numeric: tabular-nums; color: var(--text-2); }

/* כרטיסי שחקנים (players.js) */
.pl-card { transition: transform .25s var(--ease), box-shadow .25s; }
.pl-card:hover { transform: translateY(-2px); box-shadow: var(--e3); }
.pl-card:active { transform: translateY(0) scale(.995); }

/* ===== 18. Animations ===== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes popIn { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { transform: translateY(-110%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(-50%); opacity: 0; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
/* ברק: עובר ב-~1.2 שניות ואז נח — מחזור של 6 שניות */
@keyframes shimmer { 0% { transform: skewX(-20deg) translateX(0); } 20%, 100% { transform: skewX(-20deg) translateX(560%); } }
@keyframes sweep { 0% { transform: skewX(-18deg) translateX(0); } 50%, 100% { transform: skewX(-18deg) translateX(520%); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes tumble { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(.88); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.card, .feature, .stat, .hero { animation: rise .55s var(--ease) both; }
.hero { animation-name: popIn; }
.stats > .stat:nth-child(2), .feature-grid > .feature:nth-child(2), .grid > .card:nth-child(2), .grid-2 > .card:nth-child(2), .grid-3 > .card:nth-child(2) { animation-delay: .06s; }
.stats > .stat:nth-child(3), .feature-grid > .feature:nth-child(3), .grid-3 > .card:nth-child(3) { animation-delay: .12s; }
.stats > .stat:nth-child(4), .feature-grid > .feature:nth-child(4) { animation-delay: .18s; }
.points-chip.bump { animation: pop .5s var(--ease-spring); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .hero::after, .btn-gold::after, .btn-primary::after { animation: none !important; display: none; }
}

/* ===== 19. Responsive ===== */
@media (max-width: 599px) {
  .app-header { gap: var(--s2); padding-left: var(--s3); padding-right: var(--s3); }
  .user-chip { padding: 0; max-width: none; border-color: transparent; }
  .user-chip .user-name { display: none; }
  .points-chip { min-height: 36px; padding-inline-end: 12px; font-size: 1rem; }
  .points-chip::before { width: 24px; height: 24px; }
  .points-chip .muted { display: none; }
  .stats { gap: var(--s3); }
  .stat { padding: var(--s4) 8px 14px; border-radius: var(--radius); }
  .stat-value { font-size: 1.75rem; }
  .stat-label { margin-top: 4px; font-size: .7rem; letter-spacing: .1em; }
  .card { padding: var(--s5) var(--s4); }
  .feature { grid-template-columns: 44px 1fr; column-gap: var(--s4); padding: var(--s5) var(--s4); }
  .feature::before { width: 44px; height: 44px; border-radius: 12px; }
  .feature h3 { font-size: 1.16rem; }

  /* טבלאות → שורות אפליקציה */
  .table:has(#lb-body), .table:has(#pf-tx) { min-width: 0; }
  .table:has(#lb-body) thead, .table:has(#pf-tx) thead { display: none; }
  .table-wrap:has(#lb-body), .table-wrap:has(#pf-tx) { overflow: visible; border: 0; background: none; border-radius: 0; }
  .card:has(> .table-wrap #lb-body) { padding: 0; border: 0; background: none; box-shadow: none; }
  #lb-body, #pf-tx { display: flex; flex-direction: column; gap: 8px; }

  #lb-body tr {
    display: grid;
    grid-template-columns: 44px auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: var(--s3);
    padding: 12px var(--s3);
    border-radius: var(--radius-sm);
    background: rgba(244,237,225,.02);
    border: 1px solid rgba(244,237,225,.06);
  }
  #lb-body tr:has(td.empty) { display: block; border: 0; background: none; }
  #lb-body td { padding: 0; border: 0; white-space: nowrap; }
  #lb-body .lb-rank { grid-column: 1; grid-row: 1 / 3; width: auto; font-size: 1.05rem; }
  #lb-body td:nth-child(2) { width: auto; min-width: 0; grid-column: 2 / 4; grid-row: 1; overflow: hidden; text-overflow: ellipsis; font-size: 1rem; line-height: 1.35; }
  #lb-body td:nth-child(2)::before { display: none; }
  #lb-body td:nth-child(3) { grid-column: 4; grid-row: 1 / 3; font-size: 1.25rem; text-align: end; }
  #lb-body td:nth-child(3)::after { content: " נק׳"; font-family: var(--font); font-size: .68rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); }
  #lb-body td:nth-child(4), #lb-body td:nth-child(5) { grid-row: 2; font-size: .76rem; color: var(--muted); }
  #lb-body td:nth-child(4) { grid-column: 2; }
  #lb-body td:nth-child(5) { grid-column: 3; }
  #lb-body td:nth-child(4)::before { content: "דירוג "; }
  #lb-body td:nth-child(5)::before { content: "· נצחונות "; }
  #lb-body tr:nth-child(1) { border-color: rgba(217,183,122,.4); }
  #lb-body tr:nth-child(2) { border-color: rgba(217,220,223,.18); }
  #lb-body tr:nth-child(3) { border-color: rgba(200,141,94,.22); }
  #lb-body tr.lb-me { border-color: rgba(92,191,152,.5); }

  #pf-tx tr {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: var(--s3);
    padding: 12px var(--s3);
    border-radius: var(--radius-sm);
    background: rgba(244,237,225,.02);
    border: 1px solid rgba(244,237,225,.06);
  }
  #pf-tx tr:has(td.empty) { display: block; border: 0; background: none; padding: 0; }
  #pf-tx tr::before {
    content: "+";
    grid-column: 1; grid-row: 1 / 3;
    display: grid; place-items: center;
    width: 38px; height: 38px;
    font-size: 1.15rem; font-weight: 500;
    border-radius: 50%;
    color: #8fd6b8;
    background: rgba(15,92,67,.2);
    box-shadow: inset 0 0 0 1px rgba(92,191,152,.35);
  }
  #pf-tx tr:has(.pf-minus)::before { content: "\2212"; color: #e7a3aa; background: rgba(122,31,43,.2); box-shadow: inset 0 0 0 1px rgba(196,80,92,.35); }
  #pf-tx tr:has(td.empty)::before { display: none; }
  #pf-tx td { padding: 0; border: 0; white-space: nowrap; }
  #pf-tx td:nth-child(1) { grid-column: 2; grid-row: 2; font-size: .74rem; color: var(--muted); }
  #pf-tx td:nth-child(2) { grid-column: 2; grid-row: 1; font-weight: 500; }
  #pf-tx td:nth-child(3) { grid-column: 3; grid-row: 1; text-align: end; font-size: 1.05rem; }
  #pf-tx td:nth-child(4) { grid-column: 3; grid-row: 2; text-align: end; font-size: .74rem; color: var(--muted); }
  #pf-tx td:nth-child(4)::before { content: "יתרה "; }
  #pf-tx td:nth-child(5) { grid-column: 2 / 4; grid-row: 3; font-size: .8rem; white-space: normal; margin-top: 2px; }
  #pf-tx td:nth-child(5):empty { display: none; }

  .table th, .table td { padding: 13px 14px; }
}

@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats:has(> .stat:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: var(--s16) var(--s8) var(--s12); }
  .hero-title { font-size: 3rem; }
  .cta-row { flex-direction: row; max-width: none; align-items: center; }
  .cta-row .btn { width: auto; min-width: 220px; }
  .modal-backdrop { align-items: center; padding: var(--s5); }
  .modal {
    max-height: 85vh;
    padding: var(--s8);
    border-bottom: 1px solid transparent;
    border-radius: var(--radius-xl);
    animation: popIn .3s var(--ease);
  }
  .modal::before { display: none; }
  .modal-actions .btn { flex: 0 1 auto; min-width: 130px; }
  .container { padding: var(--s8) var(--s6) var(--s12); }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  body.has-bottom-nav { padding-bottom: 0; }
  .app-header { padding-left: var(--s8); padding-right: var(--s8); min-height: calc(68px + var(--safe-top)); }
  .container { padding: var(--s10) var(--s8) var(--s16); }
  .nav { display: flex; }
  #bottom-nav { display: none; }
  .grid, .grid-2, .grid-3 { gap: var(--s6); }
  .stack { gap: var(--s6); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s5); }
  .feature-grid:has(> .feature:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
  .feature { padding: var(--s8) var(--s6); grid-template-columns: 56px 1fr; }
  .feature::before { width: 56px; height: 56px; }
  .feature:hover { transform: translateY(-3px); box-shadow: var(--e3), 0 0 0 1px rgba(217,183,122,.18); }
  .stats { grid-template-columns: repeat(4, 1fr); gap: var(--s5); }
  .stats:has(> .stat:nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
  .stats:has(> .stat:nth-child(3):last-child), .stats:has(> .stat:nth-child(5):last-child), .stats:has(> .stat:nth-child(6):last-child) { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: var(--s6) var(--s4) var(--s5); }
  .stat-value { font-size: 2.4rem; }
  .user-chip { max-width: 220px; }
  .hero { padding: 88px var(--s12) 72px; }
  .hero::before { width: 112px; height: 112px; border-radius: 28px; margin-bottom: var(--s8); }
  .hero-title { font-size: 4rem; }
  .hero-sub { font-size: 1.12rem; }
  .page-title { font-size: 2.6rem; }
  .btn-sm { min-height: 38px; }
  .card { padding: var(--s8) var(--s6); }
  .card.pf-balance { padding: var(--s12) var(--s6) var(--s10); }
  .card.pf-balance .big { font-size: 5.2rem; }
  .container > .tabs, .container.stack > .tabs { align-self: flex-start; width: fit-content; max-width: 100%; }
  .container > .tabs .tab, .container.stack > .tabs .tab { flex: 0 0 auto; padding: 8px 26px; }
  .table tbody tr:hover td:first-child { box-shadow: inset -2px 0 0 rgba(217,183,122,.55); }
}

@media (max-width: 420px) {
  .app-header .user-chip { display: none; }
}
@media (max-width: 380px) {
  .brand { font-size: 1rem; gap: 8px; }
  .brand img, .brand svg { width: 32px; height: 32px; }
  .page-title { font-size: 1.75rem; }
  .hero-title { font-size: 2.05rem; }
  .app-header .btn-sm { padding: 4px 12px; }
  .points-chip { padding-inline-end: 10px; }
}

/* integration: hooks used by common.js */
@media (max-width: 899px) { body.has-bottom-nav { padding-bottom: calc(var(--nav-h, 66px) + var(--safe-bottom, 0px) + 16px); } }
