/* ============================================================
   CLIPPYO — "Obsidian & Neon Lime"
   Deep black canvas, obsidian glass surfaces, neon lime accent.
   ============================================================ */

:root {
    /* Surfaces */
    --bg: #000000;
    --obsidian: #0c0c0c;
    --obsidian-deep: #0a0a0a;

    /* Accents */
    --lime: #ccff00;
    --lime-dim: rgba(204, 255, 0, 0.12);
    --lime-glow: rgba(204, 255, 0, 0.35);
    --emerald: #10b981;
    --emerald-dim: rgba(16, 185, 129, 0.12);
    --danger: #ff4d4d;

    /* Typography */
    --text: #ebebeb;
    --text-sub: rgba(235, 235, 235, 0.6);
    --text-muted: rgba(235, 235, 235, 0.3);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(16px);
    --hairline: rgba(255, 255, 255, 0.06);

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Radii */
    --r-lg: 24px;
    --r-md: 16px;
    --r-sm: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Ambient background layers ---------- */

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 25%, transparent 90%);
    mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 25%, transparent 90%);
}

/* SVG grain, 15% opacity */
.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.15;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow-sphere {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.glow-lime {
    width: 620px;
    height: 620px;
    top: -280px;
    left: 50%;
    margin-left: -420px;
    background: rgba(204, 255, 0, 0.18);
    animation: float-a 20s ease-in-out infinite;
}

.glow-emerald {
    width: 520px;
    height: 520px;
    top: 24vh;
    right: -220px;
    background: rgba(16, 185, 129, 0.14);
    animation: float-b 26s ease-in-out infinite;
}

@keyframes float-a {

    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(60px, 50px, 0) scale(1.12);
    }
}

@keyframes float-b {

    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1.05);
    }

    50% {
        transform: translate3d(-70px, 70px, 0) scale(0.92);
    }
}

@media (prefers-reduced-motion: reduce) {

    .glow-sphere,
    .float,
    * {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Typography primitives ---------- */

h1,
h2,
h3,
h4 {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.06em;
    line-height: 1.02;
    font-weight: 500;
}

.mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
}

.eyebrow {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.66rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.eyebrow::before {
    content: '';
    width: 26px;
    height: 1px;
    background: var(--lime);
    opacity: 0.8;
}

.accent {
    color: var(--lime);
}

/* ---------- Shell ---------- */

.app-shell {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}

.container-narrow {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------- Header ---------- */

.header {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 28px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--hairline);
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.06em;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    padding: 0;
}

.brand-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 14px var(--lime-glow);
    display: inline-block;
    margin-left: 3px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-sub);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.68rem;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    color: var(--text);
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

.nav-btn.active {
    color: var(--lime);
    border-color: rgba(204, 255, 0, 0.35);
    background: var(--lime-dim);
}

.count-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    padding: 2px 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
    text-align: center;
    padding: 84px 0 40px;
}

.hero h1 {
    font-size: clamp(2.6rem, 7vw, 5rem);
    font-weight: 300;
    margin: 22px 0 18px;
}

.hero h1 strong {
    font-weight: 700;
    color: var(--lime);
    text-shadow: 0 0 60px var(--lime-glow);
}

.hero p {
    color: var(--text-sub);
    font-size: 1.02rem;
    max-width: 520px;
    margin: 0 auto;
}

/* ---------- Glass surfaces ---------- */

.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
}

.panel {
    padding: 26px;
    margin-bottom: 22px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* ---------- Search ---------- */

.mode-switch {
    display: inline-flex;
    padding: 4px;
    gap: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--hairline);
    margin-bottom: 18px;
}

.mode-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.66rem;
    padding: 9px 18px;
    border-radius: 99px;
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn:hover {
    color: var(--text);
}

.mode-btn.active {
    background: var(--lime);
    color: #000;
    font-weight: 700;
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.input,
.select,
.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    padding: 15px 18px;
    border-radius: var(--r-md);
    transition: var(--transition);
    outline: none;
}

.search-input {
    padding: 18px 20px;
    font-size: 1rem;
}

.input::placeholder,
.search-input::placeholder {
    color: var(--text-muted);
}

.input:focus,
.select:focus,
.search-input:focus {
    border-color: rgba(204, 255, 0, 0.5);
    background: rgba(204, 255, 0, 0.04);
    box-shadow: 0 0 0 4px rgba(204, 255, 0, 0.08);
}

.select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ccff00' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.select option {
    background: var(--obsidian);
    color: var(--text);
}

.select:disabled,
.input:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 14px 22px;
    border-radius: var(--r-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--lime);
    border-color: var(--lime);
    color: #000;
    box-shadow: 0 0 0 rgba(204, 255, 0, 0);
}

.btn-primary:hover:not(:disabled) {
    background: #d9ff33;
    border-color: #d9ff33;
    box-shadow: 0 12px 40px -10px var(--lime-glow);
}

.btn-emerald {
    background: var(--emerald-dim);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--emerald);
}

.btn-emerald:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.2);
}

.btn-danger:hover:not(:disabled) {
    color: var(--danger);
    border-color: rgba(255, 77, 77, 0.4);
}

.btn-block {
    width: 100%;
    padding: 19px 22px;
    font-size: 0.76rem;
}

.btn-sm {
    padding: 9px 14px;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
}

/* ---------- Video preview ---------- */

.preview {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 26px;
    padding: 26px;
    margin-bottom: 22px;
}

.thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--obsidian-deep);
    border: 1px solid var(--hairline);
}

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

.thumb.is-vertical {
    aspect-ratio: 9 / 16;
    max-width: 220px;
    margin: 0 auto;
}

/* Live illustration of the chosen crop */
.thumb .crop-guide {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.thumb .crop-guide span {
    height: 100%;
    width: 56.25%;
    border-left: 1px dashed rgba(204, 255, 0, 0.7);
    border-right: 1px dashed rgba(204, 255, 0, 0.7);
    background: rgba(204, 255, 0, 0.07);
}

.preview h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.meta-chip {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.62rem;
    color: var(--text-sub);
    padding: 6px 11px;
    border-radius: 99px;
    border: 1px solid var(--hairline);
    background: rgba(255, 255, 255, 0.02);
}

.meta-chip.lime {
    color: var(--lime);
    border-color: rgba(204, 255, 0, 0.3);
    background: var(--lime-dim);
}

.meta-chip.emerald {
    color: var(--emerald);
    border-color: rgba(16, 185, 129, 0.3);
    background: var(--emerald-dim);
}

/* ---------- Option blocks ---------- */

.field {
    margin-bottom: 22px;
}

.field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.64rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    padding: 6px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--hairline);
}

.seg {
    background: none;
    border: 1px solid transparent;
    color: var(--text-sub);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.86rem;
    font-weight: 500;
    padding: 12px 10px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
}

.seg small {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.seg:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.seg.active {
    background: var(--lime-dim);
    border-color: rgba(204, 255, 0, 0.45);
    color: var(--lime);
}

.seg.active small {
    color: rgba(204, 255, 0, 0.65);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    padding: 10px 15px;
    border-radius: var(--r-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-sub);
    cursor: pointer;
    transition: var(--transition);
}

.chip:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.25);
}

.chip.active {
    background: var(--lime);
    border-color: var(--lime);
    color: #000;
    font-weight: 700;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    border: 1px solid var(--hairline);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: var(--transition);
}

.switch-row:hover {
    border-color: var(--glass-border);
}

.switch-row .switch-text {
    font-size: 0.9rem;
}

.switch-row .switch-text small {
    display: block;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.switch {
    flex-shrink: 0;
    width: 46px;
    height: 26px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    position: relative;
    transition: var(--transition);
}

.switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-sub);
    transition: var(--transition);
}

.switch.on {
    background: var(--lime-dim);
    border-color: var(--lime);
}

.switch.on::after {
    transform: translateX(20px);
    background: var(--lime);
    box-shadow: 0 0 12px var(--lime-glow);
}

/* ---------- Trim slider ---------- */

.trim {
    padding: 18px;
    border-radius: var(--r-md);
    border: 1px solid var(--hairline);
    background: rgba(255, 255, 255, 0.02);
}

.trim-values {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    color: var(--text-sub);
    margin-bottom: 12px;
}

.range-stack {
    position: relative;
    height: 30px;
    margin-bottom: 12px;
}

.range-track {
    position: absolute;
    top: 13px;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.1);
}

.range-fill {
    position: absolute;
    top: 13px;
    height: 4px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--lime), var(--emerald));
}

.range-stack input[type=range] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    margin: 0;
    background: none;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
}

.range-stack input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: all;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--lime);
    border: 2px solid #000;
    box-shadow: 0 0 12px var(--lime-glow);
    cursor: grab;
}

.range-stack input[type=range]::-moz-range-thumb {
    pointer-events: all;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--lime);
    border: 2px solid #000;
    cursor: grab;
}

.trim-inputs {
    display: flex;
    gap: 10px;
}

/* ---------- Results grid (search) ---------- */

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.result-card {
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    padding: 0;
    border-radius: var(--r-md);
}

.result-card:hover {
    transform: translateY(-4px);
    border-color: rgba(204, 255, 0, 0.4);
    box-shadow: 0 20px 50px -30px var(--lime-glow);
}

.result-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.result-body {
    padding: 14px 16px 18px;
}

.result-body h4 {
    font-size: 0.94rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Library ---------- */

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.lib-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--r-md);
    transition: var(--transition);
}

.lib-card:hover {
    border-color: rgba(255, 255, 255, 0.22);
}

.lib-media {
    background: #000;
    border-bottom: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    position: relative;
}

.lib-media video,
.lib-media img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    display: block;
}

.lib-placeholder {
    font-size: 2.4rem;
    padding: 40px 0;
    opacity: 0.5;
}

.lib-body {
    padding: 14px 16px;
    flex: 1;
}

.lib-name {
    font-size: 0.9rem;
    word-break: break-word;
    margin-bottom: 8px;
}

.lib-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.lib-actions .btn {
    flex: 1;
}

/* ---------- Progress dock ---------- */

.dock {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(380px, calc(100vw - 40px));
}

.job {
    padding: 16px 18px;
    border-radius: var(--r-md);
    animation: rise 0.35s var(--ease);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.job-title {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.job-phase {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.58rem;
    color: var(--lime);
    margin-bottom: 10px;
}

.job-phase.processing {
    color: var(--emerald);
}

.progress-track {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--lime), var(--emerald));
    box-shadow: 0 0 14px var(--lime-glow);
    transition: width 0.4s var(--ease);
}

.progress-bar.indeterminate {
    width: 35% !important;
    animation: sweep 1.3s var(--ease) infinite;
}

@keyframes sweep {
    0% {
        margin-left: -35%;
    }

    100% {
        margin-left: 100%;
    }
}

.job-stats {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 9px;
}

.job-stats b {
    color: var(--text);
    font-weight: 500;
}

/* ---------- Toasts ---------- */

.toasts {
    position: fixed;
    top: 84px;
    right: 24px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 40px));
}

.toast {
    padding: 14px 16px;
    border-radius: var(--r-md);
    font-size: 0.88rem;
    border-left: 2px solid var(--lime);
    animation: rise 0.3s var(--ease);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.success {
    border-left-color: var(--emerald);
}

.toast .toast-kind {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.56rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

/* ---------- Empty & skeleton ---------- */

.empty {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-muted);
}

.empty .empty-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 14px;
    opacity: 0.6;
}

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: var(--r-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-line {
    height: 12px;
    margin-bottom: 10px;
}

.skeleton-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--r-md);
}

/* ---------- Footer ---------- */

.footer {
    margin-top: auto;
    padding: 50px 28px 34px;
    text-align: center;
    border-top: 1px solid var(--hairline);
}

.footer .mono {
    color: var(--text-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .preview {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 54px 0 28px;
    }

    .header {
        padding: 14px 18px;
    }

    .container,
    .container-narrow {
        padding: 0 18px;
    }

    .dock {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }

    .toasts {
        right: 12px;
        left: 12px;
        width: auto;
    }
}

@media (max-width: 520px) {
    .segmented {
        grid-auto-flow: row;
        grid-auto-columns: auto;
    }

    .search-row {
        flex-direction: column;
    }
}
