/* каркас: боковое меню слева (компьютер), нижняя панель (телефон) */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--soft); border-inline-end: 1px solid var(--line); }
.side-scroll { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.side-foot { padding: 10px; border-top: 1px solid var(--line); display: grid; gap: 8px; }

.brand { display: flex; align-items: center; gap: 9px; padding: 16px 18px 8px; font-weight: 700; font-size: 17px; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .ico-tile { width: 28px; height: 28px; }

.main { min-width: 0; }
.page { max-width: 760px; margin-inline: auto; padding: 34px 32px 60px; }
.note { margin-top: 40px; color: var(--muted); font-size: 12.5px; max-width: 520px; }

/* переключатель языка */
.lang { display: flex; background: var(--hover); border-radius: 8px; padding: 2px; }
.lang button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; height: 28px; border-radius: 6px; font-size: 13px; color: var(--muted); }
.flag { width: 20px; height: 14px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 16, 20, .14); flex: none; }
.lang button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(15, 16, 20, .1); }

/* приветствие и последние проверки */
/* главная панель общей проверки: заметный блок с цветной подложкой */
.general-card { background: #e4f7f3; border: 1px solid #c4eee5; border-radius: 16px; padding: 22px 22px 18px; }
.general-card h1 { display: flex; align-items: center; gap: 10px; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
.general-card h1 .ico-tile { width: 36px; height: 36px; }
.general-card > p { color: #3f7a7c; margin-top: 6px; max-width: 580px; }
.general-card .form { margin-top: 16px; }
.general-card .form input[type="text"] { height: 48px; font-size: 16px; border-color: #b4e3d8; }
.general-card .form input[type="text"]:focus { border-color: #0b5d65; }
.general-card .btn { height: 48px; padding-inline: 22px; background: #0b5d65; }
.general-card .pick { font-size: 13.5px; color: #5f9094; margin-top: 12px; }
.home-list { margin-top: 14px; }
.recent { margin-top: 22px; }

/* нижняя панель */
.tabbar { display: none; }
.sheet[hidden] { display: none; }

@media (max-width: 899px) {
  .shell { display: block; }
  .side { display: none; }
  /* сверху запас под строку состояния телефона: иначе кнопка «назад» сливается с её размытым фоном */
  .page { padding: calc(env(safe-area-inset-top, 0px) + 36px) 16px calc(84px + env(safe-area-inset-bottom)); }
  .general-card { padding: 18px 16px 14px; }
  .general-card h1 { font-size: 22px; }
  .tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tab { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border: 0; background: transparent; border-radius: 12px; color: var(--muted); font-size: 11px; text-decoration: none; }
  .tab .ico { width: 22px; height: 22px; }
  .tab.on { color: var(--text); background: var(--hover); }
  .tab:hover { text-decoration: none; }
  .sheet { position: fixed; inset: 0; z-index: 30; }
  .sheet-bg { position: absolute; inset: 0; background: rgba(15, 16, 20, .25); }
  .sheet-card { position: absolute; inset-inline: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); background: var(--card); border-radius: 16px; padding: 6px; box-shadow: 0 10px 40px rgba(15, 16, 20, .2); }
  .sheet-card button { display: flex; align-items: center; gap: 14px; width: 100%; text-align: start; border: 0; background: transparent; padding: 14px 14px; border-radius: 10px; font-size: 17px; }
  .sheet-card .flag { width: 28px; height: 20px; border-radius: 4px; }
  .tab .flag { width: 26px; height: 18px; margin: 2px 0; }
  .sheet-card button.on { background: var(--hover); font-weight: 600; }
}

/* выпадающий список языка */
.dd { position: relative; }
.dd-btn { display: flex; align-items: center; gap: 8px; height: 34px; padding-inline: 10px; border: 1px solid var(--line); background: var(--card); border-radius: 9px; font-size: 14px; color: var(--text); }
.dd-btn:hover { background: var(--hover); }
.dd-chev { width: 14px; height: 14px; }
.dd-menu { position: absolute; inset-inline-start: 0; top: calc(100% + 6px); min-width: 170px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 30px rgba(15, 16, 20, .14); padding: 4px; z-index: 40; }
.dd-menu[hidden] { display: none; }
.dd-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; font-size: 14.5px; }
.dd-menu button:hover { background: var(--hover); }
.dd-menu button.on { background: var(--hover); font-weight: 600; }
