/* ================================================================= */
/* HOME SCREEN — Pills + Carousel + Context Content                  */
/* ================================================================= */

/* ── Outer wrapper (same ID/class for show/hide compat) ── */
.home-suggestions-wrapper {
    position: fixed;
    left: 50%;
    top: 56%;
    transform: translateX(-50%);
    width: min(72%, 860px);
    z-index: var(--z-welcome-message, 998);
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transition:
        opacity 0.62s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.62s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s 0.62s;
}

.home-suggestions-wrapper.visible {
    opacity: 1;
    visibility: visible;
    transition:
        opacity 0.72s cubic-bezier(0.16, 1, 0.3, 1) 0.18s,
        transform 0.72s cubic-bezier(0.16, 1, 0.3, 1) 0.18s,
        visibility 0s 0s;
}

.home-suggestions-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(18px);
}

/* ================================================================= */
/* PILLS ROW                                                          */
/* ================================================================= */

.home-pills-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    animation: welcomeOverviewRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.home-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition:
        transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        color 0.22s ease;
}

.home-pill i {
    font-size: 0.86rem;
}

.home-pill:hover {
    transform: translateY(-2px);
}

.home-pill:active {
    transform: translateY(0) scale(0.97);
    transition-duration: 0.08s;
}

/* ── Dark mode pill ── */
.dark-mode .home-pill {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.78);
}

.dark-mode .home-pill:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.dark-mode .home-pill.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 1);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Light mode pill ── */
body:not(.dark-mode) .home-pill {
    background: rgba(44, 36, 28, 0.04);
    border-color: rgba(44, 36, 28, 0.12);
    color: rgba(44, 36, 28, 0.72);
}

body:not(.dark-mode) .home-pill:hover {
    background: rgba(44, 36, 28, 0.08);
    border-color: rgba(44, 36, 28, 0.2);
    color: rgba(16, 14, 11, 0.92);
}

body:not(.dark-mode) .home-pill.active {
    background: rgba(44, 36, 28, 0.1);
    border-color: rgba(44, 36, 28, 0.26);
    color: rgba(16, 14, 11, 1);
}

/* ================================================================= */
/* CAROUSEL — Auto-rotating feature showcase card                     */
/* ================================================================= */
.home-carousel {
    position: fixed;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: min(72%, 620px);
    z-index: var(--z-welcome-message, 998);
    pointer-events: auto;
    animation: carouselRiseCenter 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.home-carousel.hidden {
    display: none;
}

.carousel-track {
    position: relative;
    width: 100%;
    min-height: 100px;
    border-radius: 18px;
    border: 1px solid;
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.dark-mode .carousel-track {
    background: rgba(20, 20, 22, 0.82);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body:not(.dark-mode) .carousel-track {
    background: rgba(247, 242, 233, 0.88);
    border-color: rgba(44, 36, 28, 0.1);
    box-shadow:
        0 16px 48px rgba(73, 58, 38, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.carousel-slide {
    display: none;
    padding: 24px 28px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    animation: carouselFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.carousel-slide.active {
    display: flex;
}

@keyframes carouselFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-slide-copy {
    flex: 1;
    min-width: 0;
}

.carousel-slide-copy h4 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.carousel-slide-copy p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    font-weight: 400;
}

.dark-mode .carousel-slide-copy h4 { color: rgba(255, 255, 255, 0.95); }
.dark-mode .carousel-slide-copy p { color: rgba(255, 255, 255, 0.55); }
body:not(.dark-mode) .carousel-slide-copy h4 { color: rgba(16, 14, 11, 0.94); }
body:not(.dark-mode) .carousel-slide-copy p { color: rgba(44, 36, 28, 0.6); }

.carousel-slide-image {
    width: 130px;
    height: 76px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    transition: 
        border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide:hover .carousel-slide-image img {
    transform: scale(1.08);
}

/* ── Dark mode image styling ── */
.dark-mode .carousel-slide-image {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dark-mode .carousel-slide:hover .carousel-slide-image {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.6),
        0 0 16px rgba(255, 255, 255, 0.05);
}

/* ── Light mode image styling ── */
body:not(.dark-mode) .carousel-slide-image {
    border: 1px solid rgba(44, 36, 28, 0.12);
    box-shadow: 
        0 8px 24px rgba(73, 58, 38, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body:not(.dark-mode) .carousel-slide:hover .carousel-slide-image {
    border-color: rgba(44, 36, 28, 0.25);
    box-shadow: 
        0 12px 32px rgba(73, 58, 38, 0.18),
        0 0 16px rgba(44, 36, 28, 0.05);
}

/* ── Pagination dots ── */
.carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 12px;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.dark-mode .carousel-dot {
    background: rgba(255, 255, 255, 0.2);
}

.dark-mode .carousel-dot.active {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.3);
}

body:not(.dark-mode) .carousel-dot {
    background: rgba(44, 36, 28, 0.18);
}

body:not(.dark-mode) .carousel-dot.active {
    background: rgba(44, 36, 28, 0.6);
    transform: scale(1.3);
}

/* ================================================================= */
/* PILL CONTENT — Context-specific area below pills                   */
/* ================================================================= */

.home-pill-content {
    width: 100%;
    animation: pillContentReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-pill-content.hidden {
    display: none;
}

@keyframes pillContentReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================================= */
/* TEMPLATES — Horizontal scroll row                                  */
/* ================================================================= */

/* ── Scroll wrapper with arrows ── */
.templates-scroll-wrapper {
    position: relative;
    width: 100%;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-65%);
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.72rem;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        opacity 0.25s ease;
}

.scroll-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-arrow-left {
    left: -16px;
}

.scroll-arrow-right {
    right: -16px;
}

.scroll-arrow:hover {
    transform: translateY(-65%) scale(1.1);
}

.dark-mode .scroll-arrow {
    background: rgba(30, 30, 32, 0.92);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dark-mode .scroll-arrow:hover {
    background: rgba(50, 50, 54, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
}

body:not(.dark-mode) .scroll-arrow {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(44, 36, 28, 0.15);
    color: rgba(16, 14, 11, 0.8);
    box-shadow: 0 4px 16px rgba(73, 58, 38, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body:not(.dark-mode) .scroll-arrow:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(44, 36, 28, 0.25);
}

.templates-scroll-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 10px;
    /* Hidden scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.templates-scroll-row::-webkit-scrollbar {
    display: none;
}

.template-scroll-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    border-radius: 16px;
    border: 1px solid;
    cursor: pointer;
    overflow: hidden;
    transition:
        transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.24s ease,
        box-shadow 0.24s ease;
}

.template-scroll-card:hover {
    transform: translateY(-4px);
}

.dark-mode .template-scroll-card {
    background: rgba(20, 20, 22, 0.82);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dark-mode .template-scroll-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dark-mode .template-scroll-card.selected {
    border-color: rgba(125, 211, 252, 0.6);
    box-shadow:
        0 0 0 1px rgba(125, 211, 252, 0.2),
        0 8px 28px rgba(0, 0, 0, 0.35);
}

body:not(.dark-mode) .template-scroll-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(44, 36, 28, 0.1);
    box-shadow:
        0 8px 28px rgba(73, 58, 38, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body:not(.dark-mode) .template-scroll-card:hover {
    border-color: rgba(44, 36, 28, 0.18);
    box-shadow: 0 14px 40px rgba(73, 58, 38, 0.15);
}

body:not(.dark-mode) .template-scroll-card.selected {
    border-color: rgba(35, 100, 170, 0.5);
    box-shadow:
        0 0 0 1px rgba(35, 100, 170, 0.15),
        0 8px 28px rgba(73, 58, 38, 0.1);
}

/* ── Canvas wrap + eye icon ── */
.template-scroll-canvas-wrap {
    position: relative;
    padding: 12px 12px 0;
}

.template-scroll-canvas-wrap .ppt-template-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 10px;
    background: var(--ppt-bg);
    border: 1px solid rgba(127, 127, 127, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    display: block;
}

.template-preview-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.82rem;
    z-index: 2;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.template-preview-btn:hover {
    transform: scale(1.1);
}

.dark-mode .template-preview-btn {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dark-mode .template-preview-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

body:not(.dark-mode) .template-preview-btn {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(44, 36, 28, 0.15);
    color: rgba(16, 14, 11, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body:not(.dark-mode) .template-preview-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(44, 36, 28, 0.25);
    color: rgba(16, 14, 11, 0.92);
}

/* ── Selected badge ── */
.template-selected-badge {
    position: absolute;
    bottom: 8px;
    left: 18px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    z-index: 2;
}

.dark-mode .template-selected-badge {
    background: rgba(125, 211, 252, 0.9);
    color: #0a0e17;
}

body:not(.dark-mode) .template-selected-badge {
    background: rgba(35, 100, 170, 0.85);
    color: #fff;
}

/* ── Template info ── */
.template-scroll-info {
    padding: 10px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.template-scroll-info strong {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
}

.template-scroll-info small {
    font-size: 0.76rem;
    line-height: 1.4;
}

.dark-mode .template-scroll-info strong { color: rgba(255, 255, 255, 0.92); }
.dark-mode .template-scroll-info small { color: rgba(255, 255, 255, 0.5); }
body:not(.dark-mode) .template-scroll-info strong { color: rgba(16, 14, 11, 0.92); }
body:not(.dark-mode) .template-scroll-info small { color: rgba(44, 36, 28, 0.58); }

/* ── Hint text ── */
.templates-scroll-hint {
    padding-top: 4px;
    font-size: 0.72rem;
    text-align: center;
}

.dark-mode .templates-scroll-hint { color: rgba(255, 255, 255, 0.4); }
body:not(.dark-mode) .templates-scroll-hint { color: rgba(44, 36, 28, 0.5); }

/* ================================================================= */
/* PROMPT GRID — Website & Design starters                            */
/* ================================================================= */

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.prompt-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition:
        transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.prompt-card:hover {
    transform: translateY(-3px);
}

.prompt-card:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 0.08s;
}

.dark-mode .prompt-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.9);
}

.dark-mode .prompt-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body:not(.dark-mode) .prompt-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(44, 36, 28, 0.1);
    color: rgba(16, 14, 11, 0.92);
}

body:not(.dark-mode) .prompt-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(44, 36, 28, 0.18);
    box-shadow: 0 8px 24px rgba(73, 58, 38, 0.1);
}

.prompt-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.88rem;
}

.dark-mode .prompt-card-icon {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.65);
}

body:not(.dark-mode) .prompt-card-icon {
    background: rgba(44, 36, 28, 0.06);
    color: rgba(44, 36, 28, 0.6);
}

.prompt-card-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.prompt-card-copy strong {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
}

.prompt-card-copy small {
    font-size: 0.72rem;
    line-height: 1.4;
}

.dark-mode .prompt-card-copy strong { color: rgba(255, 255, 255, 0.92); }
.dark-mode .prompt-card-copy small { color: rgba(255, 255, 255, 0.48); }
body:not(.dark-mode) .prompt-card-copy strong { color: rgba(16, 14, 11, 0.92); }
body:not(.dark-mode) .prompt-card-copy small { color: rgba(44, 36, 28, 0.55); }

/* ================================================================= */
/* SESSIONS & TASKS — List views                                      */
/* ================================================================= */

.home-tasks-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-tasks-footer {
    display: flex;
    justify-content: flex-start;
}

/* ================================================================= */
/* SHARED: Card empty state + List items + Action buttons             */
/* (preserved from original — needed by sessions/tasks views)         */
/* ================================================================= */

.welcome-card-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.5;
    padding: 24px 16px;
    border-radius: 14px;
    border: 1px solid;
}

.dark-mode .welcome-card-empty {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.56);
}

body:not(.dark-mode) .welcome-card-empty {
    background: rgba(44, 36, 28, 0.035);
    border-color: rgba(44, 36, 28, 0.1);
    color: rgba(44, 36, 28, 0.56);
}

.welcome-card-action {
    border: 1px solid;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 0.76rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.welcome-card-action:hover {
    transform: translateY(-1px);
}

.dark-mode .welcome-card-action {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.12);
}

.dark-mode .welcome-card-action:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.18);
}

body:not(.dark-mode) .welcome-card-action {
    background: rgba(44, 36, 28, 0.06);
    color: rgba(19, 17, 14, 0.92);
    border-color: rgba(44, 36, 28, 0.12);
}

body:not(.dark-mode) .welcome-card-action:hover {
    background: rgba(44, 36, 28, 0.1);
    border-color: rgba(44, 36, 28, 0.18);
}

.welcome-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.welcome-list::-webkit-scrollbar {
    display: none;
}

.welcome-list-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid;
    border-radius: 13px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.welcome-list-item:hover {
    transform: translateX(3px);
}

.dark-mode .welcome-list-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
}

.dark-mode .welcome-list-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

body:not(.dark-mode) .welcome-list-item {
    background: rgba(44, 36, 28, 0.035);
    border-color: rgba(44, 36, 28, 0.1);
    color: rgba(16, 14, 11, 0.94);
}

body:not(.dark-mode) .welcome-list-item:hover {
    background: rgba(44, 36, 28, 0.08);
    border-color: rgba(44, 36, 28, 0.15);
    box-shadow: 0 6px 18px rgba(73, 58, 38, 0.08);
}

.welcome-list-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.welcome-list-title {
    font-size: 0.79rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.welcome-list-meta {
    font-size: 0.7rem;
    font-weight: 500;
}

.dark-mode .welcome-list-meta { color: rgba(255, 255, 255, 0.5); }
body:not(.dark-mode) .welcome-list-meta { color: rgba(44, 36, 28, 0.55); }

/* ================================================================= */
/* TEMPLATE DRAWER — Full browser overlay (preserved from original)   */
/* ================================================================= */

.ppt-template-drawer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ppt-template-drawer.hidden {
    display: none;
}

.ppt-template-drawer-panel {
    width: min(960px, 94vw);
    max-height: min(740px, 88vh);
    overflow: hidden;
    border: 1px solid;
    border-radius: 18px;
    padding: 18px;
}

.dark-mode .ppt-template-drawer-panel {
    background: rgba(18, 18, 20, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

body:not(.dark-mode) .ppt-template-drawer-panel {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(44, 36, 28, 0.12);
    box-shadow: 0 24px 70px rgba(73, 58, 38, 0.18);
}

.ppt-template-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.ppt-template-drawer-header h3 {
    margin: 0;
    font-size: 1rem;
}

.ppt-template-drawer-header p {
    margin: 4px 0 0;
    font-size: 0.78rem;
    opacity: 0.68;
}

.ppt-template-drawer-close {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
}

.dark-mode .ppt-template-drawer-close {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.86);
}

body:not(.dark-mode) .ppt-template-drawer-close {
    background: rgba(44, 36, 28, 0.04);
    border-color: rgba(44, 36, 28, 0.1);
    color: rgba(16, 14, 11, 0.86);
}

.ppt-template-drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-height: calc(88vh - 130px);
    overflow-y: auto;
    padding-right: 4px;
}

.ppt-template-drawer-item {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ppt-template-drawer-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Template preview button (used in drawer) ── */
.ppt-template-preview {
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 12px;
    border: 1px solid;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ppt-template-preview:hover {
    transform: translateY(-1px);
}

.ppt-template-preview.mini {
    flex-direction: column;
    gap: 6px;
    padding: 7px;
}

.dark-mode .ppt-template-preview {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.dark-mode .ppt-template-preview:hover,
.dark-mode .ppt-template-preview.selected {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(125, 211, 252, 0.72);
}

body:not(.dark-mode) .ppt-template-preview {
    background: rgba(44, 36, 28, 0.035);
    border-color: rgba(44, 36, 28, 0.1);
    color: rgba(16, 14, 11, 0.92);
}

body:not(.dark-mode) .ppt-template-preview:hover,
body:not(.dark-mode) .ppt-template-preview.selected {
    background: rgba(44, 36, 28, 0.07);
    border-color: rgba(35, 100, 170, 0.5);
}

/* ── Template canvas (shared by scroll cards + drawer) ── */
.ppt-template-canvas {
    position: relative;
    flex: 0 0 112px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 8px;
    background: var(--ppt-bg);
    border: 1px solid rgba(127, 127, 127, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ppt-template-preview.mini .ppt-template-canvas {
    flex: none;
    width: 100%;
}

.ppt-template-canvas::before {
    content: '';
    position: absolute;
    right: -18%;
    top: -26%;
    width: 54%;
    height: 72%;
    border-radius: 999px;
    background: var(--ppt-a);
    opacity: 0.72;
}

.ppt-template-canvas::after {
    content: '';
    position: absolute;
    left: 8%;
    bottom: 12%;
    width: 26%;
    height: 10%;
    border-radius: 999px;
    background: var(--ppt-b);
}

.ppt-template-line {
    position: absolute;
    left: 10%;
    height: 7%;
    border-radius: 999px;
    background: var(--ppt-a);
}

.ppt-template-line.title {
    top: 22%;
    width: 56%;
}

.ppt-template-line.short {
    top: 36%;
    width: 38%;
    opacity: 0.6;
}

.ppt-template-bars {
    position: absolute;
    right: 10%;
    bottom: 13%;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    width: 28%;
    height: 28%;
}

.ppt-template-bars i {
    display: block;
    flex: 1;
    border-radius: 5px 5px 2px 2px;
    background: var(--ppt-c);
}

.ppt-template-bars i:nth-child(1) { height: 44%; }
.ppt-template-bars i:nth-child(2) { height: 72%; background: var(--ppt-b); }
.ppt-template-bars i:nth-child(3) { height: 58%; background: var(--ppt-a); }

.ppt-template-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.ppt-template-copy strong {
    font-size: 0.82rem;
    line-height: 1.25;
}

.ppt-template-copy small {
    font-size: 0.74rem;
    line-height: 1.35;
    opacity: 0.72;
}

.ppt-template-preview.mini .ppt-template-copy strong {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ppt-template-best {
    font-size: 0.72rem;
    line-height: 1.35;
}

.dark-mode .ppt-template-best { color: rgba(255, 255, 255, 0.56); }
body:not(.dark-mode) .ppt-template-best { color: rgba(44, 36, 28, 0.6); }

/* ================================================================= */
/* SLIDE PREVIEW TOGGLE                                              */
/* ================================================================= */

.ppt-slide-preview-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.ppt-slide-preview-toggle:hover {
    transform: translateY(-1px);
}

.ppt-slide-preview-toggle i {
    font-size: 0.62rem;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark-mode .ppt-slide-preview-toggle {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.dark-mode .ppt-slide-preview-toggle:hover,
.dark-mode .ppt-slide-preview-toggle.expanded {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(125, 211, 252, 0.5);
    color: rgba(255, 255, 255, 0.95);
}

body:not(.dark-mode) .ppt-slide-preview-toggle {
    background: rgba(44, 36, 28, 0.03);
    border-color: rgba(44, 36, 28, 0.1);
    color: rgba(44, 36, 28, 0.75);
}

body:not(.dark-mode) .ppt-slide-preview-toggle:hover,
body:not(.dark-mode) .ppt-slide-preview-toggle.expanded {
    background: rgba(44, 36, 28, 0.06);
    border-color: rgba(35, 100, 170, 0.4);
    color: rgba(16, 14, 11, 0.92);
}

/* ================================================================= */
/* SLIDE PREVIEW PANEL                                               */
/* ================================================================= */

.ppt-slide-preview-panel {
    overflow: hidden;
    padding: 10px 0 0;
    animation: slidePreviewOpen 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ppt-slide-preview-panel.hidden {
    display: none;
}

@keyframes slidePreviewOpen {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        max-height: 600px;
        transform: translateY(0);
    }
}

.ppt-slide-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}

.ppt-slide-preview-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    border: 1px solid;
    border-radius: 10px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    cursor: default;
}

.ppt-slide-preview-item:hover {
    transform: translateY(-2px);
}

.dark-mode .ppt-slide-preview-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .ppt-slide-preview-item:hover {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

body:not(.dark-mode) .ppt-slide-preview-item {
    background: rgba(44, 36, 28, 0.02);
    border-color: rgba(44, 36, 28, 0.08);
}

body:not(.dark-mode) .ppt-slide-preview-item:hover {
    border-color: rgba(44, 36, 28, 0.16);
    box-shadow: 0 6px 16px rgba(73, 58, 38, 0.1);
}

.ppt-slide-preview-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ppt-slide-preview-info strong {
    font-size: 0.7rem;
    line-height: 1.2;
}

.dark-mode .ppt-slide-preview-info strong { color: rgba(255, 255, 255, 0.92); }
body:not(.dark-mode) .ppt-slide-preview-info strong { color: rgba(16, 14, 11, 0.92); }

.ppt-slide-preview-info small {
    font-size: 0.62rem;
    line-height: 1.3;
}

.dark-mode .ppt-slide-preview-info small { color: rgba(255, 255, 255, 0.52); }
body:not(.dark-mode) .ppt-slide-preview-info small { color: rgba(44, 36, 28, 0.56); }

/* ================================================================= */
/* SLIDE MINI-CANVAS — All layout variants (preserved)                */
/* ================================================================= */

.ppt-slide-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 6px;
    background: var(--ppt-bg);
    border: 1px solid rgba(127, 127, 127, 0.18);
}

.sc-kicker {
    position: absolute;
    left: 8%;
    top: 10%;
    width: 6%;
    height: 6%;
    border-radius: 2px;
    background: var(--ppt-a);
}

.sc-title-lg {
    position: absolute;
    left: 8%;
    top: 30%;
    width: 58%;
    height: 9%;
    border-radius: 999px;
    background: var(--ppt-a);
}

.sc-title-sm {
    position: absolute;
    left: 8%;
    top: 20%;
    width: 48%;
    height: 7%;
    border-radius: 999px;
    background: var(--ppt-a);
}

.sc-subtitle {
    position: absolute;
    left: 8%;
    top: 56%;
    width: 44%;
    height: 5%;
    border-radius: 999px;
    background: var(--ppt-a);
    opacity: 0.45;
}

.sc-arc {
    position: absolute;
    right: -6%;
    top: -14%;
    width: 28%;
    height: 46%;
    border-radius: 50%;
    border: 2px solid var(--ppt-a);
    opacity: 0.35;
}

/* Layout: Bullets */
.layout-bullets .sc-bullet {
    position: absolute;
    left: 10%;
    width: 44%;
    height: 4.5%;
    border-radius: 999px;
    background: var(--ppt-a);
    opacity: 0.5;
}

.layout-bullets .sc-bullet:nth-child(3) { top: 34%; }
.layout-bullets .sc-bullet:nth-child(4) { top: 43%; }
.layout-bullets .sc-bullet:nth-child(5) { top: 52%; }
.layout-bullets .sc-bullet:nth-child(6) { top: 61%; }
.layout-bullets .sc-bullet.short { width: 32%; }

.layout-bullets .sc-callout {
    position: absolute;
    right: 6%;
    top: 34%;
    width: 26%;
    height: 34%;
    border-radius: 5px;
    border: 1.5px solid var(--ppt-a);
    opacity: 0.4;
}

/* Layout: Two Column */
.layout-twocol .sc-col {
    position: absolute;
    top: 34%;
    width: 40%;
    height: 50%;
    border-radius: 5px;
    border: 1.5px solid;
}

.layout-twocol .sc-col.left { left: 6%; border-color: var(--ppt-a); }
.layout-twocol .sc-col.right { right: 6%; border-color: var(--ppt-b); }

/* Layout: Chart */
.layout-chart .sc-bar {
    position: absolute;
    left: 10%;
    height: 8%;
    border-radius: 0 3px 3px 0;
}

.layout-chart .sc-bar.b1 { top: 34%; width: 62%; background: var(--ppt-a); }
.layout-chart .sc-bar.b2 { top: 47%; width: 45%; background: var(--ppt-b); }
.layout-chart .sc-bar.b3 { top: 60%; width: 74%; background: var(--ppt-c); }
.layout-chart .sc-bar.b4 { top: 73%; width: 38%; background: var(--ppt-a); opacity: 0.6; }

/* Layout: Table */
.layout-table .sc-table-header {
    position: absolute;
    left: 8%; top: 33%;
    width: 84%; height: 10%;
    border-radius: 3px 3px 0 0;
    background: var(--ppt-a);
}

.layout-table .sc-table-row {
    position: absolute;
    left: 8%;
    width: 84%; height: 10%;
    border-bottom: 1px solid var(--ppt-a);
    opacity: 0.2;
}

.layout-table .sc-table-row:nth-child(4) { top: 43%; }
.layout-table .sc-table-row:nth-child(5) { top: 53%; opacity: 0.12; }
.layout-table .sc-table-row:nth-child(6) { top: 63%; }
.layout-table .sc-table-row.alt { background: var(--ppt-a); opacity: 0.06; }

/* Layout: Flow */
.layout-flow .sc-flow-row {
    position: absolute;
    left: 6%; right: 6%; top: 40%; height: 32%;
    display: flex;
    align-items: center;
    gap: 3%;
}

.layout-flow .sc-flow-box {
    flex: 1; height: 100%;
    border-radius: 4px;
    border: 1.5px solid var(--ppt-a);
    opacity: 0.55;
}

.layout-flow .sc-flow-box:nth-child(3) { border-color: var(--ppt-b); }
.layout-flow .sc-flow-box:nth-child(5) { border-color: var(--ppt-c); }

.layout-flow .sc-flow-arrow {
    width: 0; height: 0;
    border-left: 4px solid var(--ppt-a);
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    opacity: 0.4;
    flex-shrink: 0;
}

/* Layout: Visual */
.layout-visual .sc-image-placeholder {
    position: absolute;
    left: 8%; top: 32%;
    width: 84%; height: 44%;
    border-radius: 5px;
    border: 1.5px solid var(--ppt-a);
    opacity: 0.35;
    background: linear-gradient(135deg, transparent 45%, var(--ppt-a) 45%, var(--ppt-a) 46%, transparent 46%),
                linear-gradient(225deg, transparent 45%, var(--ppt-a) 45%, var(--ppt-a) 46%, transparent 46%);
    background-size: 100% 100%;
}

.layout-visual .sc-caption {
    position: absolute;
    left: 8%; bottom: 8%;
    width: 50%; height: 4%;
    border-radius: 999px;
    background: var(--ppt-a);
    opacity: 0.3;
}

/* ================================================================= */
/* ANIMATIONS                                                         */
/* ================================================================= */

@keyframes welcomeOverviewRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes carouselRiseCenter {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ================================================================= */
/* RESPONSIVE                                                         */
/* ================================================================= */

@media (max-width: 1200px) {
    .home-suggestions-wrapper {
        width: min(84%, 860px);
    }
}

@media (max-width: 960px) {
    .home-suggestions-wrapper {
        width: min(90%, 860px);
    }

    .prompt-grid {
        grid-template-columns: 1fr;
    }

    .template-scroll-card {
        flex: 0 0 230px;
    }
}

@media (max-width: 720px) {
    .home-suggestions-wrapper {
        width: 94%;
        bottom: 2%;
    }

    .home-pills-row {
        gap: 6px;
    }

    .home-pill {
        padding: 7px 12px;
        font-size: 0.76rem;
    }

    .template-scroll-card {
        flex: 0 0 200px;
    }

    .ppt-template-drawer-grid {
        grid-template-columns: 1fr;
    }

    .ppt-slide-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

@media (max-width: 480px) {
    .home-pill span {
        display: none;
    }

    .home-pill {
        padding: 8px 12px;
    }

    .carousel-slide {
        padding: 18px 20px;
    }

    .template-scroll-card {
        flex: 0 0 180px;
    }
}

/* ================================================================= */
/* TEMPLATE PREVIEW OVERLAY — Single-template slide layout viewer     */
/* ================================================================= */

.template-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s 0.3s;
}

.template-preview-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition:
        opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s 0s;
}

.template-preview-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.template-preview-panel {
    width: min(560px, 92vw);
    max-height: min(620px, 86vh);
    overflow-y: auto;
    border: 1px solid;
    border-radius: 18px;
    padding: 20px;
    animation: pillContentReveal 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.template-preview-panel::-webkit-scrollbar {
    display: none;
}

.dark-mode .template-preview-panel {
    background: rgba(18, 18, 20, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body:not(.dark-mode) .template-preview-panel {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(44, 36, 28, 0.12);
    box-shadow: 0 24px 70px rgba(73, 58, 38, 0.18);
}

.template-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.template-preview-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.template-preview-header-info .mini-canvas {
    flex: 0 0 80px;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    display: block;
}

.template-preview-header-info h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.template-preview-header-info p {
    margin: 3px 0 0;
    font-size: 0.76rem;
    line-height: 1.4;
}

.dark-mode .template-preview-header-info p { color: rgba(255, 255, 255, 0.55); }
body:not(.dark-mode) .template-preview-header-info p { color: rgba(44, 36, 28, 0.6); }

.template-preview-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    transition: background 0.18s ease;
}

.dark-mode .template-preview-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.86);
}

.dark-mode .template-preview-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

body:not(.dark-mode) .template-preview-close-btn {
    background: rgba(44, 36, 28, 0.04);
    border-color: rgba(44, 36, 28, 0.1);
    color: rgba(16, 14, 11, 0.86);
}

body:not(.dark-mode) .template-preview-close-btn:hover {
    background: rgba(44, 36, 28, 0.08);
}

.template-preview-subtitle {
    font-size: 0.74rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding-left: 2px;
}

.dark-mode .template-preview-subtitle { color: rgba(255, 255, 255, 0.45); }
body:not(.dark-mode) .template-preview-subtitle { color: rgba(44, 36, 28, 0.5); }

.template-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.template-preview-footer {
    display: flex;
    justify-content: flex-end;
}

.template-preview-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.template-preview-select-btn:hover {
    transform: translateY(-1px);
}

.dark-mode .template-preview-select-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
}

.dark-mode .template-preview-select-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.dark-mode .template-preview-select-btn.selected {
    background: rgba(125, 211, 252, 0.2);
    border-color: rgba(125, 211, 252, 0.5);
    color: rgba(125, 211, 252, 1);
}

body:not(.dark-mode) .template-preview-select-btn {
    background: rgba(44, 36, 28, 0.06);
    border-color: rgba(44, 36, 28, 0.14);
    color: rgba(16, 14, 11, 0.92);
}

body:not(.dark-mode) .template-preview-select-btn:hover {
    background: rgba(44, 36, 28, 0.1);
}

body:not(.dark-mode) .template-preview-select-btn.selected {
    background: rgba(35, 100, 170, 0.1);
    border-color: rgba(35, 100, 170, 0.4);
    color: rgba(35, 100, 170, 1);
}
