/* Варшава Мама — визуальный язык Today (Luma-стиль): светлая база, полупрозрачные белые
   карточки радиуса 24, чернильные кнопки-пилюли. Фирменный градиент — только у логотипа
   и тонкой полосы. */
:root {
  --bg: #f8f8f8;
  --ink: #151515;
  --muted: rgba(21, 21, 21, 0.62);
  --line: rgba(21, 21, 21, 0.08);
  --card: rgba(255, 255, 255, 0.8);
  --card-border: #fff;
  --accent: #2457c6;
  --grad: linear-gradient(90deg, #8a3ffc, #e070b0 55%, #f6b04e);
  --r: 24px;
  --r-sm: 16px;
}
* { box-sizing: border-box; }
body.m {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg) radial-gradient(1200px 500px at 50% -200px, #eaf1fc, transparent) no-repeat;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
body.m-drawer-open { overflow: hidden; }

/* шапка */
.m-header { max-width: 760px; margin: 0 auto; padding: 18px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.m-logo img { width: 40px; height: 40px; }
.m-header-right { display: inline-flex; align-items: center; gap: 10px; }
.m-social { display: inline-flex; gap: 6px; vertical-align: middle; }
.m-social a { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink); background: var(--card); border: 1px solid var(--card-border); }
.m-social a:hover { box-shadow: 0 0 16px rgba(0, 0, 0, 0.08); }
.m-social svg { width: 18px; height: 18px; }
.m-footer .m-social { margin-left: 6px; }
.m-weather { color: var(--muted); font-size: 0.92rem; white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--card-border); }
.m-weather b { color: var(--ink); }

.m-main { max-width: 760px; margin: 0 auto; padding: 28px 16px 40px; }
.m-h1 { font-size: 2.1rem; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 8px; }
.m-lead { color: var(--muted); margin: 0 0 18px; line-height: 1.5; }

/* фильтры — горизонтальная прокрутка, без переноса */
.m-filters, .m-districts { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.m-filters::-webkit-scrollbar, .m-districts::-webkit-scrollbar { display: none; }
.m-districts { margin-bottom: 18px; align-items: center; }
.m-districts > span { color: var(--muted); font-size: 0.85rem; flex: none; }
.m-chip { display: inline-flex; align-items: center; flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--card-border); background: var(--card); color: var(--muted); font: inherit; font-size: 0.88rem; cursor: pointer; white-space: nowrap; }
.m-chip:hover { color: var(--ink); }
.m-chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.m-districts .m-chip { font-size: 0.8rem; padding: 5px 11px; }

/* лента */
.m-tl-group { margin-bottom: 28px; }
.m-tl-day { font-size: 1rem; font-weight: 600; margin: 0 0 12px; }
.m-tl-day span { color: var(--muted); font-weight: 400; }
.m-tl-items { display: flex; flex-direction: column; gap: 12px; }
.m-row { display: flex; gap: 16px; align-items: stretch; color: inherit; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r); padding: 14px 14px 14px 18px; transition: box-shadow 0.15s, transform 0.15s; }
.m-row:hover { box-shadow: 0 0 28px rgba(0, 0, 0, 0.09); transform: translateY(-1px); }
.m-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.m-row-time { font-size: 0.84rem; color: var(--muted); }
.m-row-title { font-size: 1.04rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.m-row-meta { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 0.8rem; color: var(--muted); min-width: 0; }
.m-row-source { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-dot { opacity: 0.5; }
.m-row-cc { white-space: nowrap; flex: none; }
.m-avatar { width: 17px; height: 17px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; color: #fff; font-size: 0.5rem; font-weight: 700; }
.m-avatar--lg { width: 34px; height: 34px; font-size: 0.75rem; }
.m-row-thumb { width: 92px; height: 92px; border-radius: var(--r-sm); flex: none; align-self: center; display: grid; place-items: center; text-align: center; padding: 8px; font-size: 0.7rem; font-weight: 700; line-height: 1.15; color: #fff; background: linear-gradient(135deg, #8a3ffc, #e070b0 60%, #f6b04e); hyphens: auto; overflow-wrap: normal; }
.m-empty { color: var(--muted); }

/* панель (как у Today) */
.m-overlay { position: fixed; inset: 0; background: rgba(20, 20, 30, 0.35); z-index: 60; }
.m-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); z-index: 61; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, 0.14); animation: mIn 0.22s ease-out; }
@keyframes mIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.m-drawer[hidden], .m-overlay[hidden] { display: none; }
.m-drawer-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--card); }
.m-spacer { flex: 1; }
.m-iconbtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; }
.m-iconbtn svg { width: 18px; height: 18px; }
.m-iconbtn:disabled { opacity: 0.35; cursor: default; }
.m-drawer-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 22px 26px 40px; }

/* статья: общая для панели и отдельной страницы */
.m-article { max-width: 620px; }
.m-back { display: inline-block; margin-bottom: 18px; color: var(--muted); }
.m-cover { width: min(100%, 360px); margin: 0 auto 18px; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14); }
.m-cover img { display: block; width: 100%; height: auto; }
.m-title { font-size: 1.7rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 12px; }
.m-source { display: inline-flex; align-items: center; gap: 10px; color: inherit; margin: 0 0 16px; }
.m-source small { display: block; color: var(--muted); font-size: 0.75rem; }
.m-source b { font-weight: 650; }
.m-fact { display: flex; gap: 14px; align-items: center; margin: 0 0 12px; line-height: 1.35; }
.m-fact span:last-child { color: var(--muted); }
.m-fact b { color: var(--ink); }
.m-datebox, .m-iconbox { width: 48px; height: 48px; flex: none; border: 1px solid var(--line); border-radius: 12px; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.m-datebox small { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: rgba(0, 0, 0, 0.04); width: 100%; text-align: center; padding: 2px 0; }
.m-datebox b { font-size: 1.15rem; line-height: 1.3; }
.m-iconbox svg { width: 22px; height: 22px; color: var(--muted); }
.m-about p { line-height: 1.6; margin: 0 0 12px; overflow-wrap: anywhere; font-size: 1.02rem; }
.m-about { margin-top: 18px; }
.m-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 20px; }
.m-btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 20px; border-radius: 999px; background: var(--ink); color: #fff; border: 1px solid var(--ink); font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.m-btn--light { background: var(--card); color: var(--ink); border-color: var(--line); }
.m-btn:disabled { opacity: 0.5; cursor: default; }

/* комментарии — коробка как «Регистрация» в Today */
.m-comments { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.m-comments-head { padding: 10px 16px; font-size: 0.85rem; font-weight: 600; color: var(--muted); background: rgba(0, 0, 0, 0.03); border-bottom: 1px solid var(--line); }
.m-comments-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.m-comment { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.m-comment b { font-weight: 650; font-size: 0.9rem; }
.m-comment time { color: var(--muted); font-size: 0.8rem; margin-left: 6px; }
.m-comment p { margin: 4px 0 0; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.m-comment-form { display: flex; flex-direction: column; gap: 8px; }
.m-comment-form input, .m-comment-form textarea { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); resize: vertical; }
.m-comment-form .m-btn { align-self: flex-start; }
.m-muted { color: var(--muted); font-size: 0.85rem; margin: 0; }
.m-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.m-footer { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
.m-footer p { margin: 0 0 4px; }
.m-admin-row { background: var(--card); border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; }

@media (max-width: 420px) { #drawerOpen { display: none; } }
@media (max-width: 720px) {
  .m-h1 { font-size: 1.6rem; }
  .m-row { padding: 12px; gap: 12px; }
  .m-row-cc { display: none; }
  .m-row-thumb { width: 74px; height: 74px; font-size: 0.62rem; padding: 6px; }
  .m-drawer-body { padding: 18px 16px 40px; }
  .m-drawer-bar { padding: 10px 12px; gap: 6px; }
  .m-drawer-bar .m-chip { padding: 7px 11px; font-size: 0.82rem; }
  .m-cover { width: min(100%, 300px); }
  .m-title { font-size: 1.45rem; }
  .m-logo span { font-size: 0.98rem; }
  .m-header .m-social { display: none; }
}
