/* ---------- Home — phone layouts (design: "Mobile Sections", 390px) ----------
 * Each home section carries a .hm block that replaces its desktop markup at ≤767px.
 */
.hm { display: none; }

@media (max-width: 767px) {
    /* Swap: hide the desktop children, show the phone block */
    .mp > :not(.hm):not(script),
    body.home-bw-theme .hw2 > :not(.hm),
    .hx-hiw > :not(.hm),
    .hx-rev > :not(.hm):not(script),
    .hx-faq > :not(.hm) { display: none !important; }
    .mp, body.home-bw-theme .hw2, .hx-hiw, .hx-rev, .hx-faq { padding: 0 !important; min-height: 0 !important; display: block; }

    .hm {
        --hm-ease: cubic-bezier(0.22, 1, 0.36, 1);
        --hm-mono: 'JetBrains Mono', ui-monospace, monospace;
        --hm-display: Sora, 'Noto Sans Arabic', system-ui, sans-serif;
        display: block; position: relative; overflow: hidden; background: #000; color: #fff;
        padding: 28px 20px 24px; box-sizing: border-box; text-align: start;
    }
    .hm *, .hm *::before, .hm *::after { box-sizing: border-box; }
    .hm__glow {
        position: absolute; left: 50%; top: -180px; transform: translateX(-50%); width: 620px; height: 480px; pointer-events: none;
        background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0) 70%);
    }
    .hm__head, .hm__title, .hm__frame, .hm-cta { position: relative; }
    .hm__title { margin: 0; font-family: var(--hm-display); font-size: 40px; line-height: 1.05; letter-spacing: -0.045em; font-weight: 500; color: #fff; text-wrap: balance; }
    .hm__title--center { text-align: center; }
    .hm__title-dim { display: block; color: rgba(255, 255, 255, 0.62); font-weight: 400; }
    .hm__title-dim--inline { display: inline; }
    html[dir="rtl"] .hm__title { letter-spacing: -0.01em; line-height: 1.2; }
    .hm__sub { position: relative; margin: 20px 0 0; font-size: 14px; color: rgba(255, 255, 255, 0.55); }
    .hm__badge {
        margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(10, 10, 12, 0.6); font-size: 12.5px; color: rgba(255, 255, 255, 0.85);
    }
    .hm__badge i { font-size: 11px; }
    .hm__label { display: flex; align-items: center; gap: 9px; margin: 0; font-family: var(--hm-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.42); }
    .hm__mono { font-family: var(--hm-mono); font-size: 10px; font-weight: 600; letter-spacing: .16em; color: rgba(255, 255, 255, 0.35); }
    .hm__mono--caps { text-transform: uppercase; letter-spacing: .2em; font-weight: 500; color: rgba(255, 255, 255, 0.45); }
    .hm__frame { border-radius: 26px; padding: 1px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.03) 100%); }
    .hm__panel { border-radius: 25px; overflow: hidden; background: radial-gradient(ellipse 90% 70% at 30% 0%, #18181b 0%, #09090a 60%, #060607 100%); }

    /* Pill CTA */
    .hm-cta { margin-top: 20px; display: flex; border-radius: 999px; padding: 1px; text-decoration: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.22) 100%); }
    .hm-cta__in { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 6px; padding-inline: 20px 6px; border-radius: 999px; background: radial-gradient(ellipse 120% 140% at 50% 0%, #26262a 0%, #0d0d0f 55%, #050506 100%); }
    .hm-cta__txt { font-family: var(--hm-display); font-size: 14px; font-weight: 500; color: #fff; }
    .hm-cta__ico { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(180deg, #f4f4f6 0%, #a9a9b0 100%); display: flex; align-items: center; justify-content: center; color: #0a0a0a; font-size: 13px; }
    .hm-cta:active .hm-cta__in { background: radial-gradient(ellipse 120% 140% at 50% 0%, #303035 0%, #111113 55%, #060607 100%); }


    /* ===== Reviews (design "b") — the card, "up next" tab and sliver are the shared deck (home-mobile-deck.css) ===== */
    .hm-rev { display: flex; flex-direction: column; }
    .hm-rev .hm__glow { top: 90px; width: 560px; height: 560px; background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 65%); }
    .hm-rev__head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
    .hm-rev__title { margin: 0; font-family: var(--hm-display); font-size: 38px; line-height: 1.04; letter-spacing: -0.05em; font-weight: 600; color: #fff; }
    .hm-rev__title span { display: block; color: rgba(255, 255, 255, 0.42); }
    html[dir="rtl"] .hm-rev__title { letter-spacing: 0; line-height: 1.25; }
    .hm-rev__art { position: relative; flex-shrink: 0; width: 96px; height: 96px; margin-inline-end: -4px; }
    .hm-rev__coin { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.75)); animation: hmFloatA 6s ease-in-out infinite; }
    .hm-rev__floor { position: absolute; left: 50%; bottom: -10px; width: 92px; height: 12px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%); }
    .hm-rev__lead { position: relative; margin: 14px 0 0; max-width: 34ch; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, 0.55); text-wrap: pretty; }

    /* Rating card — links to every review */
    .hm-rev__score {
        position: relative; margin-top: 14px; display: flex; align-items: center; gap: 16px; padding: 14px; padding-inline-start: 20px;
        border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.1); background: linear-gradient(180deg, #121214 0%, #0d0d0f 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); color: #fff; text-decoration: none; -webkit-tap-highlight-color: transparent;
    }
    .hm-rev__score:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
    .hm-rev__avg { display: flex; align-items: flex-start; gap: 5px; font-family: var(--hm-display); font-size: 54px; line-height: .8; font-weight: 300; letter-spacing: -0.06em; color: #fff; }
    .hm-rev__avg span { padding-top: 3px; font-size: 14px; line-height: 1; font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, 0.32); }
    .hm-rev__rule { width: 1px; height: 40px; background: rgba(255, 255, 255, 0.1); }
    .hm-rev__meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
    .hm-rev__stars { display: flex; gap: 4px; font-size: 13px; color: #fff; }
    .hm-rev__stars .is-off { color: rgba(255, 255, 255, 0.22); }
    .hm-rev__all { font-family: var(--hm-display); font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, 0.5); }
    .hm-rev__go {
        margin-inline-start: auto; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
        background: linear-gradient(180deg, #ffffff 0%, #d6d6dc 100%); box-shadow: 0 6px 16px rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(0, 0, 0, 0.14);
        color: #0a0a0a; font-size: 11px; transition: scale .2s ease;
    }
    .hm-rev__score:active .hm-rev__go { scale: .9; }

    /* Review deck content */
    .hm-rev__deck { margin-top: 12px; }
    /* .hm-rev prefix: home-mobile-deck.css loads after this sheet */
    .hm-rev .hm-rev__items { align-items: stretch; min-height: 236px; }
    .hm-rev__item { display: flex; flex-direction: column; }
    .hm-rev__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .hm-rev__mark { font-size: 22px; color: rgba(255, 255, 255, 0.22); }
    .hm-rev .hm-rev__badge { padding: 0 12px; padding-inline-start: 10px; font-size: 12px; color: rgba(255, 255, 255, 0.85); }
    .hm-rev__badge i { font-size: 11px; }
    .hm-rev__text { margin: 16px 0; font-family: var(--hm-display); font-size: 27px; line-height: 1.22; font-weight: 500; letter-spacing: -0.035em; color: #fff; text-wrap: balance; overflow-wrap: anywhere; }
    .hm-rev__text.is-long { font-size: 21px; }
    html[dir="rtl"] .hm-rev__text { letter-spacing: 0; line-height: 1.45; }
    .hm-rev__by { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); display: flex; align-items: center; gap: 12px; }
    .hm-rev__avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(180deg, #f4f4f6 0%, #a9a9b0 100%); color: #0a0a0a; display: flex; align-items: center; justify-content: center; font-family: var(--hm-display); font-size: 14px; font-weight: 600; }
    .hm-rev__who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
    .hm-rev__name { font-family: var(--hm-display); font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hm-rev__date { font-size: 12px; color: rgba(255, 255, 255, 0.45); }
    .hm-rev__stars--card { flex-shrink: 0; gap: 3px; font-size: 11px; }

    .hm-cta:focus-visible { outline: 2px solid #fff !important; outline-offset: 3px; border-radius: 8px; }
}

/* iPhone SE / mini / fold cover */
@media (max-width: 380px) {
    .hm { padding-left: 16px; padding-right: 16px; }
    .hm__title { font-size: 34px; }
    .hm-rev__title { font-size: 34px; }
    .hm-rev__text { font-size: 24px; }
    .hm-rev__text.is-long { font-size: 19px; }
    .hm-rev .hm-deck__panel { padding: 18px 16px; }
}
@media (max-width: 300px) {
    .hm { padding-left: 12px; padding-right: 12px; }
    .hm__title { font-size: 30px; }
    .hm-rev__title { font-size: 30px; }
    .hm-rev__art { width: 72px; height: 72px; }
    .hm-rev__floor { width: 68px; }
}

@keyframes hmFloatA { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes hmFloatB { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes hmIn { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes hmPulse { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .hm-rev__coin, .hm-rev__go { animation: none !important; transition: none !important; }
}
