/* Fix & Flex: professional layer (loaded after app.css).
   Calmer type (Poppins 600, smaller sizes), flat buttons with a thin edge instead of glossy glowing pills,
   tighter spacing so every page fits on one phone screen. Change sizes here, not in app.css. */
:root{--t-xs:11px;--t-s:12.5px;--t-m:14px;--t-l:16px;--t-xl:19px;--r-btn:12px}

/* buttons */
.gbtn{font:600 var(--t-m)/1.1 var(--body)!important;letter-spacing:0;padding:10px 14px;min-height:40px;border-radius:var(--r-btn);text-shadow:none!important;white-space:nowrap;
  background:linear-gradient(var(--b),var(--c));border:1px solid rgba(255,255,255,.22);box-shadow:0 2px 0 var(--d),0 4px 10px rgba(0,0,0,.25)!important;gap:6px}
.gbtn:active{transform:translateY(2px);box-shadow:0 0 0 var(--d)!important}
.gbtn.big{font-size:var(--t-l)!important;min-height:46px;padding:12px 18px}
.gbtn.mini{font-size:var(--t-s)!important;min-height:32px;padding:6px 12px}
.gbtn.gold{color:#3a2400}
.gbtn.white{color:#16234d;border-color:#c9d4e8}

/* pop-up title and text */
.ribbon{font:600 var(--t-l)/1.2 var(--display)!important;padding:9px 14px!important;margin:-4px -16px 0!important;border-radius:12px!important;text-shadow:none!important;
  background:linear-gradient(#2a6cf0,#1b4fc4)!important;border:1px solid rgba(255,255,255,.25)!important;box-shadow:0 4px 12px rgba(0,0,0,.3)!important}
.sheet{gap:10px}
.sheet.frame{padding:0 14px 14px;border-width:1px!important;border-radius:18px;background:linear-gradient(#152a60,#0d1c47)}
.sheet h3{font-size:var(--t-l)}
.sheet p{font:500 var(--t-s)/1.45 var(--body)}
.sheet .row .gbtn{font-size:var(--t-m)!important}

/* sub screens */
.sub-top{padding:calc(8px + var(--safeT)) 12px 8px;gap:10px}
.sub-top h2{font:600 var(--t-xl) var(--display)!important;text-shadow:none!important}
.round-btn{width:38px!important;height:38px!important}
.p-row{padding:7px 10px 7px 7px;border-width:1px;border-radius:12px;gap:8px}
.p-row img{width:40px;height:40px}
.p-row b{font:600 var(--t-m) var(--body)}
.p-row small{font-size:var(--t-xs)}
.p-row .acts .gbtn{font-size:var(--t-s)!important;min-height:32px;padding:6px 10px}
.tabs3 button{font:600 var(--t-s) var(--body)!important}
.shop-h{font:600 var(--t-l) var(--display)}
.shop-row{padding:6px 8px;border-width:1px;border-radius:12px;gap:10px}
.shop-row .si{width:44px;height:44px}
.shop-row b{font:600 var(--t-m) var(--body)}
.shop-row small{font-size:var(--t-xs)}
.shop-row .gbtn{font-size:var(--t-s)!important;min-height:34px;padding:6px 10px}
.shop-list{gap:6px}

/* profile: one screen */
#profile .p-hero{padding:10px 10px 8px!important;border-radius:16px;border-width:1px}
#profile .p-hero .fr{width:68px!important;height:68px!important}
.p-hero h3{font:600 var(--t-xl)/1.1 var(--display)!important}
.p-hero .lg2{font:600 var(--t-s) var(--body)!important;padding:3px 10px;border-width:1px}
.p-hero .st,.p-hero .un{font:500 var(--t-xs) var(--body)!important}
.stat4{gap:5px}
.stat4 div{border-width:1px!important;border-radius:10px!important;padding:5px 2px!important}
#profile .stat4 b,.stat4 b{font:600 var(--t-m) var(--display)!important}
.stat4 small{font:500 10px var(--body)!important}
#profBody{gap:8px!important}
#profBody>.gbtn,#profBody .row .gbtn{min-height:40px}
.fs-acts{gap:6px}
.fs-acts .gbtn{font-size:var(--t-s)!important;height:auto;min-height:38px}
.fs-rm{font-size:var(--t-xs)!important;min-height:28px!important}
.badges .bdg{font-size:var(--t-xs)}

/* game card pop-ups (art cards): smaller words on the buttons */
.ac-btn{font:600 4.6cqw var(--body)!important;height:12.5cqw!important;text-shadow:none!important}
.ac-txt{font:500 3.6cqw/1.45 var(--body)!important}

/* Garage Clash menu: dark panel, cards with a coloured icon */
.cl2{background:linear-gradient(#141f4a,#0b1230)!important;border:1px solid #2f3f7a!important;box-shadow:0 12px 30px rgba(0,0,0,.5)!important;border-radius:18px!important;gap:9px!important;padding:14px 12px!important}
.cl2-h{font:600 var(--t-xl)/1 var(--display)!important;text-shadow:none!important;text-align:left!important;margin:2px 44px 0 2px!important}
.cl2-x{width:32px!important;height:32px!important;background:rgba(255,255,255,.1)!important}
.cl2-stats>div{border-radius:10px!important;padding:5px 4px!important}
.cl2-stats b{font:600 var(--t-m)/1.15 var(--display)!important}
.cl2-stats small{font:500 10px var(--body)!important}
.cl2-how{font-size:var(--t-xs)!important;text-align:left!important}
.cl2-t{min-height:0!important;flex-direction:row!important;justify-content:flex-start!important;text-align:left!important;gap:10px!important;padding:12px 10px!important;border-radius:12px!important;
  background:#18244f!important;border:1px solid #2b3a6e!important;box-shadow:none!important;color:#fff!important}
.cl2-t svg{width:20px!important;height:20px!important;flex:none;padding:8px;border-radius:10px;box-sizing:content-box}
.cl2-t.red svg{background:#d9342b}.cl2-t.blue svg{background:#2a6cf0}.cl2-t.violet svg{background:#7a45e6}.cl2-t.gold svg{background:#e09a12}
.cl2-t b{font:600 var(--t-m)/1.2 var(--body)!important;display:block}
.cl2-t small{font:400 var(--t-xs)/1.25 var(--body)!important;color:#a9b6e0;display:block}
.cl2-t>span{min-width:0}
.cl2-grid{grid-template-columns:1fr 1fr!important;gap:7px!important}
.cl2-row .gbtn,.cl2-code .gbtn{min-height:40px;height:40px!important;font-size:var(--t-m)!important}
.cl2-code input{height:40px!important;border-radius:10px!important;font-size:var(--t-m)!important;border-width:1px!important}

/* chat, gift shop */
.fs-item{padding:6px;border-width:1px;border-radius:12px}
.fs-item img{width:44px;height:44px}
.fs-item b{font:600 var(--t-s) var(--body)}
.fs-item small{font-size:10.5px;min-height:0}
.fs-item em{font:600 var(--t-s) var(--body)}
.fs-shop{gap:6px}
.fs-m span{font-size:var(--t-m)}

/* Spin Room */
.fx-casino-tabs button{font:600 var(--t-s)/1.15 var(--body)!important;min-height:38px!important}
.fx-spin-action{font:700 22px/1 var(--body)!important;min-height:50px!important;border-width:1px!important;border-bottom-width:3px!important;text-shadow:none!important;box-shadow:0 3px 0 #006e27,0 6px 14px rgba(0,0,0,.3)!important}
.jk3 .jk-go{font-size:24px!important;min-height:52px!important}
.jk-bet,.jk-won b{font-size:var(--t-l)!important}
.fx-spin-topname{font:600 var(--t-s)/1.15 var(--body)!important}

/* profile buttons in one row */
.p-grid{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px}
.p-grid .gbtn{min-width:0;padding-left:6px;padding-right:6px;font-size:var(--t-s)!important}
#signOut{min-height:34px;font-size:var(--t-s)!important;padding:6px 12px}

/* projects: three across, short pictures */
.pr-grid{grid-template-columns:repeat(3,1fr)!important;gap:7px!important;padding:4px 12px 12px!important}
.pr-grid .card .tx{padding:5px 6px 6px!important}
.pr-grid .card .tx b{font:600 var(--t-s)/1.2 var(--body)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.pr-grid .card .tx small{font-size:10px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.pr-grid .card .tag{font-size:9.5px!important;padding:2px 6px!important}
.pr-grid .card{border-width:1px!important;border-radius:12px!important}

/* shop: cards two across */
.shop-list{display:grid!important;grid-template-columns:1fr 1fr;gap:6px!important;padding:0 12px 12px!important}
.shop-h{grid-column:1/-1;margin:4px 0 0!important;font-size:var(--t-m)!important}
.shop-row{flex-direction:column;align-items:stretch!important;text-align:center;gap:4px!important;padding:8px!important}
.shop-row .si{margin:0 auto;width:36px!important;height:36px!important}
.shop-row small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
.shop-row .own{font-size:10px!important}
.shop-row .gbtn{width:100%;justify-content:center}
.shop-note{font-size:var(--t-xs)!important;margin:0 12px 6px!important}
@media (max-height:700px){.shop-row small{display:none}}

/* friends tabs: five across, badge does not push into the next tab */
.tabs3{grid-template-columns:repeat(5,1fr)!important;margin:0 12px 8px!important}
.tabs3 button{font-size:11.5px!important;padding:8px 1px!important;overflow:visible}
.tabs3 i{position:absolute;top:-5px;right:-2px;margin:0!important;padding:0 4px!important;font-size:9.5px!important;line-height:15px}
.rk-sort{flex-wrap:wrap;overflow:visible}
.rk-sort button{font:600 11px var(--body)!important;padding:5px 9px!important;border-width:1px!important}
.fs-in input{min-width:0}
.fs-in .gbtn{flex:none}
.jk-bet{white-space:nowrap}

/* Spin Room on short phones */
@media (max-height:700px){.fx-wheel-stage{width:min(60vw,235px)!important;height:min(60vw,235px)!important}.fx-free-logo{width:min(58%,220px)!important}}

/* edit profile in tabs */
.ed-sheet{max-height:94%}
.ed-top{display:flex;align-items:center;gap:10px}
.ed-tabs{flex:1;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:3px;border-radius:12px;background:#0a1640}
.ed-tabs button{padding:8px 2px;border-radius:9px;font:600 var(--t-xs) var(--body);color:#9fb4e8;white-space:nowrap}
.ed-tabs button.on{background:#2a6cf0;color:#fff}
.ed-body{display:flex;flex-direction:column;gap:7px}
.ed-body h3{font-size:var(--t-m)!important;text-align:left!important;margin-top:2px!important}
.ed-body .plain-in,.ed-body #edNick{font:500 var(--t-m) var(--body)!important;padding:8px 10px!important;border-radius:10px!important;border-width:1px!important}
.ed-body .gift-label,.ed-body .gift-toggle{font:500 var(--t-s)/1.35 var(--body)!important}
.ed-body .chip{font:600 var(--t-s) var(--body)!important;white-space:nowrap}
.ed-grid button{font:600 10.5px/1.2 var(--body)!important}
.ed-grid button small{white-space:nowrap;font-size:9.5px!important}

/* projects: two across with shorter pictures (three cut the names) */
.pr-grid{grid-template-columns:1fr 1fr!important}
.pr-grid .card .im{aspect-ratio:16/8!important}
.pr-grid .card .tx b{font-size:var(--t-m)!important}
.pr-grid .card .tx small{font-size:var(--t-xs)!important}
/* shop: three across */
.shop-list{grid-template-columns:repeat(3,1fr)!important}
.shop-row b{font-size:var(--t-s)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shop-row small{display:none!important}
.shop-row .gbtn{padding:6px 4px!important;min-height:32px}

/* notifications: a quiet bar at the bottom, like a phone's own message, not a glowing box */
.toast{top:auto!important;bottom:calc(20px + var(--safeB))!important;left:16px!important;right:16px!important;transform:none!important;max-width:420px;margin:0 auto;
  display:flex;align-items:center;gap:10px;padding:11px 14px 11px 12px!important;border-radius:12px!important;text-align:left!important;
  background:rgba(14,20,40,.96)!important;border:1px solid rgba(255,255,255,.1)!important;border-left:3px solid #2ad65a!important;
  font:500 13px/1.35 var(--body)!important;color:#eef2ff!important;box-shadow:0 8px 24px rgba(0,0,0,.45)!important;animation:toastUp .22s ease-out!important}
.toast[hidden]{display:none!important}
@keyframes toastUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* Jackpot: bigger machine, clearer symbols; the room header is hidden while the Jackpot is open to make room */
.fx-spin-sheet.jk-mode .fx-spin-top{min-height:0}
.fx-spin-sheet.jk-mode .fx-spin-topname{display:none}
.jk3 .jk-mach{width:min(112%,calc((100dvh - 200px) * 1.11))!important;margin:-4px -6% 0!important}
.jk-mach .jk-c img{width:100%!important;height:100%!important;filter:drop-shadow(0 2px 2px rgba(0,0,0,.25))}
.jk-mach .fx-reel{background:linear-gradient(90deg,#d5dae2,#fff 14%,#fff 86%,#d0d5de)!important}

/* edit profile fits short phones */
.ed-body{gap:5px}
@media (max-height:700px){.ed-body p{display:none}.ed-top .fr{width:48px!important;height:48px!important}}

/* any coin icon inside a heading or line of text stays text-sized */
h3 img,p img,small img,b img,.hub-sec h3 img{height:1.1em;width:auto;vertical-align:-.15em}
/* chips and short buttons never break onto two lines */
.chip,.jk-bet,.mode-b b,.shop-row .gbtn,.fs-acts .gbtn,.cl2-row .gbtn{white-space:nowrap}
.chip{font:600 var(--t-s) var(--body)!important;padding:7px 12px!important;border-width:1px!important}
.mode-b{font-size:30px!important}
/* defense and crews: tighter so they fit */
.def-page{gap:6px!important}
.def-row{padding:6px!important;border-radius:10px!important}
.def-row b{font-size:var(--t-s)!important}
.def-row small{font-size:10.5px!important;line-height:1.25!important}
.hub-sec{padding:10px!important;border-radius:12px!important}
.hub-sec h3{font-size:var(--t-m)!important}
.hub-sec p{font-size:var(--t-s)!important}
/* Flex Defense: the upgrade descriptions go on short phones so the list fits */
.def-sheet>p{font-size:10.5px!important}
@media (max-height:760px){.def-row small:not(:last-child){display:none!important}.def-row{min-height:0}}

/* FLEX PAY: private bank. Black, champagne gold, no cartoon */
.sheet.lux-sheet{max-width:420px;max-height:92%}
.lux{display:flex;flex-direction:column;gap:12px;padding:16px 14px;border-radius:22px;background:radial-gradient(120% 60% at 50% 0%,#23201a 0%,#0d0c0a 60%,#060606 100%);border:1px solid #3d3423;box-shadow:0 20px 50px rgba(0,0,0,.7)}
.lux-top{display:flex;align-items:center;justify-content:space-between}
.lux-brand{font:600 15px var(--body);letter-spacing:.32em;color:#efe6d2}
.lux-brand em{font-style:normal;color:#d4af6a}
.lux-x{position:relative;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12)}
.lux-x::before,.lux-x::after{content:"";position:absolute;left:8px;top:13.5px;width:12px;height:1.5px;background:#d9cfb8;transform:rotate(45deg)}
.lux-x::after{transform:rotate(-45deg)}
.lux-card{position:relative;aspect-ratio:1.586;border-radius:16px;padding:18px 18px 14px;display:flex;flex-direction:column;justify-content:center;overflow:hidden;
  background:linear-gradient(135deg,#2b2b2b 0%,#121212 45%,#1d1d1d 70%,#0b0b0b 100%);border:1px solid #4a4030;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 12px 30px rgba(0,0,0,.6)}
.lux-card::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(115deg,rgba(255,255,255,.025) 0 2px,transparent 2px 6px);pointer-events:none}
.lux-card::after{content:"";position:absolute;top:-60%;left:-30%;width:60%;height:220%;background:linear-gradient(90deg,transparent,rgba(255,240,200,.07),transparent);transform:rotate(20deg);animation:luxSheen 6s ease-in-out infinite}
@keyframes luxSheen{0%,60%{left:-40%}100%{left:120%}}
.lux-chip{position:absolute;left:18px;top:18px;width:36px;height:27px;border-radius:6px;background:linear-gradient(135deg,#f3dba0,#b98d3e 55%,#e9cf8c);box-shadow:inset 0 0 0 1px rgba(80,55,10,.5)}
.lux-card small{font:500 11px var(--body);letter-spacing:.14em;text-transform:uppercase;color:#a99b80;margin-top:14px}
.lux-card>b{font:600 clamp(28px,9vw,38px)/1.15 var(--display);letter-spacing:.01em;background:linear-gradient(#fff6dc,#d8b46a 60%,#a8802f);-webkit-background-clip:text;background-clip:text;color:transparent}
.lux-card-f{position:absolute;left:18px;right:18px;bottom:14px;display:flex;justify-content:space-between;font:500 11px var(--body);letter-spacing:.2em;color:#cbbd9f}
.lux-sum{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.lux-sum div{padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid rgba(212,175,106,.18)}
.lux-sum small{display:block;font:500 10.5px var(--body);letter-spacing:.12em;text-transform:uppercase;color:#9c917b}
.lux-sum b{font:600 17px var(--display);color:#f3ead6}
.lux-h{font:500 11px var(--body);letter-spacing:.16em;text-transform:uppercase;color:#9c917b}
.lux-list{display:flex;flex-direction:column;max-height:34dvh;overflow-y:auto;scrollbar-width:none}
.lux-row{display:flex;align-items:center;gap:10px;padding:10px 2px;border-bottom:1px solid rgba(255,255,255,.06);text-align:left;color:#eee}
.lux-ic{width:34px;height:34px;flex:none;border-radius:50%;background:rgba(212,175,106,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6' fill='none' stroke='%23d4af6a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/16px no-repeat}
.lux-ic.out{background-color:rgba(255,255,255,.05);transform:rotate(180deg);filter:grayscale(1) brightness(1.4)}
.lux-who{flex:1;min-width:0}
.lux-who b{display:block;font:500 14px var(--body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lux-who small{font:400 11px var(--body);color:#8d846f}
.lux-amt{font:600 15px var(--display);color:#e9e2d2;white-space:nowrap}
.lux-amt.in{color:#e4c27a}
.lux-empty{margin:6px 0!important;font:400 13px/1.5 var(--body)!important;color:#9c917b!important;text-align:center}
.lux-retry{align-self:center;margin-top:6px;padding:8px 18px;border-radius:20px;border:1px solid #d4af6a;color:#e4c27a;font:500 13px var(--body)}

/* notifications: black glass, champagne edge */
.toast{background:rgba(12,11,9,.96)!important;border:1px solid rgba(212,175,106,.35)!important;border-left:1px solid rgba(212,175,106,.35)!important;color:#f3ead6!important;
  font:500 13px/1.4 var(--body)!important;padding:12px 16px 12px 44px!important;border-radius:14px!important;box-shadow:0 10px 30px rgba(0,0,0,.6)!important}
.toast::before{content:"";position:absolute;left:14px;top:50%;width:20px;height:20px;margin-top:-10px;border-radius:50%;background:linear-gradient(135deg,#f6dfa4,#b9893a);box-shadow:0 0 0 2px rgba(212,175,106,.18)}
/* money-in alert: same private-bank style as FLEX PAY */
.fxpay-toast{background:rgba(12,11,9,.97)!important;border:1px solid rgba(212,175,106,.4)!important;border-radius:16px!important;box-shadow:0 12px 34px rgba(0,0,0,.65)!important}
.fxpay-toast strong{font:600 16px var(--display)!important;color:#f3ead6!important;background:linear-gradient(#fff6dc,#d8b46a);-webkit-background-clip:text;background-clip:text;color:transparent!important}
.fxpay-toast small{font:400 12px var(--body)!important;color:#b5aa92!important}
.fxpay-toast em{font:500 11px var(--body)!important;color:#d4af6a!important;letter-spacing:.06em}
.fxpay-toast-arrow{width:38px!important;height:38px!important;border-radius:50%!important;background:linear-gradient(135deg,#f6dfa4,#b9893a)!important;box-shadow:none!important;position:relative}
.fxpay-toast-arrow::after{content:"";position:absolute;inset:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6' fill='none' stroke='%23231a08' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/18px no-repeat}
.fxpay-toast.debit .fxpay-toast-arrow::after{transform:rotate(180deg)}
