:root {
  --color-bg-dark: #000000;
  --color-bg-red: #350000;
  --color-accent: #B0121C; /* deep premium red */
  --color-text-primary: rgba(231,231,227,0.90); /* было плотнее — делаем просвет */
  --color-text-secondary: rgba(205,205,198,0.82);
  --color-text-muted: rgba(165,165,158,0.74);
  --color-glass-bg: rgba(10, 10, 10, 0.75);
  --color-glass-border: rgba(255, 255, 255, 0.1);
  --radius-card: 20px;
  --radius-btn: 16px;
  --device-width: 390px;
  --device-height: 844px;
}

body {
  margin: 0;
  padding: 0;
  background-color: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: 'Inter', sans-serif;
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
}

.device-frame {
  width: var(--device-width);
  height: var(--device-height);
  position: relative;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), inset 0 0 0 8px #000;
  z-index: 1;
}

.background-anim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
  linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.02)),
  linear-gradient(to bottom, rgba(0,0,0,0.16) 0%, rgba(0,0,0,0.08) 55%, transparent 100%),
  radial-gradient(ellipse at center, transparent 42%, rgba(0,0,0,0.22) 86%, rgba(0,0,0,0.32) 100%),
  url('фон.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  filter: brightness(0.72) saturate(0.75) contrast(0.90);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 72px 20px 112px 20px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* Typography elements */
h1 { font-size: 28px; margin: 0 0 10px 0; font-weight: 600; line-height: 1.22; color: var(--color-text-primary); }
h2 { font-size: 22px; margin: 0 0 16px 0; font-weight: 600; color: var(--color-text-primary); }
h3 { margin: 0; color: var(--color-text-primary); }
p { font-size: 16px; margin: 0 0 18px 0; color: var(--color-text-secondary); line-height: 1.5; }

/* Cards/Glassmorphism */
.glass-panel {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 14px;
}

/* Premium Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.top-header .logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  transform: translateY(-35px);
}
.logo { display: flex; align-items: center; }
.logo-img{
  height: 32px;          /* если нужно больше/меньше — меняешь это */
  width: auto;
  display: block;
  opacity: 0.92;         /* чтобы не “светился” */
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.35));
}

.top-header .icons {
  display: flex;
  gap: 16px;
  align-items: center;
  color: rgba(255,255,255,0.7);
}

.top-header .icons svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Buttons */
.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, background 0.2s;
  box-sizing: border-box;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.99); }

/* Variant B — premium wine gradient */
.btn-primary{
  background: linear-gradient(180deg,
    rgba(176,18,28,0.88) 0%,
    rgba(124,12,20,0.92) 100%
  );
  color: var(--color-text-primary);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow:
    0 12px 28px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 10px 26px rgba(176,18,28,0.14);
}

.btn-primary:hover{
  background: linear-gradient(180deg,
    rgba(188,22,34,0.90) 0%,
    rgba(132,14,22,0.94) 100%
  );
  box-shadow:
    0 14px 32px rgba(0,0,0,0.60),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 12px 30px rgba(176,18,28,0.18);
}
.btn-secondary{
  background: rgba(14,14,16,0.52);
  color: rgba(231,231,227,0.82);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.45),
    0 0 0 1px rgba(255,255,255,0.05) inset;
}
.btn-secondary:hover{
  background: rgba(14,14,16,0.62);
  border-color: rgba(255,255,255,0.22);
  box-shadow:
    0 12px 26px rgba(0,0,0,0.50),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 34px rgba(176,18,28,0.22),
    0 0 10px rgba(176,18,28,0.18);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.icon-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s, transform 0.2s;
}

.icon-btn:hover {
  color: white;
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Bottom Navigation */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 84px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-glass-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: 20px; /* Safe area bottom */
  box-sizing: border-box;
  z-index: 20;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  width: 25%;
  transition: color 0.3s;
}
.nav-item svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  fill: currentColor;
}
.nav-item.active {
  color: var(--color-accent);
}

/* Overlay / Modal */
.overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 20;
}
.overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: #111;
  width: 100%;
  padding: 32px 24px 40px 24px; /* safe bottom */
  border-radius: 32px 32px 0 0;
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-top: 1px solid var(--color-glass-border);
}
.overlay.active .modal {
  transform: translateY(0);
}
.modal-handle {
  width: 40px;
  height: 4px;
  background: #333;
  border-radius: 2px;
  margin: 0 auto 24px auto;
}
.form-group {
  margin-bottom: 16px;
}
.input-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-glass-border);
  padding: 16px;
  border-radius: 12px;
  color: white;
  font-family: inherit;
  font-size: 16px;
  box-sizing: border-box;
  transition: outline 0.2s, background 0.2s, border-color 0.2s;
}
.input-field:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255,255,255,0.08);
}

/* Special elements */
/* Mini navigation pills (Home screen) — premium "wine dawn" */
.mini-pill{
  position: relative;
  overflow: hidden;

  background: rgba(20,20,24,0.26);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 14px 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

/* The "dawn" glow layer */
.mini-pill::before{
  content:"";
  position:absolute;
  inset: -40%;
  pointer-events:none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;

  background:
    radial-gradient(closest-side, rgba(176,18,28,0.28), rgba(176,18,28,0.00) 70%),
    radial-gradient(closest-side, rgba(255,255,255,0.10), rgba(255,255,255,0.00) 60%),
    linear-gradient(180deg, rgba(176,18,28,0.00) 0%, rgba(176,18,28,0.16) 100%);
  filter: blur(18px);
}

/* optional: super thin inner sheen */
.mini-pill::after{
  content:"";
  position:absolute;
  inset: 0;
  pointer-events:none;
  border-radius: 18px;
  opacity: 0;
  transition: opacity 0.18s ease;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
}

.mini-pill:hover{
  border-color: rgba(255,255,255,0.16);
  background: rgba(24,24,28,0.36);
  box-shadow:
    0 12px 26px rgba(0,0,0,0.50),
    0 0 34px rgba(176,18,28,0.22);
  transform: translateY(-1px);
}

.mini-pill:hover::before{
  opacity: 1;
  transform: translateY(0);
}

.mini-pill:hover::after{
  opacity: 1;
}

.mini-pill:active{
  transform: translateY(0px);
  box-shadow:
    0 8px 18px rgba(0,0,0,0.40),
    0 0 22px rgba(176,18,28,0.16);
}

.mini-pill.clickable{
  cursor: pointer;
  user-select: none;
}

.mini-pill + .mini-pill{
  margin-top: 12px;
}

/* spacing between the 3 home pills */
.mini-pill + .mini-pill{
  margin-top: 12px;
}

.energia-circle {
  width: 120px;
  height: 120px;
  border-radius: 60px;
  border: 4px solid var(--color-accent);
  margin: 0 auto 24px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  font-weight: bold;
  box-shadow: 0 0 30px rgba(229, 9, 20, 0.5);
  background: rgba(229, 9, 20, 0.1);
}

.map-placeholder {
  width: 100%;
  height: 300px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><rect width="100%" height="100%" fill="%23222"/><text x="50%" y="50%" fill="%23666" font-family="sans-serif" font-size="20" text-anchor="middle" dominant-baseline="middle">Интерактивная карта ПИЛА</text></svg>');
  border-radius: var(--radius-card);
  margin-bottom: 24px;
  border: 1px solid var(--color-glass-border);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--color-glass-border);
}
.metric-value {
  font-size: 24px;
  font-weight: bold;
  color: white;
  margin-bottom: 4px;
}
.metric-label {
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* Tabs */
.tabs {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 4px;
}
.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Switch Toggle */
.switch-on {
  background: var(--color-accent) !important;
}
.switch-on .switch-knob {
  transform: translateX(20px);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(245,238,220,0.18), transparent 54%),
    radial-gradient(circle at 50% 50%, rgba(176,18,28,0.10), transparent 62%),
    rgba(8, 8, 10, 0.74);
  margin: 0 auto 16px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(245,238,220,0.34);
  box-shadow:
    0 0 0 2px rgba(245,238,220,0.12),
    0 0 0 7px rgba(245,238,220,0.075),
    0 0 24px 8px rgba(245,238,220,0.22),
    0 0 46px 14px rgba(245,238,220,0.12),
    0 0 22px rgba(176,18,28,0.10),
    0 18px 42px rgba(0,0,0,0.68),
    0 0 0 1px rgba(255,255,255,0.08) inset;
  overflow: hidden;
}

.profile-avatar::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  pointer-events: none;
  border: 1px solid rgba(245,238,220,0.22);
  box-shadow:
    0 0 18px rgba(245,238,220,0.14) inset,
    0 0 10px rgba(255,255,255,0.08) inset;
}
.profile-avatar svg {
  width: 40px;
  height: 40px;
  fill: rgba(210,210,204,0.72);
}

.profile-avatar-placeholder {
  width: 96%;
  height: 96%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-avatar-image {
  width: 100px;
  height: 100px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.avatar-picker-option {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
  border-radius: 16px;
  padding: 8px 6px 7px 6px;
  cursor: pointer;
  color: var(--color-text-secondary);
  font-family: inherit;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.avatar-picker-option:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.065);
}

.avatar-picker-option.active {
  border-color: rgba(176,18,28,0.62);
  background: rgba(176,18,28,0.12);
  box-shadow:
    0 0 0 1px rgba(176,18,28,0.20) inset,
    0 10px 22px rgba(0,0,0,0.36),
    0 0 22px rgba(176,18,28,0.18);
}

.avatar-picker-option img {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
  border-radius: 50%;
  margin: 0 auto 6px auto;
}

.avatar-picker-option span {
  display: block;
  font-size: 10px;
  line-height: 1.15;
  color: rgba(231,231,227,0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar-reset-btn {
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 14px;
}

.slogan-text {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(232, 232, 226, 0.62);
  line-height: 1.35;
  margin: 4px 0 0 0;
  text-align: center;
}

.link-row {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background 0.2s, transform 0.2s;
  border-radius: 12px;
  margin: 0;
  display: block;
}

.link-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.link-row:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.12);
}

/* === UI TUNING (single clean override) === */

/* 1) Background tuning: приглушаем туманность, но не убиваем небо */
.background-anim{
  z-index: 0;
  pointer-events: none;
  filter: brightness(0.86) saturate(0.82) contrast(0.96);
  transform: scale(1.02);
}

/* 2) Screens MUST be stacked (не трогать дальше!) */
.screen{
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* 3) Header: лого слева, иконки справа, без “раздувания” */
.top-header{
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  height: 56px;
  margin-bottom: 18px;
  padding-top: 2px;
}

.logo{ display:flex; align-items:flex-start; }

/* Лого — нормальный размер (не 150px) */
.logo-img{
  height: 100px;
  width: auto;
  display: block;
  position: relative;
  z-index: 1;
  opacity: 0.96;
  filter:
    drop-shadow(0 8px 18px rgba(0,0,0,0.36))
    drop-shadow(0 0 10px rgba(245,238,220,0.22))
    drop-shadow(0 0 22px rgba(245,238,220,0.12));
  max-width: 56vw;
  object-fit: contain;
}

/* 4) Подсветка под лого (вписать в ландшафт) */
.top-header .logo{
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: flex-start;
}

.top-header .logo::before{
  content:"";
  position:absolute;
  left: 52%;
  top: 54%;
  width: 150px;
  height: 92px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse at center,
      rgba(245,238,220,0.38) 0%,
      rgba(245,238,220,0.24) 24%,
      rgba(245,238,220,0.14) 46%,
      rgba(245,238,220,0.06) 64%,
      rgba(245,238,220,0.00) 82%);
  filter: blur(18px);
  opacity: 0.95;
}

.top-header .logo::after{
  display: none;
}
.top-header{
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  height: 56px;
  margin-bottom: 18px;
  padding-top: 2px;
  isolation: isolate;
}
.top-header .logo::before{
  content:"";
  position:absolute;
  left: 50px;
  top: 48px;
  width: 118px;
  height: 118px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle,
      rgba(245,238,220,0.00) 0%,
      rgba(245,238,220,0.14) 24%,
      rgba(245,238,220,0.20) 46%,
      rgba(245,238,220,0.10) 64%,
      rgba(245,238,220,0.00) 82%);
  filter: blur(14px);
  opacity: 0.82;
}
.top-header .logo::after{
  display: none;
}

/* 5) Glass panels: не “Малевич”, а дорогой тёмный стеклянный бордо-дым */
.glass-panel{
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(18,18,22,0.46) 0%,
    rgba(18,18,22,0.38) 58%,
    rgba(62,10,18,0.30) 100%
  );
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 18px 36px rgba(0,0,0,0.42),
    0 0 0 1px rgba(255,255,255,0.04) inset;
}

.glass-panel::before{
  content:"";
  position:absolute;
  inset: 0;
  pointer-events:none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.00) 26%),
    radial-gradient(circle at 50% 100%, rgba(176,18,28,0.18), rgba(176,18,28,0.00) 56%);
  opacity: 0.95;
}

/* 6) Кнопки: бордо менее “в глаза”, вторичную сделать заметнее */
.btn-primary{
  background: linear-gradient(180deg,
    rgba(150,14,24,0.84) 0%,
    rgba(96,10,16,0.90) 100%
  );
  box-shadow:
    0 12px 28px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 12px 30px rgba(176,18,28,0.12);
}

.btn-secondary{
  background: rgba(26,26,30,0.42);
  color: rgba(231,231,227,0.90);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.34),
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 0 20px rgba(176,18,28,0.10);
}

.btn-secondary:hover{
  background: rgba(30,30,34,0.52);
  border-color: rgba(255,255,255,0.22);
  box-shadow:
    0 12px 26px rgba(0,0,0,0.38),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 28px rgba(176,18,28,0.16);
}

/* 7) Иконки в хедере — чуть ярче */
.top-header .icons{
  color: rgba(255,255,255,0.78);
}
/* Links (fix "Документы" blue default) */
a, a:visited{
  color: rgba(176,18,28,0.90);          /* фирменный бордо */
  text-decoration: none;               /* убираем дефолтное подчёркивание */
}

a:hover{
  color: rgba(176,18,28,1);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

a:active{
  opacity: 0.85;
}
/* Optional: make the Documents link look premium */
a.docs-link, a.docs-link:visited{
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(14,14,16,0.35);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}
a.docs-link:hover{
  background: rgba(14,14,16,0.48);
  border-color: rgba(255,255,255,0.16);
  text-decoration: none;
}
/* "Документы" as premium link-row */
.docs-link{
  color: rgba(176,18,28,0.92) !important;
  text-decoration: none;
  border-radius: 14px;
  background: rgba(14,14,16,0.28);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}

.docs-link:hover{
  background: rgba(14,14,16,0.42);
  border-color: rgba(255,255,255,0.16);
}

.docs-link:active{
  opacity: 0.90;
}
.footer-link.docs-link{
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(14,14,16,0.35);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  color: rgba(176,18,28,0.92);
  text-decoration: none;
}
.footer-link.docs-link:hover{
  background: rgba(14,14,16,0.48);
  border-color: rgba(255,255,255,0.16);
}
/* Убираем синий tap-highlight и браузерную подсветку на мобильных */
a,
button,
.link-row,
.mini-pill,
.btn,
.btn-primary,
.btn-secondary,
.nav-item,
.icon-btn {
  -webkit-tap-highlight-color: transparent;
}

a:focus,
button:focus,
.link-row:focus,
.mini-pill:focus,
.btn:focus,
.btn-primary:focus,
.btn-secondary:focus,
.nav-item:focus,
.icon-btn:focus {
  outline: none;
}

a:focus-visible,
button:focus-visible,
.link-row:focus-visible,
.mini-pill:focus-visible,
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.nav-item:focus-visible,
.icon-btn:focus-visible {
  outline: none;
}

/* === Tariff access disclosure === */
.tariff-access-details{
  position: relative;
  z-index: 2;
  margin: 0 0 12px 0;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(14,14,16,0.42);
  box-shadow:
    0 12px 26px rgba(0,0,0,0.36),
    0 0 0 1px rgba(255,255,255,0.035) inset;
  overflow: hidden;
}

.tariff-access-details summary{
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 700;
}

.tariff-access-details summary::-webkit-details-marker{
  display: none;
}

.tariff-access-details summary::after{
  content: "⌄";
  color: rgba(255,255,255,0.62);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.tariff-access-details[open] summary::after{
  transform: rotate(180deg);
}

.tariff-access-content{
  padding: 0 16px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.tariff-access-content p{
  margin: 12px 0 8px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.tariff-access-content ul{
  margin: 6px 0 12px 0;
  padding-left: 18px;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.48;
}

.tariff-access-content li{
  margin: 5px 0;
}

.tariff-access-note{
  color: var(--color-text-muted) !important;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
  margin-bottom: 0 !important;
}

/* === PILA paid card v2 text blocks === */
.pila-map-title{
  margin: 0 0 14px 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  color: rgba(245,245,240,0.94);
  text-shadow: 0 10px 30px rgba(0,0,0,0.42);
}

.pila-map-section{
  display: block;
}

.pila-map-section-title{
  display: inline-block;
  margin-bottom: 5px;
  color: rgba(255,255,255,0.94);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.pila-map-section-text{
  color: rgba(215,215,208,0.86);
  font-size: 14px;
  line-height: 1.55;
}

.pila-map-section-accent{
  display: inline-block;
  color: rgba(255,255,255,0.92);
  font-weight: 800;
  padding: 12px 13px;
  margin-top: 2px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,0.13), transparent 38%),
    linear-gradient(135deg, rgba(176,18,28,0.18), rgba(255,255,255,0.045));
  border: 1px solid rgba(229,9,20,0.22);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.32),
    0 0 0 1px rgba(255,255,255,0.04) inset;
}

/* === PILA hotfix: fixed top icons + map title cleanup === */

.status-bar{
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  pointer-events: auto !important;
  padding: 14px 28px 10px 28px !important;
  box-sizing: border-box !important;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.38) 58%,
    rgba(0,0,0,0.00) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.screen{
  padding-top: 82px !important;
}

.pila-map-title{
  display: none !important;
}

/* Фраза ПИЛЫ остаётся выделенной плашкой, убираем только жирность текста */
.pila-map-section-accent{
  font-weight: 400 !important;
}
/* === PILA hotfix: restore premium access disclosure === */

.tariff-access-details{
  position: relative !important;
  z-index: 2 !important;
  margin: 0 0 14px 0 !important;
  border-radius: 18px !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.035)),
    rgba(16, 12, 16, 0.58) !important;
  backdrop-filter: blur(18px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(165%) !important;
  box-shadow:
    0 14px 30px rgba(0,0,0,0.46),
    0 0 28px rgba(176,18,28,0.12),
    0 0 0 1px rgba(255,255,255,0.055) inset !important;
  overflow: hidden !important;
}

.tariff-access-details::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.14), transparent 36%),
    radial-gradient(circle at 88% 20%, rgba(176,18,28,0.18), transparent 34%) !important;
  opacity: 0.9 !important;
}

.tariff-access-details summary{
  position: relative !important;
  z-index: 1 !important;
  list-style: none !important;
  cursor: pointer !important;
  user-select: none !important;
  padding: 15px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  color: rgba(245,245,240,0.94) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
}

.tariff-access-details summary::-webkit-details-marker{
  display: none !important;
}

.tariff-access-details summary::after{
  content: "" !important;
  flex: 0 0 auto !important;
  width: 0 !important;
  height: 0 !important;
  border-left: 6px solid transparent !important;
  border-right: 6px solid transparent !important;
  border-top: 8px solid rgba(255,255,255,0.82) !important;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.18)) !important;
  transform: rotate(0deg) !important;
  transition: transform 0.18s ease, border-top-color 0.18s ease !important;
}

.tariff-access-details[open] summary::after{
  transform: rotate(180deg) !important;
  border-top-color: rgba(255,255,255,0.96) !important;
}

.tariff-access-details[open]{
  border-color: rgba(229,9,20,0.28) !important;
  box-shadow:
    0 16px 34px rgba(0,0,0,0.52),
    0 0 34px rgba(176,18,28,0.18),
    0 0 0 1px rgba(255,255,255,0.06) inset !important;
}

.tariff-access-content{
  position: relative !important;
  z-index: 1 !important;
  padding: 0 16px 16px 16px !important;
  border-top: 1px solid rgba(255,255,255,0.10) !important;
}

.tariff-access-content p{
  margin: 12px 0 8px 0 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: rgba(215,215,208,0.86) !important;
}

.tariff-access-content ul{
  margin: 6px 0 12px 0 !important;
  padding-left: 18px !important;
  color: rgba(215,215,208,0.84) !important;
  font-size: 13px !important;
  line-height: 1.48 !important;
}

.tariff-access-content li{
  margin: 5px 0 !important;
}

.tariff-access-note{
  color: rgba(180,180,170,0.82) !important;
  border-top: 1px solid rgba(255,255,255,0.10) !important;
  padding-top: 12px !important;
  margin-bottom: 0 !important;
}


/* === PILA Today v1 === */
.today-card h3{
  margin: 0 0 10px 0;
  color: var(--color-text-primary);
}

.today-card p{
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

/* TODAY — readable line breaks */
.today-card p {
  white-space: pre-line;
}

/* TODAY — phrase text must not be bold */
#today-pila-phrase-text,
#today-pila-phrase-text.pila-map-section-accent {
  font-weight: 400 !important;
}

#today-pila-phrase-text * {
  font-weight: 400 !important;
}

/* Home: компактная тройка внутри блока Навигации */
.home-nav-mini-grid .mini-pill,
.home-nav-mini-grid .mini-pill + .mini-pill {
  margin-top: 0 !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 8px 6px !important;
  border-radius: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

.home-nav-mini-grid .mini-pill h3 {
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
}

.tariff-plan-heading {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: rgba(255,210,215,0.92) !important;
  margin: 18px 0 8px 0 !important;
  line-height: 1.35 !important;
}
/* === PILA: logo only on welcome home === */
/* Лого и его подсветка остаются только на приветственной Главной.
   На всех остальных экранах top-header убирается полностью,
   чтобы контент подтянулся выше. */

.screen:not(#screen-home) .top-header {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.screen:not(#screen-home) .top-header::before,
.screen:not(#screen-home) .top-header .logo::before {
  content: none !important;
  display: none !important;
}

#screen-home .top-header {
  display: flex !important;
}