/* Shared readable WEB logo sizing; the original r.png remains the compact mark. */
header:has(.logo-container) { padding-block: 8px; }
header .logo-container { flex-shrink: 0; }
header .logo-container img { width: 180px; height: auto; max-height: none; object-fit: contain; filter: none; }
.sidebar-logo { padding-left: 12px; padding-right: 12px; }
.sidebar-logo > img.r24-full-logo { width: 200px; max-width: 100%; height: auto !important; flex-shrink: 0; }
.sidebar-logo > img.r24-compact-logo { display: none; }
.sidebar.collapsed .sidebar-logo { padding-left: 10px; padding-right: 10px; }
.sidebar.collapsed .sidebar-logo > img.r24-full-logo { display: none; }
.sidebar.collapsed .sidebar-logo > img.r24-compact-logo { display: block; width: 40px; height: auto; }
.logo-group { flex-wrap: wrap; min-width: 0; }
.logo-group .logo-image { flex-shrink: 0; width: 200px; height: auto; max-height: none; }
img.mini-logo { width: 180px; max-width: 100%; height: auto; }
img.brand-logo { width: 220px; max-width: 46vw; height: auto; object-fit: contain; }
.footer img.brand-logo { width: 220px; height: auto; }
@media (max-width: 768px) {
  /* One row at 320–768px: controls keep their width, logo uses remaining space.
     Keep the full artwork visible inside the shorter header. */
  header:has(.logo-container) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center !important;
    gap: 10px !important;
    padding: 6px 8px !important;
    /* The mobile gradient is fully opaque: backdrop blur cannot be seen,
       but can add work while content scrolls underneath the sticky header. */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  header .logo-container {
    width: 100%; max-width: 112px; min-width: 0;
    aspect-ratio: 2.75; overflow: hidden;
    display: block; position: relative;
  }
  header .logo-container img {
    display: block; position: absolute;
    width: 100% !important; max-width: none !important;
    height: auto !important; max-height: none;
    left: 0; top: 50%; transform: translateY(-50%);
  }
  header .header-right {
    display: flex !important; width: auto !important; min-width: 0;
    gap: 9px !important; justify-content: flex-end !important;
  }
  header .lang-switch { gap: 5px !important; }
  header .lang-btn { font-size: 9px !important; gap: 2px !important; }
  header .lang-btn img { width: 16px !important; }
  header .auth-buttons { gap: 7px !important; }
  header .auth-buttons button {
    min-height: 36px; padding: 7px 8px !important;
    font-size: 9px !important; line-height: 1.1; white-space: nowrap;
  }
  .logo-group .logo-image { width: 180px; }
  .header-bar { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 359px) {
  header:has(.logo-container) { gap: 8px !important; }
  header .header-right { gap: 6px !important; }
  header .lang-switch { gap: 4px !important; }
  header .auth-buttons { gap: 5px !important; }
  header .auth-buttons button { padding-inline: 6px !important; }
}
