
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#071713;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:#10231e}
button,input{font-family:inherit}
button{cursor:pointer}
:root{--dark:#071713;--panel:#F8FFFC;--text:#10231E;--muted:#5E746F;--line:rgba(16,35,30,.10);--green:#31B57B;--blue:#2FA7D9;--mint:#BFF2DD;--black:#071713}
.app{position:relative;width:100%;height:100%;overflow:hidden}
.map{position:absolute;inset:0;z-index:1}
.map-loader{position:absolute;z-index:2;left:96px;top:22px;background:rgba(248,255,252,.94);border-radius:18px;padding:14px 16px;box-shadow:0 14px 34px rgba(0,0,0,.18);display:flex;flex-direction:column;gap:4px;max-width:320px}
.map-loader strong{font-size:15px}.map-loader span{font-size:13px;color:var(--muted)}

.left-rail{position:absolute;z-index:20;left:0;top:0;bottom:0;width:74px;background:rgba(248,255,252,.96);box-shadow:6px 0 24px rgba(0,0,0,.10);display:flex;flex-direction:column;align-items:center;padding:12px 8px;gap:8px}
.rail-logo{width:52px;height:52px;border:0;background:transparent;padding:0;border-radius:16px;overflow:hidden}
.rail-logo img{width:100%;height:100%;object-fit:cover}
.rail-btn{width:58px;min-height:60px;border:0;border-radius:18px;background:transparent;color:#62736f;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:11px;font-weight:800}
.rail-btn span{font-size:22px;line-height:1}.rail-btn.active{background:#D9F5E9;color:#0A6E4C}

.side-panel{position:absolute;z-index:18;left:74px;top:14px;bottom:14px;width:380px;background:rgba(248,255,252,.97);border-radius:0 26px 26px 0;box-shadow:0 18px 54px rgba(0,0,0,.22);display:flex;flex-direction:column;overflow:hidden;transition:transform .22s ease}
.app.sidebar-collapsed .side-panel{transform:translateX(-390px)}
.sidebar-open{position:absolute;z-index:21;left:82px;top:18px;width:44px;height:44px;border:0;border-radius:14px;background:#F8FFFC;box-shadow:0 12px 28px rgba(0,0,0,.18);display:none;font-size:22px}
.app.sidebar-collapsed .sidebar-open{display:block}
.panel-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 16px 12px;border-bottom:1px solid var(--line)}
.brand-line{display:flex;align-items:center;gap:10px;min-width:0}.brand-line img{width:48px;height:48px;border-radius:15px}.brand-line strong{display:block;font-size:21px;line-height:1}.brand-line span{display:block;margin-top:4px;color:var(--muted);font-size:12px;font-weight:700}
.collapse-btn{width:38px;height:38px;border:0;border-radius:12px;background:#EDF7F2;font-size:28px;line-height:1;color:#0B211B}
.search-box{margin:14px 16px 10px;height:48px;border-radius:16px;background:#F0F6F3;border:1px solid var(--line);display:flex;align-items:center;gap:9px;padding:0 13px}
.search-box span{opacity:.7}.search-box input{border:0;outline:0;background:transparent;width:100%;font-size:15px;color:var(--text)}
.panel-content{display:flex;flex-direction:column;gap:14px;overflow:auto;padding:4px 16px 20px;overscroll-behavior:contain}
.panel-content.hidden{display:none}
.section-title small{color:#0A7F57;font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:900}
.section-title h1{margin:7px 0 0;font-size:27px;line-height:1;letter-spacing:-.04em}
.chips{display:flex;gap:8px;flex-wrap:wrap}.chip{border:0;border-radius:999px;background:#EEF6F2;color:#314642;padding:10px 12px;font-weight:800}.chip.active{background:#0B211B;color:#fff}
.places-list{display:flex;flex-direction:column;gap:10px}
.place-item{border:1px solid var(--line);border-radius:20px;background:#fff;padding:12px;display:grid;grid-template-columns:62px 1fr;gap:12px;text-align:left}
.place-item.active{border-color:#31B57B;box-shadow:0 10px 22px rgba(49,181,123,.16)}
.place-thumb{height:62px;border-radius:16px;background:linear-gradient(135deg,#31B57B,#2FA7D9);position:relative;overflow:hidden}
.place-thumb:after{content:"";position:absolute;inset:12px;border-radius:12px;background:rgba(255,255,255,.22)}
.place-item small{display:block;color:#0A7F57;font-weight:900;font-size:11px;text-transform:uppercase;letter-spacing:.06em}
.place-item h3{margin:5px 0 4px;font-size:17px;line-height:1.05}.place-item p{margin:0;color:var(--muted);font-size:13px;line-height:1.3}
.offer-mini,.about-card,.scan-card,.profile-card,.history{border:1px solid var(--line);border-radius:22px;background:#fff;padding:16px}
.offer-mini small{color:#0A7F57;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.offer-mini h2{margin:8px 0 6px;font-size:22px;line-height:1}.offer-mini p,.about-card p{margin:0 0 14px;color:var(--muted);line-height:1.45}
.offer-mini button,.primary{border:0;border-radius:14px;background:linear-gradient(135deg,var(--green),var(--blue));color:#fff;padding:13px 16px;font-weight:900}
.chain{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.chain span{padding:8px 10px;border-radius:999px;background:#ECF7F2;color:#0A6E4C;font-weight:800}.chain b{color:#0A6E4C}
.qr-frame{position:relative;height:220px;border-radius:22px;background:#F0F6F3;display:grid;place-items:center;overflow:hidden;margin-bottom:14px}.qr-frame span{font-size:52px;font-weight:900;opacity:.16}.qr-frame i{position:absolute;width:110px;height:110px;border-radius:24px;background:linear-gradient(135deg,var(--green),var(--blue));opacity:.13}
.scan-card p{color:var(--muted);line-height:1.45}.profile-card img{width:82px;height:82px;border-radius:24px}.profile-card h1{font-size:30px;margin:12px 0 8px}.profile-card strong{display:block;color:#0A6E4C;font-size:36px}.profile-card p{color:var(--muted);line-height:1.45}.profile-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px}.profile-stats div{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;text-align:center}.profile-stats strong{display:block;font-size:28px}.profile-stats span{color:var(--muted);font-size:13px}.history h2{margin:0 0 10px;font-size:22px}.history-item{padding:12px 0;border-top:1px solid var(--line)}.history-item:first-child{border-top:0}.history-item strong{display:block}.history-item span{display:block;color:var(--muted);font-size:13px;margin-top:3px}

.place-detail{position:absolute;z-index:17;right:14px;top:14px;bottom:14px;width:430px;background:rgba(248,255,252,.98);border-radius:28px;box-shadow:0 18px 54px rgba(0,0,0,.22);overflow:hidden;display:flex;flex-direction:column;transition:transform .22s ease, opacity .22s ease}
.place-detail.closed{transform:translateX(455px);opacity:0;pointer-events:none}
.detail-scroll{overflow:auto;overscroll-behavior:contain;height:100%;position:relative}.detail-photos{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:8px;padding:12px;height:154px}.detail-photos div{border-radius:18px;background:linear-gradient(135deg,#D8EFE7,#78DDB7)}.photo-main{background:linear-gradient(135deg,#0B211B,#31B57B)!important}.photo-secondary{background:linear-gradient(135deg,#BAE8F7,#31B57B)!important}.photo-third{background:linear-gradient(135deg,#F2E7B8,#2FA7D9)!important}
.detail-close{position:absolute;right:20px;top:116px;width:46px;height:46px;border:0;border-radius:15px;background:rgba(16,35,30,.76);color:#fff;font-size:32px}
.detail-body{padding:10px 22px 24px}.detail-body small{color:#0A7F57;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.detail-body h2{font-size:34px;line-height:1.02;letter-spacing:-.04em;margin:8px 0 4px}.category{margin:0 0 10px;color:var(--muted);font-size:16px}.rating-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:10px 0 16px}.stars{color:#FFB84D;letter-spacing:-2px}.rating-row b{font-size:18px}.rating-row span:last-child{color:var(--muted)}
.offer-strip{padding:14px;border-radius:18px;background:#EEF8F3;margin-bottom:16px}.offer-strip strong{display:block;font-size:17px}.offer-strip span{display:block;color:var(--muted);font-size:13px;margin-top:4px}
.tabs-mini{display:flex;gap:8px;overflow:auto;margin-bottom:14px}.tabs-mini button{border:0;border-radius:14px;background:#EEF2F0;color:#4B625D;padding:11px 14px;font-weight:800}.tabs-mini .active{background:#0B211B;color:#fff}
.info-block{padding:16px 0;border-top:1px solid var(--line)}.info-block h3{margin:0 0 8px;font-size:18px}.info-block p{margin:0;color:var(--muted);line-height:1.45}.outline-btn{margin-top:12px;border:1px solid var(--line);border-radius:14px;background:#fff;padding:12px 14px;font-weight:800}.detail-scan{width:100%;margin-top:6px}

.mobile-top,.mobile-sheet,.mobile-tabs{display:none}

.ymaps-2-1-79-copyrights-pane{margin-bottom:8px!important}

@media(max-width:900px){
  html,body{background:#071713}
  .left-rail,.side-panel,.sidebar-open,.place-detail{display:none}
  .map{inset:0}
  .map-loader{left:16px;top:80px}
  .mobile-top{display:flex;position:absolute;z-index:20;top:calc(env(safe-area-inset-top) + 14px);left:14px;right:14px;gap:10px}
  .mobile-search{height:50px;flex:1;border-radius:16px;background:rgba(28,31,31,.88);display:flex;align-items:center;gap:10px;padding:0 14px;color:#BFC8C5;backdrop-filter:blur(12px)}.mobile-search input{width:100%;border:0;outline:0;background:transparent;color:#fff;font-size:17px}
  #mobile-menu{width:50px;border:0;border-radius:16px;background:rgba(28,31,31,.88);color:#fff;font-size:24px}
  .mobile-tabs{position:absolute;z-index:30;left:0;right:0;bottom:0;height:76px;background:rgba(24,26,26,.96);display:grid;grid-template-columns:repeat(4,1fr);padding:8px 6px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -10px 30px rgba(0,0,0,.24)}
  .mobile-tabs button{border:0;background:transparent;color:#9DA9A5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:11px;font-weight:800}.mobile-tabs button span{font-size:22px}.mobile-tabs .active{color:#49EC94}
  .mobile-sheet{display:block;position:absolute;z-index:25;left:0;right:0;bottom:76px;max-height:62vh;background:#202222;color:#fff;border-radius:28px 28px 0 0;box-shadow:0 -18px 40px rgba(0,0,0,.34);padding:8px 16px 18px;transform:translateY(calc(100% - 184px));transition:transform .22s ease;overflow:auto;overscroll-behavior:contain}
  .mobile-sheet.expanded{transform:translateY(0)}
  .sheet-handle{width:42px;height:5px;border-radius:999px;background:#555;margin:0 auto 10px}
  .mobile-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}.mobile-photos div{height:78px;border-radius:16px;background:linear-gradient(135deg,#153A31,#48D993)}.mobile-photos div:nth-child(2){background:linear-gradient(135deg,#224B55,#8FE3FF)}.mobile-photos div:nth-child(3){background:linear-gradient(135deg,#48402A,#58E18B)}
  .mobile-sheet-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.mobile-sheet h2{font-size:26px;margin:0 0 5px}.mobile-sheet p{margin:0;color:#AAB4B1}.mobile-sheet-head button{width:48px;height:48px;border:0;border-radius:14px;background:#333;color:#fff;font-size:32px}
  .mobile-rating{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0}.mobile-rating span{color:#FFB84D;letter-spacing:-2px}.mobile-rating em{color:#AAB4B1;font-style:normal}.mobile-address{font-size:16px;color:#DADFDA!important;margin:8px 0 12px!important}
  .mobile-actions{display:flex;gap:9px;margin:12px 0}.mobile-actions .primary{flex:1}.round-btn{width:48px;border:0;border-radius:14px;background:#333;color:#fff;font-size:22px}
  .mobile-offer{padding:14px;border-radius:16px;background:#303333;color:#E8F6EF;font-weight:800}
}


/* v0.5.1 mobile fix */
@media(max-width:900px){
  .side-panel{
    display:flex;
    position:absolute;
    z-index:32;
    left:0;
    right:0;
    top:auto;
    bottom:76px;
    width:auto;
    max-height:68vh;
    border-radius:28px 28px 0 0;
    transform:translateY(110%);
    transition:transform .22s ease;
    box-shadow:0 -18px 44px rgba(0,0,0,.34);
  }
  .app.mobile-panel-open .side-panel{
    transform:translateY(0);
  }
  .app.mobile-panel-open .mobile-sheet{
    transform:translateY(110%);
  }
  .app.sidebar-collapsed .side-panel{
    transform:translateY(110%);
  }
  .panel-top{
    padding:12px 16px 10px;
    background:#F8FFFC;
    border-bottom:1px solid var(--line);
  }
  .collapse-btn{
    width:42px;
    height:42px;
    font-size:0;
  }
  .collapse-btn::before{
    content:"×";
    font-size:30px;
    line-height:1;
  }
  .search-box{
    margin:10px 16px;
  }
  .panel-content{
    max-height:calc(68vh - 128px);
    padding-bottom:22px;
  }
  .section-title h1{
    font-size:24px;
  }
  .places-list{
    padding-bottom:10px;
  }
  .place-item{
    grid-template-columns:54px 1fr;
    border-radius:18px;
  }
  .place-thumb{
    height:54px;
    border-radius:14px;
  }
  .offer-mini h2{
    font-size:21px;
  }
  .qr-frame{
    height:190px;
  }
  .profile-card h1{
    font-size:26px;
  }
  .profile-card strong{
    font-size:32px;
  }
  .mobile-sheet{
    z-index:27;
  }
  .mobile-sheet:not(.expanded){
    transform:translateY(calc(100% - 156px));
  }
  .mobile-sheet.expanded{
    transform:translateY(0);
  }
  .map-loader{
    top:78px;
    left:14px;
    right:14px;
    max-width:none;
  }
}


/* v0.5.2 polish */
:root{
  --panel-shadow: 0 18px 54px rgba(0,0,0,.20);
}
.left-rail{
  width:68px;
  padding:10px 7px;
}
.rail-logo{
  width:50px;
  height:50px;
}
.rail-btn{
  width:54px;
  min-height:58px;
  border-radius:17px;
  transition:background .16s ease, color .16s ease, transform .16s ease;
}
.rail-btn:hover{
  background:#EEF8F3;
  transform:translateY(-1px);
}
.rail-btn.active{
  background:#C7F1DF;
}
.side-panel{
  left:68px;
  top:12px;
  bottom:12px;
  width:372px;
  border-radius:0 24px 24px 0;
  box-shadow:var(--panel-shadow);
}
.app.sidebar-collapsed .side-panel{
  transform:translateX(-382px);
}
.sidebar-open{
  left:78px;
}
.panel-top{
  padding:14px 14px 10px;
}
.brand-line img{
  width:44px;
  height:44px;
  border-radius:14px;
}
.brand-line strong{
  font-size:20px;
}
.search-box{
  height:46px;
  margin:12px 14px 10px;
  background:#F1F7F4;
  box-shadow: inset 0 0 0 1px rgba(16,35,30,.05);
}
.quick-status{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  padding:0 14px 12px;
}
.quick-status div{
  background:#F1F8F4;
  border:1px solid rgba(16,35,30,.06);
  border-radius:16px;
  padding:10px 8px;
}
.quick-status strong{
  display:block;
  color:#0A6E4C;
  font-size:18px;
  line-height:1;
}
.quick-status span{
  display:block;
  margin-top:4px;
  color:#6C817B;
  font-size:11px;
  font-weight:800;
}
.panel-content{
  padding:0 14px 18px;
  gap:12px;
}
.section-title h1{
  font-size:24px;
  letter-spacing:-.035em;
}
.chip{
  padding:9px 12px;
  font-size:13px;
}
.place-item{
  padding:10px;
  border-radius:18px;
  grid-template-columns:56px 1fr;
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.place-item:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 20px rgba(16,35,30,.08);
}
.place-thumb{
  height:56px;
  border-radius:15px;
}
.place-item h3{
  font-size:16px;
}
.place-item p{
  font-size:12px;
}
.place-detail{
  top:12px;
  right:12px;
  bottom:12px;
  width:418px;
  border-radius:26px;
  box-shadow:var(--panel-shadow);
}
.place-detail.closed{
  transform:translateX(435px);
}
.detail-photos{
  height:132px;
  gap:7px;
  padding:10px;
}
.detail-photos div{
  border-radius:16px;
}
.detail-close{
  top:96px;
  right:18px;
  width:42px;
  height:42px;
  border-radius:14px;
  font-size:28px;
}
.detail-body{
  padding:8px 20px 22px;
}
.detail-body h2{
  font-size:30px;
}
.category{
  font-size:15px;
}
.rating-row{
  margin:8px 0 13px;
}
.offer-strip{
  padding:13px;
  border-radius:16px;
  margin-bottom:13px;
}
.tabs-mini{
  margin-bottom:10px;
}
.tabs-mini button{
  padding:10px 12px;
  border-radius:13px;
}
.info-block{
  padding:13px 0;
}
.info-block h3{
  font-size:17px;
}
.map-float-controls{
  position:absolute;
  z-index:12;
  right:448px;
  bottom:18px;
  display:flex;
  gap:8px;
}
.map-float-controls button{
  width:44px;
  height:44px;
  border:0;
  border-radius:14px;
  background:rgba(248,255,252,.96);
  color:#10231E;
  font-size:22px;
  font-weight:900;
  box-shadow:0 10px 24px rgba(0,0,0,.16);
}
.app.sidebar-collapsed .map-float-controls{
  right:22px;
}
.mobile-sheet{
  will-change:transform;
}

@media(max-width:900px){
  .map-float-controls{
    display:none;
  }
  .mobile-top{
    top:calc(env(safe-area-inset-top) + 10px);
    left:12px;
    right:12px;
  }
  .mobile-search{
    height:48px;
    border-radius:15px;
    background:rgba(23,25,25,.90);
  }
  #mobile-menu{
    width:48px;
    border-radius:15px;
  }
  .mobile-sheet{
    bottom:72px;
    max-height:66vh;
    padding:7px 14px 16px;
    background:rgba(31,33,33,.98);
    border-radius:24px 24px 0 0;
  }
  .mobile-sheet:not(.expanded){
    transform:translateY(calc(100% - 132px));
  }
  .mobile-photos{
    gap:7px;
    margin-bottom:9px;
  }
  .mobile-photos div{
    height:62px;
    border-radius:14px;
  }
  .mobile-sheet h2{
    font-size:24px;
  }
  .mobile-sheet p{
    font-size:15px;
  }
  .mobile-rating{
    margin:8px 0;
  }
  .mobile-address{
    font-size:15px!important;
    margin:6px 0 10px!important;
  }
  .mobile-actions{
    margin:10px 0;
  }
  .mobile-actions .primary{
    min-height:44px;
    padding:12px;
    border-radius:14px;
  }
  .round-btn{
    width:44px;
    border-radius:14px;
  }
  .mobile-offer{
    padding:12px 13px;
    border-radius:14px;
    font-size:14px;
  }
  .mobile-tabs{
    height:72px;
    padding-top:6px;
  }
  .mobile-tabs button{
    font-size:10px;
  }
  .mobile-tabs button span{
    font-size:21px;
  }
  .side-panel{
    bottom:72px;
    max-height:70vh;
  }
  .app.mobile-panel-open .side-panel{
    box-shadow:0 -22px 50px rgba(0,0,0,.38);
  }
  .quick-status{
    padding:0 16px 10px;
  }
}

@media(max-width:480px){
  .mobile-sheet:not(.expanded){
    transform:translateY(calc(100% - 122px));
  }
  .mobile-photos div{
    height:56px;
  }
  .mobile-sheet h2{
    font-size:22px;
  }
}


/* v0.5.3 hard mobile panel fix */
@media(max-width:900px){
  .side-panel{
    display:none !important;
    transform:none !important;
  }

  .app.mobile-panel-open .side-panel{
    display:flex !important;
    position:absolute;
    z-index:34;
    left:0;
    right:0;
    top:auto;
    bottom:72px;
    width:auto;
    max-height:70vh;
    border-radius:26px 26px 0 0;
    box-shadow:0 -22px 50px rgba(0,0,0,.38);
  }

  .app.mobile-panel-open .mobile-sheet{
    display:none !important;
  }

  .panel-content{
    max-height:calc(70vh - 132px);
    overflow:auto;
    overscroll-behavior:contain;
  }

  .collapse-btn{
    display:grid;
    place-items:center;
  }

  .mobile-tabs button.active{
    color:#49EC94;
  }
}


/* v0.5.4 UI tidy */
:root{--accent:#31B57B;--accent-2:#2FA7D9;--soft:#EAF8F1;--soft-2:#F5FBF8;}
.collapse-btn,.sidebar-open{
  width:42px !important;
  height:42px !important;
  border:1px solid rgba(49,181,123,.18) !important;
  border-radius:14px !important;
  background:#F4FBF7 !important;
  color:#0A6E4C !important;
  box-shadow:0 10px 24px rgba(0,0,0,.10) !important;
  font-size:30px !important;
  line-height:1 !important;
  display:grid;
  place-items:center;
}
.collapse-btn{font-weight:500;}
.sidebar-open{font-weight:500;}
.app.sidebar-collapsed .sidebar-open{display:grid !important;}

.map-float-controls{
  right:16px !important;
  bottom:16px !important;
  gap:10px !important;
  background:rgba(248,255,252,.96) !important;
  border:1px solid rgba(49,181,123,.14) !important;
  border-radius:18px !important;
  padding:8px !important;
  box-shadow:0 16px 34px rgba(0,0,0,.16) !important;
}
.map-float-controls button{
  width:44px !important;
  height:44px !important;
  border:none !important;
  border-radius:14px !important;
  background:#EAF8F1 !important;
  color:#0A6E4C !important;
  font-size:24px !important;
  font-weight:700 !important;
  box-shadow:none !important;
}
.map-float-controls button:hover{background:#D9F3E7 !important;}

.rating-row{display:flex !important;align-items:center !important;gap:10px !important;flex-wrap:wrap;}
.stars{display:none !important;}
.xp-pill{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;background:#EAF8F1;color:#0A6E4C;font-weight:900;font-size:14px;line-height:1;border:1px solid rgba(49,181,123,.18);}
.xp-pill-mobile{padding:7px 12px;font-size:13px;}

.detail-close{
  top:18px !important;
  right:18px !important;
  width:42px !important;
  height:42px !important;
  border-radius:14px !important;
  background:#F3FBF7 !important;
  color:#0A6E4C !important;
  border:1px solid rgba(49,181,123,.18) !important;
  box-shadow:0 8px 24px rgba(0,0,0,.10) !important;
  font-size:28px !important;
}
.detail-body{padding-top:10px !important;}
.tabs-mini button,.outline-btn,.offer-mini button,.primary,.round-btn{border-radius:14px !important;}
.round-btn{background:#EAF8F1 !important;color:#0A6E4C !important;border:1px solid rgba(49,181,123,.18) !important;}

/* desktop side icons and pills unify */
.rail-btn span{color:#0A6E4C;}
.rail-btn{color:#4E6660 !important;}
.rail-btn.active{background:#DDF5EA !important;color:#0A6E4C !important;}

/* Yandex balloon visual */
[class*="balloon__layout"]{
  border-radius:16px !important;
  border:1px solid rgba(49,181,123,.55) !important;
  box-shadow:0 14px 32px rgba(0,0,0,.14) !important;
  overflow:hidden !important;
}
[class*="balloon__content"]{
  border-radius:16px !important;
}
[class*="balloon__tail"]:after{
  box-shadow:none !important;
  border-top-color:#31B57B !important;
}
[class*="balloon__close-button"]{opacity:.75 !important;}

@media (max-width: 900px){
  .mobile-top{
    right:14px !important;
    display:block !important;
  }
  .mobile-search{
    width:100% !important;
  }
  #mobile-menu{display:none !important;}
  .mobile-actions{display:block !important;}
  .mobile-actions .primary{width:100% !important;}
  .mobile-actions .round-btn{display:none !important;}
  .mobile-rating{display:flex !important;align-items:center !important;gap:10px !important;}
  .mobile-rating span:not(.xp-pill-mobile){display:none !important;}
  .mobile-sheet-head button{
    position:absolute;
    top:14px;
    right:14px;
    width:42px !important;
    height:42px !important;
    border-radius:14px !important;
    background:#2A2E2D !important;
    color:#E8F5EF !important;
    font-size:28px !important;
  }
  .mobile-sheet{padding-top:16px !important;}
  .mobile-sheet-head{position:relative;padding-right:56px;}
  .map-float-controls{
    right:12px !important;
    bottom:92px !important;
    padding:7px !important;
    border-radius:16px !important;
  }
  .map-float-controls button{
    width:40px !important;
    height:40px !important;
    font-size:22px !important;
  }
}


/* v0.5.5 arrows, mobile clean, venue/user XP */
.collapse-btn{
  position:absolute !important;
  right:-22px !important;
  top:22px !important;
  z-index:5 !important;
  width:42px !important;
  height:42px !important;
  border-radius:14px !important;
  background:#F5FBF8 !important;
  color:#0A6E4C !important;
  border:1px solid rgba(49,181,123,.22) !important;
  box-shadow:0 12px 28px rgba(0,0,0,.16) !important;
  display:grid !important;
  place-items:center !important;
  font-size:30px !important;
}
.sidebar-open{
  display:none !important;
  position:absolute !important;
  z-index:21 !important;
  left:72px !important;
  top:22px !important;
  width:42px !important;
  height:42px !important;
  border-radius:14px !important;
  background:#F5FBF8 !important;
  color:#0A6E4C !important;
  border:1px solid rgba(49,181,123,.22) !important;
  box-shadow:0 12px 28px rgba(0,0,0,.16) !important;
  font-size:30px !important;
  line-height:1 !important;
  place-items:center !important;
}
.app.sidebar-collapsed .sidebar-open{
  display:grid !important;
}
.app.sidebar-collapsed .collapse-btn{
  display:none !important;
}
.panel-top{
  position:relative !important;
  padding-right:30px !important;
}

.rating-row{
  display:flex !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:8px !important;
}
.rating-pill{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  padding:8px 11px;
  border-radius:999px;
  font-weight:900;
  font-size:13px;
  line-height:1;
  white-space:nowrap;
}
.venue-rating{
  background:#E9F8F1;
  color:#087A5C;
  border:1px solid rgba(49,181,123,.22);
}
.guest-rating{
  background:#EAF5F7;
  color:#16708A;
  border:1px solid rgba(47,167,217,.20);
}
.visits-label,
#detail-visits,
#mobile-visits{
  color:#60746F !important;
  font-size:14px;
}
.stars,
#detail-rating,
#mobile-rating-num{
  display:none !important;
}
.detail-close{
  top:18px !important;
  right:18px !important;
  width:42px !important;
  height:42px !important;
  border-radius:14px !important;
  background:#F5FBF8 !important;
  color:#0A6E4C !important;
  border:1px solid rgba(49,181,123,.22) !important;
  box-shadow:0 12px 28px rgba(0,0,0,.16) !important;
  font-size:28px !important;
}

@media(max-width:900px){
  .sidebar-open,
  .collapse-btn{
    display:none !important;
  }

  .mobile-top{
    right:14px !important;
  }

  #mobile-menu{
    display:none !important;
  }

  #mobile-close{
    display:none !important;
  }

  .mobile-sheet-head{
    padding-right:0 !important;
  }

  .sheet-handle{
    cursor:pointer;
    width:48px !important;
    height:5px !important;
    border-radius:999px !important;
    background:#555 !important;
  }

  .mobile-rating{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:8px !important;
    align-items:center !important;
  }

  .mobile-actions{
    display:block !important;
  }

  .mobile-actions .primary{
    width:100% !important;
  }

  .mobile-actions .round-btn{
    display:none !important;
  }

  .mobile-sheet:not(.expanded){
    transform:translateY(calc(100% - 126px)) !important;
  }

  .mobile-sheet.expanded{
    transform:translateY(0) !important;
  }
}


/* v0.5.6 arrow visibility fix */
.side-panel{overflow:visible !important;}
.panel-content,.profile-scroll,.detail-scroll{overflow:auto;}
.collapse-btn{right:-18px !important; top:18px !important; font-size:28px !important; font-weight:700 !important; color:#0A6E4C !important; background:#F6FCF9 !important; display:grid !important; place-items:center !important; padding:0 !important;}
.collapse-btn::before{content:none !important; display:none !important;}
.sidebar-open{left:86px !important; top:18px !important; font-size:28px !important; font-weight:700 !important; display:none !important; place-items:center !important; padding:0 !important;}
.app.sidebar-collapsed .sidebar-open{display:grid !important;}
.app.sidebar-collapsed .collapse-btn{display:none !important;}
@media (max-width:900px){
  .collapse-btn,.sidebar-open{display:none !important;}
  .side-panel{overflow:hidden !important;}
}


/* v0.5.7 single clean side toggle */
#collapse-btn,
#sidebar-open,
.collapse-btn,
.sidebar-open{
  display:none !important;
}

.side-toggle{
  position:absolute;
  z-index:42;
  left:440px;
  top:22px;
  width:36px;
  height:52px;
  border:1px solid rgba(49,181,123,.22);
  border-left:0;
  border-radius:0 16px 16px 0;
  background:rgba(248,255,252,.97);
  color:#087A5C;
  box-shadow:0 12px 26px rgba(0,0,0,.14);
  font-size:30px;
  line-height:1;
  font-weight:700;
  display:grid;
  place-items:center;
  padding:0 2px 2px 0;
  transition:left .22s ease, background .16s ease, box-shadow .16s ease;
}

.side-toggle:hover{
  background:#EAF8F1;
  box-shadow:0 14px 30px rgba(0,0,0,.18);
}

.app.sidebar-collapsed .side-toggle{
  left:68px;
}

.side-panel{
  overflow:hidden !important;
}

.side-panel .panel-content{
  overflow:auto !important;
}

/* Wider mobile breakpoint: fixes desktop-resized mobile view */
@media(max-width:1100px){
  .left-rail,
  .side-toggle,
  .place-detail{
    display:none !important;
  }

  .side-panel{
    display:none !important;
    transform:none !important;
  }

  .app.mobile-panel-open .side-panel{
    display:flex !important;
    position:absolute;
    z-index:34;
    left:0;
    right:0;
    top:auto;
    bottom:72px;
    width:auto;
    max-height:70vh;
    border-radius:26px 26px 0 0;
    box-shadow:0 -22px 50px rgba(0,0,0,.38);
  }

  .app.mobile-panel-open .mobile-sheet{
    display:none !important;
  }

  .mobile-top{
    display:flex !important;
    position:absolute;
    z-index:20;
    top:calc(env(safe-area-inset-top) + 10px);
    left:12px;
    right:12px;
    gap:10px;
  }

  .mobile-search{
    height:48px;
    width:100%;
    flex:1;
    border-radius:15px;
    background:rgba(23,25,25,.90);
    display:flex;
    align-items:center;
    gap:10px;
    padding:0 14px;
    color:#BFC8C5;
    backdrop-filter:blur(12px);
  }

  .mobile-search input{
    width:100%;
    border:0;
    outline:0;
    background:transparent;
    color:#fff;
    font-size:17px;
  }

  #mobile-menu{
    display:none !important;
  }

  .mobile-tabs{
    position:absolute;
    z-index:30;
    left:0;
    right:0;
    bottom:0;
    height:72px;
    background:rgba(24,26,26,.96);
    display:grid !important;
    grid-template-columns:repeat(4,1fr);
    padding:6px 6px calc(8px + env(safe-area-inset-bottom));
    box-shadow:0 -10px 30px rgba(0,0,0,.24);
  }

  .mobile-tabs button{
    border:0;
    background:transparent;
    color:#9DA9A5;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    font-size:10px;
    font-weight:800;
  }

  .mobile-tabs button span{
    font-size:21px;
  }

  .mobile-tabs button.active{
    color:#49EC94;
  }

  .mobile-sheet{
    display:block !important;
    position:absolute;
    z-index:25;
    left:0;
    right:0;
    bottom:72px;
    max-height:66vh;
    background:rgba(31,33,33,.98);
    color:#fff;
    border-radius:24px 24px 0 0;
    box-shadow:0 -18px 40px rgba(0,0,0,.34);
    padding:16px 14px 16px;
    overflow:auto;
    overscroll-behavior:contain;
    transform:translateY(calc(100% - 126px));
    transition:transform .22s ease;
  }

  .mobile-sheet.expanded{
    transform:translateY(0);
  }

  #mobile-close{
    display:none !important;
  }

  .mobile-sheet-head{
    padding-right:0 !important;
  }

  .sheet-handle{
    cursor:pointer;
    width:48px !important;
    height:5px !important;
    border-radius:999px !important;
    background:#555 !important;
    margin:0 auto 10px;
  }

  .mobile-actions{
    display:block !important;
  }

  .mobile-actions .primary{
    width:100% !important;
  }

  .mobile-actions .round-btn,
  .round-btn{
    display:none !important;
  }

  .map-float-controls{
    display:none !important;
  }
}


/* v0.5.8 integrated panel toggle */
.collapse-btn,
.sidebar-open,
.side-toggle,
#collapse-btn,
#sidebar-open,
#side-toggle{
  display:none !important;
}

.side-panel{
  overflow:visible !important;
}

.side-panel::after{
  content:"";
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  width:1px;
  background:rgba(49,181,123,.12);
  pointer-events:none;
}

.panel-content{
  overflow:auto !important;
}

.panel-top{
  position:relative !important;
  padding-right:52px !important;
}

.panel-toggle{
  position:absolute;
  right:10px;
  top:16px;
  z-index:10;
  width:34px;
  height:44px;
  border:1px solid rgba(49,181,123,.20);
  border-radius:14px;
  background:#EEF8F3;
  color:#087A5C;
  box-shadow:0 8px 20px rgba(16,35,30,.10);
  display:grid;
  place-items:center;
  padding:0;
  transition:transform .18s ease, background .18s ease, box-shadow .18s ease, right .22s ease, left .22s ease;
}

.panel-toggle span{
  display:block;
  font-size:28px;
  font-weight:800;
  line-height:1;
  transform:translateY(-1px);
}

.panel-toggle:hover{
  background:#DDF5EA;
  box-shadow:0 10px 24px rgba(16,35,30,.14);
}

.app.sidebar-collapsed .side-panel{
  transform:translateX(-390px) !important;
}

.app.sidebar-collapsed .panel-toggle{
  right:-46px;
  background:#F8FFFC;
  border-color:rgba(49,181,123,.22);
  box-shadow:0 12px 28px rgba(0,0,0,.16);
}

@media(max-width:1100px){
  .panel-toggle{
    display:none !important;
  }

  .side-panel{
    overflow:hidden !important;
  }

  .app.sidebar-collapsed .side-panel{
    transform:none !important;
  }
}


/* v0.5.9 toggle click fix */
.panel-toggle{
  pointer-events:auto !important;
  z-index:999 !important;
  user-select:none !important;
}

.panel-toggle span{
  pointer-events:none !important;
}

.side-panel{
  pointer-events:auto !important;
}

.app.sidebar-collapsed .side-panel{
  pointer-events:none !important;
}

.app.sidebar-collapsed .panel-toggle{
  pointer-events:auto !important;
}

/* keep the toggle visible/clickable even when panel is shifted */
.app.sidebar-collapsed .side-panel{
  overflow:visible !important;
}

.empty-list {
  padding: 16px;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 18px;
  color: rgba(255,255,255,.68);
  font-size: 14px;
}


/* v0.6.1 real receipt scan form */
.scan-label{
  display:block;
  margin:14px 0 8px;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}
.qrraw-input{
  width:100%;
  box-sizing:border-box;
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px 13px;
  resize:vertical;
  min-height:94px;
  font:600 13px/1.45 Inter,Arial,sans-serif;
  color:#15231f;
  background:#F7FBF9;
  outline:none;
}
.qrraw-input:focus{
  border-color:rgba(49,181,123,.55);
  box-shadow:0 0 0 4px rgba(49,181,123,.12);
}
.scan-actions{
  display:grid;
  gap:10px;
  margin-top:12px;
}
.scan-card .outline-btn{
  width:100%;
}
.scan-card .primary[disabled]{
  opacity:.62;
  cursor:wait;
}
#scan-status.ok{color:#0A6E4C;font-weight:800;}
#scan-status.error{color:#B3261E;font-weight:800;}


/* v0.6.4 backend profile */
.profile-card #profile-level{
  margin:8px 0 0;
  color:var(--muted);
  font-weight:800;
}
.profile-progress{
  width:100%;
  height:10px;
  margin:14px 0 8px;
  border-radius:999px;
  background:rgba(49,181,123,.14);
  overflow:hidden;
}
.profile-progress span{
  display:block;
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg,#31B57B,#2FA7D9);
  transition:width .35s ease;
}
.profile-next{
  margin-top:6px !important;
  color:var(--muted) !important;
  font-size:13px !important;
  font-weight:800;
}
.history-item{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
}
.history-item strong{
  color:var(--text);
  font-size:14px;
}
.history-item span{
  color:var(--muted);
  font-size:13px;
  text-align:right;
}
