/* ============ BlindPick — лотерейный стиль ============ */
:root {
    --bg: #140a2b;
    --bg-2: #1e1140;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-2: rgba(255, 255, 255, 0.1);
    --line: rgba(255, 255, 255, 0.14);
    --text: #fff8ec;
    --muted: rgba(255, 248, 236, 0.68);
    --paper: #fff6e4;
    --paper-2: #ffecc7;
    --ink: #2b1a4d;
    --ink-muted: #6d5e8c;
    --gold: #ffc53d;
    --gold-2: #ff9f1c;
    --coral: #ff5b6e;
    --mint: #2fd6a3;
    --violet: #8b6cff;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55);
    --font-display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 500px at 12% -10%, rgba(255, 91, 110, 0.28), transparent 60%),
        radial-gradient(800px 520px at 100% 10%, rgba(139, 108, 255, 0.3), transparent 60%),
        radial-gradient(900px 600px at 50% 110%, rgba(255, 197, 61, 0.16), transparent 60%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* Мелкие «блёстки» на фоне */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,.55), transparent 60%),
        radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,.45), transparent 60%),
        radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.5), transparent 60%),
        radial-gradient(1.5px 1.5px at 85% 65%, rgba(255,255,255,.4), transparent 60%),
        radial-gradient(1px 1px at 10% 70%, rgba(255,255,255,.45), transparent 60%),
        radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,.35), transparent 60%);
    background-size: 600px 600px;
    opacity: .7;
    z-index: 0;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 .5em;
}
h1 { font-size: clamp(1.7rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.3rem, 3.2vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}
.wrap-narrow { max-width: 720px; }

main { flex: 1 0 auto; padding: 24px 0 64px; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}
.kicker::before {
    content: '';
    width: 22px; height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.accent {
    background: linear-gradient(90deg, var(--gold), var(--coral));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------------- Шапка ---------------- */
.site-header { position: relative; z-index: 5; padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
}
.logo:hover { text-decoration: none; }
.logo-mark {
    width: 36px; height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), var(--coral));
    color: var(--ink);
    font-size: 1.1rem;
    transform: rotate(-8deg);
    box-shadow: 0 6px 18px -6px rgba(255, 91, 110, .7);
}
.logo small {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .7rem;
    color: var(--muted);
    letter-spacing: .02em;
}
.nav { display: flex; align-items: center; gap: 8px; }
.nav a:not(.btn) { color: var(--text); font-weight: 600; padding: 8px 10px; border-radius: 10px; font-size: .95rem; }
.nav a:not(.btn):hover { background: var(--surface); text-decoration: none; }
.nav .count {
    display: inline-grid; place-items: center;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px; background: var(--coral); color: #fff;
    font-size: .72rem; font-weight: 800; margin-left: 4px;
}
@media (max-width: 560px) {
    .logo small { display: none; }
    .nav .btn { padding: 10px 14px; }
    .nav .hide-sm { display: none; }
}

/* ---------------- Кнопки ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    border: 0;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.1;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
    color: var(--ink);
    box-shadow: 0 10px 24px -8px rgba(255, 159, 28, .75), inset 0 -2px 0 rgba(0,0,0,.12);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(255, 159, 28, .85), inset 0 -2px 0 rgba(0,0,0,.12); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: #ff8a97; border: 1px solid rgba(255, 91, 110, .4); }
.btn-danger:hover { background: rgba(255, 91, 110, .12); }
.btn-lg { padding: 17px 30px; font-size: 1.08rem; }
.btn-sm { padding: 9px 14px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-tg { background: #2aabee; color: #fff; }
.btn-wa { background: #25d366; color: #0b2e1a; }
.btn-vk { background: #0077ff; color: #fff; }
.btn-tg:hover, .btn-wa:hover, .btn-vk:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ---------------- Панели и формы ---------------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.panel + .panel { margin-top: 16px; }
.panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-title h2, .panel-title h3 { margin: 0; }

.step-num {
    flex: none;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: .85rem;
}

label.field-label { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 6px; }

.input, textarea.input {
    width: 100%;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--line);
    background: rgba(0, 0, 0, .22);
    color: var(--text);
    font: inherit;
    font-size: 16px; /* без зума на iOS */
    transition: border-color .15s, background .15s;
}
.input::placeholder { color: rgba(255, 248, 236, .38); }
.input:focus { outline: none; border-color: var(--gold); background: rgba(0, 0, 0, .3); }

.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .9rem; min-width: 0; }
@media (max-width: 480px) {
    .copy-field { flex-direction: column; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .15s;
}
.chip:hover { background: var(--surface-2); border-color: rgba(255, 197, 61, .5); text-decoration: none; transform: translateY(-1px); }

.option-row { display: flex; gap: 8px; align-items: flex-start; }
.option-row + .option-row { margin-top: 10px; }
.option-row .option-num {
    flex: none; width: 34px; height: 48px;
    display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 800; font-size: .8rem;
    color: var(--gold);
}
.option-row .option-fields { flex: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; min-width: 0; }
.option-row .icon-btn { margin-top: 4px; }
@media (max-width: 600px) {
    .option-row .option-fields { grid-template-columns: 1fr; }
    .option-row .option-num { height: 40px; width: 24px; }
}
.icon-btn {
    flex: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
}
.icon-btn:hover:not(:disabled) { color: #ff8a97; border-color: rgba(255, 91, 110, .5); }
.icon-btn:disabled { opacity: .3; cursor: default; }

.switch { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
    flex: none; position: relative;
    width: 48px; height: 28px; border-radius: 14px;
    background: rgba(255,255,255,.18);
    transition: background .2s;
}
.switch .track::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #fff; transition: transform .2s;
}
.switch input:checked + .track { background: var(--mint); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 91, 110, .45);
    background: rgba(255, 91, 110, .12);
    margin-bottom: 16px;
}
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { border-color: rgba(47, 214, 163, .45); background: rgba(47, 214, 163, .12); }
.alert-info { border-color: rgba(255, 197, 61, .4); background: rgba(255, 197, 61, .1); }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 999px;
    font-size: .8rem; font-weight: 800;
    background: var(--surface-2);
}
.pill-wait { background: rgba(255, 197, 61, .16); color: var(--gold); }
.pill-done { background: rgba(47, 214, 163, .16); color: var(--mint); }
.pill-wait::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: currentColor; animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------------- Лотерейный билет ---------------- */
.tickets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.tickets.tickets-many { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (max-width: 520px) {
    .tickets.tickets-many { grid-template-columns: 1fr 1fr; gap: 12px; }
    .tickets.tickets-many .ticket-stub { font-size: .62rem; padding: 7px 10px 5px; justify-content: center; }
    .tickets.tickets-many .ticket-stub span:first-child { display: none; }
    .tickets.tickets-many .ticket-window { aspect-ratio: 1 / 1; margin: 0 8px 8px; }
    .tickets.tickets-many .prize-name { font-size: 1rem; }
}

.ticket {
    position: relative;
    /* тень — на обёртке: маска с вырезами обрезала бы box-shadow */
    filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .45));
    transition: transform .25s ease, opacity .3s ease, filter .3s ease;
    user-select: none;
    -webkit-user-select: none;
}
.ticket-body {
    --notch: 12px;
    position: relative;
    background:
        repeating-linear-gradient(135deg, rgba(43, 26, 77, .035) 0 8px, transparent 8px 16px),
        linear-gradient(160deg, var(--paper), var(--paper-2));
    color: var(--ink);
    border-radius: var(--radius);
    /* Перфорация-вырезы по бокам */
    -webkit-mask:
        radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    mask:
        radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.ticket-stub { font-size: .55rem; padding: 7px 10px 5px; }
    .tickets.tickets-many .ticket-window { aspect-ratio: 1 / 1; margin: 0 8px 8px; }
    .tickets.tickets-many .prize-name { font-size: 1rem; }
}

.ticket {
    --notch: 12px;
    position: relative;
    background:
        repeating-linear-gradient(135deg, rgba(43, 26, 77, .035) 0 8px, transparent 8px 16px),
        linear-gradient(160deg, var(--paper), var(--paper-2));
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    /* Перфорация-вырезы по бокам */
    -webkit-mask:
        radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    mask:
        radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    transition: transform .25s ease, opacity .3s ease, filter .3s ease;
    user-select: none;
    -webkit-user-select: none;
}
.ticket-stub {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .66rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-muted);
    border-bottom: 2px dashed rgba(43, 26, 77, .16);
    margin: 0 10px;
}
.ticket-stub b { color: var(--coral); font-weight: 800; }
.ticket-window {
    position: relative;
    margin: 10px 14px 14px;
    aspect-ratio: 2 / 1;
    border-radius: 12px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 197, 61, .35), transparent 70%),
        #fffaf0;
    box-shadow: inset 0 0 0 2px rgba(43, 26, 77, .08);
}
.prize {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: 10px 14px;
}
.prize-label {
    font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 4px;
}
.prize-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.1rem, 3.6vw, 1.5rem);
    line-height: 1.15;
    color: var(--ink);
    word-break: break-word;
}
.prize-desc { font-size: .85rem; color: var(--ink-muted); margin-top: 4px; }
.prize-loading .prize-name { color: transparent; }
.prize-loading .prize-name::after {
    content: '•••'; color: var(--ink-muted); animation: pulse 1s infinite;
}
.foil {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    touch-action: pan-y; /* вертикальный свайп листает страницу, пока билет не начали стирать */
    cursor: grab;
    transition: opacity .6s ease;
}
.foil:active { cursor: grabbing; }
.ticket.scratching .foil { touch-action: none; }
.ticket.cleared .foil { opacity: 0; pointer-events: none; }
.ticket.cleared .ticket-window { animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }

.ticket.winner { filter: drop-shadow(0 0 3px var(--gold)) drop-shadow(0 0 22px rgba(255, 197, 61, .75)); }
.ticket.locked { filter: grayscale(.85) brightness(.6); opacity: .65; transform: scale(.97); }
.ticket.locked .foil { pointer-events: none; cursor: not-allowed; }
.ticket.locked::after {
    content: '🔒';
    position: absolute; top: 54%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
}
.ticket.extra .prize-label { color: var(--ink-muted); }

/* Раздача карточек при загрузке */
.ticket.dealing { transition: transform .75s cubic-bezier(.2, .9, .25, 1.1), opacity .4s ease; }

/* Крошки фольги */
.flake {
    position: absolute;
    width: 5px; height: 5px;
    border-radius: 1px;
    background: #b9bdc7;
    pointer-events: none;
    animation: flake-fall .8s ease-in forwards;
    z-index: 3;
}
@keyframes flake-fall {
    to { transform: translate(var(--dx), 70px) rotate(220deg); opacity: 0; }
}

/* Подсказка-палец */
.hint-hand {
    position: absolute;
    left: 30%; top: 55%;
    font-size: 2rem;
    pointer-events: none;
    z-index: 4;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.35));
    animation: hand 2.2s ease-in-out infinite;
}
@keyframes hand {
    0% { transform: translate(0, 0) rotate(-10deg); opacity: 0; }
    15% { opacity: 1; }
    50% { transform: translate(90px, -14px) rotate(8deg); }
    85% { opacity: 1; }
    100% { transform: translate(0, 0) rotate(-10deg); opacity: 0; }
}

/* Конфетти */
.confetti {
    position: fixed;
    top: -16px;
    z-index: 100;
    pointer-events: none;
    animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
    to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); }
}

/* ---------------- Результат ---------------- */
.reveal {
    text-align: center;
    padding: 28px 22px;
    border-radius: var(--radius);
    background:
        radial-gradient(500px 200px at 50% 0%, rgba(255, 197, 61, .3), transparent 70%),
        var(--surface);
    border: 1px solid rgba(255, 197, 61, .35);
    animation: rise .5s ease both;
}
.reveal-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    line-height: 1.1;
    margin: 6px 0 8px;
    word-break: break-word;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------------- Главная ---------------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 24px 0 40px; }
.hero-lead { font-size: 1.12rem; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 14px; }
.hero-badges { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; font-weight: 600; }
.hero-demo { position: relative; }
.hero-demo .demo-title {
    text-align: center; font-weight: 700; margin-bottom: 12px; color: var(--muted);
}
.hero-demo .tickets { grid-template-columns: 1fr; gap: 14px; }
.hero-demo .ticket:nth-child(1) { transform: rotate(-2deg); }
.hero-demo .ticket:nth-child(2) { transform: rotate(1.5deg) translateX(14px); }
.hero-demo .ticket:nth-child(3) { transform: rotate(-1deg); }
.hero-demo .ticket-window { aspect-ratio: 3.2 / 1; }
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 8px; }
    .hero-demo .ticket-window { aspect-ratio: 2.6 / 1; }
}

.section { padding: 36px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 24px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 22px; }
.step .step-num { margin-bottom: 12px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.ideas { justify-content: center; }
.ideas .chip { padding: 11px 18px; font-size: 1rem; }

.cta-band {
    text-align: center;
    padding: 34px 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255, 91, 110, .28), rgba(139, 108, 255, .28));
    border: 1px solid var(--line);
}

/* ---------------- Создание ---------------- */
.create-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.create-preview { position: sticky; top: 16px; }
.preview-card { padding: 18px; }
.preview-card .preview-title { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; line-height: 1.25; margin: 4px 0 12px; }
.mini-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.mini-ticket {
    aspect-ratio: 1.5 / 1; border-radius: 8px;
    background: linear-gradient(135deg, #c3c7d0, #eef0f3 45%, #a5aab4);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.4);
}
@media (max-width: 900px) {
    .create-layout { grid-template-columns: 1fr; }
    .create-preview { position: static; order: -1; }
}

/* ---------------- Список проектов ---------------- */
.project-list { display: grid; gap: 12px; }
.project-item {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 18px;
    color: var(--text);
    transition: background .15s, transform .15s;
}
.project-item:hover { background: var(--surface-2); text-decoration: none; transform: translateY(-1px); }
.project-item .pi-icon {
    flex: none; width: 46px; height: 46px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.4rem;
    background: linear-gradient(135deg, #c3c7d0, #eef0f3 45%, #a5aab4);
}
.project-item.done .pi-icon { background: linear-gradient(135deg, var(--gold), var(--coral)); }
.project-item .pi-main { flex: 1; min-width: 0; }
.project-item .pi-title { font-weight: 800; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-item .pi-meta { color: var(--muted); font-size: .88rem; }

.option-list { display: flex; flex-wrap: wrap; gap: 8px; }
.option-list .chip { cursor: default; }
.option-list .chip:hover { transform: none; }
.option-list .chip.won { background: rgba(255, 197, 61, .2); border-color: var(--gold); }

details.key-box summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 10px; }
details.key-box summary::-webkit-details-marker { display: none; }
details.key-box summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .2s; }
details.key-box[open] summary::after { transform: rotate(180deg); }
details.key-box[open] summary { margin-bottom: 12px; }

/* ---------------- Таблица (админка) ---------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px 18px; }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { background: rgba(0,0,0,.25); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.table tr.deleted td { opacity: .45; }
.table .opts { display: flex; flex-wrap: wrap; gap: 4px; }
.table .opt { padding: 2px 8px; border-radius: 6px; background: var(--surface-2); white-space: nowrap; }
.table .opt.won { background: rgba(255, 197, 61, .25); color: var(--gold); font-weight: 700; }
.table form { display: inline; }

/* ---------------- Тост ---------------- */
.toast {
    position: fixed; left: 50%; bottom: 24px;
    transform: translate(-50%, 20px);
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 800;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: opacity .2s, transform .2s;
    z-index: 200;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- Подвал ---------------- */
.site-footer { position: relative; z-index: 1; padding: 22px 0 28px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
