/* guide page, same look as the customizer */

html:has(.guide-page) {
    height: auto;
}

.guide-page {
    height: auto;
    max-height: none;
    min-height: 100vh;
    overflow: auto;
    gap: 12px;
}

.guide-page .header {
    position: sticky;
    top: 0;
    z-index: 40;
}

.guide-intro {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-gray);
}

.guide-shell {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

.guide-toc {
    position: sticky;
    top: 92px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: rgba(26, 26, 26, 0.8);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.guide-toc a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.guide-toc a i {
    width: 1.1rem;
    color: var(--primary-color);
    text-align: center;
}

.guide-toc a:hover,
.guide-toc a.is-active {
    background: color-mix(in srgb, var(--primary-color) 18%, transparent);
    color: var(--text-light);
}

.guide-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 8px;
}

.guide-card {
    background: rgba(26, 26, 26, 0.8);
    border-radius: var(--border-radius);
    padding: 22px 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    scroll-margin-top: 88px;
}

.guide-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-light);
}

.guide-card h2 i {
    color: var(--primary-color);
}

.guide-card h3 {
    margin: 18px 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-color);
}

.guide-card p,
.guide-card li {
    color: var(--text-gray);
    line-height: 1.55;
    font-size: 0.95rem;
}

.guide-card p {
    margin: 0 0 10px;
}

.guide-card p:last-child {
    margin-bottom: 0;
}

.guide-card ol,
.guide-card ul {
    margin: 0 0 10px 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guide-card strong {
    color: var(--text-light);
}

.guide-card a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.guide-card a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.guide-card code {
    font-family: 'Courier New', monospace;
    font-size: 0.88em;
    color: var(--accent-color);
}

.guide-lead {
    font-size: 1.02rem;
    color: #ddd3e6 !important;
}

.guide-note {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-left: 3px solid var(--secondary-color);
    border-radius: 8px;
    background: color-mix(in srgb, var(--secondary-color) 12%, transparent);
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

.guide-note.is-warn {
    border-left-color: var(--warning-color);
    background: rgba(251, 191, 36, 0.08);
}

.guide-code {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.guide-code-caption {
    margin: 14px 0 0 !important;
    font-size: 0.8rem !important;
    font-weight: 600;
    color: var(--text-gray);
}

.guide-code code {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.85rem;
    word-break: break-all;
}

.guide-copy {
    flex-shrink: 0;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(40, 40, 40, 0.9);
    color: var(--text-light);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.guide-copy:hover,
.guide-copy.is-copied {
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 22%, transparent);
}

.guide-pill {
    display: inline-flex;
    align-items: center;
    margin: 1px 2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 35%, transparent);
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    white-space: nowrap;
}

.guide-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.guide-table th,
.guide-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

.guide-table th {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.guide-table td {
    color: var(--text-gray);
}

.guide-table td:first-child {
    color: var(--text-light);
    font-weight: 600;
    white-space: nowrap;
}

.guide-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 14px;
}

.guide-filter {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(40, 40, 40, 0.8);
    color: var(--text-gray);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.guide-filter:hover,
.guide-filter.is-on {
    color: var(--text-light);
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 22%, transparent);
}

.guide-evo {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.guide-evo-stage h4 {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--secondary-color);
}

.guide-evo-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.guide-mon {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(30, 30, 30, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--mon-color, var(--primary-color));
    border-radius: 12px;
}

.guide-mon.is-vaccine { --mon-color: #3FD8D2; }
.guide-mon.is-data { --mon-color: #8A5CF6; }
.guide-mon.is-virus { --mon-color: #FF5FA2; }
.guide-mon.is-free { --mon-color: #94a3b8; }

.guide-mon-sprite {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background-repeat: no-repeat;
    background-size: 300% 400%;
    background-position: 0 0;
    image-rendering: pixelated;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.25);
}

.guide-mon-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.guide-mon-name {
    font-weight: 700;
    color: var(--text-light);
    font-size: 0.95rem;
}

.guide-mon-attr {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mon-color, var(--text-gray));
}

.guide-mon ul {
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
    gap: 2px;
}

.guide-mon li {
    font-size: 0.8rem;
    line-height: 1.4;
}

.guide-mon li b {
    color: var(--text-light);
    font-weight: 600;
}

.site-footer .footer-changelog a.footer-privacy-toggle {
    text-decoration: none;
}

@media (max-width: 900px) {
    .guide-shell {
        grid-template-columns: 1fr;
    }

    .guide-toc {
        position: sticky;
        top: 12px;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        z-index: 30;
    }

    .guide-toc a {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .guide-page .header {
        position: static;
    }

    .guide-toc {
        top: 0;
    }
}
