/* Умный поиск на главной (переменные цветов — из site.css) */
.smart{text-align:center;margin:28px 0 10px;padding:30px 20px 24px;border:1px solid var(--line);border-radius:var(--r);
  background:radial-gradient(120% 140% at 0% 0%,#ff8a3d29,transparent 55%),radial-gradient(120% 140% at 100% 100%,#7c3aed24,transparent 55%),var(--card)}
.smart-title{margin:0;font-size:1.8rem;font-weight:800;letter-spacing:-.01em}
.smart-sub{color:var(--muted);margin:8px auto 18px;max-width:640px}
.smart-form{display:flex;gap:10px;max-width:760px;margin:0 auto;align-items:center}
.smart-input{flex:1;min-width:0;height:54px;padding:0 20px;font:inherit;font-size:1.05rem;color:var(--fg);background:var(--bg);
  border:1px solid var(--line);border-radius:99px;outline:none}
.smart-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #e8590c33}
.smart-go{flex:none;height:54px;padding:0 26px;font:inherit;font-weight:800;color:#fff;cursor:pointer;border:0;border-radius:99px;
  background:linear-gradient(135deg,#ff8a3d,#e8590c);box-shadow:0 8px 20px #e8590c4d;transition:filter .15s,transform .15s}
.smart-go:hover{filter:brightness(1.07);transform:translateY(-1px)}
.smart-surprise{flex:none;display:inline-flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:50%;
  color:var(--fg);background:var(--bg);border:1px solid var(--line);transition:border-color .15s,color .15s}
.smart-surprise:hover{border-color:var(--accent);color:var(--accent)}
.smart-hints{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:16px auto 0;max-width:860px}
.smart-hint{padding:6px 14px;font-size:.9rem;color:var(--fg);text-decoration:none;background:var(--bg);border:1px solid var(--line);border-radius:99px}
.smart-hint:hover{border-color:var(--accent);color:var(--accent)}
.smart-results{text-align:left;margin-top:20px}
.smart-results:empty{display:none}
.smart.loading .smart-results{opacity:.45;transition:opacity .2s}
.smart-msg{text-align:center;color:var(--muted);margin:6px 0}
.smart-msg.err{color:var(--bad)}
.smart-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px}
.smart-chips-l{color:var(--muted);font-size:.9rem}
.smart-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;font-size:.9rem;color:var(--fg);text-decoration:none;
  background:var(--bg);border:1px solid var(--accent);border-radius:99px}
.smart-chip b{color:var(--muted);font-weight:700}
.smart-chip:hover b{color:var(--accent)}
.smart-chip .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.smart-found{color:var(--muted);margin:0 0 12px}
.smart-similar-h{font-size:1.1rem;margin:26px 0 12px}
.smart-more{margin:8px 0}
.smart-more>summary{cursor:pointer;color:var(--muted);text-align:center;padding:8px;list-style:none}
.smart-more>summary::-webkit-details-marker{display:none}
.smart-more>summary::after{content:" ▾"}
.smart-more[open]>summary::after{content:" ▴"}
.smart-more>.picker{margin-top:8px}
@media (max-width:700px){
  .smart{padding:22px 14px 18px;margin-top:16px}
  .smart-title{font-size:1.4rem}
  .smart-form{flex-wrap:wrap}
  .smart-input{flex-basis:100%}
  .smart-go{flex:1}
}

/* --- v3: заставка «Подбираем…» и карточка «Лучшее совпадение» --- */
.smart-stage{display:flex;flex-direction:column;align-items:center;gap:14px;padding:26px 0 18px}
.smart-reel{display:flex;gap:12px;justify-content:center;perspective:800px}
.smart-tile{width:86px;aspect-ratio:2/3;border-radius:12px;overflow:hidden;background:var(--line);box-shadow:0 8px 20px #0003;
  animation:smart-bob 1.2s ease-in-out infinite;animation-delay:calc(var(--d,0) * 1ms)}
.smart-tile:nth-child(2){--d:120}.smart-tile:nth-child(3){--d:240;width:104px}.smart-tile:nth-child(4){--d:360}.smart-tile:nth-child(5){--d:480}
.smart-tile img{width:100%;height:100%;object-fit:cover;display:block}
.smart-tile.flip{animation:smart-flip .28s ease-out, smart-bob 1.2s ease-in-out infinite}
.smart-stage-text{margin:0;font-weight:800;font-size:1.15rem;letter-spacing:.01em;
  background:linear-gradient(90deg,var(--fg) 0%,var(--accent) 50%,var(--fg) 100%);background-size:200% 100%;
  -webkit-background-clip:text;background-clip:text;color:transparent;animation:smart-shine 1.1s linear infinite}
@keyframes smart-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@keyframes smart-flip{from{transform:rotateY(80deg) scale(.9);opacity:.3}to{transform:rotateY(0) scale(1);opacity:1}}
@keyframes smart-shine{from{background-position:200% 0}to{background-position:0 0}}

.smart-best{display:grid;grid-template-columns:220px 1fr;gap:24px;align-items:center;max-width:860px;margin:6px auto 26px;
  padding:20px;border:1px solid var(--line);border-radius:calc(var(--r) + 4px);background:var(--card);
  box-shadow:0 18px 48px #0000002e;text-align:left}
.smart-best-poster{display:block;width:220px;box-shadow:0 14px 32px #00000059}
.smart-best-label{margin:0 0 6px;font-size:.85rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--accent)}
.smart-best-title{margin:0;font-size:1.9rem;line-height:1.15;font-weight:800}
.smart-best-title a{color:var(--fg)}
.smart-best-orig{margin:4px 0 0;color:var(--muted)}
.smart-best-meta{margin:10px 0 0;color:var(--muted);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.smart-best-desc{margin:12px 0 0;line-height:1.5}
.smart-best-go{margin-top:16px}
.smart-more-h{font-size:1.1rem;margin:4px 0 12px}
.smart-more-h small{color:var(--muted);font-weight:400}

/* появление: карточка «вылетает» к центру, остальное проявляется следом */
.smart-reveal .smart-best{animation:smart-fly .7s cubic-bezier(.2,.9,.25,1.15) both}
.smart-reveal .smart-best-poster{animation:smart-pop .8s cubic-bezier(.2,.9,.25,1.2) .05s both}
.smart-reveal .smart-more-h,.smart-reveal .smart-similar-h,.smart-reveal .grid .card{
  animation:smart-rise .45s ease-out both;animation-delay:calc(450ms + var(--i,0) * 35ms)}
@keyframes smart-fly{from{opacity:0;transform:translateY(46px) scale(.8);filter:blur(6px)}
  60%{opacity:1;filter:blur(0)}to{opacity:1;transform:none;filter:none}}
@keyframes smart-pop{from{transform:rotate(-6deg) scale(.7)}to{transform:none}}
@keyframes smart-rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

@media (max-width:700px){
  .smart-best{grid-template-columns:1fr;justify-items:center;text-align:center;padding:16px;gap:14px}
  .smart-best-poster{width:170px}
  .smart-best-title{font-size:1.45rem}
  .smart-best-meta{justify-content:center}
  .smart-best-desc{font-size:.95rem}
  .smart-tile{width:58px}.smart-tile:nth-child(3){width:72px}
}
@media (prefers-reduced-motion:reduce){
  .smart-tile,.smart-tile.flip,.smart-stage-text,.smart-reveal .smart-best,.smart-reveal .smart-best-poster,
  .smart-reveal .smart-more-h,.smart-reveal .smart-similar-h,.smart-reveal .grid .card{animation:none}
}
