/* ===== «Свой каток» — двор с объектами поверх фоновой картинки (rink/bg.webp); без картинок есть запасной вид ===== */

/* шапка экрана — world-head бирюзового мира (ice.css); счётчик шайб внутри */
.rk-picks { align-self: flex-start; display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--ink); }
.rk-picks b { font-family: var(--display); font-size: 24px; line-height: 1; color: var(--red); }
.rk-picks span { font-size: 15px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.rk-line { margin: 6px 0 8px; font-size: 16px; color: var(--ink); }
.rk-news { margin: 4px 0; padding: 8px 10px; border: 1px solid rgba(200,16,46,.28); border-radius: 6px; background: rgba(255,255,255,.7); font-size: 16px; }

/* сцена 360×420, масштаб по ширине, без прокрутки */
.rk-scene {
  position: relative; isolation: isolate; width: 100%; max-width: 440px; aspect-ratio: var(--ar, 360 / 420); margin: 8px auto 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px;
  background: url('rink/bg.webp') center / cover no-repeat, linear-gradient(180deg, #cfe3f3 0%, #eef6fc 55%, #fbfdff 100%);
}
.rk-obj { position: absolute; transform: translate(-50%, -100%); padding: 0; margin: 0; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
.rk-sprite { display: block; width: 100%; height: auto; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(30, 55, 90, .30)); }
.rk-emoji { display: grid; place-items: center; font-size: 34px; line-height: 1; aspect-ratio: 1; min-height: 44px; }
.rk-obj .rk-emoji { font-size: clamp(26px, 9vw, 44px); }
.rk-obj.st-built .rk-sprite { filter: drop-shadow(0 3px 2px rgba(30, 55, 90, .32)); }
.rk-obj.st-built .rk-emoji { filter: drop-shadow(0 3px 3px rgba(20, 28, 38, .25)); }
.rk-obj[data-id="ice"] .rk-sprite { filter: none; }
.rk-obj.st-open .rk-sprite, .rk-obj.st-open .rk-emoji { opacity: .45; filter: grayscale(.4); }
.rk-obj.st-open.hl .rk-sprite, .rk-obj.st-open.hl .rk-emoji { opacity: .9; animation: rk-hl 1.4s ease-in-out infinite; }
.rk-obj.st-lock { pointer-events: auto; }
.rk-obj.st-next .rk-sprite, .rk-obj.st-next .rk-emoji { filter: brightness(0) invert(1) drop-shadow(0 0 1px rgba(90,130,170,.55)); opacity: .55; }
.rk-obj.cup img { width: 100%; height: auto; filter: drop-shadow(0 4px 5px rgba(20, 28, 38, .3)); }
.rk-price { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); white-space: nowrap; font-size: 14px; font-weight: 800; color: #fff; background: var(--red); border-radius: 10px; padding: 1px 7px; }
.rk-price .puck-ic { filter: brightness(10); }
@keyframes rk-hl { 50% { transform: scale(1.06); } }
.rk-obj.pop { animation: rk-pop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes rk-pop { 0% { transform: translate(-50%, -100%) scale(.5); } 100% { transform: translate(-50%, -100%) scale(1); } }

/* «чудеса» при нажатии — короткие CSS-анимации */
.rk-obj.mir[data-m="shine"], .rk-obj.mir[data-m="lamp"], .rk-obj.mir[data-m="glow"] { animation: rk-glow 1.4s ease-in-out; }
.rk-obj.mir[data-m="puck"], .rk-obj.mir[data-m="bounce"], .rk-obj.mir[data-m="board"] { animation: rk-jolt .5s 2; }
.rk-obj.mir[data-m="door"], .rk-obj.mir[data-m="wave"], .rk-obj.mir[data-m="flutter"], .rk-obj.mir[data-m="horn"] { animation: rk-wave .35s 4; }
.rk-obj.mir[data-m="drive"], .rk-obj.mir[data-m="scroll"] { animation: rk-drive 1.4s ease-in-out; }
@keyframes rk-glow { 40% { filter: brightness(1.5) drop-shadow(0 0 12px rgba(255, 220, 120, .9)); } }
@keyframes rk-jolt { 50% { transform: translate(-50%, -100%) translateX(5px); } }
@keyframes rk-wave { 50% { transform: translate(-50%, -100%) rotate(5deg); } }
@keyframes rk-drive { 50% { transform: translate(-50%, -100%) translateX(60px); } }

/* снег на старте и болельщики */
.rk-snow { position: absolute; transform: translate(-50%, -50%); width: 64px; height: 64px; font-size: 34px; border-radius: 50%; border: 0; cursor: pointer; z-index: 20;
  background: radial-gradient(circle at 40% 35%, #fff, #dbe9f4); box-shadow: 0 3px 6px rgba(20, 28, 38, .25); }
.rk-snow.gone { display: none; }
.rk-fan { position: absolute; transform: translate(-50%, -100%); pointer-events: none; }
.rk-fan img, .rk-fan-img { width: 100%; height: auto; display: block; }
.rk-fan .rk-emoji { font-size: 12px; min-height: 0; color: var(--red); aspect-ratio: auto; }

/* нижняя панель: рысь, текст, кнопка улучшения */
.rk-panel { margin-top: 10px; min-height: 64px; }
.rk-say { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.rk-say p { font-size: 16px; line-height: 1.4; margin: 0 0 6px; }
.rk-say > div { flex: 1; }
.rk-say .btn { margin-top: 8px; }
.rk-lynx { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.rk-board p { margin: 4px 0; padding: 4px 8px; background: #141c26; color: #e8f4ff; font-family: var(--display); letter-spacing: .04em; font-size: 16px; border-radius: 3px; }
.rk-hues { display: flex; gap: 10px; margin-top: 8px; }
.rk-hue { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.rk-hue.on { box-shadow: 0 0 0 2px var(--red); }

/* тост — внизу над меню, не перекрывает шапку экрана */
.rk-toast { position: fixed; left: 50%; bottom: calc(86px + var(--sab)); transform: translate(-50%, 10px); max-width: 88%; z-index: 90;
  padding: 10px 16px; background: #141c26; color: #fff; border-radius: 20px; font-size: 16px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.rk-toast.show { opacity: 1; transform: translate(-50%, 0); }
.rk-toast.top { position: fixed; }

/* «Матч открытия» */
.rk-match { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; text-align: center; padding: 24px; color: #fff;
  background: #05080c; animation: rk-lights 3.2s ease-out forwards; overflow: hidden; }
.rk-match .rk-night { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.rk-match-in { position: relative; display: grid; gap: 10px; justify-items: center; max-width: 380px; }
.rk-match h2 { font-family: var(--display); font-size: 34px; text-transform: uppercase; letter-spacing: .05em; }
.rk-score { font-family: var(--display); font-size: 24px; letter-spacing: .04em; background: #141c26; border: 1px solid #5b6673; padding: 8px 14px; border-radius: 4px; }
.rk-match .g-meta { color: #cfdbe7; }
@keyframes rk-lights { 0% { background: #05080c; } 35% { background: #05080c; } 55% { background: #1b2a3b; } 100% { background: linear-gradient(180deg, #2b4a6b, #0e1a28); } }

body.teen .rk-snow { background: #e6eff8; }
@media (prefers-reduced-motion: reduce) {
  .rk-obj.mir, .rk-obj.pop, .rk-obj.st-open.hl .rk-sprite, .rk-match { animation: none; }
  .rk-match { background: linear-gradient(180deg, #2b4a6b, #0e1a28); }
}

/* «Свой стадион» (13–15): вечерняя картинка и «Поделиться» */
.rk-night-card { margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.rk-night-card img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.rk-night-card > div { padding: 10px 12px; display: grid; gap: 6px; }
.rk-night-card b { font-family: var(--display); font-size: 20px; letter-spacing: .04em; text-transform: uppercase; }
.rk-night-card span { font-size: 16px; color: var(--ink); }
.rk-match .btn { margin-top: 0; }
