/* ============================================================
   rinabest.ru — страничка Рины
   стиль: розовый Win98 × личная страничка нулевых
   ============================================================ */

:root {
  --ink: #2a1636;
  --ink2: #6b4a7a;
  --paper: #fffafd;
  --paper2: #fdeef7;
  --pink: #ff4f9a;
  --pink2: #ff9cc9;
  --pink3: #ffd3ea;
  --lilac: #b68cff;
  --mint: #7ff0c4;
  --lemon: #ffe066;

  --face: #f3e2f1;
  --hi: #ffffff;
  --lt: #fbf2fa;
  --sh: #b48fbf;
  --dk: #3b2347;

  --t1: #4b1880;
  --t2: #ff5fa8;

  --f-pixel: 'Press Start 2P', 'Courier New', monospace;
  --f-head: 'Tiny5', Tahoma, Verdana, sans-serif;
  --f-body: 'Tiny5', Tahoma, Verdana, sans-serif;

  --bevel-out: inset -1px -1px var(--dk), inset 1px 1px var(--hi), inset -2px -2px var(--sh), inset 2px 2px var(--lt);
  --bevel-in: inset -1px -1px var(--hi), inset 1px 1px var(--dk), inset -2px -2px var(--lt), inset 2px 2px var(--sh);
  --cursor: auto;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; font-synthesis: none; }
body {
  margin: 0;
  min-height: 100vh;
  background: #1a0f2e;
  color: var(--ink);
  font: 16px/1.35 var(--f-body);
  cursor: var(--cursor);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; height: 100vh; }
a, button, label, .cart { cursor: var(--cursor); }
::selection { background: var(--pink); color: #fff; }
button { font-family: inherit; }

/* ---------- скроллбар в стиле 98 ---------- */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: repeating-conic-gradient(#f3e2f1 0 25%, #e3c9e2 0 50%) 0 0 / 2px 2px; }
::-webkit-scrollbar-thumb { background: var(--face); box-shadow: var(--bevel-out); }
::-webkit-scrollbar-button:single-button { background: var(--face); box-shadow: var(--bevel-out); height: 16px; width: 16px; }

/* ---------- пиксельные иконки ---------- */
.ico {
  display: inline-block;
  vertical-align: -0.2em;
  width: calc(var(--w) * var(--k, 2) * 1px);
  height: calc(var(--h) * var(--k, 2) * 1px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  flex: none;
}

/* ---------- блёстки ---------- */
.glitter {
  background-image: var(--glitter);
  background-size: 80px 80px;
  image-rendering: pixelated;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: glit 0.45s steps(1) infinite;
  filter: drop-shadow(1px 1px 0 var(--dk)) drop-shadow(-1px -1px 0 #fff) drop-shadow(0 0 6px rgba(255, 95, 168, 0.55));
}
@keyframes glit {
  0% { background-position: 0 0; }
  33% { background-position: 23px 41px; }
  66% { background-position: 57px 13px; }
}

/* ============================================================
   ФОН
   ============================================================ */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 2s ease;
  pointer-events: none;
}
#bg.ready { opacity: 1; }
.bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#bg.css-blur .bg-canvas { filter: blur(3px) saturate(1.1); }
.bg-tint {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(26, 15, 46, 0) 55%, rgba(16, 8, 30, 0.45) 100%),
    linear-gradient(180deg, rgba(60, 20, 90, 0.18), rgba(30, 10, 50, 0.28));
}
#sparkles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 60;
  pointer-events: none;
}

/* ============================================================
   ЗАСТАВКА-ТЕЛЕВИЗОР
   ============================================================ */
#splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: var(--cursor);
}
.crt {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, #3a1a5e 0%, #24113f 38%, #120826 70%, #05020c 100%);
  border-radius: 28px / 22px;
  transform-origin: 50% 50%;
}
.crt .noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.07;
  image-rendering: pixelated;
  mix-blend-mode: screen;
}
.crt-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 46%, rgba(255, 95, 168, 0.22), transparent 45%);
  animation: glowpulse 3.2s ease-in-out infinite;
}
@keyframes glowpulse { 50% { opacity: 0.55; } }
.scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 0, 80, 0.035) 0 1px, rgba(0, 255, 200, 0.03) 1px 2px, rgba(80, 80, 255, 0.035) 2px 3px);
  animation: flick 0.12s steps(2) infinite;
}
.scan::after { /* бегущая полоса */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 18%;
  top: -20%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  animation: roll 6s linear infinite;
}
@keyframes roll { to { top: 110%; } }
@keyframes flick { 50% { opacity: 0.88; } }
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 140px 40px rgba(0, 0, 0, 0.92), inset 0 0 40px rgba(0, 0, 0, 0.8);
  border-radius: 28px / 22px;
}
.osd {
  position: absolute;
  font: 16px/1 var(--f-pixel);
  color: #8dff9e;
  text-shadow: 0 0 6px rgba(141, 255, 158, 0.7), 2px 2px 0 rgba(0, 0, 0, 0.6);
  letter-spacing: 1px;
  z-index: 2;
}
.osd-l { top: 34px; left: 40px; }
.osd-l .rec { color: #ff4f6d; text-shadow: 0 0 8px #ff4f6d; animation: blink 1s steps(1) infinite; }
.osd-r { top: 34px; right: 40px; }
.osd-b { bottom: 34px; left: 50%; transform: translateX(-50%); font-size: 10px; color: rgba(255, 220, 240, 0.55); text-shadow: none; }
@keyframes blink { 50% { opacity: 0; } }

.splash-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  z-index: 1;
}
.paw-wrap {
  position: relative;
  width: min(210px, 42vw);
  aspect-ratio: 220 / 250;
  animation: bob 2.4s ease-in-out infinite;
}
.paw {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 22px rgba(255, 120, 190, 0.45));
  transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1);
  transform-origin: 50% 90%;
}
#splash:hover .paw { transform: translateY(-8px) rotate(-3deg) scale(1.03); }
#splash.pressed .paw { transform: translateY(10px) scale(0.9); transition-duration: 0.12s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.tw { position: absolute; width: 22px; fill: #fff; filter: drop-shadow(0 0 6px #ff9cc9); animation: twinkle 1.6s ease-in-out infinite; }
.tw1 { top: 4%; left: -14%; }
.tw2 { top: 24%; right: -16%; width: 16px; animation-delay: 0.5s; fill: #ffe066; }
.tw3 { bottom: 26%; left: -22%; width: 12px; animation-delay: 1s; fill: #c7a3ff; }
.tw4 { top: -8%; right: 6%; width: 14px; animation-delay: 0.25s; }
@keyframes twinkle { 0%, 100% { transform: scale(0.3) rotate(0); opacity: 0.2; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }

.press {
  position: relative;
  font: clamp(26px, 6vw, 44px)/1 var(--f-pixel);
  color: #ffd3ea;
  letter-spacing: 4px;
  text-shadow:
    -3px 0 rgba(255, 40, 120, 0.75),
    3px 0 rgba(60, 220, 255, 0.6),
    0 0 18px rgba(255, 95, 168, 0.9),
    0 0 42px rgba(255, 95, 168, 0.5);
  animation: pressblink 1.1s steps(1) infinite;
}
@keyframes pressblink { 70% { opacity: 1; } 85% { opacity: 0.25; } }

/* выключение-включение ЭЛТ */
#splash.off { pointer-events: none; background: transparent; }
#splash.off .crt { animation: crtoff 0.62s cubic-bezier(.7, 0, .3, 1) forwards; }
@keyframes crtoff {
  0% { transform: scale(1, 1); filter: brightness(1); }
  45% { transform: scale(1, 0.006); filter: brightness(4); border-radius: 0; }
  75% { transform: scale(0.002, 0.006); filter: brightness(8); }
  100% { transform: scale(0, 0); filter: brightness(8); opacity: 0; }
}
.page { opacity: 0; }
body.entered .page { animation: pageon 0.9s ease forwards; }
@keyframes pageon {
  0% { opacity: 0; filter: brightness(2.2) saturate(0); }
  20% { opacity: 0.6; }
  30% { opacity: 0.35; }
  45% { opacity: 1; filter: brightness(1.4); }
  100% { opacity: 1; filter: none; }
}
body.entered .page { animation-fill-mode: forwards; }

/* ============================================================
   СТРАНИЦА
   ============================================================ */
.page {
  position: relative;
  z-index: 2;
  max-width: 1010px;
  margin: 0 auto;
  padding: 0 14px 30px;
}

/* ---------- шапка ---------- */
.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 2px 10px;
  flex-wrap: wrap;
}
.logo {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 12px;
  text-decoration: none;
}
.logo-heart {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  animation: spin3d 2.4s steps(12) infinite;
}
.logo-heart .ico { --k: 6; }
@keyframes spin3d { to { transform: rotateY(360deg); } }
.logo-text {
  font: 26px/1.1 var(--f-pixel);
  letter-spacing: 1px;
}
.logo small {
  font: 16px/1 var(--f-head);
  color: var(--pink3);
  text-shadow: 1px 1px 0 var(--dk);
  letter-spacing: 1px;
  margin-top: 6px;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 6px;
  font: 16px/1 var(--f-head);
  color: var(--ink);
  text-decoration: none;
  background: var(--face);
  box-shadow: var(--bevel-out);
  transition: transform 0.12s;
}
.nav a:hover { transform: translateY(-2px); background: #fff3fb; }
.nav a:active { box-shadow: var(--bevel-in); transform: translateY(1px); }
.nav a.on { background: linear-gradient(180deg, #ffe3f2, #ffc4e2); color: #8a0a4e; }

/* ---------- бегущая строка ---------- */
.ticker {
  overflow: hidden;
  background: #12081f;
  box-shadow: var(--bevel-in);
  padding: 7px 3px 6px;
  margin-bottom: 14px;
  white-space: nowrap;
}
.ticker-in {
  display: inline-flex;
  animation: tick 38s linear infinite;
}
.ticker-in span {
  font: 10px/1.2 var(--f-pixel);
  color: var(--pink2);
  text-shadow: 0 0 6px rgba(255, 95, 168, 0.8);
  padding-right: 40px;
}
@keyframes tick { to { transform: translateX(-50%); } }
.ticker.small { margin: 0 0 14px; }

/* ---------- раскладка ---------- */
.layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.side, .main { display: grid; gap: 14px; min-width: 0; }

/* ============================================================
   ОКНА
   ============================================================ */
.win {
  position: relative;
  background: var(--face);
  box-shadow: var(--bevel-out), 6px 6px 0 rgba(10, 4, 20, 0.35);
  padding: 3px;
  min-width: 0;
}
.win-title {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 3px 0 5px;
  color: #fff;
  font: 16px/1 var(--f-head);
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--t1), #9b2fae 55%, var(--t2));
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
  user-select: none;
}
.win-title > span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-title .ico { --k: 2; filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.35)); }
.win-btns { display: flex; gap: 2px; }
.win-btns button {
  width: 18px;
  height: 16px;
  padding: 0;
  border: 0;
  background: var(--face);
  box-shadow: var(--bevel-out);
  font: 16px/16px var(--f-body);
  color: #000;
  text-shadow: none;
}
.win-btns button:active { box-shadow: var(--bevel-in); }
.win-btns button[data-w="close"] { margin-left: 2px; }
.win-body { padding: 10px; }
.win.collapsed .win-body { display: none; }
.win.nope { animation: nope 0.4s; }
@keyframes nope { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.nope-tip {
  position: absolute;
  top: 30px;
  right: 6px;
  z-index: 5;
  padding: 4px 8px;
  background: #ffffe1;
  border: 1px solid #000;
  font-size: 16px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  animation: fadeup 1.6s forwards;
}
@keyframes fadeup { 0% { opacity: 0; transform: translateY(4px); } 15%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.field {
  background: #fff;
  box-shadow: var(--bevel-in);
  padding: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 12px;
  border: 0;
  background: var(--face);
  box-shadow: var(--bevel-out);
  font: 16px/1 var(--f-body);
  color: var(--ink);
  text-decoration: none;
}
.btn:hover { background: #fff3fb; }
.btn:active { box-shadow: var(--bevel-in); padding: 5px 11px 3px 13px; }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.btn .ico { --k: 2; }
.btn:disabled { color: var(--ink2); cursor: default; }
.btn:disabled:active { box-shadow: var(--bevel-out); padding: 4px 12px; }
.btn[hidden] { display: none; }

/* ============================================================
   АНКЕТА
   ============================================================ */
.avatar { position: relative; margin: 2px auto 8px; width: fit-content; }
.avatar-frame {
  padding: 5px;
  background: var(--glitter) 0 0 / 80px 80px;
  image-rendering: pixelated;
  animation: glit 0.45s steps(1) infinite;
  box-shadow: 0 0 0 2px var(--dk), 4px 4px 0 2px rgba(42, 22, 54, 0.25);
}
.avatar-frame img {
  display: block;
  width: 228px;
  height: 260px;
  object-fit: cover;
  image-rendering: auto;
  box-shadow: 0 0 0 2px #fff;
  background: var(--paper2);
}
.av-sp {
  position: absolute;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #fff 18%, transparent 20%),
    linear-gradient(0deg, transparent 44%, #fff 44% 56%, transparent 56%),
    linear-gradient(90deg, transparent 44%, #fff 44% 56%, transparent 56%);
  filter: drop-shadow(0 0 4px var(--pink));
  animation: twinkle 1.8s ease-in-out infinite;
}
.av-sp.s1 { top: -6px; right: -7px; }
.av-sp.s2 { bottom: 30px; left: -8px; animation-delay: 0.6s; width: 14px; height: 14px; }
.av-sp.s3 { bottom: -7px; right: 28px; animation-delay: 1.2s; width: 12px; height: 12px; }

.name {
  margin: 4px 0 2px;
  text-align: center;
  font: 48px/1 var(--f-head);
  letter-spacing: 2px;
}
.blinkie {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px auto 10px;
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--dk);
  background: #000;
  font: 16px/1 var(--f-head);
  white-space: nowrap;
  overflow: hidden;
  animation: blinkie 0.8s steps(1) infinite;
}
.blinkie .ico { --k: 2; flex: none; }
@keyframes blinkie {
  0% { color: var(--pink2); background: #2a0d2e; }
  50% { color: var(--lemon); background: #3d1050; }
}
.info { width: 100%; border-collapse: collapse; }
.info th, .info td { padding: 4px 4px; border-bottom: 1px dotted var(--sh); text-align: left; vertical-align: top; }
.info th { color: var(--ink2); font-weight: normal; width: 42%; white-space: nowrap; }
.info td { font-weight: bold; }
.info tr:last-child th, .info tr:last-child td { border-bottom: 0; }

/* ============================================================
   ПЛЕЕР
   ============================================================ */
.lcd {
  background: #120a20;
  box-shadow: var(--bevel-in);
  padding: 7px 8px 6px;
  color: var(--mint);
}
.lcd-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.pl-time {
  font: 18px/1 var(--f-pixel);
  color: var(--mint);
  text-shadow: 0 0 6px rgba(127, 240, 196, 0.6);
}
#player:not(.playing) .pl-time { animation: blink 1s steps(1) infinite; }
.pl-viz { width: 112px; height: 44px; image-rendering: pixelated; }
.pl-title {
  margin-top: 6px;
  overflow: hidden;
  white-space: nowrap;
  font: 9px/1.4 var(--f-pixel);
  color: var(--pink2);
}
.pl-title span { display: inline-block; animation: tick 14s linear infinite; padding-left: 100%; }
#player:not(.playing) .pl-title span { animation-play-state: paused; }
.pl-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pl-play { width: 40px; }
.pl-vol-wrap { display: flex; align-items: center; gap: 6px; flex: 1; color: var(--ink2); }
.pl-vol { flex: 1; min-width: 0; accent-color: var(--pink); }
.pl-vol {
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  background: transparent;
}
.pl-vol::-webkit-slider-runnable-track { height: 4px; background: #fff; box-shadow: var(--bevel-in); }
.pl-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 18px; margin-top: -7px; background: var(--face); box-shadow: var(--bevel-out); }
.pl-vol::-moz-range-track { height: 4px; background: #fff; box-shadow: var(--bevel-in); }
.pl-vol::-moz-range-thumb { width: 11px; height: 18px; border: 0; border-radius: 0; background: var(--face); box-shadow: var(--bevel-out); }

/* ============================================================
   СЧЁТЧИК
   ============================================================ */
.counter-body { text-align: center; }
.odo-cap { font: 16px/1 var(--f-head); color: var(--ink2); margin-bottom: 6px; }
.odo {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: #000;
  box-shadow: var(--bevel-in);
}
.odo-d {
  position: relative;
  width: 24px;
  height: 32px;
  overflow: hidden;
  background: linear-gradient(180deg, #2a0d2e, #4a1650 50%, #2a0d2e);
  box-shadow: inset 0 0 0 1px #000;
}
.odo-d::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.55));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.odo-strip {
  display: flex;
  flex-direction: column;
  transition: transform 1.2s cubic-bezier(.2, .8, .2, 1);
}
.odo-strip span {
  height: 32px;
  font: 16px/32px var(--f-pixel);
  text-align: center;
  padding-left: 2px;
  color: var(--pink2);
  text-shadow: 0 0 6px rgba(255, 95, 168, 0.8);
}
.cnt-rows { margin-top: 10px; text-align: left; display: grid; gap: 3px; }
.cnt-rows b { color: #b0105e; }
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  background: #39e07a;
  box-shadow: 0 0 0 1px #0b5a2a, 0 0 6px #39e07a;
  animation: blink 1.2s steps(1) infinite;
}
.cnt-you {
  margin-top: 8px;
  padding: 5px;
  font: 16px/1.2 var(--f-head);
  color: #8a0a4e;
  background: repeating-linear-gradient(45deg, #fff0f8 0 6px, #ffe1f0 6px 12px);
  box-shadow: var(--bevel-in);
}

/* ---------- кнопочки 88×31 ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.b88 {
  width: 88px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.6), inset -1px -1px 0 rgba(0, 0, 0, 0.4);
  font: 8px/1.1 var(--f-pixel);
  text-align: center;
  overflow: hidden;
  user-select: none;
}
.b88 small { font: 7px/1 var(--f-pixel); display: block; }
.b-rina { background: linear-gradient(180deg, #ff9cc9, #ff4f9a); color: #fff; text-shadow: 1px 1px 0 #8a0a4e; }
.b-rina i { font-style: normal; color: #fff; animation: blink 0.6s steps(1) infinite; }
.b-love { flex-direction: column; background: #000; color: var(--mint); }
.b-love b { color: var(--pink2); font-size: 9px; }
.b-cat { background: linear-gradient(90deg, #3b2a6e, #6a3fb0); color: #fff; }
.b-cat em { font-style: normal; color: var(--lemon); animation: blink 0.8s steps(1) infinite; }
.b-res { flex-direction: column; background: #e6e6e6; color: #333; }
.b-res b { color: #0033aa; }
.b-y2k { flex-direction: column; background: repeating-linear-gradient(90deg, #7ff0c4 0 4px, #9bf0ff 4px 8px); color: #2a1636; }
.b-y2k b { font-size: 11px; }
.b-valid { flex-direction: column; background: #fff; color: #8a0a4e; }
.b-valid b { color: #b0105e; }

/* ============================================================
   О СЕБЕ
   ============================================================ */
.about { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.about-text { flex: 1 1 300px; font-size: 16px; }
.about-text p { margin: 0 0 6px; }
.about-text p:first-child { font: 24px/1.3 var(--f-head); color: #8a0a4e; }
.about-links { display: flex; flex-direction: column; gap: 6px; }
.about-links .ico { --k: 2; }

/* ============================================================
   ДОСКА (Paint)
   ============================================================ */
.board-body {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 6px;
  padding: 6px;
}
.toolbox { display: flex; flex-direction: column; gap: 6px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; }
.tbtn, .sbtn {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--face);
  box-shadow: var(--bevel-out);
}
.tbtn .ico { --k: 2; }
.tbtn.on, .sbtn.on {
  box-shadow: var(--bevel-in);
  background: repeating-conic-gradient(#fff 0 25%, #f3e2f1 0 50%) 0 0 / 2px 2px;
}
.tbtn:active { box-shadow: var(--bevel-in); }
.sizes {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px;
  box-shadow: var(--bevel-in);
  background: var(--lt);
  align-items: center;
}
.sbtn { width: 46px; height: 20px; box-shadow: none; background: transparent; }
.sbtn span { width: var(--d); height: var(--d); background: var(--ink); border-radius: 50%; }
.sbtn.on span { background: var(--pink); }
.board-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.board-stage { position: relative; overflow: hidden; line-height: 0; }
.board-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 750;
  touch-action: none;
  cursor: crosshair;
  display: block;
}
.brush-ring {
  position: absolute;
  pointer-events: none;
  border: 1px solid #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  mix-blend-mode: difference;
}
.brush-ring.square { border-radius: 0; }
.board-cursors { position: absolute; inset: 2px; pointer-events: none; }
.rcur {
  position: absolute;
  transition: left 0.09s linear, top 0.09s linear, opacity 0.6s;
  line-height: 1;
}
.rcur i {
  position: absolute;
  left: -2px;
  top: -2px;
  width: 14px;
  height: 14px;
  background: var(--c);
  clip-path: polygon(0 0, 100% 45%, 50% 55%, 40% 100%);
  filter: drop-shadow(1px 1px 0 #000);
}
.rcur i::after { content: ''; }
.rcur b {
  position: absolute;
  left: 12px;
  top: 12px;
  white-space: nowrap;
  padding: 1px 4px;
  font: 8px/1.4 var(--f-body);
  color: #fff;
  background: var(--c);
  border: 1px solid #000;
  text-shadow: 1px 1px 0 #000;
}
.rcur.idle { opacity: 0.35; }

.palette-row { display: flex; align-items: center; gap: 6px; }
.cur-wrap {
  width: 34px;
  height: 34px;
  padding: 5px;
  box-shadow: var(--bevel-in);
  background: repeating-conic-gradient(#fff 0 25%, #e8d8e8 0 50%) 0 0 / 4px 4px;
  flex: none;
}
.cur-color { display: block; width: 100%; height: 100%; border: 1px solid #000; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.5); }
.palette {
  display: grid;
  grid-template-columns: repeat(12, 16px);
  grid-template-rows: 16px 16px;
  gap: 1px;
}
.palette button {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  box-shadow: var(--bevel-in);
}
.palette button.on { outline: 2px solid #000; outline-offset: -1px; z-index: 1; position: relative; box-shadow: inset 0 0 0 1px #fff; }
.custom-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: conic-gradient(from 0deg, #ff4f6d, #ffd23f, #4fd47a, #5ec8ff, #9b4dff, #ff4f9a, #ff4f6d);
  box-shadow: var(--bevel-out);
  flex: none;
}
.custom-wrap span { font: 14px/1 var(--f-pixel); color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; pointer-events: none; }
.custom-wrap input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: var(--cursor); }
.statusbar {
  grid-column: 1 / -1;
  display: flex;
  gap: 2px;
  font-size: 16px;
}
.statusbar span {
  padding: 2px 6px;
  box-shadow: inset 1px 1px var(--sh), inset -1px -1px var(--hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.statusbar span:first-child { flex: 1 1 auto; }
.statusbar .st-xy { width: 110px; flex: none; }
.statusbar span:last-child { flex: 0 1 auto; color: var(--ink2); }

/* ============================================================
   САД
   ============================================================ */
.garden-lead, .games-lead { margin: 0 0 8px; font-size: 16px; }
.garden-count { color: #8a0a4e; white-space: nowrap; }
.garden-outer { position: relative; display: flex; justify-content: center; background: #12081f; padding: 3px; }
.garden-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  line-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--pink) #12081f;
}
.garden-scroll::-webkit-scrollbar { height: 12px; }
.garden-scroll::-webkit-scrollbar-track { background: #12081f; }
.garden-scroll::-webkit-scrollbar-thumb { background: var(--pink2); box-shadow: inset -1px -1px #8a0a4e, inset 1px 1px #fff; }
.garden-canvas { display: block; image-rendering: pixelated; image-rendering: crisp-edges; touch-action: pan-x pan-y; }
.garden-outer.planting .garden-canvas { cursor: copy !important; }
.garden-empty {
  position: absolute;
  left: 50%;
  top: 70%;
  transform: translate(-50%, -50%);
  padding: 6px 10px;
  font: 9px/1.5 var(--f-pixel);
  color: #fff;
  background: rgba(42, 22, 54, 0.75);
  border: 1px solid #fff;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.5;
  animation: blink 1.4s steps(1) infinite;
}
.garden-tip {
  position: absolute;
  z-index: 3;
  width: max-content;
  max-width: 240px;
  padding: 6px 8px;
  line-height: 1.4;
  font-size: 16px;
  background: #ffffe1;
  border: 1px solid #000;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.garden-tip[hidden] { display: none; }
.tip-head { display: flex; gap: 8px; align-items: center; }
.tip-ico { image-rendering: pixelated; flex: none; }
.tip-head small { color: #666; }
.garden-tip p { margin: 5px 0 0; font-style: italic; word-wrap: break-word; }
.tip-mine { margin-top: 4px; color: #b0105e; display: flex; align-items: center; gap: 4px; }

.plant-form { margin-top: 12px; }
fieldset {
  margin: 0;
  padding: 10px 10px 10px;
  border: 0;
  box-shadow: inset 1px 1px var(--sh), inset -1px -1px var(--hi), inset 2px 2px var(--hi), inset -2px -2px var(--sh);
}
legend {
  padding: 0 4px;
  font: 16px/1 var(--f-head);
  color: #8a0a4e;
}
legend .ico { --k: 2; }
.pf-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: start; margin-bottom: 8px; }
.pf-label { font: 16px/28px var(--f-head); color: var(--ink2); }
.pick-type { display: flex; flex-wrap: wrap; gap: 3px; }
.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
  min-height: 62px;
  padding: 4px 5px 4px;
  border: 0;
  background: var(--face);
  box-shadow: var(--bevel-out);
  font-size: 16px;
  color: var(--ink);
}
.pick img { image-rendering: pixelated; }
.pick.on { box-shadow: var(--bevel-in); background: #fff; color: #b0105e; font-weight: bold; }
.pick-color { display: flex; flex-wrap: wrap; gap: 3px; padding-top: 4px; }
.swatch { width: 22px; height: 22px; padding: 0; border: 1px solid var(--dk); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.6), inset -1px -1px 0 rgba(0, 0, 0, 0.25); }
.swatch.on { outline: 2px solid var(--dk); outline-offset: 2px; }
.pf-inputs { display: grid; gap: 4px; }
.inp {
  width: 100%;
  padding: 5px 6px;
  border: 0;
  background: #fff;
  box-shadow: var(--bevel-in);
  font: 16px/1.35 var(--f-body);
  color: var(--ink);
  resize: vertical;
}
.inp:focus { outline: 1px dotted var(--pink); outline-offset: -4px; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-left: 104px; }
.plant-msg { font-size: 16px; }
.plant-msg.hint { color: #6a3fb0; font-weight: bold; animation: blink 1.2s steps(1) infinite; }
.plant-msg.ok { color: #0a7a3a; font-weight: bold; }
.plant-msg.err { color: #c0103e; font-weight: bold; }

.gb { margin-top: 14px; }
.gb-head {
  font: 16px/1 var(--f-head);
  color: #8a0a4e;
  padding-bottom: 6px;
  border-bottom: 2px dotted var(--sh);
}
.gb-head .ico { --k: 2; }
.gb-list { list-style: none; margin: 0; padding: 0; }
.gb-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px dotted var(--sh);
}
.gb-list li:nth-child(odd) { background: rgba(255, 255, 255, 0.45); }
.gb-list li.mine { background: repeating-linear-gradient(45deg, #fff0f8 0 6px, #ffe6f3 6px 12px); }
.gb-list li.gb-empty { display: block; color: var(--ink2); text-align: center; padding: 14px; }
.gb-ico { image-rendering: pixelated; justify-self: center; align-self: start; max-width: 30px; }
.gb-top { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.gb-top b { color: #6a1fb0; font-size: 16px; }
.gb-top span { color: var(--ink2); }
.gb-top time { margin-left: auto; color: #8f7a99; font-size: 16px; }
.gb-list p { margin: 2px 0 0; word-wrap: break-word; font-size: 16px; }
.gb-list p.quiet { color: #9c87a6; font-style: italic; }
.gb-pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 8px; color: var(--ink2); }
.gb-pager:empty { display: none; }
.gb-pager button {
  padding: 4px 10px;
  border: 0;
  background: var(--face);
  box-shadow: var(--bevel-out);
  font: 16px/1 var(--f-body);
  color: var(--ink);
}
.gb-pager button:disabled { color: var(--sh); text-shadow: 1px 1px 0 #fff; }

/* ============================================================
   ИГРУЛЬКИ — картриджи
   ============================================================ */
.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 16px 12px 12px;
  background:
    linear-gradient(180deg, transparent calc(100% - 14px), #a8653a calc(100% - 14px), #7a4524 calc(100% - 4px), #5a3018 calc(100% - 4px)),
    repeating-linear-gradient(90deg, #2a1636 0 2px, #321a40 2px 4px);
  box-shadow: var(--bevel-in);
}
.cart {
  --cc: #8a7a99;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 0 10px 10px;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, #d8cfe0, #b8aac6);
  border: 2px solid #1a0f24;
  border-radius: 6px 6px 3px 3px;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.6), inset -3px -3px 0 rgba(0, 0, 0, 0.18), 4px 4px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}
a.cart:hover { transform: translateY(-6px) rotate(-1deg); }
a.cart:active { transform: translateY(2px); }
.cart-top { display: flex; justify-content: center; gap: 4px; height: 12px; padding-top: 3px; }
.cart-top i { width: 14px; height: 5px; background: #9a8aa8; box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.3); }
.cart-label {
  margin-top: 4px;
  padding: 6px;
  background: #fff;
  border: 2px solid #1a0f24;
  box-shadow: inset 0 0 0 2px var(--cc);
}
.cart-art {
  position: relative;
  height: 70px;
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.9) 0 4px, transparent 5px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.15) 0 2px, transparent 2px 4px),
    linear-gradient(160deg, var(--cc), #2a1636);
  image-rendering: pixelated;
  overflow: hidden;
}
.cart-art::before { /* пиксельные «горы» */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background:
    linear-gradient(135deg, transparent 50%, #12081f 50%) 0 0 / 28px 28px repeat-x,
    linear-gradient(225deg, transparent 50%, #12081f 50%) 0 0 / 28px 28px repeat-x;
  opacity: 0.85;
}
.cart-num {
  position: absolute;
  top: 6px;
  left: 6px;
  font: 10px/1 var(--f-pixel);
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}
.cart-title { margin-top: 6px; font: 16px/1.15 var(--f-head); color: var(--ink); }
.cart-sub { font-size: 16px; color: var(--ink2); min-height: 16px; }
.cart-btn {
  align-self: center;
  margin-top: 8px;
  padding: 5px 10px;
  font: 8px/1 var(--f-pixel);
  color: #fff;
  background: #1a0f24;
  border-radius: 10px;
  letter-spacing: 1px;
}
a.cart .cart-btn::before {
  content: '';
  display: inline-block;
  margin-right: 6px;
  border-left: 6px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  vertical-align: -1px;
}
a.cart:hover .cart-btn { background: var(--cc); animation: blink 0.5s steps(1) infinite; }
.cart.soon { filter: grayscale(0.85) brightness(0.85); opacity: 0.75; }
.cart.soon .cart-art { background: repeating-linear-gradient(45deg, #2a1636 0 8px, #3a2448 8px 16px); }
.cart.soon .cart-btn { background: #6a5a78; }
.new-badge {
  position: absolute;
  top: -12px;
  right: -12px;
  padding: 5px 6px;
  font: 9px/1 var(--f-pixel);
  color: var(--lemon);
  background: #e0003c;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
  transform: rotate(12deg);
  animation: newb 0.7s steps(1) infinite;
}
@keyframes newb { 50% { color: #fff; background: #ff4f9a; } }

/* ============================================================
   ПОДВАЛ
   ============================================================ */
.foot {
  margin-top: 18px;
  text-align: center;
  color: var(--pink3);
  text-shadow: 1px 1px 0 #000;
  font-size: 16px;
}
.foot p { margin: 4px 0; }
.foot .ico { --k: 1.5; vertical-align: -1px; }
.foot-small { color: rgba(255, 211, 234, 0.6); }

.offline-bar {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 70;
  transform: translate(-50%, 120px);
  padding: 6px 12px;
  background: #ffffe1;
  border: 1px solid #000;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  font-size: 16px;
  transition: transform 0.3s;
}
body.offline.entered .offline-bar { transform: translate(-50%, 0); }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  #profile { grid-row: span 3; }
  .badges { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .page { padding: 0 8px 24px; }
  .top { padding-top: 16px; }
  .logo-text { font-size: 18px; }
  .nav { width: 100%; }
  .nav a { flex: 1; justify-content: center; padding: 7px 6px 6px; font-size: 16px; gap: 4px; }
  .nav a .ico { display: none; }
  .side { grid-template-columns: 1fr; }
  #profile { grid-row: auto; }
  .board-body { grid-template-columns: 1fr; }
  .toolbox { flex-direction: row; justify-content: space-between; }
  .tools { grid-template-columns: repeat(6, 1fr); }
  .sizes { flex-direction: row; }
  .sbtn { width: 30px; height: 27px; }
  .palette { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto; flex: 1; }
  .palette button { width: auto; height: 18px; }
  .statusbar span:last-child { display: none; }
  .pf-row { grid-template-columns: 1fr; gap: 2px; }
  .pf-label { line-height: 1.4; }
  .pf-actions { padding-left: 0; }
  .pick { flex: 1 0 auto; }
  .osd { font-size: 11px; }
  .osd-l, .osd-r { top: 22px; }
  .osd-l { left: 22px; }
  .osd-r { right: 22px; }
  .name { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .glitter, .avatar-frame { animation: none !important; }
  .page { opacity: 1; }
}
