/* ── Page grid: 2×2 quadrants ─────────────────────────────────── */
.htp-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(660px, 68vh) minmax(660px, 68vh);
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 40px;
    position: relative;
    z-index: 0;
}

/* Shared section card */
.htp-section {
    background: rgba(14, 14, 14, 0.82);
    border: 1px solid rgba(201, 169, 110, 0.25);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

.htp-section-label {
    font-family: 'HwyGothic', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: #c9a96e;
    text-transform: uppercase;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.3);
    flex-shrink: 0;
}

/* ── STACKED COLUMN (top-right grid cell) ───────────────────── */
.htp-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
    overflow: hidden;
}

.htp-stack .htp-section {
    flex: 1;
    min-height: 0;
}

/* ── LINKS SECTION ─────────────────────────────────────────────── */
.htp-links-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.htp-link-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.htp-link-row:hover {
    background: rgba(201, 169, 110, 0.1);
    border-color: rgba(201, 169, 110, 0.4);
}

.htp-link-icon {
    font-size: 1.1rem;
    color: #c9a96e;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.htp-link-title {
    flex: 1;
    font-family: 'HwyGothic', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    color: #e8e0ce;
}

.htp-link-arrow {
    font-size: 0.7rem;
    color: rgba(201, 169, 110, 0.4);
    flex-shrink: 0;
    transition: color 0.18s ease;
}

.htp-link-row:hover .htp-link-arrow {
    color: #c9a96e;
}

/* ── VIDEO SECTION ─────────────────────────────────────────────── */
.htp-video-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.htp-video-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.htp-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.htp-playlist {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.htp-playlist-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #b8b0a0;
    font-family: 'HwyGothic', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 8px 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.htp-playlist-btn:hover {
    background: rgba(201, 169, 110, 0.12);
    border-color: rgba(201, 169, 110, 0.35);
    color: #e8e0ce;
}
.htp-playlist-btn.active {
    background: rgba(201, 169, 110, 0.18);
    border-color: #c9a96e;
    color: #c9a96e;
}

/* ── TIPS SECTION ──────────────────────────────────────────────── */
.htp-tips-slider {
    flex: 1;
    display: grid;
}

.htp-tip {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease;
}
.htp-tip.active {
    opacity: 1;
    visibility: visible;
}

.htp-tip-icon {
    font-size: 2.4rem;
    color: #c9a96e;
    opacity: 0.85;
}

.htp-tip p {
    font-size: 1.1rem;
    color: #e8e0ce;
    line-height: 1.6;
    font-family: 'HwyGothic', sans-serif;
    letter-spacing: 0.03em;
    max-width: 340px;
}

.htp-tip-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.htp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.3);
    cursor: pointer;
    transition: background 0.2s ease;
}
.htp-dot.active {
    background: #c9a96e;
}

/* ── RULEBOOK PLACEHOLDER (Set 2 still pending) ────────────────── */
.htp-rulebook-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #6a6258;
}

.htp-placeholder-icon {
    font-size: 3rem;
    opacity: 0.4;
}

.htp-rulebook-placeholder p {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* ── BOOKLET VIEWER ────────────────────────────────────────────── */
.htp-rulebook .htp-section-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.booklet-counter {
    font-size: 0.72rem;
    font-family: 'HwyGothic', sans-serif;
    letter-spacing: 0.12em;
    color: #6a6258;
    font-weight: normal;
}

.booklet-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booklet-frame {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    background: #080808;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(201, 169, 110, 0.18),
        inset 0 0 60px rgba(0, 0, 0, 0.4);
}

.booklet-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.18s ease;
}
.booklet-img.booklet-fading {
    opacity: 0;
}

.booklet-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 64px;
    background: rgba(201, 169, 110, 0.07);
    border: 1px solid rgba(201, 169, 110, 0.18);
    border-radius: 8px;
    color: #c9a96e;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.booklet-arrow:hover:not(:disabled) {
    background: rgba(201, 169, 110, 0.18);
    border-color: rgba(201, 169, 110, 0.6);
    transform: scaleY(1.04);
}
.booklet-arrow:disabled {
    opacity: 0.2;
    cursor: default;
}


/* ── MOBILE ───────────────────────────────────────────────────── */
@media only screen and ((max-width: 767px) or (hover: none)) {
    .htp-page {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        min-height: 0;
        padding: 16px 12px 40px;
        gap: 16px;
    }

    .htp-stack {
        gap: 16px;
    }

    /* Restore aspect-ratio iframe trick since sections are auto-height on mobile */
    .htp-video-wrap {
        flex: none;
        padding-top: 56.25%;
    }

    .booklet-stage {
        flex: none;
        height: 360px;
    }

    .htp-tip-dots {
        margin-bottom: 8px;
    }

    .booklet-arrow {
        width: 28px;
        height: 48px;
        font-size: 0.75rem;
    }
}
