/* TheiPadFan
   Gray field like an iPad home screen, white widgets, system blue.
   Violet is a tick, not a theme. No gradients.
*/

:root {
  --bg: #e4e4ea;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #8e8e93;
  --line: #d2d2d7;
  --line-strong: #b7b7c0;
  --blue: #007aff;
  --blue-d: #0040dd;
  --violet: #5e5ce6;
  --violet-bg: #eeedfe;
  --ok: #1b7a34;
  --ok-bg: #e4f6e9;
  --bad: #c41a16;
  --bad-bg: #fdeceb;
  --wait: #8a5a00;
  --wait-bg: #fff4e0;
  --chip: #f2f2f7;
  --shadow: 0 1px 2px rgba(28, 28, 30, .06);
  --r: 15px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --dock: 58px;
  --wrap: 1120px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1c1c1e;
  --card: #2c2c2e;
  --ink: #f5f5f7;
  --muted: #98989d;
  --faint: #8e8e93;
  --line: #3a3a3c;
  --line-strong: #636366;
  --blue: #0a84ff;
  --blue-d: #7cbcff;
  --violet: #bf5af2;
  --violet-bg: #322848;
  --ok: #30d158;
  --ok-bg: #17331f;
  --bad: #ff6961;
  --bad-bg: #3d2220;
  --wait: #ffd60a;
  --wait-bg: #3a3114;
  --chip: #3a3a3c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

/* OS dark, until someone hits the toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1c1e;
    --card: #2c2c2e;
    --ink: #f5f5f7;
    --muted: #98989d;
    --faint: #8e8e93;
    --line: #3a3a3c;
    --line-strong: #636366;
    --blue: #0a84ff;
    --blue-d: #7cbcff;
    --violet: #bf5af2;
    --violet-bg: #322848;
    --ok: #30d158;
    --ok-bg: #17331f;
    --bad: #ff6961;
    --bad-bg: #3d2220;
    --wait: #ffd60a;
    --wait-bg: #3a3114;
    --chip: #3a3a3c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  min-width: 0;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; }

button, input, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, p { margin-top: 0; }

h1 {
  font-size: 1.7rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  overflow-wrap: anywhere;
}

h2 { font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: 1.05rem; line-height: 1.3; }

a { color: var(--blue-d); }
a:hover { text-decoration: none; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

::selection { background: var(--violet); color: #fff; }

.u-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* without JS the inactive tab panels still read in order */
html:not(.js) [role="tabpanel"][hidden] {
  display: block !important;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--card);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 80;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- chrome ---------- */

.top {
  position: sticky; /* sticky, не fixed: иначе iOS прячет строку при скролле криво */
  top: 0;
  z-index: 20;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.top__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-height: 52px;
  padding: 8px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 17px;
  min-width: 0;
}

.brand__name { white-space: nowrap; }
.brand__mark {
  width: 32px;
  height: 32px;
  display: block;
  flex: none;
  filter: drop-shadow(0 0 0.5px rgba(0, 0, 0, .22));
}

.slogan {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  flex: 1;
  min-width: 0;
}

.burger {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
}

.top__side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.themebtn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--ink);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.themebtn svg { display: block; }
.themebtn .themebtn__sun { display: none; }
:root[data-theme="dark"] .themebtn .themebtn__moon { display: none; }
:root[data-theme="dark"] .themebtn .themebtn__sun { display: block; }

.userbox { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.signin { font-weight: 600; font-size: 14px; text-decoration: none; }

.who {
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.who__name { display: none; }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--violet-bg);
  color: var(--violet);
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}
.avatar--lg { width: 64px; height: 64px; font-size: 20px; }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
}

.bellwrap { position: relative; }
.bellbtn {
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
}
.bellwrap__n {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--bad);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.belldrop {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  top: 58px;
  width: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
  z-index: 30;
  padding: 6px 0 0;
}
.bellwrap:hover .belldrop,
.bellwrap:focus-within .belldrop,
.bellwrap.is-open .belldrop { display: block; }
.belldrop ul { list-style: none; margin: 0; padding: 0; }
.belldrop li a {
  display: block;
  padding: 8px 12px 2px;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
}
.belldrop time {
  display: block;
  padding: 0 12px 8px;
  color: var(--faint);
  font-size: 11px;
}
.belldrop li.is-new { background: var(--violet-bg); }
.belldrop__all {
  display: block;
  text-align: center;
  padding: 10px;
  border-top: 1px solid var(--line);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

.rubrics ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 2px;
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
}
.rubrics a {
  display: inline-block;
  padding: 6px 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  border-radius: 8px;
}
.rubrics a:hover { background: var(--chip); }
.rubrics a[aria-current="page"] {
  color: var(--blue);
  box-shadow: inset 0 -2px 0 var(--violet);
  border-radius: 0;
  background: transparent;
}

.js .rubrics { display: none; }
.js body.nav-open .rubrics {
  display: block;
  border-top: 1px solid var(--line);
  max-height: calc(100vh - 64px - var(--dock));
  overflow: auto;
}
.js body.nav-open .rubrics ul { flex-direction: column; padding: 6px 10px 12px; }

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  min-height: var(--dock);
}
.dock a {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-decoration: none;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 0;
}
.dock a[aria-current="page"] { color: var(--blue); }
.dock svg { width: 22px; height: 22px; display: block; }
.burger svg, .bellbtn svg, .sheet__x svg, .shotx svg, .reel__nav svg { display: block; }
.cmt__tools svg { display: inline-block; vertical-align: -3px; margin-right: 3px; }
.cmt__tools button.is-on svg path { fill: currentColor; fill-opacity: 1; }
.btn .ico { display: inline-block; vertical-align: -3px; margin-right: 5px; }

.wrap {
  width: min(var(--wrap), calc(100% - 28px));
  margin: 0 auto;
  padding-top: 18px;
  padding-bottom: calc(var(--dock) + 28px);
}

.foot {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.foot a { color: var(--muted); }
.foot p { margin: 10px 0 0; }

.totop {
  display: none;
  position: fixed;
  right: 12px;
  bottom: calc(var(--dock) + 12px);
  z-index: 24;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.js .totop.is-in { display: inline-block; }

/* ---------- home ---------- */

.lede { max-width: 68ch; margin: 2px 0 6px; }
.lede h1 { margin-bottom: 10px; }
.lede p { margin: 0 0 10px; }
.lede ul { margin: 0 0 12px; padding-left: 1.15em; }
.lede li { margin: 3px 0; }
.lede__count { color: var(--muted); font-size: 13px; }

.band {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 26px 0 10px;
}
.band h2 { margin: 0; font-size: 1.2rem; }
.band a { font-size: 14px; font-weight: 600; text-decoration: none; }
.band p { margin: 0; color: var(--muted); font-size: 14px; }

.picks__row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 78%);
  gap: 10px;
  overflow-x: auto;
  max-width: 100%;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  list-style: none;
  margin: 0;
  padding-left: 0;
}
.pick {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--violet);
  border-radius: 16px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  min-height: 96px;
}
.pick img { width: 56px; height: 56px; border-radius: 14px; }
.pick__kicker {
  display: block;
  color: var(--violet);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pick__name { display: block; font-weight: 700; overflow-wrap: anywhere; }
.pick__why { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.apps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.apps--bento { grid-auto-flow: dense; }
.apps > * { min-width: 0; }

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r); /* 14 на плотных, 15 по умолчанию */
  padding: 12px;
  text-decoration: none;
  color: inherit;
}
.app:hover { border-color: var(--line-strong); }
.app__icon {
  width: 44px;
  height: 44px;
  border-radius: 22%; /* ~ squircle, без clip-path: старый webkit его режет */
  flex: 0 0 auto;
}
.app__main { min-width: 0; display: flex; flex-direction: column; gap: 3px; width: 100%; }
.app__name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.app__line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}
.app__ver { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.app__ipad {
  color: var(--violet);
  background: var(--violet-bg);
  border-radius: 99px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
}
.app__size {
  background: var(--chip);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
.app__fresh {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}
.app__blurb { display: none; color: var(--muted); font-size: 13px; }
.app--wide { grid-column: span 2; flex-direction: row; align-items: center; }
.app--wide .app__icon,
.app--tall .app__icon { width: 56px; height: 56px; }
.app--wide .app__blurb,
.app--tall .app__blurb { display: block; }
.app--tall { grid-row: span 2; align-self: stretch; }
.app--wide { box-shadow: var(--shadow); }

.catalog__range { color: var(--muted); font-size: 13px; margin: 0 0 10px; }

/* ---------- program ---------- */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs li:not(:last-child)::after { content: "›"; margin: 0 6px; color: var(--faint); }

.prohead {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.prohead img { width: 64px; height: 64px; border-radius: 16px; }
.prohead h1 { font-size: 1.45rem; margin: 0 0 4px; }
.prohead .kicker { margin: 0 0 4px; }
.prohead .meta { margin: 0; color: var(--muted); font-size: 13px; }
.catlink {
  display: inline-block;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--chip);
  border-radius: 99px;
  padding: 2px 8px;
}

.buybar { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}
.btn:hover { border-color: var(--line-strong); }
.btn:focus-visible { outline-offset: 3px; }
.btn--primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-d); color: #fff; }
.buybar .btn.is-on {
  color: var(--violet);
  border-color: var(--violet);
  background: var(--violet-bg);
}

.specs {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 14px;
  margin: 0 0 16px;
}
.specs div {
  display: grid;
  grid-template-columns: minmax(108px, 42%) 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.specs div:last-child { border-bottom: 0; }
.specs dt { margin: 0; color: var(--muted); }
.specs dd { margin: 0; overflow-wrap: anywhere; }

.reel { position: relative; margin: 0 0 16px; }
.reel__scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  max-width: 100%;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; /* safari: иначе прыгает */
  padding-bottom: 4px;
}
.reel figure {
  position: relative;
  flex: 0 0 88%;
  margin: 0;
  scroll-snap-align: start;
  min-width: 0;
}
.reel img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--chip);
}
.reel figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.reel__nav { display: flex; gap: 6px; margin-bottom: 8px; }
.reel__nav button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  color: var(--ink);
}
.shotx {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  min-width: 32px;
  min-height: 32px;
  cursor: pointer;
}
.reel figure.is-open {
  position: fixed;
  inset: 12px;
  z-index: 45;
  flex: none;
  background: var(--card);
  border-radius: 16px;
  padding: 42px 12px 12px;
  overflow: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
}
.reel figure.is-open .shotx { display: inline-flex; align-items: center; justify-content: center; }
.reel figure.is-open img { max-height: calc(100vh - 110px); object-fit: contain; width: 100%; }

.tabbar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 12px;
  overflow-x: auto;
  max-width: 100%;
}
.tabbar button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 12px;
  margin-bottom: -1px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
}
.tabbar button[aria-selected="true"] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.prose { font-size: 16px; line-height: 1.65; }
.prose h2 { margin: 1.4em 0 .4em; font-size: 1.28rem; }
.prose h3 { margin: 1.2em 0 .35em; }
.prose p { margin: 0 0 .9em; }
.prose ul, .prose ol { margin: 0 0 .9em; padding-left: 1.2em; }
.prose li { margin: .25em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 1em; }
.prose th, .prose td {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.prose th { font-size: 12px; color: var(--muted); font-weight: 700; }
.prose code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--chip);
  padding: 0 .28em;
  border-radius: 4px;
}
.prose pre {
  overflow-x: auto;
  max-width: 100%;
  padding: 12px 14px;
  background: var(--chip);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.prose pre code { background: none; padding: 0; }
.prose blockquote {
  margin: 0 0 1em;
  padding: 0 0 0 12px;
  border-left: 3px solid var(--violet);
  color: var(--muted);
}

.faq { margin: 18px 0; }
.faq h2 { margin-bottom: 8px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; }

.akin { margin: 8px 0 18px; }
.akin h2 { margin-bottom: 8px; }
.akin__row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  max-width: 100%;
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
}
.akin__row a {
  width: 84px;
  flex: 0 0 auto;
  text-align: center;
  text-decoration: none;
  color: inherit;
  font-size: 11px;
  font-weight: 600;
}
.akin__row img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0 auto 4px;
}
.akin__row span {
  display: block;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.talk { margin: 20px 0; }
.talk__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.talk__bar h2 { margin: 0; }
.talk__n { color: var(--muted); font-weight: 500; font-size: .85em; }
.talk__sort { display: flex; gap: 6px; }
.talk__sort button {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  padding: 4px;
}
.talk__sort button.is-on { color: var(--blue); }

.gate {
  background: var(--violet-bg);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 12px;
}
.gate a { font-weight: 600; }

.cform label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.cform textarea,
.field input,
.field textarea,
.find input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 42px;
}
.cform textarea { min-height: 96px; resize: vertical; }
.cform__hint { color: var(--muted); font-size: 13px; margin: 6px 0; }
.cform__err, .field__err { color: var(--bad); font-size: 13px; margin: 4px 0 0; }
.cform .btn { margin-top: 8px; }
.cform--reply { margin-top: 8px; }
.cform--reply textarea { min-height: 64px; }
.trap {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.clist { list-style: none; margin: 12px 0 0; padding: 0; }
.clist > li {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.cmt { flex: 1; min-width: 0; }
.cmt header { font-size: 13px; margin-bottom: 4px; }
.cmt header strong { font-weight: 700; }
.cmt time { color: var(--faint); margin-left: 6px; }
.cmt p { margin: 0 0 6px; overflow-wrap: anywhere; }
.cmt__tools { display: flex; gap: 12px; align-items: center; }
.cmt__tools button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}
.cmt__tools button.is-on { color: #ff375f; }
.replies { list-style: none; margin: 8px 0 0; padding: 0 0 0 0; }
.replies li {
  display: flex;
  gap: 8px;
  padding-top: 8px;
}
.is-held { opacity: .55; }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--chip);
  color: var(--muted);
  margin-left: 6px;
}
.badge--wait { background: var(--wait-bg); color: var(--wait); }
.badge--no { background: var(--bad-bg); color: var(--bad); }

.empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 15px;
  padding: 18px 14px;
  color: var(--muted);
}
.empty p { margin: 0 0 8px; }
.empty p:last-child { margin: 0; }
.empty-shots { min-height: 96px; }

/* ---------- dialog ---------- */

.sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
}
.sheet:target,
.sheet.is-open { display: block; }
.sheet__bg {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 22, .48);
}
.sheet__card {
  position: relative;
  z-index: 1;
  width: min(540px, calc(100% - 24px));
  max-height: min(84vh, 720px);
  overflow: auto;
  margin: 6vh auto;
  background: var(--card);
  color: var(--ink);
  border-radius: 16px;
  padding: 16px 16px 18px;
}
.sheet__x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
}
.sheet__card h2 { padding-right: 36px; margin-bottom: 8px; }
.sheet ol, .sheet ul { padding-left: 1.15em; }
.mirrors { margin-top: 14px; }
.mirrors h3 { margin-bottom: 6px; }
.mirrors .btn { margin: 0 8px 8px 0; }
.vlist { list-style: none; padding: 0; margin: 0; }
.vlist li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.vlist a { font-weight: 600; }

/* ---------- lists, forms, account ---------- */

.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 16px 0 4px; }
.pager a, .pager span {
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}
.pager a[aria-current="page"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 700;
}
.pager .pager__step { padding: 0 12px; }

.doc { max-width: 70ch; }
.doc.center, .miss { max-width: 62ch; }

.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px 12px;
  margin: 0 0 16px;
}
.toc ol { margin: 0; padding-left: 1.2em; }
.toc a { text-decoration: none; }

.auth {
  max-width: 440px;
  margin: 8px auto 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 18px;
}
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; }
.check input { width: auto; min-height: 0; }
.auth .btn { width: 100%; }
.auth__links { margin: 12px 0 0; font-size: 14px; }
.banner { border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.banner--bad { background: var(--bad-bg); color: var(--bad); }
.banner--ok { background: var(--ok-bg); color: var(--ok); }
input[aria-invalid="true"] { border-color: var(--bad); }

.idcard { display: flex; gap: 12px; align-items: center; margin: 0 0 14px; }
.idcard h1 { margin: 0 0 2px; font-size: 1.45rem; }
.idcard p { margin: 0; color: var(--muted); }

.acctabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 14px;
}
.acctabs a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 600;
}
.acctabs a[aria-current="page"] {
  color: var(--blue);
  border-bottom-color: var(--violet);
}

.notes { list-style: none; margin: 0; padding: 0; }
.notes li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.notes a { color: inherit; }
.notes time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.notes li.is-new a { font-weight: 700; }
.notes li.is-new::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 6px;
  flex: 0 0 auto;
}

.mine {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mine header { font-size: 14px; margin-bottom: 4px; }
.mine p { margin: 0; overflow-wrap: anywhere; }

.sample { margin-top: 18px; }
.sample summary { cursor: pointer; color: var(--muted); font-size: 13px; }

.find { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.find input { flex: 1 1 160px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 0 0; padding: 0; }
.chips a {
  display: inline-block;
  padding: 6px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 99px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
}

.miss h1, .boom h1 { margin-bottom: 8px; }

/* ========== media ========== */

@media (min-width: 720px) {
  .burger { display: none; }
  .js .rubrics { display: block; max-height: none; overflow: visible; border-top: 0; }
  .js body.nav-open .rubrics ul,
  .rubrics ul { flex-direction: row; }
  body.nav-open { overflow: auto; }
  .dock { display: none; }
  .wrap { padding-bottom: 48px; }
  .totop { bottom: 16px; }
  .who__name { display: inline; }
  .belldrop {
    position: absolute;
    left: auto;
    right: 0;
    top: calc(100% + 6px);
    width: 320px;
  }
  .band { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; }
  .apps { grid-template-columns: repeat(3, 1fr); }
  .app { flex-direction: row; align-items: center; }
  .app__icon { width: 56px; height: 56px; }
  .buybar { flex-direction: row; flex-wrap: wrap; }
  .buybar .btn { width: auto; }
  .reel figure { flex-basis: 68%; }
  .prohead h1 { font-size: 1.85rem; }
  .auth .btn { width: auto; }
}

@media (min-width: 1100px) {
  .slogan { display: block; }
  .top__bar, .rubrics ul {
    width: min(var(--wrap), calc(100% - 28px));
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }
  .lede h1 { font-size: 2rem; }
  .apps { grid-template-columns: repeat(4, 1fr); }
  .picks__row {
    grid-auto-flow: unset;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
  }
  .player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    column-gap: 22px;
    align-items: start;
  }
  .player__head { grid-column: 1; grid-row: 1; }
  .specs {
    grid-column: 2;
    grid-row: 1 / span 3;
    position: sticky;
    top: 76px;
  }
  .player__rest { grid-column: 1; grid-row: 2; min-width: 0; }
  .reel figure { flex-basis: 78%; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themebtn .themebtn__moon { display: none; }
  :root:not([data-theme="light"]) .themebtn .themebtn__sun { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reel__scroller { scroll-behavior: auto; }
}

/* ========== page tweaks ========== */

/* program: длинное имя не раздвигает ряд кнопок */
.program .buybar .btn { max-width: 100%; }
main, .picks, .picks__row, .reel, .akin, .player__rest, .tabbar { min-width: 0; }

/* категория чуть плотнее главной — там нет «виджетов» */
.catalog .app { box-shadow: none; border-radius: 14px; }

/* audit fixes: карточки мозаики выровнены по верху, отметка не сдвигает имя */
.app { justify-content: flex-start; }
.app--wide { align-items: flex-start; }
.app__fresh {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 12%, transparent);
}
.app--tall { align-items: flex-start; }
@media (min-width: 640px) { .app:has(.app__fresh) .app__main { padding-right: 58px; } }
@media (max-width: 639px) { .app__fresh { top: 8px; right: 8px; } }

/* seo: текст вступления после первого блока программ */
.home-about { margin-top: 32px; margin-bottom: 32px; }
.home-about__body { margin-top: 10px; }

/* сеть: шапка липнет (как в макете); поиск — «Spotlight» из шапки и из дока, с подсказками-иконками */
:root { --ctl: 36px; }
.spotpill { display: none; align-items: center; gap: 8px; height: var(--ctl); padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: var(--chip); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; flex: 0 1 260px; }
.spotpill:hover { color: var(--ink); }
.spotpill svg { flex: none; }
.signin { height: var(--ctl); display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; background: var(--blue); color: #fff !important; }
.signin:hover { background: var(--blue-d); }
.themebtn { height: var(--ctl); width: var(--ctl); padding: 0; display: inline-grid; place-items: center; }
.bellbtn { width: var(--ctl); height: var(--ctl); }
.who .avatar { width: var(--ctl); height: var(--ctl); }
.userbox .out { height: var(--ctl); padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.userbox .out:hover { border-color: var(--line-strong); }
.belldrop[hidden] { display: none !important; }
.burger { width: var(--ctl); height: var(--ctl); }
.dock button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; background: none; color: var(--faint); font: inherit; font-size: 10px; font-weight: 600; padding: 4px 0; cursor: pointer; }
.dock button[aria-expanded="true"] { color: var(--blue); }
.spot { position: fixed; inset: 0; z-index: 70; }
.spot__bg { position: absolute; inset: 0; background: rgba(28, 28, 30, .32); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.spot__card { position: relative; width: min(560px, calc(100% - 24px)); margin: 10vh auto 0; background: var(--card); border-radius: 20px; padding: 10px 14px 16px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); animation: spot-in .18s ease-out; }
@keyframes spot-in { from { transform: translateY(-14px); opacity: 0; } }
.spot__form { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 10px; border-radius: 12px; background: var(--chip); color: var(--muted); }
.spot__form input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 18px; appearance: none; outline: none; }
.spot__x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--line); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; }
.spot__k { margin: 14px 4px 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.spot__apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; }
.spot__apps a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); font-size: 11.5px; text-align: center; }
.spot__apps img, .spot__ph { width: 52px; height: 52px; border-radius: 13px; }
.spot__ph { display: grid; place-items: center; background: var(--violet-bg); color: var(--violet); font-weight: 700; font-size: 20px; }
.spot__apps span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.spot-on { overflow: hidden; }
@media (min-width: 720px) { .spotpill { display: inline-flex; margin-left: auto; } .top__side { margin-left: 0; } }
@media (max-width: 719px) { .who__name { display: none; } .top__side { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .spot__card { animation: none; } }
.buybar .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.buybar .btn--primary { font-weight: 700; }
.buybar .btn.is-on { color: var(--violet); border-color: var(--violet); background: var(--violet-bg); }

/* сеть: модалка открывается скриптом снятием hidden */
#dlg.sheet:not([hidden]) { display: block; }
.sheet .mirrors p { display: flex; flex-wrap: wrap; gap: 8px; }

/* сеть: текст во всю ширину рабочей области */
.lede, .prose, .home-about__body { max-width: none; }
.app__ph { display: grid; place-items: center; border-radius: 14px; background: var(--violet-bg); color: var(--violet); font-weight: 700; font-size: 22px; }
.cform { display: grid; gap: 8px; margin: 8px 0 14px; position: relative; }
.cform textarea { width: 100%; min-height: 100px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); padding: 10px 12px; font: inherit; }
.cform .btn { justify-self: start; }
.talk__bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.talk__bar h2 { margin: 0; }

/* сеть: «Stage Manager» — центральный снимок крупно, соседние сбоку уменьшены и повёрнуты */
.reel.is-staged { display: none; }
.stage { margin: 0 0 18px; outline-offset: 4px; }
.stage__deck { position: relative; aspect-ratio: 16 / 9; perspective: 1400px; overflow: hidden; border-radius: var(--r); background: var(--chip); }
.stage__card { position: absolute; top: 6%; left: 14%; width: 72%; height: 88%; padding: 0; border: 0; border-radius: 14px; background: var(--card); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45); overflow: hidden; cursor: pointer; transition: transform .35s cubic-bezier(.2, .7, .2, 1), opacity .35s ease, filter .35s ease; }
.stage__card img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--card); }
.stage__card[data-pos="center"] { transform: none; z-index: 3; cursor: zoom-in; }
.stage__card[data-pos="left"] { transform: translateX(-62%) scale(.72) rotateY(18deg); z-index: 2; filter: brightness(.92); }
.stage__card[data-pos="right"] { transform: translateX(62%) scale(.72) rotateY(-18deg); z-index: 2; filter: brightness(.92); }
.stage__card[data-far="true"] { opacity: 0; pointer-events: none; }
.stage.is-single .stage__card { left: 6%; width: 88%; }
.stage__dots { display: flex; justify-content: center; gap: 8px; margin: 10px 0 0; }
.stage__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line-strong); cursor: pointer; }
.stage__dots button[aria-current="true"] { background: var(--ink); width: 22px; border-radius: 4px; }
.stage__cap { margin: 6px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.stage.is-zoom .stage__deck { position: fixed; inset: 0; z-index: 80; aspect-ratio: auto; border-radius: 0; background: rgba(28, 28, 30, .92); }
.stage.is-zoom .stage__card[data-pos="center"] { top: 4%; left: 3%; width: 94%; height: 92%; cursor: zoom-out; }
.stage.is-zoom .stage__card:not([data-pos="center"]) { opacity: 0; }
@media (max-width: 719px) { .stage__card { left: 8%; width: 84%; } .stage__card[data-pos="left"] { transform: translateX(-74%) scale(.7); } .stage__card[data-pos="right"] { transform: translateX(74%) scale(.7); } }
@media (prefers-reduced-motion: reduce) { .stage__card { transition: none; } }
.spot__apps li { min-width: 0; }
.spot__apps a { min-width: 0; }
.spot__apps a > span:last-child { display: block; width: 100%; }
