/* TapAPK Playdate-Inspired Alternating Band Storefront */
.tap-page {
    --bg: var(--tap-bg, #ffffff);
    --cream: var(--tap-cream, #f6f4ec);
    --surface: var(--tap-surface, #ffffff);
    --surface-2: var(--tap-surface-2, #f1efe7);
    --dark: var(--tap-dark, #161618);
    --ink: var(--tap-ink, #111111);
    --muted: var(--tap-muted, #5c5c58);
    --yellow: var(--tap-yellow, #ffc500);
    --accent: var(--tap-accent, #b37400);
    --rule: var(--tap-line, #e4e2d8);

    background: var(--bg);
    color: var(--ink);
}

.tap-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Band 1: Centered Playdate Hero (Phone Showcase Top + Headline Below) */
.pd-hero-band {
    background: var(--yellow);
    color: var(--ink);
    padding: 48px 24px 56px;
    border-bottom: 2px solid var(--ink);
    text-align: center;
}

.pd-hero-stack {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pd-phone-wrap {
    position: relative;
    width: 100%;
    max-width: 680px;
    margin-bottom: 28px;
}

.pd-sticker {
    position: absolute;
    top: -14px;
    left: -18px;
    z-index: 4;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #111111;
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    transform: rotate(-6deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.pd-sticker-top {
    font-size: 12px;
    font-weight: 800;
    color: var(--yellow);
}

.pd-sticker-bottom {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffffff;
}

.pd-hero-stack h1 {
    font-size: clamp(32px, 4.5vw, 50px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin: 0 0 14px;
}

.pd-hero-stack p {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.6;
    color: rgba(17, 17, 17, 0.8);
    max-width: 44ch;
    margin: 0 0 26px;
}

.pd-video-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.pd-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid var(--ink);
    background: var(--surface);
    color: var(--ink) !important;
    transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}

.tap-btn:hover {
    transform: translateY(-1px);
    background: var(--surface-2);
}

.tap-btn-primary {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: #ffffff !important;
}

.tap-btn-primary:hover {
    background: #2b2b2e !important;
    border-color: #2b2b2e !important;
    color: #ffffff !important;
}

.tap-btn-yellow {
    background: var(--yellow) !important;
    border-color: var(--yellow) !important;
    color: var(--ink) !important;
}

.tap-btn-yellow:hover {
    background: #f2b700 !important;
}

/* Tactile Landscape Android Phone Mockup */
.pd-phone-stage {
    position: relative;
}

.pd-phone-bezel {
    background: #141416;
    border-radius: 26px;
    padding: 12px 22px;
    border: 3px solid #111111;
    box-shadow: 0 24px 48px rgba(17, 17, 17, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    position: relative;
}

.pd-phone-screen {
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 960 / 412;
    position: relative;
}

.pd-phone-screen video,
.pd-phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-phone-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(17, 17, 17, 0.72);
    padding: 0 6px;
}

/* Alternating Bands */
.pd-band {
    padding: 64px 0;
}

.pd-band-white {
    background: #ffffff;
}

.pd-band-cream {
    background: var(--cream);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.pd-band-dark {
    background: var(--dark);
    color: #f5f5f2;
}

.pd-band-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 28px;
}

.pd-band-head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 900;
    letter-spacing: -0.025em;
    color: inherit;
}

.pd-band-sub {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.pd-band-dark .pd-band-sub {
    color: #a8a8b3;
}

/* Product Cards Grid */
.tap-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.tap-product-card {
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: 4px 4px 0 var(--ink);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.tap-product-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--ink);
}

.tap-product-media {
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
    border-bottom: 2px solid var(--ink);
}

.tap-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tap-product-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tap-product-cat {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.tap-product-title {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--ink);
}

.tap-product-desc {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
    flex: 1;
}

.tap-product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
}

.tap-product-price {
    font-size: 20px;
    font-weight: 900;
    color: var(--ink);
}

.tap-product-cta {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--yellow);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

/* Real Gameplay Apple-Style Scroll-Driven Gallery */
.pd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.pd-shot {
    margin: 0;
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--ink);
    box-shadow: 0 16px 36px rgba(17, 17, 17, 0.12);
    will-change: transform, opacity;
}

.pd-shot:first-child {
    grid-column: 1 / -1;
}

.pd-shot img {
    width: 100%;
    aspect-ratio: 960 / 412;
    object-fit: cover;
    display: block;
}

@media (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view()) and (animation-range: entry)) {
        @keyframes pd-apple-reveal {
            entry 0% {
                opacity: 0.25;
                transform: scale(0.92) translateY(28px);
            }
            entry 85%,
            exit 15% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
            exit 100% {
                opacity: 0.35;
                transform: scale(0.95) translateY(-16px);
            }
        }

        .pd-shot {
            animation: pd-apple-reveal auto linear both;
            animation-timeline: view(block);
        }
    }
}

.pd-shot figcaption {
    background: #ffffff;
    color: var(--ink);
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    border-top: 2px solid var(--ink);
}

/* Dark Band: Free Tools & Database Showcase */
.pd-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.pd-tool-card {
    background: #202024;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pd-tool-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 197, 0, 0.16);
    color: var(--yellow);
    font-size: 11px;
    font-weight: 800;
}

.pd-tool-card h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}

.pd-tool-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #b4b4c0;
}

.pd-tool-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.pd-tool-pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f2f2f5;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.pd-tool-pill:hover {
    background: var(--yellow);
    color: #111111;
}

/* Guides & FAQ Two-Column */
.tap-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.tap-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 12px;
    overflow: hidden;
}

.tap-index-list li {
    border-bottom: 1px solid var(--rule);
}

.tap-index-list li:last-child {
    border-bottom: 0;
}

.tap-index-list a,
.tap-index-empty {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 15px 18px;
    text-decoration: none;
    color: var(--ink);
    font-size: 14px;
}

.tap-index-list a:hover {
    background: var(--cream);
}

.tap-index-name {
    font-weight: 700;
}

.tap-index-meta {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.tap-faq-list {
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 12px;
    overflow: hidden;
}

.tap-faq-list details {
    border-bottom: 1px solid var(--rule);
    padding: 15px 18px;
}

.tap-faq-list details:last-child {
    border-bottom: 0;
}

.tap-faq-list summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tap-faq-list summary::after {
    content: "+";
    font-size: 18px;
    font-weight: 800;
}

.tap-faq-list details[open] summary::after {
    content: "−";
}

.tap-faq-list details p {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
}

/* Release List (used on /games) */
.tap-release-list {
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 12px;
    overflow: hidden;
}

.tap-release-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 20px 22px;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    color: inherit;
}

.tap-release-row:last-child {
    border-bottom: 0;
}

.tap-release-row:hover {
    background: var(--cream);
}

.tap-release-thumb {
    width: 220px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--rule);
    background: #111;
}

.tap-release-body h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
}

.tap-release-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

/* Single Product Hub Layout */
.tap-single-wrap {
    padding: 36px 0 72px;
}

.tap-breadcrumb {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 18px;
}

.tap-breadcrumb a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
}

.tap-single-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 356px;
    gap: 28px;
    align-items: start;
}

.tap-article-box {
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 14px;
    padding: 30px 32px;
}

.tap-article-title {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 900;
    margin: 0 0 10px;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.tap-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--muted);
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--rule);
}

.tap-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.tap-spec-item {
    background: var(--cream);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
}

.tap-spec-label {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 3px;
}

.tap-content {
    font-size: 15px;
    line-height: 1.8;
    color: #262624;
}

.tap-content h2,
.tap-content h3 {
    color: var(--ink);
    font-weight: 800;
    margin: 26px 0 10px;
}

.tap-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.tap-buy-panel {
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 4px 4px 0 var(--ink);
    position: sticky;
    top: 80px;
}

.tap-buy-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--rule);
}

.tap-buy-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tap-buy-price {
    font-size: 28px;
    font-weight: 900;
    color: var(--ink);
}

.tap-vip-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 10px 14px;
    background: var(--cream);
    border: 1px solid var(--rule);
    border-radius: 8px;
    font-size: 12px;
}

.tap-vip-list li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: var(--muted);
}

.tap-vip-list li strong {
    color: var(--ink);
}

.tap-buy-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tap-buy-actions .btn,
.tap-buy-actions .tap-btn {
    width: 100%;
    justify-content: center;
}

.tap-related-links {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
}

.tap-related-links h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 800;
    color: var(--ink);
}

.tap-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tap-content img,
.tap-content video,
.tap-content figure {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

@media (max-width: 900px) {
    .pd-hero-grid,
    .tap-product-grid,
    .pd-gallery-grid,
    .pd-tools-grid,
    .tap-two-col,
    .tap-single-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .tap-article-box {
        min-width: 0;
        padding: 18px 16px;
    }
    .tap-release-row {
        grid-template-columns: 1fr;
    }
    .tap-release-thumb {
        width: 100%;
    }
    .tap-buy-panel {
        position: static;
    }
}
