#listScreen{position:fixed;inset:0;display:flex;flex-direction:column;
  background:var(--panel);height:100dvh}
.list-head{
  padding: max(12px, calc(var(--sat, 0px) + 12px)) 16px 12px;
  padding-left: max(16px, calc(var(--sal, 0px) + 16px));
  padding-right: max(16px, calc(var(--sar, 0px) + 16px));
  background:var(--panel);
  border-bottom:1px solid var(--line);flex:none;
  position:relative;z-index:5;
}
.lh-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.lh-row h1{margin:0;font-size:26px;font-weight:800;letter-spacing:-.04em;
  background:linear-gradient(135deg,var(--text),var(--link));
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent}
.lh-right{display:flex;align-items:center;gap:4px}
.me-av{width:36px!important;height:36px!important;font-size:14px!important;
  border:0;padding:0;transition:transform .15s}
.me-av:hover{transform:scale(1.06)}

.search{display:flex;align-items:center;gap:8px;background:var(--panel-2);
  border-radius:14px;padding:10px 12px;color:var(--muted);
  border:1px solid transparent;transition:border .15s,box-shadow .15s}
.search:focus-within{border-color:rgba(59,158,255,.4);
  box-shadow:0 0 0 4px rgba(59,158,255,.12);color:var(--text)}
.search input{flex:1;background:none;border:none;outline:none;color:var(--text);
  font-size:16px}

#chatList{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;
  padding:6px 8px calc(var(--sab) + 10px)}

.row-item{display:flex;align-items:center;gap:12px;padding:10px;cursor:pointer;
  border-radius:16px;transition:background .15s,transform .08s;position:relative}
.row-item + .row-item{margin-top:1px}
.row-item:hover,.row-item:active{background:var(--hover)}
.row-item .av{width:52px;height:52px;font-size:20px}
.on-dot{position:absolute;right:0;bottom:0;width:12px;height:12px;border-radius:50%;
  background:var(--green);border:2px solid var(--panel);
  box-shadow:0 0 0 2px rgba(62,224,138,.18)}
.ri-mid{flex:1;min-width:0}
.ri-name{font-weight:650;font-size:16px;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
.ri-prev{color:var(--muted);font-size:13.5px;margin-top:3px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.ri-prev.typing{color:var(--link);font-weight:600}
.ri-prev.draft{color:#f0b429;font-weight:600}
.ri-right{text-align:right;flex:none;display:flex;flex-direction:column;
  align-items:flex-end;gap:6px}
.ri-time{color:var(--muted);font-size:11.5px;font-weight:500}
.badge{transition:transform .12s}
.row-item:active .badge{transform:scale(1.08)}

.empty-list{color:var(--muted);text-align:center;padding:20px;font-size:14px}

.ghead{padding:16px 12px 8px;color:var(--muted);font-size:12px;font-weight:700;
  letter-spacing:.04em;text-transform:uppercase}
.gsec .ghead{padding-top:8px}
.guser{display:flex;align-items:center;gap:12px;padding:10px;cursor:pointer;
  border-radius:14px}
.guser:hover,.guser:active{background:var(--hover)}
.gu-mid{flex:1;min-width:0}
.gu-name{font-weight:650}
.gu-un{color:var(--link);font-size:13px;margin-top:1px}
.gu-bio{color:var(--muted);font-size:13px;margin-top:2px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.gu-btn{border:none;background:var(--accent);color:#fff;border-radius:12px;
  padding:8px 13px;font-size:13px;font-weight:700;
  box-shadow:0 6px 14px rgba(59,158,255,.28)}
.gu-btn:active{transform:scale(.96)}
/* Enhanced empty states */
.empty-hero {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-hero .eh-icon {
  font-size: 52px;
  filter: drop-shadow(0 10px 28px rgba(60,120,255,.3));
  margin-bottom: 4px;
}
.empty-hero .eh-title {
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -.02em;
}
.empty-hero .eh-sub {
  font-size: 13.5px;
  line-height: 1.4;
  max-width: 240px;
}

/* ---- Clean list header ---- */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, #2b8cff, #6a4dff);
  box-shadow: 0 6px 18px rgba(40, 110, 255, .35);
  flex: none;
}
.brand-mark svg { display: block; }
.brand-text { min-width: 0; }
.brand-text h1,
.lh-row h1 {
  margin: 0 !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--text) !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}
.brand-status {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.brand-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(23, 227, 126, .55);
  flex: none;
}
.lh-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.lh-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.lh-right .head-action {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--muted);
}
.lh-right .head-action:hover {
  color: var(--text);
  background: var(--hover);
}
.lh-right .new-group-btn {
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
}
.lh-right .me-av {
  width: 36px !important;
  height: 36px !important;
  font-size: 14px !important;
  margin-left: 2px;
}

/* На широком экране rail уже даёт настройки — убираем дубль */
@media (min-width: 900px) {
  .mobile-only-settings { display: none !important; }
  /* бренд-марка рядом с Lumo лишняя: слева уже rail-brand */
  body.has-app .brand-mark { display: none; }
  body.has-app .brand-text h1,
  body.has-app .lh-row h1 { font-size: 24px !important; }
}
@media (max-width: 699px) {
  .lh-right .new-group-btn span { display: none; }
  .lh-right .new-group-btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
    justify-content: center;
  }
}

.folder-tabs {
  display: flex;
  gap: 6px;
  padding: 6px 12px 10px;
  overflow-x: auto;
  flex: none;
  -webkit-overflow-scrolling: touch;
}
.folder-tab {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.folder-tab.on {
  background: color-mix(in srgb, var(--accent) 22%, var(--panel-2));
  border-color: rgba(59,158,255,.4);
  color: var(--link);
}
#msgs[data-chat-wp="1"] {
  background-image: radial-gradient(ellipse at 20% 20%, rgba(59,158,255,.12), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(167,139,250,.1), transparent 45%) !important;
}
#msgs[data-chat-wp="2"] {
  background-image: linear-gradient(160deg, rgba(20,40,80,.5), rgba(10,20,40,.2)),
    radial-gradient(circle at 30% 40%, rgba(74,222,128,.08), transparent 40%) !important;
}
#msgs[data-chat-wp="3"] {
  background-image: radial-gradient(circle at 70% 20%, rgba(244,114,182,.1), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(251,191,36,.08), transparent 35%) !important;
}

#msgs[data-chat-wp="4"] {
  background-image:
    linear-gradient(180deg, rgba(12,20,40,.55), rgba(8,12,24,.35)),
    repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(59,158,255,.04) 24px, rgba(59,158,255,.04) 25px),
    repeating-linear-gradient(90deg, transparent, transparent 24px, rgba(167,139,250,.03) 24px, rgba(167,139,250,.03) 25px) !important;
}
#msgs[data-chat-wp="5"] {
  background:
    radial-gradient(circle at 10% 20%, rgba(34,211,238,.12), transparent 35%),
    radial-gradient(circle at 90% 80%, rgba(244,114,182,.1), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(59,158,255,.06), transparent 50%),
    var(--bg) !important;
}
#msgs[data-chat-wp="6"] {
  background-image:
    linear-gradient(135deg, rgba(15,25,45,.7), rgba(10,15,30,.4)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L35 20 L50 20 L38 30 L43 45 L30 35 L17 45 L22 30 L10 20 L25 20 Z' fill='none' stroke='%233b9eff' stroke-opacity='0.07'/%3E%3C/svg%3E") !important;
  background-size: auto, 60px 60px !important;
}

.row-item{
  content-visibility: auto;
  contain-intrinsic-size: auto 72px;
  contain: layout style paint;
}
#chatList{ content-visibility: auto; }
.ch-sub.online{ color: var(--green, #34c759); }

@media (max-width: 899px) {
  .mobile-only-settings {
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    pointer-events: auto !important;
    opacity: 1 !important;
  }
}
