/* REWIND CLUB — полка на сайте. Цвета и шрифты те же, что в роликах (remotion/src/Episode1.tsx). */
:root {
  --wall: #16131c;
  --back: #221e2a;
  --post: #403a48;
  --wood: #a07c58;
  --wood-dark: #7a5c40;
  --tape: #141318;
  --cream: #f0ece2;
  --sticker: #faf8ee;
  --ink: #1c2878;
  --neon: #ff46a0;
  --cond: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif-condensed, Arial, sans-serif;
  --marker: "Marker Felt", "Chalkboard SE", "Comic Sans MS", "Segoe Print", cursive;
  --script: "SignPainter", "Snell Roundhand", "Brush Script MT", "Segoe Script", cursive;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(120% 80% at 50% 0%, #2a2333 0%, var(--wall) 55%, #0c0a10 100%) fixed;
  color: var(--cream);
  font-family: var(--cond);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: #ffa0d2; }
.room { max-width: 1100px; margin: 0 auto; padding: 28px 16px 40px; }

/* ---------- неоновая вывеска */
.sign { text-align: center; margin-bottom: 22px; }
.neon {
  font-family: var(--script);
  font-weight: 600;
  font-size: clamp(56px, 13vw, 120px);
  line-height: 1;
  margin: 0;
  color: #ffe6f5;
  text-shadow: 0 0 4px #ffa0d2, 0 0 12px var(--neon), 0 0 28px var(--neon), 0 0 60px var(--neon);
  animation: flicker 7s infinite;
}
@keyframes flicker {
  0%, 92%, 94%, 100% { opacity: 1; }
  93% { opacity: .55; }
  93.5% { opacity: .9; }
}
.tag { letter-spacing: .14em; font-size: 12px; font-weight: 700; color: #b9aec8; margin: 10px 0 0; }

/* ---------- поиск */
.finder { position: relative; max-width: 460px; margin: 0 auto 26px; }
.finder-label { display: block; text-align: center; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; color: #ffd84a; margin-bottom: 8px; }
.finder-row { display: flex; align-items: center; background: var(--sticker); border-radius: 12px; padding: 4px 4px 4px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.at { font-family: var(--marker); color: var(--ink); font-size: 24px; }
.finder input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--marker); font-size: 22px; color: var(--ink); padding: 10px 6px; outline: none; }
.finder input::placeholder { color: #9a96b4; }
.finder button, .btn {
  font-family: var(--cond); font-weight: 900; letter-spacing: .08em; font-size: 15px;
  background: #c8283a; color: #fff; border: 0; border-radius: 9px; padding: 12px 18px; cursor: pointer; text-decoration: none; display: inline-block;
}
.finder button:hover, .btn:hover { background: #e0384c; }
.hits { list-style: none; margin: 6px 0 0; padding: 6px; position: absolute; left: 0; right: 0; z-index: 5; background: #2a2433; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.hits li { padding: 10px 12px; border-radius: 7px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.hits li:hover, .hits li.on { background: #3a3245; }
.hits .n { font-family: var(--marker); color: #fff; }
.hits .m { color: #b9aec8; font-weight: 700; text-transform: uppercase; font-size: 13px; text-align: right; }
.hits .empty { cursor: default; color: #b9aec8; }

/* ---------- магазин: Майк + стеллаж */
.store { display: grid; grid-template-columns: 210px minmax(0, 1fr); grid-template-areas: "mike unit"; gap: 10px 26px; align-items: start; }
.aisles-wrap { grid-area: unit; min-width: 0; }
.mike { grid-area: mike; position: sticky; top: 16px; align-self: start; margin-top: 40px; }
.mike img { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 20px rgba(0,0,0,.5)); }
.bubble {
  position: relative; background: #fff; color: #1a1820; border-radius: 16px; padding: 12px 14px; margin-bottom: 10px;
  font-weight: 700; font-size: 16px; line-height: 1.25; min-height: 48px;
}
.bubble:after { content: ""; position: absolute; bottom: -10px; left: 50%; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }

.unit {
  position: relative; background: var(--back);
  border-left: 14px solid var(--post); border-right: 14px solid var(--post);
  padding: 0 0 2px; box-shadow: inset 0 0 60px rgba(0,0,0,.6), 0 20px 50px rgba(0,0,0,.5);
}
.top-wall { margin-top: 90px; }
.aisle { margin-top: 30px; scroll-margin-top: 64px; }
.header-plate { background: #eeeae0; border-top: 7px solid #783c96; text-align: center; padding: 6px 0 4px; }
.header-plate h2, .header-plate h3 { margin: 0; color: #1a1820; font-weight: 900; font-size: 22px; letter-spacing: .04em; }
.header-plate.gold { border-top-color: #e6a01e; }

.cat { position: absolute; right: 18px; top: -86px; width: 112px; cursor: pointer; z-index: 2; }
.cat img { width: 100%; height: auto; display: block; }
.hello {
  position: absolute; left: -64px; top: 30px; width: 66px; background: #d8283a; border-radius: 5px; text-align: center; padding: 2px 3px 4px;
  transform: rotate(-8deg); box-shadow: 0 2px 6px rgba(0,0,0,.4); color: #fff; line-height: 1;
}
.hello b { display: block; font-size: 13px; font-weight: 900; letter-spacing: .05em; }
.hello small { display: block; font-size: 7px; font-weight: 700; margin-bottom: 2px; }
.hello i { display: block; background: #fff; color: var(--ink); font-family: var(--marker); font-style: normal; font-size: 15px; padding: 2px 0; border-radius: 2px; }

/* полки */
.board { position: relative; padding: 14px 12px 0; display: grid; align-items: end; gap: 10px 14px; }
.board:after { /* доска с ценником */
  content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 14px;
  background: linear-gradient(var(--wood) 0 9px, #f0eee6 9px 14px); box-shadow: 0 4px 8px rgba(0,0,0,.5); z-index: 1;
}
.board + .board { margin-top: 14px; }
.board:last-child { margin-bottom: 14px; }
.stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.filler { display: flex; align-items: flex-end; gap: 2px; flex: 0 0 auto; }
.spine-up {
  width: 16px; height: 96px; background: var(--tape); border-top: 10px solid #eee; position: relative;
  box-shadow: inset -2px 0 0 rgba(255,255,255,.06);
}
.spine-up span {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%) rotate(90deg); transform-origin: center;
  white-space: nowrap; font-size: 9px; font-weight: 900; color: #e9e5da; width: 0; display: flex; justify-content: flex-start;
}
.spine-up span em { font-style: normal; transform: translateX(4px); display: block; }

/* лежащая кассета участника */
.tape {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; height: 40px; width: 100%;
  background: var(--tape); border-top: 2px solid #3a3840; position: relative; overflow: hidden;
  box-shadow: 0 2px 0 rgba(0,0,0,.6); transition: transform .18s ease, box-shadow .18s ease;
}
.tape:hover, .tape:focus-visible { transform: translateX(10px); box-shadow: -6px 4px 14px rgba(0,0,0,.6); }
.tape:focus-visible { outline: 2px solid #ffd84a; outline-offset: 2px; }
.tape .band { width: 20px; align-self: stretch; flex: 0 0 auto; }
.tape .title { flex: 1; min-width: 0; padding: 0 10px; font-weight: 900; font-size: 19px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cream); }
.tape .stk {
  flex: 0 1 auto; max-width: 46%; background: var(--sticker); color: var(--ink); font-family: var(--marker); font-size: 17px;
  border-radius: 6px; padding: 3px 10px; margin-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform: rotate(-1.5deg);
}
.tape.mystery .title { color: #6d6878; letter-spacing: .3em; }
.tape.found { animation: found 1.4s ease 2; }
@keyframes found {
  0%, 100% { box-shadow: 0 2px 0 rgba(0,0,0,.6); }
  50% { box-shadow: 0 0 0 3px #ffd84a, 0 0 30px #ffd84a; transform: translateX(14px); }
}

/* коробка RETURNS — кассеты, которые выйдут в следующей серии */
.returns { margin-top: 30px; }
.box {
  background: linear-gradient(#b8894f, #9c7040); border-radius: 4px; padding: 10px 14px 16px; color: #2a1d10;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.15), 0 12px 30px rgba(0,0,0,.5); transform: rotate(-.6deg);
}
.box-label { display: inline-block; font-weight: 900; font-size: 22px; letter-spacing: .12em; border: 3px solid #2a1d10; padding: 0 10px; margin-bottom: 6px; }
.box-note { margin: 2px 0 10px; font-weight: 700; font-size: 15px; }
#returns { display: flex; flex-direction: column; gap: 5px; }
#returns .tape:nth-child(odd) { transform: rotate(.7deg); }
#returns .tape:nth-child(even) { transform: rotate(-.9deg) translateX(6px); }
#returns .tape:hover { transform: translateX(10px); }

/* ---------- счётчик, Топ-10, алфавит */
.stats { text-align: center; color: #b9aec8; font-weight: 700; letter-spacing: .04em; margin: -8px 0 10px; }
.stats b { color: #fff; }
.top { list-style: none; margin: 0; padding: 10px 14px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.top li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; cursor: pointer; background: rgba(255,255,255,.04); }
.top li:hover { background: rgba(255,216,74,.12); }
.top .rank { flex: 0 0 30px; height: 30px; border-radius: 50%; background: #e6a01e; color: #1a1820; font-weight: 900; display: grid; place-items: center; }
.top li:first-child .rank { background: #ffd84a; box-shadow: 0 0 14px #ffd84a; }
.top .tm { flex: 1; min-width: 0; font-weight: 900; font-size: 18px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .tc { font-family: var(--marker); color: #ffd84a; font-size: 18px; }
.az {
  position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 30px 0 0;
  padding: 8px 6px; background: rgba(22,19,28,.92); backdrop-filter: blur(6px); border-radius: 0 0 10px 10px;
}
.az a { color: #e9e5da; text-decoration: none; font-weight: 900; font-size: 15px; min-width: 26px; text-align: center; padding: 4px 2px; border-radius: 5px; }
.az a:hover { background: #3a3245; color: #ffd84a; }
.loading { text-align: center; color: #b9aec8; padding: 40px 0; }
.status .same { display: block; margin-top: 6px; color: #b9aec8; font-weight: 600; }

/* ---------- как попасть */
.howto { text-align: center; max-width: 620px; margin: 48px auto 0; }
.howto h2 { font-size: 30px; margin: 0 0 8px; color: #fff; }
.howto p { color: #cfc6da; font-size: 18px; line-height: 1.4; margin: 0 0 18px; }
.foot { text-align: center; margin-top: 46px; color: #8f86a0; font-weight: 700; }
.foot .small { font-size: 13px; font-weight: 600; margin: 6px 0; }

/* ---------- карточка кассеты */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-bg { position: absolute; inset: 0; background: rgba(8,6,12,.82); backdrop-filter: blur(3px); }
.card {
  position: relative; display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: center;
  background: #221d29; border-radius: 18px; padding: 24px; width: min(640px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.7);
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.x { position: absolute; right: 10px; top: 6px; background: none; border: 0; color: #b9aec8; font-size: 30px; cursor: pointer; }
.case {
  position: relative; aspect-ratio: 2 / 3.4; border-radius: 6px; overflow: hidden; background: #111;
  box-shadow: 0 14px 30px rgba(0,0,0,.6), inset 0 0 0 6px #141318;
}
.case-art { position: absolute; inset: 6px; }
.case-logo { position: absolute; top: 14px; left: 0; right: 0; text-align: center; font-family: var(--script); font-size: 26px; color: #ffe6f5; text-shadow: 0 0 8px var(--neon); }
.case-title {
  position: absolute; left: 14px; right: 14px; top: 40%; transform: translateY(-50%); text-align: center;
  font-weight: 900; font-size: 30px; line-height: 1; text-transform: uppercase; color: #fff; text-shadow: 0 3px 12px rgba(0,0,0,.6); overflow-wrap: anywhere;
}
.case-sticker {
  position: absolute; left: 16px; right: 16px; bottom: 18px; background: var(--sticker); color: var(--ink); text-align: center;
  font-family: var(--marker); font-size: 20px; border-radius: 6px; padding: 6px 4px; transform: rotate(-2deg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-info h2 { font-size: 34px; line-height: 1; margin: 2px 0 10px; text-transform: uppercase; color: #fff; }
.num { margin: 0; color: #ffd84a; font-weight: 900; letter-spacing: .12em; font-size: 14px; }
.by { font-family: var(--marker); font-size: 22px; margin: 0 0 10px; color: #fff; }
.by a { color: #fff; text-decoration-color: #ffa0d2; }
.status { color: #cfc6da; font-size: 16px; font-weight: 700; margin: 0 0 18px; line-height: 1.35; }
.status b { color: #6fe39a; }
.status b.soon { color: #ffd84a; }

/* ---------- телефоны (основной трафик — из Instagram) */
@media (max-width: 720px) {
  .room { padding-top: 18px; }
  .store { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mike" "unit"; }
  .top { grid-template-columns: minmax(0, 1fr); }
  .az a { min-width: 22px; font-size: 14px; }
  .mike { position: relative; top: 0; margin-top: 0; display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: end; }
  .mike img { grid-column: 1; grid-row: 1; }
  .bubble { grid-column: 2; grid-row: 1; margin: 0 0 30px; font-size: 15px; }
  .bubble:after { left: -10px; bottom: 16px; border: 10px solid transparent; border-right-color: #fff; border-left: 0; }
  .unit { border-width: 0 9px; }
  .top-wall { margin-top: 84px; }
  .cat { width: 92px; top: -72px; right: 10px; }
  .filler .spine-up:nth-child(n+4) { display: none; }
  .spine-up { width: 14px; }
  .tape { height: 38px; }
  .tape .title { font-size: 16px; padding: 0 8px; }
  .tape .stk { font-size: 15px; }
  .card { grid-template-columns: 1fr; padding: 20px; max-height: 92vh; overflow: auto; }
  .case { width: 62%; margin: 0 auto; }
  .card-info { text-align: center; }
  .card-info h2 { font-size: 28px; }
}
