/* ФАЯНС · Конкурсы (ct-) */
.ct { padding-bottom: 120px; }
.ct-muted { color: var(--mute); font-size: 14px; margin: 0; }
.ct-label { display: block; font: 600 11px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.ct-in { animation: ctUp .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes ctUp { from { opacity: 0; transform: translateY(26px); } }
@media (prefers-reduced-motion: reduce) { .ct-in, .ct-step, .ct-r, .ct-shot, .ct-pin { animation: none !important; } }

.ct-hero { padding: 24px 0 40px; border-bottom: 1px solid var(--rule); margin-bottom: 40px; }
.ct-h1 { font-size: clamp(52px, 9vw, 128px); line-height: .92; letter-spacing: -.02em; }
.ct-h1--d { font-size: clamp(40px, 7vw, 96px); overflow-wrap: anywhere; }
.ct-h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.ct-btn-line { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.ct-btn-line::after { background: var(--porcelain-2); }
.ct-btn-quiet { color: var(--mute); }
.ct-btn-danger { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 40%, transparent); }

/* ----- карточки ----- */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 24px; }
.ct-card { display: flex; flex-direction: column; text-decoration: none; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s; }
.ct-card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -24px rgba(0,0,0,.28); border-color: var(--brass); }
.ct-card__cover { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(120% 120% at 20% 10%, var(--brass-hi), var(--brass) 45%, var(--night) 100%); overflow: hidden; }
.ct-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ct-card:hover .ct-card__cover img { transform: scale(1.06); }
.ct-card__num { position: absolute; right: 18px; bottom: -22px; font: 500 150px/1 var(--serif); color: rgba(244, 241, 234, .9); transition: transform .8s var(--ease); }
.ct-card:hover .ct-card__num { transform: translateY(-10px) rotate(-4deg); }
.ct-card__body { padding: 20px 22px 24px; display: grid; gap: 8px; }
.ct-card__meta { margin: 0; font-size: 12px; letter-spacing: .06em; color: var(--mute); }
.ct-card__t { font-size: 30px; line-height: 1.02; overflow-wrap: anywhere; }
.ct-card__d { margin: 0; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-card__when { margin: 4px 0 0; font: italic 400 18px var(--serif); color: var(--brass); }
.ct-pill { display: inline-block; padding: 5px 10px; border-radius: 999px; font: 600 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); }
.ct-card__cover .ct-pill { position: absolute; left: 14px; top: 14px; }
.ct-pill--live { background: var(--ok); color: #fff; border-color: transparent; }
.ct-pill--live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; animation: ctPulse 1.4s ease-in-out infinite; }
@keyframes ctPulse { 50% { opacity: .25; } }
.ct-pill--proposed { background: var(--brass-hi); color: #14161A; }
.ct-pill--rejected { color: var(--rose); }
.ct-bar { height: 6px; border-radius: 3px; background: var(--porcelain-2); overflow: hidden; }
.ct-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brass), var(--brass-hi)); border-radius: inherit; transition: width 1.2s var(--ease); }
.ct-bar i.is-full { background: linear-gradient(90deg, var(--ok), var(--brass-hi)); }
.ct-empty { padding: 60px 0; display: grid; gap: 12px; justify-items: start; grid-column: 1 / -1; }
.ct-empty__t { font: italic 400 34px var(--serif); margin: 0; }

/* ----- страница конкурса ----- */
.ct-back { display: inline-block; margin: 8px 0 18px; font-size: 13px; color: var(--mute); text-decoration: none; }
.ct-back:hover { color: var(--brass); }
.ct-dhero { position: relative; padding: 8px 0 36px; border-bottom: 1px solid var(--rule); }
.ct-dhero.has-cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
.ct-dhero__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; animation: ctReveal 1.2s var(--ease) both; }
@keyframes ctReveal { from { clip-path: inset(0 0 100% 0); transform: scale(1.06); } }
.ct-dhero__meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; font-size: 13px; color: var(--mute); }
.ct-when { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 22px 0 0; font-size: 14px; color: var(--mute); }
.ct-when b { font: italic 500 20px var(--serif); color: var(--brass); }
.ct-prize { margin: 14px 0 0; font: 400 22px var(--serif); }
.ct-prize span { font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); margin-right: 12px; }
.ct-join { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-join input { height: 52px; min-width: 0; width: 210px; max-width: 100%; padding: 0 18px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink); font: 500 15px var(--sans); }
.ct-join input[name=code] { width: 130px; letter-spacing: .24em; text-transform: uppercase; font-weight: 700; }
.ct-join input:focus { outline: none; border-color: var(--brass); }
.ct-team { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 22px; padding: 16px 18px; border: 1px dashed var(--brass); border-radius: 4px; }
.ct-team .ct-label { margin: 0; width: 100%; }
.ct-team b { font: 500 24px var(--serif); }
.ct-code { font: 700 18px/1 var(--sans); letter-spacing: .3em; padding: 8px 10px 8px 14px; background: var(--ink); color: var(--porcelain); border-radius: 3px; }
.ct-copy { border: 0; background: none; color: var(--brass); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.ct-team__m { font-size: 13px; color: var(--mute); margin-left: auto; }

.ct-win { margin: 32px 0 0; padding: 26px 28px; background: var(--night); color: var(--night-fg); border-radius: 4px; position: relative; overflow: hidden; }
.ct-win::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(226, 200, 143, .18) 50%, transparent 70%); transform: translateX(-100%); animation: ctShine 3.2s var(--ease) 1s infinite; }
@keyframes ctShine { 60%, 100% { transform: translateX(100%); } }
.ct-win__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.ct-win__row b { font: 500 34px var(--serif); }
.ct-win__row span:last-child { color: rgba(238, 232, 220, .6); font-size: 13px; }
.ct-crown { color: var(--brass-hi); font-size: 30px; display: inline-block; animation: crown 2.4s ease-in-out infinite; }
.ct-admin { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; padding: 14px 16px; background: var(--porcelain-2); border-radius: 4px; }
.ct-admin .ct-label { margin: 0 8px 0 0; }
.ct-admin .btn { height: 40px; padding: 0 18px; font-size: 13px; }

.ct-route { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; margin-top: 40px; align-items: start; }
.ct-map { position: sticky; top: 88px; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
#ctMap { height: min(70vh, 560px); background: var(--porcelain-2); }
.ct-nomap { padding: 24px; }
:root[data-theme="dark"] #ctMap .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) saturate(.4) brightness(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #ctMap .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) saturate(.4) brightness(.9); } }
.ct-pin { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--porcelain); font: 700 13px var(--sans);
  border: 2px solid var(--brass-hi); box-shadow: 0 6px 14px rgba(0,0,0,.3); animation: ctDrop .7s var(--ease) both; animation-delay: calc(var(--i) * 110ms + .3s); }
.ct-pin.is-done { background: var(--ok); border-color: #fff; }
@keyframes ctDrop { from { opacity: 0; transform: translateY(-30px) scale(.5); } }
.ct-poly { stroke-dashoffset: 0; animation: ctDash 1.6s linear infinite; }
@keyframes ctDash { to { stroke-dashoffset: -28; } }

.ct-list { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 22px; }
.ct-list__head { display: flex; gap: 20px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.ct-list__head .eyebrow { margin-bottom: 10px; }
.ct-list__h { margin: 0; font: 500 26px/1.05 var(--serif); }
.ct-ring { position: relative; width: var(--s); height: var(--s); flex: none; }
.ct-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ct-ring circle { fill: none; stroke-width: 8; }
.ct-ring__bg { stroke: var(--porcelain-2); }
.ct-ring__fg { stroke: var(--brass); stroke-linecap: round; transition: stroke-dashoffset 1.6s var(--ease); }
.ct-ring__n { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ct-ring__n b { font: 500 44px/1 var(--serif); }
.ct-ring__n span { font-size: 12px; color: var(--mute); }
.ct-steps { list-style: none; margin: 0; padding: 0; }
.ct-step { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); cursor: pointer;
  animation: ctUp .7s var(--ease) both; animation-delay: calc(var(--i) * 60ms + .2s); }
.ct-step:last-child { border-bottom: 0; }
.ct-step__n { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule); display: grid; place-items: center; font: 500 18px var(--serif); transition: background .5s, color .5s, transform .5s var(--ease); }
.ct-step:hover .ct-step__n { transform: scale(1.1); border-color: var(--brass); }
.ct-step.is-done .ct-step__n { background: var(--ok); color: #fff; border-color: transparent; font: 700 14px var(--sans); }
.ct-step.is-locked { opacity: .5; }
.ct-step__b { display: grid; min-width: 0; }
.ct-step__b b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.ct-step.is-done .ct-step__b b { text-decoration: line-through; text-decoration-color: var(--brass); }
.ct-step__b small { font-size: 12px; color: var(--mute); overflow-wrap: anywhere; }
.ct-geo { font-size: 12px; color: var(--mute); }
.ct-geo.is-near { color: var(--ok); }
.ct-geo.is-near::before { content: "● "; }
.ct-step__go { border: 1px solid var(--brass); background: transparent; color: var(--ink); border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 600; transition: background .3s, color .3s; white-space: nowrap; }
.ct-step__go:hover { background: var(--brass); color: #14161A; }
.ct-step__ph { grid-column: 2 / -1; width: 72px; height: 72px; object-fit: cover; border-radius: 3px; }

.ct-board { margin-top: 56px; }
.ct-board__head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.ct-tabs { min-width: 240px; }
.ct-rows { display: grid; gap: 4px; }
.ct-rows__empty { padding: 20px 0; }
.ct-rows[hidden] { display: none; }
#ctMap { position: relative; z-index: 0; isolation: isolate; }
.ct-r { display: grid; grid-template-columns: 34px auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; border-radius: 4px; animation: ctUp .7s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.ct-r.is-me { background: color-mix(in srgb, var(--brass) 12%, transparent); }
.ct-r__pos { font: 500 22px var(--serif); text-align: center; color: var(--mute); }
.ct-r:nth-child(1) .ct-r__pos { color: var(--brass); font-size: 26px; }
.ct-r__ava { display: flex; }
.ct-r__ava .kit-ava + .kit-ava { margin-left: -10px; }
.ct-r__b { display: grid; gap: 6px; min-width: 0; }
.ct-r__top { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.ct-r__top a, .ct-r__top b { text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-r__top span { color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-r .ct-bar { height: 8px; }

.ct-feed { margin-top: 56px; }
.ct-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 16px; margin-top: 20px; }
.ct-shot { margin: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; animation: ctUp .7s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.ct-shot img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.ct-shot:hover img { transform: scale(1.04); }
.ct-shot figcaption { display: flex; gap: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.35; }
.ct-shot small { display: block; color: var(--mute); font-size: 11px; }
.ct-rules { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--rule); max-width: 720px; }
.ct-rules p:last-child { font: 400 20px/1.5 var(--serif); margin: 0; white-space: pre-line; }
.ct-author { margin-top: 32px; }

/* ----- модалки ----- */
.ct-create__box, .ct-proof, .ct-inv { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; }
.ct-create__box textarea, .ct-create__box select { font: 400 17px var(--serif); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: 6px 0; resize: vertical; }
.ct-create__box select { font: 500 15px var(--sans); }
.ct-create__box select option { background: var(--paper); }
.ct-create__box input[type=datetime-local] { font: 500 14px var(--sans); }
.ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ct-row > * { min-width: 0; }
.kit-modal__box .ct-check { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font: 500 14px var(--sans); color: var(--ink); }
.kit-modal__box .ct-check input { width: 18px; height: 18px; accent-color: var(--brass); }
.ct-cover__slot, .ct-proof__ph { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ct-cover__slot img { width: 96px; height: 54px; object-fit: cover; border-radius: 3px; }
.ct-proof__ph img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 4px; animation: ctReveal .8s var(--ease) both; }
.ct-proof__t { font-size: 32px; line-height: 1.05; }
.ct-picked { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.ct-picked li { display: grid; grid-template-columns: 26px minmax(0, 1fr) 30px 30px; gap: 8px; align-items: center; padding: 6px 8px; background: var(--porcelain-2); border-radius: 3px; font-size: 13px; animation: ctUp .4s var(--ease); }
.ct-picked b { font: 500 18px var(--serif); color: var(--brass); }
.ct-picked span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-picked button { border: 1px solid var(--rule); background: var(--paper); border-radius: 50%; width: 28px; height: 28px; padding: 0; }
.ct-picked button:disabled { opacity: .3; }
.ct-search { width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink); font: 400 14px var(--sans); }
.ct-vlist { margin-top: 8px; max-height: 220px; overflow-y: auto; display: grid; gap: 2px; border: 1px solid var(--rule); border-radius: 4px; padding: 4px; }
.ct-vopt { display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 3px; font-size: 13px; }
.ct-vopt small { color: var(--mute); white-space: nowrap; }
.ct-vopt:hover { background: var(--porcelain-2); }
.ct-vopt.is-on { background: color-mix(in srgb, var(--brass) 18%, transparent); }
.ct-vopt.is-on span::before { content: "✓ "; color: var(--brass); font-weight: 700; }
.ct-inv__list { display: grid; gap: 4px; }
.ct-inv__u { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px; border: 0; background: none; border-radius: 4px; text-align: left; }
.ct-inv__u:hover { background: var(--porcelain-2); }
.ct-inv__u small { display: block; color: var(--mute); font-size: 12px; }
.ct-inv__u b { font-size: 12px; color: var(--brass); }
.ct-inv__u.is-sent b { color: var(--ok); }

.ct-badge__box { text-align: center; justify-items: center; }
.ct-badge__box .eyebrow { justify-content: center; margin: 0; }
.ct-badge__t { font-size: 40px; line-height: 1; }
.ct-medal { width: 140px; height: 140px; animation: ctMedal 1.4s var(--ease) both; filter: drop-shadow(0 18px 28px rgba(176, 141, 87, .45)); }
@keyframes ctMedal { 0% { transform: scale(.2) rotateY(540deg); opacity: 0; } 70% { transform: scale(1.08) rotateY(0); opacity: 1; } 100% { transform: none; } }
.ct-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 200; }

@media (max-width: 900px) {
  .ct-route, .ct-dhero.has-cover { grid-template-columns: minmax(0, 1fr); }
  .ct-map { position: relative; top: 0; }
  #ctMap { height: 340px; }
  .ct-dhero__img { aspect-ratio: 16 / 10; }
}
@media (max-width: 520px) {
  .ct-row { grid-template-columns: 1fr; }
  .ct-list { padding: 16px; }
  .ct-list__head { gap: 14px; }
  .ct-ring { --s: 104px !important; }
  .ct-ring__n b { font-size: 34px; }
  .ct-step { grid-template-columns: 34px minmax(0, 1fr); }
  .ct-step__go { grid-column: 2; justify-self: start; }
  .ct-actions .btn { flex: 1 1 auto; }
  .ct-join, .ct-join input, .ct-join .btn { width: 100%; }
  .ct-team__m { margin-left: 0; }
  .ct-r { grid-template-columns: 28px auto minmax(0, 1fr); gap: 10px; padding: 10px 6px; }
}
