*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#020202;color:#eee;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{overflow-x:hidden}
.bg{position:fixed;inset:0;pointer-events:none;overflow:hidden;opacity:.34;z-index:0}
.bg:before,.bg:after{content:"";position:absolute;inset:-20%;background-image:radial-gradient(circle,rgba(255,255,255,.5) 0 1px,transparent 1.5px);background-size:88px 88px;will-change:transform;animation:snow1 24s linear infinite}
.bg:after{background-size:137px 137px;opacity:.55;animation:snow2 34s linear infinite}
body.post-open .bg{opacity:.42}
body.post-open main,body.post-open .top{filter:none}
@keyframes snow1{from{transform:translate3d(0,-80px,0)}to{transform:translate3d(35px,650px,0)}}
@keyframes snow2{from{transform:translate3d(0,-140px,0)}to{transform:translate3d(-45px,700px,0)}}to{background-position:30px 900px,-50px 850px,45px 950px}}
.top{width:min(900px,calc(100% - 34px));height:82px;margin:auto;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:5}
.brand{font-size:18px;font-weight:800;letter-spacing:.07em;color:#f4f4f4;text-decoration:none}
.brand span{color:#5d5d5d;font-weight:500}
.menu-button,.close-button{width:45px;height:45px;border:1px solid #2b2b2b;border-radius:13px;background:rgba(17,17,17,.86);color:#aaa;cursor:pointer;backdrop-filter:blur(14px)}
.menu-button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px}
.menu-button span{width:17px;height:1px;background:#aaa;display:block}
.directory{width:min(630px,calc(100% - 28px));margin:0 auto 70px;position:relative;z-index:2}
.search-line{margin-bottom:14px}
.search-box{height:47px;border:1px solid #303030;border-radius:13px;background:rgba(15,15,15,.86);display:flex;align-items:center;padding:0 14px;box-shadow:0 8px 24px #0007,inset 0 1px #fff06;backdrop-filter:blur(16px)}
.search-box svg{width:18px;height:18px;stroke:#888;fill:none;stroke-width:1.7;margin-right:10px}
.search-box input{border:0;outline:0;background:none;color:#eee;width:100%;font-size:13px}
.search-box input::placeholder{color:#777}
.cards{display:grid;gap:10px}
.card{height:134px;display:grid;grid-template-columns:136px 1fr 24px;gap:18px;align-items:center;padding:10px;border:1px solid #292929;border-radius:15px;background:linear-gradient(105deg,rgba(15,15,16,.97),rgba(8,8,9,.95));box-shadow:inset 0 1px #fff08,0 7px 22px #0007;cursor:pointer;transition:transform .18s,border-color .18s}
.card:hover{transform:translateY(-1px);border-color:#444}
.card img{width:136px;height:112px;border-radius:11px;object-fit:cover;display:block;filter:grayscale(1);border:1px solid #292929}
.card h3{font-size:16px;margin:0 0 12px;font-weight:650;text-decoration:underline;text-underline-offset:3px}
.card p{margin:0;color:#999;font-size:12px;line-height:1.55;max-width:400px}
.card .arrow{color:#aaa;font-size:27px;text-align:center}
.nothing{display:none;text-align:center;color:#666;padding:60px 0}
.nothing.show{display:block}

.drawer{position:fixed;z-index:20;right:0;top:0;width:330px;max-width:86vw;height:100vh;background:#090909;border-left:1px solid #292929;box-shadow:-35px 0 100px #000;transform:translateX(105%);transition:transform .28s ease;padding:29px 30px}
.drawer.open{transform:translateX(0)}
.drawer-head{display:flex;align-items:center;justify-content:space-between}
.small-title{font-size:9px;letter-spacing:.22em;color:#666;text-transform:uppercase}
.drawer-head .close-button{float:none}
.drawer h2{font-size:36px;letter-spacing:-.04em;margin:32px 0 30px}
.drawer nav a{display:block;color:#aaa;text-decoration:none;font-size:15px;padding:18px 0;border-bottom:1px solid #222}
.drawer p{color:#555;font-size:11px;line-height:1.65;margin-top:32px}

.overlay{position:fixed;inset:0;z-index:15;background:radial-gradient(circle at 50% 45%,#111b,#000d 65%);opacity:0;pointer-events:none;transition:.55s}
.overlay.show{opacity:1;pointer-events:auto}

.profile-modal{position:fixed;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:20px;opacity:0;pointer-events:none;transition:opacity .45s ease}
.profile-modal.show{opacity:1;pointer-events:auto}.profile-modal.show .modal-window{animation:postIn .55s cubic-bezier(.2,.8,.2,1) both}@keyframes postIn{from{opacity:0;transform:translateY(24px) scale(.96);filter:blur(8px)}to{opacity:1;transform:none;filter:none}}
.modal-window{width:min(560px,100%);background:#090909;border:1px solid #303030;border-radius:18px;overflow:hidden;box-shadow:0 35px 110px #000}
.modal-window>img{width:100%;height:260px;display:block;object-fit:cover;filter:grayscale(1)}
.modal-close{position:absolute;right:32px;top:32px;z-index:2;font-size:25px}
.modal-content{padding:25px 27px}
.modal-content h2{font-size:28px;margin:8px 0 4px}
.profile-user{color:#666;font-size:12px}
.modal-content p{color:#999;font-size:13px;line-height:1.7;margin:25px 0}
.profile-id{border-top:1px solid #222;padding-top:15px;color:#555;font-size:9px;letter-spacing:.12em}

@media(max-width:650px){
 .top{height:72px;width:calc(100% - 34px)}
 .directory{width:calc(100% - 28px);margin-top:5px}
 .card{height:133px;grid-template-columns:105px 1fr 16px;gap:12px;padding:9px}
 .card img{width:105px;height:113px}
 .card h3{font-size:14px;margin-bottom:10px}
 .card p{font-size:10.8px;line-height:1.48;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 .card .arrow{font-size:22px}
 .drawer{width:330px;max-width:86vw}
 .modal-window{width:100%}
 .modal-window>img{height:230px}
 .modal-close{right:31px;top:30px}
}

@media(max-width:650px){
 .bg:before,.bg:after{animation-duration:40s}
 .card{box-shadow:inset 0 1px #fff08,0 4px 14px #0006}
}
@media(prefers-reduced-motion:reduce){
 .bg:before,.bg:after,.profile-modal.show .modal-window{animation:none!important}
}

/* ===== PHONE + PC OPTIMIZATION ===== */
@media (min-width: 900px){
  .top{
    width:min(940px,calc(100% - 56px));
    height:86px;
  }
  .brand{font-size:19px}
  .directory{
    width:630px;
    margin-top:18px;
  }
  .search-box{height:48px}
  .card{
    height:134px;
    grid-template-columns:136px minmax(0,1fr) 28px;
    gap:18px;
    padding:10px;
  }
  .card img{width:136px;height:112px}
  .card h3{font-size:16px}
  .card p{font-size:12px}
  .menu-button,.close-button{width:46px;height:46px}
}

@media (min-width: 1400px){
  .directory{width:650px}
  .card{height:136px}
}

@media (max-width: 899px){
  .top{width:calc(100% - 32px)}
  .directory{width:calc(100% - 28px)}
}

@media (max-width: 600px){
  .directory{margin-bottom:45px}
  .card{
    height:128px;
    grid-template-columns:100px minmax(0,1fr) 15px;
    gap:11px;
  }
  .card img{width:100px;height:110px}
  .card h3{font-size:14px}
  .card p{font-size:10.5px}
  .drawer{
    width:min(330px,86vw);
    padding:24px;
  }
  .drawer h2{font-size:32px}
  .modal-window{width:100%}
}

@media (max-width:380px){
  .top{width:calc(100% - 24px)}
  .directory{width:calc(100% - 20px)}
  .card{
    grid-template-columns:88px minmax(0,1fr) 12px;
    gap:9px;
    padding:8px;
  }
  .card img{width:88px;height:108px}
  .card h3{font-size:13px}
  .card p{font-size:10px}
}

/* MENU REMOVED — catalog-only interface */
.menu-button,.menu-toggle,.drawer,.menu-panel,.overlay{display:none!important}
.top{justify-content:flex-start}

/* ===== CATEGORY PILLS ===== */
.category-pills{
  display:flex;
  gap:14px;
  overflow-x:auto;
  padding:12px 0 18px;
  scrollbar-width:none;
}
.category-pills::-webkit-scrollbar{display:none}
.category-pill{
  flex:0 0 auto;
  min-width:118px;
  height:58px;
  padding:0 24px;
  border:1px solid #252525;
  border-radius:32px;
  background:rgba(8,8,8,.78);
  color:#d7d7d7;
  font:inherit;
  font-size:18px;
  cursor:pointer;
  transition:background .18s,border-color .18s,color .18s,transform .18s;
}
.category-pill:hover{border-color:#555;color:#fff}
.category-pill.active{
  background:#111;
  border-color:#666;
  color:#fff;
}
.category-pill:active{transform:scale(.97)}
@media(max-width:650px){
  .category-pills{gap:9px;padding:8px 0 14px}
  .category-pill{
    min-width:auto;
    height:44px;
    padding:0 18px;
    font-size:14px;
  }
}

/* Более округлый поисковик */
.search-box{
  border-radius:32px !important;
  overflow:hidden;
}
.search-box input{
  border-radius:32px !important;
}

/* ===== NATURAL DOT SNOW ===== */
#snowCanvas{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
  opacity:.72;
}
main,.top,.profile-modal,.drawer{position:relative;z-index:1}
