/* Навигация Reelhouse: нижняя панель, экраны, вкладки. Только переменные из style.css */
body { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.topbar h1 { font-size: 24px; }
.icon-btn {
  background: transparent; color: var(--gold); border: 1px solid var(--navy-border);
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn.active { background: var(--navy-card); border-color: var(--gold); }
.icon-btn svg, .tab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.view { display: none; }
.view.active { display: block; }

/* Нижняя панель */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; background: var(--navy); border-top: 1px solid var(--navy-border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab {
  flex: 1; max-width: 160px; margin: 0 auto; background: transparent; color: var(--text-muted);
  border-radius: 0; padding: 10px 0 9px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 400;
}
.tab.active { color: var(--gold); }
.tabbar-inner { display: flex; width: 100%; max-width: 480px; margin: 0 auto; }

/* Переключатель вкладок внутри экрана */
.seg { display: flex; gap: 6px; margin: 0 0 20px; }
.seg button {
  flex: 1; background: transparent; color: var(--text-muted);
  border: 1px solid var(--navy-border); padding: 9px 4px; font-size: 13px;
}
.seg button.active { background: var(--navy-card); color: var(--gold); border-color: var(--gold); }
.pane { display: none; }
.pane.active { display: block; }

/* Друзья */
.ref-row { display: flex; gap: 8px; margin-bottom: 10px; }
.ref-row input { flex: 1; min-width: 0; }
.ref-actions { display: flex; gap: 8px; margin-bottom: 22px; }
.ref-actions button { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 26px; }
.stat { background: var(--navy-card); border: 1px solid var(--navy-border); border-radius: 10px; padding: 12px; }
.stat b { display: block; font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 600; color: var(--gold); line-height: 1.1; }
.stat span { font-size: 11px; color: var(--text-muted); }
.note { color: var(--text-muted); font-size: 13px; line-height: 1.5; margin: 0 0 14px; }

/* Инфо: раскрывающиеся карточки */
details.acc { background: var(--navy-card); border: 1px solid var(--navy-border); border-radius: 10px; margin-bottom: 8px; }
details.acc summary { list-style: none; padding: 14px 12px; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: '+'; color: var(--gold); font-size: 18px; line-height: 1; }
details.acc[open] summary::after { content: '–'; }
details.acc .acc-body { padding: 0 12px 14px; color: var(--text-muted); font-size: 13px; line-height: 1.55; }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link .name { color: var(--gold); }

/* Одинаковые разделы Студии */
.pane .list .empty { display: none; }
.pane:has(.list > :not(.empty)) .empty-main { display: none; }

/* Иконки нижней панели */
.tab svg { width: 26px; height: 26px; stroke-width: 1.4; }
.tab { gap: 4px; padding: 10px 0 9px; }

/* Профиль */
.profile-card { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--gold); flex: none;
  display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center;
  font-family: 'Cormorant Garamond', serif; font-size: 26px; color: var(--gold); }
.profile-card .pname { font-size: 18px; color: var(--text); margin: 0 0 3px; font-family: inherit; }
.rows { margin-top: 6px; }
.row { display: flex; align-items: center; gap: 14px; padding: 15px 2px; border-bottom: 1px solid var(--navy-border);
  color: var(--text); text-decoration: none; font-size: 15px; }
.row:last-child { border-bottom: none; }
.row svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.row .chev { width: 18px; height: 18px; stroke: var(--text-muted); }
.row-title { flex: 1; }
.row-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.row-text .row-title { flex: none; }
.row-sub { font-size: 12px; color: var(--text-muted); }
.row-val { color: var(--text-muted); font-size: 14px; }
.row-select { width: auto; background: transparent; border: none; padding: 0; margin: 0; color: var(--text-muted); font-size: 14px; text-align: right; }
.switch { -webkit-appearance: none; appearance: none; width: 46px; height: 28px; padding: 0; margin: 0; border: none;
  border-radius: 14px; background: var(--navy-border); position: relative; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); transition: transform .2s; }
.switch:checked { background: var(--gold); }
.switch:checked::after { transform: translateX(18px); }
