:root {
    --bg: #07051a;
    --panel: #121034;
    --text: #eef1ff;
    --muted: #a4abd8;
    --neon-pink: #d100ff;
    --neon-blue: #3fd9ff;
    --neon-green: #27ffa8;
}

@font-face {
    font-family: 'Clock';
    src: url('/assets/pwa/clock.ttf') format('truetype');
    font-display: swap;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 20% 20%, #1b0d40, #07051a 40%), #07051a;
}

.container { width: min(1100px, 92%); margin: 0 auto; }

.site-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    background: rgba(8, 7, 31, 0.8);
    border-bottom: 1px solid rgba(63, 217, 255, 0.25);
    z-index: 5;
}

#site-header-fix {}
.site-header .nav-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: .7rem 0;
    gap: 1rem;
}
.site-header .brand { display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; font-weight: 700; min-width: 0; }
.brand-z {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(125deg, var(--neon-pink), var(--neon-blue), var(--neon-green));
    box-shadow: 0 0 18px rgba(63, 217, 255, .5);
}
.brand-name small { display:block; color: var(--muted); font-size: .7rem; font-weight: 600; }
.site-header .brand-logo {
    width: 250px;
    height: 64px;
    object-fit: contain;
    object-position: left center;
}

.site-header .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: .45rem;
    min-width: 0;
}

.site-header .header-live-clock {
    font-family: 'Clock', 'Courier New', monospace;
    font-size: 1.28rem;
    letter-spacing: .04em;
    line-height: 1;
    color: var(--text);
    opacity: .96;
    text-align: right;
    min-width: 6.8ch;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .15rem;
}

.site-header .header-social {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-header .header-social a {
    min-height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(63,217,255,.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
    gap: .35rem;
    padding: .2rem .55rem .2rem .2rem;
    font-size: .72rem;
    background: rgba(255,255,255,.06);
    transition: background .2s ease, border-color .2s ease;
}

.site-header .header-social a:hover {
    background: rgba(63,217,255,.14);
    border-color: rgba(63,217,255,.55);
}

.site-header .header-social img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.site-header .header-social a > span:not(.header-social-label) {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
}

.site-header .header-social-label {
    display: inline-block;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1;
}

.site-header nav a {
    color: var(--text);
    text-decoration: none;
    margin-left: 0;
    padding: .35rem .5rem;
    border-radius: .5rem;
    font-size: .94rem;
}
.site-header nav a:hover { background: rgba(63,217,255,.13); }
.site-header nav a.is-active {
    background: rgba(63,217,255,.18);
    border: 1px solid rgba(63,217,255,.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.hero {
    margin: 2rem 0 1.3rem;
    padding: 2rem;
    border: 1px solid rgba(209, 0, 255, 0.4);
    border-radius: 1rem;
    background: linear-gradient(140deg, rgba(209,0,255,.2), rgba(63,217,255,.13), rgba(39,255,168,.12));
}
.hero h1 { margin-top: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.hero p { color: var(--muted); max-width: 70ch; }

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.offers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    background: linear-gradient(160deg, rgba(255,255,255,.02), rgba(63,217,255,.07));
    border: 1px solid rgba(63,217,255,.25);
    padding: 1.1rem;
    border-radius: .8rem;
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); }
.tag { display:inline-block; font-size:.75rem; background: rgba(209,0,255,.2); color:#ffd8ff; padding:.2rem .45rem; border-radius:999px; }

.btn {
    display: inline-block;
    background: linear-gradient(120deg, var(--neon-pink), var(--neon-blue));
    color: white;
    text-decoration: none;
    border: none;
    padding: .58rem .9rem;
    border-radius: .55rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-secondary { background: rgba(39,255,168,.2); border: 1px solid rgba(39,255,168,.4); }

.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse: collapse; }
th, td { padding:.65rem; border-bottom:1px solid rgba(255,255,255,.1); text-align: left; }

form { display:grid; gap: .75rem; }
input, textarea, select {
    width: 100%;
    border-radius: .55rem;
    border: 1px solid rgba(255,255,255,.2);
    background: #0f0d2a;
    color: var(--text);
    padding: .6rem .7rem;
}
textarea { min-height: 120px; }

.alert { padding:.75rem; border-radius:.5rem; margin:1rem 0; }
.alert-success { background: rgba(39,255,168,.15); border:1px solid rgba(39,255,168,.4); }
.alert-error { background: rgba(255,56,138,.18); border:1px solid rgba(255,56,138,.4); }

.site-footer { margin-top:2rem; padding: 1.3rem 0 2rem; color: var(--muted); font-size: .9rem; }
.site-footer a {
    color: #8fdcff;
}
.site-footer a:hover {
    color: #bcecff;
}

main a:not(.btn) {
    color: #8fdcff;
    text-decoration-color: rgba(143,220,255,.55);
    text-underline-offset: 2px;
}

main a:not(.btn):hover {
    color: #bcecff;
    text-decoration-color: rgba(188,236,255,.85);
}

.cookie-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: .9rem;
    display: flex;
    justify-content: center;
}

.cookie-sheet-card {
    width: min(760px, 95%);
    border: 1px solid rgba(63,217,255,.35);
    border-radius: 1rem;
    background: rgba(11,10,35,.96);
    box-shadow: 0 16px 40px rgba(0,0,0,.35);
    padding: 1rem 1.1rem;
}

.cookie-sheet-card h3 {
    margin: 0 0 .4rem 0;
}

.cookie-sheet-card p {
    margin: 0 0 .7rem 0;
    color: var(--muted);
}

.cookie-sheet[hidden] {
    display: none;
}

.actions { display:flex; gap:.5rem; flex-wrap: wrap; }
.small { font-size: .85rem; color: var(--muted); }

.app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: .65rem;
    border: 1px solid rgba(255,255,255,.2);
}

.app-icon-large {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.25);
}

.app-hero {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.app-shot img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: .6rem;
    background: rgba(7,5,26,.65);
}

.app-shot-open {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.app-shot-open:focus-visible {
    outline: 2px solid var(--neon-blue);
    outline-offset: 3px;
}

.shot-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.shot-lightbox-image {
    width: min(92vw, 1100px);
    height: min(86vh, 760px);
    object-fit: contain;
    border-radius: .8rem;
}

.shot-lightbox-close,
.shot-lightbox-nav {
    position: absolute;
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(10,10,10,.58);
    color: #fff;
    cursor: pointer;
}

.shot-lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 1.5rem;
    line-height: 1;
}

.shot-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 64px;
    border-radius: .6rem;
    font-size: 2rem;
    line-height: 1;
}

.shot-lightbox-nav.prev { left: 1rem; }
.shot-lightbox-nav.next { right: 1rem; }

.shot-lightbox[hidden] {
    display: none;
}

.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.social-item {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .65rem;
    border: 1px solid rgba(63,217,255,.25);
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255,255,255,.03);
}

.social-item img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 6px;
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: .6rem;
    margin-bottom: .7rem;
}

.privacy-content h2,
.privacy-content h3,
.privacy-content h4 {
    margin-top: 0;
}

.privacy-content p {
    margin: 0;
    line-height: 1.5;
    color: var(--text);
}

.privacy-content p + p {
    margin-top: .2rem;
}

.privacy-content ul,
.privacy-content ol {
    margin: .45rem 0;
    padding-left: 1.25rem;
}

.privacy-content a {
    color: #8fdcff;
}

.privacy-content a:hover {
    color: #bcecff;
}

.changelog-list {
    display: grid;
    gap: .85rem;
}

.changelog-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
    gap: .65rem;
    min-height: 44px;
}

.changelog-item summary::-webkit-details-marker {
    display: none;
}

.changelog-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    flex: 1;
}

.changelog-head span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.changelog-label {
    display: block;
}

.changelog-item .changelog-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.2);
    flex-shrink: 0;
}

.changelog-chevron {
    color: var(--muted);
    transition: transform .2s ease;
    font-size: 1rem;
    flex-shrink: 0;
}

.changelog-item {
    padding: .85rem 1rem;
}

.changelog-item[open] .changelog-chevron {
    transform: rotate(180deg);
}

.changelog-body {
    margin-top: .55rem;
    padding-left: 2.7rem;
}

.changelog-item {
    overflow: hidden;
}

.changelog-item > summary {
    padding: 0;
}

.wysiwyg-wrap {
    border: 1px solid rgba(255,255,255,.2);
    border-radius: .55rem;
    overflow: hidden;
    background: #0f0d2a;
}

.wysiwyg-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .45rem;
    border-bottom: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.03);
}

.wysiwyg-hint {
    font-size: .76rem;
    color: var(--muted);
    padding: .35rem .6rem 0;
}

.wysiwyg-btn {
    border: 1px solid rgba(255,255,255,.25);
    background: transparent;
    color: var(--text);
    border-radius: .4rem;
    padding: .25rem .45rem;
    cursor: pointer;
    font-size: .82rem;
}

.wysiwyg-btn:disabled,
.wysiwyg-fontsize:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.wysiwyg-fontsize {
    width: auto;
    min-width: 78px;
    padding: .25rem .4rem;
    font-size: .82rem;
    border-radius: .4rem;
}

.wysiwyg-btn.is-active {
    background: rgba(63,217,255,.2);
    border-color: rgba(63,217,255,.55);
}

.wysiwyg-mode {
    margin-left: auto;
    display: inline-flex;
    gap: .3rem;
}

.wysiwyg-editor {
    min-height: 160px;
    padding: .7rem;
    line-height: 1.45;
    color: var(--text);
}

.wysiwyg-editor p,
.wysiwyg-editor div,
.wysiwyg-editor span,
.wysiwyg-editor li,
.wysiwyg-editor strong,
.wysiwyg-editor em,
.wysiwyg-editor u {
    color: inherit;
}

.wysiwyg-editor p,
.wysiwyg-editor div {
    margin: 0;
}

.wysiwyg-editor ul,
.wysiwyg-editor ol {
    margin: .4rem 0;
    padding-left: 1.2rem;
}

.wysiwyg-editor a {
    color: #8fdcff;
}

.wysiwyg-editor pre {
    margin: .5rem 0;
    padding: .55rem .65rem;
    border-radius: .5rem;
    border: 1px solid rgba(63,217,255,.25);
    background: rgba(7,5,26,.9);
    overflow-x: auto;
}

.wysiwyg-editor code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .84rem;
    color: #bcecff;
}

main pre {
    margin: .5rem 0;
    padding: .55rem .65rem;
    border-radius: .5rem;
    border: 1px solid rgba(63,217,255,.25);
    background: rgba(7,5,26,.9);
    overflow-x: auto;
}

main code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .84rem;
    color: #bcecff;
}

.wysiwyg-fs-2 { font-size: .85rem; }
.wysiwyg-fs-3 { font-size: 1rem; }
.wysiwyg-fs-4 { font-size: 1.15rem; }
.wysiwyg-fs-5 { font-size: 1.35rem; }
.wysiwyg-fs-6 { font-size: 1.6rem; }

textarea.wysiwyg-source {
    min-height: 220px;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.14);
    border-radius: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .84rem;
}

.offer-image {
    width: auto;
    max-width: 100%;
    max-height: 220px;
    height: auto;
    object-fit: contain;
    border-radius: .6rem;
    display: block;
}

.offer-image-wrap {
    width: 100%;
    min-height: 180px;
    margin-bottom: .65rem;
    border-radius: .6rem;
    border: 1px solid rgba(63,217,255,.2);
    background: rgba(5,9,32,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem;
}

.offer-card {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.offer-card .btn {
    margin-top: auto;
}

.board-members {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.trello-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 320px);
    gap: .8rem;
    overflow-x: auto;
    align-items: start;
    padding-bottom: .4rem;
}

.trello-list {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(63,217,255,.25);
    border-radius: .75rem;
    padding: .7rem;
    min-height: 170px;
}

.trello-list header {
    margin-bottom: .55rem;
}

.trello-cards {
    display: grid;
    gap: .55rem;
    min-height: 60px;
}

.trello-card {
    background: rgba(7,5,26,.9);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: .6rem;
    padding: .55rem;
    cursor: grab;
}

.trello-card h4 {
    margin: 0 0 .35rem 0;
    font-size: .95rem;
}

.trello-add-card {
    margin-top: .65rem;
}

.trello-list-add {
    display: flex;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .site-header .nav-wrap {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .site-header .header-right {
        width: 100%;
        align-items: flex-start;
    }

    .site-header .brand-logo {
        width: 210px;
        height: 54px;
    }

    .site-header nav {
        justify-content: flex-start;
        gap: .25rem;
    }

    .site-header .header-social {
        justify-content: flex-start;
    }

    .site-header nav a {
        margin-left: 0;
        border: 1px solid rgba(63,217,255,.25);
    }

    .hero {
        padding: 1.25rem;
    }

    .card {
        padding: .9rem;
    }

    .app-hero {
        flex-direction: column;
    }

    .changelog-body {
        padding-left: 0;
    }

    .offers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    body {
        font-size: 15px;
    }

    .container {
        width: min(1100px, 95%);
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    td {
        border-bottom: 1px solid rgba(255,255,255,.12);
        padding: .55rem 0;
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }
}
