/* =========================================================
   YADYO AI — MAIN / TOPBAR / HERO / TOPICS / CHAT
   PREMIUM RESPONSIVE UI
   ========================================================= */


/* =========================================================
   MAIN
   ========================================================= */

.main {
    position: relative;

    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;

    flex: 1;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 32%,
            rgba(255, 255, 255, .92) 0%,
            rgba(255, 255, 255, .60) 28%,
            transparent 62%
        ),
        radial-gradient(
            circle at 10% 90%,
            rgba(34, 201, 211, .055),
            transparent 38%
        ),
        radial-gradient(
            circle at 90% 10%,
            rgba(139, 92, 246, .035),
            transparent 35%
        );

    isolation: isolate;
}


/* subtle ambient light */

.main::before {
    content: "";

    position: absolute;
    z-index: -1;

    width: 420px;
    height: 420px;

    top: 20%;
    left: 50%;

    transform: translate(-50%, -50%);

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(34, 201, 211, .055),
            transparent 68%
        );

    filter: blur(35px);

    pointer-events: none;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
    position: absolute;
    z-index: 50;

    top: max(14px, env(safe-area-inset-top));
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));

    height: 46px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    pointer-events: none;
}


/* ---------------------------------------------------------
   MOBILE MENU
   --------------------------------------------------------- */

.mobile-menu {
    position: relative;

    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border: 1px solid rgba(7, 21, 29, .08);
    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .92),
            rgba(247, 252, 252, .72)
        );

    color: var(--ink-soft);

    box-shadow:
        0 8px 24px rgba(7, 21, 29, .07),
        inset 0 1px 0 rgba(255, 255, 255, .9);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    cursor: pointer;

    pointer-events: auto;

    transition:
        transform .35s cubic-bezier(.2, .8, .2, 1),
        box-shadow .35s ease,
        border-color .3s ease,
        background .3s ease;
}

.mobile-menu::before {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: inherit;

    background:
        radial-gradient(
            circle at 30% 20%,
            rgba(34, 201, 211, .12),
            transparent 55%
        );

    opacity: 0;

    transition: opacity .3s ease;
}

.mobile-menu:hover {
    transform: translateY(-2px);

    border-color:
        rgba(34, 201, 211, .22);

    box-shadow:
        0 14px 30px rgba(7, 21, 29, .10),
        0 0 25px rgba(34, 201, 211, .07);
}

.mobile-menu:hover::before {
    opacity: 1;
}

.mobile-menu:active {
    transform: scale(.92);
}

.mobile-menu svg {
    position: relative;
    z-index: 2;

    width: 18px;
    height: 18px;

    color: var(--ink-soft);

    stroke-width: 2;

    transition:
        transform .3s ease,
        color .3s ease;
}

.mobile-menu:hover svg {
    color: var(--primary);

    transform: scale(1.08);
}


/* =========================================================
   REFRESH BUTTON
   ========================================================= */

.refresh-btn {
    position: relative;

    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding:
        0 15px;

    border: 1px solid rgba(7, 21, 29, .08);
    border-radius: 999px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .94),
            rgba(248, 252, 252, .74)
        );

    color: var(--ink-soft);

    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 800;

    box-shadow:
        0 8px 24px rgba(7, 21, 29, .06),
        inset 0 1px 0 rgba(255, 255, 255, .9);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    cursor: pointer;

    pointer-events: auto;

    overflow: hidden;

    transition:
        transform .35s cubic-bezier(.2, .8, .2, 1),
        box-shadow .35s ease,
        border-color .3s ease,
        color .3s ease;
}

.refresh-btn::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            120deg,
            transparent 25%,
            rgba(255, 255, 255, .7) 50%,
            transparent 75%
        );

    transform: translateX(-120%);

    transition:
        transform .7s ease;
}

.refresh-btn:hover {
    transform: translateY(-2px);

    color: var(--primary-dark);

    border-color:
        rgba(34, 201, 211, .30);

    box-shadow:
        0 14px 32px rgba(7, 21, 29, .09),
        0 0 25px rgba(34, 201, 211, .06);
}

.refresh-btn:hover::before {
    transform: translateX(120%);
}

.refresh-btn:active {
    transform: scale(.95);
}

.refresh-btn svg {
    position: relative;
    z-index: 2;

    width: 14px;
    height: 14px;

    color: var(--primary);

    stroke-width: 2.2;

    transition:
        transform .7s cubic-bezier(.2, .9, .2, 1);
}

.refresh-btn:hover svg {
    transform: rotate(180deg);
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: absolute;

    top: 47%;
    left: 50%;

    width: min(900px, calc(100% - 40px));

    text-align: center;

    transform:
        translate(-50%, -50%);

    transition:
        opacity .35s ease,
        transform .45s cubic-bezier(.2, .8, .2, 1);
}

.hero.hidden {
    display: none !important;
}


/* ---------------------------------------------------------
   HERO DECORATION
   --------------------------------------------------------- */

.hero::before {
    content: "";

    position: absolute;

    left: 50%;
    top: -34px;

    width: 145px;
    height: 3px;

    transform:
        translateX(-50%);

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--primary-light),
            var(--accent),
            var(--primary-light),
            transparent
        );

    box-shadow:
        0 0 20px rgba(34, 201, 211, .18);

    opacity: .7;
}


/* ---------------------------------------------------------
   HERO TITLE
   --------------------------------------------------------- */

.hero h1 {
    margin: 0;

    font-family: var(--font-display);

    font-size:
        clamp(36px, 4vw, 54px);

    line-height: 1.04;

    font-weight: 800;

    letter-spacing: -.055em;

    background:
        linear-gradient(
            135deg,
            #07151d 5%,
            #078d9b 52%,
            #24b8c2 100%
        );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
}


/* ---------------------------------------------------------
   HERO DESCRIPTION
   --------------------------------------------------------- */

.hero > p {
    max-width: 600px;

    margin:
        14px auto 30px;

    color: var(--muted);

    font-size: 13.5px;

    line-height: 1.7;
}


/* =========================================================
   TOPICS
   ========================================================= */

.topic-grid {
    width: 100%;
    max-width: 780px;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;

    margin: 0 auto;
}


/* =========================================================
   TOPIC CARD
   ========================================================= */

.topic-card {
    --topic-color: #22c9d3;
    --topic-rgb: 34, 201, 211;

    position: relative;
    isolation: isolate;

    min-width: 0;
    min-height: 112px;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: flex-start;

    gap: 11px;

    padding: 20px;

    text-align: left;

    border:
        1px solid
        rgba(var(--topic-rgb), .14);

    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .96),
            rgba(248, 252, 252, .72)
        );

    box-shadow:
        0 8px 25px rgba(7, 21, 29, .045),
        inset 0 1px 0 rgba(255, 255, 255, .9);

    backdrop-filter:
        blur(22px);

    -webkit-backdrop-filter:
        blur(22px);

    overflow: hidden;

    cursor: pointer;

    transform:
        translateZ(0);

    -webkit-tap-highlight-color: transparent;

    transition:
        transform .42s cubic-bezier(.2, .8, .2, 1),
        box-shadow .42s ease,
        border-color .3s ease,
        background .3s ease;
}


/* ---------------------------------------------------------
   COLOR LINE
   --------------------------------------------------------- */

.topic-card::before {
    content: "";

    position: absolute;
    z-index: -1;

    left: 0;
    right: 0;
    top: 0;

    height: 3px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--topic-color),
            transparent
        );

    opacity: .75;

    transition:
        height .3s ease,
        opacity .3s ease;
}


/* ---------------------------------------------------------
   COLOR GLOW
   --------------------------------------------------------- */

.topic-card::after {
    content: "";

    position: absolute;
    z-index: -1;

    width: 145px;
    height: 145px;

    right: -65px;
    top: -65px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(var(--topic-rgb), .20),
            rgba(var(--topic-rgb), .045) 46%,
            transparent 72%
        );

    opacity: .7;

    transform:
        scale(.8);

    transition:
        transform .55s cubic-bezier(.2, .8, .2, 1),
        opacity .35s ease;
}


/* ---------------------------------------------------------
   HOVER
   --------------------------------------------------------- */

.topic-card:hover {
    transform:
        translateY(-7px)
        scale(1.012);

    border-color:
        rgba(var(--topic-rgb), .36);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .99),
            rgba(var(--topic-rgb), .045)
        );

    box-shadow:
        0 22px 45px rgba(7, 21, 29, .09),
        0 0 35px rgba(var(--topic-rgb), .11),
        inset 0 1px 0 rgba(255, 255, 255, .95);
}

.topic-card:hover::before {
    height: 4px;
    opacity: 1;
}

.topic-card:hover::after {
    transform:
        scale(1.45);

    opacity: 1;
}


/* =========================================================
   TOPIC ICON
   ========================================================= */

.topic-card svg {
    position: relative;
    z-index: 3;

    width: 22px;
    height: 22px;

    padding: 8px;

    box-sizing: content-box;

    border-radius: 13px;

    color:
        var(--topic-color);

    background:
        rgba(var(--topic-rgb), .10);

    border:
        1px solid
        rgba(var(--topic-rgb), .15);

    stroke-width: 2.2;

    filter:
        drop-shadow(
            0 5px 10px
            rgba(var(--topic-rgb), .16)
        );

    transition:
        transform .45s cubic-bezier(.2, .9, .2, 1),
        background .3s ease,
        color .3s ease,
        box-shadow .3s ease;
}

.topic-card:hover svg {
    transform:
        translateY(-2px)
        scale(1.08)
        rotate(-4deg);

    color: #fff;

    background:
        var(--topic-color);

    box-shadow:
        0 8px 20px
        rgba(var(--topic-rgb), .28);
}


/* =========================================================
   TOPIC TEXT
   ========================================================= */

.topic-card span {
    position: relative;
    z-index: 3;
            font-weight: 400;

    color: var(--ink);

    font-family:
        var(--font-display);

    font-size: 14px;

    line-height: 1.45;


    letter-spacing: -.01em;

    transition:
        color .25s ease,
        transform .3s ease;
}

.topic-card:hover span {
    color:
        var(--topic-color);

    transform:
        translateX(2px);
}


/* =========================================================
   TOPIC COLORS
   ========================================================= */

.topic-card:nth-child(1) {
    --topic-color: #06b6d4;
    --topic-rgb: 6, 182, 212;
}

.topic-card:nth-child(2) {
    --topic-color: #8b5cf6;
    --topic-rgb: 139, 92, 246;
}

.topic-card:nth-child(3) {
    --topic-color: #10b981;
    --topic-rgb: 16, 185, 129;
}

.topic-card:nth-child(4) {
    --topic-color: #f97316;
    --topic-rgb: 249, 115, 22;
}

.topic-card:nth-child(5) {
    --topic-color: #ec4899;
    --topic-rgb: 236, 72, 153;
}

.topic-card:nth-child(6) {
    --topic-color: #3b82f6;
    --topic-rgb: 59, 130, 246;
}

.topic-card:nth-child(7) {
    --topic-color: #f59e0b;
    --topic-rgb: 245, 158, 11;
}

.topic-card:nth-child(8) {
    --topic-color: #f43f5e;
    --topic-rgb: 244, 63, 94;
}

.topic-card:nth-child(9) {
    --topic-color: #6366f1;
    --topic-rgb: 99, 102, 241;
}

.topic-card:nth-child(10) {
    --topic-color: #14b8a6;
    --topic-rgb: 20, 184, 166;
}


/* =========================================================
   ACTIVE TOPIC
   ========================================================= */

.topic-card.active {
    border-color:
        rgba(var(--topic-rgb), .45);

    background:
        linear-gradient(
            145deg,
            rgba(var(--topic-rgb), .10),
            rgba(255, 255, 255, .90)
        );

    box-shadow:
        0 15px 35px
        rgba(var(--topic-rgb), .14),

        0 0 0 1px
        rgba(var(--topic-rgb), .05);
}

.topic-card.active::before {
    height: 4px;
    opacity: 1;
}

.topic-card.active svg {
    color: #fff;

    background:
        var(--topic-color);

    box-shadow:
        0 8px 22px
        rgba(var(--topic-rgb), .25);
}

.topic-card.active span {
    color:
        var(--topic-color);
}


/* =========================================================
   TOPIC PRESS / TOUCH
   ========================================================= */

.topic-card:active {
    transform:
        scale(.975);

    transition-duration:
        .12s;
}


/* =========================================================
   CHAT VIEW
   ========================================================= */

.chat-view {
    position: absolute;

    top: 75px;

    bottom:
        calc(
            118px +
            env(safe-area-inset-bottom)
        );

    left: 50%;

    width:
        min(
            840px,
            calc(100% - 40px)
        );

    transform:
        translateX(-50%);

    display: none;

    flex-direction: column;

    padding:
        15px 5px;

    overflow-x: hidden;
    overflow-y: auto;

    scroll-behavior: smooth;

    overscroll-behavior-y: contain;

    scrollbar-width: none;

    -webkit-overflow-scrolling:
        touch;
}

.chat-view::-webkit-scrollbar {
    display: none;
}

.chat-view.active {
    display: flex;
}


/* =========================================================
   MESSAGES
   ========================================================= */

.messages {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 20px;
}

.message {
    width: 100%;

    display: flex;
    flex-direction: column;

    animation:
        messageIn .4s
        var(--ease)
        both;
}

.message.user {
    align-items: flex-end;
}

.message.ai {
    align-items: flex-start;
}


/* =========================================================
   MESSAGE ANIMATION
   ========================================================= */

@keyframes messageIn {

    from {
        opacity: 0;

        transform:
            translateY(10px)
            scale(.985);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* =========================================================
   BUBBLES
   ========================================================= */

.bubble {
    max-width: 82%;

    padding:
        13px 18px;

    border-radius:
        var(--radius-lg);

    font-size: 13px;

    line-height: 1.65;

    white-space: pre-wrap;

    overflow-wrap: anywhere;
}

.message.user .bubble {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    border-bottom-right-radius:
        6px;

    box-shadow:
        var(--shadow-primary);
}

.message.ai .bubble {
    color:
        var(--ink);

    background:
        rgba(255, 255, 255, .86);

    border:
        1px solid
        var(--border);

    border-bottom-left-radius:
        6px;

    box-shadow:
        var(--shadow-xs);

    backdrop-filter:
        blur(15px);

    -webkit-backdrop-filter:
        blur(15px);
}


/* =========================================================
   SUGGESTIONS
   ========================================================= */

.suggestion-container {
    width: 100%;
    max-width: 82%;

    margin-top: 8px;

    display: flex;
    flex-direction: column;

    gap: 7px;

    padding: 14px;

    background:
        rgba(248, 252, 252, .76);

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-lg);

    box-shadow:
        var(--shadow-xs);

    backdrop-filter:
        blur(15px);

    -webkit-backdrop-filter:
        blur(15px);
}

.suggestion-header {
    margin-bottom: 2px;

    color:
        var(--muted-light);

    font-family:
        var(--font-display);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .09em;

    text-transform: uppercase;
}

.suggestion-card-item {
    width: 100%;

    min-height: 42px;

    padding:
        11px 14px;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-sm);

    background:
        rgba(255, 255, 255, .90);

    color:
        var(--ink-soft);

    font-size: 11.5px;

    font-weight: 700;

    text-align: left;

    cursor: pointer;

    -webkit-tap-highlight-color:
        transparent;

    transition:
        transform .22s
        var(--ease),
        border-color .22s ease,
        color .22s ease,
        box-shadow .22s ease;
}

.suggestion-card-item:hover {
    transform:
        translateY(-2px);

    border-color:
        rgba(34, 201, 211, .35);

    color:
        var(--primary-dark);

    box-shadow:
        var(--shadow-sm);
}

.suggestion-card-item:active {
    transform:
        scale(.98);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .topic-grid {
        max-width: 680px;
    }

    .hero {
        width:
            min(
                700px,
                calc(100% - 36px)
            );
    }

    .hero h1 {
        font-size:
            clamp(34px, 5vw, 48px);
    }

    .chat-view {
        width:
            min(
                760px,
                calc(100% - 34px)
            );
    }
}


/* =========================================================
   MOBILE — 700px
   ========================================================= */

@media (max-width: 700px) {

    .main {
        overflow: hidden;
    }

    /* TOPBAR */

    .topbar {
        top:
            max(
                10px,
                env(safe-area-inset-top)
            );

        left:
            max(
                12px,
                env(safe-area-inset-left)
            );

        right:
            max(
                12px,
                env(safe-area-inset-right)
            );

        height: 44px;
    }

    .mobile-menu {
        width: 42px;
        height: 42px;

        border-radius: 14px;
    }

    .refresh-btn {
        height: 40px;

        padding:
            0 12px;

        gap: 6px;

        font-size: 9px;
    }

    .refresh-btn svg {
        width: 13px;
        height: 13px;
    }


    /* HERO */

    .hero {
        top: 48%;

        width:
            calc(100% - 28px);

        max-width:
            560px;
    }

    .hero::before {
        top: -25px;

        width: 105px;
        height: 2px;
    }

    .hero h1 {
        font-size:
            clamp(
                30px,
                9vw,
                42px
            );

        letter-spacing:
            -.045em;
    }

    .hero > p {
        max-width:
            480px;

        margin:
            11px auto 21px;

        padding:
            0 5px;

        font-size:
            12px;

        line-height:
            1.65;
    }


    /* TOPICS */

    .topic-grid {
        width:
            100%;

        max-width:
            560px;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap:
            9px;
    }

    .topic-card {
        min-height:
            98px;

        padding:
            15px;

        gap:
            8px;

        border-radius:
            18px;
    }

    .topic-card svg {
        width:
            18px;

        height:
            18px;

        padding:
            7px;

        border-radius:
            11px;
    }

    .topic-card span {
        font-size:
            13px;

        line-height:
            1.4;
    }

    .topic-card:hover {
        transform:
            translateY(-3px)
            scale(1.005);

        box-shadow:
            0 13px 28px
            rgba(7, 21, 29, .08),

            0 0 20px
            rgba(var(--topic-rgb), .08);
    }


    /* CHAT */

    .chat-view {
        top:
            64px;

        bottom:
            calc(
                105px +
                env(safe-area-inset-bottom)
            );

        width:
            calc(100% - 20px);

        padding:
            12px 2px 20px;
    }

    .messages {
        gap:
            14px;
    }

    .bubble {
        max-width:
            88%;

        padding:
            11px 14px;

        border-radius:
            17px;

        font-size:
            12.5px;

        line-height:
            1.58;
    }

    .suggestion-container {
        max-width:
            88%;

        padding:
            11px;

        gap:
            6px;

        border-radius:
            16px;
    }

    .suggestion-card-item {
        min-height:
            40px;

        padding:
            10px 12px;

        font-size:
            11px;

        border-radius:
            11px;
    }
}


/* =========================================================
   SMALL PHONES — 480px
   ========================================================= */

@media (max-width: 480px) {

    .topbar {
        left:
            max(
                10px,
                env(safe-area-inset-left)
            );

        right:
            max(
                10px,
                env(safe-area-inset-right)
            );
    }

    .mobile-menu {
        width:
            40px;

        height:
            40px;

        border-radius:
            13px;
    }

    .refresh-btn {
        width:
            40px;

        padding:
            0;

        gap:
            0;

        border-radius:
            13px;
    }

    .refresh-btn span,
    .refresh-btn .refresh-text {
        display:
            none;
    }

    .refresh-btn svg {
        width:
            15px;

        height:
            15px;
    }


    /* HERO */

    .hero {
        top:
            47%;
    }

    .hero h1 {
        font-size:
            clamp(
                28px,
                10vw,
                37px
            );
    }

    .hero > p {
        margin-top:
            9px;

        margin-bottom:
            17px;

        font-size:
            11.5px;
    }

    .hero::before {
        width:
            85px;

        top:
            -21px;
    }


    /* TOPICS */

    .topic-grid {
        gap:
            8px;
    }

    .topic-card {
        min-height:
            91px;

        padding:
            13px;

        gap:
            7px;

        border-radius:
            16px;
    }

    .topic-card::after {
        width:
            100px;

        height:
            100px;

        right:
            -48px;

        top:
            -48px;
    }

    .topic-card svg {
        width:
            17px;

        height:
            17px;

        padding:
            6px;

        border-radius:
            10px;
    }

    .topic-card span {
        font-size:
            12px;
    }


    /* CHAT */

    .chat-view {
        width:
            calc(100% - 14px);

        top:
            61px;

        bottom:
            calc(
                98px +
                env(safe-area-inset-bottom)
            );
    }

    .message.user .bubble,
    .message.ai .bubble {
        max-width:
            91%;
    }

    .bubble {
        padding:
            10px 13px;

        font-size:
            12px;

        border-radius:
            15px;
    }

    .suggestion-container {
        max-width:
            91%;

        padding:
            10px;

        border-radius:
            14px;
    }

    .suggestion-header {
        font-size:
            8px;
    }

    .suggestion-card-item {
        min-height:
            38px;

        padding:
            9px 11px;

        font-size:
            10.5px;
    }
}


/* =========================================================
   VERY SMALL PHONES — 380px
   ========================================================= */

@media (max-width: 380px) {

    .hero {
        width:
            calc(100% - 20px);
    }

    .hero h1 {
        font-size:
            27px;
    }

    .hero > p {
        font-size:
            10.8px;

        margin-bottom:
            14px;
    }

    .topic-grid {
        gap:
            7px;
    }

    .topic-card {
        min-height:
            84px;

        padding:
            11px;

        gap:
            6px;

        border-radius:
            14px;
    }

    .topic-card svg {
        width:
            15px;

        height:
            15px;

        padding:
            6px;
    }

    .topic-card span {
        font-size:
            11.5px;
    }

    .chat-view {
        width:
            calc(100% - 10px);
    }
}


/* =========================================================
   LANDSCAPE PHONE
   ========================================================= */

@media (max-height: 560px) and (orientation: landscape) {

    .topbar {
        top:
            8px;
    }

    .hero {
        top:
            54%;

        width:
            min(
                720px,
                calc(100% - 30px)
            );
    }

    .hero::before {
        display:
            none;
    }

    .hero h1 {
        font-size:
            28px;
    }

    .hero > p {
        margin:
            6px auto 12px;

        font-size:
            10px;
    }

    .topic-grid {
        grid-template-columns:
            repeat(4, 1fr);

        gap:
            7px;
    }

    .topic-card {
        min-height:
            68px;

        padding:
            9px;

        gap:
            5px;

        border-radius:
            13px;
    }

    .topic-card svg {
        width:
            14px;

        height:
            14px;

        padding:
            5px;
    }

    .topic-card span {
        font-size:
            10.5px;
    }

    .chat-view {
        top:
            57px;

        bottom:
            75px;
    }
}


/* =========================================================
   TOUCH DEVICES
   ========================================================= */

@media (hover: none) and (pointer: coarse) {

    .topic-card:hover {
        transform:
            none;

        box-shadow:
            0 8px 25px
            rgba(7, 21, 29, .045);
    }

    .topic-card:hover svg {
        transform:
            none;

        color:
            var(--topic-color);

        background:
            rgba(var(--topic-rgb), .10);

        box-shadow:
            none;
    }

    .topic-card:hover span {
        color:
            var(--ink);

        transform:
            none;
    }

    .topic-card:active {
        transform:
            scale(.965);

        border-color:
            rgba(var(--topic-rgb), .38);

        box-shadow:
            0 10px 25px
            rgba(var(--topic-rgb), .12);
    }

    .mobile-menu:hover,
    .refresh-btn:hover {
        transform:
            none;
    }

    .mobile-menu:active,
    .refresh-btn:active {
        transform:
            scale(.94);
    }

    .suggestion-card-item:hover {
        transform:
            none;
    }

    .suggestion-card-item:active {
        transform:
            scale(.98);
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior:
            auto !important;

        transition:
            none !important;

        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;
    }

    .topic-card:hover,
    .mobile-menu:hover,
    .refresh-btn:hover {
        transform:
            none !important;
    }
}


/* =========================================================
   HIGH CONTRAST / LOW TRANSPARENCY
   ========================================================= */

@media (prefers-reduced-transparency: reduce) {

    .topic-card,
    .mobile-menu,
    .refresh-btn,
    .message.ai .bubble,
    .suggestion-container {
        backdrop-filter:
            none;

        -webkit-backdrop-filter:
            none;

        background:
            #fff;
    }
}


/* =========================================================
   SAFE AREA
   ========================================================= */

@supports (padding: env(safe-area-inset-bottom)) {

    .chat-view {
        padding-bottom:
            calc(
                20px +
                env(safe-area-inset-bottom)
            );
    }
}


/* =========================================================
   FOCUS ACCESSIBILITY
   ========================================================= */

.topic-card:focus-visible,
.mobile-menu:focus-visible,
.refresh-btn:focus-visible,
.suggestion-card-item:focus-visible {
    outline:
        3px solid
        rgba(34, 201, 211, .28);

    outline-offset:
        3px;
}