:root {
    --bg: #0b0b10;
    --card: #16161f;
    --card-2: #1d1d28;
    --text: #f5f5f7;
    --muted: #a7a7b3;
    --line: rgba(255, 255, 255, 0.08);
    --pink: #ee2a7b;
    --purple: #833ab4;
    --orange: #f77737;
    --ok: #4ade80;
    --danger: #fb7185;
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: clip;
}

img, svg, video {
    max-width: 100%;
}

body {
    position: relative;
}

.bg-glow {
    position: fixed;
    inset: -20% auto auto 50%;
    width: 720px;
    height: 720px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(238, 42, 123, 0.22), rgba(131, 58, 180, 0.12) 42%, transparent 70%);
    pointer-events: none;
    filter: blur(8px);
}

.app {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.topbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px 28px;
    margin-bottom: 36px;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.brand strong {
    display: block;
    letter-spacing: 0.12em;
    font-size: 15px;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.brand-perfil strong {
    background: linear-gradient(90deg, #ee2a7b, #833ab4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-perfil small {
    color: #f4a3c4;
}

.brand-security strong {
    color: #22d3ee;
}

.brand-security small {
    color: #7ee7f5;
}

h1 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.15;
    margin: 0 0 12px;
}

.home-hero:not([hidden]) {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-mascot-wrap {
    width: min(220px, 62vw);
    max-width: 100%;
    margin: 0 auto 6px;
}

.home-mascot {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 24px rgba(238, 42, 123, 0.22));
}

.mascot-shadow {
    fill: rgba(0, 0, 0, 0.5);
    transform-origin: 120px 248px;
    animation: mascotShadow 3.2s ease-in-out infinite;
}

.mascot-body {
    transform-origin: 120px 248px;
    animation: mascotFloat 3.2s ease-in-out infinite;
}

.mascot-glass {
    transform-box: fill-box;
    transform-origin: 35% 40%;
    animation: mascotGlass 2.5s ease-in-out infinite;
}

.mascot-shine {
    animation: mascotShine 1.7s ease-in-out infinite;
}

.home-hook {
    max-width: 18em;
    min-height: 2.5em;
    margin: 4px auto 12px;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.home-hook.is-out {
    opacity: 0;
    transform: translateY(8px);
}

.home-hero .lead {
    max-width: 34em;
    margin: 0 auto 22px;
}

.home-hero .search-card {
    text-align: left;
    width: 100%;
    max-width: 540px;
}

@keyframes mascotFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes mascotShadow {
    0%, 100% { transform: scaleX(1); opacity: 0.5; }
    50% { transform: scaleX(0.82); opacity: 0.28; }
}

@keyframes mascotGlass {
    0%, 100% { transform: rotate(-10deg) translate(0, 0); }
    50% { transform: rotate(12deg) translate(3px, -7px); }
}

@keyframes mascotShine {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

.lead, .kicker, p {
    color: var(--muted);
}

.kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 700;
    color: #f9a8d4;
    margin-bottom: 8px;
}

.search-card,
.card {
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.search-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-row {
    display: flex;
    align-items: center;
    background: #0f0f16;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
}

.input-row:focus-within {
    border-color: rgba(238, 42, 123, 0.7);
}

.at {
    padding: 0 4px 0 16px;
    color: var(--muted);
    font-weight: 700;
}

input[type="text"] {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    padding: 14px 14px 14px 4px;
    outline: none;
}

.btn-primary,
.btn-ghost {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 13px 18px;
    font-weight: 700;
    font-size: 15px;
    font-family: inherit;
}

.btn-primary {
    width: 100%;
    color: white;
    background: linear-gradient(90deg, var(--orange), var(--pink), var(--purple));
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: wait;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.trust-row li {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
}

.social-proof {
    color: #f9a8d4;
    font-weight: 700;
    font-size: 13px;
    margin: 0 0 8px;
}

.btn-ghost {
    width: 100%;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.error {
    color: var(--danger);
    font-size: 13px;
    margin: 0 0 12px;
}

.center {
    text-align: center;
}

.spinner {
    width: 42px;
    height: 42px;
    margin: 8px auto 16px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--pink);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.profile-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 18px;
    align-items: center;
}

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #111;
    border: 3px solid transparent;
    background-image: linear-gradient(#16161f, #16161f), linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.identity h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
}

.handle {
    margin: 0;
    color: var(--muted);
}

.badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.badge.ok { color: var(--ok); }
.badge.warn { color: #fbbf24; }

.bio {
    grid-column: 1 / -1;
    margin: 0;
    color: #ddd;
    white-space: pre-wrap;
}

.stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
}

.stat b {
    display: block;
    font-size: 1.05rem;
}

.stat span {
    color: var(--muted);
    font-size: 12px;
}

.dash-head {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 20px;
    align-items: start;
}

.dash-head .avatar {
    width: 112px;
    height: 112px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 22px;
}

.tile {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
    display: block;
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tile .video {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.55);
    padding: 3px 7px;
    border-radius: 999px;
}

.empty-posts {
    margin-top: 22px;
    padding: 28px 16px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 16px;
}

footer {
    margin-top: 40px;
    color: #6e6e7a;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

body.immersive .topbar,
body.immersive footer {
    display: none;
}

body.immersive .bg-glow {
    display: none;
}

body.immersive.ops .bg-glow {
    display: block;
    z-index: 0;
}

body.immersive .app {
    padding: 0;
    min-height: 100vh;
}

body.immersive.ops .app {
    max-width: none;
    background: transparent;
}

body.immersive.ops {
    background: var(--bg);
}

body.immersive.igmode {
    background: #000;
}

body.immersive.igmode .app {
    max-width: 470px;
    width: 100%;
    background: #000;
    padding: 0;
}

body.immersive main {
    min-height: 100vh;
}

.ops-stage {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg);
}

.ops-glow {
    position: absolute;
    inset: -18% auto auto 50%;
    width: 720px;
    height: 720px;
    transform: translateX(-50%);
    z-index: 0;
    background: radial-gradient(circle, rgba(238, 42, 123, 0.22), rgba(131, 58, 180, 0.12) 42%, transparent 70%);
    pointer-events: none;
    filter: blur(8px);
}

.ops-mascot {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.85;
}

.ops-mascot .home-mascot {
    width: min(280px, 58vw);
    height: auto;
    filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}

.matrix-rain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: block;
    mix-blend-mode: screen;
    pointer-events: none;
}

.term-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.term-win {
    position: absolute;
    bottom: -20%;
    width: min(300px, 42vw);
    height: 150px;
    background: rgba(7, 9, 13, 0.92);
    border: 1px solid rgba(60, 255, 138, 0.22);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(238, 42, 123, 0.08);
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 10px;
    line-height: 1.4;
    animation: termRise linear infinite;
    opacity: 0.9;
    will-change: transform;
}

.term-win.bash { color: #3cff8a; }
.term-win.cmd { color: #d6d6d6; border-color: rgba(255, 255, 255, 0.14); }
.term-win.ps { color: #6cb6ff; border-color: rgba(108, 182, 255, 0.28); }

.term-titlebar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    background: linear-gradient(90deg, rgba(238, 42, 123, 0.12), rgba(18, 20, 26, 0.95));
    color: #9aa;
    font-size: 10px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.term-titlebar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3a3a3a;
    display: inline-block;
    flex-shrink: 0;
}

.term-win.bash .term-titlebar i:nth-child(1) { background: #ff5f56; }
.term-win.bash .term-titlebar i:nth-child(2) { background: #ffbd2e; }
.term-win.bash .term-titlebar i:nth-child(3) { background: #27c93f; }
.term-win.cmd .term-titlebar { background: #1a1a1a; }
.term-win.ps .term-titlebar { background: linear-gradient(90deg, #012456, #0a1628); color: #9ec3ff; }

.term-body {
    padding: 7px 8px;
    height: calc(100% - 24px);
    overflow: hidden;
    white-space: pre-wrap;
    word-break: break-all;
}

@keyframes termRise {
    from { transform: translateY(0) rotate(var(--rot, 0deg)); opacity: 0.15; }
    12% { opacity: 0.92; }
    to { transform: translateY(calc(-120vh - 40%)) rotate(var(--rot, 0deg)); opacity: 0.35; }
}

.ops-card {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 32px));
    padding: 22px 20px 18px;
    border-radius: 20px;
    background: rgba(14, 14, 20, 0.72);
    border: 1px solid rgba(238, 42, 123, 0.28);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(131, 58, 180, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    text-align: left;
}

.ops-kicker {
    font-family: Consolas, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    color: #3cff8a;
    margin: 0 0 10px;
}

.ops-card h1 {
    font-size: 1.15rem;
    margin: 0 0 6px;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.35;
    color: #f5f5f7;
}

.ops-card h1.glitch {
    animation: titleGlitch 0.28s steps(2) infinite, titleFlicker 2.1s ease-in-out infinite;
    text-shadow: 2px 0 #3cff8a, -2px 0 #ee2a7b, 0 0 18px rgba(60, 255, 138, 0.45);
}

@keyframes titleGlitch {
    0% { transform: translate(0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-1px, 2px); }
    100% { transform: translate(0); }
}

@keyframes titleFlicker {
    0%, 90%, 100% { opacity: 1; }
    92% { opacity: 0.3; }
    94% { opacity: 1; }
    96% { opacity: 0.55; }
}

.ops-target {
    color: #9ad7b0;
    font-family: Consolas, monospace;
    margin: 0 0 14px;
    font-size: 13px;
}

.connect-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.connect-steps li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 7px 0;
    color: rgba(167, 167, 179, 0.55);
    font-size: 12.5px;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.35;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.connect-steps li:last-child {
    border-bottom: 0;
}

.connect-steps li.done { color: #8fd9a8; }
.connect-steps li.current {
    color: #e7ffe9;
    font-weight: 700;
}

.connect-steps li .dot {
    width: 8px;
    height: 8px;
    margin-top: 4px;
    border-radius: 50%;
    background: #2a2a36;
    flex-shrink: 0;
}

.connect-steps li.done .dot { background: #27c93f; }
.connect-steps li.current .dot {
    background: #3cff8a;
    box-shadow: 0 0 0 4px rgba(60, 255, 138, 0.18);
}

.connect-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    margin-top: 16px;
    overflow: hidden;
}

.connect-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--pink), var(--purple), #3cff8a);
    transition: width 0.85s ease;
    box-shadow: 0 0 12px rgba(238, 42, 123, 0.45);
}

@media (max-width: 640px) {
    .term-win {
        width: min(220px, 48vw);
        height: 120px;
        font-size: 9px;
    }

    .ops-card {
        width: min(380px, calc(100vw - 24px));
        padding: 18px 16px 14px;
    }

    .ops-card h1 {
        font-size: 1.02rem;
    }

    .connect-steps li {
        font-size: 11.5px;
        padding: 6px 0;
    }

    .ops-mascot .home-mascot {
        width: min(220px, 62vw);
    }

    .topbar {
        gap: 12px;
    }

    .brand strong {
        font-size: 13px;
        letter-spacing: 0.08em;
    }

    .brand small {
        font-size: 11px;
    }

    .ig-row {
        grid-template-columns: 72px 1fr;
        gap: 14px;
    }

    .ig-ring {
        width: 68px;
        height: 68px;
    }

    .ig-stats span {
        font-size: 11px;
    }

    .ig-story {
        width: clamp(64px, 18vw, 84px);
        font-size: 11px;
    }

    .ig-story .ig-ring {
        width: clamp(64px, 18vw, 84px);
        height: clamp(64px, 18vw, 84px);
    }

    .ig-stories {
        padding-inline: 10px;
        scrollbar-width: none;
    }

    .ig-stories::-webkit-scrollbar {
        display: none;
    }

    .ig-shell {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 430px) {
    .ops-card {
        width: calc(100vw - 20px);
        padding: 14px 12px 12px;
        border-radius: 16px;
    }

    .ops-card h1 {
        font-size: 0.95rem;
    }

    .ops-kicker {
        font-size: 10px;
    }

    .term-win:nth-child(n+4) {
        display: none;
    }

    .ops-mascot .home-mascot {
        width: min(180px, 55vw);
    }
}

.ig-shell {
    min-height: 100vh;
    background: #000;
    color: #f5f5f5;
    padding-bottom: 56px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ig-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 11px;
    position: sticky;
    top: 0;
    background: #000;
    z-index: 2;
}

.ig-top .user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.ig-ico {
    width: 24px;
    height: 24px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ig-ico.filled { fill: currentColor; stroke: none; }

.ig-top button {
    border: 0;
    background: transparent;
    color: #f5f5f5;
    padding: 4px;
    cursor: pointer;
    display: grid;
    place-items: center;
    position: relative;
}

.ig-top button.ig-thread-who {
    display: flex;
    place-items: unset;
    justify-content: flex-start;
}
}

.ig-profile {
    padding: 8px 16px 4px;
}

.ig-row {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 20px;
    align-items: center;
}

.ig-ring {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #f9ce34, #ee2a7b 45%, #6228d7);
}

.ig-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #000;
    display: block;
    background: #111;
}

.ig-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
}

.ig-stats b {
    display: block;
    font-size: 16px;
    font-weight: 700;
}

.ig-stats span {
    color: #f5f5f5;
    font-size: 13px;
}

.ig-meta {
    margin-top: 12px;
}

.ig-meta strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.ig-meta .ig-badge {
    display: inline-block;
    margin-top: 2px;
    color: #a8a8a8;
    font-size: 12px;
}

.ig-meta p {
    margin: 2px 0 0;
    color: #f5f5f5;
    font-size: 14px;
    white-space: pre-wrap;
    line-height: 1.35;
}

.ig-meta a {
    color: #e0f1ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.ig-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 36px;
    gap: 8px;
    margin-top: 12px;
}

.ig-actions button {
    border: 0;
    border-radius: 8px;
    height: 32px;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}

.ig-profile-btn {
    width: 100%;
    background: #363636;
    color: #fff;
    white-space: nowrap;
    display: grid;
    place-items: center;
}

.ig-follow {
    background: #0095f6;
    color: #fff;
}

.ig-add {
    background: #363636;
    color: #fff;
    display: grid;
    place-items: center;
}

.ig-highlights {
    display: flex;
    gap: 16px;
    padding: 16px 16px 10px;
    overflow-x: auto;
}

.ig-hl {
    width: 64px;
    flex-shrink: 0;
    text-align: center;
    color: #f5f5f5;
    font-size: 12px;
}

.ig-hl i {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid #3a3a3a;
    margin: 0 auto 6px;
    color: #f5f5f5;
}

.ig-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-top: 1px solid #262626;
    margin-top: 4px;
}

.ig-tabs span {
    display: grid;
    place-items: center;
    height: 44px;
    color: #737373;
}

.ig-tabs span.active {
    color: #f5f5f5;
    box-shadow: inset 0 -1px 0 #f5f5f5;
}

.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #000;
}

.ig-grid .tile {
    border-radius: 0;
    background: #111;
}

.ig-empty {
    padding: 56px 28px;
    text-align: center;
    color: #a8a8a8;
}

.ig-empty strong {
    display: block;
    color: #f5f5f5;
    font-size: 22px;
    margin-bottom: 8px;
}

.ig-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(470px, 100%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #000;
    border-top: 1px solid #262626;
    padding: 10px 0 calc(12px + env(safe-area-inset-bottom, 0px));
}

.ig-nav span {
    display: grid;
    place-items: center;
    color: #f5f5f5;
}

.ig-nav .nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #f5f5f5;
}

.ig-nav button {
    border: 0;
    background: transparent;
    color: #f5f5f5;
    padding: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
    position: relative;
}

.ig-nav button.active .nav-avatar {
    border-width: 2px;
}

.ig-wordmark {
    flex: 1;
    display: flex;
    align-items: center;
}

.ig-top-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}

.ig-badge-dot {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: #ff3040;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
}

.ig-stories {
    display: flex;
    gap: 14px;
    padding: 8px 12px 12px;
    overflow-x: auto;
    border-bottom: 1px solid #1a1a1a;
}

.ig-story {
    width: clamp(78px, 20vw, 92px);
    flex-shrink: 0;
    text-align: center;
    font-size: 12px;
    color: #f5f5f5;
    border: 0;
    background: transparent;
    padding: 0;
    font-family: inherit;
}

.ig-story .ig-ring,
.ig-story .ig-avatar {
    overflow: hidden;
    border-radius: 50%;
}

.ig-story .ig-ring {
    width: clamp(78px, 20vw, 92px);
    height: clamp(78px, 20vw, 92px);
    margin: 0 auto 6px;
    position: relative;
}

.ig-story:not(.own) .ig-ring {
    background: linear-gradient(45deg, #f9ce34, #ee2a7b 55%, #6228d7);
    padding: 3px;
}

.ig-story.close-friends:not(.own) .ig-ring {
    background: linear-gradient(180deg, #31f562, #00d26a);
    box-shadow: inset 0 0 0 2px #000;
}

.ig-story:not(.own) .ig-avatar {
    border: 2px solid #000;
}

.ig-story.own .ig-ring {
    background: #262626;
    padding: 3px;
}

.sim-face {
    filter: blur(3.5px) brightness(0.65);
}

.feed-media .sim-face,
.ig-story-view .media .sim-face,
.ig-hidden-media .sim-face,
.ig-open-media.sim-face,
.tile .sim-face {
    filter: blur(10px) brightness(0.65);
}

.sim-lock {
    position: relative;
    display: block;
}
.sim-lock::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .53);
    z-index: 2;
    pointer-events: none;
}
.sim-lock.round::before {
    border-radius: 50%;
}
.sim-lock > .ig-pay-lock {
    left: 50%;
    top: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    z-index: 3;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .65));
}
.sim-lock.round > .ig-pay-lock {
    width: 16px;
    height: 16px;
}
.sim-lock.rect > .ig-pay-lock {
    width: 36px;
    height: 36px;
}
.feed-media > .sim-lock {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.feed-media .sim-face {
    filter: blur(14px) brightness(0.51);
}
.feed-media > .sim-lock::before {
    background: rgba(0, 0, 0, .74);
}
.feed-media > .sim-lock > .ig-pay-lock {
    position: absolute;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: 64px;
    height: 64px;
    margin: 0;
    transform: translate(-50%, -50%);
}
.feed-media > .sim-lock > .ig-pay-lock svg {
    width: 100%;
    height: 100%;
    display: block;
}
.tile > .sim-lock,
.ig-story-view .media > .sim-lock {
    width: 100%;
    height: 100%;
}
.feed-head .sim-lock.round {
    width: 32px;
    height: 32px;
}
.ig-hidden-media .sim-lock > .ig-pay-lock {
    display: none;
}

.ig-face-lock {
    position: relative;
}
.ig-face-lock::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .53);
    z-index: 2;
    pointer-events: none;
}
.feed-head .ig-face-lock {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.feed-head .ig-face-lock::before {
    inset: 0;
}
.ig-face-lock > .ig-pay-lock {
    left: 50%;
    top: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    z-index: 3;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .65));
}
.ig-face-lock-sm > .ig-pay-lock,
.feed-head .ig-face-lock > .ig-pay-lock {
    width: 14px;
    height: 14px;
}

.ig-story-add {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0095f6;
    border: 2px solid #000;
    color: #fff;
    font-size: 14px;
    line-height: 18px;
}

.feed-post {
    padding-bottom: 12px;
}

.feed-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.feed-head img,
.feed-head .feed-ava {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #222;
}

.feed-ava {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #222;
}

.feed-head b {
    font-size: 13px;
}

.feed-head span {
    color: #a8a8a8;
    font-size: 12px;
}

.feed-media {
    position: relative;
    aspect-ratio: 1;
    background: #111;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.feed-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-media .video {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.55);
    padding: 3px 8px;
    border-radius: 999px;
}

.feed-actions {
    display: flex;
    gap: 14px;
    padding: 8px 12px;
    align-items: center;
}

.feed-actions button {
    border: 0;
    background: transparent;
    color: #f5f5f5;
    padding: 0;
    cursor: pointer;
}

.feed-actions .push {
    margin-left: auto;
}

.feed-body {
    padding: 0 12px 8px;
    font-size: 14px;
}

.feed-body b { margin-right: 6px; }
.feed-time { color: #737373; font-size: 11px; padding: 0 12px 8px; text-transform: uppercase; }

.liked { color: #ff3040; }

.ig-list {
    padding: 8px 0 70px;
}

.ig-row-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.ig-row-item img,
.ig-row-item .feed-ava {
    width: clamp(56px, 14vw, 64px);
    height: clamp(56px, 14vw, 64px);
    object-fit: cover;
}

.ig-row-item .meta { flex: 1; }
.ig-row-item .meta b { display: block; font-size: 14px; }
.ig-row-item .meta span { color: #a8a8a8; font-size: 13px; }
.ig-unread { width: 8px; height: 8px; border-radius: 50%; background: #0095f6; }

.ig-search {
    margin: 10px 12px;
    background: #262626;
    border-radius: 10px;
    padding: 8px 12px;
    color: #a8a8a8;
}

.ig-explore {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
}

.ig-explore i {
    aspect-ratio: 1;
    display: block;
    background: #111;
    overflow: hidden;
}

.ig-explore i img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ig-sheet {
    position: fixed;
    inset: auto 0 0 0;
    width: min(470px, 100%);
    left: 50%;
    transform: translateX(-50%);
    background: #262626;
    border-radius: 16px 16px 0 0;
    padding: 10px 12px 28px;
    z-index: 6;
}

.ig-sheet h3 { margin: 8px 12px 16px; font-size: 16px; }
.ig-sheet button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: #f5f5f5;
    padding: 14px 12px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
}

.ig-reel {
    min-height: calc(100vh - 110px);
    background: linear-gradient(180deg, #1a1020, #000);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 16px 24px;
}

.ig-own .ig-actions {
    grid-template-columns: 1fr 1fr 36px;
    gap: 8px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: none;
    place-items: center;
    z-index: 80;
    padding: 16px;
}
.modal[hidden] {
    display: none !important;
}
.modal.on:not([hidden]) {
    display: grid;
}
.modal .box {
    background: #16161f;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    max-width: 420px;
    width: 100%;
}
.modal .box h2 {
    margin: 0 0 8px;
    color: var(--text);
}
.modal .box label {
    display: block;
    margin: 12px 0 6px;
    color: var(--muted);
    font-size: 13px;
}
.modal .box .actions {
    margin-top: 16px;
}

@media (max-width: 640px) {
    .profile-card,
    .dash-head {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .identity, .dash-copy {
        justify-items: center;
    }

    .badges {
        justify-content: center;
    }

    .app {
        padding: 20px 14px 40px;
    }

    .search-card,
    .home-hero .lead {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ops-card h1.glitch,
    .term-win,
    .mascot-body,
    .mascot-glass,
    .mascot-shine,
    .mascot-shadow {
        animation: none;
    }

    .home-hook {
        transition: none;
    }
}

body.theme-security .bg-glow {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.28), rgba(8, 145, 178, 0.12) 42%, transparent 70%);
}

body.theme-security .btn-primary {
    background: #22d3ee;
    color: #042026;
}

body.theme-security .btn-primary.is-loading {
    letter-spacing: 0.2em;
    animation: sec-dots 0.9s ease-in-out infinite;
}

@keyframes sec-dots {
    0%, 100% { letter-spacing: 0.08em; opacity: 0.4; }
    50% { letter-spacing: 0.55em; opacity: 1; }
}

body.theme-security .social-proof {
    color: #7ee7f5;
}

body.theme-security footer {
    text-align: center;
}

body.theme-security .input-row:focus-within {
    border-color: rgba(34, 211, 238, 0.75);
}

body.theme-security .spinner {
    border-top-color: #22d3ee;
}
