/* Inner screens share the homepage artwork and circular section controls. */
body.is-inner {
    --inner-header-h: 84px;
    --inner-screen-h: calc(100svh - var(--inner-header-h) - 76px - env(safe-area-inset-bottom));
    --inner-art: url("../img/sections-bg-desktop.webp?v=jeddah-20261017");
}
html:has(body.is-inner) { scroll-padding-top: var(--inner-header-h); }
body.is-inner .site-main { padding-bottom: calc(38px + env(safe-area-inset-bottom)); }
body.is-inner .site-header { background: rgba(248,253,255,.9); border-bottom: 1px solid rgba(193,155,75,.3); }
body.is-inner .inner-section, body.is-inner .inner-screen,
body.is-inner .site-main > section.section, body.is-inner .auth-wrap {
    position: relative; isolation: isolate; scroll-margin-top: 0;
}
body.is-inner:not(.info-preview) .inner-screen::before,
body.is-inner:not(.info-preview) .site-main > section.section:not(.inner-section-list)::before,
body.is-inner:not(.info-preview) .auth-wrap::before {
    content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background: var(--inner-art) center bottom / cover no-repeat;
}
body.is-inner:not(.info-preview) .inner-screen::after,
body.is-inner:not(.info-preview) .site-main > section.section:not(.inner-section-list)::after,
body.is-inner:not(.info-preview) .auth-wrap::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(237,249,255,.45), rgba(244,251,255,.5) 60%, rgba(231,246,255,.15));
}
body.is-inner .inner-screen {
    min-height: var(--inner-screen-h); height: auto; display: flex; flex-direction: column;
    justify-content: center; align-items: stretch; gap: 18px; padding: 30px 0 42px !important;
}
body.is-inner .site-main > section.section {
    padding: 30px 0 42px !important; border: 0; background: transparent;
}
body.is-inner .page-head {
    width: 100%; max-width: none; margin: 0; padding: 38px 18px 26px; text-align: center;
}
body.is-inner .page-head.inner-screen { padding-inline: 18px !important; }
body.is-inner .page-head h1 { max-width: 800px; margin-inline: auto; color: #89601c;
    text-shadow: 0 1px 1px #fff; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.35; text-wrap: balance; overflow-wrap: anywhere; }
body.is-inner .page-head p { max-width: 740px; margin: 12px auto 0; padding: 12px 18px;
    border-radius: 20px; color: #244e68; background: rgba(248,253,255,.8); font-size: 1rem; line-height: 1.85; }
body.is-inner .section-head { margin-bottom: 20px; }
body.is-inner .section-title, body.is-inner .cm-group-title { color: #89601c; text-shadow: 0 1px 0 #fff; text-wrap: balance; }
body.is-inner .section-sub { max-width: 740px; margin-inline: auto; line-height: 1.85; }
body.is-inner .inner-screen > .container { width: 100%; }
body.is-inner .vm-card, body.is-inner .theme-tile, body.is-inner .aud-card,
body.is-inner .sp-card, body.is-inner .cm-card {
    border: 1px solid rgba(255,255,255,.95); border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,.93), rgba(228,246,255,.85));
    box-shadow: 0 12px 30px -20px rgba(11,63,97,.4);
}
body.is-inner .vm-card { border-inline-start: 3px solid #d3ae60; }
body.is-inner .inner-section-list { display: block; min-height: 0; background: transparent; padding: 0 !important; }
body.is-inner .agenda-day.inner-screen, body.is-inner .cm-group.inner-screen { margin: 0; }
body.is-inner .agenda-day.inner-screen::before, body.is-inner .agenda-day.inner-screen::after,
body.is-inner .cm-group.inner-screen::before, body.is-inner .cm-group.inner-screen::after {
    left: 50%; right: auto; width: 100vw; transform: translateX(-50%);
}
body.is-inner .ag-item { background: rgba(249,253,255,.9); border-radius: 16px; padding: 16px; margin-block: 8px; }
body.is-inner .ag-group, body.is-inner .ag-session { background: rgba(250,253,255,.9); padding: 12px; border-radius: 14px; }
.inner-section-next {
    display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px;
    align-self: center; margin: 20px auto 0; padding: 0; border-radius: 50%;
    background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.96); color: #164e6c;
    box-shadow: 0 8px 18px -10px rgba(12,65,99,.4); text-decoration: none;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.inner-section-next svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inner-section-next:focus-visible { outline: 3px solid #956d22; outline-offset: 4px; }
body.is-inner .auth-card, body.is-inner .reg-card { border-radius: 24px; background: rgba(249,253,255,.94); }
body.is-inner .dash-main > .panel, body.is-inner .dash-main > .crud { border-radius: 20px; margin-bottom: 18px; }
@media (max-width: 820px) {
    body.is-inner { --inner-art: url("../img/sections-bg-mobile.webp?v=jeddah-20261017"); }
    body.is-inner .app-bar {
        position: sticky; top: 8px; z-index: 120; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center; gap: 10px; width: calc(100% - 24px); height: 64px; min-height: 64px;
        padding: 6px 10px; margin: 8px auto 12px; border-radius: 22px;
        background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(229,247,255,.86));
        border: 1px solid rgba(255,255,255,.98); box-shadow: 0 8px 22px -16px rgba(13,71,105,.5), inset 0 -1px 0 rgba(199,160,76,.35);
        -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    }
    body.is-inner .app-back, body.is-inner .app-home {
        display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%;
        color: #155270; border: 1px solid rgba(195,154,64,.3); background: rgba(255,255,255,.75);
    }
    body.is-inner .app-home { background: linear-gradient(145deg, #f9edce, #e6c477); color: #644812; }
    body.is-inner .app-logo { justify-self: center; width: min(160px, 100%) !important; height: 48px; padding: 0; background: none; }
    body.is-inner .app-logo-img, body.is-inner .app-logo-img img { display: block; width: auto; max-width: 100%; max-height: 48px; height: auto; object-fit: contain; }
    body.is-inner.nav-open .app-bar { z-index: 70; }
    body.is-inner .site-main > section.section > .container { width: calc(100% - 28px); padding-inline: 0; }
    body.is-inner .page-head h1 { font-size: clamp(1.65rem, 5.4vw, 2rem); }
    body.is-inner .page-head p { font-size: .92rem; }
    body.is-inner .auth-wrap { min-height: var(--inner-screen-h); padding: 26px 14px 42px; }
    body.is-inner .site-main { padding-bottom: calc(44px + env(safe-area-inset-bottom)); }
    html:has(body.is-inner[data-section-mode="story"]) { scroll-snap-type: y mandatory; }
    body.is-inner[data-section-mode="story"] .inner-screen { scroll-snap-align: start; scroll-snap-stop: always; }
    body.is-inner[data-section-mode="story"] .site-footer { scroll-snap-align: end; }
}
@media (min-width: 821px) { body.is-inner { --inner-header-h: 96px; --inner-screen-h: calc(100svh - 96px); } }
@media (prefers-reduced-motion: reduce) { html:has(body.is-inner) { scroll-behavior: auto; scroll-snap-type: none; } }
@media print {
    .inner-section-next, body.is-inner .app-bar { display: none !important; }
    body.is-inner .inner-screen { display: block; min-height: 0; padding: 12px 0 !important; }
    body.is-inner .inner-screen::before, body.is-inner .inner-screen::after,
    body.is-inner .site-main > section.section::before, body.is-inner .site-main > section.section::after { display: none; }
}

/* One complete section per mobile screen; never expose neighbouring sections. */
.inner-page-controls { display: none; }
@media (max-width: 820px) {
    html:has(body.inner-paged) { scroll-snap-type: none !important; scroll-behavior: auto; }
    body.inner-paged { overflow: hidden; }
    body.is-inner.inner-paged .site-main {
        height: calc(100dvh - var(--inner-header-h) - 106px - env(safe-area-inset-bottom));
        min-height: 220px; display: flex; flex-direction: column; padding: 0;
    }
    body.inner-paged .inner-page-stage { flex: 1 1 auto; min-height: 0; overflow: hidden; }
    body.inner-paged .inner-page-stage > .inner-screen,
    body.inner-paged .inner-page-stage > .inner-section-list,
    body.inner-paged .inner-section-list > .container {
        height: 100%; min-height: 0; margin-block: 0;
    }
    body.is-inner.inner-paged .inner-screen {
        height: 100%; min-height: 0; padding: 12px 14px 16px !important;
        overflow-y: auto; overscroll-behavior: contain; scroll-snap-align: none;
        justify-content: flex-start; gap: 10px; scrollbar-width: thin;
    }
    body.inner-paged .inner-screen[hidden] { display: none !important; }
    body.inner-paged .inner-screen > .container { margin-block: auto; }
    body.inner-paged .inner-section-list { padding: 0 !important; }
    body.inner-paged .inner-section-next { display: none; }
    body.inner-paged .inner-page-controls {
        display: flex; flex: 0 0 50px; align-items: center; justify-content: center; gap: 18px;
        margin: 0 14px; border-radius: 18px; border: 1px solid #fff;
        background: rgba(247,253,255,.93); color: #224e67;
    }
    body.inner-paged .inner-page-controls[hidden] { display: none; }
    .inner-page-controls button {
        min-height: 42px; padding: 7px 16px; border-radius: 999px;
        border: 1px solid rgba(183,143,54,.35); background: #fbf5e4; color: #244c64; font: inherit; font-size: .8rem; cursor: pointer;
    }
    .inner-page-controls button:disabled { opacity: .35; cursor: default; }
    .inner-page-controls button:focus-visible { outline: 3px solid #956d22; outline-offset: 2px; }
    .inner-page-controls span { font-size: .8rem; white-space: nowrap; }
    body.inner-paged .about-grid { gap: 12px; }
    body.inner-paged .vm-card { padding: 16px; border-radius: 20px; }
    body.inner-paged .vm-icon { width: 36px; height: 36px; margin-bottom: 10px; }
    body.inner-paged .vm-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
    body.inner-paged .vm-card p { font-size: .88rem; line-height: 1.65; }
    body.inner-paged .theme-tile, body.inner-paged .aud-card { padding: 16px; }
    body.inner-paged .page-head p { padding: 10px 12px; font-size: .88rem; line-height: 1.7; }
    body.inner-paged .page-head h1 { font-size: 1.6rem; }
    body.inner-paged .site-footer { display: none; }
}
@media print {
    .inner-page-controls { display: none !important; }
    .inner-page-stage { height: auto !important; overflow: visible !important; }
    body.is-inner.inner-paged .inner-screen[hidden] { display: block !important; }
    body.inner-paged { overflow: visible !important; }
    body.is-inner.inner-paged .site-main { display: block; height: auto; overflow: visible; }
}

/* Native horizontal card rails also work before JavaScript loads. */
.inner-card-controls { display: none; }
@media (max-width: 820px) {
    body.is-inner :is(.about-grid, .card-grid, .sp-grid, .cm-grid, .my-subs-grid, .pricing-grid):not(:has(form)) {
        display: grid !important; grid-template-columns: none !important; grid-template-rows: auto;
        grid-auto-flow: column; grid-auto-columns: calc(100% - 20px); gap: 12px;
        width: 100%; max-width: 100%; min-width: 0; overflow-x: auto;
        scroll-snap-type: x mandatory; scroll-padding-inline: 2px; overscroll-behavior-x: contain;
        padding: 4px 2px 12px; align-items: stretch; scrollbar-width: thin;
    }
    body.is-inner :is(.about-grid, .card-grid, .sp-grid, .cm-grid, .my-subs-grid, .pricing-grid):not(:has(form)) > * {
        grid-column: auto !important; grid-row: auto !important; width: auto; min-width: 0;
        scroll-snap-align: center; scroll-snap-stop: always;
    }
    body.is-inner .inner-card-rail > :is(.vm-card, .theme-tile, .aud-card, .sp-card, .cm-card) {
        min-height: 210px; max-height: min(360px, calc(100dvh - 300px)); overflow-y: auto;
    }
    body.is-inner .inner-card-rail .theme-tile h3 { font-size: 1.1rem; line-height: 1.5; }
    body.is-inner .inner-card-controls {
        display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px auto 12px;
    }
    .inner-card-controls button {
        min-height: 40px; padding: 7px 15px; border-radius: 999px; color: #234e67;
        background: rgba(255,255,255,.9); border: 1px solid rgba(183,143,54,.4); font: inherit; font-size: .78rem;
    }
    .inner-card-controls button:disabled { opacity: .35; }
    .inner-card-controls span { color: #234e67; font-size: .8rem; white-space: nowrap; }
    .inner-card-controls button:focus-visible, .inner-card-rail:focus-visible { outline: 3px solid #956d22; outline-offset: 2px; }
}
@media print {
    .inner-card-controls { display: none !important; }
    body.is-inner .inner-card-rail { display: block !important; overflow: visible; }
    body.is-inner .inner-card-rail > * { max-height: none; overflow: visible; }
}

/* Touch-led navigation: smooth native swiping, without Next/Previous buttons. */
@media (max-width: 820px) {
    body.is-inner .inner-card-controls button,
    body.is-inner .inner-page-controls button { display: none; }
    body.is-inner .inner-card-controls {
        margin: 6px auto 10px; padding: 5px 14px; width: fit-content; border-radius: 999px;
        background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.85);
    }
    body.is-inner .inner-card-rail {
        scroll-behavior: smooth; scroll-snap-type: x proximity !important;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    body.is-inner .inner-card-rail::-webkit-scrollbar { display: none; }
    body.is-inner .inner-card-rail > * { scroll-snap-stop: normal !important; }
}
@media (prefers-reduced-motion: reduce) {
    body.is-inner .inner-card-rail { scroll-behavior: auto; }
}

@media (max-width: 820px) {
    html:has(body.is-inner[data-section-mode="story"]) {
        scroll-snap-type: y proximity; scroll-behavior: smooth;
    }
    body.is-inner .inner-section-next { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html:has(body.is-inner[data-section-mode="story"]) { scroll-behavior: auto; scroll-snap-type: none; }
}

/* Edge-to-edge mobile sections, with padding only inside readable content. */
@media (max-width: 820px) {
    body.is-inner .site-main,
    body.is-inner .inner-page-stage,
    body.is-inner .site-main > .inner-section,
    body.is-inner .site-main > .inner-screen,
    body.is-inner .site-main > section.section {
        width: 100%; max-width: none; margin-inline: 0; border-radius: 0;
    }
    body.is-inner .site-main > section.section > .container,
    body.is-inner .inner-screen > .container,
    body.is-inner .inner-section-list > .container {
        width: 100%; max-width: none; margin-inline: 0; padding-inline: 0;
    }
    body.is-inner .inner-screen,
    body.is-inner .page-head.inner-screen { padding-inline: 0 !important; }
    body.is-inner .page-head h1,
    body.is-inner .page-head p,
    body.is-inner .section-head,
    body.is-inner .cm-group-title,
    body.is-inner .agenda-day > h3 { margin-inline: 16px; }
    body.is-inner :is(.about-grid, .card-grid, .sp-grid, .cm-grid, .my-subs-grid, .pricing-grid):not(:has(form)) {
        width: 100%; max-width: none; padding-inline: 0;
        grid-auto-columns: 100%; gap: 0; scroll-padding-inline: 0;
    }
    body.is-inner .inner-card-rail > :is(.vm-card, .theme-tile, .aud-card, .sp-card, .cm-card),
    body.is-inner :is(.about-grid, .card-grid, .sp-grid, .cm-grid):not(:has(form)) > * {
        margin-inline: 0; border-radius: 0; border-inline: 0; padding-inline: 20px;
    }
    body.is-inner .inner-card-controls { margin-block: 8px 12px; }
    /* Keep input fields comfortable while their surrounding section fills the screen. */
    body.is-inner .site-main > section.section:has(form) > .container { padding-inline: 14px; }
}

/* Concept 7: centered, borderless stories over one continuous conference scene. */
html:has(body.seven-page) { scroll-snap-type: none !important; scroll-padding: 0; }
body.seven-page { overflow: hidden; }
body.is-inner.seven-page .site-main {
    position: relative; isolation: isolate; padding: 0; margin: 0; width: 100%; max-width: none;
    height: calc(100dvh - var(--inner-header-h) - 110px - env(safe-area-inset-bottom));
    min-height: 220px;
    background: linear-gradient(180deg, rgba(230,248,255,.4), rgba(241,250,255,.18) 60%, transparent), var(--inner-art) center bottom / cover no-repeat;
}
.seven-stage {
    display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 100%;
    width: 100%; height: calc(100% - 38px); gap: 0; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.seven-stage::-webkit-scrollbar { display: none; }
body.is-inner .seven-slide {
    display: flex; align-items: safe center; justify-content: center; min-width: 0; height: 100%;
    padding: 22px 22px 32px; overflow-y: auto; overscroll-behavior-y: contain;
    scroll-snap-align: start; scroll-snap-stop: always; background: none; border: 0;
}
.seven-content { width: 100%; max-width: 680px; text-align: center; padding-bottom: 20px; }
body.is-inner .seven-content :is(.inner-screen, .inner-section, .page-head, .section) {
    min-height: 0; height: auto; display: block; padding: 0 !important; margin: 0; background: none;
}
body.is-inner .seven-content :is(.inner-screen, .inner-section, .section)::before,
body.is-inner .seven-content :is(.inner-screen, .inner-section, .section)::after { content: none; }
body.is-inner .seven-content :is(.vm-card, .theme-tile, .aud-card, .sp-card, .cm-card) {
    width: 100%; max-width: none; min-height: 0; max-height: none; overflow: visible;
    display: block; padding: 0 !important; margin: 0; border: 0; border-radius: 0;
    background: transparent !important; box-shadow: none; text-align: center;
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.is-inner .seven-content .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
body.is-inner .seven-content :is(.vm-icon, .a-icon),
body.is-inner .seven-content .theme-tile > .num {
    display: grid; place-items: center; width: 82px; height: 82px; margin: 0 auto 24px;
    border-radius: 50%; border: 2px solid #cda44e;
    background: radial-gradient(circle at 35% 25%, #fff, #e5f5fc 75%);
    color: #a47b26; font-size: 2rem; line-height: 1;
    box-shadow: 0 0 0 5px rgba(255,255,255,.6), 0 0 22px rgba(236,198,107,.5);
}
body.is-inner .seven-content :is(.vm-icon, .a-icon) svg { width: 38px; height: 38px; color: #0f6584; }
body.is-inner .seven-content :is(h1, h2, h3) {
    color: #104f6a; text-shadow: 0 1px 0 rgba(255,255,255,.8);
    font-size: clamp(1.45rem, 5.2vw, 2.35rem); line-height: 1.4;
    margin: 0 auto 16px; max-width: 700px; text-wrap: balance; overflow-wrap: anywhere;
}
body.is-inner .seven-content p,
body.is-inner .seven-content .section-sub {
    max-width: 600px; margin: 0 auto 14px; padding: 0; border-radius: 0; background: none;
    color: #244e64; font-size: clamp(.95rem, 3.2vw, 1.12rem); line-height: 1.85;
    text-shadow: 0 1px 0 rgba(255,255,255,.8);
}
body.is-inner .seven-content .seven-category {
    color: #84601d; font-size: .78rem; font-weight: 700; margin-bottom: 18px;
}
.seven-content :is(.card-grid, .about-grid, .sp-grid, .cm-grid):empty { display: none !important; }
body.is-inner .seven-content .section-head { margin: 0; }
body.is-inner .seven-content .sp-photo,
body.is-inner .seven-content .cm-avatar { margin-inline: auto; margin-bottom: 20px; }
body.is-inner .seven-content :is(.sp-name, .cm-name) { color: #104f6a; font-size: 1.5rem; }
.seven-controls { height: 38px; display: flex; align-items: center; justify-content: center; }
.seven-status {
    padding: 4px 15px; border: 1px solid rgba(255,255,255,.8); border-radius: 999px;
    color: #22546c; background: rgba(255,255,255,.7); font-size: .78rem;
}
.seven-arrow { display: none; }
body.seven-page .site-footer { display: none; }
.seven-stage:focus-visible { outline: 3px solid #b58c38; outline-offset: -3px; }
@media (min-width: 821px) {
    body.is-inner.seven-page .site-main { height: calc(100dvh - 112px); }
    .seven-content { padding-inline: 30px; }
    .seven-arrow {
        display: grid; place-items: center; position: absolute; top: 50%; transform: translateY(-50%);
        width: 54px; height: 54px; border-radius: 50%; border: 1px solid #d7b975;
        color: #165574; background: rgba(255,255,255,.9); font-size: 1.8rem; cursor: pointer;
        box-shadow: 0 7px 20px -12px rgba(10,66,100,.45);
    }
    .seven-previous { inset-inline-start: 24px; }
    .seven-next { inset-inline-end: 24px; }
    .seven-arrow:disabled { opacity: .3; cursor: default; }
    .seven-arrow:focus-visible { outline: 3px solid #b58c38; outline-offset: 3px; }
}
@media (max-height: 600px) {
    body.is-inner .seven-slide { padding-top: 14px; padding-bottom: 14px; }
    body.is-inner .seven-content :is(.vm-icon, .a-icon), body.is-inner .seven-content .theme-tile > .num {
        width: 56px; height: 56px; margin-bottom: 16px;
    }
}
@media (prefers-reduced-motion: reduce) { .seven-stage { scroll-behavior: auto; } }
@media print {
    body.seven-page { overflow: visible; }
    body.is-inner.seven-page .site-main { height: auto; background: none; }
    .seven-stage { display: block; height: auto; overflow: visible; }
    body.is-inner .seven-slide { height: auto; display: block; overflow: visible; break-inside: avoid; padding: 18px; }
    .seven-controls { display: none; }
}
