/* Courteam — общий стиль сайта и Telegram Mini App. Сначала телефон, с 960px — ПК. */

:root {
  --bg: #0B0B0D;
  --text: #F5F5F2;
  --muted: #B4B4BA;
  --muted-2: #D0D0D5;
  --accent: #FFD21F;
  --accent-rgb: 255, 210, 31;
  --on-accent: #0B0B0D;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-line: rgba(255, 255, 255, 0.13);
  --r-lg: 24px;
  --r-md: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 15px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  padding-bottom: calc(100px + var(--safe-b));
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic16 { width: 16px; height: 16px; } .ic18 { width: 18px; height: 18px; } .ic28 { width: 28px; height: 28px; }

/* ---------- Фон и стекло ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); }
.b1 { width: 320px; height: 320px; right: -80px; top: 120px; background: var(--accent); opacity: .18; }
.b2 { width: 280px; height: 280px; left: -120px; top: 55%; background: #FF8A3D; opacity: .12; }
.b3 { width: 300px; height: 300px; right: -60px; bottom: -80px; background: var(--accent); opacity: .12; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 30px rgba(0, 0, 0, .28);
}
.blur { -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
.press { transition: transform .25s var(--ease), background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.press:active { transform: scale(.96); }
@media (hover: hover) { .press:hover { transform: translateY(-2px); } .press:active { transform: scale(.97); } }

.clamp2, .clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp2 { -webkit-line-clamp: 2; } .clamp3 { -webkit-line-clamp: 3; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 12px; }

/* ---------- Шапка ---------- */
.topbar { padding-top: 12px; }
.topbar-in { display: flex; align-items: center; gap: 12px; min-height: 48px; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 700 17px var(--display); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.logo-mark.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
.logo-text { font: 700 18px var(--display); letter-spacing: -.2px; }
.topnav { display: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill { height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--glass-line); background: var(--glass); display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; }
.btn-accent { height: 44px; padding: 0 18px; border-radius: 22px; border: 0; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 24px rgba(var(--accent-rgb), .25); }
.login-btn { display: none; }
.avatar-btn { width: 44px; height: 44px; border-radius: 22px; overflow: hidden; border: 2px solid rgba(var(--accent-rgb), .6); display: grid; place-items: center; background: var(--glass); font-weight: 700; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Заголовки ---------- */
.section-head { margin-top: 22px; }
.h1 { margin: 0; font: 700 22px/1.2 var(--display); letter-spacing: -.3px; }
.h1-desk { display: none; }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.h2 { margin: 32px 0 12px; font: 700 22px var(--display); }

/* ---------- Фильтры ---------- */
.chips { margin: 14px -12px 0; padding: 2px 12px 4px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--text); display: flex; align-items: center; gap: 7px; flex-shrink: 0; font-size: 13px; font-weight: 500; white-space: nowrap; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Лента ---------- */
.feed { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.feed.anim { animation: feedIn .45s var(--ease); }
@keyframes feedIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.news-hero { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; }
.nh-img { position: relative; height: 190px; background: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 12px, rgba(255,255,255,.07) 12px 24px); display: grid; place-items: center; color: #9A9AA1; }
.nh-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nh-img > svg { width: 34px; height: 34px; stroke-width: 1.6; }
.badge { position: absolute; left: 12px; top: 12px; z-index: 1; padding: 5px 10px; border-radius: 12px; color: var(--on-accent); font-size: 12px; font-weight: 700; }
.nh-time { position: absolute; right: 12px; top: 12px; z-index: 1; padding: 5px 10px; border-radius: 12px; background: rgba(11,11,13,.6); font-size: 12px; font-weight: 500; }
.nh-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.nh-title { font-size: 18px; font-weight: 700; line-height: 1.25; }
.nh-ex { font-size: 14px; line-height: 1.45; color: var(--muted); }
.nh-meta { margin-top: 2px; display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted-2); }
.nh-meta span { display: flex; align-items: center; gap: 5px; }
.nh-meta svg { width: 16px; height: 16px; }
.nh-src { margin-left: auto; color: var(--muted); font-size: 12px; }

.news-card { display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 10px; border-radius: var(--r-md); }
.nc-img { width: 60px; height: 60px; border-radius: 14px; flex-shrink: 0; overflow: hidden; background: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 8px, rgba(255,255,255,.08) 8px 16px); }
.nc-img img { width: 100%; height: 100%; object-fit: cover; }
.nc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nc-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.nc-meta b { color: var(--text); font-weight: 600; }
.nc-title { font-size: 14px; font-weight: 600; line-height: 1.3; }

.empty { padding: 28px 20px; border-radius: var(--r-lg); text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font: 600 16px var(--display); margin-bottom: 6px; }
.skeleton { border-radius: var(--r-lg); height: 320px; background: linear-gradient(100deg, rgba(255,255,255,.04) 40%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 60%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.more { margin-top: 8px; width: 100%; height: 48px; border-radius: 16px; color: var(--text); font-weight: 600; font-size: 14px; }

/* ---------- Правая колонка ---------- */
.home-aside { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.cta { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 12px 32px rgba(var(--accent-rgb), .28); }
.cta-ic { width: 52px; height: 52px; border-radius: 16px; background: rgba(11,11,13,.12); display: grid; place-items: center; flex-shrink: 0; }
.cta-txt { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.cta-title { font: 700 16px/1.2 var(--display); }
.cta-sub { font-size: 13px; line-height: 1.3; color: #2A2A2E; }
.cta-go { width: 36px; height: 36px; border-radius: 50%; background: #0B0B0D; color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }

.game { position: relative; overflow: hidden; min-height: 150px; padding: 16px; border-radius: var(--r-lg); display: flex; flex-direction: column; border-color: rgba(var(--accent-rgb), .4); }
.game-orb { position: absolute; right: -12px; top: -14px; width: 132px; height: 132px; border-radius: 50%; background: rgba(var(--accent-rgb), .16); color: var(--accent); display: grid; place-items: center; }
.game-orb svg { width: 58px; height: 58px; stroke-width: 1.8; }
.game-title { margin-top: auto; font: 700 19px var(--display); }
.game-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }
.game-btn { margin-top: 10px; align-self: flex-start; height: 34px; padding: 0 16px; border-radius: 17px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; display: flex; align-items: center; }

.social { padding: 16px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 12px; }
.social-title { font: 600 15px var(--display); }
.social-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.social-grid a { height: 44px; border-radius: 14px; border: 1px solid var(--glass-line); background: rgba(255,255,255,.05); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }

/* ---------- Разделы ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { min-height: 128px; padding: 14px; border-radius: 22px; display: flex; flex-direction: column; }
.tile-ic { width: 44px; height: 44px; border-radius: 14px; background: rgba(var(--accent-rgb), .16); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.tile-title { margin-top: auto; font: 600 15px var(--display); }
.tile-sub { margin-top: 4px; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.tile-row { grid-column: span 2; min-height: 60px; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 18px; }
.tile-row .tile-ic { width: 40px; height: 40px; border-radius: 12px; }
.tile-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tile-row .tile-title { margin: 0; font-size: 14px; }
.tile-row .tile-sub { margin: 0; font-size: 12px; }
.tile-chev { width: 20px; height: 20px; color: var(--muted); }

/* ---------- Внутренние страницы ---------- */
.view { animation: viewIn .4s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.back { margin-top: 18px; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 8px; border-radius: 20px; color: var(--muted-2); font-weight: 600; font-size: 14px; }
.panel { margin-top: 12px; padding: 24px; border-radius: var(--r-lg); }
.soon { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.soon .btn-accent { margin-top: 16px; }
.soon-ic { width: 64px; height: 64px; border-radius: 20px; background: rgba(var(--accent-rgb), .16); color: var(--accent); display: grid; place-items: center; margin-bottom: 12px; }
.soon-ic svg { width: 32px; height: 32px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-ava { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: rgba(var(--accent-rgb), .16); color: var(--accent); display: grid; place-items: center; font: 700 24px var(--display); flex-shrink: 0; }
.profile-ava img { width: 100%; height: 100%; object-fit: cover; }
.profile-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.btn-ghost { height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--glass-line); background: var(--glass); display: inline-flex; align-items: center; font-weight: 600; font-size: 14px; }
.tg-widget { margin-top: 18px; min-height: 48px; }

/* ---------- Подвал ---------- */
.footer { margin-top: 40px; padding: 20px 0 8px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted-2); }

/* ---------- Нижняя навигация (телефон / Mini App) ---------- */
.tabbar { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); height: 68px; padding: 6px; border-radius: 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 520px; margin: 0 auto; background: rgba(24, 24, 28, .55); }
.tab-ind { position: absolute; left: 6px; top: 6px; bottom: 6px; width: calc((100% - 12px) / 4); border-radius: 18px; background: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 18px rgba(var(--accent-rgb), .28); transition: transform .5s var(--ease); }
.tab { position: relative; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted-2); transition: color .3s ease; }
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--on-accent); }

.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); padding: 12px 18px; border-radius: 16px; background: rgba(30,30,34,.85); border: 1px solid var(--glass-line); font-size: 14px; font-weight: 500; animation: feedIn .3s var(--ease); max-width: calc(100% - 32px); }

/* ---------- ПК ---------- */
@media (min-width: 960px) {
  body { padding-bottom: 32px; }
  .wrap { padding: 0 24px; }
  .topbar { padding-top: 20px; }
  .topbar-in { padding: 10px 10px 10px 18px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 30px rgba(0,0,0,.28); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
  .logo-mark { width: 38px; height: 38px; font-size: 19px; }
  .logo-text { font-size: 20px; }
  .topnav { display: flex; gap: 2px; margin-left: 12px; }
  .topnav a { padding: 11px 14px; border-radius: 14px; font-size: 14px; font-weight: 500; color: var(--muted-2); transition: background-color .25s ease, color .25s ease; }
  .topnav a:hover { background: rgba(255,255,255,.08); color: var(--text); }
  .topnav a[aria-current="page"] { background: rgba(255,255,255,.1); color: var(--text); font-weight: 600; }
  .pill { height: 44px; padding: 0 14px; border-radius: 22px; font-size: 14px; }
  .login-btn { display: inline-flex; }

  .section-head { margin-top: 32px; }
  .h1 { font-size: 34px; letter-spacing: -.5px; }
  .h1-desk { display: inline; }
  .sub { font-size: 15px; }
  .h2 { margin-top: 40px; margin-bottom: 16px; font-size: 26px; }

  .home-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
  .home-main { flex: 999 1 560px; min-width: 0; }
  .home-aside { flex: 1 1 320px; min-width: 0; margin-top: 32px; gap: 16px; }

  .chips { margin: 16px 0 0; padding: 0; flex-wrap: wrap; overflow: visible; }
  .chip { height: 40px; padding: 0 16px; font-size: 14px; }

  .feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
  .news-hero { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; border-radius: 28px; }
  .nh-img { flex: 1 1 320px; height: auto; min-height: 300px; }
  .nh-body { flex: 1 1 320px; padding: 28px; gap: 12px; }
  .nh-title { font: 600 24px/1.25 var(--display); }
  .nh-ex { font-size: 15px; line-height: 1.5; }
  .nh-meta { margin-top: auto; font-size: 14px; }
  .news-card { flex-direction: column; align-items: stretch; padding: 0; gap: 0; border-radius: 22px; overflow: hidden; }
  .nc-img { width: 100%; height: 130px; border-radius: 0; }
  .nc-body { padding: 16px; gap: 8px; }
  .nc-meta { font-size: 13px; }
  .nc-title { font-size: 16px; line-height: 1.35; }
  .more { width: auto; padding: 0 28px; margin: 16px auto 0; display: block; }

  .cta { flex-direction: column; align-items: flex-start; padding: 24px; border-radius: 28px; gap: 10px; }
  .cta-ic { width: 56px; height: 56px; border-radius: 18px; }
  .cta-title { margin-top: 6px; font-size: 22px; }
  .cta-sub { font-size: 14px; line-height: 1.45; }
  .cta-go { width: auto; height: 44px; padding: 0 20px; border-radius: 22px; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; white-space: nowrap; margin-top: 6px; }
  .cta-go::before { content: 'Сравнить службы'; margin-right: 6px; }
  .game { min-height: 200px; padding: 22px; border-radius: 28px; }
  .game-orb { width: 150px; height: 150px; }
  .game-title { font-size: 22px; }
  .game-sub { font-size: 14px; }
  .game-btn { height: 40px; padding: 0 20px; border-radius: 20px; font-size: 14px; }
  .social { padding: 22px; border-radius: 28px; }

  .tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .tile { min-height: 170px; padding: 20px; border-radius: 24px; }
  .tile-ic { width: 48px; height: 48px; border-radius: 15px; }
  .tile-title { font-size: 17px; }
  .tile-sub { font-size: 14px; line-height: 1.4; }
  .tile-row { grid-column: auto; flex-direction: column; align-items: stretch; gap: 0; min-height: 170px; padding: 20px; border-radius: 24px; }
  .tile-row .tile-ic { width: 48px; height: 48px; border-radius: 15px; }
  .tile-row .tile-txt { margin-top: auto; flex: 0; }
  .tile-row .tile-title { font-size: 17px; }
  .tile-row .tile-sub { margin-top: 6px; font-size: 14px; }
  .tile-chev { display: none; }

  .tabbar { display: none; }
  .toast { bottom: 32px; }
  .blob { filter: blur(120px); }
  .b1 { width: 520px; height: 520px; right: -120px; top: 60px; }
  .b2 { width: 460px; height: 460px; }
  .b3 { width: 520px; height: 520px; right: 30%; }
}

/* Внутри Telegram: шапка проще, вход не нужен */
.in-tg .login-btn { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
