

:root { --tv-accent: #0062E6; --tv-tabbar-h: 60px; }

.tv-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 -2px 22px rgba(15, 23, 42, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tv-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-height: var(--tv-tabbar-h); padding: 8px 2px 7px;
  text-decoration: none; color: #8FA3BC; position: relative;
  font: 600 10px/1.1 'DM Sans', -apple-system, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent; transition: color .2s ease;
}
.tv-tab svg { width: 23px; height: 23px; stroke-width: 2; fill: none; stroke: currentColor; transition: transform .2s cubic-bezier(.16,1,.3,1); }
.tv-tab span { letter-spacing: .01em; }
.tv-tab:active svg { transform: scale(.88); }
.tv-tab.active { color: var(--tv-accent); }
.tv-tab.active svg { transform: translateY(-1px); }
.tv-tab.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--tv-accent);
}

.tv-hamburger {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid rgba(0,0,0,.09);
  border-radius: 11px; background: rgba(255,255,255,.7); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #0F172A; flex: 0 0 auto; transition: background .2s, border-color .2s;
}
.tv-hamburger:hover { background: #fff; border-color: rgba(0,0,0,.15); }
.tv-hamburger svg { width: 20px; height: 20px; }

.tv-drawer-backdrop {
  position: fixed; inset: 0; z-index: 9500;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}
.tv-drawer-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; }
.tv-drawer {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(84vw, 330px); max-width: 86vw;
  background: #fff; transform: translateX(100%);
  transition: transform .36s cubic-bezier(.16, 1, .3, 1);
  display: flex; flex-direction: column;
  box-shadow: -16px 0 48px rgba(15, 23, 42, 0.2);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-y: auto;
}
.tv-drawer.open { transform: none; }
.tv-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid rgba(0,0,0,.06);
}
.tv-drawer-brand { display: flex; align-items: center; gap: 9px; font: 700 16px 'DM Sans', sans-serif; color: #0F172A; }
.tv-drawer-brand img { width: 30px; height: 30px; border-radius: 8px; }
.tv-drawer-brand b { color: var(--tv-accent); font-weight: 700; }
.tv-drawer-close { width: 34px; height: 34px; border: 0; background: #F4F6F9; border-radius: 9px; cursor: pointer; color: #4B5E7A; display: grid; place-items: center; }
.tv-drawer-close svg { width: 18px; height: 18px; }
.tv-drawer-links { padding: 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.tv-drawer-link {
  display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: 11px;
  text-decoration: none; color: #1f2937; font: 500 14.5px 'DM Sans', sans-serif;
  transition: background .18s;
}
.tv-drawer-link svg { width: 19px; height: 19px; stroke: #8FA3BC; fill: none; stroke-width: 2; flex: 0 0 auto; }
.tv-drawer-link:hover { background: #F4F6F9; }
.tv-drawer-link.active { background: rgba(0,98,230,.07); color: var(--tv-accent); }
.tv-drawer-link.active svg { stroke: var(--tv-accent); }
.tv-drawer-link.report { color: #E03131; }
.tv-drawer-link.report svg { stroke: #E03131; }
.tv-drawer-sep { height: 1px; background: rgba(0,0,0,.06); margin: 10px 14px; }
.tv-drawer-lang { display: flex; gap: 6px; padding: 4px 14px 22px; }
.tv-drawer-lang button {
  flex: 1; padding: 11px; border: 1px solid rgba(0,0,0,.1); background: #fff; border-radius: 10px;
  font: 600 13px 'DM Sans', sans-serif; color: #4B5E7A; cursor: pointer; text-transform: uppercase; letter-spacing: .05em;
}
.tv-drawer-lang button.active { background: var(--tv-accent); color: #fff; border-color: var(--tv-accent); }

@media (max-width: 768px) {
  .tv-tabbar { display: grid; }
  .tv-hamburger { display: inline-flex; }
  body.tv-has-shell { padding-bottom: calc(var(--tv-tabbar-h) + env(safe-area-inset-bottom, 0px)) !important; }

  .tv-has-shell .header-nav { display: none !important; }

  .header-nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; max-width: 100%; }
  .header-nav a:not(.nav-report) { display: none; }
  .header-inner { gap: 8px; flex-wrap: wrap; }

  .tv-has-shell .feedback-minimal { bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media (prefers-reduced-motion: reduce) {
  .tv-drawer, .tv-drawer-backdrop { transition: none; }
}
