/* Retro-2010 kit — дизайн «веб 2010–2015 / Windows 7 / старый ВК» в фирменных цветах huEVO.
   Подключение: <link rel="stylesheet" href="kit/retro-2010.css"> и класс r-body на <body>.
   Шрифт PT Sans (фолбэк для телефонов, где нет Tahoma) лежит в kit/fonts — пути ниже относительные. */

@font-face { font-family: 'PT Sans'; font-weight: 400; font-display: swap; src: url(fonts/ptsans-400-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'PT Sans'; font-weight: 400; font-display: swap; src: url(fonts/ptsans-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'PT Sans'; font-weight: 700; font-display: swap; src: url(fonts/ptsans-700-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'PT Sans'; font-weight: 700; font-display: swap; src: url(fonts/ptsans-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* бренд huEVO: графит + красный брусок */
  --hu-hi: #8c8c8c;
  --hu: #555;
  --hu-lo: #2e2e2e;
  --hu-red: #d40000;
  /* текст и линии */
  --txt: #222;
  --muted: #6b6b6b;
  --link: #2b587a; /* синий ссылок ВК */
  --line: #c4c4c4;
  --line-2: #9d9d9d;
  --tip: #ffffe1; /* жёлтая всплывашка Windows */
  /* фон по умолчанию — «денежный» зелёный; для другой игры поменяй три цвета */
  --bg: #bfe57e;
  --bg-hi: #ddf5a8;
  --bg-lo: #a2cf58;
  /* шрифты: Tahoma как во ВК, Trebuchet для заголовков, Arial Black для логотипов */
  --font: Tahoma, 'PT Sans', Verdana, Geneva, sans-serif;
  --font-head: 'Trebuchet MS', 'PT Sans', Tahoma, sans-serif;
  --font-logo: 'Arial Black', 'Arial Bold', Arial, Helvetica, sans-serif;
  /* глянец: светлая верхняя половина и резкий перелом на 48–52% — главный признак эпохи */
  --g-green: linear-gradient(#a6e683 0%, #75cd4f 48%, #55b52d 52%, #3f9a1d 100%);
  --g-blue: linear-gradient(#b4dcff 0%, #74b6f2 48%, #3f91e2 52%, #2a72c4 100%);
  --g-gray: linear-gradient(#ffffff 0%, #f0f0f0 48%, #dedede 52%, #cfcfcf 100%);
  --g-red: linear-gradient(#f39a8c 0%, #e05a45 48%, #c8331f 52%, #a82312 100%);
  --g-gold: linear-gradient(#fff1a6 0%, #ffd84d 48%, #f5b800 52%, #dc9a00 100%);
  --g-dark: linear-gradient(#7a7a7a 0%, #575757 48%, #3d3d3d 52%, #2a2a2a 100%);
  --g-bar: linear-gradient(#7c7c7c 0%, #5a5a5a 48%, #424242 52%, #333 100%);
  --g-progress: linear-gradient(#b9f29b 0%, #6fd243 50%, #3fae1c 51%, #5cc93a 100%);
  --outline: 0 1px 0 #1d1d1d, 1px 0 0 #1d1d1d, -1px 0 0 #1d1d1d, 0 -1px 0 #1d1d1d,
    1px 1px 0 #1d1d1d, -1px 1px 0 #1d1d1d, 1px -1px 0 #1d1d1d, -1px -1px 0 #1d1d1d;
}

/* ---------- основа ---------- */
.r-body {
  margin: 0;
  color: var(--txt);
  font: 13px/1.35 var(--font);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.07) 0 12px, rgba(255, 255, 255, 0) 12px 24px),
    radial-gradient(120% 90% at 50% 38%, var(--bg-hi) 0%, var(--bg) 60%, var(--bg-lo) 100%);
  -webkit-tap-highlight-color: transparent;
}
/* сброс через :where — нулевая специфичность, чтобы классы компонентов (.btn, .buy, .wclose…) всегда побеждали */
:where(.r-body) :where(button) { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
.r-body [hidden] { display: none !important; }
img.px { image-rendering: pixelated; image-rendering: crisp-edges; display: inline-block; vertical-align: middle; }
img.ei { vertical-align: -3px; margin-right: 3px; }
.r-outline { color: #fff; font-weight: bold; text-shadow: var(--outline), 0 3px 3px rgba(0, 0, 0, 0.35); }
.muted { color: var(--muted); }

/* знак валюты: мини-плашка huEVO с белой «Х» и красным бруском (HTML: <i class="cur">Х</i>) */
.cur {
  position: relative; display: inline-block; width: 1.3em; height: 1.3em; margin-right: 0.3em; vertical-align: -0.2em;
  border-radius: 0.24em; background: linear-gradient(#8c8c8c, #3a3a3a); border: 1px solid #222;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 1px rgba(0, 0, 0, 0.3);
  color: #fff; font: normal bold 0.8em/1.3em Arial, Helvetica, sans-serif; text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6); overflow: hidden;
}
.cur::after { content: ''; position: absolute; right: 0.16em; bottom: 0.1em; width: 0.38em; height: 0.2em; background: var(--hu-red); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 14px;
  border-radius: 4px; background: var(--g-green); border: 1px solid #2c6f14;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 3px rgba(0, 0, 0, 0.3);
  color: #fff; font: bold 14px var(--font); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.35); cursor: pointer; text-decoration: none;
}
.btn:active:not(:disabled) { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35); }
.btn.block { width: 100%; }
.btn.big { min-height: 44px; font-size: 15px; }
.btn.small { min-height: 26px; padding: 3px 10px; font-size: 12px; }
.btn.blue { background: var(--g-blue); border-color: #1d5ea3; }
.btn.red { background: var(--g-red); border-color: #7d1a0c; }
.btn.gold { background: var(--g-gold); border-color: #a87400; color: #4a3000; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn.gray, .btn.off { background: var(--g-gray); border-color: #8f8f8f; color: #333; text-shadow: 0 1px 0 #fff; }
.btn.off { color: #7b7b7b; }
.btn:disabled { filter: grayscale(0.9); opacity: 0.6; cursor: default; }

/* белые глянцевые плашки и квадратные кнопки-иконки в шапке */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 3px; min-width: 0;
  border-radius: 4px; background: linear-gradient(#ffffff, #e8e8e8); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, 0.25); font-weight: bold; font-size: 12px; color: var(--link);
}
.chip .ava { flex: none; width: 26px; height: 26px; border-radius: 2px; overflow: hidden; border: 1px solid #b5b5b5; background: #f2f2f2; display: grid; place-items: center; }
.chip .ava img { width: 100%; height: 100%; object-fit: cover; }
.iconbtn {
  width: 34px; height: 32px; border-radius: 4px; display: inline-grid; place-items: center;
  background: var(--g-gray); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, 0.25);
}
.iconbtn svg { width: 22px; height: 22px; display: block; }
.chip:active, .iconbtn:active { background: linear-gradient(#d9d9d9, #efefef); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3); }
.tag { font-size: 9px; letter-spacing: 0.5px; background: var(--g-red); color: #fff; padding: 2px 5px; border-radius: 3px; border: 1px solid #8e1b0d; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); }

/* ---------- нижние вкладки: тёмная глянцевая «панель задач» Windows 7 ---------- */
.taskbar {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(#6e6e6e 0%, #4c4c4c 48%, #333 52%, #222 100%);
  border-top: 1px solid #9a9a9a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 -2px 6px rgba(0, 0, 0, 0.25);
}
.taskbar::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--hu-red); opacity: 0.85; }
.taskbar button {
  position: relative; height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 5px; border: 1px solid transparent; color: #fff; font: bold 11px var(--font); text-shadow: 0 1px 1px #000;
}
.taskbar button svg { width: 44px; height: 44px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45)); }
@media (hover: hover) {
  .taskbar button:hover { background: linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0) 51%, rgba(255, 255, 255, 0.08)); border-color: rgba(255, 255, 255, 0.25); }
}
.taskbar button.on {
  background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 51%, rgba(170, 215, 255, 0.25));
  border-color: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.35), 0 0 10px rgba(120, 190, 255, 0.45);
}
/* красный кружок «!» — есть что купить/забрать */
.dot {
  position: absolute; top: 3px; right: 14%; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #ff8a7a, #d40000 70%); border: 1.5px solid #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  color: #fff; font: normal bold 11px/1 Tahoma, sans-serif;
}
.dot::after { content: '!'; }

/* ---------- панель/лист с графитовой шапкой ---------- */
.panel { display: flex; flex-direction: column; overflow: hidden; background: #f2f2f2; border: 1px solid #1e1e1e; border-radius: 6px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }
.phead { display: flex; align-items: center; gap: 10px; padding: 8px 8px 9px 12px; color: #fff; background: var(--g-bar); border-bottom: 2px solid var(--hu-red); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.phead .ptxt { flex: 1; min-width: 0; }
.ptitle { font: bold 18px var(--font-head); text-shadow: 0 -1px 0 #000, 0 1px 2px rgba(0, 0, 0, 0.5); }
.psub { margin-top: 1px; font-size: 11.5px; color: #e4e4e4; text-shadow: 0 -1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: linear-gradient(#fbfbfb, #e9e9e9); border-bottom: 1px solid var(--line); font-size: 11px; color: #555; }
.plist { flex: 1; overflow-y: auto; padding: 8px; background: #f2f2f2; }
/* красная кнопка закрытия Windows 7 */
.wclose {
  flex: none; width: 42px; height: 22px; border-radius: 4px; display: grid; place-items: center; color: #fff;
  background: var(--g-red); border: 1px solid #5e1208; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 2px rgba(0, 0, 0, 0.4);
  font: normal bold 14px/1 Arial, sans-serif; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); cursor: pointer;
}
.wclose:hover { background: linear-gradient(#f8b2a6 0%, #ea6c58 48%, #d63f2a 52%, #b72a17 100%); }
/* сегментный переключатель (×1 / ×10 / MAX) */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12); }
.seg button { padding: 4px 9px; font: bold 11px var(--font); color: #333; background: var(--g-gray); border-left: 1px solid var(--line-2); text-shadow: 0 1px 0 #fff; }
.seg button:first-child { border-left: 0; }
.seg button.on { background: linear-gradient(#cfe4f9, #b7d6f4 50%, #a5cbf1 51%, #c3dcf6); color: #123a5f; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25); }

/* ---------- строки списков ---------- */
.item {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 7px 8px; margin-bottom: 6px;
  background: linear-gradient(#ffffff, #f3f3f3); border: 1px solid var(--line); border-radius: 4px; box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, 0.1);
}
@media (hover: hover) { .item:hover { border-color: #a9c7e8; background: linear-gradient(#f7fbff, #e6f1fc); } }
.item.locked { opacity: 0.75; border-style: dashed; }
.item .ic { position: relative; width: 50px; height: 50px; border-radius: 5px; display: grid; place-items: center; background: linear-gradient(#ffffff, #e2e2e2); border: 1px solid #b3b3b3; box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, 0.15); }
.lvl { position: absolute; right: -7px; bottom: -7px; min-width: 22px; padding: 1px 4px; border-radius: 3px; text-align: center; background: var(--g-dark); color: #fff; border: 1px solid #111; font-size: 10px; font-weight: bold; text-shadow: 0 -1px 0 #000; }
.nm { font-weight: bold; font-size: 12.5px; line-height: 1.2; color: var(--link); }
.ds { margin-top: 1px; font-size: 11px; line-height: 1.3; color: #777; }
.ef { margin-top: 2px; font-size: 11px; font-weight: bold; color: #3a8a1c; }
.buy { min-width: 96px; padding: 5px 8px 6px; border-radius: 4px; text-align: center; color: #fff; background: var(--g-green); border: 1px solid #2c6f14; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 2px rgba(0, 0, 0, 0.3); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.35); font-weight: bold; }
.buy small { display: block; font-size: 12px; margin-top: 1px; }
.buy.off { background: var(--g-gray); border-color: #9a9a9a; color: #7b7b7b; text-shadow: 0 1px 0 #fff; }

/* прогресс-бар Windows 7 (<div class="bar"><i style="width:40%"></i></div>) */
.bar { height: 8px; border-radius: 2px; background: linear-gradient(#d9d9d9, #f7f7f7); border: 1px solid #a5a5a5; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--g-progress); transition: width 0.3s; }
.bar.red > i { background: linear-gradient(#ffb0a3 0%, #ee5a43 50%, #c8331f 51%, #e04a33 100%); }

/* ---------- окно «Aero» (модалка) ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 14px; background: rgba(0, 0, 0, 0.5); }
.win {
  width: min(100%, 370px); max-height: calc(100% - 12px); overflow: auto; padding: 0 6px 6px; border-radius: 7px;
  background: linear-gradient(rgba(214, 228, 243, 0.97), rgba(178, 202, 228, 0.97)); border: 1px solid #3b4d61;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 10px 30px rgba(0, 0, 0, 0.55);
}
.win-head { position: relative; padding: 7px 50px 7px 4px; font: bold 15px var(--font-head); color: #13304f; text-shadow: 0 0 6px #fff, 0 0 2px #fff; }
.win-head .wclose { position: absolute; right: 0; top: 0; border-radius: 0 0 4px 4px; border-top: 0; }
.win-body { padding: 12px 14px; text-align: center; background: #fff; border: 1px solid #8ea2b8; border-radius: 3px 3px 0 0; }
.win-foot { display: flex; flex-direction: column; gap: 8px; padding: 6px 14px 12px; background: #f0f0f0; border: 1px solid #8ea2b8; border-top: 1px solid #dfdfdf; border-radius: 0 0 3px 3px; }

/* ---------- уведомления, подсказки, переключатели ---------- */
.toasts { position: fixed; z-index: 60; top: 6px; left: 50%; width: min(94vw, 400px); transform: translateX(-50%); display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.toast { padding: 8px 11px; border-radius: 4px; background: rgba(28, 28, 28, 0.9); color: #fff; border: 1px solid #000; font-size: 12px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
@media (min-width: 700px) { .toasts { top: auto; bottom: 18px; left: auto; right: 18px; width: 330px; transform: none; } }
/* жёлтая всплывашка Windows со стрелкой вниз */
.tip { position: relative; display: inline-block; padding: 7px 10px; background: var(--tip); color: #000; border: 1px solid #767676; border-radius: 4px; box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.3); font-size: 12px; font-weight: bold; }
.tip::after { content: ''; position: absolute; left: var(--ax, 50%); bottom: -7px; width: 12px; height: 12px; margin-left: -6px; background: var(--tip); border-right: 1px solid #767676; border-bottom: 1px solid #767676; transform: rotate(45deg); }
.warn { color: #8a3000; background: var(--tip); border: 1px solid #d9b45c; border-radius: 3px; padding: 6px 8px; }
/* переключатель «ВКЛ/ВЫКЛ» в духе iOS 6 (<b class="tgl on"></b>) */
.tgl { position: relative; display: inline-block; width: 62px; height: 24px; border-radius: 12px; overflow: hidden; border: 1px solid #8a8a8a; background: linear-gradient(#d4d4d4, #f6f6f6); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.25); }
.tgl::before { content: 'ВЫКЛ'; position: absolute; right: 7px; top: 5px; font: normal bold 10px/1 Tahoma, sans-serif; color: #777; }
.tgl::after { content: ''; position: absolute; top: 0; left: 0; width: 24px; height: 22px; border-radius: 11px; background: linear-gradient(#ffffff, #d9d9d9); border: 1px solid #8a8a8a; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.tgl.on { background: linear-gradient(#2b7fd6, #5aa6ef); border-color: #1d5ea3; }
.tgl.on::before { content: 'ВКЛ'; left: 9px; right: auto; color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.35); }
.tgl.on::after { transform: translateX(37px); }

/* ---------- перекидной счётчик в духе часов HTC Sense (статичная разметка: .flip > .fc) ---------- */
.flip { display: inline-flex; align-items: center; gap: 3px; --cw: 40px; --ch: 57px; }
.flip .fc {
  position: relative; width: var(--cw); height: var(--ch); display: grid; place-items: center; border-radius: 6px;
  background: linear-gradient(#6a6a6a 0%, #3c3c3c 50%, #2e2e2e 50%, #1a1a1a 100%); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 1px #111;
  color: #fff; font: bold calc(var(--ch) * 0.74) / 1 Tahoma, 'PT Sans', Verdana, sans-serif; text-shadow: 0 2px 2px rgba(0, 0, 0, 0.7);
}
.flip .fc::after { content: ''; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: #000; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12); }
.flip .fc.gap { margin-left: calc(var(--cw) * 0.24); }
.flip .sign { width: var(--ch); height: var(--ch); margin-left: 3px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }
.flip .sign svg { width: 100%; height: 100%; display: block; }
