:root{
  --v14-blue-1:#063586;
  --v14-blue-2:#0750c7;
  --v14-blue-3:#0b70e8;
  --v14-card-border:rgba(213,224,239,.88);
  --v14-card-shadow:0 10px 27px rgba(28,67,120,.09);
}

.app-shell[data-current-route="categories"],
.app-shell[data-current-route="categories"] .app-main{
  background:
    radial-gradient(circle at 92% 8%,rgba(45,125,255,.14),transparent 28%),
    radial-gradient(circle at 5% 46%,rgba(92,165,255,.08),transparent 31%),
    linear-gradient(180deg,#f5f8fd 0%,#eef4fb 58%,#f4f7fb 100%);
}
.app-shell[data-current-route="categories"] .app-header{display:none}

#page-categories.v14-market-page{
  min-height:100dvh;
  padding:calc(18px + env(safe-area-inset-top)) 0 12px!important;
  color:#101828;
  font-variant-numeric:tabular-nums;
}

.v13-total-card.v14-blue-card,
.v14-market-card.v14-blue-card{
  position:relative;
  width:calc(100% - 4px);
  height:300px;
  min-height:300px;
  margin-left:2px;
  padding:18px 16px 16px;
  border:1px solid rgba(255,255,255,.17);
  border-radius:28px;
  overflow:hidden;
  color:#fff;
  background:
    radial-gradient(circle at 96% 8%,rgba(35,130,255,.3),transparent 34%),
    linear-gradient(137deg,var(--v14-blue-1) 0%,var(--v14-blue-2) 55%,var(--v14-blue-3) 100%);
  background-size:130% 130%;
  box-shadow:0 18px 42px rgba(18,73,164,.23),inset 0 1px 0 rgba(255,255,255,.15);
  animation:v14-blue-breathe 10s ease-in-out infinite alternate;
}

.v13-total-card.v14-blue-card{margin-bottom:26px}
.v14-market-card.v14-blue-card{margin-bottom:0}

.v13-total-card.v14-blue-card::before,
.v13-total-card.v14-blue-card::after,
.v14-market-card.v14-blue-card::before,
.v14-market-card.v14-blue-card::after{
  content:"";
  position:absolute;
  z-index:0;
  border:1px solid rgba(255,255,255,.105);
  border-radius:50%;
  pointer-events:none;
  animation:v14-arc-drift 10s ease-in-out infinite alternate;
}
.v13-total-card.v14-blue-card::before,
.v14-market-card.v14-blue-card::before{
  width:248px;
  height:248px;
  right:-135px;
  bottom:-127px;
}
.v13-total-card.v14-blue-card::after,
.v14-market-card.v14-blue-card::after{
  width:178px;
  height:178px;
  right:-79px;
  bottom:-91px;
  animation-direction:alternate-reverse;
}
.v13-total-card.v14-blue-card>*,
.v14-market-card.v14-blue-card>*{position:relative;z-index:1}

.v14-home-entering .v13-total-card.v14-blue-card,
.v14-market-entering .v14-market-card.v14-blue-card{
  animation:v14-card-enter .82s cubic-bezier(.2,.78,.22,1) both,v14-blue-breathe 10s .82s ease-in-out infinite alternate;
}

.v14-market-card h1{
  margin:0;
  color:#fff;
  font-size:25px;
  line-height:32px;
  font-weight:730;
  letter-spacing:.04em;
  text-align:center;
}

.v14-market-search{
  display:grid;
  grid-template-columns:25px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  height:50px;
  margin-top:13px;
  padding:0 13px;
  border:1px solid rgba(255,255,255,.17);
  border-radius:15px;
  background:rgba(255,255,255,.105);
  backdrop-filter:blur(14px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.v14-market-search svg{
  width:25px;
  height:25px;
  fill:none;
  stroke:rgba(255,255,255,.9);
  stroke-width:1.8;
  stroke-linecap:round;
}
.v14-market-search #v14MarketSearch{
  width:100%;
  min-width:0;
  height:46px;
  padding:0;
  border:0!important;
  outline:0;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#fff!important;
  font-size:14px;
}
.v14-market-search #v14MarketSearch::placeholder{color:rgba(255,255,255,.68)!important;opacity:1}
.v14-market-search button{
  width:1px;
  height:1px;
  padding:0;
  border:0;
  overflow:hidden;
  clip-path:inset(50%);
}

.v14-market-categories{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px 7px;
  margin-top:13px;
}
.v14-market-categories button{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-width:0;
  height:67px;
  padding:5px 2px;
  border:1px solid transparent;
  border-radius:15px;
  background:transparent;
  color:rgba(255,255,255,.86);
  transition:transform .2s cubic-bezier(.2,.8,.2,1),border-color .2s,background-color .2s,color .2s;
}
.v14-market-categories button>span{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
}
.v14-market-categories svg{
  width:29px;
  height:29px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.v14-market-categories b{
  max-width:100%;
  margin-top:3px;
  overflow:hidden;
  font-size:11px;
  line-height:16px;
  font-weight:570;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.v14-market-categories button.is-active{
  border-color:rgba(255,255,255,.78);
  background:rgba(255,255,255,.13);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 7px 20px rgba(0,30,92,.13);
}
.v14-market-categories button:active{transform:scale(.96)}
.v14-market-entering .v14-market-categories button{
  animation:v14-category-enter .44s cubic-bezier(.2,.78,.22,1) both;
  animation-delay:calc(var(--v14-order) * 40ms + 180ms);
}

.v14-subcategory-strip{
  display:flex;
  gap:7px;
  margin:15px -16px 16px;
  padding:1px 18px 4px;
  overflow-x:auto;
  scrollbar-width:none;
  scroll-snap-type:x proximity;
}
.v14-subcategory-strip::-webkit-scrollbar{display:none}
.v14-subcategory-strip button{
  flex:0 0 auto;
  min-height:36px;
  padding:0 13px;
  border:1px solid rgba(215,224,237,.84);
  border-radius:999px;
  background:rgba(255,255,255,.74);
  color:#53637b;
  font-size:12px;
  white-space:nowrap;
  transition:transform .2s,background-color .2s,border-color .2s,color .2s;
}
.v14-subcategory-strip button.is-active{
  border-color:#0967f2;
  background:#0967f2;
  color:#fff;
}
.v14-subcategory-strip button:active{transform:scale(.97)}

.v14-market-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:0 2px 13px;
}
.v14-market-toolbar h2{
  min-width:0;
  margin:0;
  overflow:hidden;
  color:#101828;
  font-size:20px;
  line-height:28px;
  font-weight:740;
  letter-spacing:-.02em;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.v14-market-toolbar>div{display:flex;align-items:center;flex:0 0 auto}
.v14-market-toolbar button{
  min-height:42px;
  padding:0 5px 0 9px;
  border:0;
  background:transparent;
  color:#58677d;
  font-size:11px;
  white-space:nowrap;
}
.v14-market-toolbar button span{margin-left:2px;color:#77859a}

.v14-merchant-grid,
.v13-merchant-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:11px!important;
  width:100%!important;
}

.v14-merchant-card{
  position:relative;
  display:flex;
  flex-direction:column;
  width:100%;
  min-width:0;
  min-height:190px;
  margin:0;
  padding:0;
  border:1px solid var(--v14-card-border);
  border-radius:20px;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 11%,rgba(213,235,255,.48),transparent 39%),
    linear-gradient(148deg,#fff 0%,#fbfdff 54%,#f2f7fd 100%);
  color:#101828;
  text-align:left;
  box-shadow:var(--v14-card-shadow),inset 0 1px 0 rgba(255,255,255,.98);
  transition:transform .2s cubic-bezier(.2,.8,.2,1),box-shadow .2s;
}
.v14-merchant-card::before{
  content:"";
  position:absolute;
  z-index:0;
  width:126px;
  height:126px;
  top:-70px;
  right:-69px;
  border:1px solid rgba(120,167,225,.13);
  border-radius:50%;
  box-shadow:0 0 0 17px rgba(184,216,250,.045);
  pointer-events:none;
}
.v14-merchant-card:active{
  transform:scale(.982);
  box-shadow:0 5px 16px rgba(28,67,120,.07),inset 0 1px 0 #fff;
}
.v14-merchant-visual{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  height:105px;
  padding:10px 10px 6px;
}
.v14-merchant-avatar{
  position:relative;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  width:56px;
  height:56px;
  padding:3px;
  border:2px solid rgba(255,255,255,.97);
  border-radius:50%;
  background:#fff;
  box-shadow:0 0 0 7px rgba(57,132,235,.045),0 7px 18px rgba(31,92,179,.16);
}
.v14-merchant-avatar img{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
}
.v14-merchant-visual>small{
  display:-webkit-box;
  width:100%;
  height:30px;
  margin-top:6px;
  overflow:hidden;
  color:#52627a;
  font-size:9px;
  line-height:15px;
  font-weight:500;
  text-align:center;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.v14-merchant-info{
  position:relative;
  z-index:1;
  display:flex;
  flex:1;
  flex-direction:column;
  min-width:0;
  padding:0 10px 10px;
}
.v14-merchant-name-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  min-width:0;
  min-height:30px;
}
.v14-merchant-name-row>strong{
  min-width:0;
  overflow:hidden;
  color:#111a2c;
  font-size:14px;
  line-height:20px;
  font-weight:720;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.v14-merchant-name-row>span{
  flex:0 0 auto;
  color:#5f6e83;
  font-size:10px;
  white-space:nowrap;
}
.v14-merchant-name-row i{color:#ffad18;font-style:normal}
.v14-merchant-values{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin-top:2px;
  padding-top:8px;
  border-top:1px solid rgba(217,226,238,.92);
}
.v14-merchant-values>span{
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
}
.v14-merchant-values>span+span{padding-left:8px}
.v14-merchant-values>span+span::before{
  content:"";
  position:absolute;
  left:0;
  top:1px;
  width:1px;
  height:33px;
  background:rgba(211,222,236,.92);
}
.v14-merchant-values small{
  overflow:hidden;
  color:#758297;
  font-size:8px;
  line-height:12px;
  font-weight:500;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.v14-merchant-values b{
  margin-top:2px;
  overflow:hidden;
  color:#172033;
  font-size:11px;
  line-height:16px;
  font-weight:730;
  letter-spacing:-.025em;
  white-space:nowrap;
}
.v14-merchant-values em{
  color:#6f7c90;
  font-size:6px;
  line-height:9px;
  font-weight:570;
  font-style:normal;
}
.v14-merchant-grid>.v12-feed-state{grid-column:1/-1}
.v14-merchant-grid .v13-merchant-tail{grid-column:1/-1}

.bottom-nav{
  width:min(calc(100% - 36px),444px)!important;
  height:66px!important;
  bottom:max(10px,env(safe-area-inset-bottom))!important;
  padding:6px!important;
  border-radius:29px!important;
  background:rgba(255,255,255,.86)!important;
  box-shadow:0 14px 38px rgba(32,58,98,.14)!important;
}
.bottom-nav button{
  min-height:52px!important;
  border-radius:20px!important;
  transition:transform .2s,background-color .2s,color .2s!important;
}
.bottom-nav button.is-active{
  color:#0967f2!important;
  background:#eaf3ff!important;
}
.bottom-nav button:active{transform:scale(.97)}

@keyframes v14-card-enter{
  from{opacity:0;transform:translateY(9px)}
  to{opacity:1;transform:none}
}
@keyframes v14-category-enter{
  from{opacity:0;transform:translateY(6px)}
  to{opacity:1;transform:none}
}
@keyframes v14-blue-breathe{
  from{background-position:15% 20%}
  to{background-position:80% 72%}
}
@keyframes v14-arc-drift{
  from{transform:translate3d(0,0,0) scale(1)}
  to{transform:translate3d(-7px,4px,0) scale(1.025)}
}

@media(max-width:390px){
  #page-categories.v14-market-page{padding-top:calc(15px + env(safe-area-inset-top))!important}
  .v13-total-card.v14-blue-card,
  .v14-market-card.v14-blue-card{height:300px;min-height:300px}
  .v14-market-toolbar h2{font-size:19px}
  .v14-market-toolbar button{padding-left:6px;padding-right:3px}
}
@media(max-width:360px){
  .v14-market-categories{gap:7px 4px}
  .v14-market-categories b{font-size:10px}
  .v14-merchant-grid{gap:9px!important}
  .v14-merchant-info{padding-left:8px;padding-right:8px}
  .v14-merchant-values>span+span{padding-left:6px}
  .v14-market-toolbar h2{font-size:18px}
  .v14-market-toolbar button{font-size:10px}
}

@media(prefers-reduced-motion:reduce){
  .v14-blue-card,
  .v14-blue-card::before,
  .v14-blue-card::after,
  .v14-market-categories button,
  .v14-merchant-card,
  .bottom-nav button{
    animation:none!important;
    transition:none!important;
  }
}
