/* BALI TELEGRAM · VIP finish v4 · 2026-10-28
   Scoped to Telegram Mini App. The canonical BALI CARD/COIN artwork, calendar
   swipe mechanics, shop scrolling, payments and reward APIs stay untouched. */
:root{
 --tg-polish-gold:#f3d99e;
 --tg-polish-ivory:#f0f7e5;
 --tg-polish-sage:#c5ef9b;
 --tg-polish-hairline:rgba(209,242,181,.32);
 --tg-polish-ink:#09110d;
}
body.bali-guest-theme .app{
 background:
  radial-gradient(ellipse 74% 35% at 50% 13%,rgba(114,161,102,.115),transparent 78%),
  radial-gradient(ellipse 70% 48% at 50% 97%,rgba(203,159,80,.065),transparent 78%),
  linear-gradient(180deg,#0e1715,#0b1312 47%,#080e10)!important;
}
/* Preserve the owner's original BALI logo. Give its surroundings the same
   warm/cool theatrical lighting used by the real card and coin. */
body.bali-guest-theme .head .tg-brand-lockup{
 isolation:isolate;
}
body.bali-guest-theme .head .tg-brand-lockup::before{
 content:"";position:absolute;inset:4% -30%;
 z-index:-1;pointer-events:none;
 background:radial-gradient(ellipse,rgba(240,201,134,.15),transparent 69%);
 filter:blur(13px);
}
body.bali-guest-theme .head .tg-brand-original{
 filter:drop-shadow(0 4px 4px rgba(0,0,0,.65))
  drop-shadow(0 0 13px rgba(222,179,100,.3))!important;
}
/* The navigation is a continuous dark glass bar with FIVE equally wide,
   sculpted options. Active selection is clearly visible on small phones. */
body.bali-guest-theme .nav{
 position:relative;isolation:isolate;
 background:linear-gradient(180deg,rgba(32,49,37,.98) 0%,#111c17 49%,#0b1312 100%)!important;
 border-top:1px solid rgba(190,234,155,.32)!important;
 box-shadow:inset 0 1px rgba(245,255,223,.12),
   0 -5px 25px rgba(0,0,0,.36)!important;
}
body.bali-guest-theme .nav::before{
 content:"";position:absolute;top:-1px;left:18%;right:18%;height:1px;
 pointer-events:none;background:linear-gradient(90deg,transparent,#def0b0a3,transparent);
}
body.bali-guest-theme .nav button{
 position:relative!important;isolation:isolate;
 border-radius:clamp(9px,1.6dvh,13px)!important;
 transition:background .18s ease,color .18s ease,box-shadow .18s ease!important;
}
body.bali-guest-theme .nav button.current{
 color:#efffd6!important;
 background:
  radial-gradient(ellipse 68% 76% at 50% 8%,rgba(212,250,167,.22),transparent 90%),
  linear-gradient(165deg,rgba(69,110,67,.75),rgba(25,53,41,.68) 70%)!important;
 box-shadow:inset 0 1px rgba(237,255,206,.28),
   inset 0 -1px rgba(8,24,16,.7),
   0 3px 9px rgba(0,0,0,.29)!important;
 text-shadow:0 0 10px rgba(220,255,185,.34)!important;
}
body.bali-guest-theme .nav button.current::before{
 left:23%!important;right:23%!important;height:2px!important;
 background:linear-gradient(90deg,#93c66e,#f6eab1,#93c66e)!important;
 box-shadow:0 0 10px rgba(209,247,152,.56)!important;
}
body.bali-guest-theme .nav button.current .tg-nav-art{
 filter:drop-shadow(0 1px 1px rgba(10,27,16,.65))
  drop-shadow(0 0 5px rgba(201,255,170,.4))!important;
}
body.bali-guest-theme .nav button:not(.current):active{
 background:rgba(142,191,128,.15)!important;
 box-shadow:inset 0 1px rgba(226,247,192,.1)!important;
}
/* Identical-size inner light on selected CARD and COIN. Geometry/borders
   remain the user's approved exact same-sized outlines. */
body.bali-guest-theme .tg-page-card .tg-card-switcher>button{
 position:relative!important;isolation:isolate;
 transition:background .2s ease,color .2s ease!important;
}
body.bali-guest-theme .tg-page-card .tg-card-switcher>button.selected::after{
 content:"";position:absolute;inset:1px;border-radius:10px;z-index:-1;
 pointer-events:none;background:linear-gradient(140deg,
  rgba(249,255,231,.14),rgba(232,247,182,.035) 50%,transparent 83%);
}
body.bali-guest-theme .tg-page-card .tg-card-switcher>button:focus-visible,
body.bali-guest-theme .nav button:focus-visible,
body.bali-guest-theme .tg-page :is(.tg-card-tool,.tg-coin-action,.tg-work-claim-button):focus-visible{
 outline:2px solid #edffd1!important;outline-offset:2px!important;
}
/* More realistic action plates underneath the *unchanged* BALI CARD art. */
body.bali-guest-theme .tg-page-card .tg-card-toolbox .tg-card-tool{
 position:relative;isolation:isolate;overflow:hidden;
 border:1px solid rgba(191,226,165,.58)!important;
 background:
  radial-gradient(ellipse 78% 65% at 20% 5%,rgba(236,255,208,.16),transparent 84%),
  linear-gradient(147deg,#374f3e,#1d332d 58%,#111e21)!important;
 box-shadow:inset 0 1px rgba(240,255,215,.27),
  inset 0 -1px rgba(6,25,14,.5),
  0 3px 0 rgba(11,24,16,.9),
  0 8px 18px rgba(0,0,0,.32)!important;
 transition:border-color .18s ease,box-shadow .18s ease,background .18s ease!important;
}
body.bali-guest-theme .tg-page-card .tg-card-toolbox .tg-card-tool::after{
 content:"";position:absolute;top:1px;left:12%;right:12%;height:1px;
 pointer-events:none;background:linear-gradient(90deg,transparent,rgba(252,255,234,.44),transparent);
}
body.bali-guest-theme .tg-page-card .tg-card-toolbox .tg-card-tool:active{
 border-color:rgba(244,255,205,.9)!important;
 box-shadow:inset 0 2px 8px rgba(0,0,0,.32),0 1px 0 #08170f!important;
}
body.bali-guest-theme .tg-page-card .tg-card-toolbox .tg-card-tool-qr{
 border-color:rgba(217,244,169,.75)!important;
 background:radial-gradient(ellipse at 30% 0%,rgba(236,255,190,.25),transparent 72%),
  linear-gradient(150deg,#527c4b,#2c553b 58%,#173027)!important;
}
/* A restrained light chamber adds depth *behind* the original WebGL coin.
   The coin's own rotation and finger controls are not touched. */
body.bali-guest-theme .tg-page-card .tg-home-coin-model{
 isolation:isolate;position:relative;
 background:
  radial-gradient(ellipse 43% 42% at 52% 44%,rgba(255,226,145,.20),transparent 100%),
  radial-gradient(ellipse 65% 50% at 50% 60%,rgba(114,186,110,.095),transparent 88%)!important;
}
body.bali-guest-theme .tg-page-card .tg-home-coin-model::before{
 box-shadow:inset 0 0 20px rgba(248,201,104,.1),
  0 0 0 12px rgba(204,180,105,.055),0 0 0 24px rgba(124,191,125,.038),
  0 0 34px rgba(235,184,82,.27)!important;
 animation:tg-polish-halo 7.8s ease-in-out infinite alternate;
}
@keyframes tg-polish-halo{
 from{opacity:.68}
 to{opacity:1}
}
body.bali-guest-theme .tg-page-card .tg-home-coin-actions .tg-coin-action{
 position:relative;isolation:isolate;overflow:hidden;
 border-radius:clamp(11px,2dvh,16px)!important;
 box-shadow:inset 0 1px rgba(252,255,238,.32),
  0 3px 0 #17251b,0 7px 16px #0008!important;
 transition:filter .2s ease,box-shadow .2s ease!important;
}
body.bali-guest-theme .tg-page-card .tg-home-coin-actions .tg-coin-action::after{
 content:"";position:absolute;left:7%;right:7%;top:1px;height:1px;
 background:linear-gradient(90deg,transparent,rgba(255,255,230,.45),transparent);
 pointer-events:none;
}
body.bali-guest-theme .tg-page-card .tg-home-coin-actions .tg-coin-action:active{
 filter:brightness(1.13);
 box-shadow:inset 0 2px 6px #00170a80,0 1px 0 #17251b!important;
}
/* Earning & withdrawing should be an obvious hierarchy. Values remain
   authoritative backend values; the interface never manufactures points. */
body.bali-guest-theme .tg-page-work .tg-work-stats>div{
 position:relative;isolation:isolate;overflow:hidden;
 border-color:rgba(204,240,168,.5)!important;
 background:radial-gradient(ellipse at 18% 1%,rgba(238,255,204,.18),transparent 77%),
  linear-gradient(150deg,#344e38,#182c24 80%)!important;
 box-shadow:inset 0 1px rgba(250,255,226,.19),
  0 4px 0 rgba(10,23,17,.85),0 8px 17px #0005!important;
}
body.bali-guest-theme .tg-page-work .tg-work-stats>div::before{
 content:"";position:absolute;top:0;left:15%;right:15%;height:1px;
 background:linear-gradient(90deg,transparent,rgba(240,255,208,.58),transparent);
}
body.bali-guest-theme .tg-page-work .tg-work-stats strong{
 font-variant-numeric:tabular-nums;
 letter-spacing:-.035em!important;
 text-shadow:0 2px 7px rgba(190,246,123,.12);
}
body.bali-guest-theme .tg-page-work .tg-work-mission{
 position:relative;isolation:isolate;overflow:hidden;
 border-color:rgba(181,217,151,.48)!important;
 background:
  radial-gradient(ellipse 44% 65% at 0% 15%,rgba(209,250,170,.11),transparent 100%),
  linear-gradient(142deg,#2b4534,#1a2c28 63%,#111d20)!important;
 box-shadow:inset 0 1px rgba(231,254,205,.2),
  0 2px 0 rgba(8,24,15,.86),0 6px 13px rgba(0,0,0,.36)!important;
}
body.bali-guest-theme .tg-page-work .tg-work-mission::before{
 content:"";position:absolute;left:0;top:17%;bottom:17%;width:2px;
 background:linear-gradient(180deg,transparent,#d5eea0,transparent);
 opacity:.8;pointer-events:none;
}
body.bali-guest-theme .tg-page-work .tg-work-mission:nth-child(2)::before{
 background:linear-gradient(180deg,transparent,#efcd92,transparent);
}
body.bali-guest-theme .tg-page-work .tg-work-mission:nth-child(3)::before{
 background:linear-gradient(180deg,transparent,#abd2dd,transparent);
}
body.bali-guest-theme .tg-page-work .tg-work-mission h3{
 letter-spacing:-.018em;
}
body.bali-guest-theme .tg-page-work .tg-work-mission .tg-work-reward-label{
 text-shadow:0 0 11px rgba(203,251,154,.15);
}
body.bali-guest-theme .tg-page-work .tg-work-claim-button:not(:disabled){
 position:relative;overflow:hidden;
 border-color:#e5ffbb!important;
 background:linear-gradient(155deg,#e2ffc1,#b3df91 51%,#8bb76c)!important;
 box-shadow:inset 0 1px rgba(255,255,255,.75),0 2px 0 #315329,
  0 4px 8px rgba(0,0,0,.23)!important;
 text-shadow:0 1px rgba(255,255,255,.21);
}
body.bali-guest-theme .tg-page-work .tg-work-claim-button:not(:disabled):active{
 box-shadow:inset 0 2px 5px #30502d7a,0 1px 0 #315329!important;
}
body.bali-guest-theme .tg-page-work .tg-work-claim-button:disabled{
 opacity:.53!important;background:linear-gradient(150deg,#465a48,#28392d)!important;
 color:#cce3c0!important;border-color:#6c8562!important;
}
/* CoinShop product photos and exchange cards should look like merchandise,
   not ordinary flat rows. Scrolling remains vertical as approved. */
body.bali-guest-theme .tg-page-shop .tg-coinshop{
 background:radial-gradient(ellipse at 0% 0%,rgba(169,224,141,.09),transparent 55%),
  linear-gradient(166deg,#1b3324,#102119 63%,#0b1815)!important;
 box-shadow:inset 0 1px rgba(229,255,205,.22),
  0 7px 23px rgba(0,0,0,.39)!important;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-display .coin-shop-product{
 position:relative;isolation:isolate;overflow:hidden;
 border-color:rgba(148,194,122,.53)!important;
 background:radial-gradient(ellipse at 100% 0%,rgba(202,251,167,.09),transparent 72%),
  linear-gradient(153deg,#253c2a,#152a20 73%)!important;
 box-shadow:inset 0 1px rgba(237,255,223,.17),0 3px 9px rgba(0,0,0,.20)!important;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-display .coin-shop-product::before{
 content:"";position:absolute;top:0;left:8%;right:8%;height:1px;z-index:3;
 pointer-events:none;background:linear-gradient(90deg,transparent,rgba(242,255,218,.41),transparent);
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-display .coin-shop-image{
 border:1px solid rgba(188,237,158,.2);
 background:
  radial-gradient(ellipse at 30% 10%,rgba(248,236,174,.15),transparent 72%),
  linear-gradient(149deg,#294833,#102218)!important;
 box-shadow:inset 0 1px rgba(244,255,210,.22),
  inset 0 0 0 1px rgba(16,38,23,.8),0 2px 8px rgba(0,0,0,.26)!important;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-display .coin-shop-price{
 text-shadow:0 0 11px rgba(205,246,137,.16);
 font-variant-numeric:tabular-nums;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-balance{
 background:linear-gradient(150deg,#304d2f,#1c3525)!important;
 border-color:rgba(189,225,154,.50)!important;
 box-shadow:inset 0 1px rgba(239,255,222,.23),
  0 2px 0 rgba(9,26,15,.7)!important;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-balance strong{
 color:#e9ffbd!important;text-shadow:0 0 10px rgba(199,243,151,.13);
 font-variant-numeric:tabular-nums;
}
/* Profile: a physical membership credential, not a generic settings view. */
body.bali-guest-theme .tg-page-profile .tg-profile-hero{
 position:relative;isolation:isolate;overflow:visible;
 background:
  radial-gradient(ellipse at 0% 0%,rgba(233,244,197,.20),transparent 68%),
  linear-gradient(149deg,#315038,#1b2f29 72%,#111e21)!important;
 border-color:rgba(210,237,169,.61)!important;
 box-shadow:inset 0 1px rgba(253,255,233,.34),
  0 4px 0 #112319,0 8px 19px rgba(0,0,0,.43)!important;
}
body.bali-guest-theme .tg-page-profile .tg-profile-avatar{
 position:relative!important;
 border:2px solid rgba(251,238,191,.83)!important;
 box-shadow:inset 0 1px rgba(255,255,240,.61),
  0 2px 0 #423422,0 6px 12px rgba(0,0,0,.46),
  0 0 15px rgba(232,195,107,.16)!important;
}
body.bali-guest-theme .tg-page-profile .tg-profile-avatar::after{
 content:"✓";position:absolute;z-index:4;right:0;bottom:0;
 display:grid;place-items:center;width:clamp(12px,2dvh,17px);
 height:clamp(12px,2dvh,17px);border-radius:50%;
 border:1px solid rgba(235,255,205,.87);
 background:linear-gradient(150deg,#8fc569,#355f3b);
 box-shadow:0 1px 4px #000a;color:#fffed7;
 font:900 9px/1 Manrope,Inter,sans-serif;
}
body.bali-guest-theme .tg-page-profile .tg-profile-info{
 background:linear-gradient(150deg,#243e2d,#152823 70%,#10201c)!important;
 border-color:rgba(193,221,169,.38)!important;
 box-shadow:inset 0 1px rgba(247,255,226,.15),
  0 3px 0 rgba(12,25,17,.78),0 8px 15px rgba(0,0,0,.25)!important;
}
body.bali-guest-theme .tg-page-profile .tg-profile-hero strong{
 color:#fffbe9!important;
}
body.bali-guest-theme .tg-page-profile .tg-tile-wide .tile{
 border:1px solid rgba(194,225,162,.56)!important;
 background:linear-gradient(152deg,#36543b,#1d332a 69%,#14231f)!important;
 box-shadow:inset 0 1px rgba(242,255,224,.2),
  0 3px 0 rgba(13,32,18,.85),0 7px 15px rgba(0,0,0,.29)!important;
}
body.bali-guest-theme .tg-page-profile .tg-profile-logout{
 border-color:rgba(199,220,177,.42)!important;
 background:linear-gradient(156deg,#2b372d,#17241f)!important;
 color:#f1f4dd!important;
}
/* Improve action clarity while preserving square posters and the approved
   entirely ordinary left/right calendar swipe (NO new poster animations). */
body.bali-guest-theme .tg-page-calendar .tg-instagram-post-head{
 box-shadow:inset 0 1px rgba(255,255,229,.18),
  0 1px 0 rgba(8,30,15,.4)!important;
}
body.bali-guest-theme .tg-page-calendar .tg-instagram-post-actions .tg-event-icon-button{
 transition:color .15s ease,filter .15s ease!important;
}
body.bali-guest-theme .tg-page-calendar .tg-instagram-post-actions .tg-event-icon-button:active{
 filter:brightness(1.25)!important;
}
body.bali-guest-theme .tg-page :is(.tg-work-claim-button,.tg-card-tool,.tg-coin-action,.button):not(:disabled){
 -webkit-tap-highlight-color:transparent;
}
/* Keep the original fixed-screen geometry and real touch zones on narrow
   Telegram viewports, including 320×568 and devices with safe-area insets. */
@media(max-width:359px){
 body.bali-guest-theme .nav button.current{
  box-shadow:inset 0 1px rgba(237,255,206,.21),
   0 2px 6px rgba(0,0,0,.23)!important;
 }
 body.bali-guest-theme .tg-page-work .tg-work-mission::before{width:1px}
 body.bali-guest-theme .tg-page-card .tg-card-toolbox .tg-card-tool{
  box-shadow:inset 0 1px rgba(240,255,215,.20),
   0 2px 0 #102017,0 5px 11px rgba(0,0,0,.26)!important;
 }
}
@media(hover:hover) and (pointer:fine){
 body.bali-guest-theme .tg-page-card .tg-card-toolbox .tg-card-tool:hover{
  border-color:rgba(242,255,203,.8)!important;
  box-shadow:inset 0 1px rgba(242,255,219,.29),
   0 3px 0 #102017,0 8px 17px rgba(0,0,0,.32),
   0 0 14px rgba(160,221,125,.16)!important;
 }
 body.bali-guest-theme .tg-page-shop .tg-coinshop-display .coin-shop-product:hover{
  border-color:rgba(200,243,168,.73)!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body.bali-guest-theme .tg-page-card .tg-home-coin-model::before{animation:none!important}
 body.bali-guest-theme .nav button,
 body.bali-guest-theme .tg-page-card .tg-card-switcher>button,
 body.bali-guest-theme .tg-page-card .tg-card-toolbox .tg-card-tool,
 body.bali-guest-theme .tg-page-card .tg-home-coin-actions .tg-coin-action,
 body.bali-guest-theme .tg-page-calendar .tg-instagram-post-actions .tg-event-icon-button{
  transition:none!important;
 }
}

/* CoinShop simplified action bar: exactly TWO visible controls.
   The receipts control becomes "К товарам" in receipt view; same slot, never
   extra Catalog / Refresh rows. 320px phones retain two readable touch targets. */
body.bali-guest-theme .tg-page-shop .tg-coinshop-actions{
 display:grid!important;
 grid-template-columns:minmax(0,0.9fr) minmax(0,1.45fr)!important;
 flex:none!important;
 gap:clamp(6px,1.65vw,9px)!important;
 margin-top:clamp(2px,.45dvh,4px)!important;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-actions>.button{
 display:flex!important;align-items:center!important;justify-content:center!important;
 min-width:0!important;
 min-height:clamp(42px,6.3dvh,51px)!important;
 padding:6px clamp(5px,1.65vw,10px)!important;
 gap:clamp(4px,1.3vw,8px)!important;
 border-radius:clamp(10px,2dvh,13px)!important;
 white-space:normal!important;
 font:850 clamp(9px,1.85vw,11px)/1.1 Manrope,Inter,sans-serif!important;
 letter-spacing:.015em!important;
 text-align:center!important;
 transition:border-color .18s ease,box-shadow .18s ease!important;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-actions>.button svg{
 display:block;flex:none!important;
 width:clamp(15px,4vw,21px)!important;
 height:clamp(15px,4vw,21px)!important;
 stroke:currentColor;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-actions>.button span{
 min-width:0;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-actions>.tg-shop-receipts-action{
 color:#e5f9d7!important;
 border:1px solid rgba(194,234,164,.57)!important;
 background:linear-gradient(154deg,#375541,#1c382b 64%,#12241e)!important;
 box-shadow:inset 0 1px rgba(239,255,221,.25),0 3px 0 #10261a,0 6px 11px #0007!important;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-actions>.tg-shop-receipts-action.selected{
 color:#fff4cd!important;
 border-color:rgba(246,216,153,.77)!important;
 background:linear-gradient(150deg,#745a36,#39442e 62%,#172923)!important;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-actions>.tg-shop-scan-action{
 color:#172714!important;
 border:1px solid #d3f4a1!important;
 background:linear-gradient(146deg,#e6ffbd,#bee994 57%,#8ec46f)!important;
 box-shadow:inset 0 1px #fffef0c5,0 3px 0 #335b2a,0 6px 13px #0007!important;
}
body.bali-guest-theme .tg-page-shop .tg-coinshop-actions>.button:active{
 box-shadow:inset 0 2px 8px #12231366,0 1px 0 #10261a!important;
}
@media(max-width:359px){
 body.bali-guest-theme .tg-page-shop .tg-coinshop-actions{
  grid-template-columns:minmax(0,.85fr) minmax(0,1.45fr)!important;
  gap:5px!important;
 }
 body.bali-guest-theme .tg-page-shop .tg-coinshop-actions>.button{
  font-size:9px!important;padding:5px 4px!important;gap:4px!important;
 }
 body.bali-guest-theme .tg-page-shop .tg-coinshop-actions>.button svg{
  width:15px!important;height:15px!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body.bali-guest-theme .tg-page-shop .tg-coinshop-actions>.button{
  transition:none!important;
 }
}

/* Balance headline, 28.10: exact one-size engraving for BALANCE / amount / COIN.
   The old amount was clamp(27px,7.9vw,43px). Every part is now precisely
   two thirds of that, including the formerly tiny BALANCE prefix. */
body.bali-guest-theme .tg-page-card .tg-home-coin-label .tg-coin-balance-line
 :is(.tg-coin-balance-prefix,.tg-coin-balance-value,.tg-coin-balance-unit){
 font-family:Inter,Manrope,system-ui,sans-serif!important;
 font-size:clamp(18px,5.2666667vw,28.6666667px)!important;
 font-weight:950!important;
 line-height:1!important;
 letter-spacing:-.025em!important;
 text-transform:uppercase!important;
 white-space:nowrap!important;
}
body.bali-guest-theme .tg-page-card .tg-home-coin-label .tg-coin-balance-line{
 align-items:baseline!important;
 justify-content:center!important;
 flex-wrap:nowrap!important;
 gap:clamp(4px,1.65vw,9px)!important;
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
}
