body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #1c1c1e;
    color: #fff;
}
.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}
.site-header {
    border-bottom: 1px solid #2c2c2e;
    background: #1c1c1e;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}
.logo {
    color: #ffb300;
    text-decoration: none;
    font-weight: bold;
    font-size: 20px;
}
.logo span { color: #fff; }
.site-header nav a {
    color: #e5e5e7;
    text-decoration: none;
    margin-left: 16px;
    font-size: 15px;
}
.site-header nav a:hover { color: #ffb300; }
main { padding: 24px 16px; }
.hero h1 {
    font-size: 26px;
    line-height: 1.3;
    margin: 0 0 12px;
}
.hero p, section p {
    color: #e5e5e7;
    line-height: 1.5;
}
.btn-main {
    display: inline-block;
    margin-top: 8px;
    padding: 14px 28px;
    background: #ffb300;
    color: #1c1c1e;
    font-weight: bold;
    border-radius: 28px;
    text-decoration: none;
}
.btn-main:hover { background: #ffc44d; }
.btn-ghost {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 20px;
    background: #2c2c2e;
    color: #fff;
    border-radius: 24px;
    text-decoration: none;
}
.btn-ghost:hover { background: #3a3a3c; }
section {
    margin: 32px 0;
}
h2 {
    font-size: 20px;
    margin: 0 0 8px;
}
.site-footer {
    border-top: 1px solid #2c2c2e;
    padding: 20px 0 32px;
    color: #a8a8af;
    font-size: 14px;
}
.site-footer nav a {
    color: #a8a8af;
    text-decoration: none;
    margin-right: 16px;
}
.site-footer nav a:hover { color: #ffb300; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
}
.card-tile {
    position: relative;
    display: block;
    background: #2c2c2e;
    border-radius: 12px;
    padding: 8px;
    text-decoration: none;
    text-align: center;
}
.card-tile:hover { background: #3a3a3c; }
.card-tile img {
    display: block;
    width: 100%;
    border-radius: 8px;
}
.card-name {
    display: block;
    color: #fff;
    font-size: 13px;
    margin-top: 6px;
}
.card-elixir {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    background: #c86df5;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}
.card-page {
    max-width: 480px;
    text-align: center;
    margin: 0 auto;
}
.card-page img {
    width: 180px;
    border-radius: 16px;
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0;
    color: #cfcfcf;
    font-size: 14px;
}
.elixir-chip {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #8a2be2;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-weight: bold;
    margin-right: 8px;
}
.card-desc {
    color: #e8e8e8;
    line-height: 1.6;
}
.card-description {
    margin: 20px 0;
    padding: 16px;
    background: #2b2b2b;
    border-radius: 8px;
    color: #e0e0e0;
    line-height: 1.5;
    font-size: 15px;
}

/* --- Плитка колоды (списковые страницы каталога) --- */
.deck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    align-items: stretch;
    margin-top: 1rem;
}
.deck-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #2b2b2b;
    color: #e5e5e7;
    padding: 12px;
    border-radius: 8px;
    box-sizing: border-box;
}
.dt-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}
.dt-titlewrap {
    flex: 1;
    min-width: 0;
}
.dt-title {
    color: #e5e5e7;
    font-weight: bold;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dt-title:hover { color: #ffb300; }
.dt-info {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3a3a3c;
    color: #a8a8af;
}
.dt-info:hover { color: #ffb300; }
.dt-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}
.dt-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
.dt-cards a { display: block; }
.dt-cards img,
.dt-cards .dt-card-ph {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    background: #3a3a3c;
}
.dt-card-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #a8a8af;
}
.dt-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dt-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    text-decoration: none;
    flex: 0 0 auto;
}
.dt-btn svg { width: 22px; height: 22px; }
.dt-copy { background: #ffb300; color: #1c1c1e; }
.dt-copy:hover { background: #ffc44d; }
.dt-open { background: #3a3a3c; color: #ffb300; }
.dt-open:hover { background: #4a4a4e; }
.dt-cards-hint {
    color: #a8a8af;
    font-size: 12px;
    margin: 8px 0 4px;
}

/* --- Ссылки на колоды по картам: горизонтальная лента с прокруткой --- */
.dt-cards-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3c #1c1c1e;
    padding-bottom: 2px;
}
.dt-cards-links a,
.dt-chip-plain {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 14px;
    background: #2b2b2b;
    color: #c7c7cc;
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
}
.dt-cards-links a:hover { background: #3a3a3c; color: #ffb300; }
.dt-chip-plain { opacity: .7; }
.dt-cards-links::-webkit-scrollbar { height: 4px; }
.dt-cards-links::-webkit-scrollbar-track { background: #1c1c1e; border-radius: 2px; }
.dt-cards-links::-webkit-scrollbar-thumb { background: #3a3a3c; border-radius: 2px; }

/* --- Мета-строка плитки --- */
.dt-meta {
    margin-top: auto;
    font-size: 13px;
    color: #a8a8af;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.dt-meta a { color: #ffb300; font-weight: bold; text-decoration: none; }
.dt-views { display: inline-flex; align-items: center; gap: 4px; }

/* --- Пагинация: только номера, без стрелок --- */
.pg {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 1rem 0 2rem;
}
.pg a,
.pg-cur,
.pg-dots {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    text-decoration: none;
}
.pg a {
    background: #2b2b2b;
    color: #a8a8af;
    transition: background .15s, color .15s, transform .1s;
}
.pg a:hover { color: #ffb300; }
.pg .pg-cur {
    background: #ffb300;
    color: #1c1c1e;
    font-weight: bold;
}
.pg-dots { color: #a8a8af; }
.pg a:active {
    transform: scale(0.94);
    background: #ffb300;
    color: #1c1c1e;
}
/* --- Пагинация: адаптив — на узких экранах убираем только многоточие --- */
@media (max-width: 520px) {
    .pg-dots { display: none; }
}
