@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Playfair+Display:wght@700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --ivory: #F9F7F1;
    --surface: #FFFFFF;
    --surface-soft: #F5F2E9;
    --emerald-deep: #0E1A14;
    --emerald-mid: #0F5A47;
    --teal: #0F766E;
    --mint: #4AE3B5;
    --gold: #C99A2E;
    --gold-bg: #FBF6E2;
    --gold-border: #E5CD87;
    --text-main: #18201C;
    --text-muted: #5C6B64;
    --border: #E2DCD0;
    --shadow-card: 0 12px 32px -12px rgba(14, 26, 20, 0.12);
    --shadow-phone: 0 22px 46px -12px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--ivory);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-image:
        radial-gradient(circle at 60% -10%, rgba(15, 90, 71, 0.08), transparent 45%),
        radial-gradient(circle at 5% 95%, rgba(212, 175, 55, 0.09), transparent 40%),
        radial-gradient(circle at 95% 85%, rgba(15, 118, 110, 0.07), transparent 40%);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* One-Screen Shell on Desktop */
.one-screen-shell {
    max-width: 1520px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 1180px) and (min-height: 760px) {
    .one-screen-shell {
        height: 100vh;
        overflow: hidden;
    }
}

/* Top Sticky Bar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0.9rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 16px -6px rgba(14, 26, 20, 0.08);
    flex-shrink: 0;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.brand-group img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--emerald-deep);
    letter-spacing: -0.02em;
}

.brand-pill {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--emerald-mid);
    background: #E8F5F1;
    border: 1px solid #BCE0D4;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.app-nav-pills {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.app-nav-pill {
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.app-nav-pill:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.app-nav-pill.active {
    background: var(--emerald-deep);
    color: #FFFFFF;
    border-color: var(--emerald-deep);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.lang-switcher a {
    padding: 0.1rem 0.25rem;
    border-radius: 6px;
    transition: color 0.15s ease;
}

.lang-switcher a.active {
    color: var(--emerald-mid);
    font-weight: 800;
}

.btn-top-cta {
    background: var(--emerald-mid);
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.52rem 1rem;
    border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.btn-top-cta:hover {
    background: var(--emerald-deep);
    transform: translateY(-1px);
}

/* Main 3-Column Bento Grid */
.bento-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(340px, 1.08fr) minmax(290px, 0.84fr) minmax(350px, 1.08fr);
    gap: 0.85rem;
}

.col-left,
.showcase-card,
.companion-card,
.card {
    min-width: 0;
}

.col-left {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-card);
}

/* Flagship Hero Card (JomTajwid Priority) */
.hero-card {
    padding: 1.25rem 1.35rem;
    border: 1.5px solid #C6DDD4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    background: var(--gold-bg);
    border: 1px solid var(--gold-border);
    color: #8E610B;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero-card h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.5rem, 2.2vw, 2.25rem);
    line-height: 1.15;
    font-weight: 800;
    color: var(--emerald-deep);
    letter-spacing: -0.02em;
}

.hero-card h1 span {
    color: var(--emerald-mid);
}

.hero-desc {
    font-size: clamp(0.84rem, 1vw, 0.94rem);
    line-height: 1.48;
    color: var(--text-muted);
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.hero-pill {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--emerald-mid);
    background: #EFFAF6;
    border: 1px solid #C8E9DD;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
}

.store-buttons {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.btn-store {
    flex: 1;
    min-width: 155px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.62rem 0.95rem;
    border-radius: 12px;
    color: #FFFFFF;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-store.ios {
    background: var(--emerald-deep);
}

.btn-store.android {
    background: var(--emerald-mid);
}

.btn-store:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -8px rgba(14, 26, 20, 0.35);
}

.btn-store svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.btn-store .text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.btn-store .text small {
    font-size: 0.62rem;
    opacity: 0.85;
    font-weight: 500;
}

.btn-store .text strong {
    font-size: 0.88rem;
    font-weight: 700;
}

.hero-note {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Interactive Live Sandbox Card */
.sandbox-card {
    flex: 1;
    min-height: 0;
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sandbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sandbox-header h2 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--emerald-deep);
}

.sandbox-hint {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--teal);
}

.sandbox-tabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.sandbox-tab {
    padding: 0.34rem 0.7rem;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    transition: all 0.18s ease;
}

.sandbox-tab.active {
    background: var(--emerald-mid);
    color: #FFFFFF;
    border-color: var(--emerald-mid);
}

.sandbox-panel {
    display: none;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.55rem;
}

.sandbox-panel.active {
    display: flex;
}

/* Compact 8-tile RTL Hijaiyah Grid inside Sandbox */
.hijaiyah-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    direction: rtl;
    flex: 1;
    align-content: center;
}

.hijaiyah-tile {
    background: linear-gradient(145deg, #27375B 0%, #1A2644 100%);
    border-radius: 12px;
    padding: 0.5rem 0.3rem;
    min-height: 88px;
    max-height: 128px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.15rem;
    border: 1.5px solid #324670;
    color: #FFFFFF;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    position: relative;
}

.hijaiyah-tile:hover {
    transform: translateY(-2px);
    border-color: #60A5FA;
}

.hijaiyah-tile.playing {
    background: linear-gradient(145deg, #162E24 0%, #0E1F18 100%);
    border-color: #FACC15;
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.32);
}

.hijaiyah-tile .badge-ar {
    background: linear-gradient(135deg, #E2B455 0%, #C79636 100%);
    color: #162032;
    font-family: 'Amiri', serif;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.08rem 0.45rem;
    border-radius: 6px;
    line-height: 1.25;
}

.hijaiyah-tile .char-ar {
    font-family: 'Amiri', serif;
    font-size: clamp(1.55rem, 2.1vw, 2.05rem);
    line-height: 1.35;
    padding: 0.05rem 0;
}

.hijaiyah-tile .trans-rumi {
    font-size: 0.7rem;
    font-weight: 600;
    color: #B4C2D8;
}

.hijaiyah-tile.playing .trans-rumi {
    color: #FACC15;
}

.sandbox-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.btn-expand-letters {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--emerald-mid);
    background: #EBF7F3;
    border: 1px solid #C2E5D9;
    padding: 0.34rem 0.75rem;
    border-radius: 999px;
    transition: background 0.18s ease;
}

.btn-expand-letters:hover {
    background: #D8EFE7;
}

/* Other Interactive Sandbox Tabs */
.demo-box {
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    flex: 1;
}

.demo-arabic-verse {
    font-family: 'Amiri', serif;
    font-size: 1.65rem;
    line-height: 1.5;
    text-align: center;
    direction: rtl;
    color: var(--emerald-deep);
}

.demo-highlight {
    background: #DBEAFE;
    color: #1D4ED8;
    padding: 0 0.3rem;
    border-radius: 6px;
}

.demo-rule-pill {
    align-self: center;
    font-size: 0.75rem;
    font-weight: 800;
    background: #E0F2FE;
    color: #0369A1;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
}

.demo-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

.btn-demo-play {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--emerald-mid);
    color: #FFFFFF;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.48rem 0.95rem;
    border-radius: 999px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-demo-play:hover,
.btn-demo-play.playing {
    background: var(--emerald-deep);
    transform: translateY(-1px);
}

.iqra-sample-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    direction: rtl;
}

.iqra-tile {
    background: #FFFFFF;
    border: 1.5px solid #DED6C2;
    border-radius: 12px;
    padding: 0.6rem 0.4rem;
    text-align: center;
    transition: all 0.18s ease;
}

.iqra-tile:hover,
.iqra-tile.playing {
    border-color: #D97706;
    background: #FEF9C3;
}

.iqra-tile .ar {
    display: block;
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    line-height: 1.25;
    color: #111827;
}

.iqra-tile .rumi {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748B;
}

.solat-demo-flex {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.solat-demo-flex img {
    width: 82px;
    height: 112px;
    object-fit: contain;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.25rem;
    flex-shrink: 0;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
}

.quiz-opt-btn {
    padding: 0.5rem 0.4rem;
    border-radius: 10px;
    background: #FFFFFF;
    border: 1.5px solid var(--border);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    transition: all 0.16s ease;
}

.quiz-opt-btn:hover {
    border-color: #5B21B6;
}

.quiz-opt-btn.correct {
    background: #DCFCE7;
    border-color: #16A34A;
    color: #166534;
}

.quiz-opt-btn.wrong {
    background: #FEE2E2;
    border-color: #DC2626;
    color: #991B1B;
}

.quiz-feedback {
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
    min-height: 1.1rem;
}

/* Center Column: Live Actual App Screen Showcase */
.showcase-card {
    background: var(--emerald-deep);
    border: 1.5px solid #264335;
    border-radius: 26px;
    padding: 0.9rem 1rem;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    box-shadow: 0 22px 46px -14px rgba(14, 26, 20, 0.35);
    min-height: 0;
}

.showcase-topbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #6EE7B7;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(110, 231, 183, 0.25);
    padding: 0.24rem 0.6rem;
    border-radius: 999px;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 8px #34D399;
}

.showcase-app-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.btn-reset-flagship {
    font-size: 0.68rem;
    font-weight: 700;
    color: #FDE68A;
    background: rgba(253, 230, 138, 0.12);
    border: 1px solid rgba(253, 230, 138, 0.35);
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
}

.btn-reset-flagship.hidden {
    display: none;
}

.phone-stage {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.real-phone-frame {
    height: 100%;
    max-height: min(690px, 68vh);
    max-width: 100%;
    aspect-ratio: 1206 / 2622;
    background: #080C0A;
    border-radius: 34px;
    padding: 7px;
    border: 2px solid #44584E;
    box-shadow: var(--shadow-phone);
    position: relative;
    cursor: zoom-in;
    transition: transform 0.25s ease;
}

.real-phone-frame:hover {
    transform: translateY(-2px);
}

.real-phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 27px;
    display: block;
}

.screen-thumbs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
    flex-shrink: 0;
}

.screen-thumb {
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 0.28rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #C7D6CE;
    transition: all 0.18s ease;
    text-align: left;
}

.screen-thumb:hover {
    border-color: rgba(110, 231, 183, 0.55);
}

.screen-thumb.active {
    background: rgba(74, 227, 181, 0.14);
    border-color: var(--mint);
    color: #FFFFFF;
}

.screen-thumb img {
    width: 24px;
    height: 46px;
    object-fit: cover;
    object-position: top center;
    border-radius: 5px;
    flex-shrink: 0;
}

.screen-thumb span {
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right Column: Companion Apps Promoted Alongside JomTajwid */
.companion-card {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.65rem;
    min-height: 0;
}

.companion-header h2 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--emerald-deep);
    line-height: 1.25;
}

.companion-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.18rem;
}

.companion-stack {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 0.65rem;
}

.app-mini-card {
    border-radius: 18px;
    padding: 0.78rem 0.85rem;
    display: grid;
    grid-template-columns: 1fr 78px;
    gap: 0.75rem;
    align-items: center;
    border: 1.5px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px rgba(14, 26, 20, 0.14);
}

.app-mini-card.theme-jomiqra {
    background: #FAF8F1;
    border-color: #DFC57B;
}

.app-mini-card.theme-jomtajwidquiz {
    background: #F7F3FC;
    border-color: #C7AFE8;
}

.app-mini-card.theme-jomsolat {
    background: #F1F8FC;
    border-color: #A8CFE8;
}

.app-mini-card.is-previewing {
    box-shadow: 0 0 0 2px var(--emerald-deep);
}

.app-mini-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.42rem;
    min-width: 0;
}

.app-mini-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.app-mini-head img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.app-mini-role {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    display: block;
}

.app-mini-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--emerald-deep);
    line-height: 1.15;
}

.app-mini-desc {
    font-size: 0.75rem;
    line-height: 1.38;
    color: var(--text-muted);
}

.app-mini-actions {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    flex-wrap: wrap;
}

.btn-mini-store {
    font-size: 0.69rem;
    font-weight: 700;
    padding: 0.34rem 0.62rem;
    border-radius: 8px;
    color: #FFFFFF;
    background: var(--emerald-deep);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: opacity 0.15s ease;
}

.btn-mini-store:hover {
    opacity: 0.9;
}

.btn-mini-preview {
    font-size: 0.69rem;
    font-weight: 700;
    padding: 0.32rem 0.62rem;
    border-radius: 8px;
    background: #FFFFFF;
    border: 1px solid var(--border);
    color: var(--emerald-deep);
    transition: all 0.15s ease;
}

.btn-mini-preview:hover {
    background: var(--emerald-deep);
    color: #FFFFFF;
    border-color: var(--emerald-deep);
}

.mini-phone-thumb {
    width: 78px;
    height: 160px;
    border-radius: 14px;
    background: #0B100E;
    padding: 3px;
    border: 1.5px solid #6E7E77;
    box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mini-phone-thumb:hover {
    transform: scale(1.04);
}

.mini-phone-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 11px;
    display: block;
}

/* Slim Footer Strip */
.bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.3rem 0.5rem 0.15rem 0.5rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.bottom-links {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.bottom-links a {
    font-weight: 600;
    transition: color 0.15s ease;
}

.bottom-links a:hover {
    color: var(--emerald-mid);
}

/* Modals (All 29 Hijaiyah Letters + Fullscreen Screen Lightbox) */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(14, 26, 20, 0.72);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.modal-backdrop.open {
    display: flex;
}

.modal-sheet {
    background: #FFFFFF;
    border-radius: 24px;
    max-width: 820px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-head h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--emerald-deep);
}

.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
}

.hijaiyah-all-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 0.65rem;
    direction: rtl;
}

.lightbox-frame {
    max-height: 88vh;
    max-width: 400px;
    background: #080C0A;
    padding: 10px;
    border-radius: 38px;
    border: 2px solid #607269;
    position: relative;
}

.lightbox-frame img {
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 28px;
    display: block;
}

/* Responsive Tablet & Mobile */
@media (max-width: 1179px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .showcase-card {
        min-height: 620px;
    }

    .companion-card {
        grid-column: 1 / -1;
    }

    .companion-stack {
        grid-template-rows: auto;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .one-screen-shell {
        width: 100%;
        max-width: 100%;
        padding: 0.65rem 0.75rem;
        overflow-x: hidden;
    }

    .topbar {
        flex-wrap: wrap;
        padding: 0.6rem 0.75rem;
        gap: 0.55rem;
        max-width: 100%;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .btn-top-cta {
        font-size: 0.72rem;
        padding: 0.44rem 0.75rem;
        white-space: normal;
        text-align: center;
    }

    .app-nav-pills {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .bento-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .companion-stack {
        grid-template-columns: minmax(0, 1fr);
    }

    .real-phone-frame {
        height: auto;
        width: 260px;
        max-width: 100%;
        max-height: none;
    }
}

@media (max-width: 520px) {
    .hero-card,
    .sandbox-card,
    .companion-card {
        padding: 0.85rem;
    }

    .hero-badge {
        max-width: 100%;
        font-size: 0.64rem;
    }

    .btn-store {
        min-width: 0;
        flex: 1 1 125px;
        padding: 0.52rem 0.65rem;
    }

    .hijaiyah-mini-grid {
        gap: 0.35rem;
        width: 100%;
    }

    .hijaiyah-tile {
        min-height: 76px;
        padding: 0.35rem 0.15rem;
    }

    .sandbox-footer-row {
        flex-wrap: wrap;
    }

    .app-mini-card {
        grid-template-columns: minmax(0, 1fr) 64px;
        padding: 0.7rem;
        gap: 0.55rem;
    }

    .mini-phone-thumb {
        width: 64px;
        height: 132px;
    }
}
