/* Balloon — тёмный задачник команды. Глубокий графит + мятный цвет «Accepted». */

:root {
  color-scheme: dark;

  --bg: #090b10;
  --bg-2: #0c0f15;
  --surface: #11141b;
  --surface-2: #161a23;
  --surface-3: #1c212c;
  --sunken: #0d1016;
  --ink: #eef0f6;
  --ink-2: #a3a9ba;
  --ink-3: #6a7185;
  --line: rgb(255 255 255 / .07);
  --line-2: rgb(255 255 255 / .12);

  --mint: #34d399;
  --mint-hover: #4be0a8;
  --mint-ink: #6ff0bd;
  --mint-soft: rgb(52 211 153 / .13);
  --red: #ff5f6d;
  --red-ink: #ff8e98;
  --red-soft: rgb(255 95 109 / .13);
  --amber: #ffb547;
  --amber-soft: rgb(255 181 71 / .13);
  --violet: #a78bfa;
  --violet-soft: rgb(167 139 250 / .14);
  --sky: #60a5fa;
  --sky-soft: rgb(96 165 250 / .14);
  --grad: var(--mint);

  --code-bg: #0a0d12;
  --code-line: rgb(255 255 255 / .06);

  --font: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-card: 20px;
  --r-ctl: 11px;
  --r-tile: 9px;

  --shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 18px 40px -28px rgb(0 0 0 / .8);
  --shadow-lift: 0 1px 0 rgb(255 255 255 / .05) inset, 0 24px 50px -24px rgb(0 0 0 / .9), 0 0 0 1px rgb(52 211 153 / .12);
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-color: #2a303d transparent; scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: radial-gradient(1000px 600px at 105% -10%, rgb(52 211 153 / .04), transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgb(52 211 153 / .3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #232835; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

a { color: inherit; text-decoration: none; }
a.link { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a.link:hover { text-decoration-color: var(--mint); color: var(--ink); }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 8px; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }

.i { width: 20px; height: 20px; flex: none; }

.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.nums { font-variant-numeric: tabular-nums; }

.kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mint-ink); }
.kicker .i { width: 15px; height: 15px; }

kbd { font: 500 11.5px var(--font); padding: 2px 6px; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); box-shadow: inset 0 -1px 0 rgb(0 0 0 / .4); }

/* ---------- оболочка ---------- */

.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px 16px 18px;
  background: rgb(12 15 21 / .85);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 18px; font-weight: 700; font-size: 18px; letter-spacing: -.03em; }
.brand svg { width: 32px; height: 32px; flex: none; filter: drop-shadow(0 4px 14px rgb(52 211 153 / .25)); }

.search-btn {
  display: flex; align-items: center; gap: 10px;
  height: 40px; margin: 0 0 14px; padding: 0 8px 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--sunken); color: var(--ink-3);
  font: 500 14px var(--font); cursor: pointer; text-align: left;
  transition: border-color .15s, color .15s;
}
.search-btn .i { width: 17px; height: 17px; }
.search-btn span { flex: 1; }
.search-btn:hover { border-color: var(--line-2); color: var(--ink-2); }

.side__group { display: grid; gap: 2px; }
.side__group + .side__group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.side__caption { padding: 0 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

.side a.nav {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 12px;
  border-radius: var(--r-ctl);
  color: var(--ink-2);
  font-weight: 500;
  transition: background-color .15s, color .15s;
}
.side a.nav:hover { background: rgb(255 255 255 / .04); color: var(--ink); }
.side a.nav[aria-current="page"] { background: rgb(255 255 255 / .07); color: var(--ink); }
.side a.nav[aria-current="page"]::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.side a.nav[aria-current="page"] .i { color: var(--mint); }
.nav__count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); font: 600 12px var(--font); }

.side__foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 14px; }
.me { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border-radius: 14px; background: rgb(255 255 255 / .03); border: 1px solid var(--line); }
.me .icon-btn { width: 32px; height: 32px; flex: none; }
.me__text { min-width: 0; flex: 1; line-height: 1.25; }
.me__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__role { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me form { display: contents; }

.guest { display: grid; gap: 8px; }

/* узкая боковая панель на странице задачи */
.app--rail { grid-template-columns: 76px minmax(0, 1fr); }
.app--rail .side { padding-inline: 12px; align-items: center; }
.app--rail .brand { padding: 0 0 18px; }
.app--rail .brand span, .app--rail .nav span, .app--rail .side__caption, .app--rail .me__text, .app--rail .guest .btn span,
.app--rail .search-btn span, .app--rail .search-btn kbd, .app--rail .nav__count { display: none; }
.app--rail .search-btn { width: 46px; padding: 0; justify-content: center; }
.app--rail .side a.nav { width: 46px; justify-content: center; padding: 0; }
.app--rail .side a.nav[aria-current="page"]::before { left: -12px; }
.app--rail .side__group + .side__group { width: 100%; display: flex; flex-direction: column; align-items: center; }
.app--rail .me { padding: 6px; background: none; border: 0; flex-direction: column; }
.app--rail .guest .btn { width: 46px; padding: 0; }

.main { min-width: 0; padding: 30px 40px 72px; }
.page { max-width: 1200px; margin: 0 auto; }

/* ---------- элементы ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border: 0; border-radius: var(--r-ctl);
  background: var(--ink); color: #0a0c11;
  font: 600 14.5px/1 var(--font);
  white-space: nowrap; cursor: pointer;
  transition: background-color .15s, box-shadow .15s, transform .1s, filter .15s;
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn .i { width: 18px; height: 18px; }
.btn--mint { background: var(--mint); color: #04130d; }
.btn--mint:hover { background: var(--mint-hover); }
.btn--light { background: rgb(255 255 255 / .05); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--light:hover { background: rgb(255 255 255 / .09); }
.btn--soft { background: var(--surface-2); color: var(--ink); }
.btn--soft:hover { background: var(--surface-3); }
.btn--danger { background: transparent; color: var(--red-ink); box-shadow: inset 0 0 0 1px rgb(255 95 109 / .35); }
.btn--danger:hover { background: var(--red-soft); }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn--icon { width: 34px; padding: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px;
  border-radius: 999px;
  background: rgb(255 255 255 / .04);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
}
.chip .i { width: 15px; height: 15px; }
.chip--mint, .chip--live { background: var(--mint-soft); box-shadow: none; color: var(--mint-ink); }
.chip--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: live 1.6s ease-in-out infinite; }
.chip--amber { background: var(--amber-soft); box-shadow: none; color: var(--amber); }
.chip--violet { background: var(--violet-soft); box-shadow: none; color: var(--violet); }
.chip--sky { background: var(--sky-soft); box-shadow: none; color: var(--sky); }
.chip--fire { background: rgb(255 140 60 / .13); box-shadow: none; color: #ffa45c; }
@keyframes live { 50% { opacity: .35; } }

.avatar {
  --a: rgb(52 211 153 / .16); --a-ink: var(--mint-ink);
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--a); color: var(--a-ink);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06);
  font-weight: 600; font-size: 13.5px;
}
.avatar--sm { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.avatar--lg { width: 56px; height: 56px; border-radius: 18px; font-size: 19px; }
.avatar--xl { width: 84px; height: 84px; border-radius: 26px; font-size: 28px; }
.avatar[data-a="sky"] { --a: rgb(96 165 250 / .17); --a-ink: #93c5fd; }
.avatar[data-a="violet"] { --a: rgb(167 139 250 / .18); --a-ink: #c4b5fd; }
.avatar[data-a="amber"] { --a: rgb(255 181 71 / .16); --a-ink: #fcd34d; }
.avatar[data-a="rose"] { --a: rgb(255 95 109 / .16); --a-ink: #fda4af; }
.avatar[data-a="slate"] { --a: rgb(148 163 184 / .16); --a-ink: #cbd5e1; }

/* плитка задачи: буква + статус */
.tile {
  --t-bg: rgb(255 255 255 / .04); --t-fg: var(--ink); --t-ring: var(--line-2);
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border-radius: var(--r-tile);
  background: var(--t-bg); color: var(--t-fg);
  box-shadow: inset 0 0 0 1px var(--t-ring);
  font-weight: 600; font-size: 14px;
}
.tile--solved { --t-bg: var(--mint); --t-fg: #04130d; --t-ring: transparent; box-shadow: 0 0 14px -4px rgb(52 211 153 / .7); }
.tile--tried { --t-bg: var(--red-soft); --t-fg: var(--red-ink); --t-ring: rgb(255 95 109 / .35); }
.tile--lg { width: 48px; height: 48px; border-radius: 14px; font-size: 20px; }
.tile--sm { width: 26px; height: 26px; border-radius: 8px; font-size: 12.5px; }
.tile.is-pop { animation: pop .6s ease-out; }
@keyframes pop { from { background: var(--surface-3); color: var(--ink); } }

.tiles { display: flex; flex-wrap: wrap; gap: 6px; }

.bar { height: 6px; border-radius: 6px; background: rgb(255 255 255 / .06); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / .14); flex: none; }
.dot--mint { background: var(--mint); }
.dot--red { background: var(--red); }

/* ---------- заголовок страницы ---------- */

.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.phead h1 { font-size: 32px; letter-spacing: -.035em; }
.phead p { margin: 6px 0 0; color: var(--ink-2); max-width: 70ch; }
.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--ink-3); font-size: 14px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .i { width: 14px; height: 14px; }

.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- главная ---------- */

.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; gap: 24px;
  padding: 34px 36px;
  background: var(--surface);
}
.hero__body { min-width: 0; }
.hero h1 { font-size: 36px; letter-spacing: -.04em; }
.hero p { margin: 10px 0 0; max-width: 60ch; color: var(--ink-2); font-size: 16px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero__visual { position: relative; width: 280px; height: 280px; justify-self: end; display: grid; place-items: center; }
.hero__art { position: relative; width: 230px; height: 230px; object-fit: contain; cursor: pointer; transition: transform .4s ease; }
.hero__art:hover { transform: rotate(-4deg) scale(1.03); }
.hero__visual::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgb(255 255 255 / .13), rgb(52 211 153 / .07) 65%, transparent); }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring__track { stroke: rgb(255 255 255 / .06); }
.ring__value { stroke: var(--mint); stroke-linecap: round; animation: ring 1.4s cubic-bezier(.2, .8, .2, 1) .2s both; }
@keyframes ring { from { stroke-dasharray: 0 100; } }

.meter { margin-top: 24px; max-width: 560px; }
.meter__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; font-size: 14.5px; }
.meter__head b { font-size: 20px; font-weight: 700; }
.meter__pct { font-size: 14px; font-weight: 600; color: var(--mint-ink); }
.meter__bar { display: flex; height: 10px; border-radius: 10px; background: rgb(255 255 255 / .06); overflow: hidden; }
.meter__bar i { display: block; height: 100%; transform-origin: left center; animation: grow 1.1s cubic-bezier(.2, .8, .2, 1) .2s both; }
.meter__solved { background: var(--mint); }
.meter__tried { background: rgb(255 95 109 / .65); }
.meter__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.meter__legend span { display: inline-flex; align-items: center; gap: 7px; }

.minis { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.mini { display: flex; align-items: center; gap: 12px; min-width: 150px; padding: 10px 16px 10px 12px; border-radius: 14px; background: rgb(255 255 255 / .03); border: 1px solid var(--line); }
.mini > .i { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgb(255 255 255 / .05); color: var(--ink-2); }
.mini b { display: block; font-size: 18px; font-weight: 700; line-height: 1.15; }
.mini span { font-size: 12.5px; color: var(--ink-3); }
.mini--fire > .i { background: rgb(255 140 60 / .15); color: #ffa45c; filter: drop-shadow(0 0 8px rgb(255 140 60 / .45)); }
.mini--fire b { color: #ffb37a; }

.dash { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; margin-top: 30px; align-items: start; }
.dash--single { grid-template-columns: minmax(0, 1fr); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.block-head h2 { font-size: 19px; }
.block-head__tools { display: flex; align-items: center; gap: 8px; }

.finder { position: relative; display: inline-flex; align-items: center; }
.finder .i { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.finder input { width: 210px; height: 34px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--sunken); color: var(--ink); font: 400 14px var(--font); transition: border-color .15s, width .2s; }
.finder input:focus { outline: none; border-color: rgb(52 211 153 / .5); width: 250px; }
.finder__empty { margin: 14px 2px; }

.contests { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.ccard { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.ccard--done { border-color: rgb(52 211 153 / .18); }
.ccard__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ccard__people { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.ccard__people .i { width: 15px; height: 15px; }
.ccard h3 { font-size: 18px; }
.ccard__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ccard__balloon { width: 30px; height: auto; flex: none; margin: -4px -2px -8px 0; transform: rotate(8deg); filter: drop-shadow(0 6px 10px rgb(0 0 0 / .5)); }
.ccard__desc { margin: -6px 0 0; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ccard__foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 4px; font-size: 13px; color: var(--ink-3); }
.ccard__foot .bar { flex: 1; }
.ccard__done { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--mint); color: #04130d; }
.ccard__done .i { width: 13px; height: 13px; stroke-width: 3; }
.ccard[hidden] { display: none; }

.aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.panel { padding: 18px 18px 10px; }
.panel h2 { display: flex; align-items: center; gap: 9px; font-size: 15.5px; margin-bottom: 8px; }
.panel h2 .i { width: 18px; height: 18px; color: var(--mint); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.panel__head h2 { margin: 0; }
.panel__head .link { font-size: 13px; }
.feed { list-style: none; margin: 0 -8px; padding: 0; }
.feed li a { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; transition: background-color .15s; }
.feed li a:hover { background: rgb(255 255 255 / .04); }
.feed li a > .i { width: 16px; height: 16px; color: var(--ink-3); transition: transform .2s, color .2s; }
.feed li a:hover > .i { transform: translateX(3px); color: var(--mint); }
.feed__text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__text b { font-weight: 600; }
.feed__text > span:not(.feed__ok) { display: block; color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__ok { display: inline-flex; vertical-align: -3px; color: var(--mint); }
.feed__ok .i { width: 15px; height: 15px; stroke-width: 2.6; }
.feed__empty { padding: 2px 0 12px; color: var(--ink-3); font-size: 14px; }


.empty { display: grid; justify-items: center; text-align: center; padding: 34px 28px 40px; }
.empty img, .gate img, .locked img, .auth__art img, .invite img {
  background: radial-gradient(closest-side, rgb(255 255 255 / .1), rgb(52 211 153 / .04) 70%, transparent);
  border-radius: 50%;
}
.empty img { width: 160px; height: 160px; object-fit: contain; margin-bottom: 4px; }
.empty h2 { font-size: 20px; }
.empty p { margin: 8px 0 20px; max-width: 44ch; color: var(--ink-2); }
.empty p:last-child { margin-bottom: 0; }

/* ---------- контест ---------- */

.chead { margin-bottom: 22px; }
.chead__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.chead h1 { font-size: 32px; letter-spacing: -.035em; }

.timer { display: grid; gap: 10px; min-width: 250px; padding: 14px 18px 16px; }
.timer__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.timer__label { font-size: 13.5px; color: var(--ink-3); }
.timer__value { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.timer--running .timer__value { color: var(--mint-ink); }
.timer--upcoming .timer__value { color: var(--amber); }
.timer--finished .timer__value { font-size: 15px; color: var(--ink-2); }

.tabs { display: flex; gap: 4px; margin-top: 22px; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; border-radius: 14px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; color: var(--ink-2); font-weight: 500; white-space: nowrap; transition: color .15s, background-color .15s; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--surface-3); color: var(--ink); box-shadow: 0 1px 0 rgb(255 255 255 / .06) inset, 0 4px 12px -4px rgb(0 0 0 / .6); }
.tabs a[aria-current="page"] .i { color: var(--mint); }
.tabs .i { width: 17px; height: 17px; }

.plist { list-style: none; margin: 0; padding: 6px; }
.plist li + li { border-top: 1px solid var(--line); }
.plist a { display: grid; grid-template-columns: auto minmax(0, 1fr) 150px auto auto; align-items: center; gap: 16px; padding: 14px; border-radius: 14px; transition: background-color .15s; }
.plist a:hover { background: rgb(255 255 255 / .035); }
.plist__name { font-weight: 600; font-size: 16px; }
.plist__limits { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.plist__stat { display: grid; gap: 6px; font-size: 13px; color: var(--ink-3); }
.plist__me { justify-self: end; min-width: 0; }
.plist a > .i { color: var(--ink-3); transition: transform .2s, color .2s; }
.plist a:hover > .i { transform: translateX(3px); color: var(--mint); }

.about { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.rules { padding: 22px; }
.rules h3 { font-size: 15px; margin-bottom: 12px; }
.rules ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.rules b { color: var(--ink); font-weight: 600; }
.rules .prose { font-size: 14px; color: var(--ink-2); margin-bottom: 18px; }

.gate { display: grid; justify-items: center; text-align: center; padding: 44px 28px; }
.gate img { width: 150px; height: 150px; object-fit: contain; }
.gate h2 { font-size: 22px; margin-top: 8px; }
.gate p { margin: 8px 0 0; color: var(--ink-2); }
.gate .timer__value { font-size: 40px; margin-top: 18px; color: var(--amber); }

/* ---------- задача ---------- */

.ptop { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ptop .crumbs { margin: 0; }
.pnav { display: flex; gap: 6px; flex-wrap: wrap; }
.pnav a { border-radius: var(--r-tile); }
.pnav a[aria-current="page"] .tile { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--mint); }

.solve { display: grid; grid-template-columns: minmax(0, 1fr) minmax(460px, 47%); gap: 20px; align-items: start; }

.statement { padding: 34px 38px 38px; min-width: 0; }
.statement__head { display: flex; align-items: center; gap: 16px; }
.statement__head h1 { font-size: 27px; letter-spacing: -.03em; }
.statement__limits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.prose { max-width: 72ch; font-size: 16px; line-height: 1.7; color: #cdd2de; }
.prose p { margin: 0 0 .85em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { color: var(--mint-ink); }
.prose code { font: 400 .88em var(--mono); background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px var(--line); padding: .1em .4em; border-radius: 6px; color: #e8ebf3; }
.prose pre { background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; }
.prose pre code { background: none; box-shadow: none; padding: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 .85em; }
.prose table { border-collapse: collapse; margin: 0 0 1em; }
.prose th, .prose td { border: 1px solid var(--line-2); padding: 6px 12px; }
.prose .katex { font-size: 1.05em; color: #f3f5fa; }

.part { margin-top: 30px; }
.part > h2 { font-size: 16px; margin-bottom: 10px; }

.samples { display: grid; gap: 12px; }
.sample { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--sunken); }
.sample__col + .sample__col { border-left: 1px solid var(--line); }
.sample__head { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 6px 0 14px; color: var(--ink-3); font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .02); }
.sample pre { margin: 0; padding: 12px 14px 14px; font: 400 13.5px/1.6 var(--mono); font-variant-ligatures: none; overflow-x: auto; white-space: pre; color: #e3e6ee; }
.copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); font: 500 13px var(--font); cursor: pointer; }
.copy:hover { background: rgb(255 255 255 / .06); color: var(--ink); }
.copy .i { width: 15px; height: 15px; }
.copy.is-done { color: var(--mint-ink); }

.hints__lead { margin: 0 0 12px; color: var(--ink-3); font-size: 14px; }
.hint { border: 1px solid var(--line); border-radius: 14px; background: var(--sunken); }
.hint + .hint { margin-top: 8px; }
/* следующая подсказка видна, только когда открыты все предыдущие */
.hint:not([open]) ~ .hint { display: none; }
.hint summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; font-weight: 500; color: var(--ink-2); border-radius: 14px; }
.hint summary::-webkit-details-marker { display: none; }
.hint summary:hover { color: var(--ink); background: rgb(255 255 255 / .02); }
.hint summary .i { width: 16px; height: 16px; color: var(--amber); }
.hint__of { margin-left: auto; font-size: 13px; font-weight: 400; }
.hint[open] summary { color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.hint__body { padding: 12px 16px 14px; }
.hint__body > :first-child { margin-top: 0; }
.hint__body > :last-child { margin-bottom: 0; }

.workbench { position: sticky; top: 24px; display: grid; gap: 14px; }

.editor { border-radius: var(--r-card); background: var(--code-bg); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgb(0 0 0 / .9), 0 0 0 1px rgb(52 211 153 / .04); }
.editor:focus-within { border-color: rgb(52 211 153 / .25); }
.editor__bar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--code-line); background: rgb(255 255 255 / .015); }
.editor__dots { display: flex; gap: 6px; margin-right: 6px; }
.editor__dots i { width: 10px; height: 10px; border-radius: 50%; background: #262b36; }
.editor__dots i:nth-child(1) { background: #ff5f6d55; }
.editor__dots i:nth-child(2) { background: #ffb54755; }
.editor__dots i:nth-child(3) { background: #34d39955; }
.editor__lang { color: #e9eaf0; font-weight: 500; font-size: 14px; }
.editor__lang span { color: #6c7286; margin-left: 6px; font-weight: 400; }
.editor__file { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 9px; color: #b6bacb; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.editor__file:hover { background: #1a1f29; color: #fff; }
.editor__file .i { width: 16px; height: 16px; }

.code {
  --lh: 21px;
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  height: clamp(320px, calc(100vh - 330px), 680px);
  font: 400 13.5px/var(--lh) var(--mono);
  font-variant-ligatures: none;
  tab-size: 4;
}
.code__gutter { margin: 0; padding: 14px 12px 14px 16px; min-width: 50px; text-align: right; color: #3a4050; overflow: hidden; user-select: none; white-space: pre; font: inherit; }
.code__area { position: relative; overflow: hidden; }
.code__hl, .code__input {
  position: absolute; inset: 0;
  margin: 0; padding: 14px 16px 14px 4px;
  font: inherit; letter-spacing: 0; tab-size: inherit;
  white-space: pre; overflow-wrap: normal; word-break: normal;
  border: 0;
}
.code__hl { pointer-events: none; color: #dfe1ea; overflow: hidden; }
.code__hl code { font: inherit; display: block; will-change: transform; }
.code__input { width: 100%; height: 100%; resize: none; outline: none; background: transparent; color: transparent; caret-color: var(--mint); overflow: auto; }
.code__input::selection { background: rgb(52 211 153 / .3); color: transparent; }
.code__input::placeholder { color: #3a4050; }
.tok-k { color: #c792ea; }
.tok-t { color: #7fdbca; }
.tok-s { color: #ecc48d; }
.tok-n { color: #f78c6c; }
.tok-c { color: #586079; font-style: italic; }
.tok-p { color: #82aaff; }

.editor__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; border-top: 1px solid var(--code-line); }
.editor__hint { color: #6c7286; font-size: 13px; }
.editor__hint kbd { background: #1a1f29; color: #b6bacb; }

.locked { display: grid; justify-items: center; text-align: center; padding: 30px 28px 34px; }
.locked img { width: 130px; height: 130px; object-fit: contain; }
.locked p { color: var(--ink-2); margin: 6px 0 18px; }

.mine { padding: 8px; }
.mine__head { padding: 8px 10px 10px; font-weight: 600; font-size: 15px; }
.mine__list { list-style: none; margin: 0; padding: 0; max-height: 264px; overflow-y: auto; }
.mine__list a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 9px 10px; border-radius: 12px; font-size: 14px; }
.mine__list a:hover { background: rgb(255 255 255 / .04); }
.mine__empty { padding: 0 10px 12px; color: var(--ink-3); font-size: 14px; }

/* ---------- вердикты ---------- */

.verdict { --v: var(--ink-2); --v-bg: rgb(255 255 255 / .06); display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px; background: var(--v-bg); color: var(--v); font-weight: 500; font-size: 13.5px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.verdict::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; box-shadow: 0 0 8px currentColor; }
.verdict--ok { --v: var(--mint-ink); --v-bg: var(--mint-soft); }
.verdict--wa { --v: var(--red-ink); --v-bg: var(--red-soft); }
.verdict--tl, .verdict--ml { --v: var(--amber); --v-bg: var(--amber-soft); }
.verdict--re { --v: var(--violet); --v-bg: var(--violet-soft); }
.verdict--pending { --v: var(--sky); --v-bg: var(--sky-soft); }
.verdict--pending::before { animation: live 1s ease-in-out infinite; }

/* ---------- таблицы ---------- */

.table-card { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { height: 46px; padding: 0 16px; text-align: left; font-weight: 500; font-size: 12.5px; letter-spacing: .03em; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: rgb(255 255 255 / .025); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .center { text-align: center; }
.table .strong { font-weight: 700; font-size: 16px; }
.who { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.pcell { display: inline-flex; align-items: center; gap: 10px; }

.board th.pcol, .board td.cell { width: 74px; text-align: center; padding-inline: 4px; }
.board th.pcol .tile { vertical-align: middle; }
.board td { height: 64px; }
.board .rank { width: 64px; text-align: center; }
.rank-badge { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: rgb(255 255 255 / .04); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rank-badge--1 { background: #f5b83d; box-shadow: none; color: #2a1a00; }
.rank-badge--2 { background: #c9cdd6; box-shadow: none; color: #111; }
.rank-badge--3 { background: #d08a55; box-shadow: none; color: #1f0f00; }
.board .solved { width: 110px; text-align: center; font-weight: 700; font-size: 18px; }
.board .penalty { width: 96px; text-align: center; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.board tr.is-me { background: rgb(52 211 153 / .06); }
.board tr.is-me:hover { background: rgb(52 211 153 / .09); }
.board tfoot td { height: 46px; color: var(--ink-3); font-size: 13px; text-align: center; background: rgb(255 255 255 / .02); border-top: 1px solid var(--line); border-bottom: 0; }

.hit { position: relative; display: grid; place-content: center; gap: 1px; width: 58px; height: 46px; margin: 0 auto; border-radius: 12px; line-height: 1.15; }
.hit b { font-weight: 600; font-size: 15px; }
.hit small { font-size: 11.5px; font-variant-numeric: tabular-nums; opacity: .8; }
.hit--ok { background: var(--mint-soft); color: var(--mint-ink); }
.hit--first { background: var(--mint); color: #04130d; }
.hit--no { color: var(--red-ink); background: rgb(255 95 109 / .06); }
.hit--wait { color: var(--sky); }
.hit--up { background: var(--violet-soft); color: var(--violet); box-shadow: inset 0 0 0 1.5px rgb(167 139 250 / .25); }
.hit--up small { opacity: .75; font-size: 10.5px; }
.hit__balloon { position: absolute; top: -11px; right: -8px; width: 21px; height: auto; transform: rotate(10deg); filter: drop-shadow(0 2px 4px rgb(0 0 0 / .6)); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }

.board .solved .up { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--violet-soft); color: var(--violet); font-size: 12.5px; font-weight: 600; vertical-align: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; color: var(--ink-3); font-size: 13.5px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 16px; height: 16px; border-radius: 5px; }
.legend__up { background: var(--violet-soft); box-shadow: inset 0 0 0 1.5px rgb(167 139 250 / .25); }

.board td.cell { position: relative; }
.cell__link { position: absolute; inset: 3px; border-radius: 12px; }
.cell__link:hover { box-shadow: inset 0 0 0 2px rgb(255 255 255 / .18); }
.cell__link:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }

.board-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 14px; font-size: 13.5px; }
.seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); }
.seg > a, .seg > button, .seg label span {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink-2);
  font: 500 14px var(--font); white-space: nowrap; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.seg .i { width: 16px; height: 16px; }
.seg > a:hover, .seg > button:hover, .seg label span:hover { color: var(--ink); }
.seg > .is-on, .seg label input:checked + span { background: var(--surface-3); color: var(--ink); box-shadow: 0 4px 12px -4px rgb(0 0 0 / .6); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { position: relative; }
.seg label input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 1px; }

/* ---------- профиль ---------- */

.profile-head { display: flex; align-items: center; gap: 24px; padding: 28px 30px; flex-wrap: wrap; }
.profile-head__text { flex: 1; min-width: 240px; }
.profile-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 32px; letter-spacing: -.035em; }
.profile-head p { margin: 4px 0 0; }
.profile-head .meta { margin-top: 12px; }
.profile-head__actions { display: flex; gap: 8px; }
.profile-head + .stats-row { margin-top: 16px; }

.block-card { padding: 22px 24px; }
.block-card + .block-card, .stats-row + .block-card, .block-card + .profile-grid, .profile-grid + .profile-grid { margin-top: 16px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.profile-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.profile-side .block-card + .block-card { margin-top: 0; }

.heat { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.heat__grid { flex: 1; justify-content: space-between; }
.heat__days { display: grid; grid-template-rows: repeat(7, 14px); gap: 4px; font-size: 10.5px; color: var(--ink-3); line-height: 14px; }
.heat__grid { display: flex; gap: 4px; }
.heat__week { display: grid; grid-template-rows: repeat(7, 14px); gap: 4px; }
.heat i, .heat__legend i { display: block; width: 14px; height: 14px; border-radius: 4px; background: rgb(255 255 255 / .05); }
.heat i.is-future { background: transparent; }
.heat .l1, .heat__legend .l1 { background: rgb(52 211 153 / .25); }
.heat .l2, .heat__legend .l2 { background: rgb(52 211 153 / .45); }
.heat .l3, .heat__legend .l3 { background: rgb(52 211 153 / .7); }
.heat .l4, .heat__legend .l4 { background: var(--mint); box-shadow: 0 0 8px rgb(52 211 153 / .6); }
.heat__week i:hover { outline: 1.5px solid rgb(255 255 255 / .5); outline-offset: 1px; }
.heat__legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 12px; }
.heat__legend i { width: 11px; height: 11px; border-radius: 3px; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { position: relative; display: grid; justify-items: center; gap: 4px; padding: 16px 10px 14px; border-radius: 16px; text-align: center; background: rgb(255 255 255 / .02); border: 1px solid var(--line); opacity: .62; transition: transform .2s, opacity .2s; }
.badge:hover { opacity: 1; transform: translateY(-2px); }
.badge b { font-size: 13.5px; max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
.badge small { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.badge .bar { width: 80%; height: 4px; margin-top: 6px; }
.badge__progress { font-size: 11px !important; }
.badge__icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 4px; border-radius: 15px; background: rgb(255 255 255 / .05); color: var(--ink-3); }
.badge__icon .i { width: 24px; height: 24px; }
.badge.is-earned { opacity: 1; border-color: rgb(52 211 153 / .25); background: rgb(52 211 153 / .05); }
.badge.is-earned .badge__icon { background: var(--mint); color: #04130d; }

.vbar { display: flex; gap: 3px; height: 12px; border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.vbar i { flex: 1 1 0; min-width: 4px; }
.v--ok { background: var(--mint); }
.v--wa { background: var(--red); }
.v--tl, .v--ml { background: var(--amber); }
.v--re { background: var(--violet); }
.v--ce, .v--pending { background: #4b5263; }
.vlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.vlist li { display: grid; grid-template-columns: auto 1fr auto 44px; align-items: center; gap: 10px; }
.vlist .faint { text-align: right; font-size: 13px; }

.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 28px; align-items: center; gap: 12px; }
.hbars li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbars li b { text-align: right; }

.cprog { list-style: none; margin: 0 -8px; padding: 0; display: grid; gap: 2px; }
.cprog a { display: grid; grid-template-columns: 20px minmax(0, 1fr) 30% 52px; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; font-size: 14px; }
.cprog a:hover { background: rgb(255 255 255 / .04); }
.cprog img { width: 18px; height: auto; transform: rotate(-6deg); }
.cprog__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.cprog .nums { text-align: right; font-size: 13px; }

/* ---------- посылка ---------- */

.sub-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.sub-head h1 { font-size: 26px; }
.sub-head .verdict { height: 36px; padding: 0 16px 0 13px; font-size: 15px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 22px 0 0; }
.facts div { padding: 16px 20px; }
.facts div + div { border-left: 1px solid var(--line); }
.facts dt { color: var(--ink-3); font-size: 13px; }
.facts dd { margin: 4px 0 0; font-weight: 600; font-size: 16px; }

.tests { display: flex; flex-wrap: wrap; gap: 5px; padding: 18px 20px; border-top: 1px solid var(--line); }
.tests i { width: 26px; height: 26px; border-radius: 8px; background: rgb(255 255 255 / .04); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; font: 500 11px var(--font); color: var(--ink-3); font-style: normal; }
.tests i.pass { background: var(--mint-soft); box-shadow: none; color: var(--mint-ink); }
.tests i.fail { background: var(--red); box-shadow: 0 0 12px -2px rgb(255 95 109 / .7); color: #fff; font-weight: 600; }

.listing-bar { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.listing-bar .faint { flex: 1; font: 500 13px var(--mono); padding-left: 4px; }
.listing { margin-top: 10px; border-radius: var(--r-card); background: var(--code-bg); border: 1px solid var(--line); overflow: auto; }
.listing pre { margin: 0; padding: 18px 0; font: 400 13.5px/21px var(--mono); font-variant-ligatures: none; color: #dfe1ea; counter-reset: ln; }
.listing pre span { display: block; padding: 0 20px 0 0; }
.listing pre span::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 52px; padding-right: 18px; text-align: right; color: #3a4050; user-select: none; }
.log { margin: 16px 0 0; padding: 16px 18px; border-radius: 16px; background: var(--red-soft); border: 1px solid rgb(255 95 109 / .25); font: 400 13px/1.6 var(--mono); white-space: pre-wrap; overflow-x: auto; color: #ffc2c7; }

/* ---------- вход ---------- */

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.auth { display: grid; grid-template-columns: 1fr 1fr; width: min(940px, 100%); overflow: hidden; }
.auth__form { padding: 40px 44px; }
.auth__form .brand { padding: 0 0 36px; }
.auth h1 { font-size: 28px; letter-spacing: -.03em; }
.auth__lead { color: var(--ink-2); margin: 8px 0 26px; }
.auth form { display: grid; gap: 16px; }
.auth form .btn { width: 100%; margin-top: 6px; }
.auth__alt { margin-top: 20px; color: var(--ink-2); font-size: 14px; }
.auth__art { display: grid; place-items: center; background: var(--sunken); border-left: 1px solid var(--line); padding: 32px; }
.auth__art img { width: 100%; max-width: 340px; aspect-ratio: 1; object-fit: contain; }

.field { display: grid; gap: 7px; }
.field > span { font-weight: 500; font-size: 14px; }
.field small { color: var(--ink-3); font-size: 13px; }
.input, .textarea {
  width: 100%;
  background: var(--sunken);
  border: 1px solid var(--line-2);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  padding: 10px 13px;
  transition: border-color .15s, box-shadow .15s;
}
.input { height: 44px; }
.input:hover, .textarea:hover { border-color: rgb(255 255 255 / .2); }
.input:focus, .textarea:focus { outline: none; border-color: rgb(52 211 153 / .6); box-shadow: 0 0 0 4px rgb(52 211 153 / .1); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.textarea { resize: vertical; min-height: 110px; }
.textarea--code { font: 400 13.5px/1.55 var(--mono); font-variant-ligatures: none; background: var(--code-bg); }
input[type="datetime-local"] { color-scheme: dark; }

.notice { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 16px; margin: 0 0 20px; border-radius: 12px; background: var(--mint-soft); color: var(--mint-ink); font-weight: 500; border: 1px solid rgb(52 211 153 / .2); }
.notice--error { background: var(--red-soft); color: var(--red-ink); border-color: rgb(255 95 109 / .25); }
.notice--secret { background: var(--amber-soft); color: var(--amber); border-color: rgb(255 181 71 / .25); }
.notice--secret code { font: 600 15px var(--mono); padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--ink); }
.notice--secret span { flex: 1; }

/* ---------- настройки (администратор) ---------- */

.form-card { padding: 28px; }
.form-card + .form-card { margin-top: 16px; }
.form-card > h2 { font-size: 18px; }
.form-card > p { color: var(--ink-2); margin: 6px 0 0; }
.form-grid { display: grid; gap: 18px; margin-top: 22px; }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
.form-grid--3 { grid-template-columns: 2fr 1fr 1fr; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }
.form-actions .spacer { flex: 1; }

.pick { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: rgb(255 255 255 / .02); box-shadow: inset 0 0 0 1px var(--line); }
.pick[hidden] { display: none; }
.pick__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.pick__head .finder { margin-left: auto; }
.pick__head .finder input { width: 180px; }
.pick__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; max-height: 340px; overflow-y: auto; }
.pick__item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 10px; border-radius: 10px; background: rgb(255 255 255 / .02); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.pick__item:hover { background: rgb(255 255 255 / .04); }
.pick__item:has(input:checked) { background: var(--mint-soft); box-shadow: inset 0 0 0 1px rgb(52 211 153 / .35); }
.pick__item input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--mint); }
.pick__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__item[hidden] { display: none; }

.switch { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 14px; background: rgb(255 255 255 / .02); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.switch input { appearance: none; flex: none; width: 40px; height: 24px; margin: 0; border-radius: 999px; background: #2a303d; position: relative; cursor: pointer; transition: background-color .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #e8eaf0; box-shadow: 0 1px 3px rgb(0 0 0 / .4); transition: transform .15s; }
.switch input:checked { background: var(--mint); }
.switch input:checked::after { transform: translateX(16px); background: #fff; }
.switch b { display: block; font-weight: 600; }
.switch span { color: var(--ink-2); font-size: 14px; }
.timing[hidden] { display: none; }

.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; font-size: 14.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--mint); }

.adminlist { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.adminlist li { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 12px; border-radius: 14px; background: rgb(255 255 255 / .02); box-shadow: inset 0 0 0 1px var(--line); }
.adminlist__title { flex: 1; min-width: 0; }
.adminlist__title a { font-weight: 600; }
.adminlist__title div { color: var(--ink-3); font-size: 13.5px; margin-top: 1px; }
.adminlist form { display: contents; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color .15s, color .15s; }
.icon-btn:hover { background: rgb(255 255 255 / .07); color: var(--ink); }
.icon-btn.is-active { background: rgb(255 255 255 / .08); color: var(--mint); }
.icon-btn[disabled] { opacity: .3; pointer-events: none; }
.icon-btn .i { width: 18px; height: 18px; }

.ttable td.io { max-width: 280px; }
.ttable td.io code { display: block; font: 400 12.5px/1.5 var(--mono); color: var(--ink-2); white-space: pre; overflow: hidden; text-overflow: ellipsis; max-height: 3em; }
.ttable .actions { display: flex; gap: 4px; justify-content: flex-end; }
.ttable form { display: inline; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font: 500 12.5px var(--font); background: var(--mint-soft); color: var(--mint-ink); border: 0; cursor: pointer; }
.tag--off { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-2); }

.drop { position: relative; display: grid; justify-items: center; gap: 10px; padding: 26px 20px; border: 1.5px dashed var(--line-2); border-radius: 14px; color: var(--ink-2); font-size: 14px; text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; }
.drop code { font: 400 12.5px var(--mono); background: rgb(255 255 255 / .06); padding: 1px 5px; border-radius: 5px; }
.drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop > .i { width: 26px; height: 26px; color: var(--ink-3); }
.drop:hover, .drop.is-over { border-color: rgb(52 211 153 / .5); background: rgb(52 211 153 / .04); }
.drop__picked { color: var(--mint-ink); font-weight: 600; }

.danger-zone { border-color: rgb(255 95 109 / .25); }

/* ---------- тост «задача решена» ---------- */

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px 14px 14px;
  border-radius: 16px;
  background: var(--surface-3); color: var(--ink);
  border: 1px solid rgb(52 211 153 / .3);
  box-shadow: 0 20px 50px -12px rgb(0 0 0 / .8), 0 0 30px -10px rgb(52 211 153 / .5);
  animation: toast-in .35s ease-out;
}
.toast__check { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #04130d; }
.toast b { display: block; font-weight: 600; }
.toast span { color: var(--ink-2); font-size: 13.5px; }
.toast.is-out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; } }

/* ---------- быстрый поиск ---------- */

.palette { position: fixed; inset: 0; z-index: 80; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; background: rgb(4 6 10 / .65); backdrop-filter: blur(6px); animation: fade .15s ease-out; }
.palette[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.palette__box { width: min(620px, 100%); border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 40px 80px -20px rgb(0 0 0 / .9); overflow: hidden; animation: pop-in .18s ease-out; }
@keyframes pop-in { from { transform: translateY(-8px) scale(.98); opacity: 0; } }
.palette__field { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 58px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.palette__field input { flex: 1; height: 100%; border: 0; background: transparent; color: var(--ink); font: 400 16.5px var(--font); outline: none; }
.palette__list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.palette__list li a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 11px; }
.palette__list li a.is-active { background: rgb(52 211 153 / .1); box-shadow: inset 0 0 0 1px rgb(52 211 153 / .2); }
.palette__list .tile, .palette__ico { flex: none; }
.palette__ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgb(255 255 255 / .05); color: var(--ink-2); }
.palette__ico .i { width: 15px; height: 15px; }
.palette__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette__text small { margin-left: 8px; color: var(--ink-3); font-size: 12.5px; }
.palette__kind { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.palette__empty { padding: 18px 12px; color: var(--ink-3); text-align: center; }
.palette__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.palette__foot kbd { margin-right: 3px; }

/* ---------- анимации ---------- */

.rise { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
/* ждёт, пока до него докрутят */
.reveal { opacity: 0; }
@media print { .reveal { opacity: 1; } }

.bar > i { transform-origin: left center; animation: grow 1s cubic-bezier(.2, .8, .2, 1) .3s both; }
@keyframes grow { from { transform: scaleX(0); } }

.pnav .tile { transition: box-shadow .15s, background-color .15s; }
.pnav a:hover .tile:not(.tile--solved):not(.tile--tried) { background: rgb(255 255 255 / .08); }

/* блик на кнопке отправки */
.btn--mint { position: relative; overflow: hidden; }
.btn--mint::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .4) 50%, transparent 70%); transform: translateX(-120%); }
.btn--mint:hover::after { transform: translateX(120%); transition: transform .7s ease; }

/* новый вердикт подсвечивается */
.mine__list li.is-fresh a { animation: flash 1.4s ease-out; }
.mine__list li.is-fresh-ok a { animation: flash-ok 1.6s ease-out; }
@keyframes flash { from { background: rgb(255 255 255 / .1); } }
@keyframes flash-ok { from { background: rgb(52 211 153 / .25); } }

/* стайка шариков при решении задачи */
.sky { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.flyer {
  position: absolute; left: 0; top: 0;
  width: var(--w);
  animation: fly var(--dur) cubic-bezier(.4, .05, .5, 1) var(--delay) both;
}
.flyer img {
  display: block; width: 100%; height: auto;
  transform-origin: 50% 25%;
  filter: drop-shadow(0 12px 18px rgb(0 0 0 / .45));
  animation: sway var(--sway) ease-in-out var(--delay) infinite alternate;
}
@keyframes fly {
  0% { transform: translate(calc(var(--x) - 50%), calc(var(--y) + 30px)) scale(.3); opacity: 0; }
  12% { transform: translate(calc(var(--x) - 50%), calc(var(--y) - 40px)) scale(1); opacity: 1; }
  100% { transform: translate(calc(var(--x) - 50% + var(--drift)), -140vh) scale(1); opacity: 1; }
}
@keyframes sway { from { transform: rotate(calc(var(--rot) * -1)); } to { transform: rotate(var(--rot)); } }

.oops { max-width: 560px; margin: 60px auto 0; }
.mine__list .verdict, .table .verdict { justify-self: start; }

/* ---------- украшения ---------- */

/* три шарика в боковой панели */
.side__art { display: flex; justify-content: center; align-items: flex-end; padding: 0 0 6px; }
.side__art img { width: 34px; height: auto; opacity: .9; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .5)); }
.side__art img:nth-child(1) { transform: rotate(-12deg) translateY(6px); }
.side__art img:nth-child(2) { width: 42px; margin: 0 -6px; position: relative; z-index: 1; }
.side__art img:nth-child(3) { transform: rotate(12deg) translateY(10px); }
.app--rail .side__art { display: none; }
@media (max-height: 760px) { .side__art { display: none; } }

/* баннер идущего контеста на главной */
.live {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 18px; padding: 26px 30px;
  border-radius: var(--r-card);
  border: 1px solid rgb(52 211 153 / .25);
  background: radial-gradient(420px 220px at 85% 0%, rgb(52 211 153 / .14), transparent 70%), #0f1319;
  color: #fff;
  box-shadow: 0 24px 48px -24px rgb(0 0 0 / .8);
}
.live--soon { border-color: rgb(255 181 71 / .25); background: radial-gradient(420px 220px at 85% 0%, rgb(255 181 71 / .12), transparent 70%), #0f1319; }
.live__text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.live__kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mint-ink); }
.live__kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: live 1.6s ease-in-out infinite; }
.live--soon .live__kicker { color: #ffc56b; }
.live--soon .live__kicker::before { background: #ffb02e; box-shadow: 0 0 10px #ffb02e; }
.live h2 { margin-top: 8px; font-size: 26px; letter-spacing: -.03em; }
.live p { margin: 6px 0 0; color: #b6bbcb; }
.live p b { color: #fff; font-weight: 600; }
.live__btn { position: relative; z-index: 1; }
.live__balloons { position: absolute; right: 190px; bottom: -16px; display: flex; align-items: flex-end; opacity: .9; pointer-events: none; }
.live__balloons img { width: 54px; height: auto; filter: drop-shadow(0 10px 14px rgb(0 0 0 / .5)); }
.live__balloons img:nth-child(1) { transform: rotate(-14deg) translateY(10px); }
.live__balloons img:nth-child(2) { width: 66px; margin: 0 -10px; }
.live__balloons img:nth-child(3) { transform: rotate(14deg) translateY(16px); }

/* ---------- админка ---------- */

.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat { position: relative; overflow: hidden; display: grid; gap: 2px; padding: 20px 22px; }
.stat b { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-3); font-size: 14px; }
.stat small { margin-top: 6px; color: var(--ink-3); font-size: 12.5px; }
.stat img { position: absolute; right: 14px; top: 12px; width: 38px; height: auto; transform: rotate(10deg); opacity: .95; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .5)); }
.stat--live b { color: var(--mint-ink); }
.stat__icon { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; }
.stat__icon .i { width: 20px; height: 20px; }
.stat__icon--mint { background: var(--mint-soft); color: var(--mint-ink); }
.stat__icon--sky { background: var(--sky-soft); color: var(--sky); }
.stat__icon--violet { background: var(--violet-soft); color: var(--violet); }
.stat__icon--amber { background: rgb(255 140 60 / .14); color: #ffa45c; }
.profile-head + .stats-row { margin-bottom: 0; }

.block + .block, .block + .admin-grid { margin-top: 30px; }
.runs td { padding-block: 14px; }
.runs__title { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; }
.runs__title:hover span { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.runs__balloon { width: 22px; height: auto; transform: rotate(-6deg); }
.runs__time { font-size: 13.5px; line-height: 1.4; white-space: nowrap; }
.runs__time small { color: var(--ink-3); font-size: 12.5px; }
.runs__time b { color: var(--ink); font-variant-numeric: tabular-nums; }
.runs__actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.runs__actions form { display: contents; }

.nowrap { white-space: nowrap; }
.people th, .people td { padding-inline: 12px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.role { display: inline-flex; height: 24px; align-items: center; padding: 0 9px; border-radius: 999px; background: rgb(255 255 255 / .05); color: var(--ink-2); font-size: 12px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); letter-spacing: 0; }
.role--admin { background: var(--violet-soft); color: var(--violet); box-shadow: none; }

.invite { position: relative; overflow: hidden; padding: 24px; }
.invite img { width: 150px; height: auto; display: block; margin: -10px auto 4px; }
.invite h2 { font-size: 18px; }
.invite p { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.invite__code { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
.invite__code code { font: 600 15px var(--mono); letter-spacing: .02em; overflow-wrap: anywhere; color: var(--mint-ink); }

/* блок «Запуск» в настройках контеста */
.launch { position: relative; overflow: hidden; }
.launch > p { max-width: 60ch; }
.launch__art { position: absolute; right: 24px; top: 18px; width: 54px; height: auto; transform: rotate(10deg); filter: drop-shadow(0 8px 12px rgb(0 0 0 / .5)); }
.launch__form { display: grid; gap: 20px; margin-top: 22px; }
.launch__step { display: grid; gap: 10px; justify-items: start; }
.launch__label { font-weight: 500; font-size: 14px; }
.launch__at { max-width: 280px; }
.launch__at[hidden] { display: none; }
.launch__duration { display: flex; gap: 10px; }
.launch__duration label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; }
.launch__duration .input { width: 92px; }
.launch__form .form-actions { margin-top: 2px; }
.launch__off { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.link-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--ink-2); font: 500 14px var(--font); cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.link-btn .i { width: 17px; height: 17px; }

/* ---------- посылки: фильтры ---------- */

.subbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 16px; }
.subbar__count { margin-left: auto; font-size: 13.5px; }
.select { position: relative; display: inline-flex; align-items: center; }
.select .i { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.select select {
  height: 40px; max-width: 260px; padding: 0 34px 0 36px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--sunken) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238a90a2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 13px center;
  color: var(--ink); font: 500 14px var(--font); text-overflow: ellipsis;
  appearance: none; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.select select:hover { border-color: rgb(255 255 255 / .2); }
.select select:focus-visible { outline: none; border-color: rgb(52 211 153 / .6); box-shadow: 0 0 0 3px rgb(52 211 153 / .15); }

.who__link, .who--link { color: inherit; text-decoration: none; }
.who__link:hover, .who--link:hover span:last-child { color: var(--mint-ink); text-decoration: underline; text-underline-offset: 3px; }
.who--link { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.who-title { display: flex; align-items: center; gap: 12px; }

/* ---------- теги ---------- */

.tag-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: rgb(255 255 255 / .05); color: var(--ink-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.statement__limits .tag-chip { height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; }
.plist__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.filter { height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .03); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font: 500 13.5px var(--font); cursor: pointer; transition: background-color .15s, color .15s; }
.filter:hover { color: var(--ink); background: rgb(255 255 255 / .06); }
.filter.is-on { background: var(--mint-soft); color: var(--mint-ink); box-shadow: inset 0 0 0 1px rgb(52 211 153 / .3); }
.plist li[hidden] { display: none; }

/* ---------- переходы между страницами ---------- */

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease; }
.side { view-transition-name: side; }
::view-transition-group(side), ::view-transition-group(tabbar) { animation: none; }
::view-transition-old(side), ::view-transition-old(tabbar) { display: none; }
::view-transition-new(side), ::view-transition-new(tabbar) { animation: none; }

/* полоска загрузки вверху: появляется, если страница открывается дольше мгновения */
.nprog { position: fixed; top: 0; left: 0; z-index: 100; width: 100%; height: 2px; pointer-events: none; transform-origin: left center; transform: scaleX(0); background: var(--mint); box-shadow: 0 0 10px rgb(52 211 153 / .7); opacity: 0; }
.nprog.is-on { opacity: 1; animation: nprog 8s cubic-bezier(.1, .8, .2, 1) .12s both; }
@keyframes nprog { from { transform: scaleX(0); } 20% { transform: scaleX(.45); } to { transform: scaleX(.92); } }

/* ---------- мелкие общие детали ---------- */

.btn:focus-visible { outline-offset: 3px; }
.btn.is-disabled, .icon-btn.is-disabled { opacity: .35; pointer-events: none; }
.btn__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font: 600 12px var(--font); font-style: normal; }
.btn--danger .btn__count { background: var(--red-soft); color: var(--red-ink); }
.icon-btn--frame { box-shadow: inset 0 0 0 1px var(--line-2); width: 42px; height: 42px; border-radius: var(--r-ctl); }
.icon-btn--danger:hover { background: var(--red-soft); color: var(--red-ink); }
.icon-btn.is-off { color: var(--amber); }
.spacer { flex: 1; }
.nav-wide { font-style: normal; }
.inline-code { font: 600 13.5px var(--mono); padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--mint-ink); }
.foot-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 2px 0; font-size: 13.5px; }

.rank-badge--1, .rank-badge--2, .rank-badge--3 { box-shadow: 0 6px 14px -8px currentColor; }

/* живой индикатор расходится кругом */
.chip--live::before, .live__kicker::before { animation: live 1.6s ease-in-out infinite, ping 1.6s ease-out infinite; }
@keyframes ping { from { box-shadow: 0 0 0 0 rgb(52 211 153 / .55); } to { box-shadow: 0 0 0 7px rgb(52 211 153 / 0); } }
.live--soon .live__kicker::before { animation: live 1.6s ease-in-out infinite; }

/* шарики чуть покачиваются */
.side__art img, .hero__art, .auth__art img { animation: float 6s ease-in-out infinite; }
.side__art img:nth-child(2) { animation-delay: -2s; animation-duration: 7s; }
.side__art img:nth-child(3) { animation-delay: -4s; animation-duration: 8s; }
.hero__art { animation-duration: 8s; }
@keyframes float { 50% { translate: 0 -6px; } }

/* результаты по тестам проявляются волной */
.tests i { animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 9ms); }

/* ---------- сообщения ---------- */

.notices { display: grid; gap: 10px; margin: 0 0 20px; }
.notices:not(:has(.notice)) { display: none; }
.notices .notice { margin: 0; animation: notice-in .4s cubic-bezier(.2, .8, .2, 1) both; }
.notice > .i { width: 18px; height: 18px; flex: none; }
.notice > span { flex: 1; min-width: 0; }
.notice__x { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border: 0; border-radius: 8px; background: transparent; color: inherit; opacity: .6; cursor: pointer; }
.notice__x:hover { opacity: 1; background: rgb(255 255 255 / .08); }
.notice__x .i { width: 15px; height: 15px; }
.notice.is-out { animation: notice-out .25s ease forwards; }
.notice--secret { flex-wrap: wrap; }
@keyframes notice-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes notice-out { to { opacity: 0; transform: translateY(-6px); } }

/* ---------- диалоги ---------- */

.dialog { width: min(460px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.dialog::backdrop { background: rgb(4 6 10 / .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .16s ease-out; }
.dialog__box { display: grid; gap: 12px; padding: 24px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 40px 80px -20px rgb(0 0 0 / .9); animation: pop-in .2s cubic-bezier(.2, .8, .2, 1); }
.dialog__box h2 { font-size: 19px; }
.dialog__box p { margin: 0; color: var(--ink-2); }
.dialog__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--mint-soft); color: var(--mint-ink); }
.dialog__icon--danger { background: var(--red-soft); color: var(--red-ink); }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.dialog.is-closing .dialog__box { animation: pop-out .14s ease forwards; }
.dialog.is-closing::backdrop { animation: fade-out .14s ease forwards; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: #ff7480; }
@keyframes pop-out { to { transform: translateY(6px) scale(.98); opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* ---------- админка: шапка и разделы ---------- */

.phead--admin { margin-bottom: 18px; }
.phead__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tabs--admin { margin: 0 0 22px; }
.page--form { max-width: 920px; }
.page--editor { max-width: 1480px; }
.block-head--flush { margin: 0; }
.block-head .link { font-size: 13.5px; }

.stat--link { transition: border-color .15s, background-color .15s; }
.stat--link:hover { border-color: var(--line-2); background: var(--surface-2); }
.stat--live { border-color: rgb(52 211 153 / .25); }

/* идущие и ближайшие контесты */
.nowlist { display: grid; gap: 12px; }
.now { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; padding: 18px 20px; }
.now--run { border-color: rgb(52 211 153 / .28); background: radial-gradient(360px 160px at 100% 0%, rgb(52 211 153 / .08), transparent 70%), var(--surface); }
.now--soon { border-color: rgb(255 181 71 / .22); }
.now__main { flex: 1; min-width: 240px; display: grid; gap: 6px; justify-items: start; }
.now h3 { font-size: 19px; }
.now h3 a:hover { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.now p { margin: 0; font-size: 14px; }
.now__clock { color: var(--ink); font-size: 16px; }
.now--run .now__clock { color: var(--mint-ink); }
.now--soon .now__clock { color: var(--amber); }
.now__bar { width: min(420px, 100%); margin-top: 4px; }
.now__bar > i { animation: none; transition: width 1s linear; }
.now__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.now__actions form { display: contents; }

.admin-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.admin-side .invite img { display: none; }

/* лента посылок */
.afeed { padding: 6px; }
.afeed__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 92px; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; transition: background-color .15s; }
.afeed__row + .afeed__row { margin-top: 1px; }
.afeed__row:hover { background: rgb(255 255 255 / .04); }
.afeed__text { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 10px; font-size: 14px; line-height: 1.3; }
.afeed__text b { font-weight: 600; }
.afeed__task { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-2); }
.afeed__task > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afeed__text small { grid-column: 1 / -1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afeed__time { text-align: right; font-size: 12.5px; white-space: nowrap; }
.afeed__empty { margin: 0; padding: 18px 12px; }
.afeed__row.is-new { animation: flash 1.6s ease-out; }

/* столбики посылок по дням */
.spark { display: flex; align-items: flex-end; gap: 5px; height: 132px; padding-top: 8px; }
.spark__col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.spark__col span { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.spark__col.is-today span { color: var(--ink); font-weight: 600; }
.spark__bar { position: relative; width: 100%; max-width: 22px; min-height: 3px; border-radius: 6px; background: rgb(255 255 255 / .09); overflow: hidden; transform-origin: bottom center; animation: grow-up .9s cubic-bezier(.2, .8, .2, 1) both; }
.spark__bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--mint); border-radius: 0 0 6px 6px; }
.spark__col:hover .spark__bar { background: rgb(255 255 255 / .16); }
.spark__legend { display: flex; gap: 16px; margin: 12px 0 8px; font-size: 12.5px; }
.spark__legend span { display: inline-flex; align-items: center; gap: 7px; }
@keyframes grow-up { from { transform: scaleY(0); } }
.panel .feed--scroll { max-height: 262px; overflow-y: auto; }
.panel__head h2 .i { color: var(--mint); }

/* панель над списком: поиск, фильтры, сортировка */
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 14px; }
.toolbar__count { margin-left: auto; font-size: 13.5px; }
.finder--wide input, .finder--wide input:focus { width: 260px; height: 38px; border-radius: 11px; }
.filters--inline { margin: 0; }
.filter em { margin-left: 5px; font-style: normal; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.filter.is-on em { color: inherit; opacity: .75; }
.select--sm select { height: 38px; border-radius: 11px; }

/* список-таблица, который на телефоне складывается в карточки */
.alist { padding: 6px; }
.alist__head, .alist__row { display: grid; align-items: center; gap: 14px; padding: 0 12px; }
.alist__grid--contests { grid-template-columns: minmax(220px, 1fr) minmax(150px, 230px) 56px 86px 70px 336px; }
.alist__grid--users { grid-template-columns: minmax(180px, 1fr) minmax(140px, 220px) 70px 76px 112px 122px 196px; }
.alist__head { height: 40px; font-size: 12.5px; font-weight: 500; letter-spacing: .03em; color: var(--ink-3); white-space: nowrap; }
.alist__row { min-height: 60px; padding-block: 10px; border-top: 1px solid var(--line); border-radius: 0; transition: background-color .12s; }
.alist__row:hover { background: rgb(255 255 255 / .025); }
.alist__row[hidden] { display: none; }
.alist .num { text-align: right; }
.alist__title { display: inline-flex; align-items: center; gap: 12px; min-width: 0; font-weight: 600; }
.alist__title > span:not(.avatar):not(.chip) { overflow-wrap: break-word; min-width: 0; }
.alist__main { min-width: 0; display: grid; gap: 3px; }
.alist__main .alist__time { padding-left: 34px; font-size: 13px; line-height: 1.35; }
.alist__time b { color: var(--ink); font-variant-numeric: tabular-nums; }
.alist__actions { flex-wrap: wrap; }
.alist__title:hover > span:not(.avatar):not(.chip) { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.alist__chips { display: flex; flex-wrap: wrap; gap: 5px; }
.alist__none { margin: 0; padding: 18px 12px; border-top: 1px solid var(--line); }
.role .i { width: 12px; height: 12px; margin-right: 4px; }

/* быстрые переходы по разделам длинной формы */
.jump { position: sticky; top: 12px; z-index: 15; display: flex; gap: 3px; width: fit-content; max-width: 100%; margin: 0 0 16px; padding: 4px; overflow-x: auto; scrollbar-width: none; border-radius: 13px; background: rgb(17 20 27 / .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: 0 12px 28px -18px rgb(0 0 0 / .9); }
.jump::-webkit-scrollbar { display: none; }
.jump a { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 9px; color: var(--ink-2); font-weight: 500; font-size: 14px; white-space: nowrap; transition: color .15s, background-color .15s; }
.jump a:hover { color: var(--ink); }
.jump a.is-on { background: var(--surface-3); color: var(--ink); }

/* список задач в настройках контеста */
.grip { display: grid; place-items: center; width: 24px; height: 36px; flex: none; margin: 0 -6px 0 -4px; border-radius: 8px; color: var(--ink-3); cursor: grab; touch-action: none; }
.grip:hover { color: var(--ink); background: rgb(255 255 255 / .05); }
.grip .i { width: 16px; height: 16px; }
.adminlist li { transition: background-color .15s, box-shadow .15s; }
.adminlist li.is-dragging { background: var(--surface-3); box-shadow: inset 0 0 0 1px rgb(52 211 153 / .4), 0 18px 36px -18px rgb(0 0 0 / .9); position: relative; z-index: 2; }
.adminlist.is-sorting { cursor: grabbing; user-select: none; }
.adminlist.is-sorting .grip { cursor: grabbing; }
.adminlist__meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px !important; }
.mark { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: rgb(255 255 255 / .05); color: var(--ink-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.mark--bad { background: var(--red-soft); color: var(--red-ink); }
.mark--warn { background: var(--amber-soft); color: var(--amber); }
.mark--on { background: var(--violet-soft); color: var(--violet); }

/* действия над контестом или задачей */
.acts { display: grid; gap: 10px; margin-top: 18px; }
.act { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 14px 16px; border-radius: 14px; background: rgb(255 255 255 / .02); box-shadow: inset 0 0 0 1px var(--line); }
.act > div:first-child { flex: 1; min-width: 220px; }
.act b { display: block; font-weight: 600; }
.act span { color: var(--ink-2); font-size: 14px; }
.act .btn span { color: inherit; }
.act--danger { box-shadow: inset 0 0 0 1px rgb(255 95 109 / .22); }
.act--wide .select select { max-width: 240px; }

/* редактор задачи с предпросмотром */
.pedit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.pedit__form { display: grid; gap: 16px; min-width: 0; }
.pedit__form .form-card + .form-card { margin-top: 0; }
.pedit__preview { display: none; min-width: 0; }
.pedit.is-preview .pedit__preview { display: block; }
.pedit:not(.is-preview) .pedit__form { max-width: 1040px; }
.statement--preview { padding: 22px 26px 28px; }
.statement--preview .statement__head h1 { font-size: 23px; }
.preview__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.preview__bar .kicker { margin: 0; }
.preview__state { font-size: 12.5px; }
.statement--preview .part[hidden] { display: none; }
.statement--preview .hint { pointer-events: none; }
.pedit__toggle.is-on { background: var(--mint-soft); color: var(--mint-ink); box-shadow: inset 0 0 0 1px rgb(52 211 153 / .3); }
@media (min-width: 1280px) {
  .pedit.is-preview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pedit.is-preview .pedit__preview { position: sticky; top: 60px; max-height: calc(100vh - 76px); overflow-y: auto; border-radius: var(--r-card); }
}

.savebar { position: sticky; bottom: 14px; z-index: 12; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 10px 12px; border-radius: 16px; background: rgb(24 28 38 / .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: 0 22px 44px -20px rgb(0 0 0 / .95); }
.save-hint { font-size: 13px; white-space: nowrap; }
.unsaved { display: inline-flex; align-items: center; gap: 7px; color: var(--amber); font-size: 13.5px; font-weight: 500; }
.unsaved[hidden] { display: none; }
.unsaved::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
textarea[data-autosize] { overflow-y: hidden; }

.table-card--flat { margin-top: 18px; box-shadow: none; }
.twocol { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; margin-top: 28px; }
.twocol h3 { font-size: 16px; }
.twocol > form { min-width: 0; }

.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; font-size: 13.5px; }
.pager__nav { display: flex; align-items: center; gap: 12px; }
.pager__nav a:first-child .i { transform: rotate(180deg); }
.pager form { margin-left: auto; }
.pcell__text { display: grid; line-height: 1.3; min-width: 0; }
.pcell__text small { font-size: 12.5px; }
.s-act { width: 1%; text-align: right; }
.s-act form { display: inline; }

/* переключатель «Условие / Решение» — только на телефоне */
.mtabs { display: none; }
.mtabs__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgb(255 255 255 / .08); font: 600 12px var(--font); font-style: normal; color: var(--ink-2); }

/* ---------- адаптив ---------- */

@media (max-width: 1180px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .aside { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .solve { grid-template-columns: minmax(0, 1fr); }
  .workbench { position: static; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-side { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .twocol { grid-template-columns: minmax(0, 1fr); }
}

/* планшет: боковая панель сжимается до значков */
@media (min-width: 901px) and (max-width: 1100px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .app .side { padding-inline: 12px; align-items: center; }
  .app .brand { padding: 0 0 18px; }
  .app .brand span, .app .nav span, .app .side__caption, .app .me__text, .app .guest .btn span,
  .app .search-btn span, .app .search-btn kbd, .app .nav__count, .app .side__art { display: none; }
  .app .search-btn { width: 46px; padding: 0; justify-content: center; }
  .app .side a.nav { width: 46px; justify-content: center; padding: 0; }
  .app .side a.nav[aria-current="page"]::before { left: -12px; }
  .app .side__navs, .app .side__group + .side__group { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .app .me { padding: 6px; background: none; border: 0; flex-direction: column; }
  .app .guest .btn { width: 46px; padding: 0; }
  .main { padding-inline: 28px; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 122px; }
  .app, .app--rail { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }

  /* верхняя панель: логотип, поиск, аккаунт */
  .side, .app--rail .side {
    position: sticky; top: 0; z-index: 30;
    height: 56px; flex-direction: row; align-items: center; gap: 8px;
    padding: 0 12px 0 16px; overflow: visible;
    border-right: 0; border-bottom: 1px solid var(--line);
    background: #0a0c11; backdrop-filter: none; -webkit-backdrop-filter: none;
    view-transition-name: none;
  }
  .brand, .app--rail .brand { padding: 0; font-size: 17px; margin-right: auto; }
  .brand span, .app--rail .brand span { display: inline; }
  .brand svg { width: 28px; height: 28px; }
  .search-btn, .app--rail .search-btn { order: 2; margin: 0; width: 40px; height: 40px; padding: 0; justify-content: center; flex: none; border-color: transparent; background: transparent; color: var(--ink-2); }
  .search-btn .i { width: 20px; height: 20px; }
  .search-btn span, .search-btn kbd { display: none; }
  .side__foot { order: 3; margin: 0; display: flex; padding: 0; }
  .side__art { display: none; }
  .me, .app--rail .me { padding: 0; gap: 2px; background: none; border: 0; flex-direction: row; }
  .me > a:first-child { margin-right: 4px; }
  .me .icon-btn { width: 40px; height: 40px; }
  .me__text { display: none; }
  .guest { display: flex; }
  .guest .btn { height: 36px; padding: 0 12px; font-size: 13.5px; }
  .guest .btn .i { display: none; }
  .app--rail .guest .btn { width: auto; padding: 0 12px; }
  .app--rail .guest .btn span { display: inline; }

  /* нижняя панель вкладок */
  .side__navs, .app--rail .side__navs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; justify-content: center; gap: 2px; width: auto;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgb(12 15 21 / .9); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
    border-top: 1px solid var(--line);
    view-transition-name: tabbar;
  }
  .side__group, .side__group + .side__group, .app--rail .side__group + .side__group { display: contents; margin: 0; padding: 0; border: 0; }
  .side__caption, .nav--desk { display: none !important; }
  .side a.nav, .app--rail .side a.nav {
    flex: 1 1 0; max-width: 108px; width: auto; height: 52px; padding: 0 2px;
    flex-direction: column; justify-content: center; gap: 4px;
    border-radius: 12px; font-size: 10.5px; font-weight: 500; letter-spacing: .01em;
  }
  .side a.nav .i { width: 22px; height: 22px; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
  .side a.nav span, .app--rail .side a.nav span { display: block; white-space: nowrap; text-transform: capitalize; }
  .nav-wide { display: none; }
  .side a.nav:hover { background: transparent; }
  .side a.nav[aria-current="page"] { background: transparent; color: var(--mint-ink); }
  .side a.nav[aria-current="page"] .i { transform: translateY(-1px) scale(1.08); }
  .side a.nav[aria-current="page"]::before, .app--rail .side a.nav[aria-current="page"]::before { display: block; left: 50%; top: -6px; bottom: auto; width: 26px; height: 3px; margin-left: -13px; border-radius: 0 0 3px 3px; }
  .side a.nav:active .i { transform: scale(.9); }
  .nav__count, .app--rail .nav__count { display: grid; position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 17px; padding: 0 5px; font-size: 11px; }

  .main { padding: 18px 16px calc(92px + env(safe-area-inset-bottom, 0px)); }
  .toast { left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .savebar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); gap: 8px; padding: 8px; }
  .savebar .spacer { display: none; }
  .savebar > .btn:first-child { flex: 1 1 auto; }
  .savebar .unsaved { order: 5; flex: 1 1 100%; padding: 0 4px 2px; font-size: 13px; }
  .savebar .pedit__toggle { height: 42px; }
  .jump { top: 64px; }

  /* поля не меньше 16px, иначе iPhone приближает страницу при вводе */
  .input, .textarea, .finder input, .select select, .palette__field input { font-size: 16px; }
  .textarea--code { font-size: 14px; }

  .phead { margin-bottom: 18px; gap: 14px; }
  .phead h1, .chead h1, .profile-head h1 { font-size: 26px; }
  .phead__actions { width: 100%; }
  .block-head h2 { font-size: 18px; }

  /* главная */
  .hero { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .hero__visual { display: none; }
  .hero__actions .btn { flex: 1 1 200px; }
  .minis .mini { flex: 1 1 140px; min-width: 0; gap: 10px; padding: 10px 12px 10px 10px; }
  .minis .mini > .i { width: 30px; height: 30px; padding: 7px; border-radius: 9px; }
  .minis .mini span { white-space: nowrap; }
  /* без серии подпись длинная («серия — решите задачу сегодня»): плашка занимает всю строку */
  .minis .mini:first-child:not(.mini--fire) { flex-basis: 100%; }
  .minis .mini:first-child:not(.mini--fire) span { white-space: normal; }
  .minis .mini > div { min-width: 0; }
  .aside { grid-template-columns: minmax(0, 1fr); }
  .contests { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ccard { padding: 18px; }
  .live { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
  .live h2 { font-size: 22px; }
  .live__btn { width: 100%; }
  .live__balloons { right: 8px; bottom: auto; top: 4px; opacity: .4; }
  .live__balloons img { width: 36px; }
  .live__balloons img:nth-child(2) { width: 44px; margin: 0 -8px; }
  .finder input, .finder input:focus { width: 160px; }
  .finder--wide { flex: 1 1 100%; }
  .finder--wide input, .finder--wide input:focus { width: 100%; }

  /* контест */
  .chead__row { gap: 16px; }
  .chead__row > div:first-child { min-width: 0; }
  .timer { width: 100%; min-width: 0; }
  .tabs { width: 100%; margin-top: 18px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: 1 0 auto; justify-content: center; padding: 0 12px; }
  .plist { padding: 4px; }
  .plist a { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 10px; }
  .plist__stat, .plist a > .i { display: none; }
  .plist .tile--lg { width: 42px; height: 42px; border-radius: 12px; font-size: 17px; }
  .plist__name { font-size: 15.5px; }
  .plist__me .chip > span, .plist__me .verdict { font-size: 12.5px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
  .toolbar .filters { margin-inline: -16px; flex: 1 1 100%; }
  .gate { padding: 34px 20px; }
  .gate .timer__value { font-size: 32px; }

  /* задача */
  .ptop { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px; margin-bottom: 12px; }
  .pnav { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 5px 16px; scrollbar-width: none; }
  .pnav::-webkit-scrollbar { display: none; }
  .pnav a { flex: none; }
  .mtabs { display: flex; position: sticky; top: 64px; z-index: 20; margin-bottom: 12px; background: rgb(17 20 27 / .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 12px 24px -16px rgb(0 0 0 / .9); }
  .mtabs > button { flex: 1; justify-content: center; height: 38px; }
  .solve[data-view="statement"] .workbench, .solve[data-view="code"] .statement { display: none; }
  .statement { padding: 22px 18px 26px; }
  .statement__head { gap: 12px; }
  .statement__head h1 { font-size: 22px; }
  .statement__head .tile--lg { width: 42px; height: 42px; border-radius: 12px; font-size: 17px; }
  .prose { font-size: 15.5px; line-height: 1.65; }
  .prose pre { font-size: 13px; }
  .sample { grid-template-columns: minmax(0, 1fr); }
  .sample__col + .sample__col { border-left: 0; border-top: 1px solid var(--line); }
  .code { height: clamp(240px, calc(100dvh - 446px), 620px); font-size: 14px; }
  .editor__bar { height: 46px; padding-left: 14px; }
  .editor__dots, .editor__lang span, .editor__file span { display: none; }
  .editor__file { padding: 0 9px; }
  .editor__foot { padding: 10px 10px 10px 14px; }
  .editor__keys, .save-hint { display: none; }
  .editor__hint { font-size: 12.5px; }
  .mine__list { max-height: none; }
  .mine__list a { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .mine__list a > span:nth-child(2) { display: none; }

  /* посылки: строки таблицы складываются в карточки */
  .subs thead { display: none; }
  .subs, .subs tbody { display: block; }
  .subs tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "prob prob prob" "who who who" "verdict verdict verdict" "id when time"; align-items: center; gap: 8px 12px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
  .subs tbody tr:last-child { border-bottom: 0; }
  .subs td { display: block; padding: 0; border: 0; min-width: 0; }
  .subs .s-prob { grid-area: prob; font-weight: 600; }
  .subs .s-prob .pcell { display: flex; }
  .subs .s-verdict { grid-area: verdict; }
  .subs .s-verdict .verdict { max-width: 100%; }
  .subs .s-time { grid-area: time; text-align: left; color: var(--ink-3); font-size: 13px; white-space: nowrap; }
  .subs .s-id { grid-area: id; font-size: 13px; }
  .subs .s-id a::before { content: "№ "; }
  .subs .s-when { grid-area: when; font-size: 13px; white-space: nowrap; }
  .subs .s-who { grid-area: who; justify-self: start; margin-top: -4px; font-size: 13px; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .subs .s-who .avatar { width: 22px; height: 22px; border-radius: 7px; font-size: 10px; }
  .subs .s-who .who { display: inline-flex; max-width: 100%; gap: 6px; }
  .subs .s-who .who > span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .subs .s-mem { display: none; }
  .subs .s-act { position: absolute; right: 8px; top: 8px; width: auto; }
  .subs tr { position: relative; }
  .subs tr:has(.s-act) .s-prob { padding-right: 36px; }
  .subbar .select { flex: 1 1 150px; }
  .subbar .select select { width: 100%; max-width: none; }
  .subbar__count { margin-left: 0; flex: 1 1 100%; }
  .pager form { margin-left: 0; }

  /* таблица результатов: место и участник остаются на месте при прокрутке вбок */
  .board-card { overflow-x: auto; overscroll-behavior-x: contain; }
  .board th, .board td { padding-inline: 5px; }
  .board thead th { font-size: 11.5px; letter-spacing: 0; }
  .board .rank { width: 44px; min-width: 44px; padding-inline: 6px; }
  .board .name { max-width: 122px; padding-left: 4px; }
  .board .name .who { max-width: 112px; font-size: 14px; }
  .board .name .who > a, .board .name .who > span:not(.avatar):not(.chip) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .board .name .chip, .board .name .avatar { display: none; }
  .board .solved { width: 50px; font-size: 16px; }
  .board .penalty { width: 50px; font-size: 13px; }
  .board th.pcol, .board td.cell { width: 56px; min-width: 56px; }
  .board td { height: 56px; }
  .hit { width: 50px; height: 42px; }
  .rank-badge { width: 28px; height: 28px; border-radius: 9px; font-size: 13px; }
  .board-bar { font-size: 13px; }
  .board-bar .seg { width: 100%; }
  .board-bar .seg > a { flex: 1; justify-content: center; padding: 0 8px; }
  .legend { font-size: 13px; gap: 8px 16px; }

  /* посылка */
  .sub-head { padding: 18px 16px 0; }
  .sub-head h1 { font-size: 22px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
  .facts div { padding: 12px 16px; }
  .facts div + div { border-left: 0; }
  .tests { padding: 14px 16px; }
  .listing-bar { flex-wrap: wrap; }
  .listing pre { font-size: 12.5px; line-height: 19px; }
  .listing pre span::before { width: 38px; padding-right: 12px; }

  /* профиль */
  .profile-head { padding: 20px 18px; gap: 16px; }
  .profile-head .avatar--xl { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; }
  .profile-head__text { min-width: 0; flex-basis: 180px; }
  .profile-head__actions { width: 100%; }
  .profile-head__actions .btn { flex: 1; }
  .stats-row { gap: 10px; margin-bottom: 22px; }
  .stat { padding: 16px; }
  .stat b { font-size: 26px; }
  .stat__icon { right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 10px; }
  .stat__icon .i { width: 17px; height: 17px; }
  .block-card { padding: 18px 16px; }
  .badges { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
  .cprog a { grid-template-columns: 20px minmax(0, 1fr) 52px; }
  .cprog .bar { display: none; }

  /* вход */
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__art { display: none; }
  .auth__form { padding: 30px 22px; }
  .auth-page { padding: 20px 14px; align-items: start; padding-top: 8vh; }

  /* формы и админка */
  .form-grid--2, .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .form-card { padding: 20px 16px; }
  .block-head__tools { flex-wrap: wrap; }
  .form-actions .btn { flex: 1 1 auto; }
  .switch { padding: 14px; }
  .pick { padding: 12px; }
  .pick__head .finder { margin-left: 0; flex: 1 1 100%; }
  .pick__head .finder input, .pick__head .finder input:focus { width: 100%; }
  .pick__list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .launch__art { display: none; }
  .launch__step .seg { max-width: 100%; overflow-x: auto; }
  .seg > a, .seg > button, .seg label span { padding: 0 11px; }
  .adminlist li { flex-wrap: wrap; gap: 8px 10px; padding: 12px; }
  .adminlist__title { flex: 1 1 calc(100% - 92px); }
  .adminlist li > form:first-of-type { margin-left: auto; }
  .btn__label { display: none; }
  .act .btn, .act .select { flex: 1 1 auto; }
  .act .select select { width: 100%; max-width: none; }
  .ttable td.io { max-width: 150px; }
  .ttable th:nth-child(3), .ttable td:nth-child(3), .ttable th:nth-child(4), .ttable td:nth-child(4) { display: none; }
  .table th, .table td { padding-inline: 10px; }
  .statement--preview { padding: 18px 16px 22px; }

  .now { padding: 16px; }
  .now__actions { width: 100%; }
  .now__actions .btn { flex: 1 1 auto; }
  .now__meta { display: block; }
  .afeed__row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; align-items: start; padding: 11px 10px; }
  .afeed__row .avatar { grid-row: 1 / span 2; margin-top: 2px; }
  .afeed__text { grid-column: 2; grid-row: 1; }
  .afeed__text small { display: none; }
  .afeed__time { grid-column: 3; grid-row: 1; align-self: center; }
  .afeed__row .verdict { grid-column: 2 / -1; grid-row: 2; justify-self: start; max-width: 100%; font-size: 12.5px; padding: 0 9px 0 8px; height: 26px; }

  /* окна — снизу, как лист */
  .dialog { width: 100%; max-width: 100%; margin: auto 0 0; }
  .dialog__box { border-radius: 22px 22px 0 0; border-bottom: 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px)); animation: sheet-in .26s cubic-bezier(.2, .8, .2, 1); }
  .dialog.is-closing .dialog__box { animation: sheet-out .16s ease forwards; }
  .dialog__actions .btn { flex: 1; height: 46px; }
  .palette { padding: 0; align-items: end; }
  .palette__box { width: 100%; border-radius: 22px 22px 0 0; border-bottom: 0; animation: sheet-in .26s cubic-bezier(.2, .8, .2, 1); }
  .palette__list { max-height: 56vh; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .palette__foot { display: none; }
}
@media (max-width: 1360px) {
  /* списки админки — карточками */
  .alist { padding: 2px 6px; }
  .alist__head { display: none !important; }
  .alist__row, .alist__grid--contests, .alist__grid--users { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 8px; }
  .alist__row:first-of-type, .alist__head + .alist__row { border-top: 0; }
  .alist__row > * { display: block; }
  .alist__title { display: flex !important; flex: 1 1 100%; font-size: 16px; }
  .alist__chips { display: flex !important; flex: 1 1 100%; }
  .alist__main { display: grid !important; flex: 1 1 100%; }
  .alist__main .alist__time { padding-left: 34px; }
  .alist__row > [data-l] { font-size: 13.5px; color: var(--ink); text-align: left; }
  .alist__row > [data-l]::before { content: attr(data-l) ": "; color: var(--ink-3); }
  .alist__actions { display: flex !important; flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; margin-top: 2px; }
  .alist__actions { gap: 4px; }
  .alist__actions .icon-btn { width: 38px; height: 38px; background: rgb(255 255 255 / .04); }
  .alist__actions .btn--sm { height: 38px; padding: 0 11px; }
}

@media (max-width: 900px) {
  .toolbar__count { margin-left: 0; }
  .toolbar .select { flex: 1 1 100%; }
  .toolbar .select select { width: 100%; max-width: none; }
}

@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
@keyframes sheet-out { to { transform: translateY(40px); opacity: 0; } }

@media (max-width: 520px) {
  .tabs .i { display: none; }
  .tabs a { padding: 0 9px; font-size: 14px; }
  .stat b { font-size: 24px; }
  .stat span { font-size: 13px; }
  .hero__actions .btn { flex-basis: 100%; }
  .profile-head h1 { font-size: 23px; }
  .meter__head b { font-size: 18px; }
}

/* наведение есть только у мыши: на телефоне нажатая строка не «залипает» подсвеченной */
@media (hover: none) {
  .plist a:hover, .feed li a:hover, .afeed__row:hover, .alist__row:hover, .table tbody tr:hover, .mine__list a:hover { background: transparent; }
  .plist a:active, .feed li a:active, .afeed__row:active, .mine__list a:active { background: rgb(255 255 255 / .05); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
}

/* ---------- финальные штрихи ---------- */

/* активная вкладка «перетекает» на новое место при переходе между страницами раздела */
.tabs a[aria-current="page"] { view-transition-name: tab-active; }
::view-transition-group(tab-active) { animation-duration: .28s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }

/* кнопки чуть приподнимаются под курсором */
@media (hover: hover) {
  .btn:not(.btn--danger):not(.btn--sm):hover { transform: translateY(-1px); }
  .btn:not(.btn--danger):not(.btn--sm):active { transform: translateY(1px); }
  .btn--mint:hover { box-shadow: 0 10px 24px -12px rgb(52 211 153 / .7); }
}

/* кнопка ждёт ответа сервера */
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading > .i:first-child, .icon-btn.is-loading > .i { animation: spin .8s linear infinite; }
.btn.is-loading:not(:has(> .i))::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* вердикт, пока идёт проверка, переливается */
.verdict--pending { background-image: linear-gradient(100deg, transparent 20%, rgb(96 165 250 / .22) 50%, transparent 80%); background-size: 220% 100%; animation: shimmer 1.8s linear infinite; }

/* подсказка раскрывается мягко */
.hint[open] .hint__body { animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.hint summary .i { transition: transform .25s; }
.hint[open] summary .i { transform: rotate(18deg) scale(1.1); }

/* метка текущего раздела в боковой панели */
.side a.nav[aria-current="page"]::before { animation: nav-in .35s cubic-bezier(.2, .8, .2, 1) both; transform-origin: center; }
@keyframes nav-in { from { transform: scaleY(0); opacity: 0; } }

.dialog__box p[data-text] { color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.dialog::backdrop { background: rgb(4 6 10 / .58); }

@media (min-width: 600px) and (max-width: 900px) {
  .sample { grid-template-columns: 1fr 1fr; }
  .sample__col + .sample__col { border-left: 1px solid var(--line); border-top: 0; }
  .contests { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 900px) {
  .side a.nav[aria-current="page"]::before { animation: tab-in .3s cubic-bezier(.2, .8, .2, 1) both; }
}
@keyframes tab-in { from { transform: scaleX(0); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .verdict--pending, .side a.nav[aria-current="page"]::before { animation: none !important; }
}

/* таблица результатов: место и участник не уезжают при прокрутке вбок */
.board .rank, .board .name { position: sticky; z-index: 2; background: var(--surface); }
.board .rank { left: 0; }
.board .name { left: 64px; }
.board thead .rank, .board thead .name { z-index: 3; }
.board tr.is-me .rank, .board tr.is-me .name { background: #101c1b; }
.board tbody tr:hover .rank, .board tbody tr:hover .name { background: #13161d; }
.board tbody tr.is-me:hover .rank, .board tbody tr.is-me:hover .name { background: #11201e; }
.board-card.is-scrolled .name { box-shadow: 10px 0 14px -10px rgb(0 0 0 / .9); }
.board .name { transition: box-shadow .2s; }
@media (max-width: 900px) {
  .board .name { left: 44px; box-shadow: none; }
}

/* планшет: карточки списков админки в две колонки */
@media (min-width: 640px) and (max-width: 1360px) {
  .alist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; align-items: start; }
  .alist .alist__row { border: 0; border-radius: 14px; padding: 14px; background: rgb(255 255 255 / .02); box-shadow: inset 0 0 0 1px var(--line); height: 100%; align-content: flex-start; }
  .alist__none { grid-column: 1 / -1; border-top: 0; }
}

/* совсем узкие телефоны */
@media (max-width: 900px) {
  .ccard__top { flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  .ccard__people { margin-left: auto; }
}
@media (max-width: 380px) {
  .afeed__time { display: none; }
  .afeed__text { grid-column: 2 / -1; }
  .main { padding-inline: 12px; }
  .pnav, .filters, .toolbar .filters { margin-inline: -12px; padding-inline: 12px; }
  .side, .app--rail .side { padding: 0 8px 0 12px; }
}

/* длинные плашки (про грейдер, запрещённые функции) на телефоне переносятся, а не вылезают за экран */
.chip { max-width: 100%; }
@media (max-width: 900px) {
  .statement__limits .chip, .meta .chip { height: auto; min-height: 28px; padding-block: 4px; white-space: normal; border-radius: 14px; text-align: left; line-height: 1.3; }
  .statement__limits .chip > span, .meta .chip > span { min-width: 0; }
}

/* поля в одной строке формы выравниваются по верху, даже если под одним из них есть подсказка */
.form-grid--2, .form-grid--3 { align-items: start; }

/* ---------- разбор теста из условия ---------- */

.breakdown { margin-top: 16px; padding: 22px 24px 24px; border-color: rgb(255 95 109 / .22); }
.breakdown__kicker { color: var(--red-ink); margin-bottom: 8px; }
.breakdown h2 { font-size: 19px; }
.breakdown > p { margin: 6px 0 0; max-width: 78ch; font-size: 14.5px; }
.breakdown__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--sunken); }
.breakdown__grid.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.breakdown__grid .sample__col { min-width: 0; }
.breakdown__grid .sample__head { padding-right: 14px; }
.breakdown__grid .sample__head:has(.copy) { padding-right: 6px; }
.breakdown pre { margin: 0; padding: 12px 14px 14px; max-height: 380px; overflow: auto; font: 400 13.5px/1.6 var(--mono); font-variant-ligatures: none; white-space: pre; color: #e3e6ee; }
.breakdown pre span { display: block; min-height: 1.6em; margin: 0 -8px; padding: 0 8px; border-radius: 6px; }
.breakdown__got pre span.is-bad { background: rgb(255 95 109 / .16); color: #ffc7cc; }
.breakdown__want pre span.is-bad { background: rgb(52 211 153 / .14); color: var(--mint-ink); }
.breakdown__got .sample__head { color: var(--red-ink); }
.breakdown__want .sample__head { color: var(--mint-ink); }
.breakdown__none { margin: 0; padding: 14px; color: var(--ink-3); font-size: 14px; }
.breakdown__note { margin: 12px 2px 0 !important; font-size: 13.5px !important; }

.minifail { display: grid; gap: 10px; margin: 6px 2px 4px; padding: 12px 12px 10px; border-radius: 14px; background: rgb(255 95 109 / .06); border: 1px solid rgb(255 95 109 / .2); transition: background-color .15s, border-color .15s; animation: rise .4s cubic-bezier(.2, .8, .2, 1) both; }
.minifail:hover { background: rgb(255 95 109 / .09); border-color: rgb(255 95 109 / .32); }
.minifail b { font-weight: 600; font-size: 14.5px; color: var(--red-ink); }
.minifail__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.minifail__col { display: grid; align-content: start; gap: 5px; min-width: 0; padding: 8px 10px 10px; border-radius: 10px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
.minifail__col small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.minifail__col code { display: block; font: 400 12.5px/1.55 var(--mono); font-variant-ligatures: none; color: #e3e6ee; overflow: hidden; }
.minifail__col code span { display: block; min-height: 1.55em; margin: 0 -5px; padding: 0 5px; border-radius: 5px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.minifail__col--got code span.is-bad { background: rgb(255 95 109 / .16); color: #ffc7cc; }
.minifail__col--want code span.is-bad { background: rgb(52 211 153 / .14); color: var(--mint-ink); }
.minifail__col em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.minifail__more { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.minifail__more .i { width: 15px; height: 15px; transition: transform .2s; }
.minifail:hover .minifail__more { color: var(--ink); }
.minifail:hover .minifail__more .i { transform: translateX(3px); }

@media (max-width: 900px) {
  .breakdown { padding: 18px 16px 20px; }
  .breakdown__grid, .breakdown__grid.is-two { grid-template-columns: minmax(0, 1fr); }
  .breakdown__grid .sample__col + .sample__col { border-left: 0; border-top: 1px solid var(--line); }
  .breakdown pre { max-height: 260px; }
}

/* ---------- длинные слова без пробелов ---------- */

/* название из одного длинного слова или длинный логин переносится, а не растягивает страницу */
h1, h2, h3,
.plist__name, .feed__text b, .adminlist__title a, .now h3, .live h2, .ccard h3,
.me__name, .dialog__box p, .act b, .invite__code code,
.alist__title > span:not(.avatar):not(.chip) { overflow-wrap: anywhere; }
.crumbs { flex-wrap: wrap; row-gap: 2px; }
.crumbs > * { min-width: 0; overflow-wrap: anywhere; }
.statement__head h1, .pcell > h1, .pcell > div, .who-title > span:last-child,
.phead > div:first-child, .chead__row > div:first-child, .live__text, .now__main,
.sub-head > .pcell, .profile-head h1 { min-width: 0; }
.sub-head > .pcell { flex: 1 1 240px; }
/* в таблицах ширину столбца задаёт самое длинное слово, а сама таблица прокручивается */
.table td, .table th { overflow-wrap: break-word; }
/* длинный тег не шире своего контейнера */
.mark, .tag-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mark { display: inline-block; line-height: 22px; }
.tag-chip { display: inline-block; line-height: 22px; }
.statement__limits .tag-chip { line-height: 28px; }
.adminlist__meta, .plist__tags { min-width: 0; max-width: 100%; }

/* на узком телефоне статус задачи уходит под название — названию остаётся вся ширина, слова не рвутся */
@media (max-width: 430px) {
  .plist a { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
  .plist a > .tile { grid-row: 1 / span 2; align-self: start; }
  .plist__me { grid-column: 2; justify-self: start; }
  .plist__me:not(:has(*)) { display: none; }
}
