/* =========================================================
   iOSBuddy  —  macOS-Inspired Design System
   ========================================================= */

/* ----------------------------------------------------------
   0. Fonts & Reset
   ---------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Backgrounds */
    --bg-window:      #1c1c1e;
    --bg-surface:     #2c2c2e;
    --bg-elevated:    #3a3a3c;
    --bg-overlay:     rgba(44,44,46,0.92);
    --bg-glass:       rgba(28,28,30,0.75);
    --bg-sidebar:     rgba(28,28,30,0.85);
    --bg-toolbar:     rgba(28,28,30,0.8);
    --bg-card:        rgba(44,44,46,0.8);
    --bg-input:       rgba(118,118,128,0.12);
    --bg-hover:       rgba(255,255,255,0.05);
    --bg-active:      rgba(0,113,227,0.18);

    /* Text */
    --text-primary:   #f5f5f7;
    --text-secondary: rgba(235,235,245,0.6);
    --text-tertiary:  rgba(210, 210, 233, 0.35);
    --text-accent:    #0077ed;

    /* Accent */
    --accent:         #0071e3;
    --accent-hover:   #0077ed;
    --accent-bright:  #2997ff;
    --accent-light:   rgba(0,113,227,0.15);
    --accent-ring:    rgba(0,113,227,0.4);

    /* Status */
    --green:          #30d158;
    --green-bg:       rgba(48,209,88,0.15);
    --yellow:         #ffd60a;
    --yellow-bg:      rgba(255,214,10,0.15);
    --red:            #ff453a;
    --red-bg:         rgba(255,69,58,0.15);
    --orange:         #ff9f0a;
    --orange-bg:      rgba(255,159,10,0.15);
    --blue:           #64d2ff;
    --blue-bg:        rgba(100,210,255,0.15);

    /* Borders */
    --border:         rgba(255,255,255,0.08);
    --border-light:   rgba(255,255,255,0.05);
    --border-strong:  rgba(255,255,255,0.14);
    --border-accent:  rgba(0,113,227,0.5);

    /* Extra backgrounds (used in apps pages) */
    --bg-secondary:   #2c2c2e;
    --bg-tertiary:    #3a3a3c;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.4);
    --shadow-lg:  0 12px 40px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.5);
    --shadow-pop: 0 20px 60px rgba(0,0,0,0.7);

    /* Overlay / scrim */
    --bg-overlay: rgba(44,44,46,0.94);
    --bg-scrim:   rgba(0,0,0,0.55);

    /* Radius */
    --r-xs:  4px;
    --r-sm:  8px;
    --r-md:  12px;
    --r-lg:  16px;
    --r-xl:  20px;
    --r-pill:9999px;

    /* Layout */
    --sidebar-w:    240px;
    --toolbar-h:    52px;
    --content-max:  1280px;

    /* Transitions */
    --ease:         cubic-bezier(0.4,0,0.2,1);
    --ease-spring:  cubic-bezier(0.34,1.56,0.64,1);

    /* Font */
    --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Menlo', 'Monaco', ui-monospace, 'Cascadia Mono', 'Courier New', monospace;

    /* Logo filter — inverts a dark logo to white in dark mode; overridden per color scheme */
    --logo-filter: invert(1);
}

/* ----------------------------------------------------------
   Light theme variable set
   Applied in two ways:
    1. System preference (before JS runs) via @media — but skip
       if the user has explicitly forced dark with .theme-dark.
    2. Explicit JS toggle via the .theme-light class on <html>.
   ---------------------------------------------------------- */

/* shared light-mode property values (used in both selectors below) */
@media (prefers-color-scheme: light) {
    html:not(.theme-dark) {
        --logo-filter:  none;
        --bg-window:    #f5f5f7;
        --bg-surface:   #ffffff;
        --bg-elevated:  #f0f0f2;
        --bg-overlay:   rgba(250,250,252,0.96);
        --bg-glass:     rgba(245,245,247,0.8);
        --bg-sidebar:   rgba(236,236,238,0.92);
        --bg-toolbar:   rgba(245,245,247,0.85);
        --bg-card:      rgba(255,255,255,0.88);
        --bg-input:     rgba(118,118,128,0.08);
        --bg-hover:     rgba(0,0,0,0.04);
        --bg-active:    rgba(0,113,227,0.1);
        --bg-scrim:     rgba(0,0,0,0.3);
        --text-primary:   #1d1d1f;
        --text-secondary: #636366;
        --text-tertiary:  #8e8e93;
        --text-accent:    #0066cc;
        --border:         rgba(0,0,0,0.08);
        --border-light:   rgba(0,0,0,0.05);
        --border-strong:  rgba(0,0,0,0.14);
        --shadow-sm:  0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
        --shadow-md:  0 4px 16px rgba(0,0,0,0.12);
        --shadow-lg:  0 12px 40px rgba(0,0,0,0.16);
        --shadow-pop: 0 20px 60px rgba(0,0,0,0.25);
        --bg-secondary:   #f0f0f2;
        --bg-tertiary:    #e5e5ea;
    }
}

/* Explicit user override — JS sets this class via the toggle button */
html.theme-light {
    --logo-filter:  none;
    --bg-window:    #f5f5f7;
    --bg-surface:   #ffffff;
    --bg-elevated:  #f0f0f2;
    --bg-overlay:   rgba(250,250,252,0.96);
    --bg-glass:     rgba(245,245,247,0.8);
    --bg-sidebar:   rgba(236,236,238,0.92);
    --bg-toolbar:   rgba(245,245,247,0.85);
    --bg-card:      rgba(255,255,255,0.88);
    --bg-input:     rgba(118,118,128,0.08);
    --bg-hover:     rgba(0,0,0,0.04);
    --bg-active:    rgba(0,113,227,0.1);
    --bg-scrim:     rgba(0,0,0,0.3);
    --text-primary:   #1d1d1f;
    --text-secondary: #636366;
    --text-tertiary:  #8e8e93;
    --text-accent:    #0066cc;
    --border:         rgba(0,0,0,0.08);
    --border-light:   rgba(0,0,0,0.05);
    --border-strong:  rgba(0,0,0,0.14);
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg:  0 12px 40px rgba(0,0,0,0.16);
    --shadow-pop: 0 20px 60px rgba(0,0,0,0.25);
    --bg-secondary:   #f0f0f2;
    --bg-tertiary:    #e5e5ea;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg-window);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.theme-light { color-scheme: light; }
body.theme-dark  { color-scheme: dark;  }

/* ----------------------------------------------------------
   1. Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p  { color: var(--text-secondary); line-height: 1.65; }
a  { color: var(--accent-bright); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-hover); }

small { font-size: 0.8125rem; }
code, kbd, pre {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    background: var(--bg-elevated);
    border-radius: var(--r-xs);
    padding: 2px 6px;
    color: var(--text-primary);
}

/* ----------------------------------------------------------
   2. Layout — App Shell
   ---------------------------------------------------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 12px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
}
.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.sidebar-logo-text {
    display: flex;
    flex-direction: column;
}
.sidebar-logo-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.sidebar-logo-sub {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
/* Invert/tint site logo in dark mode using the active color scheme's --logo-filter */
html.theme-dark .sidebar-logo-icon img,
html.theme-dark .toolbar-logo-icon img,
html.theme-dark .tn-logo-icon img,
html.theme-dark .toolbar-logo-img {
    filter: var(--logo-filter);
}
@media (prefers-color-scheme: dark) {
    html:not(.theme-light) .sidebar-logo-icon img,
    html:not(.theme-light) .toolbar-logo-icon img,
    html:not(.theme-light) .tn-logo-icon img,
    html:not(.theme-light) .toolbar-logo-img {
        filter: var(--logo-filter);
    }
}

/* Sidebar Search */
.sidebar-search {
    padding: 12px 12px 8px;
}
.sidebar-search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    padding: 6px 12px 6px 32px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    position: relative;
}
.sidebar-search-wrap {
    position: relative;
}
.sidebar-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    opacity: 0.4;
    pointer-events: none;
}
.sidebar-search-input:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

/* Nav Sections */
.sidebar-section {
    padding: 8px 8px 4px;
    flex: 1;
}
.sidebar-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    padding: 6px 8px 4px;
}
.sidebar-nav {
    list-style: none;
}
.sidebar-nav li a,
.sidebar-nav li button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 10px;
    border-radius: var(--r-sm);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: background .15s var(--ease), color .15s var(--ease);
    text-align: left;
}
.sidebar-nav li a svg,
.sidebar-nav li button svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    flex-shrink: 0;
}
.sidebar-nav li a:hover,
.sidebar-nav li button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.sidebar-nav li a.active,
.sidebar-nav li a[aria-current="page"] {
    background: var(--bg-active);
    color: var(--accent-bright);
    font-weight: 500;
}
.sidebar-nav li a.active svg { opacity: 1; }

/* ── nav_style variants for sidebar ── */
/* flat: hide all section labels — everything is one continuous list */
.sidebar[data-nav-style="flat"] .sidebar-section-label { display: none; }

/* minimal: hide More + Device Types sections entirely */
.sidebar[data-nav-style="minimal"] .sidebar-sl--more,
.sidebar[data-nav-style="minimal"] .sidebar-nav--more,
.sidebar[data-nav-style="minimal"] .sidebar-sl--types,
.sidebar[data-nav-style="minimal"] .sidebar-nav--types { display: none; }
.sidebar[data-nav-style="minimal"] .sidebar-section-label { display: none; }

/* ── Collapsible sidebar section toggles ─────────────────── */
.sidebar-sl-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    background: none;
    border: none;
    cursor: default;           /* overridden in minimal style */
    padding: 6px 8px 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    font-family: inherit;
    text-align: left;
}
.sidebar-sl-chev {
    display: none;             /* visible only in minimal style */
    flex-shrink: 0;
    opacity: .5;
    transition: transform .2s;
}
.sidebar[data-nav-style="minimal"] .sidebar-sl-toggle {
    cursor: pointer;
}
.sidebar[data-nav-style="minimal"] .sidebar-sl-toggle:hover { color: var(--text-secondary); }
.sidebar[data-nav-style="minimal"] .sidebar-sl-chev { display: block; }
.sidebar[data-nav-style="minimal"] .sidebar-sl-toggle[aria-expanded="false"] .sidebar-sl-chev {
    transform: rotate(-90deg);
}
/* In minimal, remove the display:none overrides — JS controls visibility via max-height */
.sidebar[data-nav-style="minimal"] .sidebar-sl--more,
.sidebar[data-nav-style="minimal"] .sidebar-nav--more,
.sidebar[data-nav-style="minimal"] .sidebar-sl--types,
.sidebar[data-nav-style="minimal"] .sidebar-nav--types { display: revert; }

/* ── Topbar nav style ─────────────────────────────────────── */
@media (min-width: 769px) {
    .app-shell--topbar .sidebar           { display: none; }
    .app-shell--topbar .main-content      { margin-left: 0; }
    .app-shell--topbar .mobile-menu-toggle { display: none; }
    .app-shell--topbar .toolbar-title     { display: none; }
    .app-shell--topbar .page-content      { max-width: none; }
}
@media (max-width: 768px) {
    .tn-logo, .topbar-nav { display: none !important; }
    .app-shell--topbar .toolbar-title     { display: block !important; }
    .app-shell--topbar .mobile-menu-toggle { display: flex !important; }
}

/* Topbar logo */
.tn-logo {
    display: none;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}
.app-shell--topbar .tn-logo { display: flex; }
.tn-logo-icon {
    width: 30px;
    height: 30px;
    background: var(--accent);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.tn-logo-name {
    font-size: .9rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Topbar nav */
.topbar-nav {
    display: none;
    flex: 1;
    align-items: center;
    gap: 2px;
    min-width: 0;
    overflow: visible;
}
.app-shell--topbar .topbar-nav { display: flex; }

/* Topbar item (links + dropdown buttons share this) */
.tn-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--r-sm);
    font-size: .84rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
    transition: background .15s, color .15s;
}
.tn-item:hover    { background: var(--bg-hover, rgba(128,128,128,.1)); color: var(--text-primary); }
.tn-item.tn-active { color: var(--accent, var(--accent-bright)); }
/* Icons inside top-level nav items */
.tn-item > svg:not(.tn-chev) { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }
.tn-item.tn-active > svg:not(.tn-chev) { opacity: 1; }
.tn-chev { transition: transform .2s; opacity: .5; flex-shrink: 0; }

/* Dropdown container */
.tn-dd { position: relative; }
.tn-dd-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    z-index: 500;
    padding: 4px 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s, transform .15s;
}
.tn-dd.tn-open .tn-dd-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.tn-dd.tn-open .tn-chev { transform: rotate(180deg); opacity: 1; }
.tn-dd-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: .84rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    transition: background .1s;
}
.tn-dd-link:hover       { background: var(--bg-hover); }
.tn-dd-link--act        { color: var(--accent, var(--accent-bright)); }
.tn-dd-sep              { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
/* Size icons injected via getDeviceTypeIcon() inside topbar dropdowns */
.tn-dd-link svg         { width: 14px; height: 14px; flex-shrink: 0; opacity: .65; }

/* Sidebar footer */
.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}
.theme-toggle:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Main Content */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Toolbar */
.toolbar {
    position: sticky;
    top: 0;
    height: var(--toolbar-h);
    background: var(--bg-toolbar);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    z-index: 90;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    width: 100%;
}
.toolbar-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.toolbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    min-width: 0;
}
.toolbar-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.toolbar-logo .sidebar-logo-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.toolbar-logo .sidebar-logo-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.toolbar-logo .sidebar-logo-sub {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.toolbar-actions {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Page Content */
.page-content {
    flex: 1;
    /* Subtract the fixed sidebar from the viewport so max-width is
       always relative to the actual available column, not the full vw. */
    width: 100%;
    max-width: calc(98vw - var(--sidebar-w));
    padding: 28px 32px 48px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ----------------------------------------------------------
   3. Spotlight Search Overlay
   ---------------------------------------------------------- */
.spotlight-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-scrim);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 900;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease);
}
.spotlight-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.spotlight-box {
    width: 100%;
    max-width: 620px;
    background: var(--bg-overlay);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-pop);
    overflow: hidden;
    transform: scale(0.96) translateY(-8px);
    transition: transform .25s var(--ease-spring);
}
.spotlight-overlay.open .spotlight-box {
    transform: scale(1) translateY(0);
}
.spotlight-input-wrap {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}
.spotlight-input-wrap svg {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}
#spotlight-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 1.125rem;
    color: var(--text-primary);
}
#spotlight-input::placeholder { color: var(--text-tertiary); }
.spotlight-results {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
}
.spotlight-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    color: var(--text-primary);
}
.spotlight-result-item:hover,
.spotlight-result-item.focused {
    background: var(--bg-active);
}
.spotlight-result-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: var(--r-xs);
}
.spotlight-result-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spotlight-result-name { font-size: 0.9375rem; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.spotlight-result-id   { font-size: 0.8rem; color: var(--text-tertiary); font-family: var(--font-mono); }
.spotlight-result-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.spotlight-result-icon svg { width: 16px; height: 16px; opacity: 0.6; }
.spotlight-result-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 6px;
    border-radius: var(--r-pill);
    flex-shrink: 0;
}
.spotlight-result-badge.beta {
    background: rgba(255, 214, 10, 0.15);
    color: #ffd60a;
    border: 1px solid rgba(255, 214, 10, 0.3);
}
.spotlight-result-badge.blog {
    background: rgba(48, 209, 88, 0.12);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.25);
}
.spotlight-empty {
    text-align: center;
    padding: 32px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}
.spotlight-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 18px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}
.spotlight-hint kbd {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xs);
    padding: 2px 6px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

/* ----------------------------------------------------------
   4. Cards
   ---------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}
.card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.card-body   { padding: 18px 20px; }
.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.card-header h3 { font-size: 0.9375rem; font-weight: 600; }
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.1);
}

/* Device Card */
.device-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px 16px;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: all .25s var(--ease);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    cursor: pointer;
}
.device-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-light);
    transform: translateY(-3px) scale(1.01);
    color: var(--text-primary);
}
.device-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    transition: filter .2s, transform .2s;
}
.device-card:hover img {
    filter: drop-shadow(0 6px 20px rgba(0,113,227,0.3));
    transform: scale(1.05);
}
.device-card-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}
.device-card-id {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

/* ----------------------------------------------------------
   5. Device Grid
   ---------------------------------------------------------- */
.device-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    animation: fadeIn .35s var(--ease);
}

/* Compact Grid Style */
.grid-style-compact .device-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.grid-style-compact .device-card {
    padding: 12px;
}
.grid-style-compact .device-card img {
    height: 70px;
    margin-bottom: 8px;
}

/* List Grid Style */
.grid-style-list .device-grid {
    grid-template-columns: 1fr;
    gap: 8px;
}
.grid-style-list .device-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 14px;
    align-items: center;
    padding: 12px 16px;
    text-align: left;
}
.grid-style-list .device-card img {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 54px;
    height: 54px;
    margin-bottom: 0;
}
.grid-style-list .device-card-name {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.9rem;
    font-weight: 600;
    align-self: end;
}
.grid-style-list .device-card-id {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    display: block;
}
.grid-style-list .device-card-released {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: end;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    font-weight: 500;
}
@media (min-width: 900px) {
    .grid-style-list .device-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.device-grid.loading {
    pointer-events: none;
}

/* Skeleton loader */
.skeleton,
.skel {
    background: linear-gradient(90deg,
        var(--bg-elevated) 25%,
        rgba(255,255,255,0.04) 50%,
        var(--bg-elevated) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--r-sm);
}
/* Inline shimmer (inside text spans) */
.skel-inline {
    display: inline-block;
    height: 1em;
    vertical-align: middle;
    border-radius: 4px;
    background: linear-gradient(90deg,
        var(--bg-elevated) 25%,
        rgba(255,255,255,0.06) 50%,
        var(--bg-elevated) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
/* Skeleton image placeholder inside featured-card */
.skel-img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    flex-shrink: 0;
    align-self: center;
}
.featured-card-skel {
    pointer-events: none;
    gap: 12px;
    align-items: center;
    display: flex;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-card {
    height: 160px;
    border-radius: var(--r-lg);
}

/* ----------------------------------------------------------
   6. Segmented Control (type filter)
   ---------------------------------------------------------- */
.segmented-control {
    display: flex;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 3px;
    gap: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.segmented-control::-webkit-scrollbar { display: none; }
.segmented-control a,
.segmented-control button {
    padding: 6px 14px;
    border-radius: var(--r-pill);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
    white-space: nowrap;
}
.segmented-control a:hover,
.segmented-control button:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.segmented-control a.active,
.segmented-control button.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Segmented control scroll wrapper */
.sc-wrap {
    width: 95vw;
    overflow-x: auto;
    max-width: 98%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 24px;
    padding-bottom: 2px;
}
.sc-wrap::-webkit-scrollbar { display: none; }

/* ----------------------------------------------------------
   7. Badges & Status Pills
   ---------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.badge-signed   { background: var(--green-bg);  color: var(--green);  }
.badge-unsigned { background: var(--red-bg);    color: var(--red);    }
.badge-beta     { background: var(--orange-bg); color: var(--orange); }
.badge-rc       { background: var(--blue-bg);   color: var(--blue);   }
.badge-accent   { background: var(--accent-light); color: var(--accent-bright); }

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}
.badge-signed::before   { animation: pulse-green  2s infinite; }
.badge-unsigned::before { animation: none; opacity: 0.6; }

@keyframes pulse-green {
    0%,100% { opacity:1; transform: scale(1); }
    50%      { opacity:.5; transform: scale(0.8); }
}

/* ----------------------------------------------------------
   8. Firmware / OTA Table
   ---------------------------------------------------------- */
.fw-table-wrap {
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
}
.fw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.fw-table thead tr {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-strong);
}
.fw-table th {
    padding: 11px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    white-space: nowrap;
}
.fw-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}
.fw-table tbody tr { transition: background .12s; }
.fw-table tbody tr:hover { background: var(--bg-hover); }
.fw-table tbody tr:last-child td { border-bottom: none; }
.fw-table td.mono { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); }

/* ----------------------------------------------------------
   9. Firmware Detail Page
   ---------------------------------------------------------- */
.fw-hero {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 0;
    flex-wrap: wrap;
}
.fw-hero-device {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}
.fw-hero-device img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.4));
    transition: transform .3s var(--ease);
}
.fw-hero-device img:hover { transform: scale(1.06); }
.fw-hero-info { flex: 1; min-width: 220px; }
/* Card wrapper for the whole hero block */
.fw-hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 22px 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.fw-hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-bright), var(--blue));
}
.fw-hero-device-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
}
.fw-hero-device-id {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    text-align: center;
    display: block;
    background: none;
    padding: 0;
}
.fw-hero-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
}
.fw-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-light);
    color: var(--accent-bright);
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.fw-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 4px;
    margin: 7px 0;
}
.fw-meta-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 10px 12px;
}
.fw-meta-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}
.fw-meta-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}
.fw-meta-value.mono { font-family: var(--font-mono); font-size: 0.8rem; }

/* Beta firmware link */
.fw-beta-link{
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.825rem;
    color: var(--text-tertiary);
}
.fw-beta-link svg { flex-shrink: 0; opacity: 0.6; }
.fw-beta-link a, .fw-os-link { color: var(--accent); text-decoration: none; }
.fw-beta-link a:hover, .fw-os-link:hover { text-decoration: underline; }

/* Beta device page — hero header */
.beta-device-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.beta-device-hero__img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .beta-device-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }
    .beta-device-hero__img {
        width: 110px;
        height: 110px;
    }
    .beta-device-hero div > div {
        justify-content: center;
    }
}

/* ─── Device detail layout styles ────────────────────────────── */

/* Split: scrollable main + sticky right sidebar */
.dv-split-breadcrumb { margin-bottom: 16px; }
.dv-split-layout {
    display: block;
}
@media (min-width: 960px) {
    .dv-split-layout {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 0 32px;
        align-items: start;
    }
    .dv-split-main { order: 1; min-width: 0; }
    .dv-split-aside {
        order: 2;
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: none;
    }
    .dv-split-aside::-webkit-scrollbar { display: none; }
}
.dv-split-aside-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dv-split-device {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.dv-split-device img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0,0,0,0.35));
}
.dv-split-device-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
    margin-top: 4px;
}
.dv-split-device-id {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
}
.dv-split-meta-header {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.dv-split-share {
    padding-top: 6px;
    border-top: 1px solid var(--border);
}
.dv-split-share .share-btn {
    width: 100%;
    justify-content: center;
    display: flex;
    gap: 6px;
    font-size: 0.82rem;
}

/* Minimal: stacked sections */
.dv-section {
    margin-bottom: 24px;
}
.dv-section .section-title {
    margin-bottom: 12px;
}

/* Device info card */
.dv-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.dv-info-card--sidebar {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
}
.dv-info-row {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}
.dv-info-card--sidebar .dv-info-row {
    padding: 5px 0;
}
.dv-info-row:last-child { border-bottom: none; }
.dv-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.45;
    flex-shrink: 0;
    color: var(--text-secondary);
}
.dv-info-label {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 500;
    white-space: nowrap;
}
.dv-info-card--sidebar .dv-info-label { font-size: 0.74rem; }
.dv-info-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}
.dv-info-card--sidebar .dv-info-value { font-size: 0.78rem; }
.dv-info-mono {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ─── End device detail layout styles ───────────────────────── */

/* ─── Firmware split layout ──────────────────────────────────── */
.fw-split-layout {
    display: block;
}
@media (min-width: 960px) {
    .fw-split-layout {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 0 10px;
        align-items: start;
    }
    .fw-split-main { order: 1; }
    .fw-split-aside {
        order: 2;
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: none;
    }
    .fw-split-aside::-webkit-scrollbar { display: none; }
}
.fw-split-share {
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
}
.fw-split-share .share-btn {
    width: 100%;
    justify-content: center;
    display: flex;
    gap: 6px;
    font-size: 0.82rem;
}
.fw-split-aside-inner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--r-xl);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fw-split-device {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.fw-split-device img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.fw-split-device-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
}
.fw-split-device-id {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
}
.fw-split-meta-header {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.fw-split-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}
.fw-split-build {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    display: inline-block;
}
.fw-split-dl {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--r-md);
    overflow: hidden;
}
.fw-split-dl-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    font-size: 0.79rem;
    border-bottom: 1px solid var(--border-color);
}
.fw-split-dl-row:last-child { border-bottom: none; }
.fw-split-dl-row dt {
    color: var(--text-tertiary);
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 8px;
}
.fw-split-dl-row dd {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    margin: 0;
    word-break: break-all;
}
.fw-split-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fw-split-actions .btn-download {
    width: 100%;
    justify-content: center;
}
.fw-split-main { min-width: 0; }
.fw-split-download-full {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-bottom: 24px;
    box-sizing: border-box;
}

/* ─── Firmware minimal layout ────────────────────────────────── */
.fw-minimal-page {
    /* no max-width — fills the page content column */
}
.fw-minimal-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0 0;
    flex-wrap: wrap;
}
.fw-minimal-hero-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}
.fw-minimal-hero-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.fw-minimal-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.fw-minimal-build-pill {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
}
.fw-minimal-title {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}
.fw-minimal-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.fw-minimal-pill {
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    padding: 3px 10px;
    border-radius: var(--r-pill);
    border: 1px solid var(--border-color);
}
.fw-minimal-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 0 18px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}
.fw-minimal-section {
    padding: 18px 0;
}
.fw-minimal-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0;
}
.fw-minimal-section-title {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin: 0 0 12px;
}
.fw-minimal-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.fw-minimal-section-head .fw-minimal-section-title { margin-bottom: 0; }
.fw-minimal-code {
    display: block;
    word-break: break-all;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-elevated);
    padding: 12px 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--border-color);
    font-family: var(--font-mono);
}
.fw-minimal-code--sm { font-size: 0.78rem; color: var(--text-secondary); }
.fw-minimal-download {
    display: flex;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}
/* Compact device chips for Other Devices in minimal layout */
.fw-minimal-devices-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.fw-minimal-device-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--r-pill);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.fw-minimal-device-chip:hover {
    background: var(--bg-hover);
    border-color: var(--border-accent, var(--accent));
    color: var(--accent-bright);
}
.fw-minimal-device-chip img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ─── End firmware layout styles ─────────────────────────────── */

/* Beta device page footer (back + public firmware links) */
.beta-page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}
.beta-page-footer__back {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-decoration: none;
}
.beta-page-footer__public { margin-top: 0; }

/* Beta index table date separator row */
.beta-index-date-sep {
    padding: 8px 14px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Beta index table responsive column hiding */
@media (max-width: 768px) {
    .fw-table--beta-index th:nth-child(3),
    .fw-table--beta-index td:nth-child(3) { display: none; } /* OS */
    /* OTA table: hide Type */
    .fw-table--ota th:nth-child(3),
    .fw-table--ota td:nth-child(3) { display: none; }
}
@media (max-width: 480px) {
    .fw-table--beta-index th:nth-child(4),
    .fw-table--beta-index td:nth-child(4) { display: none; } /* Signed */
    /* IPSW table: hide Build ID + Release Date */
    .fw-table--ipsw th:nth-child(2),
    .fw-table--ipsw td:nth-child(2),
    .fw-table--ipsw th:nth-child(3),
    .fw-table--ipsw td:nth-child(3) { display: none; }
    /* OTA table: hide Build ID + Release Date */
    .fw-table--ota th:nth-child(2),
    .fw-table--ota td:nth-child(2),
    .fw-table--ota th:nth-child(4),
    .fw-table--ota td:nth-child(4) { display: none; }
}

/* Beta table — hide File Size on medium screens */
@media (max-width: 768px) {
    .fw-table--beta th:nth-child(4),
    .fw-table--beta td:nth-child(4) { display: none; } /* File Size */
}
@media (max-width: 480px) {
    .fw-table--beta th:nth-child(2),
    .fw-table--beta td:nth-child(2) { display: none; } /* Build ID */
    .beta-page-footer {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* Firmware description */
.fw-about-desc {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0;
}
.fw-about-desc + .fw-about-desc { margin-top: 8px; }
.fw-about-desc strong { color: var(--text-primary); font-weight: 600; }
.fw-inline-code {
    font-family: var(--font-mono);
    font-size: 0.82em;
    background: var(--bg-elevated);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.fw-signed-text   { color: #30d158; }
.fw-unsigned-text { color: var(--text-tertiary); }

/* Hash box */
.hash-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 10px 14px;
    margin-bottom: 8px;
}
.hash-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-tertiary);
    min-width: 56px;
    flex-shrink: 0;
}
.hash-value {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.copy-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xs);
    color: var(--text-secondary);
    font-size: 0.72rem;
    padding: 3px 8px;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
}
.copy-btn:hover { background: var(--bg-active); color: var(--accent-bright); border-color: var(--border-accent); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

/* ----------------------------------------------------------
   10. Download Button
   ---------------------------------------------------------- */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--r-pill);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,113,227,0.35);
    transition: all .2s var(--ease);
    letter-spacing: 0.01em;
}
.btn-download:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,113,227,0.5);
}
.btn-download:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,113,227,0.35);
}
.btn-download svg { width: 18px; height: 18px; }

/* Secondary button */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--r-pill);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    color: var(--text-primary);
    cursor: pointer;
    transition: all .2s var(--ease);
}
.btn:hover { background: var(--bg-surface); border-color: var(--border-accent); color: var(--accent-bright); }
.btn-sm { padding: 5px 12px; font-size: 0.8125rem; }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn-success { border-color: var(--green); color: var(--green); }
.btn-success:hover { background: var(--green-bg); }

/* ----------------------------------------------------------
   11. Hero Section (Home)
   ---------------------------------------------------------- */
.hero {
    padding: 56px 0 40px;
    text-align: center;
    position: relative;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-light);
    color: var(--accent-bright);
    border: 1px solid rgba(0,113,227,0.3);
    border-radius: var(--r-pill);
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}
.hero-stats {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-stat-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--accent-bright);
}
.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Hero split layout ──────────────────────────────────────────────
   Section 23: Hero Art Illustration
   ─────────────────────────────────────────────────────────────────── */
.hero--split {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
    padding: 52px 0 44px;
}
.hero-copy {
    flex: 1 1 0;
    min-width: 0;
}
.hero--split .hero-subtitle { margin-left: 0; margin-right: 0; max-width: 500px; }
.hero--split .hero-actions   { justify-content: flex-start; }
.hero--split .hero-stats     { justify-content: flex-start; }

/* Art container */
.hero-art {
    flex-shrink: 0;
    width: 370px;
    height: 430px;
    position: relative;
    pointer-events: none;
    user-select: none;
}
.hero-art--custom {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--r-xl, 20px);
}
.hero-art-custom-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: var(--r-xl, 20px);
    display: block;
}

/* ── Split hero: full-section background image ──────────────────────
   When admin uploads a hero image it becomes the section's bg.
   A dark gradient scrim ensures text stays readable.
   ─────────────────────────────────────────────────────────────────── */
.hero--split.hero--bg-image {
    position: relative;
    background-image: var(--hero-bg-img);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* no overflow:hidden — wave must escape below the section */
    margin: -4rem -4rem 5px -4rem;
    padding-bottom: 48px;
    z-index: 0;
}
/* Accent-tinted scrim — left half solid, right fades out */
.hero--split.hero--bg-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(var(--accent-rgb), 0.72) 0%,
        rgba(var(--accent-rgb), 0.48) 40%,
        rgba(var(--accent-rgb), 0.12) 68%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 0;
}
/* Wave divider — page-bg fill, protrudes below the photo */
.hero--split.hero--bg-image::after {
    content: '';
    position: absolute;
    bottom: -44px;   /* push curves visibly below the image edge */
    left: 0;
    width: 100%;
    height: 150px;
    background: var(--bg-window);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 88' preserveAspectRatio='none'%3E%3Cpath d='M0,44 C360,60 680,28 1020,44 C1170,52 1320,36 1440,44 L1440,88 L0,88 Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 88' preserveAspectRatio='none'%3E%3Cpath d='M0,44 C360,60 680,28 1020,44 C1170,52 1320,36 1440,44 L1440,88 L0,88 Z'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}
.hero--split.hero--bg-image .hero-copy {
    position: relative;
    z-index: 1;
    margin: 4rem;
}
/* Force light text over the bg image */
.hero--split.hero--bg-image .hero-eyebrow,
.hero--split.hero--bg-image .hero-subtitle,
.hero--split.hero--bg-image .hero-stat-label {
    color: rgba(255,255,255,0.92);
}
/* Title uses gradient-clip, must override bg + text-fill */
.hero--split.hero--bg-image .hero-title {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #fff;
    color: #fff;
    text-shadow: 0 1px 12px rgba(0,0,0,0.35);
}


.hero--split.hero--bg-image .hero-stat-value {
    color: #fff;
}
.hero--split.hero--bg-image .hero-eyebrow {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.88);
}
.hero--split.hero--bg-image .hero-eyebrow svg {
    stroke: rgba(255,255,255,0.75);
}
/* Secondary button contrast fix */
.hero--split.hero--bg-image .btn {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.28);
    color: #fff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.hero--split.hero--bg-image .btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}

/* Ambient glow blobs */
.ha-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: ha-pulse 7s ease-in-out infinite alternate;
}
.ha-blob-1 {
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(var(--accent-rgb, 0,113,227),0.22) 0%, transparent 70%);
    top: 130px; left: 50px;
    filter: blur(45px);
}
.ha-blob-2 {
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(191,90,242,0.20) 0%, transparent 70%);
    top: 30px; right: 20px;
    filter: blur(35px);
    animation-delay: -3s;
}
.ha-blob-3 {
    width: 130px; height: 130px;
    background: radial-gradient(circle, rgba(255,55,95,0.14) 0%, transparent 70%);
    bottom: 50px; left: 10px;
    filter: blur(30px);
    animation-delay: -5s;
}
@keyframes ha-pulse {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0.5; transform: scale(1.12); }
}

/* MacBook */
.ha-mac {
    position: absolute;
    left: 0; top: 22px;
    width: 248px;
    z-index: 10;
    animation: ha-float-a 5.5s ease-in-out infinite alternate;
}
.ha-mac-lid {
    width: 248px;
    height: 160px;
    background: #2c2c2e;
    border-radius: 9px 9px 0 0;
    border: 1.5px solid rgba(255,255,255,0.10);
    overflow: hidden;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
}
.ha-mac-lid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, transparent 55%);
    border-radius: 9px 9px 0 0;
    pointer-events: none;
    z-index: 5;
}
.ha-mac-notch {
    width: 5px; height: 5px;
    background: #3a3a3c;
    border-radius: 50%;
    margin: 5px auto 0;
    position: relative; z-index: 6;
}
.ha-mac-screen {
    position: absolute;
    inset: 12px 5px 5px 5px;
    background: #0d0d0e;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ha-mac-bar {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 8px;
    height: 16px;
    flex-shrink: 0;
    font-size: 5.5px;
    color: rgba(255,255,255,0.45);
}
.ha-apple { font-size: 7.5px; color: rgba(255,255,255,0.7); margin-right: 1px; }
.ha-mi    { color: rgba(255,255,255,0.4); }
.ha-mc-r  { margin-left: auto; }
.ha-win {
    flex: 1;
    margin: 4px;
    background: #161618;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.ha-win-tbar {
    display: flex;
    align-items: center;
    gap: 3.5px;
    padding: 5px 7px;
    background: rgba(255,255,255,0.025);
    border-bottom: 1px solid rgba(255,255,255,0.055);
    flex-shrink: 0;
}
.ha-tf     { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.ha-tf-r   { background: #FF5F57; }
.ha-tf-y   { background: #FEBC2E; }
.ha-tf-g   { background: #28C840; }
.ha-win-ttl {
    font-size: 5.5px;
    color: rgba(255,255,255,0.35);
    margin-left: 6px;
    font-weight: 500;
}
.ha-win-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.ha-win-side {
    width: 54px;
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.ha-wsb {
    padding: 3.5px 7px;
    font-size: 5.5px;
    color: rgba(255,255,255,0.3);
    border-radius: 3px;
}
.ha-wsb-a {
    background: rgba(var(--accent-rgb, 0,113,227),0.16);
    color: var(--accent-bright);
    font-weight: 700;
}
.ha-win-main {
    flex: 1;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ha-fw-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 4px;
    border-radius: 3px;
    background: rgba(255,255,255,0.02);
}
.ha-fw-row-dim { opacity: 0.5; }
.ha-fw-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #636366;
    flex-shrink: 0;
}
.ha-fw-dot-g {
    background: #30D158;
    box-shadow: 0 0 5px rgba(48,209,88,0.7);
}
.ha-fw-name {
    font-size: 5.5px;
    color: rgba(255,255,255,0.75);
    flex: 1;
    font-weight: 500;
}
.ha-fw-badge {
    font-size: 4.5px;
    padding: 1.5px 5px;
    border-radius: 10px;
    background: rgba(48,209,88,0.12);
    color: #30D158;
    font-weight: 700;
    border: 0.5px solid rgba(48,209,88,0.25);
    flex-shrink: 0;
}
.ha-fw-badge-dim {
    background: rgba(99,99,102,0.12);
    color: rgba(255,255,255,0.25);
    border-color: rgba(99,99,102,0.18);
}
.ha-mac-chin {
    width: 248px;
    height: 7px;
    background: #2c2c2e;
    border: 1.5px solid rgba(255,255,255,0.08);
    border-top: none;
}
.ha-mac-base {
    width: 270px;
    height: 9px;
    background: #2a2a2c;
    border-radius: 0 0 4px 4px;
    margin-left: -11px;
    border: 1.5px solid rgba(255,255,255,0.07);
    border-top: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.ha-mac-foot {
    width: 190px;
    height: 5px;
    background: #222224;
    border-radius: 0 0 8px 8px;
    margin-left: 29px;
}

/* iPhone mockup */
.ha-phone {
    position: absolute;
    right: 8px; top: 62px;
    width: 146px; height: 292px;
    background: #1c1c1e;
    border-radius: 38px;
    border: 1.5px solid rgba(255,255,255,0.14);
    box-shadow:
        0 32px 80px rgba(0,0,0,0.65),
        0 0 0 0.5px rgba(255,255,255,0.04) inset,
        18px 0 50px rgba(var(--accent-rgb, 0,113,227),0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    z-index: 20;
    animation: ha-float-b 4.8s ease-in-out infinite alternate;
}
.ha-phone::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: #000;
    border-radius: 36px;
    z-index: 0;
}
.ha-phone::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 35%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.025) 100%);
    border-radius: 0 38px 38px 0;
    pointer-events: none;
    z-index: 30;
}
/* Dynamic Island */
.ha-di {
    width: 78px; height: 26px;
    background: #000;
    border: 1.5px solid #1c1c1e;
    border-radius: 20px;
    margin: 10px auto 0;
    flex-shrink: 0;
    position: relative; z-index: 2;
}
/* Status bar */
.ha-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 14px;
    flex-shrink: 0;
    position: relative; z-index: 2;
}
.ha-status-time {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}
.ha-status-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}
/* Weather widget */
.ha-wgt {
    margin: 3px 8px;
    background: linear-gradient(155deg, #1a4a96 0%, #0a245c 100%);
    border-radius: 14px;
    padding: 7px 8px;
    flex-shrink: 0;
    position: relative; z-index: 2;
    overflow: hidden;
}
.ha-wgt::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(255,200,80,0.18) 0%, transparent 55%);
    border-radius: 14px;
    pointer-events: none;
}
.ha-wgt-loc {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 8.5px; color: rgba(255,255,255,0.7); font-weight: 500; margin-bottom: 1px;
}
.ha-wgt-tmp { font-size: 30px; font-weight: 200; color: #fff; line-height: 1; letter-spacing: -0.03em; }
.ha-wgt-cnd { font-size: 7px; color: rgba(255,255,255,0.5); margin-top: 1px; }
/* App icons */
.ha-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px 9px;
    flex-shrink: 0;
    position: relative; z-index: 2;
}
.ha-ic {
    aspect-ratio: 1;
    border-radius: 7px;
    background: var(--ci, var(--accent-bright));
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
/* Dock */
.ha-dock {
    margin: auto 8px 8px;
    background: rgba(255,255,255,0.10);
    border-radius: 16px;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    position: relative; z-index: 2;
}
/* Home bar */
.ha-bar {
    width: 42px; height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin: 3px auto 7px;
    flex-shrink: 0;
    position: relative; z-index: 2;
}
/* Hardware side buttons */
.ha-sbtn {
    position: absolute;
    width: 3px;
    background: #2a2a2e;
    border-radius: 2px;
    border: 0.5px solid rgba(255,255,255,0.07);
    z-index: 25;
}
.ha-sbtn-mute { left: -2px; top: 72px; height: 24px; }
.ha-sbtn-v1   { left: -2px; top: 110px; height: 34px; }
.ha-sbtn-v2   { left: -2px; top: 152px; height: 34px; }
.ha-sbtn-pwr  { right: -2px; top: 110px; height: 46px; }

/* Floating notification */
.ha-notif {
    position: absolute;
    right: -4px; top: 6px;
    width: 188px;
    background: rgba(28,28,30,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 16px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 36px rgba(0,0,0,0.45), 0 0 0 0.5px rgba(255,255,255,0.04) inset;
    z-index: 30;
    animation: ha-float-c 3.9s ease-in-out infinite alternate;
}
.ha-notif-ico {
    width: 30px; height: 30px;
    background: linear-gradient(145deg, #1a8ef5 0%, #0360cc 100%);
    border-radius: 8px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 10px rgba(var(--accent-rgb, 0,113,227),0.4);
}
.ha-notif-txt { flex: 1; min-width: 0; }
.ha-notif-app { font-size: 7.5px; font-weight: 700; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 1.5px; }
.ha-notif-msg { font-size: 10px; font-weight: 500; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ha-notif-tm  { font-size: 8px; color: rgba(255,255,255,0.3); align-self: flex-start; margin-top: 1px; flex-shrink: 0; }

/* Chip badge */
.ha-chip {
    position: absolute;
    left: 12px; bottom: 28px;
    background: rgba(48,209,88,0.10);
    border: 1px solid rgba(48,209,88,0.24);
    border-radius: 100px;
    padding: 5px 12px;
    font-size: 10px;
    font-weight: 700;
    color: #30D158;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 25;
    animation: ha-float-c 4.3s ease-in-out infinite alternate;
    animation-delay: -1.2s;
}
.ha-chip-dot {
    width: 6px; height: 6px;
    background: #30D158;
    border-radius: 50%;
    box-shadow: 0 0 7px rgba(48,209,88,0.85);
    animation: ha-blink 1.9s ease-in-out infinite;
}
@keyframes ha-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}

/* Float keyframes */
@keyframes ha-float-a {
    from { transform: translateY(0px) rotate(-0.5deg); }
    to   { transform: translateY(-9px) rotate(0.5deg); }
}
@keyframes ha-float-b {
    from { transform: translateY(0px); }
    to   { transform: translateY(-13px); }
}
@keyframes ha-float-c {
    from { transform: translateY(0px); }
    to   { transform: translateY(-7px); }
}

/* Responsive — hide art, revert to centred stack below 960 px */
@media (max-width: 960px) {
    .hero-art    { display: none; }
    .hero--split { flex-direction: column; text-align: center; gap: 0; padding: 40px 0 28px; }
    .hero--split .hero-actions  { justify-content: center; }
    .hero--split .hero-stats    { justify-content: center; }
    .hero--split .hero-subtitle { margin: 0 auto 32px; }

    /* Subtitle readable over any photo on mobile */
    .hero--split.hero--bg-image .hero-subtitle {
        display: inline-block;
        background: rgba(0,0,0,0.45);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border-radius: var(--r-md, 10px);
        padding: 8px 14px;
        color: rgba(255,255,255,0.92);
    }
}
/* ─────────────────────────────────────────────────────────────────── */

/* ── Hero: Centered ─────────────────────────────────────────────────
   Section 24: Centered hero (no art, full-width, frosted stats row)
   ─────────────────────────────────────────────────────────────────── */
.hero--centered {
    text-align: center;
    padding: 64px 0 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero--centered .hero-subtitle { margin: 0 auto 32px; }
.hero--centered .hero-actions  { justify-content: center; margin-bottom: 44px; }
.hero--centered .hero-stats {
    justify-content: center;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 22px clamp(22px, 4vw, 52px);
    border-radius: var(--r-xl);
    border: 1px solid var(--border-strong);
    box-shadow: 0 4px 28px rgba(0,0,0,0.08);
    gap: clamp(16px, 3vw, 44px);
    flex-wrap: wrap;
}
.hero--centered .hero-stat { align-items: center; }

/* ── Hero: Minimal ──────────────────────────────────────────────────
   Section 25: Very compact hero with soft top glow
   ─────────────────────────────────────────────────────────────────── */
.hero--minimal {
    text-align: center;
    padding: 48px 0 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}
.hero--minimal::before {
    content: '';
    position: absolute;
    top: -40px; left: 50%;
    transform: translateX(-50%);
    width: 480px; height: 220px;
    background: radial-gradient(ellipse, rgba(0,113,227,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero--minimal .hero-title    { margin: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); position: relative; z-index: 1; }
.hero--minimal .hero-subtitle { max-width: 600px; margin: 0; position: relative; z-index: 1; }
.hero--minimal .hero-actions  { justify-content: center; margin: 4px 0 0; position: relative; z-index: 1; }

/* ── Hero: Gradient ─────────────────────────────────────────────────
   Section 26: Full-bleed dark mesh gradient with animated glow blobs
   ─────────────────────────────────────────────────────────────────── */
.hero--gradient {
    position: relative;
    text-align: center;
    padding: 80px 32px 64px;
    margin: -4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border-radius: var(--r-xl);
    background: linear-gradient(145deg, #05080f 0%, #0a1428 45%, #0e0520 100%);
    border: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 32px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset, 0 32px 80px rgba(0,0,0,0.35);
}
.hg-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(72px);
}
.hg-blob-1 {
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(0,113,227,0.28) 0%, transparent 65%);
    top: -200px; left: 50%; transform: translateX(-50%);
    animation: hg-pulse 7s ease-in-out infinite alternate;
}
.hg-blob-2 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(191,90,242,0.22) 0%, transparent 65%);
    bottom: -130px; right: -50px;
    animation: hg-pulse 9s ease-in-out infinite alternate-reverse;
}
.hg-blob-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(48,209,88,0.14) 0%, transparent 65%);
    bottom: -80px; left: -30px;
    animation: hg-pulse 8s ease-in-out infinite alternate;
    animation-delay: -3s;
}
.hg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}
@keyframes hg-pulse {
    from { opacity: 0.7; transform: scale(1); }
    to   { opacity: 1;   transform: scale(1.18); }
}
.hero--gradient .hero-eyebrow {
    position: relative; z-index: 2;
    background: rgba(0,113,227,0.15);
    border-color: rgba(41,151,255,0.3);
    color: #2997ff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.hero--gradient .hero-title {
    position: relative; z-index: 2;
    font-size: clamp(2.5rem, 5.5vw, 4.4rem);
    background: linear-gradient(135deg, #ffffff 20%, rgba(255,255,255,0.58) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    max-width: 800px;
    margin-bottom: 20px;
}
.hg-accent-word {
    background: linear-gradient(125deg, #2997ff 0%, #bf5af2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero--gradient .hero-subtitle {
    position: relative; z-index: 2;
    color: rgba(255,255,255,0.46);
    margin-bottom: 36px;
}
.hero--gradient .hero-actions {
    position: relative; z-index: 2;
    justify-content: center;
    margin-bottom: 48px;
}
.hero--gradient .btn-download {
    background: linear-gradient(135deg, #0077ed 0%, #0040a0 100%);
    box-shadow: 0 6px 28px rgba(0,113,227,0.5), 0 2px 8px rgba(0,0,0,0.3);
    transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.hero--gradient .btn-download:hover {
    box-shadow: 0 10px 36px rgba(0,113,227,0.65), 0 2px 8px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}
.hero--gradient .hero-stats {
    position: relative; z-index: 2;
    justify-content: center;
    gap: 0;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 100px;
    padding: 18px clamp(24px, 5vw, 56px);
    flex-wrap: wrap;
    row-gap: 12px;
}
.hero--gradient .hero-stat { padding: 0 clamp(16px, 3vw, 36px); }
.hero--gradient .hero-stat + .hero-stat { border-left: 1px solid rgba(255,255,255,0.09); }
.hero--gradient .hero-stat-value { color: #fff; }
.hero--gradient .hero-stat-label { color: rgba(255,255,255,0.32); }
/* Light theme override for gradient hero */
.theme-light .hero--gradient {
    background: linear-gradient(145deg, #eef4ff 0%, #f0e8ff 50%, #e8f4ff 100%);
    border-color: rgba(0,0,0,0.06);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.02) inset, 0 12px 40px rgba(0,0,0,0.06);
}
.theme-light .hg-blob-1 { background: radial-gradient(circle, rgba(0,113,227,0.18) 0%, transparent 65%); }
.theme-light .hg-blob-2 { background: radial-gradient(circle, rgba(191,90,242,0.14) 0%, transparent 65%); }
.theme-light .hg-blob-3 { background: radial-gradient(circle, rgba(48,209,88,0.10) 0%, transparent 65%); }
.theme-light .hg-grid {
    background-image:
        linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}
.theme-light .hero--gradient .hero-title {
    background: linear-gradient(135deg, #1d1d1f 20%, rgba(29,29,31,0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.theme-light .hero--gradient .hero-subtitle { color: rgba(29,29,31,0.52); }
.theme-light .hero--gradient .hero-stats {
    background: rgba(255,255,255,0.6);
    border-color: rgba(0,0,0,0.08);
}
.theme-light .hero--gradient .hero-stat + .hero-stat { border-left-color: rgba(0,0,0,0.07); }
.theme-light .hero--gradient .hero-stat-value { color: var(--accent); }
.theme-light .hero--gradient .hero-stat-label { color: rgba(29,29,31,0.45); }

/* ── Hero: Spotlight ────────────────────────────────────────────────
   Section 27: Dramatic top-beam spotlight with category pills
   ─────────────────────────────────────────────────────────────────── */
.hero--spotlight {
    position: relative;
    text-align: center;
    padding: 70px 0 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
/* Triangular cone beam from top */
.hero--spotlight::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 220px 580px 220px;
    border-color: transparent transparent rgba(0,113,227,0.055) transparent;
    pointer-events: none;
    z-index: 0;
}
/* Glowing horizontal top line */
.hero--spotlight::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 200px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
    box-shadow: 0 0 50px 14px rgba(0,113,227,0.42);
    pointer-events: none;
    z-index: 1;
}
.hero--spotlight .hero-eyebrow,
.hero--spotlight .hero-title,
.hero--spotlight .hero-subtitle,
.hero--spotlight .sl-category-row,
.hero--spotlight .hero-actions,
.hero--spotlight .hero-stats { position: relative; z-index: 2; }
.hero--spotlight .hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    letter-spacing: -0.04em;
}
.hero--spotlight .hero-subtitle { margin-bottom: 28px; }
.hero--spotlight .hero-actions  { justify-content: center; margin-bottom: 40px; }
.hero--spotlight .hero-stats    { justify-content: center; }
/* Category pills */
.sl-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 36px;
}
.sl-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 100px;
    padding: 5px 14px 5px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.sl-cat-pill:hover {
    border-color: var(--border-accent);
    color: var(--accent-bright);
    background: var(--accent-light);
}
.sl-cat-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
    flex-shrink: 0;
}

/* Responsive tweaks for new hero variants */
@media (max-width: 640px) {
    .hero--gradient {
        padding: 56px 20px 48px;
        border-radius: var(--r-lg);
        margin: -1rem;
    }
    .hero--gradient .hero-stats {
        border-radius: var(--r-xl);
        padding: 16px 20px;
        flex-direction: column;
        align-items: center;
    }
    .hero--gradient .hero-stat { padding: 8px 0 0; }
    .hero--gradient .hero-stat + .hero-stat {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.08);
        padding-top: 12px;
    }
    .theme-light .hero--gradient .hero-stat + .hero-stat { border-top-color: rgba(0,0,0,0.07); }
    .sl-category-row { gap: 6px; }
    .hero--spotlight::before { border-width: 0 120px 420px 120px; }
}
/* ─────────────────────────────────────────────────────────────────── */

/* Stats strip */

/* ── iTunes page ───────────────────────────────────────────── */
.itunes-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
}
.itunes-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 22px;
    font-size: .9rem;
    font-weight: 600;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .15s, border-color .15s;
    margin-bottom: -1px;
}
.itunes-tab--active {
    border-bottom-color: var(--accent, #007AFF);
    color: var(--accent, #007AFF);
}
.itunes-tab-count {
    background: var(--bg-inset);
    color: var(--text-secondary);
    font-size: .68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    transition: background .15s, color .15s;
}
.itunes-tab-count--active {
    background: var(--accent, #007AFF);
    color: #fff;
}

/* Cards layout */
.itunes-cards-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.itunes-cards-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .93rem;
    font-weight: 600;
    margin: 0;
}
.itunes-cards-count {
    font-size: .8rem;
    color: var(--text-tertiary);
}
.itunes-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.itunes-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.itunes-card--latest {
    border-color: var(--accent, #007AFF);
}
.itunes-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,122,255,.1);
    color: var(--accent, #007AFF);
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid rgba(0,122,255,.2);
}
.itunes-card-ver {
    font-size: 1.05rem;
    font-weight: 700;
    padding-right: 52px;
}
.itunes-card-date {
    font-size: .78rem;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}
.itunes-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
}
.itunes-card-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .8rem;
    padding: 5px 13px;
    background: var(--bg-inset);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    text-decoration: none;
    transition: background .15s;
}
.itunes-card-btn-ghost:hover { background: var(--bg-elevated); }

/* Compact layout */
.itunes-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.itunes-compact-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-primary);
}
.itunes-compact-count {
    font-size: .78rem;
    color: var(--text-tertiary);
}
.itunes-compact-list {
    margin-bottom: 20px;
}
.itunes-compact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border-light, var(--border));
    flex-wrap: wrap;
}
.itunes-compact-ver {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .88rem;
    font-weight: 600;
    flex: 1;
    min-width: 100px;
}
.itunes-compact-badge {
    background: rgba(0,122,255,.1);
    color: var(--accent, #007AFF);
    font-size: .62rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    border: 1px solid rgba(0,122,255,.18);
}
.itunes-compact-date {
    font-size: .78rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}
.itunes-compact-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}
.itunes-compact-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
    padding: 4px 11px;
    background: var(--accent, #007AFF);
    color: #fff;
    border-radius: var(--r-md, 6px);
    text-decoration: none;
    transition: opacity .15s;
}
.itunes-compact-link:hover { opacity: .88; }
.itunes-compact-link--ghost {
    background: var(--bg-inset);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.itunes-compact-link--ghost:hover { background: var(--bg-elevated); opacity: 1; }

/* ── Explore Strip styles ──────────────────────────────────── */

/* Pills */
.explore-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.explore-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 16px 7px 11px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color .15s, background .15s, transform .15s;
    white-space: nowrap;
}
.explore-pill:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.explore-pill-icon {
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}
.explore-pill-icon svg { width: 14px; height: 14px; }

/* List */
.explore-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--bg-card);
}
.explore-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-primary);
    transition: background .12s;
}
.explore-list-row:last-child { border-bottom: none; }
.explore-list-row:hover { background: var(--bg-elevated); }
.explore-list-icon {
    width: 32px; height: 32px;
    flex-shrink: 0;
    background: var(--accent-light);
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
}
.explore-list-icon svg { width: 14px; height: 14px; }
.explore-list-label {
    font-size: 0.875rem;
    font-weight: 600;
    flex: 1;
}
.explore-list-sub {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}
.explore-list-arrow {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* Icons only */
.explore-icons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.explore-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 64px;
    padding: 10px 6px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 600;
    text-align: center;
    transition: border-color .15s, background .15s, color .15s;
}
.explore-icon-btn svg {
    width: 20px; height: 20px;
    color: var(--accent);
    stroke-width: 1.75;
}
.explore-icon-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--text-primary);
}
.explore-icon-label {
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 56px;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 40px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 20px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-light), transparent 60%);
    opacity: 0;
    transition: opacity .2s var(--ease);
    pointer-events: none;
}
.stat-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-light);
    transform: translateY(-3px);
    color: var(--text-primary);
}
.stat-card:hover::after { opacity: 1; }
.stat-card-icon {
    width: 48px; height: 48px;
    background: var(--accent-light);
    border-radius: var(--r-lg);
    display: flex; align-items: center; justify-content: center;
    transition: background .2s var(--ease), transform .2s var(--ease-spring);
}
.stat-card:hover .stat-card-icon { background: var(--accent); transform: scale(1.1); }
.stat-card-icon svg { width: 22px; height: 22px; color: var(--accent-bright); transition: color .2s; }
.stat-card:hover .stat-card-icon svg { color: #fff; }
.stat-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-value { font-size: 0.9375rem; font-weight: 600; color: var(--text-primary); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-label { font-size: 0.72rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }

/* Ad slots */
.ad-slot {
    text-align: center;
    overflow: hidden;
    max-width: 90vw;
    margin: 2px auto;
    line-height: 0; 
}
.ad-slot:empty { display: none; }

/* ── Restore Instructions ──────────────────────────────────── */
.restore-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 8px;
}

.restore-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.restore-card-title svg { flex-shrink: 0; color: var(--accent-bright); }

.restore-steps {
    list-style: decimal;
    padding-left: 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
}
.restore-steps strong { color: var(--text-primary); font-weight: 600; }
.restore-steps code {
    font-size: 0.8em;
    padding: 1px 5px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
}
.restore-steps kbd {
    display: inline-block;
    padding: 1px 7px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 5px;
    font-size: 0.76rem;
    font-family: ui-monospace, 'SF Mono', monospace;
    color: var(--text-primary);
    line-height: 1.6;
}
.restore-alert { margin-top: 14px; }

.restore-dfu-intro {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 14px;
}
.restore-dfu-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.restore-dfu-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px 16px;
}
.restore-dfu-panel-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.restore-dfu-steps {
    list-style: decimal;
    padding-left: 16px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.55;
}
.restore-dfu-steps strong { color: var(--text-primary); font-weight: 600; }

/* SHSH Blobs */
.shsh-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 16px;
}
.shsh-tool-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.shsh-tool-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.shsh-tool-hd svg { color: var(--accent-bright); flex-shrink: 0; }
.shsh-tool-hd strong { font-size: 0.875rem; }
.shsh-tool-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}
.shsh-cmd-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 9px 12px;
    margin-top: 10px;
    overflow: hidden;
}
.shsh-cmd {
    flex: 1;
    font-size: 0.76rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    word-break: break-all;
    white-space: pre-wrap;
    background: none;
    border: none;
    padding: 0;
}
.shsh-tool-note {
    font-size: 0.76rem;
    color: var(--text-tertiary);
    margin: 6px 0 0;
    line-height: 1.5;
}
.shsh-tool-note code {
    font-size: 0.9em;
    padding: 1px 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
}
@media (max-width: 640px) {
    .shsh-tools-grid { grid-template-columns: 1fr; }
}

/* SHSH save-now CTA banner */
.shsh-cta-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--accent-light) 0%, transparent 100%),
                var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-left: 3px solid var(--accent-bright);
    border-radius: var(--r-lg);
}
.shsh-cta-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--accent-light);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-bright);
}
.shsh-cta-body {
    flex: 1;
    min-width: 0;
}
.shsh-cta-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}
.shsh-cta-text {
    font-size: 0.845rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}
.shsh-cta-text code {
    font-size: 0.88em;
    font-family: var(--font-mono);
    padding: 1px 5px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
}
.shsh-cta-badge { flex-shrink: 0; }
@media (max-width: 600px) {
    .shsh-cta-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
    }
    .shsh-cta-icon { width: 32px; height: 32px; }
    .shsh-cta-icon svg { width: 16px; height: 16px; }
    .shsh-cta-badge { align-self: flex-start; }
}


/* Featured grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.featured-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    backdrop-filter: blur(12px);
    transition: all .2s var(--ease);
    box-shadow: var(--shadow-sm);
}
.featured-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text-primary);
}
.featured-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.featured-card-info { flex: 1; min-width: 0; }
.featured-card-name { font-size: 0.875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.featured-card-version { font-size: 0.8rem; color: var(--text-tertiary); font-family: var(--font-mono); }

/* ----------------------------------------------------------
   12. Page Header
   ---------------------------------------------------------- */
.page-header {
    margin-bottom: 28px;
}
.page-header-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--accent-bright); }
.breadcrumb-sep { opacity: 0.4; }

/* ----------------------------------------------------------
   13. Tabs (IPSW / OTA)
   ---------------------------------------------------------- */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    gap: 2px;
    margin-bottom: 24px;
}
.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
    color: var(--accent-bright);
    border-bottom-color: var(--accent);
    font-weight: 600;
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn .25s var(--ease); }

/* ----------------------------------------------------------
   14. Forms
   ---------------------------------------------------------- */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-label small { font-size: 0.75rem; color: var(--text-tertiary); font-weight: 400; margin-left: 6px; }
.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    padding: 9px 12px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
}
.form-control:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.form-control::placeholder { color: var(--text-tertiary); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.form-check { display: flex; align-items: center; gap: 10px; }
.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    border-radius: var(--r-xs);
}

/* ----------------------------------------------------------
   15. Alerts / Toast
   ---------------------------------------------------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    border-radius: var(--r-md);
    font-size: 0.875rem;
    margin-bottom: 16px;
    border: 1px solid;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--green-bg);  border-color: rgba(48,209,88,0.3);  color: var(--green); }
.alert-error   { background: var(--red-bg);    border-color: rgba(255,69,58,0.3);  color: var(--red); }
.alert-warning { background: var(--yellow-bg); border-color: rgba(255,214,10,0.3); color: var(--yellow); }
.alert-info    { background: var(--blue-bg);   border-color: rgba(100,210,255,0.3);color: var(--blue); }

/* Toast notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-overlay);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    pointer-events: all;
    animation: toastIn .3s var(--ease-spring) forwards;
    min-width: 240px;
    max-width: 360px;
}
.toast.hide { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn  { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }
@keyframes toastOut { from { opacity:1; transform: translateX(0); }    to { opacity:0; transform: translateX(20px); } }

/* ----------------------------------------------------------
   16. Release Notes Panel
   ---------------------------------------------------------- */
.release-notes {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px 24px;
    margin-top: 24px;
}
.release-notes h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 14px;
}
.release-notes-body p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.release-notes-body ul, .release-notes-body ol {
    padding-left: 20px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.release-notes-body li { margin-bottom: 4px; }
.release-notes-body a { color: var(--accent-bright); }

/* ----------------------------------------------------------
   17. Loading Spinner
   ---------------------------------------------------------- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-strong);
    border-top-color: var(--accent-bright);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 64px 32px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ----------------------------------------------------------
   18. Empty State
   ---------------------------------------------------------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 64px 32px;
}
.empty-state-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-elevated);
    border-radius: var(--r-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 4px;
}
.empty-state h3 { font-size: 1rem; font-weight: 600; }
.empty-state p  { font-size: 0.875rem; color: var(--text-tertiary); max-width: 320px; }

/* ----------------------------------------------------------
   19. Mobile Hamburger
   ---------------------------------------------------------- */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    cursor: pointer;
    color: var(--text-secondary);
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    backdrop-filter: blur(4px);
}

/* ----------------------------------------------------------
   20. Scrollbar
   ---------------------------------------------------------- */
::-webkit-scrollbar         { width: 6px; height: 6px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ----------------------------------------------------------
   Blog & Static Pages
   ---------------------------------------------------------- */
.page-content-wrap {
    padding: 36px 28px 60px;
    max-width: var(--content-max);
    margin: 0 auto;
    width: 100%;
}
.page-content-inner {
    max-width: 740px;
}
.page-content-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.25;
}
.page-content-updated {
    font-size: 0.825rem;
    color: var(--text-tertiary);
    margin: 0 0 28px;
}
.page-content-body {
    font-size: 0.9625rem;
    line-height: 1.75;
    color: var(--text-secondary);
}
.page-content-body h2 { font-size: 1.25rem; font-weight: 700; margin: 1.5em 0 .5em; color: var(--text-primary); }
.page-content-body h3 { font-size: 1.05rem; font-weight: 600; margin: 1.25em 0 .4em; color: var(--text-primary); }
.page-content-body p  { margin: 0 0 1em; }
.page-content-body a  { color: var(--accent); text-decoration: underline; }
.page-content-body ul,
.page-content-body ol { padding-left: 1.5em; margin: 0 0 1em; }
.page-content-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 10px 18px;
    margin: 1em 0;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.page-content-body img { max-width: 100%; border-radius: var(--r-md); margin: .5em 0; }
.page-content-body hr  { border: none; border-top: 1px solid var(--border-strong); margin: 2em 0; }

/* Blog Index */
.blog-index-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.blog-index-header h1 { font-size: 1.75rem; font-weight: 800; margin: 0 0 6px; }
.blog-index-header p  { color: var(--text-tertiary); font-size: 0.9rem; margin: 0; }

/* Blog index search bar */
.blog-index-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.blog-index-search-icon {
    position: absolute;
    left: 11px;
    width: 15px;
    height: 15px;
    opacity: 0.4;
    pointer-events: none;
    stroke: currentColor;
}
#blog-index-search {
    width: 220px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    padding: 8px 32px 8px 34px;
    outline: none;
    transition: border-color .2s, box-shadow .2s, width .25s var(--ease);
}
#blog-index-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
    width: 280px;
}
#blog-index-search::placeholder { color: var(--text-tertiary); }
#blog-index-search-clear {
    position: absolute;
    right: 9px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    transition: color .15s;
}
#blog-index-search-clear:hover { color: var(--text-primary); }
#blog-index-search-clear svg { width: 13px; height: 13px; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--bg-elevated);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.blog-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}
.blog-card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-base);
    flex-shrink: 0;
}
.blog-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.blog-card-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-card-cover-empty svg {
    width: 36px;
    height: 36px;
    opacity: 0.25;
}
.blog-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.blog-card-date { font-size: 0.78rem; color: var(--text-tertiary); margin: 0; }
.blog-card-title { font-size: 1rem; font-weight: 700; margin: 0; color: var(--text-primary); line-height: 1.35; }
.blog-card-excerpt { font-size: 0.875rem; color: var(--text-secondary); margin: 0; line-height: 1.5; flex: 1; }
.blog-card-more { font-size: 0.82rem; color: var(--accent); margin-top: auto; }

/* Blog Single Post */
.blog-post-cover {
    width: 100%;
    max-height: 340px;
    overflow: hidden;
    border-radius: var(--r-xl);
    margin-bottom: 24px;
}
.blog-post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.blog-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    min-height: 32px;
}
.blog-post-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}
.blog-post-meta-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.blog-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color .12s;
    white-space: nowrap;
}
.blog-back:hover { color: var(--text-primary); }
.blog-meta-sep {
    color: var(--text-tertiary);
    font-size: 0.82rem;
    opacity: .5;
    user-select: none;
}
.blog-meta-date {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}
.blog-post-excerpt {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0 0 24px;
    line-height: 1.6;
    font-style: italic;
}
.blog-post-body { /* extends .page-content-body */ }
.blog-post-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Blog Single Post — two-column layout */
.blog-show-wrap { padding-top: 28px; }
.blog-show-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 36px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}
.blog-show-main { min-width: 0; }
.blog-show-title {
    font-size: clamp(1.5rem, 3.5vw, 2.1rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0 0 16px;
}
.blog-show-sidebar {
    position: sticky;
    top: calc(var(--toolbar-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Sidebar widget card */
.blog-sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 18px 20px;
}
.blog-sidebar-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin: 0 0 14px;
}

/* Sidebar search input */
.blog-sidebar-search-wrap { position: relative; }
.blog-sidebar-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    opacity: 0.4;
    pointer-events: none;
    stroke: currentColor;
}
#blog-search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    padding: 8px 12px 8px 32px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
#blog-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
#blog-search-input::placeholder { color: var(--text-tertiary); }

/* Search results dropdown */
.blog-search-results {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.blog-search-result {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    text-decoration: none;
    color: inherit;
    transition: background .12s;
}
.blog-search-result:hover { background: var(--bg-hover); }
.blog-search-result-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}
.blog-search-result-date {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}
.blog-search-empty {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    padding: 4px 10px;
    text-align: center;
    margin: 0;
}

/* Recent posts list */
.blog-recent-posts {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.blog-recent-post {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: opacity .12s;
}
.blog-recent-post:hover { opacity: .72; }
.blog-recent-post img {
    width: 54px;
    height: 42px;
    object-fit: cover;
    border-radius: var(--r-sm);
    flex-shrink: 0;
    background: var(--bg-elevated);
}
.blog-recent-post-placeholder {
    width: 54px;
    height: 42px;
    border-radius: var(--r-sm);
    background: var(--bg-elevated);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-recent-post-placeholder svg {
    width: 18px;
    height: 18px;
    opacity: 0.25;
}
.blog-recent-post-info { min-width: 0; }
.blog-recent-title {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0 0 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-recent-date {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* Collapse sidebar below 920px */
@media (max-width: 920px) {
    .blog-show-layout {
        grid-template-columns: 1fr;
    }
    .blog-show-sidebar { position: static; }
}

/* ── Suggested posts (below article) ── */
.blog-suggested-wrap {
    max-width: 1100px;
    margin: 48px auto 0;
    padding: 0 0 60px;
}
.blog-suggested-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin: 0 0 20px;
}
.blog-suggested-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.blog-suggested-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--bg-card);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.blog-suggested-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.blog-suggested-cover {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-elevated);
}
.blog-suggested-cover img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.blog-suggested-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-suggested-cover-empty svg { width: 32px; height: 32px; opacity: .22; }
.blog-suggested-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 5px;
}
.blog-suggested-date { font-size: 0.75rem; color: var(--text-tertiary); margin: 0; }
.blog-suggested-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0;
}
.blog-suggested-excerpt {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .blog-suggested-grid { grid-template-columns: 1fr; gap: 14px; }
    .blog-suggested-wrap { padding-bottom: 80px; }
}
@media (min-width: 769px) and (max-width: 920px) {
    .blog-suggested-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----------------------------------------------------------
   Blog — Category / Tag filter bar
   ---------------------------------------------------------- */
.blog-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.blog-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.blog-filter-pill:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.blog-filter-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.blog-filter-count {
    font-size: 0.75rem;
    opacity: .75;
}

/* ----------------------------------------------------------
   Blog — Post category badges and tag chips
   ---------------------------------------------------------- */
.blog-post-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 0;
}
.blog-cat-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(10, 132, 255, 0.12);
    color: var(--accent);
    text-decoration: none;
    transition: background .15s;
}
.blog-cat-badge:hover { background: rgba(10, 132, 255, 0.22); }

.blog-tag-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
}
.blog-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 0.78rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.blog-tag-chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ----------------------------------------------------------
   Blog — Comments section
   ---------------------------------------------------------- */
.blog-comments {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--border);
}
.blog-comments-heading {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.blog-comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.blog-comments-empty {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin: 0 0 32px;
}
.blog-comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 36px;
}
.blog-comment {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 14px;
}
.blog-comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.blog-comment-content { min-width: 0; }
.blog-comment-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}
.blog-comment-author { font-size: 0.9rem; }
.blog-comment-time {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}
.blog-comment-body {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
    word-break: break-word;
}

/* Comment form */
.blog-comment-form-wrap {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}
.blog-comment-form-heading {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 18px;
}
.blog-comment-toast {
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-size: 0.875rem;
    margin-bottom: 14px;
}
.blog-comment-toast.ok  { background: rgba(48,209,88,.12); color: #30d158; border: 1px solid rgba(48,209,88,.25); }
.blog-comment-toast.err { background: rgba(255,69,58,.1);  color: #ff453a; border: 1px solid rgba(255,69,58,.2); }
.blog-comment-form { display: flex; flex-direction: column; gap: 14px; }
.blog-comment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 560px) {
    .blog-comment-form-row { grid-template-columns: 1fr; }
}
.blog-comment-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.blog-comment-form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.blog-comment-form-group label .optional {
    font-weight: 400;
    color: var(--text-tertiary);
}
.blog-comment-form-group input,
.blog-comment-form-group textarea {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 9px 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color .15s;
    resize: vertical;
}
.blog-comment-form-group input:focus,
.blog-comment-form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.blog-comment-submit {
    align-self: flex-start;
    padding: 9px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.blog-comment-submit:hover  { opacity: .88; }
.blog-comment-submit:disabled { opacity: .5; cursor: not-allowed; }
.blog-comment-captcha { max-width: 220px; }
.blog-comment-captcha input { width: 100%; font-variant-numeric: tabular-nums; }



/* ── Contact page ──────────────────────────────────────────── */
.contact-wrap { max-width: 900px; margin: 0 auto; }
.contact-header { margin-bottom: 28px; }
.contact-subtitle { color: var(--text-secondary); margin-top: 6px; font-size: .95rem; }

.contact-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--r-md);
    font-size: .875rem;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.contact-alert--success {
    background: rgba(52,199,89,.12);
    border-color: rgba(52,199,89,.3);
    color: #34c759;
}
.contact-alert--error {
    background: rgba(255,69,58,.1);
    border-color: rgba(255,69,58,.25);
    color: var(--red, #ff453a);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 28px;
    align-items: start;
}
@media (max-width: 700px) {
    .contact-layout { grid-template-columns: 1fr; }
}

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 560px) { .contact-form-row { grid-template-columns: 1fr; } }

.contact-form-group { display: flex; flex-direction: column; gap: 5px; }
.contact-label { font-size: .8125rem; font-weight: 600; color: var(--text-primary); }
.contact-optional { font-weight: 400; color: var(--text-tertiary); font-size: .75rem; }
.contact-input {
    background: var(--bg-input, var(--panel));
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 9px 12px;
    font-size: .875rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
    box-sizing: border-box;
}
.contact-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,122,255,.12);
}
.contact-textarea { resize: vertical; min-height: 140px; }
.contact-captcha-group { max-width: 220px; }
.contact-captcha-input { font-variant-numeric: tabular-nums; }

.contact-submit {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.contact-submit:hover   { opacity: .88; }
.contact-submit:disabled { opacity: .5; cursor: not-allowed; }

.contact-aside { display: flex; flex-direction: column; gap: 14px; }
.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 18px;
}
.contact-info-icon {
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    background: rgba(0,122,255,.1);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
}
.contact-info-icon--green { background: rgba(52,199,89,.12); color: #34c759; }
.contact-info-card h3 { font-size: .875rem; font-weight: 600; margin: 0 0 6px; }
.contact-info-card p  { font-size: .8rem; color: var(--text-secondary); margin: 0; line-height: 1.55; }

/* ── Pagination ────────────────────────────────────────────── */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}
.page-btn {
    padding: 8px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background .12s, color .12s;
}
.page-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.page-info { font-size: 0.875rem; color: var(--text-tertiary); }

/* ----------------------------------------------------------
   21. Responsive
   ---------------------------------------------------------- */

/* ── Tablet (≤ 1024px) — sidebar still visible ──────────── */
@media (max-width: 1024px) {
    /* calc(98vw - sidebar-w) still applies here — just tighten the gutters */
    .page-content        { padding-left: 20px; padding-right: 20px; }
    .device-grid{ grid-template-columns: repeat(3, 1fr); }
    .featured-grid       { grid-template-columns: repeat(3, 1fr); }
    .fw-meta-grid        { grid-template-columns: repeat(2, 1fr); }
    .stats-strip         { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ── Mobile (≤ 768px) ────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --sidebar-w: 280px;
        --toolbar-h: 48px;
    }

    /* Sidebar slides in over content */
    .sidebar {
        transform: translateX(-100%);
        z-index: 200;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-pop);
    }
    .sidebar-overlay.show { display: block; }

    /* Full-width main */
    .main-content { margin-left: 0; }
    .mobile-menu-toggle { display: flex; }

    /* Sidebar hidden — full viewport available; switch max-width back to full */
    .page-content { padding: 20px 16px 48px; max-width: 98vw; }

    /* ── Hero ── */
    .hero { padding: 32px 0 24px; }
    .hero-title {
        -webkit-text-fill-color: var(--text-primary);
        background: none;
        font-size: clamp(1.6rem, 7vw, 2.4rem);
    }
    .hero-subtitle { font-size: 0.95rem; padding: 0.2rem }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-stats { gap: 20px; }
    .hero-stat-value { font-size: 1.5rem; }

    /* ── Stats strip / featured ── */
    .stats-strip    { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
    .featured-grid  { grid-template-columns: 1fr; gap: 12px; }
    .featured-card  { padding: 14px; }

    /* ── Device grid ── */
    .device-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
    .device-card { padding: 14px 10px 12px; }
    .device-card img { width: 60px; height: 60px; }
    .device-card-name { font-size: 0.8rem; }
    .device-card-id   { display: none; }   /* hide identifier on tiny screens */

    /* ── Segmented control ── */
    .segmented-control { border-radius: var(--r-md); padding: 4px; gap: 0; }
    .segmented-control a,
    .segmented-control button { padding: 6px 12px; font-size: 0.78rem; white-space: nowrap; }

    /* ── Firmware hero ── */
    .fw-hero-card { padding: 16px; border-radius: var(--r-lg); }
    .fw-hero { display: block; }
    .fw-hero-device { min-width: unset; }
    .fw-hero-device img { width: 72px; height: 72px; }
    .fw-hero-info { min-width: unset; width: 100%; }
    .fw-meta-grid { grid-template-columns: repeat(1, 1fr); gap: 2px; }
    .fw-meta-item { padding: 8px 10px; }
    .fw-meta-label { font-size: 0.68rem; }
    .fw-meta-value { font-size: 0.8rem; }

    /* ── Tables ── */
    .fw-table-wrap { border-radius: var(--r-md); }
    .fw-table th,
    .fw-table td { padding: 10px 12px; font-size: 0.8rem; }

    /* ── Hash rows ── */
    .hash-row { flex-wrap: wrap; gap: 6px; }
    .hash-value { white-space: normal; }

    /* ── Tabs ── */
    .tabs { overflow-x: auto; flex-wrap: nowrap; }
    .tab-btn { padding: 10px 14px; font-size: 0.85rem; white-space: nowrap; }

    /* ── Toolbar ── */
    .toolbar { padding: 0 14px; gap: 10px; }
    .toolbar-title { font-size: 0.875rem; flex: 1; max-width: 75vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* ── Blog / Pages ── */
    .page-content-wrap { padding: 24px 16px 60px; }
    .blog-index-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
    #blog-index-search { width: 100%; }
    #blog-index-search:focus { width: 100%; }
    .blog-index-search-wrap { width: 100%; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-card-cover { aspect-ratio: 16/9; }
    .blog-post-cover img { height: 220px; }
    .pagination { margin-top: 32px; gap: 10px; }

    /* ── Device show header ── */
    .page-header > div > div { flex-direction: column; align-items: flex-start; }

    /* ── Page header ── */
    .page-header-inner { flex-direction: column; }

    /* ── Spotlight ── */
    .spotlight-overlay { padding-top: 8vh; padding-left: 12px; padding-right: 12px; }
    .spotlight-box { border-radius: var(--r-lg); }

    /* ── Toast ── */
    #toast-container { bottom: 12px; right: 12px; left: 12px; }
    .toast { min-width: unset; max-width: 100%; }
}

/* ── Small mobile (≤ 480px) ─────────────────────────────── */
@media (max-width: 480px) {
    /* ── Device grid — 2 cols so cards aren't comically wide ── */
    .device-grid  { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .device-card  { padding: 12px 8px 10px; }
    .device-card img { width: 52px; height: 52px; }
    .device-card-name { font-size: 0.78rem; }

    .stats-strip  { grid-template-columns: repeat(1, 1fr); gap: 10px; }
    .featured-grid { grid-template-columns: 1fr; }

    .fw-meta-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .fw-meta-item { padding: 7px 9px; }

    .hero-stats   { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .page-content { padding: 12px 12px 40px; max-width: 98vw !important; }

    .fw-table th:nth-child(3),
    .fw-table td:nth-child(3) { display: none; }   /* hide Release Date column */

    .hash-label { min-width: 42px; font-size: 0.68rem; }
    .hash-value { font-size: 0.72rem; }

    /* ── Toolbar ── */
    .toolbar { padding: 0 10px; gap: 8px; }
    .toolbar-title { font-size: 0.8125rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    /* Icon-only search button — hide text + hotkey hint */
    #spotlight-trigger > span,
    #spotlight-trigger > kbd { display: none; }
    #spotlight-trigger { padding: 7px 8px; min-width: 32px; justify-content: center; }

    /* ── Spotlight / Search ── */
    .spotlight-overlay { padding-top: 4vh; padding-left: 8px; padding-right: 8px; }
    .spotlight-box { border-radius: var(--r-md); }
    #spotlight-input { font-size: 0.9375rem; }
    .spotlight-hint { display: none; }
    .spotlight-results { max-height: 260px; }
}

/* ----------------------------------------------------------
   23. Beta builds list (homepage widget)
   ---------------------------------------------------------- */
.beta-home-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
}
.beta-home-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background .12s;
}
.beta-home-row:last-child { border-bottom: none; }
a.beta-home-row:hover { background: var(--bg-hover, rgba(255,255,255,.04)); }
.beta-home-row-skel { pointer-events: none; }
.beta-home-date-sep {
    padding: 5px 18px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

/* Beta async skeleton device card */
.beta-dev-skel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    gap: 0;
}

/* Beta index table skeleton rows */
.beta-skel-row td { padding: 12px 14px; }

/* Beta pagination flex container */
#beta-fw-pagination,
#beta-builds-pagination,
#beta-pagination {
    display: none;
    flex-direction: row;
}

/* Apps async skeleton row */
.as-row-skel {
    pointer-events: none;
    cursor: default;
}
.as-row-skel .as-row-icon { align-items: center; justify-content: center; }
.as-row-skel .as-row-body { justify-content: center; gap: 6px; }

/* Apps pagination flex containers */
#apps-pagination,
#dev-pagination {
    display: none;
    flex-direction: row;
}

/* ----------------------------------------------------------
   22. Mobile bottom tab bar
   ---------------------------------------------------------- */
.mobile-tab-bar {
    display: none; /* desktop: hidden */
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 190;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border);
    height: 56px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: stretch;
    justify-content: space-around;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .01em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px 4px;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.mobile-tab svg {
    flex-shrink: 0;
    transition: transform .15s;
    stroke: currentColor;
}
.mobile-tab.active {
    color: var(--accent, var(--accent-bright));
}
.mobile-tab:active svg {
    transform: scale(.88);
}

@media (max-width: 768px) {
    .mobile-tab-bar { display: flex; }
    /* Give page-content extra bottom padding so content isn't hidden under the bar */
    .page-content { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 20px); }
    /* Push toast above tab bar */
    #toast-container { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* ----------------------------------------------------------
   23. Misc utilities
   ---------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}
.text-muted    { color: var(--text-tertiary); }
.text-accent   { color: var(--accent-bright); }
.text-success  { color: var(--green); }
.text-danger   { color: var(--red); }
.text-mono     { font-family: var(--font-mono); }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mt-4  { margin-top: 32px; }
.mb-1  { margin-bottom: 8px; }
.mb-2  { margin-bottom: 16px; }
.mb-3  { margin-bottom: 24px; }
.mb-4  { margin-bottom: 32px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-tertiary);
    font-weight: 600;
    margin-bottom: 14px;
}
.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

/* ============================================================
   SPECS PAGE
   ============================================================ */

/* Hero â€” reuse fw-hero-card / fw-hero, small tweaks */
.specs-hero-card { margin-bottom: 24px; }
.specs-hero { align-items: flex-start; gap: 24px; }
.specs-hero-device img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

/* Quick facts grid */
.specs-qf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.specs-qf-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--r-lg);
    padding: 12px 14px;
    transition: border-color .15s, box-shadow .15s;
}
.specs-qf-item:hover {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}
.specs-qf-icon {
    width: 34px;
    height: 34px;
    background: var(--accent-light);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent-bright);
}
.specs-qf-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.specs-qf-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.specs-qf-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* Full specs table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.specs-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    line-height: 1.5;
}
.specs-table tr:last-child td { border-bottom: none; }
.specs-table tbody tr:not(.specs-section-header):hover td {
    background: var(--bg-elevated);
}

/* Section header row */
.specs-section-header td {
    background: var(--bg-base);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 7px 16px;
}
.specs-section-hd {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.specs-section-header:first-child td { border-top: none; }
.specs-section-icon {
    flex-shrink: 0;
    opacity: 0.65;
    color: var(--accent);
}

/* Key column */
.specs-key {
    width: 36%;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}
.specs-key-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
}
.specs-key-icon {
    flex-shrink: 0;
    color: var(--text-tertiary);
    opacity: 0.8;
}

/* Value column */
.specs-val {
    color: var(--text-primary);
}

/* Price â€” currency pill badges */
.specs-price-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 0;
}
.specs-price-item {
    display: inline-flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--r-pill);
    padding: 3px 10px;
    font-size: 0.825rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -.01em;
}

@media (max-width: 600px) {
    .specs-qf-grid { grid-template-columns: repeat(1, 1fr); }
    .specs-qf-value { white-space: normal; font-size: 0.8rem; }
    .specs-qf-icon { width: 30px; height: 30px; }
    .specs-qf-item { padding: 10px 11px; gap: 9px; }
    .specs-hero { flex-direction: column; align-items: center; text-align: center; }
    .specs-hero .fw-hero-device { align-items: center; }
    .specs-key { width: 42%; white-space: normal; }
    .specs-key-wrap { gap: 5px; }
    .specs-table td { padding: 9px 12px; font-size: 0.8rem; }
}

/* ── Specs Split Layout ─────────────────────────────────────── */
.sp-split-breadcrumb { margin-bottom: 16px; }
.sp-split-layout { display: flex; flex-direction: column; }
.sp-split-aside  { order: -1; }
.sp-split-main   { order: 0; }

@media (min-width: 960px) {
    .sp-split-layout {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 0 10px;
        align-items: start;
    }
    .sp-split-main  { order: 1; }
    .sp-split-aside {
        order: 2;
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: none;
    }
    .sp-split-aside::-webkit-scrollbar { display: none; }
}
.sp-split-aside-inner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--r-xl);
    padding: 4px 7px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sp-split-device {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}
.sp-split-device img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}
.sp-split-device-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}
.sp-split-actions { display: flex; flex-direction: column; gap:1px }

.sp-split-qf-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border-color);
}
.sp-split-qf-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.7rem;
}
.sp-split-qf-row:last-child { border-bottom: none; }
.sp-split-qf-icon {
    flex-shrink: 0;
    color: var(--text-tertiary);
    position: relative;
    top: 1px;
}
.sp-split-qf-row dt {
    color: var(--text-tertiary);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 64px;
}
.sp-split-qf-row dd {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    word-break: break-word;
}
.sp-split-share {
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}
.sp-split-share .share-btn {
    width: 100%;
    justify-content: center;
}
.sp-split-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ── Specs Minimal Layout ───────────────────────────────────── */
.sp-minimal-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-bottom: 14px;
}
.sp-minimal-crumb a { color: var(--text-tertiary); text-decoration: none; }
.sp-minimal-crumb a:hover { color: var(--text-primary); }
.sp-minimal-crumb span[aria-hidden] { opacity: .4; }

.sp-minimal-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}
.sp-minimal-hero-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
}
.sp-minimal-hero-body { flex: 1; min-width: 0; }
.sp-minimal-hero-top {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 7px;
}
.sp-minimal-title {
    font-size: clamp(1.1rem, 2.8vw, 1.35rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.sp-minimal-cat {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--accent-muted, rgba(var(--accent-rgb, 99,102,241),.12));
    color: var(--accent);
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
}
.sp-minimal-hero-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.sp-minimal-action-btn {
    font-size: 0.78rem;
    padding: 3px 10px;
    height: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Quick facts scroll row */
.sp-minimal-qf-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.sp-minimal-qf-scroll::-webkit-scrollbar { display: none; }
.sp-minimal-qf-chip {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--r-md);
    padding: 5px 11px;
    min-width: 76px;
    max-width: 140px;
}
.sp-minimal-qf-icon {
    display: inline-flex;
    color: var(--accent);
    opacity: .7;
    margin-bottom: 3px;
}
.sp-minimal-qf-k {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.sp-minimal-qf-v {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-minimal-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.65;
    margin-bottom: 16px;
}

/* Specs dl sections */
.sp-minimal-specs { display: flex; flex-direction: column; }
.sp-minimal-sec { border-top: 1px solid var(--border-light); }
.sp-minimal-sec-hd {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 9px 0 5px;
}
.sp-minimal-sec-icon { color: var(--accent); opacity: .75; display: inline-flex; }
.sp-minimal-sec-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin: 0;
}
.sp-minimal-dl { margin: 0; padding: 0 0 6px; }
.sp-minimal-dl-row {
    display: grid;
    grid-template-columns: 36% 1fr;
    gap: 0 12px;
    border-bottom: 1px solid var(--border-light);
    padding: 6px 0;
}
.sp-minimal-dl-row:last-child { border-bottom: none; }
.sp-minimal-dl-row:hover { background: var(--bg-elevated); }
.sp-minimal-dl-row dt {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.5;
    padding-right: 8px;
}
.sp-minimal-dl-row dd {
    font-size: 0.8rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 560px) {
    .sp-minimal-hero { gap: 10px; }
    .sp-minimal-hero-img { width: 44px; height: 44px; }
    .sp-minimal-title { font-size: 1.05rem; }
    .sp-minimal-dl-row { grid-template-columns: 40% 1fr; }
    .sp-split-layout { gap: 0; }
    .sp-split-aside { margin-bottom: 16px; }
}


/* ============================================================
   JAILBREAKS PAGE
   ============================================================ */

.jb-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.jb-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.jb-card-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border-light);
}

.jb-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.jb-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin: 0;
}

.jb-card-platforms {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* Type badge */
.jb-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    white-space: nowrap;
    flex-shrink: 0;
}
.jb-type-untethered      { background: rgba(48,209,88,.15);  color: #30d158; }
.jb-type-semi-untethered { background: rgba(10,132,255,.15); color: #0a84ff; }
.jb-type-tethered        { background: rgba(255,69,58,.15);  color: #ff453a; }
.jb-type-semi-tethered   { background: rgba(255,159,10,.15); color: #ff9f0a; }
.jb-type-userspace       { background: rgba(191,90,242,.15); color: #bf5af2; }
.jb-type-unknown         { background: rgba(255,255,255,.08);color: var(--text-tertiary); }

/* Jailbreak table action icons */
.jb-tbl-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color .15s, background .15s;
    vertical-align: middle;
    padding: 0;
}
.jb-tbl-action-link + .jb-tbl-action-link { margin-left: 2px; }
.jb-tbl-view:hover   { color: var(--accent-bright); background: rgba(var(--accent-rgb,80,150,255),.1); }
.jb-tbl-edit:hover   { color: var(--text-primary);  background: rgba(255,255,255,.08); }
.jb-tbl-delete:hover { color: #ff453a;              background: rgba(255,69,58,.1); }

/* Versions */
.jb-card-versions {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-light);
}

.jb-versions-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-tertiary);
    margin: 0 0 8px;
}

.jb-version-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.jb-version-pill {
    display: inline-block;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--r-pill);
    padding: 2px 9px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

/* Notes */
.jb-card-notes {
    padding: 10px 18px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
    border-bottom: 1px solid var(--border-light);
}

/* Footer */
.jb-card-footer {
    padding: 12px 18px;
    margin-top: auto;
}

/* Back nav */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
}
.back-link:hover { color: var(--accent-bright); }

/* Filter bar (shared: jailbreaks index, device pages) */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.filter-search-wrap {
    position: relative;
    flex: 1;
}
.filter-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
    pointer-events: none;
}
.filter-search {
    width: 100%;
    padding: 8px 12px 8px 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: border-color .15s;
}
.filter-search:focus { border-color: var(--accent); }
.filter-search::placeholder { color: var(--text-tertiary); }
.filter-count {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
}
.filter-select {
    height: 36px;
    padding: 0 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    outline: none;
    cursor: pointer;
    transition: border-color .15s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}
.filter-select:focus { border-color: var(--accent); }
.filter-select option { background: var(--bg-surface); color: var(--text-primary); }

/* Jailbreak quick-stats bar */
.jb-stats-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

/* ============================================================
   APPS PAGE  —  Apple-inspired
   ============================================================ */

/* ── App list rows (search-results style) ─────────────────── */
.as-list { display: flex; flex-direction: column; }
.as-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: opacity .15s;
}
.as-row:last-child { border-bottom: none; }
.as-row:hover { opacity: .75; }
.as-row:hover .as-get-btn { background: var(--accent-bright); color: #fff; }

.as-row-icon { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.as-row-icon img {
    width: 64px; height: 64px;
    border-radius: 14px;
    object-fit: cover;
    display: block;
    border: 1px solid var(--border-light);
}
.as-row-icon-fallback {
    width: 64px; height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.as-row-body { flex: 1; min-width: 0; }
.as-row-name {
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: pre-line;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.as-row-dev {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.as-row-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── GET / VIEW button ────────────────────────────────────── */
.as-get-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    height: 30px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb, 0,113,227),.12);
    color: var(--accent-bright);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: .03em;
    border: none;
    flex-shrink: 0;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.as-get-btn:hover { background: var(--accent-bright); color: #fff; }

/* Large GET button used on detail / download pages */
.as-get-btn-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 30px;
    padding: 0 28px;
    border-radius: 999px;
    background: var(--accent-bright);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s, opacity .15s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.as-get-btn-lg:hover { background: #0062CC; color: #fff; }

/* ── Badges / Tags ────────────────────────────────────────── */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    white-space: nowrap;
}
.tag-source { background: var(--accent-light); color: var(--accent-bright); border-color: transparent; }
.app-badge-beta   { display: inline-flex; align-items: center; background: rgba(255,159,10,.15); color: #ff9f0a; font-size: .7rem; padding: 1px 7px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.app-badge-stable { display: inline-flex; align-items: center; background: rgba(50,215,75,.12);  color: #32d74b; font-size: .7rem; padding: 1px 7px; border-radius: 999px; font-weight: 600; white-space: nowrap; }

/* ── Detail hero header ───────────────────────────────────── */
.app-detail-hero-inner {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    position: relative;
    overflow: hidden;
}
.app-detail-hero-tint {
    position: absolute;
    inset: 0;
    opacity: .12;
    pointer-events: none;
}
.app-detail-icon {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    z-index: 1;
}
.app-detail-icon img {
    width: 120px;
    height: 120px;
    border-radius: 26px;
    object-fit: cover;
    display: block;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    border: 1px solid rgba(255,255,255,.08);
}
.app-detail-icon-fallback {
    width: 120px;
    height: 120px;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.app-detail-info { flex: 1; min-width: 0; z-index: 1; }
.app-detail-name {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -.02em;
    margin-bottom: 4px;
    line-height: 1.2;
}
.app-detail-dev  { font-size: .9rem; color: var(--accent-bright); font-weight: 500; margin-bottom: 8px; }
.app-detail-sub  { font-size: .9rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.5; }
.app-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.app-detail-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── Sections ─────────────────────────────────────────────── */
.app-detail-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px 24px;
    margin-top: 16px;
}
.app-detail-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    letter-spacing: -.01em;
}

/* ── Description collapse ─────────────────────────────────── */
.app-desc-text {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.75;
}
.app-desc-text.collapsed {
    max-height: 6.5rem;
    overflow: hidden;
}
.app-desc-more-btn {
    background: none;
    border: none;
    color: var(--accent-bright);
    font-size: .88rem;
    font-weight: 500;
    padding: 6px 0 0;
    cursor: pointer;
    display: block;
}

/* ── Information table ────────────────────────────────────── */
.app-info-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.app-info-table tr { border-bottom: 1px solid var(--border-light); }
.app-info-table tr:last-child { border-bottom: none; }
.app-info-table td:first-child {
    color: var(--text-tertiary);
    font-weight: 500;
    padding: 10px 16px 10px 0;
    width: 140px;
    white-space: nowrap;
    vertical-align: top;
}
.app-info-table td:last-child { color: var(--text-primary); padding: 10px 0; word-break: break-all; }
.app-info-icon-label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.app-info-icon-label svg { flex-shrink: 0; color: var(--text-tertiary); }

/* ── Screenshots ──────────────────────────────────────────── */
.app-screenshots-scroll {
    display: flex;
    max-width: 85vw;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.app-screenshots-scroll::-webkit-scrollbar { height: 4px; }
.app-screenshots-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.app-screenshot {
    height: 300px;
    width: auto;
    border-radius: 14px;
    flex-shrink: 0;
    scroll-snap-align: start;
    object-fit: contain;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: transform .15s;
}
.app-screenshot:hover { transform: scale(1.02); }

/* Contain screenshots so hover-scale doesn't bleed outside the card */
.app-detail-section:has(.app-screenshots-scroll) { overflow: hidden; }

/* ── Screenshot lightbox ──────────────────────────────────── */
.ss-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.ss-lightbox.active { display: flex; }
.ss-lightbox-img { max-height: 90vh; max-width: 90vw; border-radius: 16px; object-fit: contain; }
.ss-lightbox-close {
    position: absolute;
    top: 20px; right: 24px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(8px);
    transition: background .15s;
}
.ss-lightbox-close:hover { background: rgba(255,255,255,.3); }

/* ── Version list ─────────────────────────────────────────── */
.version-list { display: flex; flex-direction: column; }
.version-item { padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.version-item:last-child { border-bottom: none; }
.version-item.version-item-hidden { display: none; }
.version-header { display: flex; align-items: flex-start; gap: 10px; }
.version-num  { font-weight: 600; font-size: .92rem; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.version-meta { font-size: .8rem; color: var(--text-tertiary); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
.version-desc-btn {
    background: none;
    border: none;
    color: var(--accent-bright);
    font-size: .8rem;
    font-weight: 500;
    padding: 2px 0;
    cursor: pointer;
    white-space: nowrap;
}

/* ── Version History: glass variant ──────────────────────── */
.app-detail-style--glass .version-list { gap: 8px; }
.app-detail-style--glass .version-item {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    border-bottom: none;
    transition: background .18s var(--ease);
}
.app-detail-style--glass .version-item:last-child { border-bottom: none; }
.app-detail-style--glass .version-item:hover { background: rgba(255,255,255,.08); }

/* ── Version History: editorial variant ──────────────────── */
.app-detail-style--editorial .version-list {
    padding-left: 22px;
    border-left: 2px solid var(--border);
    margin-left: 6px;
}
.app-detail-style--editorial .version-item {
    position: relative;
    padding: 0 0 26px 22px;
    border-bottom: none;
}
.app-detail-style--editorial .version-item:last-child { padding-bottom: 0; }
.app-detail-style--editorial .version-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border-strong);
}
.app-detail-style--editorial .version-item:first-child::before {
    background: var(--accent-bright);
    border-color: var(--accent-bright);
    box-shadow: 0 0 0 4px rgba(41,151,255,.18);
}
.app-detail-style--editorial .version-num { font-size: 1rem; font-weight: 700; }
.app-detail-style--editorial .version-meta { margin-top: 5px; gap: 12px; }
.app-detail-style--editorial .version-header { align-items: center; }

/* ── Glass carousel (dev + related sections) ─────────────── */
.glass-carousel-wrap {
    position: relative;
    margin: 0 -4px;
}
.glass-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 4px 12px;
    scrollbar-width: none;
}
.glass-carousel::-webkit-scrollbar { display: none; }
.glass-carousel-card {
    flex: 0 0 calc((100% - 24px) / 4);
    min-width: 120px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,.055);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 10px 12px;
    gap: 7px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: background .18s var(--ease), transform .18s var(--ease), border-color .18s var(--ease);
}
.glass-carousel-card:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}
.glass-carousel-icon {
    width: 64px; height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
    display: block;
}
.glass-carousel-icon-fallback {
    width: 64px; height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.glass-carousel-name {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
}
.glass-carousel-get {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--accent-bright);
    background: rgba(41,151,255,.12);
    border: 1px solid rgba(41,151,255,.25);
    border-radius: 20px;
    padding: 2px 10px;
    margin-top: auto;
}
.glass-carousel-fade-right {
    position: absolute;
    right: 0; top: 0; bottom: 12px;
    width: 48px;
    background: linear-gradient(to right, transparent, rgba(41,151,255,.10));
    pointer-events: none;
    border-radius: 0 18px 18px 0;
    transition: opacity .2s;
}
.glass-carousel-btn {
    display: none;
    position: absolute;
    top: calc(50% - 6px);
    transform: translateY(-50%);
    z-index: 4;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background .15s var(--ease), opacity .2s var(--ease);
    box-shadow: 0 2px 14px rgba(0,113,227,.45);
    flex-shrink: 0;
}
.glass-carousel-btn:hover { background: var(--accent-bright); }
.glass-carousel-btn--prev { left: 4px; }
.glass-carousel-btn--next { right: 4px; }
.glass-carousel-btn.gc-hidden { opacity: 0; pointer-events: none; }
@media (hover: hover) { .glass-carousel-btn { display: flex; } }

/* ── Version description modal ────────────────────────────── */
.vd-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 8000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 24px;
}
.vd-modal-overlay.active { display: flex; }
.vd-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 540px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    overflow: hidden;
}
.vd-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 14px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}
.vd-modal-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.vd-modal-close {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    font-size: .95rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
}
.vd-modal-close:hover { background: var(--border); }
.vd-modal-meta { font-size: .8rem; color: var(--text-tertiary); padding: 10px 20px 0; flex-shrink: 0; }
.vd-modal-body {
    padding: 12px 20px 24px;
    overflow-y: auto;
    font-size: .875rem;
    color: var(--text-secondary);
    line-height: 1.75;
    white-space: pre-wrap;
}

/* ── Sideload guide modal tool cards ─────────────────────── */
.sl-tool-card {
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.sl-tool-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sl-tool-body {
    flex: 1;
    min-width: 0;
}
.sl-tool-name  { font-weight: 700; font-size: .92rem; }
.sl-tool-desc  { font-size: .79rem; color: var(--text-secondary); margin-top: 3px; line-height: 1.45; }
.sl-tool-btn   { flex-shrink: 0; white-space: nowrap; font-size: .79rem !important; padding: 6px 14px !important; }

@media (max-width: 480px) {
    .sl-tool-card  { flex-wrap: wrap; }
    .sl-tool-btn   { width: 100%; text-align: center; justify-content: center; margin-top: 6px; }
}

/* ── Download countdown page ──────────────────────────────── */
.dl-page { display: flex; flex-direction: column; align-items: center; padding: 60px 24px 80px; text-align: center; }
.dl-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 40px 36px;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,.2);
}
.dl-card-icon { width: 96px; height: 96px; flex-shrink: 0; }
.dl-card-icon img { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; border: 1px solid rgba(255,255,255,.08); display: block; }
.dl-card-icon-fallback { width: 96px; height: 96px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 700; color: #fff; }
.dl-name    { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.dl-version { font-size: .85rem; color: var(--text-tertiary); margin: -6px 0 0; }
.dl-countdown-ring { position: relative; width: 80px; height: 80px; }
.dl-countdown-ring svg { transform: rotate(-90deg); display: block; }
.dl-countdown-ring circle { fill: none; stroke-width: 4; }
.dl-ring-bg { stroke: var(--border-light); }
.dl-ring-fg { stroke: var(--accent-bright); stroke-linecap: round; transition: stroke-dashoffset .9s linear; }
.dl-countdown-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.dl-countdown-label { font-size: .82rem; color: var(--text-tertiary); margin-top: -8px; max-width: 240px; line-height: 1.4; }
.dl-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.dl-skip-link { font-size: .8rem; color: var(--text-tertiary); }
.dl-skip-link a { color: var(--accent-bright); }

/* ── Apps index grid ──────────────────────────────────────── */
.as-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.as-grid .as-row {
    padding: 14px 12px 14px 0;
    border-bottom: 1px solid var(--border-light);
}
/* Give left column a right divider on desktop */
.as-grid .as-row:nth-child(odd) {
    padding-right: 20px;
    border-right: 1px solid var(--border-light);
}
.as-grid .as-row:nth-child(even) {
    padding-left: 20px;
}
/* Remove bottom border from last row in each column on even counts */
.as-grid .as-row:nth-last-child(-n+2):not(:nth-child(even)) { border-bottom: none; }
.as-grid .as-row:last-child { border-bottom: none; }

/* ── Apps pagination ──────────────────────────────────────── */
.apps-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.apps-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--r-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    cursor: pointer;
}
.apps-pager-btn:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-strong); }
.apps-pager-btn.active { background: var(--accent-bright); color: #fff; border-color: transparent; }
.apps-pager-btn.disabled { opacity: .35; pointer-events: none; }
.apps-pager-ellipsis { color: var(--text-tertiary); padding: 0 4px; font-size: .85rem; line-height: 34px; }

/* ── Developer badge on index row ────────────────────────── */
.as-dev-link { color: var(--accent-bright); font-size: .8rem; text-decoration: none; }
.as-dev-link:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
    .app-detail-hero-inner { flex-direction: column; align-items: center; text-align: center; }
    .app-detail-tags   { justify-content: center; }
    .app-detail-actions { justify-content: center; }
    .as-row-dev { display: none; }
    .app-screenshot { height: 220px; }
    .dl-card { padding: 32px 24px 28px; }
    .as-grid { grid-template-columns: 1fr; }
    .as-grid .as-row { padding: 14px 0 !important; border-right: none !important; }
}
@media (max-width: 480px) {
    .as-row-name{font-size: 0.8rem;}
    .as-row { gap: 12px; }
    .as-row-icon, .as-row-icon img, .as-row-icon-fallback { width: 54px; height: 54px; }
    .app-screenshot { height: 180px; }
    .app-detail-icon, .app-detail-icon img, .app-detail-icon-fallback { width: 90px; height: 90px; border-radius: 20px; }
}

/* ═══════════════════════════════════════════════════════════
   ── LIST STYLE: Cards ─────────────────────────────────────
   ═══════════════════════════════════════════════════════════ */
.as-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}
.as-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 18px 14px 14px;
    gap: 6px;
    transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
}
.as-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
}
.as-card-icon {
    width: 72px; height: 72px;
    flex-shrink: 0;
    position: relative;
    margin-bottom: 4px;
}
.as-card-icon img {
    width: 72px; height: 72px;
    border-radius: 16px;
    object-fit: cover;
    display: block;
    border: 1px solid var(--border-light);
}
.as-card-icon-fallback {
    width: 72px; height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}
.as-card-name {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
}
.as-card-dev {
    font-size: .7rem;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}
.as-card-get {
    margin-top: auto;
    padding-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent-bright);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    transition: background .15s, color .15s;
}
.as-card:hover .as-card-get { background: var(--accent-bright); color: #fff; }
.as-card-skel .as-card-icon { background: var(--bg-elevated); border-radius: 16px; }

/* ═══════════════════════════════════════════════════════════
   ── LIST STYLE: Compact ───────────────────────────────────
   ═══════════════════════════════════════════════════════════ */
.as-list--compact .as-row              { padding: 9px 0; gap: 12px; }
.as-list--compact .as-row-icon,
.as-list--compact .as-row-icon img,
.as-list--compact .as-row-icon-fallback { width: 46px; height: 46px; border-radius: 10px; }
.as-list--compact .as-row-name         { font-size: .84rem; margin-bottom: 1px; }
.as-list--compact .as-row-dev          { font-size: .73rem; margin-bottom: 2px; }
.as-list--compact .as-get-btn          { min-width: 54px; height: 26px; font-size: .72rem; padding: 0 11px; }

/* ═══════════════════════════════════════════════════════════
   ── DETAIL STYLE: Glass ───────────────────────────────────
   ═══════════════════════════════════════════════════════════ */
.app-detail-hero--glass {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.adh-glass-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(52px) saturate(1.5) brightness(0.55);
    transform: scale(1.2); /* prevent blur edge fringing */
}
.adh-glass-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.22) 60%, transparent 100%);
}
.adh-glass-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 22px;
    padding: 28px 28px 28px;
}
.adh-glass-icon            { flex-shrink: 0; width: 108px; height: 108px; }
.adh-glass-icon img,
.adh-glass-icon .app-detail-icon-fallback {
    width: 108px; height: 108px;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.13);
}
.adh-glass-icon img { object-fit: cover; display: block; }
.adh-glass-content             { flex: 1; min-width: 0; }
.adh-glass-content .app-detail-name { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.45); }
.adh-glass-content .app-detail-dev  { color: rgba(255,255,255,.72); }
.adh-glass-content .app-detail-sub  { color: rgba(255,255,255,.6); }
.adh-glass-content .tag             { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: rgba(255,255,255,.78); }
.adh-glass-content .tag-source      { background: rgba(0,113,227,.35); border-color: rgba(41,151,255,.3); color: rgba(255,255,255,.95); }
.adh-glass-content .app-detail-actions { flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════
   ── DETAIL STYLE: Editorial ───────────────────────────────
   ═══════════════════════════════════════════════════════════ */
.app-detail-hero--editorial { padding: 40px 0 0; }
.adh-ed-body {
    display: flex;
    align-items: center;
    gap: 48px;
    padding-bottom: 44px;
}
.adh-ed-left  { flex: 1; min-width: 0; }
.adh-ed-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.adh-ed-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent-bright);
    margin-bottom: 16px;
}
.adh-ed-eyebrow::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 2px;
    background: var(--accent-bright);
    border-radius: 1px;
    flex-shrink: 0;
}
.adh-ed-title {
    font-size: clamp(2.2rem, 5.5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.04;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.adh-ed-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 520px;
    margin-bottom: 22px;
}
.adh-ed-tags    { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.adh-ed-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.adh-ed-icon-wrap {
    position: relative;
    width: 160px;
    height: 160px;
}
.adh-ed-icon-glow {
    position: absolute;
    inset: -24px;
    border-radius: 50%;
    filter: blur(44px);
    opacity: .3;
    pointer-events: none;
}
.adh-ed-icon-wrap img {
    position: relative;
    z-index: 1;
    width: 160px;
    height: 160px;
    border-radius: 34px;
    object-fit: cover;
    display: block;
    box-shadow: 0 24px 64px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.1);
}
.adh-ed-icon-wrap .app-detail-icon-fallback {
    position: relative;
    z-index: 1;
    width: 160px;
    height: 160px;
    border-radius: 34px;
    font-size: 3.5rem;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.adh-ed-dev-name {
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent-bright);
    text-align: center;
    text-decoration: none;
    display: block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.adh-ed-dev-name:hover { text-decoration: underline; }
.adh-ed-sep { height: 1px; background: var(--border); }

/* Responsive overrides for new styles */
@media (max-width: 640px) {
    .as-cards-grid                          { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
    .as-card                                { padding: 14px 10px 12px; }
    .as-card-icon, .as-card-icon img,
    .as-card-icon-fallback                  { width: 60px; height: 60px; border-radius: 14px; }
    .adh-glass-inner                        { flex-direction: column; align-items: flex-start; padding: 20px; }
    .adh-glass-icon, .adh-glass-icon img,
    .adh-glass-icon .app-detail-icon-fallback { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto;}
    .adh-ed-body                            { flex-direction: column-reverse; align-items: flex-start; gap: 28px; padding-bottom: 32px; }
    .adh-ed-right                           { align-items: center; gap: 18px; align-self: stretch; }
    .adh-ed-icon-wrap, .adh-ed-icon-wrap img,
    .adh-ed-icon-wrap .app-detail-icon-fallback { width: 96px; height: 96px; border-radius: 22px; font-size: 2.2rem; }
    .adh-ed-title                           { font-size: 1.9rem; }
}

/* ═══════════════════════════════════════════════════════════
   ── DETAIL STYLE — Section theming per style ──────────────
   ═══════════════════════════════════════════════════════════ */

/* ── Glass — keep default cards, only tweak separators ───── */
.app-detail-style--glass .app-detail-section-title {
    border-bottom-color: var(--border-light);
}
.app-detail-style--glass .app-info-table tr        { border-bottom-color: var(--border-light); }
.app-detail-style--glass .version-item             { border-bottom-color: var(--border-light); }
.app-detail-style--glass .as-row                   { border-bottom-color: var(--border-light); }

/* ── Editorial — open/borderless section layout ──────────── */
.app-detail-style--editorial .app-detail-section {
    background: none;
    border: none;
    border-top: 1px solid var(--border-light);
    border-radius: 0;
    padding: 36px 0;
    margin-top: 0;
}
.app-detail-style--editorial .app-detail-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.02em;
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 20px;
    padding-left: 14px;
    border-left: 3px solid var(--accent-bright);
    line-height: 1.3;
}
.app-detail-style--editorial .app-detail-section-title span { font-weight: 400; color: var(--text-tertiary); }
.app-detail-style--editorial .app-desc-text { font-size: .9rem; line-height: 1.85; }
.app-detail-style--editorial .app-info-table td:first-child  { width: 120px; color: var(--text-tertiary); }
.app-detail-style--editorial .app-info-table td:first-child,
.app-detail-style--editorial .app-info-table td:last-child { padding: 12px 16px 12px 0; font-size: .88rem; }
.app-detail-style--editorial .version-item  { border-bottom-color: var(--border-light); padding: 18px 0; }
.app-detail-style--editorial .version-num   { font-size: 1rem; font-weight: 700; }
.app-detail-style--editorial .as-row        { border-bottom-color: var(--border-light); }
.app-detail-style--editorial .app-screenshots-scroll { overflow-x: auto; }
.app-detail-style--editorial .app-screenshot { border-radius: 14px; border: none; height: 320px; }
@media (max-width: 700px) {
    .app-detail-style--editorial .app-screenshot { height: 220px; }
}

.jb-stat-card {
    flex: 1;
    min-width: 130px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.jb-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-tertiary);
}
.jb-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -.02em;
    line-height: 1.2;
}
.jb-stat-sub {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* What is jailbreaking — info block */
.jb-info-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px 28px;
    margin-bottom: 28px;
}
.jb-info-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.jb-info-section p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 10px;
}
.jb-info-section p:last-child { margin-bottom: 0; }

/* Pros / Cons grid */
.jb-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}
.jb-proscons-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 18px 20px;
}
.jb-proscons-card h3 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.jb-proscons-pros h3 { color: #30d158; }
.jb-proscons-cons h3 { color: #ff453a; }
.jb-proscons-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.jb-proscons-list li {
    font-size: 0.825rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
}
.jb-proscons-list li::before {
    content: '';
    flex-shrink: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    margin-top: 6px;
}
.jb-proscons-pros li::before { background: #30d158; }
.jb-proscons-cons li::before { background: #ff453a; }

/* Types legend in header */
.jb-type-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

/* Section heading above cards */
.jb-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.jb-section-head h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Warning notice */
.jb-warning {
    background: rgba(255,159,10,.07);
    border: 1px solid rgba(255,159,10,.2);
    border-radius: var(--r-md);
    padding: 12px 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 28px;
    line-height: 1.5;
}
.jb-warning-icon { flex-shrink: 0; color: #ff9f0a; margin-top: 1px; }

@media (max-width: 640px) {
    .jb-cards-grid  { grid-template-columns: 1fr; }
    .jb-proscons    { grid-template-columns: 1fr; }
    .jb-stats-bar   { gap: 8px; display:grid}
    .jb-stat-card   { min-width: 100px; padding: 11px 13px; }
}

/* ── Site footer ──────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.site-footer__copy {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}
.site-footer__admin {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    opacity: 0.4;
    text-decoration: none;
    flex-shrink: 0;
}
.site-footer__admin:hover { opacity: 0.7; }
.site-footer__links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.site-footer__links a {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color .15s;
}
.site-footer__links a:hover { color: var(--text-secondary); }

/* ── Topbar right sidebar (apps / software detail pages) ─────────── */
.detail-topbar-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}
.detail-topbar-main { flex: 1; min-width: 0; }
.detail-topbar-main.software, .detail-topbar-main.app { max-width: 60%; }
.detail-topbar-sidebar {
    width: 350px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--toolbar-h) + 16px);
    max-height: calc(100vh - var(--toolbar-h) - 32px);
    overflow-y: auto;
    scrollbar-width: none;
}
.detail-topbar-sidebar::-webkit-scrollbar { display: none; }
/* 1280px: tighten software main slightly */
@media (max-width: 1280px) {
    .detail-topbar-main.software, .detail-topbar-main.app { max-width: 55%; }
}
/* Below 1100px: sidebar drops below main content, loses sticky/fixed height */
@media (max-width: 1100px) {
    .detail-topbar-layout  { display: block; }
    .detail-topbar-main.software, .detail-topbar-main.app { max-width: 100%; }
    .detail-topbar-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        overflow-y: visible;
        margin-top: 24px;
    }
}
/* Mobile: full width, comfortable spacing */
@media (max-width: 680px) {
    .detail-topbar-main.software, .detail-topbar-main.app { max-width: 100%; }
}
/* Sidebar card shell */
.dts-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}
/* Header row */
.dts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--border);
}
.dts-header-title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary);
}
.dts-header a {
    font-size: .78rem;
    color: var(--accent);
    text-decoration: none;
}
.dts-header a:hover { text-decoration: underline; }
/* Items list */
.dts-list { display: flex; flex-direction: column; }
.dts-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background .12s;
}
.dts-item:hover { background: var(--bg-hover, rgba(128,128,128,.08)); }
.dts-item + .dts-item { border-top: 1px solid var(--border); }
.dts-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-input);
}
.dts-icon-fallback {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
}
.dts-info { flex: 1; min-width: 0; }
.dts-name {
    font-size: .83rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}
.dts-sub {
    font-size: .74rem;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 1px;
}
/* Badge (platform / category) */
.dts-badge {
    font-size: .67rem;
    padding: 1px 6px;
    border-radius: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}
/* Skeleton states */
.dts-item--skel { pointer-events: none; }
.dts-icon--skel {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    background: var(--bg-input);
    animation: pulse 1.4s ease-in-out infinite;
}
.dts-text--skel { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.dts-name--skel {
    height: 11px; border-radius: 6px;
    background: var(--bg-input);
    animation: pulse 1.4s ease-in-out infinite;
    width: 80%;
}
.dts-sub--skel {
    height: 9px; border-radius: 6px;
    background: var(--bg-input);
    animation: pulse 1.4s ease-in-out infinite;
    width: 55%;
}

/* ── Lookup tool input row ───────────────────────────────────────── */
.lookup-row { display: flex; gap: 10px; align-items: stretch; }
.lookup-input {
    flex: 1;
    padding: 11px 14px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    color: var(--text);
    font-size: .92rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
    font-family: var(--font-mono);
    min-width: 0;
}
.lookup-input:focus { border-color: var(--accent, #007AFF); }
.lookup-btn { min-width: 120px; gap: 6px; }
@media (max-width: 560px) {
    .lookup-row { flex-direction: column; align-items: stretch; }
    .lookup-btn { min-width: 0; width: 100%; justify-content: center; }
}

/* ── Tool pages: device-picker / form row ───────────────────────────────────── */
.tool-picker-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.tool-picker-input-wrap { flex: 1; position: relative; }
.tool-picker-input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    color: var(--text);
    font-size: .9rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
}
.tool-picker-input:focus { border-color: var(--accent, #007AFF); }
.tool-picker-select {
    padding: 10px 12px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    color: var(--text);
    font-size: .9rem;
    outline: none;
    flex: 1;
    min-width: 140px;
}
.tool-picker-text {
    flex: 2;
    min-width: 200px;
    padding: 10px 12px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    color: var(--text);
    font-size: .9rem;
    outline: none;
    box-sizing: border-box;
}

.theme-dark .tool-picker-select, .theme-dark .tool-picker-text
{
    background: var(--bg-window);
    color: var(--text-accent);
}

.tool-picker-select:focus,
.tool-picker-text:focus { border-color: var(--accent, #007AFF); }
.tool-picker-btn { min-width: 120px; gap: 6px; }
/* ── Tool pages: info cards grid (2-col, 1-col mobile) ── */
.tools-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; }
/* ── Tool page layout: split / minimal ───────────────────────────── */
.tool-split-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
.tool-split-main { min-width: 0; }
.tool-split-sticky { position: sticky; top: 80px; }
@media (max-width: 960px) {
    .tool-split-grid { grid-template-columns: 1fr; }
    .tool-split-sticky { position: static; }
}
@media (max-width: 560px) {
    .tool-picker-row { flex-direction: column; align-items: stretch; }
    .tool-picker-select,
    .tool-picker-text { min-width: 0; flex: none; }
    .tool-picker-btn { min-width: 0; width: 100%; justify-content: center; }
    .tools-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .site-footer {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 72px; /* clear the mobile tab bar */
    }
}

/* ----------------------------------------------------------
   Share Button Component
   ---------------------------------------------------------- */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.share-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-ring);
}
.share-btn-icon {
    flex-shrink: 0;
    opacity: 0.85;
}

/* ── Share Modal ── */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99998;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
@media (min-width: 480px) {
    .share-modal-overlay {
        align-items: center;
        padding: 24px;
    }
}
.share-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.share-modal {
    background: var(--bg-overlay);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -4px 40px rgba(0,0,0,0.4);
    width: 100%;
    max-width: 420px;
    padding: 0 0 env(safe-area-inset-bottom, 0);
    transform: translateY(24px);
    transition: transform 0.22s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
@media (min-width: 480px) {
    .share-modal {
        border-radius: var(--r-xl);
        box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    }
}
.share-modal-overlay.open .share-modal {
    transform: translateY(0);
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
}
.share-modal-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 48px);
}
.share-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s;
}
.share-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* URL copy row */
.share-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}
.share-url-input {
    flex: 1;
    min-width: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 7px 11px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: text;
    outline: none;
    pointer-events: none;
    user-select: all;
}
.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: var(--accent);
    border: none;
    border-radius: var(--r-lg);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.12s, opacity 0.12s;
}
.share-copy-btn:hover { opacity: 0.88; }
.share-copy-btn.copied {
    background: #30d158;
}

/* Social grid */
.share-social-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 12px 14px 16px;
}
.share-social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 4px 8px;
    border-radius: var(--r-lg);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    transition: background 0.12s;
    cursor: pointer;
    border: none;
    background: none;
}
.share-social-item:hover {
    background: var(--bg-hover);
}
.share-social-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.share-social-label {
    line-height: 1.2;
    color: var(--text-secondary);
}

.theme-light .share-modal,
.theme-light .share-modal-overlay {
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}
@media (prefers-color-scheme: light) {
    .share-modal { box-shadow: 0 16px 48px rgba(0,0,0,0.15); }
}

/* ═══════════════════════════════════════════════════════════
   ── Software public pages ─────────────────────────────────
   ═══════════════════════════════════════════════════════════ */

/* Generic pager (used by software pages) */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--r-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.pager-btn:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-strong); }
.pager-btn--active { background: var(--accent-bright); color: #fff !important; border-color: transparent; }

/* Software detail layout */
.sw-detail-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 24px;
    margin-bottom: 20px;
}
.sw-detail-icon { flex-shrink: 0; }
.sw-detail-icon img,
.sw-detail-icon-fallback {
    width: 88px; height: 88px;
    border-radius: 20px;
    object-fit: cover;
    border: 1px solid var(--border-light);
    display: block;
}
.sw-detail-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}
.sw-detail-header-info { flex: 1; min-width: 0; }
.sw-detail-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.sw-detail-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.sw-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}
.sw-dl-size {
    font-size: .78rem;
    opacity: .75;
    border-left: 1px solid rgba(255,255,255,.3);
    padding-left: 7px;
    margin-left: 2px;
}
.sw-detail-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 22px 24px;
    margin-bottom: 16px;
}
.sw-detail-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sw-description { line-height: 1.7; color: var(--text-secondary); }
.sw-changelog {
    font-size: .875rem;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
    font-family: inherit;
}

/* Software info table (like app-info-table) */
.sw-info-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.sw-info-table tr { border-bottom: 1px solid var(--border-light); }
.sw-info-table tr:last-child { border-bottom: none; }
.sw-info-table td:first-child {
    width: 120px;
    color: var(--text-tertiary);
    font-weight: 500;
    padding: 10px 12px 10px 0;
    white-space: nowrap;
    vertical-align: top;
}
.sw-info-table td:last-child { color: var(--text-primary); padding: 10px 0; word-break: break-word; }

/* Related software grid */
.sw-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.sw-related-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--r-md);
    text-decoration: none;
    color: inherit;
    transition: background .15s, border-color .15s;
}
.sw-related-card:hover { background: var(--bg-elevated-hover, rgba(255,255,255,.06)); border-color: var(--border); }
.sw-related-icon img,
.sw-related-icon-fallback {
    width: 38px; height: 38px;
    border-radius: 9px;
    object-fit: cover;
    border: 1px solid var(--border-light);
    display: block;
    flex-shrink: 0;
}
.sw-related-icon-fallback {
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; font-weight: 700; color: #fff;
}
.sw-related-info { flex: 1; min-width: 0; overflow: hidden; }
.sw-related-name { font-size: .85rem; font-weight: 600; color: var(--text-primary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-related-version { font-size: .75rem; color: var(--text-tertiary); }

/* Software detail responsive */
@media (max-width: 540px) {
    .sw-detail-header { flex-direction: column; }
    .sw-detail-icon img, .sw-detail-icon-fallback { width: 64px; height: 64px; border-radius: 15px; }
    .sw-detail-name { font-size: 1.2rem; }
    .sw-related-grid { grid-template-columns: 1fr 1fr; }
}

/* Screenshots strip */
.sw-screenshots-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}
.sw-ss-thumb-link { flex-shrink: 0; display: block; border-radius: var(--r-md); overflow: hidden; }
.sw-ss-thumb {
    height: 200px;
    width: auto;
    display: block;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: opacity .15s;
}
.sw-ss-thumb:hover { opacity: .85; }

/* Version history rows */
.sw-ver-row {
    border-bottom: 1px solid var(--border-light);
    padding: 12px 0;
}
.sw-ver-row:last-child { border-bottom: none; }
.sw-ver-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.sw-ver-num { font-weight: 700; font-size: .875rem; color: var(--text-primary); }
.sw-ver-badge { font-size: .65rem; background: var(--accent-bright, #007AFF); color: #fff; border-radius: 4px; padding: 2px 7px; font-weight: 700; }
.sw-ver-date { font-size: .8rem; color: var(--text-tertiary); }
.sw-ver-size { font-size: .8rem; color: var(--text-tertiary); }
.sw-ver-dl {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .78rem; color: var(--accent-bright, #007AFF);
    text-decoration: none; font-weight: 500;
}
.sw-ver-dl:hover { text-decoration: underline; }
.sw-ver-notes { font-size: .85rem; color: var(--text-secondary); line-height: 1.6; white-space: pre-wrap; }
.sw-ver-row--latest .sw-ver-num { color: var(--accent-bright, #007AFF); }

