/* STENA.ee — the new site. Golos Text, orange brand. Desktop: menu, feed and rail; phone: one column and
   a bottom bar. Colour schemes, chosen by the reader (data-theme and data-tone on <html>, cookie «theme»;
   the list is core.context_processors.THEMES): light ones — light, blue, mint, sepia, contrast; dark ones —
   brand (default), night, dim, black, nord; auto — light or brand by the device. */

/* Golos Text from our own server (static/fonts, SIL OFL: golos-text-OFL.txt): one variable file per alphabet, all the
   weights 400–800 in it; the browser loads only the alphabets a page has. Was Google Fonts: a stylesheet from another
   site before the first paint, and every reader's address sent to Google. */
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/golos-text-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/golos-text-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/golos-text-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/golos-text-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root, [data-theme="brand"] {
  --bg: #121212; --bar: rgba(18, 18, 18, .92); --card: #1e1e1e; --chip: #2a2a2a; --line: #333336;
  --text: #e6e6e6; --muted: #a0a0a6; --strong: #ffffff; --link: #ff8f3a; --soft: #2b1d10;
  --brand: #ff7500; --brand-ink: #111111; --live: #34d399; --red: #ef4444;
  --radius: 18px; --wrap: 1360px;
  color-scheme: dark;
}
[data-theme="night"] {
  --bg: #111827; --bar: rgba(17, 24, 39, .92); --card: #1f2937; --chip: #273449; --line: #374151;
  --text: #e5e7eb; --muted: #9ca3af; --strong: #f9fafb; --link: #ff8f3a; --soft: #2a1a0c;
  color-scheme: dark;
}
[data-theme="dim"] {
  --bg: #15202b; --bar: rgba(21, 32, 43, .92); --card: #1c2a38; --chip: #253341; --line: #38444d;
  --text: #e7ecf0; --muted: #8b98a5; --strong: #f7f9f9; --link: #4cb3f7; --soft: #12324a;
  --brand: #1d9bf0; --brand-ink: #ffffff; --red: #f4212e;
  color-scheme: dark;
}
[data-theme="black"] {
  --bg: #000000; --bar: rgba(0, 0, 0, .9); --card: #101012; --chip: #1c1c1f; --line: #2a2a2e;
  --text: #e7e9ea; --muted: #8b8f94; --strong: #ffffff; --link: #ff8f3a; --soft: #2b1a0a;
  color-scheme: dark;
}
[data-theme="nord"] {
  --bg: #2e3440; --bar: rgba(46, 52, 64, .92); --card: #3b4252; --chip: #434c5e; --line: #4c566a;
  --text: #e5e9f0; --muted: #aeb7c6; --strong: #eceff4; --link: #88c0d0; --soft: #36485a;
  --brand: #88c0d0; --brand-ink: #2e3440; --live: #a3be8c; --red: #bf616a;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f2f3f5; --bar: rgba(255, 255, 255, .94); --card: #ffffff; --chip: #e9ebee; --line: #e1e4e8;
  --text: #1f2328; --muted: #59636e; --strong: #0d1117; --link: #c2410c; --soft: #ffedd5;
  --live: #16a34a; --red: #dc2626;
  color-scheme: light;
}
[data-theme="blue"] {
  --bg: #edeef0; --bar: rgba(255, 255, 255, .95); --card: #ffffff; --chip: #e5ebf1; --line: #dce1e6;
  --text: #222222; --muted: #6d7885; --strong: #000000; --link: #2a5885; --soft: #e1ebf7;
  --brand: #0077ff; --brand-ink: #ffffff; --live: #16a34a; --red: #e64646;
  color-scheme: light;
}
[data-theme="mint"] {
  --bg: #eef2ec; --bar: rgba(255, 255, 255, .95); --card: #ffffff; --chip: #e3eade; --line: #d9e2d3;
  --text: #1f2a1c; --muted: #5f6d59; --strong: #111a0f; --link: #3f7f1f; --soft: #e3f1d8;
  --brand: #5aa02c; --brand-ink: #ffffff; --live: #2f855a; --red: #dc2626;
  color-scheme: light;
}
[data-theme="sepia"] {
  --bg: #f4ecd8; --bar: rgba(251, 246, 234, .95); --card: #fbf6ea; --chip: #efe4cc; --line: #e3d5b8;
  --text: #3b2f20; --muted: #7a6a52; --strong: #2a2015; --link: #a14a12; --soft: #f1dfc2;
  --brand: #c0631d; --brand-ink: #ffffff; --live: #4d7c0f; --red: #b91c1c;
  color-scheme: light;
}
[data-theme="contrast"] {
  --bg: #ffffff; --bar: rgba(255, 255, 255, .97); --card: #ffffff; --chip: #f0f0f0; --line: #1a1a1a;
  --text: #000000; --muted: #333333; --strong: #000000; --link: #0645ad; --soft: #fff3bf;
  --brand: #c2410c; --brand-ink: #ffffff; --live: #166534; --red: #b91c1c;
  color-scheme: light;
}
[data-theme="contrast"] body { font-size: 17px; }
[data-theme="contrast"] .post-text, [data-theme="contrast"] .article .text { font-size: 19px; }
[data-theme="contrast"] .muted, [data-theme="contrast"] .meta { color: #333333; }
@media (prefers-color-scheme: light) {
  [data-theme="auto"] {
    --bg: #f2f3f5; --bar: rgba(255, 255, 255, .94); --card: #ffffff; --chip: #e9ebee; --line: #e1e4e8;
    --text: #1f2328; --muted: #59636e; --strong: #0d1117; --link: #c2410c; --soft: #ffedd5;
    --live: #16a34a; --red: #dc2626;
    color-scheme: light;
  }
}

/* Theme picker: previews of the schemes in two groups, «как в системе» below */
.theme-pick { position: relative; }
.theme-menu { position: absolute; right: 0; top: 50px; z-index: 30; width: 568px; padding: 16px; display: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.theme-pick.open .theme-menu { display: block; }
.theme-menu h4 { margin: 0 0 2px; font-size: 17px; color: var(--strong); }
.theme-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--chip);
  color: var(--text); display: grid; place-items: center; cursor: pointer; }
.theme-close:hover { color: var(--strong); background: var(--line); }
.theme-menu h5 { margin: 14px 0 8px; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.theme-menu .theme-sub { margin: 0; font-size: 13px; color: var(--muted); }
.theme-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.theme-opt { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.theme-opt .tname { font-size: 13px; font-weight: 700; color: var(--strong); line-height: 1.2; }
.theme-opt .thint { font-size: 11px; color: var(--muted); line-height: 1.25; }
.tprev { display: block; height: 68px; border-radius: 12px; padding: 7px; background: var(--p-bg); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); transition: transform .12s; }
.theme-opt:hover .tprev { transform: translateY(-2px); }
.tprev i { display: block; }
.tp-top { display: flex; align-items: center; gap: 4px; height: 9px; margin-bottom: 6px; }
.tp-logo { width: 22px; height: 5px; border-radius: 3px; background: var(--p-tx); opacity: .9; }
.tp-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--p-ac); }
.tp-card { padding: 6px; border-radius: 7px; background: var(--p-card); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.tp-line { height: 4px; border-radius: 2px; background: var(--p-tx); margin-bottom: 4px; }
.tp-line.l1 { width: 86%; }
.tp-line.l2 { width: 58%; opacity: .45; }
.tp-pill { width: 24px; height: 6px; border-radius: 3px; background: var(--p-ac); }
.theme-opt[aria-checked="true"] .tprev { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--brand); }
.theme-opt[aria-checked="true"]::after { content: ""; position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.theme-auto { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 14px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.theme-auto:hover { background: var(--chip); }
.theme-auto[aria-checked="true"] { border-color: var(--brand); background: var(--soft); }
.theme-auto .tprev { width: 56px; height: 36px; flex: 0 0 auto; padding: 0;
  background: linear-gradient(135deg, #f2f3f5 0 50%, #121212 50%); }
.theme-auto b { display: block; color: var(--strong); }
.theme-auto small { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .theme-menu { position: fixed; left: 8px; right: 8px; top: 62px; width: auto; max-height: calc(100vh - 150px); overflow-y: auto; }
  .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 "Golos Text", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--strong); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
.dot.live { background: var(--live); }
.dot.red { background: var(--red); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } .lift { transition: none; } }
.scroller { overflow-x: auto; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.lift { transition: transform .15s ease; }
.lift:hover { transform: translateY(-2px); text-decoration: none; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .4px; padding: 3px 8px; border-radius: 7px;
  background: var(--chip); color: var(--muted); }
.badge.brand { background: var(--brand); color: var(--brand-ink); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 0;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn.brand { background: var(--brand); color: var(--brand-ink); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.icon-btn { width: 44px; height: 40px; border-radius: 12px; border: 0; background: var(--chip); color: var(--text);
  display: grid; place-items: center; cursor: pointer; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: var(--bar); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px); }
.top .wrap { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-weight: 800; font-size: 26px; letter-spacing: -.5px; color: var(--strong); white-space: nowrap; }
.logo span { color: #ff7500; }  /* the logo keeps its orange in every scheme */
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 20px; font-weight: 500; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a[aria-current="page"] { color: var(--strong); }
.top .tools { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--chip); border-radius: 12px; padding: 0 12px;
  height: 40px; flex: 0 1 260px; color: var(--muted); }
.search input { background: transparent; border: 0; outline: none; color: var(--text); font: inherit; font-size: 14px; width: 100%; }

main.wrap { padding-top: 24px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 28px; }
.section-h { margin: 0; font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }

/* Feed + rail */
.columns { display: flex; gap: 28px; align-items: flex-start; }
.feed { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.rail { flex: 0 0 360px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tabs { display: flex; gap: 6px; background: var(--chip); padding: 4px; border-radius: 14px; align-self: flex-start; }
.tabs a { height: 38px; padding: 0 16px; border-radius: 10px; display: flex; align-items: center; font-weight: 700; font-size: 15px; color: var(--muted); }
.tabs a[aria-current="page"] { background: var(--card); color: var(--strong); }
.tabs a:hover { text-decoration: none; color: var(--strong); }
.card { padding: 14px; display: flex; gap: 16px; }
.card .pic { width: 220px; height: 148px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; background: var(--chip); }
svg.i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
picture.pic, picture.rel-pic { display: block; overflow: hidden; }
picture.pic img, picture.rel-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.card h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }
.meta { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.meta .tags { color: var(--link); font-weight: 600; }
.card .meta { margin-top: auto; }
/* A partner's card: the banner whole, as it is (not cut to the news pictures' frame) */
.ad-card .pic { width: 126px; height: auto; align-self: flex-start; }
.ad-card .pic img { height: auto; }
.cnt { display: inline-flex; align-items: center; gap: 5px; }
.more-btn { align-self: center; }

.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.market-item { overflow: hidden; display: flex; flex-direction: column; }
.market-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--chip); }
.market-item div { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.market-item b { font-size: 17px; color: var(--strong); }
.market-item span { font-size: 14px; line-height: 1.35; }

.rail h3 { margin: 0 0 12px; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.rail section { padding: 16px; }
.live-item { display: flex; gap: 10px; }
.live-item + .live-item { margin-top: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 800;
  font-size: 14px; color: #111827; }
.live-item .who { font-size: 13px; color: var(--muted); }
.live-item .who b { color: var(--strong); }
.live-item .what { font-size: 14px; line-height: 1.45; }
.live-item .what p { margin: 0; }
.live-item .what img.smiley { vertical-align: middle; }
.live-item .to { font-size: 12px; color: var(--link); font-weight: 600; }
.hot { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; counter-reset: hot; }
.hot li { display: flex; gap: 12px; align-items: baseline; counter-increment: hot; }
.hot li::before { content: counter(hot); font-size: 20px; font-weight: 800; color: var(--brand); width: 18px; flex: 0 0 auto; }
.hot a { font-size: 15px; line-height: 1.35; font-weight: 600; flex: 1; }
.partners { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.partners .head { align-self: stretch; display: flex; justify-content: space-between; font-size: 12px; font-weight: 800;
  letter-spacing: .4px; color: var(--muted); }
/* One frame for every banner (most are 220×260, some taller), so the box keeps its height when they turn */
.partners .slide { display: none; width: 200px; height: 236px; line-height: 0; }
.partners .slide.on { display: grid; place-items: center; }
.partners .slide img { max-width: 200px; max-height: 236px; width: auto; height: auto; object-fit: contain; border-radius: 10px; }
.partners .dots { display: flex; gap: 2px; }
.partners .dots button { width: 22px; height: 22px; border: 0; padding: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.partners .dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--line); display: block; transition: width .2s; }
.partners .dots button[aria-current="true"] span { width: 20px; background: var(--brand); }
.tg { background: #1c2f45; color: #e6f2fb; border-radius: var(--radius); }
.tg h3 { color: #fff; }
.tg p { margin: 0 0 10px; font-size: 14px; color: #c7dcef; }
.tg .btn { background: #2aabee; color: #0b1a29; }

/* Article and lists */
.article { padding: 24px 28px; }
.article h1 { margin: 0 0 8px; font-size: 34px; line-height: 1.2; }
.article .text { font-size: 18px; line-height: 1.7; }
.article .text img { border-radius: 12px; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }
img.smiley { vertical-align: middle; }
.comments { padding: 20px 24px; }
.comment { border-left: 2px solid var(--line); padding: 6px 0 6px 12px; margin-top: 8px; }
.comment p { margin: 4px 0; }

footer.bottom { border-top: 1px solid var(--line); }
footer.bottom .wrap { padding-top: 24px; padding-bottom: 24px; display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }

/* Phone bottom bar (hidden on wide screens) */
.tabbar { display: none; }

@media (max-width: 1080px) {
  .columns { flex-direction: column; }
  .rail { position: static; flex: 1 1 auto; width: 100%; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  .top .wrap { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .nav, .search, .top .write, .top .login { display: none; }
  .logo { font-size: 22px; }
  main.wrap { padding-top: 14px; padding-bottom: 110px; gap: 20px; }
  .section-h { font-size: 18px; }
  .tabs { align-self: stretch; }
  .tabs a { flex: 1; justify-content: center; padding: 0 8px; font-size: 14px; height: 40px; }
  .card { flex-direction: row-reverse; padding: 12px; gap: 12px; }
  .card .pic { width: 84px; height: 64px; border-radius: 10px; }
  .card h2 { font-size: 16px; }
  .card p, .card .meta .tags { display: none; }
  .article { padding: 16px; }
  .article h1 { font-size: 24px; }
  .article .text { font-size: 17px; }
  .tabbar { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 66px;
    padding-bottom: env(safe-area-inset-bottom); background: var(--bar); border-top: 1px solid var(--line);
    grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; backdrop-filter: blur(8px); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
  .tabbar a[aria-current="page"] { color: var(--brand); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .plus { justify-self: center; width: 50px; height: 50px; border-radius: 17px; background: var(--brand); color: var(--brand-ink);
    display: grid; place-items: center; margin-top: -8px; }
}

/* Article page */
.article .article-meta { margin-bottom: 18px; }
.article .author { color: var(--strong); font-weight: 700; }
.article .text p { margin: 0 0 1em; }
.article .text .pic, .article .text div[align="center"] { text-align: center; margin: 0 0 .6em; }
/* The caption close under its picture: no gap of the <br> and of the line under an inline picture */
.article .text .pic img { vertical-align: bottom; }
.article .text .pic > br { display: none; }
.article .text em.cap, .article .text .pic em { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); margin-top: 3px; }
.article .text a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.article .text blockquote { margin: 0 0 1em; padding: 4px 0 4px 16px; border-left: 3px solid var(--brand); color: var(--strong); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.chip { font-size: 14px; font-weight: 600; color: var(--link); background: var(--soft); padding: 4px 10px; border-radius: 10px; }
/* An article's tags: small and quiet, not to draw the eye from the text */
.art-tags { gap: 6px; }
.art-tags .chip { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--chip); padding: 2px 8px; border-radius: 8px; }
.art-tags a.chip:hover { color: var(--link); text-decoration: none; }
.share { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.section-h.small { font-size: 19px; }
.tabs.small a { height: 34px; font-size: 14px; padding: 0 12px; }

/* Comments: Pikabu-like threads with coloured lines that fold a branch */
.comments-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.comments-head h2 { margin: 0; font-size: 22px; }
.beta-note { margin: 0 0 12px; font-size: 14px; color: var(--muted); background: var(--chip); padding: 8px 12px; border-radius: 10px; }
.beta-note a { color: var(--link); }
.thread { padding: 4px 0; border-top: 1px solid var(--line); }
.thread:first-of-type { border-top: 0; }
.c { padding: 10px 0 6px; scroll-margin-top: 90px; border-radius: 10px; }
.c-head { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.c-author { font-weight: 700; color: var(--strong); font-size: 14px; }
.c-re, .c-time { color: var(--muted); }
.c-edited { color: var(--muted); font-size: 12px; font-style: italic; }
.c-own { display: inline-flex; gap: 4px; margin-left: auto; }
.c-own button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 4px 6px; border-radius: 8px; }
.c-own button:hover { color: var(--link); background: var(--chip); }
.c-editor { margin: 6px 0 0 36px; display: flex; flex-direction: column; gap: 8px; }
.c-editor textarea { width: 100%; font: inherit; font-size: 16px; resize: vertical; }
.c-editor-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.c-staff { font-size: 11px; font-weight: 700; color: var(--link); border: 1px solid currentColor; padding: 0 5px;
  border-radius: 6px; line-height: 16px; }
.who .c-staff { margin-left: 4px; font-size: 10px; }
.c-time:hover { color: var(--link); }
.c-text { margin: 4px 0 0 36px; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
/* The text in the colour of the commenter's circle (news_tags.comment_tint): the circle's light colour on the dark
   schemes, the same hue made dark on the light ones */
.tinted > .c-text, .tinted .what { color: var(--tint-ink); }
[data-tone="dark"] .tinted > .c-text, [data-tone="dark"] .tinted .what { color: var(--tint); }
@media (prefers-color-scheme: dark) {
  [data-tone="auto"] .tinted > .c-text, [data-tone="auto"] .tinted .what { color: var(--tint); }
}
.c-text p { margin: 0 0 .5em; }
.c-text p:last-child { margin-bottom: 0; }
.more-branch { display: inline-block; margin: 2px 0 8px 36px; padding: 6px 12px; border-radius: 10px; background: var(--chip);
  color: var(--link); font-size: 14px; font-weight: 600; }
.more-branch:hover { text-decoration: none; background: var(--soft); }
.branch-head { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.branch-head a { color: var(--link); font-weight: 600; }
@media (max-width: 760px) { .more-branch { margin-left: 0; } }
.c-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 .5em; }
.c-imgs a { display: block; line-height: 0; cursor: zoom-in; }
.c-imgs img { display: block; max-width: min(100%, 220px); max-height: 150px; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 760px) { .c-imgs img { max-width: min(100%, 180px); max-height: 130px; } }
/* A comment's picture at full size over the page (site.js, picView) */
.pic-view { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, .92);
  overscroll-behavior: contain; }
.pic-view::backdrop { background: transparent; }
.pic-view:focus { outline: none; }
.pic-view img { position: absolute; inset: 0; margin: auto; max-width: calc(100vw - 24px); max-height: calc(100dvh - 90px);
  border-radius: 6px; user-select: none; touch-action: pan-y pinch-zoom; }
.pic-view button { position: fixed; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.pic-view button:hover { background: rgba(255, 255, 255, .26); }
.pic-view.tall { overflow-y: auto; }
.pic-view.tall img { position: static; display: block; margin: 64px auto 48px; max-height: none; max-width: min(calc(100vw - 24px), 900px); }
.pic-view [data-pv="x"] { top: calc(10px + env(safe-area-inset-top)); right: 10px; }
.pic-view [data-pv="prev"] { left: 10px; top: 50%; transform: translateY(-50%); }
.pic-view [data-pv="next"] { right: 10px; top: 50%; transform: translateY(-50%); }
.pic-view .pv-count { position: fixed; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); text-align: center;
  color: rgba(255, 255, 255, .8); font-size: 14px; }
.live-item .c-imgs { display: none; }
.c-text.pics-low .c-imgs { display: none; }
.cform-pics { display: flex; flex-wrap: wrap; gap: 8px; }
.cform-pics[hidden] { display: none; }
.cform-pic { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px;
  border-radius: 10px; overflow: hidden; background: var(--chip); font-size: 11px; color: var(--muted); }
.cform-pic img { width: 100%; height: 100%; object-fit: cover; }
.cform-pic button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; line-height: 22px; padding: 0; cursor: pointer; }
.cform.drop { outline: 2px dashed var(--brand); outline-offset: 2px; }
.cform-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cform-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.cform-attach { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 12px; border-radius: 12px;
  background: var(--chip); color: var(--text); font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s; }
.cform-attach svg { color: var(--brand); flex: none; }
.cform-attach:hover { background: color-mix(in srgb, var(--brand) 16%, var(--chip)); }
.cform-attach:active { transform: scale(.97); }
@media (max-width: 380px) { .cform-attach { padding: 0 11px; } .cform-attach span { display: none; } }
.sheet.crop-dlg { width: min(720px, 100vw); overscroll-behavior: contain; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
.crop-dlg[data-step="cut"] .crop-title-look, .crop-dlg[data-step="cut"] .crop-result, .crop-dlg[data-step="cut"] .crop-bar-look,
.crop-dlg[data-step="look"] .crop-title-cut, .crop-dlg[data-step="look"] .crop-stage, .crop-dlg[data-step="look"] .crop-bar-cut { display: none; }
.crop-result { display: block; max-width: 100%; max-height: 62dvh; border-radius: 10px; }
.crop-dlg .sheet-head button { font-size: 20px; padding: 4px 8px; }
.crop-body { display: flex; justify-content: center; padding: 22px; background: #000; touch-action: none; user-select: none; }
.crop-stage { position: relative; overflow: hidden; line-height: 0; }
.crop-stage canvas { display: block; max-width: 100%; max-height: 60dvh; }
.crop-frame { position: absolute; box-sizing: border-box; border: 2px solid #fff; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); }
/* the marks only show where to grab; the grabbing itself is by distance (site.js, cropPic) */
.crop-frame i { position: absolute; border: 0 solid var(--brand); }
.crop-frame [data-c="nw"], .crop-frame [data-c="ne"], .crop-frame [data-c="sw"], .crop-frame [data-c="se"] { width: 22px; height: 22px; }
.crop-frame [data-c="nw"] { left: -2px; top: -2px; border-width: 5px 0 0 5px; }
.crop-frame [data-c="ne"] { right: -2px; top: -2px; border-width: 5px 5px 0 0; }
.crop-frame [data-c="sw"] { left: -2px; bottom: -2px; border-width: 0 0 5px 5px; }
.crop-frame [data-c="se"] { right: -2px; bottom: -2px; border-width: 0 5px 5px 0; }
.crop-frame [data-c="n"], .crop-frame [data-c="s"] { left: calc(50% - 14px); width: 28px; height: 0; border-top-width: 5px; }
.crop-frame [data-c="n"] { top: -2px; }
.crop-frame [data-c="s"] { bottom: -2px; }
.crop-frame [data-c="w"], .crop-frame [data-c="e"] { top: calc(50% - 14px); height: 28px; width: 0; border-left-width: 5px; }
.crop-frame [data-c="w"] { left: -2px; }
.crop-frame [data-c="e"] { right: -2px; }
.sheet.crop-dlg:focus { outline: none; }
.crop-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
.crop-bar .btn { padding: 0 12px; }
.crop-bar span { flex: 1 1 auto; }
.c-text blockquote { margin: 0 0 .5em; padding: 2px 0 2px 10px; border-left: 3px solid var(--brand); color: var(--muted); }
.quote-btn { position: absolute; z-index: 60; padding: 8px 14px; border: 0; border-radius: 10px; background: var(--strong);
  color: var(--card); font: 600 14px/1 "Golos Text", system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer; }
.c.new > .c-head::after { content: "новый"; font-size: 11px; font-weight: 800; color: var(--brand-ink); background: var(--brand);
  padding: 1px 6px; border-radius: 6px; }
.c:target { background: var(--soft); box-shadow: 0 0 0 6px var(--soft); }
.replies { position: relative; margin-left: 13px; padding-left: 20px; --lvl: #fdba74; }
.replies.lvl2 { --lvl: #93c5fd; } .replies.lvl3 { --lvl: #86efac; } .replies.lvl4 { --lvl: #c4b5fd; }
.replies.lvl5 { --lvl: #f9a8d4; } .replies.lvl6 { --lvl: #fcd34d; }
.replies > .line { position: absolute; left: -6px; top: 0; bottom: 8px; width: 24px; padding: 0; border: 0; background: transparent;
  cursor: pointer; }
.replies > .line::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; border-radius: 2px;
  background: var(--lvl); opacity: .55; transition: width .15s, left .15s, opacity .15s; }
.replies > .line:hover::before, .replies > .line:focus-visible::before { width: 4px; left: 9px; opacity: 1; }
.replies > .folded-note { display: none; }
.replies.folded > :not(.line):not(.folded-note) { display: none; }
.replies.folded > .folded-note { display: inline-flex; margin: 6px 0; border: 0; background: var(--chip); color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.replies.folded > .line { bottom: 0; }
.branch.late { display: none; }
.replies.open-late .branch.late { display: block; }
.replies.open-late > .more-replies { display: none; }
.more-replies { margin: 4px 0 6px; border: 0; background: transparent; color: var(--link); font: inherit; font-size: 14px;
  font-weight: 700; padding: 6px 0; cursor: pointer; }

/* «Читайте также»: small cards under the comments */
.related { display: flex; flex-direction: column; gap: 8px; }
.rel { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.rel span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rel b { font-size: 15px; line-height: 1.3; color: var(--strong); }
.rel small { font-size: 12px; }
.rel-pic { width: 76px; height: 56px; border-radius: 8px; flex: 0 0 auto; }

@media (max-width: 760px) {
  .comments { padding: 14px 12px; }
  .c-text { margin-left: 0; font-size: 15px; }
  .replies { margin-left: 6px; padding-left: 14px; }
  .replies > .line { left: -10px; }
  .share .btn { flex: 1; justify-content: center; }
}
.tabs a { white-space: nowrap; }
@media (max-width: 760px) {
  /* On a phone the indent stops growing after the 3rd level; the coloured lines still show the depth. */
  .replies .replies .replies .replies { margin-left: 2px; padding-left: 10px; }
  .replies .replies .replies .replies > .line { left: -12px; }
}

/* Search */
.search-big { display: flex; gap: 10px; padding: 10px; }
.search-big input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 17px; }
.search-big .btn { height: 44px; }
.snippet mark { background: var(--soft); color: var(--strong); padding: 0 2px; border-radius: 3px; }
.phone-only { display: none; }
@media (max-width: 760px) { .phone-only { display: grid; } }

/* Sign-in */
.login-box { max-width: 560px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.login-box h1 { margin: 0; font-size: 26px; }
.login-box p { margin: 0; }
.login-box .small { font-size: 13px; }
.login-box .error { color: var(--red); font-weight: 600; }
/* /welcome after the first sign-in: the two languages as big choices */
.welcome h2 { margin: 10px 0 0; font-size: 18px; }
.welcome h2 .muted { font-weight: 500; }
.wl-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wl-lang { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1.5px solid var(--line); border-radius: 14px;
  color: var(--strong); }
.wl-lang:hover { border-color: var(--brand); text-decoration: none; }
.wl-lang b { font-size: 18px; }
.wl-lang small { color: var(--muted); }
@media (max-width: 480px) { .wl-langs { grid-template-columns: 1fr; } }
.tg-widget { min-height: 48px; margin: 6px 0; }
.tg-widget iframe { border-radius: 12px; }
.tg-bot-btn { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; height: 44px; padding: 0 20px 0 16px;
  border-radius: 22px; background: #2aabee; color: #fff; font: 600 16px/1 "Golos Text", system-ui, sans-serif; }
.tg-bot-btn:hover { text-decoration: none; background: #229ed9; }
.tg-other summary { cursor: pointer; }
.tg-bot { display: flex; flex-direction: column; gap: 12px; }
.tg-other .tg-bot, .tg-other .tg-widget { margin-top: 10px; }
.bot-wait { padding: 10px 14px; border-radius: 12px; background: var(--chip); font-size: 15px; }
.bot-code { font-size: 22px; letter-spacing: .05em; }
/* «Войти через Google»: the look Google asks for (white, its «G», dark text) */
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; align-self: flex-start; height: 44px;
  padding: 0 18px 0 14px; border: 1px solid #dadce0; border-radius: 22px; background: #fff; color: #1f1f1f;
  font: 500 15px/1 "Golos Text", system-ui, sans-serif; }
.google-btn:hover { text-decoration: none; background: #f8f9fa; }
.lang-btn { width: auto; min-width: 44px; padding: 0 10px; font-weight: 700; font-size: 13px; letter-spacing: .04em;
  text-decoration: none; }
/* The bar of a reader who chose the other language, on a page that has its twin there (site.js) */
.twin-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 16px; background: var(--soft);
  border-bottom: 1px solid var(--line); font-size: 14px; }
.twin-bar a { font-weight: 700; color: var(--link); }
.twin-bar button { padding: 0 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 20px; line-height: 1;
  cursor: pointer; }
/* The reader's avatar in the header opens their menu (#me-sheet); ⋮⋮⋮ opens «Сервисы» (#menu-sheet) */
.me-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none;
  cursor: pointer; }
.me-btn img, .me-btn .avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; font-size: 15px; }
.me-btn .avatar, .menu-btn .avatar, .m-who .avatar { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 599px) { .svc-btn, .me-btn { display: none; } }
/* A tablet upright (600–760) keeps the phone layout but the menus of the wide screens: ⋮⋮⋮ and the avatar, not ☰;
   «Aa» is in «Сервисы» there */
@media (min-width: 600px) and (max-width: 760px) { .top .tools .menu-btn, .top .tools .font-btn { display: none; } }
@media (min-width: 761px) { .m-row.m-fs { display: none; } }  /* «Размер текста» of the menu: only the phone layout has --fs */

/* Editor (news.editing, the pult's node editor) */
.edit-page { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 14px; }
.edit-head { padding: 14px 18px; }
.edit-head .warn, .edit-page .warn { margin: 8px 0 0; color: #b45309; font-size: 14px; }
[data-tone="dark"] .edit-page .warn { color: #fbbf24; }
.edit-head .ok { margin: 8px 0 0; color: var(--live); font-weight: 700; }
.edit-head .error { margin: 8px 0 0; color: var(--red); font-weight: 600; }
.edit-form { display: flex; flex-direction: column; gap: 14px; padding-bottom: 90px; }
.edit-fields { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; color: var(--muted); }
.edit-fields > label { display: flex; flex-direction: column; gap: 4px; }
.field { height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--bg); color: var(--text);
  font: inherit; font-size: 15px; width: 100%; }
.field.big { font-size: 18px; font-weight: 700; }
textarea.field { height: auto; padding: 10px 12px; }
.field.mono { font: 12px/1.5 ui-monospace, Consolas, monospace; }
.checks { display: flex; flex-direction: column; gap: 6px; color: var(--text); font-size: 15px; }
.checks input { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.tag-add { display: flex; gap: 8px; margin-top: 6px; }
.chips .linkish { margin-left: 2px; }
.linkish { border: 0; background: transparent; color: var(--link); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.edit-text { padding: 0 18px 16px; }
.editor-bar { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0;
  background: var(--card); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.ebtn { min-width: 38px; height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--chip);
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.ebtn:hover { border-color: var(--brand); }
.ebtn:disabled { opacity: .4; cursor: default; }
.editor-wrap { position: relative; }
.node-editor { min-height: 50vh; outline: none; padding: 4px 2px; }
.node-editor .pult-break { margin: 1rem 0; padding: .25rem .5rem; border-top: 2px dashed var(--brand); color: var(--brand);
  font: 12px/1.4 system-ui, sans-serif; user-select: none; cursor: default; }
.node-editor iframe { pointer-events: none; }
.node-editor .pult-uploading { margin: 1rem 0; padding: 1.5rem; text-align: center; border: 2px dashed #93c5fd; border-radius: .5rem;
  color: #60a5fa; font: 14px/1.4 system-ui, sans-serif; user-select: none; }
.pic-frame { position: absolute; pointer-events: none; border: 4px solid #3b82f6; border-radius: 6px; }
.pic-delete { position: absolute; z-index: 3; background: #dc2626; color: #fff; }
.edit-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 12px max(16px, calc((100% - 980px) / 2)); background: var(--bar); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.edit-btn { margin-top: 16px; }
@media (max-width: 760px) { .edit-actions { bottom: 66px; } .editor-bar { top: 62px; } }
/* Avatars: two letters, the second smaller (news_tags.avatar) */
.avatar { letter-spacing: -.5px; }
.avatar small { font-size: .72em; font-weight: 700; opacity: .85; }
.c .avatar { width: 30px; height: 30px; font-size: 14px; }

/* Comment form */
.cform { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 14px; padding: 12px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--bg); }
.c + .cform { margin-left: 36px; }
.cform textarea { width: 100%; min-height: 84px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--card); color: var(--text); font: inherit; font-size: 16px; line-height: 1.5; }
.cform textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; }
/* The input easy to see: an orange edge and a brighter hint */
.cform textarea { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.cform textarea::placeholder { color: var(--text); opacity: .75; }
/* The talk icon in the input, as on «Написать комментарий…» under the comments */
.cform-input { position: relative; }
.cform-input svg { position: absolute; left: 14px; top: 12px; color: var(--brand); pointer-events: none; }
.cform-input textarea { display: block; padding-left: 44px; }
.cform-end { display: flex; align-items: center; gap: 10px; width: 100%; margin: 16px 0 4px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--brand) 55%, var(--line));
  border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.cform-end svg { flex: none; color: var(--brand); }
.cform-end:hover { border-color: var(--brand); }
.cform-end[hidden] { display: none; }
.cform-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cform-to { font-size: 14px; color: var(--muted); }
.comments .error { color: var(--red); font-weight: 600; margin: 0 0 8px; }
.c-reply { margin: 4px 0 0 36px; padding: 4px 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; }
.c-reply:hover { color: var(--link); }
.c-tr { margin: 4px 0 0 12px; padding: 4px 0; border: 0; background: transparent; color: var(--link); font: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer; }
.small { font-size: 13px; }
@media (max-width: 760px) { .c-reply { margin-left: 0; } .c + .cform { margin-left: 0; } }

/* Live: a new comment flashes in the rail (on a news and /live, core/static/js/site.js); the pill on the article */
.live-item.arrived { animation: arrived 2.5s ease-out; border-radius: 10px; }
@keyframes arrived { from { background: var(--soft); } to { background: transparent; } }
.live-list { display: flex; flex-direction: column; gap: 14px; }
.live-list .live-item + .live-item { margin-top: 0; }
.new-pill { position: sticky; top: 76px; z-index: 4; display: block; margin: 0 auto 10px; padding: 8px 16px; border: 0;
  border-radius: 20px; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.new-pill[hidden] { display: none; }
.edit-fields .pos { max-width: 360px; }

.cform-who { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cform-who[hidden], .cform-who input[hidden] { display: none; }
.cform-who input { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--card);
  color: var(--text); font: inherit; font-size: 15px; min-width: 0; }
.cform-err { margin: 0; color: var(--red); font-weight: 600; font-size: 14px; }
/* «Давайте познакомимся»: the nickname and the e-mail of an anonymous writer, asked in a window (site.js, askIdent) */
.sheet.ident-dlg { width: min(440px, calc(100vw - 24px)); }
.ident-dlg .sheet-head button { font-size: 20px; padding: 4px 8px; }
.ident-dlg .sheet-body { gap: 12px; padding-bottom: 20px; }
.ident-lead { margin: 0; color: var(--text); font-size: 15px; line-height: 1.45; }
.ident-dlg input { height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--bg, var(--card));
  color: var(--text); font: inherit; font-size: 16px; min-width: 0; }
.ident-dlg input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.ident-go { justify-content: center; height: 46px; font-weight: 700; }
.ident-login { margin: 0; text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 760px) { .cform-who { grid-template-columns: 1fr; } }

/* Comment ratings */
.c-foot { display: flex; align-items: center; gap: 14px; margin: 4px 0 0 36px; }
.c-foot .c-reply { margin: 0; }
.c-vote { display: inline-flex; align-items: center; gap: 2px; }
.c-vote button { width: 30px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.c-vote button:hover { background: var(--chip); color: var(--strong); }
.c-vote .up.on { color: var(--live); background: var(--chip); }
.c-vote .down.on { color: var(--red); background: var(--chip); }
.c-vote .score { min-width: 22px; text-align: center; font-size: 13px; color: var(--muted); }
.c-vote .score.pos { color: var(--live); }
.c-vote .score.neg { color: var(--red); }
.c-vote.refused { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.c-low { margin: 4px 0 0 36px; border: 0; background: var(--chip); color: var(--muted); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
@media (max-width: 760px) { .c-foot, .c-low, .c-editor { margin-left: 0; } }

/* Moderation page */
.mod-page { width: 100%; max-width: 1080px; display: flex; flex-direction: column; gap: 14px; }
.mod-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mod-head h1 { margin: 0; font-size: 26px; }
.mod-count { margin-left: 6px; background: var(--brand); color: var(--brand-ink); border-radius: 8px; padding: 0 6px; font-size: 12px; }
.mod-done { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--chip); color: var(--strong); font-weight: 700; }
.mod-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.mod-filter .field { flex: 1 1 140px; min-width: 0; }
.mod-list { display: flex; flex-direction: column; gap: 10px; }
.mod-item { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.mod-item.is-hidden { opacity: .62; }
.mod-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; }
.mod-meta a { color: var(--link); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.badge.red { background: var(--red); color: #fff; }
.mod-article { font-weight: 700; color: var(--strong); font-size: 14px; }
.mod-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 15px; }
.mod-pics { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.mod-pics img { display: block; width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.mod-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mini { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.mini:hover { background: var(--chip); }
.mini.danger { border-color: var(--red); color: var(--red); }
.mod-pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mod-empty { padding: 18px; margin: 0; }
.mod-rules { display: flex; flex-direction: column; gap: 14px; }
.mod-rules section { padding: 14px 18px; }
.mod-rules h2 { margin: 0 0 4px; font-size: 18px; }
.mod-rules > section > p { margin: 0 0 10px; font-size: 13px; }
.mod-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 10px; }
.mod-table td { padding: 6px 8px 6px 0; border-top: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.mod-add { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-add .field { flex: 1 1 160px; min-width: 0; }
.mod-add .field.short { flex: 0 1 140px; }
.mod-words { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.mod-words form { display: inline-flex; align-items: center; gap: 4px; background: var(--chip); border-radius: 8px; padding: 3px 4px 3px 8px; }
.mod-words .x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.mod-settings { display: flex; flex-direction: column; gap: 10px; }
.mod-settings label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.mod-settings .btn { align-self: flex-start; }
@media (max-width: 760px) { .mod-table td { display: block; border: 0; padding: 2px 0; } .mod-table tr { display: block; border-top: 1px solid var(--line); padding: 6px 0; } }

/* The banner over the header (place «top», partners/_top.html): across the screen, under 250 px high on wide screens;
   its width/height attributes keep the place before it loads. */
.topad { position: relative; background: var(--chip); line-height: 0; }
.topad a, .topad picture { display: block; }
.topad img { display: block; margin: 0 auto; max-width: 100%; width: auto; height: auto; max-height: 250px; }
.topad-mark { position: absolute; top: 4px; right: 6px; font-size: 10px; line-height: 1.5; padding: 0 5px; border-radius: 4px;
  background: rgba(0, 0, 0, .5); color: #fff; pointer-events: none; }
@media (max-width: 760px) { .topad img { width: 100%; max-height: none; } }
/* AdSense (partners/adsense.py, partners/_adsense.html): a small «Реклама» over the block, its place kept before the ad
   comes (nothing jumps under the reader's eyes); a block Google left empty is hidden. In the feeds it is a card. */
.gad { margin: 22px 0; min-height: 280px; text-align: center; -webkit-user-select: none; user-select: none; }
.gad-label { display: block; margin-bottom: 4px; font-size: 11px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); }
.gad ins { width: 100%; }
.gad-multiplex { min-height: 320px; }
.gad:has(ins[data-ad-status="unfilled"]) { display: none; }
.feed > .gad, .gad-afisha { margin: 0; padding: 8px 8px 12px; border-radius: 12px; background: var(--card); }
.layout > .rail { align-self: stretch; }  /* the column as tall as the page, so its last block can stay on the screen */
.rail > .gad-rail { position: sticky; top: 77px; margin: 0; min-height: 270px; }
.ad-prev-top { width: 260px; background: var(--chip); border-radius: 8px; overflow: hidden; line-height: 0; }
.ad-prev-top img { width: 100%; height: auto; }

/* Advertising: /ads (partners.views) and the partner's report /ads/r/<token> */
.ad-row { display: flex; gap: 14px; align-items: flex-start; }
picture.ad-thumb { flex: none; width: 84px; display: block; }
picture.ad-thumb img { display: block; width: 84px; height: auto; max-height: 110px; object-fit: contain; border-radius: 8px; }
.ad-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ad-item.is-soon { box-shadow: inset 4px 0 0 var(--red); }
.ad-soon { color: var(--red); font-weight: 700; }
.ad-form { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ad-form h2, .ad-report h2, .ad-journal h2, .ad-charts h2 { margin: 0; font-size: 18px; }
.ad-form label, .ad-places { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.ad-places-form label.ad-check { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 14px; color: var(--text); }
.ad-place-table td { vertical-align: top; }
.ad-place-table th { text-align: left; font-size: 13px; color: var(--muted); }
.ad-place-table .ad-slot { width: 150px; margin: 4px 0; }
.ad-place-table small { display: block; }
.ad-form label.ad-check, .ad-places label { flex-direction: row; align-items: center; gap: 8px; font-size: 15px; color: var(--text); }
.ad-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
.ad-fields { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ad-dates { display: flex; flex-wrap: wrap; gap: 10px; }
.ad-dates label { flex: 1 1 150px; min-width: 0; }
.ad-places { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0; }
.ad-error { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--chip); color: var(--red); font-weight: 700; }
.ad-preview { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ad-preview p { margin: 0; }
.ad-prev-phone { height: 190px; display: flex; }
.ad-prev-phone img { height: 190px; width: auto; max-width: 70vw; border-radius: 10px; }
.ad-prev-desk { width: 200px; height: 236px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.ad-prev-desk img { max-width: 200px; max-height: 236px; border-radius: 10px; }
.ad-box { padding: 10px 18px; }
.ad-report, .ad-journal, .ad-charts, .ad-sum { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.ad-report .field { flex: 1 1 260px; min-width: 0; height: 30px; font-size: 13px; }
.ad-sum { flex-direction: row; gap: 16px; align-items: flex-start; }
.ad-sum h2 { margin: 0 0 4px; font-size: 20px; }
.ad-sum p { margin: 0 0 8px; }
.ad-totals { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ad-totals b { font-size: 24px; color: var(--strong); margin-right: 4px; }
.ad-chart { margin: 0; }
.ad-chart figcaption { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.ad-bars { height: 120px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 0; margin-bottom: 18px; }
.ad-bar { flex: 1 1 0; min-width: 2px; max-width: 28px; height: 100%; display: flex; align-items: flex-end; position: relative; }
.ad-bar i { display: block; width: 100%; min-height: 1px; background: var(--brand); border-radius: 4px 4px 0 0; }
.ad-bar:hover i { opacity: .75; }
.ad-bar small { position: absolute; top: 100%; left: 0; margin-top: 3px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.ad-days { max-height: 420px; overflow: auto; }
.ad-days th, .ad-stats th { text-align: left; font-size: 12px; color: var(--muted); padding: 4px 8px 4px 0; }
@media (max-width: 760px) {
  .ad-form-grid { grid-template-columns: 1fr; }
  .ad-sum { flex-direction: column; }
  .ad-days .mod-table td, .ad-stats td { display: table-cell; padding: 4px 8px 4px 0; }
  .ad-days .mod-table tr, .ad-stats tr { display: table-row; }
}

/* AI commenters: a white circle (news_tags.comment_avatar; explained in the site rules) */
.avatar.ai { background: #fff; color: #111827; box-shadow: inset 0 0 0 1px #d1d5db; text-decoration: none; }
.ai-status, .ai-section { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.ai-section h2 { margin: 0; font-size: 18px; }
.badge.on { background: var(--live); color: #062b1d; }
.badge.rating-hot { background: var(--live); color: #062b1d; }
.badge.rating-cold { background: var(--chip); color: var(--muted); }
.ai-persona { border-top: 1px solid var(--line); padding: 8px 0; }
.ai-persona summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
.ai-persona summary .avatar { width: 28px; height: 28px; font-size: 13px; }
.ai-persona > form { margin-top: 10px; }
.ai-persona.is-hidden summary { opacity: .6; }
.mod-settings label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.small-note { margin: 0; font-size: 13px; }
.ai-section h3 { margin: 6px 0 0; font-size: 15px; }
.ai-sup-list { margin: 0; padding-left: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.ai-sup-list form.inline { display: inline; }

/* Long discussions in parts (news.views.PART) */
.c.target { background: var(--soft); box-shadow: 0 0 0 6px var(--soft); }
.more-comments { display: block; width: 100%; margin: 14px 0 4px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--chip); color: var(--strong); font: inherit; font-weight: 700; cursor: pointer; }
.more-comments:disabled { opacity: .6; cursor: progress; }

/* Ticker under the header (templates/_ticker.html): two copies run left; paused under the pointer or focus */
.ticker { background: var(--card); border-bottom: 1px solid var(--line); }
.ticker-in { display: flex; align-items: center; gap: 16px; height: 40px; }
.ticker-label { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; font-size: 12px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase; color: var(--strong); white-space: nowrap; }
.ticker-view { flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker var(--ticker-time, 70s) linear infinite; }
.ticker-view:hover .ticker-track, .ticker-view:focus-within .ticker-track { animation-play-state: paused; }
.ticker-items { display: flex; margin: 0; padding: 0; list-style: none; }
.ticker-items li { display: flex; align-items: center; white-space: nowrap; font-size: 14px; color: var(--text); }
.ticker-items li::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: .5; margin: 0 26px; }
.ticker-items li > a, .ticker-items li > span { display: inline-flex; align-items: center; gap: 7px; }
.ticker-items a:hover { text-decoration: none; color: var(--strong); }
.ticker b { color: var(--strong); font-weight: 800; }
.ticker small { font-size: 12px; font-weight: 700; }
.ticker .down { color: var(--live); }
.ticker .up { color: var(--red); }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-view { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
  .ticker-items[aria-hidden] { display: none; }
}

/* Three columns (Pikabu-like): menu | feed of posts | rail */
.layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.layout > .feed { gap: 18px; }
.menu { position: sticky; top: 77px; display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 92px);
  overflow-y: auto; scrollbar-width: none; padding-bottom: 12px; }
.menu-feed { display: flex; flex-direction: column; gap: 2px; }
.menu-feed a { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border-radius: 12px; font-weight: 700;
  font-size: 15px; color: var(--text); }
.menu-feed a:hover { background: var(--chip); text-decoration: none; }
.menu-feed a svg { color: var(--muted); }
.menu-feed a[aria-current="page"] { background: var(--card); color: var(--strong); box-shadow: inset 3px 0 0 var(--brand); }
.menu-feed a[aria-current="page"] svg { color: var(--brand); }
.menu h4 { margin: 16px 12px 6px; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.menu-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px; }
.menu-tags a { font-size: 13px; font-weight: 600; color: var(--link); background: var(--soft); padding: 3px 9px; border-radius: 9px; }
.menu-list { display: flex; flex-direction: column; }
.menu-list a { padding: 6px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; line-height: 1.3; }
.menu-list a:hover { background: var(--chip); color: var(--strong); text-decoration: none; }
.menu-small { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 16px 12px 0; font-size: 12px; color: var(--muted); }
.feed-tabs { display: none; }

/* A post: the side column stays in view while its post scrolls by */
.post { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; }
.post-side { position: sticky; top: 77px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; }
.side-btn { width: 50px; min-height: 46px; padding: 6px 0; border: 0; border-radius: 14px; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; font-size: 12px;
  font-weight: 700; cursor: pointer; }
.side-btn:hover { background: var(--chip); color: var(--strong); text-decoration: none; }
.side-views { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 2px; font-size: 11px; color: var(--muted);
  text-align: center; line-height: 1.2; }
.reacts { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.reacts.refused { animation: shake .3s; }
.react-list { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.react-list:empty { display: none; }
.react { width: 50px; padding: 4px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text);
  display: flex; flex-direction: column; align-items: center; font: inherit; cursor: pointer; }
.react:hover { border-color: var(--muted); }
.react i { font-style: normal; font-size: 18px; line-height: 1.25; }
.react span { font-size: 12px; font-weight: 700; color: var(--muted); }
.react.on { border-color: var(--brand); background: var(--soft); }
.react.on span { color: var(--link); }
.react-pick { position: absolute; left: 56px; top: auto; bottom: 0; z-index: 12; display: flex; gap: 2px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.react-pick[hidden] { display: none; }
.react-pick button { width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; font-size: 23px; cursor: pointer;
  transition: transform .1s; }
.react-pick button:hover { background: var(--chip); transform: scale(1.15); }
.react-pick button.on { background: var(--soft); }
.post-main { padding: 18px 24px 16px; min-width: 0; }
.post-head { gap: 6px 12px; }
.post-head .tag { color: var(--link); font-weight: 600; }
.post-main h2 { margin: 8px 0 12px; font-size: 24px; line-height: 1.25; font-weight: 800; }
.post-main h2 a:hover { color: var(--link); text-decoration: none; }
.post-text { font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.post-text p { margin: 0 0 .9em; }
.post-text img:not(.smiley) { border-radius: 12px; }
.post-text .pic, .post-text div[align="center"] { text-align: center; margin: 0 0 .6em; }
/* The caption close under its picture: no gap of the <br> and of the line under an inline picture */
.post-text .pic img { vertical-align: bottom; }
.post-text .pic > br { display: none; }
.post-text em.cap, .post-text .pic em { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); margin-top: 3px; }
.post-text a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.post-text blockquote { margin: 0 0 1em; padding: 4px 0 4px 16px; border-left: 3px solid var(--brand); color: var(--strong); }
.post-text iframe { max-width: 100%; }
.post-text.loading { opacity: .55; transition: opacity .2s; }
.post-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.post-talk, .post-share { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 12px; border: 0;
  border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.post-talk:hover, .post-share:hover { background: var(--chip); color: var(--strong); text-decoration: none; }
.post-share { width: 36px; padding: 0; justify-content: center; }
.post-share.done { color: var(--live); }
.post-icons { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.post-views { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
/* The comment counter in orange, as the pill of the phone cards (and the side column's) */
.post-talk:not(.is-zero), .side-talk:not(.is-zero) { color: var(--link); background: var(--soft); }
.post-talk:not(.is-zero):hover, .side-talk:not(.is-zero):hover { color: var(--link); filter: brightness(1.15); }
.partner-pic { display: block; margin: 0 auto 12px; border-radius: 12px; }
.article-post .article { min-width: 0; }

/* Services in the rail: buses, radio, fresh listings */
.services { display: flex; flex-direction: column; gap: 2px; }
.svc { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 12px; }
.svc:hover { background: var(--chip); text-decoration: none; }
.svc-ic { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent); }
.svc b { display: block; color: var(--strong); font-size: 15px; }
.svc small { display: block; color: var(--muted); font-size: 13px; }
.mk-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.mk.market-item { flex-direction: row; align-items: center; gap: 10px; overflow: visible; }
.mk.market-item img { width: 64px; height: 48px; aspect-ratio: auto; border-radius: 8px; flex: 0 0 auto; }
.mk > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mk .mk-title { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk b { font-size: 14px; color: var(--strong); }
.mk-all { font-size: 14px; font-weight: 600; color: var(--link); }

@media (max-width: 1280px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .menu { display: none; }
  .feed-tabs { display: flex; }
}
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ticker-in { height: 36px; }
  .ticker-label { display: none; }
  .ticker-items li { font-size: 13px; }
  .layout > .feed { gap: 14px; }
  .post { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .post-side { position: static; order: 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 4px 0; }
  .post-side:empty { display: none; }
  .reacts, .react-list { flex-direction: row; flex-wrap: wrap; }
  .react { width: auto; flex-direction: row; gap: 4px; padding: 4px 10px; border-radius: 12px; }
  .side-btn { width: auto; min-height: 40px; flex-direction: row; gap: 6px; padding: 0 10px; font-size: 13px; }
  .side-views { flex-direction: row; margin-left: auto; padding: 0 6px; font-size: 12px; }
  .react-pick { left: 0; bottom: 46px; }
  .post-main { padding: 14px 14px 12px; }
  .post-main h2 { font-size: 20px; margin: 6px 0 10px; }
  .post-text { font-size: 16px; }
}
.side-btn.done { color: var(--live); }
/* Wide screens: the feed post's side column holds only the reactions (the rest is in the foot), and «add a reaction»
   is a plain round button with a border, not a faint icon */
@media (min-width: 761px) {
  .pcard > .post-side .side-talk, .pcard > .post-side .side-share, .pcard > .post-side .side-views { display: none; }
  .post-side .react-add { width: 46px; min-height: 46px; border: 1.5px dashed var(--muted); border-radius: 50%; color: var(--link); }
  .post-side .react-add:hover, .post-side .react-add[aria-expanded="true"] { border-style: solid; border-color: var(--brand); background: var(--soft); color: var(--link); }
}
/* Phones: «add a reaction» marked as on wide screens — a dashed round button with an orange icon */
@media (max-width: 760px) {
  .post-side .react-add { min-width: 40px; justify-content: center; border: 1.5px dashed var(--muted); border-radius: 999px; color: var(--link); }
  .pcard .post-side .react-add { width: 30px; min-width: 30px; padding: 0; }
  .post-side .react-add[aria-expanded="true"] { border-style: solid; border-color: var(--brand); background: var(--soft); }
}
/* Fourteen emojis: two rows of seven on phones */
@media (max-width: 760px) { .react-pick { display: grid; grid-template-columns: repeat(7, 42px); } .react-pick[hidden] { display: none; } }

/* Search window (templates/_search_dialog.html): a magnifier in the header opens it */
.search-dlg { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 120px); margin: 76px auto auto; padding: 0;
  border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45); overflow: auto; }
.search-dlg::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
.search-dlg[open] { animation: sd-in .16s ease-out; }
@keyframes sd-in { from { opacity: 0; transform: translateY(-8px); } }
.sd-form { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.sd-form input { flex: 1; min-width: 0; height: 52px; border: 0; outline: none; background: transparent; color: var(--strong);
  font: inherit; font-size: 20px; font-weight: 500; }
.sd-form input::-webkit-search-cancel-button { display: none; }
.sd-form .btn { height: 44px; }
.sd-close { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 12px; background: var(--chip); color: var(--text);
  display: grid; place-items: center; cursor: pointer; }
.sd-close:hover { color: var(--strong); }
.sd-body { padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.sd-body h5 { margin: 12px 0 8px; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.sd-row { display: flex; align-items: baseline; justify-content: space-between; }
.sd-row .linkish { font-size: 13px; }
.sd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-chips a { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 10px; background: var(--chip); color: var(--strong); }
.sd-chips a:hover { text-decoration: none; background: var(--line); }
.sd-chips a.sd-tag { background: var(--soft); color: var(--link); }
.sd-hint { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.sd-hint a { color: var(--link); }
@media (max-width: 760px) {
  .search-dlg { width: 100vw; max-width: none; max-height: none; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .sd-form { padding: 10px 10px 10px 14px; }
  .sd-form input { font-size: 17px; height: 46px; }
  .sd-form .btn { display: none; }
}

/* ===== Phones (≤760 px): the look of the old mobile version of stena.ee =====
   --fs is the reading size, changed with «Aa» (site.js; 13–25 px, 17 = 100 %). Cards of the feed instead of the posts,
   the partners, fresh listings and «Обсуждают» between them, no rail; the menu and «+» open sheets from below. */
:root { --fs: 17px; }
.font-btn, .menu-btn, .logo-cloud, .phone-block, .fab, .font-panel, .pc-pic, .pc-lead { display: none; }
.logo-a { position: relative; display: inline-block; }

.sheet { width: min(560px, 100vw); max-height: 88dvh; padding: 0; border: 0; border-radius: 20px; background: var(--card);
  color: var(--text); overflow: auto; box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); }
.sheet::backdrop { background: rgba(0, 0, 0, .55); }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 10px 18px; background: var(--card); border-bottom: 1px solid var(--line); }
.sheet-head b { font-size: 18px; color: var(--strong); }
.sheet-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); }
.sheet-body h5 { margin: 8px 0 0; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.sheet-login { justify-content: center; height: 46px; }
.sheet-row:hover { text-decoration: none; }
.sheet-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 14px; background: transparent; color: var(--strong); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.sheet-row svg { color: var(--brand); flex: 0 0 auto; }
.sheet-row small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.sheet-row.is-off { cursor: default; opacity: .65; }
.sheet .menu-tags { padding: 0; }
.sheet .menu-list a { padding: 8px 0; color: var(--text); font-size: 15px; }
.sheet .menu-small { padding: 6px 0 0; }

/* The menus (_menu_sheet.html): tiles of the services with their colour (--c), rows with a grey round icon */
.m-main h5, .m-side h5, .m-recent-box h5 { margin: 12px 0 6px; }
.m-main > h5:first-child, .m-side > h5:first-child { margin-top: 4px; }
.m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.m-tile { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 9px 10px; border-radius: 12px; color: var(--text); }
.m-tile:hover { background: var(--chip); text-decoration: none; }
.m-ic { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--c); }
.m-ic svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.m-name { display: block; font-weight: 700; line-height: 1.25; color: var(--strong); }
.m-tile small { display: block; margin-top: 1px; font-size: 13px; line-height: 1.3; color: var(--muted); }
.m-tile small a { color: var(--muted); }
.m-tile small a:hover { color: var(--link); }
.m-tile small.m-live { color: var(--live); }
.m-live::before { content: "● "; }
.m-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; border: 0; border-radius: 10px; background: none;
  color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.m-row:hover { background: var(--chip); text-decoration: none; }
.m-row[hidden] { display: none; }
.m-ri { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--chip); }
.m-row:hover .m-ri { background: var(--card); }
.m-ri svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-n { margin-left: auto; padding: 0 6px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-size: 12px; line-height: 18px; }
.m-me { display: flex; align-items: center; gap: 10px; }
.m-me .bell { flex: 0 0 auto; color: var(--strong); }
.m-who { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px; border-radius: 14px;
  background: var(--chip); color: var(--strong); }
.m-who:hover { text-decoration: none; }
.m-who > span { min-width: 0; }
.m-who img, .m-who .avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; font-size: 18px; }
.m-who b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-who small { display: block; font-size: 13px; color: var(--muted); }
.m-recent { display: flex; flex-wrap: wrap; gap: 8px; }
.m-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 20px; background: var(--chip);
  color: var(--strong); font-size: 14px; font-weight: 600; }
.m-chip:hover { text-decoration: none; }
.m-chip .m-ic { width: 26px; height: 26px; }
.m-chip .m-ic svg { width: 14px; height: 14px; }
.menu-pop .menu-small { border-top: 1px solid var(--line); padding-top: 12px; }
/* From 600 px: a panel under the button (site.js sets top and right), two columns; the reader's block is in #me-sheet */
@media (min-width: 600px) {
  .sheet.menu-pop { position: fixed; top: 70px; right: 12px; bottom: auto; left: auto; margin: 0; width: min(760px, calc(100vw - 24px));
    max-height: calc(100dvh - 90px); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
  .menu-pop::backdrop { background: rgba(0, 0, 0, .3); }
  .menu-pop[open] { animation: none; }
  .sheet.me-pop { width: 340px; }
  .me-pop .sheet-body { gap: 2px; padding: 10px 10px 12px; }
  .me-pop .m-who { margin-bottom: 6px; }
  .me-pop .m-out { margin-top: 6px; }
  .me-pop h5 { margin: 10px 8px 4px; }
  .m-phone { display: none !important; }
  .m-cols { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; }
  .m-side { padding-left: 18px; border-left: 1px solid var(--line); }
}
@media (min-width: 600px) and (max-width: 760px) {
  .m-cols { grid-template-columns: minmax(0, 1fr); }
  .m-side { padding-left: 0; border-left: 0; }
}
/* A signed-in reader's «Сервисы» has only the tiles («Создать» and «Настройки» are in the avatar's menu): three columns */
@media (min-width: 761px) {
  .m-solo { grid-template-columns: minmax(0, 1fr); }
  .m-solo .m-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .m-wide { display: none; }
  .m-tiles { gap: 8px; }
  .m-tile { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; background: var(--chip); }
  .m-tile:hover { background: var(--chip); }
  .m-row .m-ri { background: var(--chip); }
}

/* Between the phone and the wide screen (a phone turned sideways, a tablet upright): the sections scroll sideways if they
   must, «Написать» and «Войти» keep only their icons. */
@media (min-width: 761px) and (max-width: 1080px) {
  .top .wrap { gap: 16px; }
  .nav { flex: 0 1 auto; min-width: 0; gap: 16px; font-size: 14px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .top .tools { flex: 1 0 auto; gap: 8px; }
  .top .write, .top .login { width: 44px; padding: 0; gap: 0; justify-content: center; font-size: 0; }
}

@media (max-width: 760px) {
  /* Header: the logo with its cloud, «Aa», search and the menu (or the reader's avatar) */
  .top .wrap { gap: 8px; }
  .top .tools { gap: 6px; }
  @media (max-width: 370px) { .top .tools { gap: 4px; } .top .tools .icon-btn, .font-btn { width: 40px; min-width: 40px; } }
  .logo { line-height: 1.5; }
  .font-btn { display: flex; align-items: baseline; justify-content: center; gap: 1px; height: 40px; min-width: 44px; padding: 10px 9px 0;
    border: 1.5px solid var(--line); border-radius: 12px; background: none; color: var(--strong); font: inherit; font-weight: 700;
    line-height: 1; cursor: pointer; }
  .font-btn[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
  .font-big { font-size: 19px; }
  .font-small { font-size: 13px; }
  .menu-btn { display: grid; }
  .menu-btn img, .menu-btn .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
  .font-panel:not([hidden]) { position: sticky; top: 61px; z-index: 9; display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
  .font-panel .font-title { margin-right: auto; font-size: 14px; font-weight: 600; color: var(--muted); }
  .font-panel button { display: flex; align-items: baseline; justify-content: center; min-width: 58px; height: 40px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--bg); color: var(--strong); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
  .font-panel button:disabled { opacity: .35; }
  .font-val { min-width: 40px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }

  /* «печатает…» over the A: the dots jump lazily when it is quiet, like a messenger when people write */
  .logo-cloud { display: block; position: absolute; left: 50%; bottom: calc(100% - 7px); width: 20px; height: 14px; margin-left: -10px;
    overflow: visible; transform-origin: 50% 100%; }
  .logo-cloud path { fill: var(--strong); }
  .logo-cloud circle { fill: var(--brand); animation: cloud-dot 2.6s ease-in-out infinite; }
  .logo-cloud circle:nth-of-type(2) { animation-delay: .18s; }
  .logo-cloud circle:nth-of-type(3) { animation-delay: .36s; }
  .logo[data-pulse="0"] .logo-cloud { opacity: .8; }
  .logo[data-pulse="1"] .logo-cloud circle { animation-name: cloud-dot-on; animation-duration: 1.3s; }
  .logo[data-pulse="1"] .logo-cloud circle:nth-of-type(2) { animation-delay: .15s; }
  .logo[data-pulse="1"] .logo-cloud circle:nth-of-type(3) { animation-delay: .3s; }
  .logo[data-pulse="2"] .logo-cloud { animation: cloud-hot 1.4s ease-in-out infinite; }
  .logo[data-pulse="2"] .logo-cloud circle { animation-name: cloud-dot-on; animation-duration: .7s; }
  .logo[data-pulse="2"] .logo-cloud circle:nth-of-type(2) { animation-delay: .1s; }
  .logo[data-pulse="2"] .logo-cloud circle:nth-of-type(3) { animation-delay: .2s; }

  /* Sheets come up from below */
  .sheet { width: 100vw; max-width: none; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .sheet[open] { animation: sheet-in .2s ease-out; }

  /* Bottom bar: «+» is a button for signed-in people */
  .tabbar button { border: 0; font: inherit; cursor: pointer; padding: 0; }
  main.wrap { padding-bottom: 24px; }
  footer.bottom { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  footer.bottom .wrap { gap: 6px 14px; font-size: 12px; padding-top: 16px; padding-bottom: 16px; align-items: baseline; }
  footer.bottom .wrap > span:last-child { margin-left: 0 !important; flex-basis: 100%; }

  /* No rail on phones: «Эфир» has a page of its own, the rest stands between the cards */
  .rail, .post.is-partner { display: none; }
  .phone-block { display: block; }
  .layout > .feed { gap: 10px; }

  /* A feed card: the picture on the left with the title beside it, the lead and the bottom line across */
  .pcard { display: grid; grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas: "pic title" "lead lead" "meta side"; gap: 0; padding: 12px; background: var(--card);
    border: 1px solid var(--line); border-radius: 14px; }
  .pcard > .post-main { display: contents; }
  .pcard .post-text, .pcard .post-foot, .pcard .post-head .tag { display: none; }
  .pc-pic { display: block; grid-area: pic; width: 112px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--chip); }
  picture.pc-pic img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
  .pcard .post-main h2 { grid-area: title; align-self: center; margin: 0 0 0 12px; font-size: calc(var(--fs) - 2px); line-height: 1.26;
    font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
  .pcard:not(:has(.pc-pic)) .post-main h2 { grid-column: 1 / -1; margin-left: 0; }
  .pc-lead { display: -webkit-box; grid-area: lead; margin: 8px 0 0; font-size: calc(var(--fs) - 3px); line-height: 1.38; color: var(--muted);
    -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
  .pcard .post-head { grid-area: meta; flex-wrap: wrap; align-content: flex-start; gap: 2px 6px; margin-top: 10px; padding-top: 8px;
    border-top: 1px solid var(--line); font-size: calc(var(--fs) - 5px); }
  .pcard .post-head > span:not(.badge) { opacity: .75; }
  .pcard > .post-side { grid-area: side; flex-wrap: wrap; justify-content: flex-end; gap: 2px; min-width: 0;
    margin-top: 10px; padding: 6px 0 0; border-top: 1px solid var(--line); }
  /* «＋» and «Поделиться» as small icons; the emojis open over the card's bottom line */
  .pcard { position: relative; }
  .pcard .post-side .react-add, .pcard .post-side .side-share { min-height: 0; height: 30px; padding: 0 4px; }
  .pcard .post-side .react-add svg, .pcard .post-side .side-share svg { width: 19px; height: 19px; }
  .pcard .reacts { order: 1; position: static; }
  .pcard .post-side .react-pick { left: 50%; bottom: 48px; transform: translateX(-50%); }
  .pcard .side-share { order: 2; }
  .pcard .react-list { flex-wrap: nowrap; gap: 2px; }
  .pcard .react-list .react:nth-child(n+3) { display: none; }
  .pcard .post-side .react { padding: 2px 5px; border: 0; background: transparent; }
  .pcard .post-side .react i { font-size: 15px; }
  .pcard .side-views { order: 3; margin-left: 0; padding: 0 3px; font-size: calc(var(--fs) - 5px); }
  .pcard .side-views svg { width: 15px; height: 15px; }
  /* The comment counter: an orange pill on the right, straight to the comments */
  .pcard .side-talk { order: 4; min-height: 0; height: 30px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--soft);
    color: var(--link); font-size: calc(var(--fs) - 3px); gap: 5px; }
  .pcard .side-talk svg { width: 17px; height: 17px; }
  .pcard .side-talk.is-zero { display: none; }
  /* The first cards of the front page: the picture across */
  .feed > .pcard.wide { grid-template-areas: "pic pic" "title title" "lead lead" "meta side"; overflow: hidden; }
  .pcard.wide .pc-pic { width: calc(100% + 24px); max-width: none; height: auto; aspect-ratio: 16 / 9; margin: -12px -12px 0; border-radius: 0; }
  .pcard.wide .post-main h2 { margin: 12px 0 0; font-size: calc(var(--fs) + 1px); line-height: 1.28; font-weight: 700; }
  article.pcard.wide:first-of-type .post-main h2 { font-size: calc(var(--fs) + 3px); line-height: 1.25; font-weight: 750; }
  .pcard.wide .pc-lead { margin-top: 6px; font-size: calc(var(--fs) - 2px); -webkit-line-clamp: 3; }

  /* Partners (a row that turns by itself), fresh listings (a row to swipe), «Обсуждают» */
  .pstrip, .mstrip { margin: 2px -16px; padding: 10px 0 4px; }
  .strip-h { margin: 0; padding: 0 16px 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .strip-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 16px 8px; }
  .strip-head h2 { margin: 0; font-size: 16px; font-weight: 750; }
  .strip-head a { font-size: 14px; font-weight: 650; color: var(--link); }
  .strip-row { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 8px; scroll-padding: 0 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .strip-row::-webkit-scrollbar { display: none; }
  .pstrip-item { flex: none; scroll-snap-align: start; border-radius: 10px; overflow: hidden; background: var(--card); }
  .pstrip-item img { display: block; height: 190px; width: auto; max-width: 70vw; }
  .mstrip { background: var(--soft); }
  .mstrip-item { flex: 0 0 132px; scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
    background: var(--card); }
  .mstrip-item:hover { text-decoration: none; }
  .mstrip-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--chip); }
  .mstrip-title { padding: 7px 8px 2px; font-size: calc(var(--fs) - 4px); line-height: 1.3; font-weight: 600; color: var(--strong);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mstrip-meta { display: flex; gap: 6px; margin-top: auto; padding: 0 8px 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
  .mstrip-meta b { color: var(--link); }
  .mstrip-add { align-items: center; justify-content: center; gap: 4px; padding: 10px; text-align: center; font-size: 14px; font-weight: 600;
    color: var(--strong); border: 1.5px dashed var(--line); background: transparent; }
  .mstrip-add span { font-size: 34px; line-height: 1; font-weight: 300; color: var(--brand); }
  .hot-box, .live-hot { padding: 14px 16px; }
  .hot-box h2, .live-hot h2 { margin: 0 0 10px; font-size: 17px; }
  .live-page { padding: 14px 16px; }

  /* Lists of tags and sections, «Ещё новости»: the same small card */
  .card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0 12px; padding: 12px; border-radius: 14px; }
  .card .body { display: contents; }
  .card .pic { grid-column: 1; grid-row: 1; width: 112px; height: 84px; }
  .card h2 { grid-column: 2; grid-row: 1; align-self: center; font-size: calc(var(--fs) - 2px); line-height: 1.26; font-weight: 600; }
  .card:not(:has(.pic)) h2 { grid-column: 1 / -1; }
  .card p { display: -webkit-box; grid-column: 1 / -1; margin-top: 8px; font-size: calc(var(--fs) - 3px); line-height: 1.38;
    -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
  .card .meta { grid-column: 1 / -1; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: calc(var(--fs) - 5px); }
  /* A partner's card: the mark, then the banner whole (not cut), half the width in the middle, the title and the text under it */
  .ad-card { display: flex; flex-direction: column; gap: 8px; }
  .ad-card .badge { order: 0; }
  .ad-card > a { order: 1; display: block; }
  .ad-card h2, .ad-card p { order: 2; }
  .ad-card p { margin-top: 0; }
  .ad-card > a { align-self: center; width: 50%; }
  .ad-card .pic { width: 100%; height: auto; }
  .ad-card .pic img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; }

  /* The article: the reading size, a button to the comments, the comment form folded into one line */
  .article h1 { font-size: calc(var(--fs) + 7px); line-height: 1.22; }
  .article .article-meta { font-size: calc(var(--fs) - 4px); margin-bottom: 14px; }
  .article .text { font-size: var(--fs); line-height: 1.62; }
  .article-post .post-side { padding: 8px 2px 0; }
  .c-text { font-size: calc(var(--fs) - 2px); }
  .c-author { font-size: calc(var(--fs) - 3px); }
  .fab { position: fixed; right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 15; display: flex; align-items: center;
    gap: 6px; height: 48px; padding: 0 16px 0 14px; border-radius: 999px; background: var(--brand); color: var(--brand-ink);
    font-weight: 800; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); transition: transform .2s, opacity .2s; }
  .fab:hover { text-decoration: none; }
  .fab.away { transform: translateY(220px); opacity: 0; pointer-events: none; }
  .cform:not(.open) .cform-who, .cform:not(.open) .cform-foot { display: none; }
  .cform:not(.open) textarea { min-height: 46px; height: 46px; resize: none; overflow: hidden; }
  .cform { padding: 8px; }
  .theme-close { top: 8px; right: 8px; }
}
/* Tablets on their side (a touch screen wider than a phone): the reading sizes of the phone's article, not the
   desktop's bigger ones; --fs (17 px) is the phone's reading size. */
@media (min-width: 761px) and (hover: none) and (pointer: coarse) {
  .article h1 { font-size: calc(var(--fs) + 7px); line-height: 1.22; }
  .article .article-meta { font-size: calc(var(--fs) - 4px); }
  .article .text, .post-text { font-size: var(--fs); line-height: 1.62; }
  .post-main h2 { font-size: calc(var(--fs) + 3px); }
  .c-text { font-size: calc(var(--fs) - 2px); }
  .c-author { font-size: calc(var(--fs) - 3px); }
}
@keyframes cloud-dot { 0%, 30%, 100% { transform: translateY(0); } 12% { transform: translateY(-3px); } }
@keyframes cloud-dot-on { 0%, 60%, 100% { transform: translateY(0); opacity: .75; } 28% { transform: translateY(-3.5px); opacity: 1; } }
@keyframes cloud-hot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes sheet-in { from { transform: translateY(40px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) {
  .logo-cloud, .logo-cloud circle, .logo[data-pulse] .logo-cloud { animation: none !important; }
}

/* «Предложить новость» (news.suggestions) */
.sug-page { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.sug-box { padding: 20px 22px; }
.sug-box h1 { margin: 0 0 6px; font-size: 26px; }
.sug-box h2 { margin: 0 0 10px; font-size: 19px; }
.sug-box > p { margin: 0 0 14px; }
.sug-form { display: flex; flex-direction: column; gap: 14px; }
.sug-form > label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--strong); font-size: 15px; }
.sug-form textarea.field { min-height: 180px; resize: vertical; line-height: 1.5; }
.sug-form .btn { align-self: flex-start; height: 46px; }
.sug-form .check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; color: var(--text); }
.sug-form .check[hidden], .sug-photo[hidden] { display: none; }
.sug-form .check input { width: 20px; height: 20px; }
.sug-rights { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.sug-rights[hidden] { display: none; }
.sug-rights.bad { border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); }
.sug-err { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--red) 10%, transparent); }
.sug-file input { font: inherit; font-size: 14px; color: var(--muted); }
.sug-photo { max-width: 260px; max-height: 200px; border-radius: 10px; object-fit: cover; }
.sug-ok { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--soft); color: var(--strong); font-weight: 700; }
.sug-mine { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sug-mine li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sug-mine li:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 760px) {
  .sug-box { padding: 16px; }
  .sug-box h1 { font-size: 22px; }
  .sug-form .btn { align-self: stretch; justify-content: center; }
}

/* The community (community.views): the bell, a reader's profile, notifications, the readers' board */
.bell { position: relative; }
.bell-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.bell-n.inline { position: static; display: inline-block; margin-left: 4px; }
a.c-author:hover { color: var(--link); }
.cm-page { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.cm-box { padding: 20px 22px; }
.cm-box h1 { margin: 0 0 8px; font-size: 26px; }
.cm-box h2 { margin: 0 0 10px; font-size: 19px; }
.cm-box h2 + .cm-list + h2, .cm-list + h2 { margin-top: 16px; }
.cm-box p { margin: 0 0 8px; }
.cm-head { display: flex; align-items: center; gap: 16px; }
.cm-head .avatar, .cm-photo { width: 72px; height: 72px; border-radius: 50%; font-size: 28px; object-fit: cover; flex: 0 0 auto; }
.cm-who { flex: 1 1 auto; min-width: 0; }
.cm-who h1 { margin: 0 0 4px; overflow-wrap: anywhere; }
.cm-badges { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.cm-badges li { padding: 4px 10px; border-radius: 10px; background: var(--soft); color: var(--strong); font-size: 13px; font-weight: 600; cursor: help; }
.cm-karma { display: flex; flex-direction: column; align-items: center; }
.cm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 0; }
.cm-offer { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.cm-comment { padding: 12px 0; border-top: 1px solid var(--line); }
.cm-comment:first-of-type { border-top: 0; padding-top: 0; }
.cm-comment .c-text { margin: 4px 0; }
.cm-art { font-weight: 700; font-size: 14px; }
.cm-pages { justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
.cm-tg { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0; }
.cm-tg .check { display: flex; align-items: center; gap: 10px; }
.cm-tg .check input { width: 20px; height: 20px; flex: 0 0 auto; }
.cm-note { padding: 12px 0 12px 12px; border-top: 1px solid var(--line); border-left: 3px solid transparent; }
.cm-note:first-child { border-top: 0; }
.cm-note.unread { border-left-color: var(--brand); }
.cm-note .c-text { margin: 4px 0; }
.cm-quote { margin: 4px 0; padding: 4px 10px; border-left: 3px solid var(--line); color: var(--muted); font-size: 14px; }
.cm-tabs { margin: 4px 0 14px; }
.cm-board { margin: 0; padding: 0; list-style: none; }
.cm-board li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.cm-board li:first-child { border-top: 0; }
.cm-board img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.cm-board a { flex: 1 1 auto; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-board b { font-size: 17px; color: var(--strong); min-width: 40px; text-align: right; }
.cm-place { width: 24px; text-align: right; color: var(--muted); font-weight: 700; }
.cm-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
/* levels (community.karma.LEVELS): a chip in the profile and on /top, a sign by the name in comments */
.lv1 { --lv: #8a94a6; } .lv2 { --lv: #22a35a; } .lv3 { --lv: #0e9f9a; } .lv4 { --lv: #2f80ed; } .lv5 { --lv: #5b5bd6; }
.lv6 { --lv: #9b51e0; } .lv7 { --lv: #e07a1f; } .lv8 { --lv: #d93a4a; } .lv9 { --lv: #c99a06; }
.cm-lv { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 10px; font-size: 13px;
  font-weight: 700; white-space: nowrap; color: var(--strong); border: 1px solid var(--lv);
  background: color-mix(in srgb, var(--lv) 16%, var(--card)); }
.c-lv { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px;
  line-height: 1; margin-left: 4px; vertical-align: middle; cursor: help; border: 1px solid var(--lv);
  background: color-mix(in srgb, var(--lv) 18%, var(--card)); }
.who .c-lv { width: 18px; height: 18px; font-size: 11px; }
.cm-karma { min-width: 120px; gap: 8px; }
.cm-scores { display: flex; gap: 14px; }
.cm-scores span { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--muted); }
.cm-scores b { font-size: 24px; line-height: 1.1; color: var(--strong); }
.cm-bar { height: 10px; margin: 6px 0 12px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.cm-bar i { display: block; height: 100%; border-radius: 5px; background: var(--brand); }
.cm-gains { width: 100%; margin: 0 0 12px; border-collapse: collapse; font-size: 14px; }
.cm-gains th, .cm-gains td { padding: 6px 4px; border-top: 1px solid var(--line); text-align: right; }
.cm-gains th:first-child, .cm-gains td:first-child { text-align: left; }
.cm-gains thead th { border-top: 0; color: var(--muted); font-weight: 600; font-size: 12px; }
.cm-levels-t td:nth-child(4), .cm-levels-t th:nth-child(4) { text-align: left; }
.cm-levels-t td:nth-child(4) { font-size: 13px; color: var(--muted); }
.cm-list + p { margin-top: 12px; }
.cm-levels-t .cm-lv { font-size: 12px; }
@media (max-width: 760px) {
  .cm-box { padding: 16px; }
  .cm-box h1 { font-size: 22px; }
  .cm-head { flex-wrap: wrap; }
  .cm-head .avatar, .cm-photo { width: 56px; height: 56px; font-size: 22px; }
  .cm-board .cm-lv { display: none; }
  .cm-levels-t tr { display: grid; grid-template-columns: 1fr 64px 84px; align-items: center; border-top: 1px solid var(--line); }
  .cm-levels-t th, .cm-levels-t td { border-top: 0; }
  .cm-levels-t th:nth-child(4) { display: none; }
  .cm-levels-t td:nth-child(4) { grid-column: 1 / -1; padding-top: 0; }
  .cm-levels-t td:nth-child(4):empty { display: none; }
  .cm-karma { flex-basis: 100%; flex-direction: row; justify-content: space-between; }
}

/* Afisha (events app): /afisha, an event, venues; the rail's block and the phone's strip on the front page.
   Tiles: a poster with the date on it, the title, the place, price and marks; without a picture a coloured
   field with the category's sign. */
.af-page { width: 100%; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.af-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.af-title h1 { margin: 0; font-size: 30px; }
.af-filters { display: flex; flex-direction: column; gap: 8px; }
.af-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.af-chips .chip { color: var(--text); background: var(--chip); padding: 6px 12px; }
.af-chips .chip:hover { text-decoration: none; color: var(--strong); }
.af-chips .chip.on { background: var(--brand); color: var(--brand-ink); }
.af-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.af-view { margin-left: auto; }
.af-day { display: flex; flex-direction: column; gap: 10px; }
.af-day-h { margin: 10px 0 0; font-size: 18px; font-weight: 600; color: var(--muted); }
.af-day-h b { color: var(--strong); font-weight: 800; }
.af-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.af-tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--text); }
.af-tile:hover { text-decoration: none; border-color: var(--brand); }
.af-pic { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--chip); overflow: hidden; }
.af-pic picture, .af-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.af-icon { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 46px; opacity: .85; }
.af-date { position: absolute; left: 10px; bottom: 10px; background: var(--brand); color: var(--brand-ink); font-size: 13px; font-weight: 700;
  padding: 4px 9px; border-radius: 9px; }
.af-date b { font-size: 17px; }
.af-tile .af-date { max-width: calc(100% - 20px); }
.af-sessions { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.af-sessions a { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; white-space: nowrap; }
.af-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.af-name { font-size: 16px; font-weight: 750; line-height: 1.3; color: var(--strong); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.af-where { font-size: 13.5px; color: var(--muted); }
.af-more { font-size: 13.5px; font-weight: 650; color: var(--link); }
.af-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; }
.af-price { font-size: 13.5px; font-weight: 700; }
.af-c-concert { background: linear-gradient(135deg, #7c3aed55, #ff750033); }
.af-c-theatre { background: linear-gradient(135deg, #be123c55, #7c3aed33); }
.af-c-exhibition { background: linear-gradient(135deg, #0e749055, #34d39933); }
.af-c-kids { background: linear-gradient(135deg, #f59e0b55, #34d39933); }
.af-c-sport { background: linear-gradient(135deg, #16a34a55, #0ea5e933); }
.af-c-fest, .af-c-party { background: linear-gradient(135deg, #db277755, #f59e0b33); }
.af-c-talk, .af-c-tour, .af-c-class, .af-c-other { background: linear-gradient(135deg, #2563eb44, #64748b33); }
.af-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.af-list li { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); }
.af-list li:first-child { border-top: 0; }
.af-list a { font-weight: 700; }
.af-list small { display: block; }
.af-time { flex: 0 0 64px; font-weight: 800; color: var(--strong); }
.af-empty { padding: 20px 22px; }
.af-more, .af-note { font-size: 14px; margin: 0; }
.af-crumbs { font-size: 14px; }
.af-card { padding: 22px; }
.af-top { display: flex; gap: 22px; align-items: flex-start; }
.af-poster { flex: 0 0 340px; border-radius: 14px; overflow: hidden; background: var(--chip); }
.af-poster img { display: block; width: 100%; height: auto; }
.af-info { flex: 1; min-width: 0; }
.af-info h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; }
.af-orig { margin: 0 0 12px; }
.af-facts { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; margin: 14px 0; }
.af-facts dt { color: var(--muted); }
.af-facts dd { margin: 0; }
.af-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.af-lead { font-size: 18px; line-height: 1.5; margin: 18px 0 8px; }
.af-desc summary { cursor: pointer; font-weight: 700; color: var(--link); margin: 8px 0; }
.af-desc .text { line-height: 1.55; }
.af-src { font-size: 13.5px; margin: 14px 0 0; }
.af-past { background: var(--soft); border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; font-weight: 700; }
.af-venues { margin: 0 0 16px; padding-left: 18px; line-height: 1.8; }
.af-rail ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.af-rail li a { display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.af-rail li a:hover { text-decoration: none; }
.af-rail li a:hover .af-rail-name { color: var(--link); }
.af-rail-date { flex: 0 0 44px; display: flex; flex-direction: column; align-items: center; background: var(--soft); border-radius: 10px;
  padding: 4px 0; font-size: 12px; color: var(--muted); }
.af-rail-date b { font-size: 18px; color: var(--strong); line-height: 1.1; }
.af-rail-name { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.af-rail small { display: block; font-size: 13px; }
.af-rail h3 a { color: var(--strong); }
.astrip { margin: 2px -16px; padding: 10px 0 4px; }
.astrip-item { flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); color: var(--text); }
.astrip-item:hover { text-decoration: none; }
.astrip-pic { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.astrip-pic picture, .astrip-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.astrip-pic .af-icon { font-size: 34px; }
.astrip-date { font-size: 12.5px; font-weight: 700; color: var(--link); padding: 6px 8px 0; }
.astrip-item .mstrip-title { padding: 2px 8px 0; margin-bottom: 8px; }
@media (max-width: 760px) {
  .af-title h1 { font-size: 24px; }
  .af-when { width: 100%; overflow-x: auto; }
  .af-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .af-chips::-webkit-scrollbar { display: none; }
  .af-chips .chip { white-space: nowrap; }
  .af-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .af-name { font-size: 14.5px; }
  .af-body { padding: 10px; }
  .af-date { left: 6px; bottom: 6px; font-size: 12px; }
  .af-top { flex-direction: column; }
  .af-poster { flex: none; width: 100%; }
  .af-poster img { max-height: 62vh; object-fit: contain; }
  .af-card { padding: 16px; }
  .af-info h1 { font-size: 23px; }
  .af-facts { grid-template-columns: 90px 1fr; }
}
/* Afisha, stage 2: «Пойду», following, the organiser's mark, the event form, «Моя афиша» */
.af-org { margin: 0 0 10px; }
.af-going { color: var(--live); border-color: var(--live); }
.af-going-n { font-size: 14px; margin: 10px 0 0; }
.af-follow { margin: 10px 0 0; }
.af-follow .linkish { font-weight: 650; color: var(--link); }
.af-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.af-subs { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.af-subs li { display: flex; gap: 12px; align-items: baseline; }
.af-subs form { margin: 0; }
.af-event .comments { margin-top: 0; }
@media (max-width: 760px) { .af-form-row { grid-template-columns: 1fr; gap: 0; } }
/* Afisha, stage 3: cinema (films with sessions), «Рекомендуем», «Реклама», a partner's tile, raising an event */
.af-film { display: flex; gap: 18px; padding: 16px; }
.af-film-poster { flex: 0 0 150px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--chip); display: block; }
.af-film-poster picture, .af-film-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.af-film-info { flex: 1; min-width: 0; }
.af-film-info h2 { margin: 0 0 4px; font-size: 21px; line-height: 1.25; }
.af-film-info h2 a { color: var(--strong); }
.af-film-meta { margin: 0 0 10px; font-size: 14px; }
.af-sessions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.af-cinema { flex: 0 0 100%; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.af-session { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 6px 10px; border-radius: 10px;
  background: var(--chip); color: var(--strong); line-height: 1.2; }
.af-session:hover { text-decoration: none; background: var(--brand); color: var(--brand-ink); }
.af-session b { font-size: 17px; }
.af-session small { font-size: 11.5px; color: inherit; opacity: .8; max-width: 120px; text-align: center; }
.af-film-day { margin: 16px 0 4px; font-size: 16px; }
.af-poster-film { flex-basis: 300px; }
.af-trailer { margin-top: 18px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.af-trailer iframe { width: 100%; height: 100%; border: 0; display: block; }
.af-promo .af-day-h b { color: var(--brand); }
.af-partner .af-pic { background: var(--card); }
.af-partner .af-pic img { object-fit: contain; }
.af-promo-box { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 14.5px; }
.af-promo-box p { margin: 0; }
.af-promo-btns { display: inline-flex; gap: 8px; margin-left: 6px; vertical-align: middle; }
.af-promo-btns .btn { height: 34px; }
@media (max-width: 760px) {
  .af-film { gap: 12px; padding: 12px; }
  .af-film-poster { flex-basis: 96px; }
  .af-film-info h2 { font-size: 17px; }
  .af-session { min-width: 64px; padding: 5px 8px; }
  .af-promo-btns { display: flex; margin: 8px 0 0; }
}

/* «Установить на телефон» (core/_install.html, site.js): the bar over the bottom bar, the row in the menu, the footer link */
.install-bar[hidden], [data-install][hidden] { display: none !important; }
.install-bar { display: none; }
.install-link { color: var(--muted); font-size: 14px; text-decoration: none; }
.install-link:hover { color: var(--strong); }
.ios-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; color: var(--text); }
.ios-steps svg { vertical-align: -4px; color: var(--link); }
.ios-note { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .install-bar { position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 19;
    display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: 16px;
    background: var(--card); box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
  .install-bar img { flex: 0 0 auto; border-radius: 10px; }
  .install-bar > span { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.3; color: var(--strong); }
  .install-bar b, .install-bar small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .install-bar small { font-size: 12px; color: var(--muted); }
  .install-bar .btn { flex: 0 0 auto; height: 38px; padding: 0 10px; font-size: 13px; }
  .install-bar .sd-close { width: 36px; height: 38px; }
  body.has-install-bar main.wrap { padding-bottom: 180px; }
  body.has-install-bar .fab { bottom: calc(150px + env(safe-area-inset-bottom)); }
}

/* «Впервые на STENA.ee?» — the invitation to the cartoon /guide (base.html, site.js) */
.guide-card[hidden] { display: none; }
.guide-card { position: fixed; right: 20px; bottom: 20px; z-index: 19; display: flex; align-items: center; gap: 12px; width: 400px;
  max-width: calc(100% - 20px); padding: 10px 10px 10px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35); animation: guide-card .5s cubic-bezier(.3, 1.3, .5, 1) both; }
@keyframes guide-card { from { opacity: 0; transform: translateY(30px); } }
.guide-card img { flex: 0 0 auto; width: 40px; height: auto; margin-top: -26px; animation: guide-wave 2.4s ease-in-out .6s 2; transform-origin: 50% 100%; }
@keyframes guide-wave { 25% { transform: rotate(-8deg); } 50% { transform: translateY(-4px); } 75% { transform: rotate(6deg); } }
.guide-card > span { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.3; color: var(--strong); }
.guide-card b, .guide-card small { display: block; }
.guide-card small { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.guide-card .btn { flex: 0 0 auto; height: 38px; padding: 0 14px; font-size: 14px; }
.guide-card .sd-close { width: 36px; height: 38px; }
@media (max-width: 760px) {
  .guide-card { left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; max-width: none; gap: 10px; padding-left: 10px; }
}
@media (prefers-reduced-motion: reduce) { .guide-card, .guide-card img { animation: none; } }

/* «Уведомления о новостях» (news/_push_form.html, site.js) */
.push-form [hidden] { display: none !important; }
.push-ask { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line);
  border-radius: 14px; background: transparent; color: var(--link); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.push-ask svg { flex: 0 0 auto; color: var(--brand); }
.push-ask:hover { border-color: var(--brand); }
.push-form fieldset { margin: 0 0 14px; padding: 0; border: 0; }
.push-form fieldset:disabled, .push-opt.is-off { opacity: .45; }
.push-form fieldset fieldset { margin: 4px 0 0; }
.push-form legend { margin-bottom: 8px; padding: 0; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.push-form legend small { font-weight: 400; text-transform: none; letter-spacing: 0; }
.push-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 14px;
  color: var(--strong); font-weight: 600; cursor: pointer; }
.push-opt input { margin-top: 3px; accent-color: var(--brand); }
.push-opt small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.push-opt select { width: auto; font: inherit; font-weight: 600; color: var(--strong); background: var(--chip); border: 1px solid var(--line); border-radius: 8px; padding: 2px 4px; }
.push-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.push-chips label { cursor: pointer; }
.push-chips input { position: absolute; opacity: 0; pointer-events: none; }
.push-chips span { display: inline-block; padding: 6px 12px; border-radius: 10px; background: var(--chip); font-size: 14px; font-weight: 600; color: var(--strong); }
.push-chips input:checked + span { background: var(--soft); color: var(--link); box-shadow: inset 0 0 0 1.5px var(--brand); }
.push-chips input:focus-visible + span { outline: 2px solid var(--brand); }
.push-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.push-note { margin: 0 0 12px; color: var(--text); }
.push-note.warn { color: var(--red); }
.push-on { margin: 0 0 12px; font-weight: 600; color: var(--strong); }
.push-msg { margin: 10px 0 0; min-height: 1.4em; color: var(--muted); font-size: 14px; }

/* Editors on the site (news.staff): «⋯» of a comment, hidden comments, the front-page tools, drafts */
.c-hidden { background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--chip) 10px 12px); }
/* greyed by parts, not the whole comment: opacity on it would trap the «⋯» menu under the next comment */
.c-hidden > .c-head, .c-hidden > .c-text, .c-hidden > .c-low, .c-hidden > .c-foot > .c-vote { opacity: .55; }
.c:has(> .c-foot > .c-mod[open]), .c:has(> .c-foot > .c-complain[open]) { position: relative; z-index: 30; }
.hb-toggle { display: block; width: 100%; margin: 6px 0; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 10px; text-align: left;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--chip) 10px 12px); color: var(--muted); font: inherit;
  font-size: 13px; cursor: pointer; scroll-margin-top: 90px; }
.hb-toggle span { color: var(--link); font-weight: 600; }
.c-hidden-mark { color: var(--red); font-size: 12px; font-weight: 700; }
.c-mod, .c-complain { position: relative; margin-left: auto; }
.c-complain + .c-mod { margin-left: 0; }
.c-mod > summary, .c-complain > summary { list-style: none; cursor: pointer; color: var(--muted); font-weight: 700; padding: 2px 10px; border-radius: 8px; }
.c-mod > summary::-webkit-details-marker, .c-complain > summary::-webkit-details-marker { display: none; }
.c-mod > summary:hover, .c-mod[open] > summary, .c-complain > summary:hover, .c-complain[open] > summary { background: var(--chip); color: var(--strong); }
.c-complain > summary { font-weight: 400; }
.c-complain.sent > summary { color: var(--red); cursor: default; }
.c-mod-menu { position: absolute; right: 0; top: 100%; z-index: 20; min-width: 220px; display: flex; flex-direction: column; gap: 2px;
  padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.c-mod-menu button, .c-mod-menu a { border: 0; background: none; color: var(--strong); font: inherit; font-size: 14px; text-align: left;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.c-mod-menu button:hover, .c-mod-menu a:hover { background: var(--chip); }
.c-mod-menu a { color: var(--link); }
.c-mod-label { color: var(--muted); font-size: 12px; padding: 6px 10px 0; }
.c-mod-row { display: flex; flex-wrap: wrap; }
.c-mod-row button { padding: 8px; color: var(--red); }
.c-switch { font-size: 13px; color: var(--muted); }
.ed-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin: 10px 0 0; padding: 4px; overflow-x: auto;
  scrollbar-width: none; border: 1px dashed var(--line); border-radius: 10px; font-size: 13px; line-height: 1; }
.ed-tools::-webkit-scrollbar { display: none; }
.ed-tools > * { flex: none; height: 30px; display: inline-flex; align-items: center; justify-content: center; margin: 0;
  padding: 0 10px; border: 0; border-radius: 8px; background: var(--chip); color: var(--strong); font: inherit; font-size: 13px;
  font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none; }
.ed-tools > :hover { color: var(--link); }
.ed-tools select { appearance: auto; padding: 0 4px 0 8px; }
.ed-tools [data-ed-act="up"], .ed-tools [data-ed-act="down"] { width: 30px; padding: 0; font-size: 16px; }
.ed-tools .ed-place { background: none; color: var(--muted); cursor: default; padding: 0 4px 0 6px; }
.ed-tools .ed-place:hover { color: var(--muted); }
.ed-tools .on { color: var(--brand); }
.ed-tools a { margin-left: auto; width: 34px; padding: 0; font-size: 15px; }
.ed-tools.busy { opacity: .5; pointer-events: none; }
@media (max-width: 760px) {
  .pcard .ed-tools { grid-column: 1 / -1; }
  /* A phone card opens by a tap on the picture or the lead too: the title's link covers the card; the reactions, share,
     comments and the editors' tools stay above it (grid items, so z-index works without moving the emoji picker's box) */
  .pcard .post-main h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
  .pcard > .post-side, .pcard .ed-tools { z-index: 2; }
}
.drafts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.drafts-head h1 { margin: 0; font-size: 22px; }
.edit-delete { margin: 16px 0 90px; }
.btn.danger { color: var(--red); border-color: var(--red); }

/* A news card opens by a tap anywhere on it, not only on the title: the title's link covers the card */
.card { position: relative; }
.card h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

/* «Читать по-эстонски» over a translated news (keel app; the rest of its styles are in keel/keel.css) */
.keel-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 2px 0 14px; }
.keel-bar .btn { height: 36px; font-weight: 600; }
.keel-flag { width: 18px; height: 12px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px var(--line);
  background: linear-gradient(#0072ce 0 33.4%, #000 0 66.7%, #fff 0); }
.keel-game-link { font-size: 14px; color: var(--muted); }
.keel-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0; }
.keel-pick > span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.keel-pick .btn { height: 36px; }
/* Price lists of /reklama (templates/core/advertise.html): stays a table on phones, prices kept on one line. */
.price-table { margin: 4px 0 12px; }
.price-table th { padding: 0 8px 6px 0; text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; }
.price-table td + td, .price-table th + th { text-align: right; white-space: nowrap; font-weight: 700; }
.price-table small { color: var(--muted); font-size: 13px; line-height: 1.4; }
@media (max-width: 760px) {
  .price-table tr { display: table-row; }
  .price-table td, .price-table th { display: table-cell; padding: 8px 6px 8px 0; border-top: 1px solid var(--line); }
  .price-table th { border-top: 0; }
}

/* Footer pages: the editors' link on the page and the page editor (core.pages) */
.cm-edit { width: 100%; max-width: 760px; margin: 0 auto -6px; font-size: 14px; text-align: right; }
.page-edit-bar { position: sticky; top: 64px; z-index: 5; padding: 0 18px; }
.page-edit-bar .editor-bar { position: static; margin: 0; border: 0; background: none; }
.page-edit-bar .warn { margin: 0 0 10px; }
@media (max-width: 760px) { .page-edit-bar { top: 62px; } }
.page-editor { min-height: 40vh; }
.page-editor .cm-page:focus, .page-editor:focus { outline: none; }
.tpl-mark { padding: 0 4px; border-radius: 5px; background: var(--chip); color: var(--muted); font: 12px/1.6 ui-monospace, Consolas, monospace;
  white-space: nowrap; user-select: all; }
/* badges with tiers (community.karma.BADGES): t1 bronze, t2 silver, t3 gold; the chosen one by the name in comments */
.t1 { --tier: #b87333; } .t2 { --tier: #9aa4b1; } .t3 { --tier: #d4a20b; }
.c-bd { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px;
  line-height: 1; margin-left: 4px; vertical-align: middle; cursor: help; border: 1px solid var(--tier, var(--line));
  background: color-mix(in srgb, var(--tier, var(--soft)) 18%, var(--card)); }
.who .c-bd { width: 18px; height: 18px; font-size: 11px; }
.c-day { margin-left: 6px; font-size: 11px; font-weight: 700; color: color-mix(in srgb, #c99a06 70%, var(--strong)); border: 1px solid #d4a20b; padding: 0 6px;
  border-radius: 6px; line-height: 16px; background: color-mix(in srgb, #d4a20b 14%, var(--card)); white-space: nowrap; }
.c-day:hover { text-decoration: none; filter: brightness(1.1); }
.cm-bdg { border: 1px solid var(--tier, transparent); }
.cm-bdg small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.cm-bdg em { font-style: normal; font-size: 11px; font-weight: 700; color: #9b51e0; margin-left: 2px; }
.cm-bdg.t1, .cm-bdg.t2, .cm-bdg.t3 { background: color-mix(in srgb, var(--tier) 16%, var(--card)); }
.cm-badge-list li { line-height: 1.6; }
.cm-steps { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 6px; }
.cm-step { font-size: 12px; padding: 0 7px; border-radius: 8px; border: 1px solid var(--tier);
  background: color-mix(in srgb, var(--tier) 14%, var(--card)); white-space: nowrap; }
.cm-step small { color: var(--muted); }
.cotd { border: 1px solid color-mix(in srgb, #d4a20b 45%, var(--line)); }
.cotd h2, .cotd h3 { display: flex; align-items: center; gap: 6px; }
.cotd h2 a, .cotd h3 a { color: inherit; }
.feed > .cotd { padding: 14px 16px; }
.feed > .cotd h2 { margin: 0 0 10px; font-size: 17px; }
