body {
    background-color: #080F24;
    background-image:
        radial-gradient(ellipse at 12% 8%, rgba(22, 75, 154, 0.24), transparent 34rem),
        radial-gradient(ellipse at 88% 24%, rgba(40, 121, 208, 0.14), transparent 30rem),
        linear-gradient(180deg, #080F24 0%, #101316 100%);
    background-attachment: fixed;
    color: #D9EEFF;
}
.glass-panel {
    background: rgba(16, 43, 85, 0.58);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(114, 185, 245, 0.16);
    box-shadow: 0 8px 30px rgba(8, 15, 36, 0.24);
}
.badge-pulse {
    box-shadow: 0 0 0 0 rgba(40, 121, 208, 0.7);
    animation: pulse-blue 2s infinite;
}
@keyframes pulse-blue {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(40, 121, 208, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(40, 121, 208, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(40, 121, 208, 0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 1s linear infinite;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #080F24; }
::-webkit-scrollbar-thumb { background: #505961; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #858F99; }

.nav-active {
    background-color: rgba(40, 121, 208, 0.18);
    color: #72B9F5;
    box-shadow: inset 0 0 0 1px rgba(114, 185, 245, 0.3);
}

:root {
    --midnight-emerald-950: #071D16;
    --midnight-emerald-900: #0E3B2E;
    --midnight-emerald-800: #174D38;
    --midnight-emerald-600: #2E7D5B;
    --midnight-emerald-400: #5EBE97;
    --midnight-emerald-100: #D6F7E8;
}

.brand-live {
    background-color: var(--midnight-emerald-950);
    color: var(--midnight-emerald-100);
    border: 1px solid var(--midnight-emerald-600);
}
.brand-live-dot { background-color: var(--midnight-emerald-400); }

.brand-modrinth {
    background-color: var(--midnight-emerald-900);
    color: var(--midnight-emerald-100);
    border: 1px solid var(--midnight-emerald-600);
}
.brand-modrinth:hover { background-color: var(--midnight-emerald-800); }
.brand-cube-icon,
.brand-mod-icon { color: var(--midnight-emerald-400) !important; }

.project-filters .filter-btn[data-filter="all"] {
    --filter-accent: #2879d0;
    --filter-soft: rgba(40, 121, 208, 0.14);
    --filter-border: rgba(114, 185, 245, 0.38);
    --filter-text: #b9ddff;
    --filter-active-text: #fff;
}
.project-filters .filter-btn[data-filter="mod"] {
    --filter-accent: #2e7d5b;
    --filter-soft: rgba(46, 125, 91, 0.16);
    --filter-border: rgba(94, 190, 151, 0.4);
    --filter-text: #b7efd5;
    --filter-active-text: #fff;
}
.project-filters .filter-btn[data-filter="modpack"] {
    --filter-accent: #f97316;
    --filter-soft: rgba(249, 115, 22, 0.12);
    --filter-border: rgba(249, 115, 22, 0.36);
    --filter-text: #fed7aa;
    --filter-active-text: #24150b;
}
.project-filters .filter-btn[data-filter="plugin"] {
    --filter-accent: #8b5cf6;
    --filter-soft: rgba(139, 92, 246, 0.13);
    --filter-border: rgba(167, 139, 250, 0.36);
    --filter-text: #ddd0ff;
    --filter-active-text: #fff;
}
.project-filters .filter-btn[data-filter="shader"] {
    --filter-accent: #f59e0b;
    --filter-soft: rgba(245, 158, 11, 0.13);
    --filter-border: rgba(251, 191, 36, 0.38);
    --filter-text: #fde68a;
    --filter-active-text: #211708;
}
.project-filters .filter-btn[data-filter="resourcepack"] {
    --filter-accent: #0ea5e9;
    --filter-soft: rgba(14, 165, 233, 0.13);
    --filter-border: rgba(56, 189, 248, 0.38);
    --filter-text: #bae6fd;
    --filter-active-text: #062337;
}
.project-filters .filter-btn[data-filter] {
    background-color: var(--filter-soft);
    color: var(--filter-text);
    border: 1px solid var(--filter-border);
}
.project-filters .filter-btn[data-filter] i { color: var(--filter-accent); }
.project-filters .filter-btn[data-filter]:hover {
    background-color: var(--filter-border);
    border-color: var(--filter-accent);
    color: #fff;
}
.project-filters .filter-btn[data-filter].is-active {
    background-color: var(--filter-accent);
    border-color: var(--filter-accent);
    color: var(--filter-active-text);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.project-filters .filter-btn[data-filter].is-active i { color: var(--filter-active-text) !important; }
.badge-mod {
    background-color: rgba(7, 29, 22, 0.9);
    color: var(--midnight-emerald-100);
    border-color: var(--midnight-emerald-600);
}
.brand-update-status { color: var(--midnight-emerald-400) !important; }
.brand-update-status i { color: var(--midnight-emerald-100); }

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prose-body h3 { font-size: 0.95rem; font-weight: 700; color: #F1F4F6; margin: 0.75rem 0 0.35rem; }
.prose-body h2 { font-size: 1.05rem; font-weight: 700; color: #F1F4F6; margin: 0.85rem 0 0.4rem; }
.prose-body p { margin: 0.35rem 0; color: #C1CAD2; }
.prose-body ul { list-style: disc; padding-left: 1.15rem; margin: 0.35rem 0; }
.prose-body li { color: #C1CAD2; margin: 0.15rem 0; }
.prose-body a { color: #72B9F5; text-decoration: underline; }
.prose-body img { display: block; max-width: 100%; height: auto; border-radius: 0.75rem; margin: 0.6rem 0; }
.prose-body code { background: #101316; padding: 0.1rem 0.3rem; border-radius: 0.25rem; font-family: 'JetBrains Mono', monospace; font-size: 0.8em; color: #72B9F5; }

/* Keep catalog filters readable and tappable inside their horizontal scroller. */
.project-filters {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    touch-action: pan-x;
}
.project-filters .filter-btn {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
}

/* Keep compact desktop-nav rules scoped away from the dropdown menu. */
@media (max-width: 400px) {
    .desktop-nav a[data-nav] {
        width: 40px;
        height: 44px;
        justify-content: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .desktop-nav a[data-nav] span { display: none; }
}

/* Mobile app shell and accessible navigation */
.header-inner { flex-wrap: wrap; position: relative; }
.header-controls { margin-left: auto; }
.desktop-nav a { display: inline-flex; }
.mobile-menu-toggle, .platform-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(114,185,245,.2); background: rgba(16,19,22,.75); color: #d9eeff; }
.mobile-menu-toggle { font-size: 1rem; }
.platform-icon { width: 38px; height: 38px; font-size: 1rem; }
.modrinth-icon { color: #72b9f5; }
.curseforge-icon { color: #ff925f; }
.mobile-menu { position: absolute; top: calc(100% + .35rem); right: 0; z-index: 50; flex: none; width: min(19rem, calc(100vw - 2rem)); max-height: calc(100dvh - 6rem); overflow-y: auto; overscroll-behavior: contain; padding: .5rem; border: 1px solid rgba(114,185,245,.2); border-radius: 1rem; background: rgba(8,15,36,.98); box-shadow: 0 18px 42px rgba(0,0,0,.42); }
.mobile-menu:not(.hidden) { display: grid; gap: .35rem; }
.mobile-menu-link { display: flex; align-items: center; gap: .85rem; min-height: 46px; padding: .65rem .85rem; border-radius: .75rem; color: #d9eeff; font-size: .9rem; font-weight: 600; }
.mobile-menu-link i { width: 1.25rem; color: #72b9f5; text-align: center; }
.mobile-menu-link.nav-active { background: rgba(40,121,208,.18); }
.update-changelog { border-top: 1px solid rgba(114,185,245,.13); padding-top: .7rem; max-height: 14rem; overflow: auto; }
.update-changelog p, .update-changelog ul { margin: .25rem 0; }
@media (max-width: 380px) {
  .header-inner > a { gap: .55rem; }
  .header-inner > a > div:first-child { width: 2.35rem; height: 2.35rem; }
  .header-inner > a .text-lg { font-size: .95rem; }
  .mobile-platforms { gap: .2rem; }
  .platform-icon, .mobile-menu-toggle { width: 36px; height: 38px; }
}
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}
.desktop-platforms { padding-left: .5rem; border-left: 1px solid rgba(114,185,245,.18); }
.platform-desktop-link { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .65rem; border-radius: .65rem; background: rgba(16,19,22,.7); border: 1px solid rgba(114,185,245,.15); }

/* Refined interaction layer: restrained motion, clearer focus, and a calmer card rhythm. */
:root {
    --motion-fast: 160ms;
    --motion-ui: 200ms;
    --motion-enter: 480ms;
    --motion-ease-out: ease-out;
}

html { scroll-behavior: smooth; }
body { text-rendering: optimizeLegibility; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
time, .font-mono, .tabular-nums { font-variant-numeric: tabular-nums; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid #72B9F5;
    outline-offset: 3px;
}

.mobile-menu-toggle,
.platform-icon,
.platform-desktop-link,
.mobile-menu-link,
.project-filters .filter-btn {
    transition: transform var(--motion-fast) var(--motion-ease-out),
                border-color var(--motion-fast) var(--motion-ease-out),
                background-color var(--motion-fast) var(--motion-ease-out);
}
.mobile-menu-toggle:active,
.platform-icon:active,
.mobile-menu-link:active,
.project-filters .filter-btn:active { transform: scale(.97); }
.mobile-menu-toggle i { transition: transform var(--motion-ui) var(--motion-ease-out); }
.mobile-menu-toggle[aria-expanded="true"] i { transform: rotate(90deg); }
.mobile-menu:not(.hidden) { animation: menu-enter var(--motion-ui) var(--motion-ease-out) both; }
@keyframes menu-enter {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered reveals are progressive enhancement; content stays visible without JS. */
.motion-reveal { opacity: 1; transform: none; }
html.motion-ready .motion-reveal {
    transition: opacity var(--motion-enter) var(--motion-ease-out),
                transform var(--motion-enter) var(--motion-ease-out);
    transition-delay: calc(var(--reveal-order, 0) * 42ms);
}
html.motion-ready .motion-reveal:not(.is-visible) {
    opacity: 0;
    transform: translateY(14px);
}
html.motion-ready .motion-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    html.motion-ready .motion-reveal.is-visible:hover {
        transform: translateY(-3px);
        transition-duration: 180ms;
        transition-delay: 0ms;
    }
    .mobile-menu-link:hover,
    .platform-icon:hover,
    .platform-desktop-link:hover,
    .project-filters .filter-btn:hover { transform: translateY(-1px); }
}

#projects-grid > .motion-reveal { min-width: 0; }
#projects-grid .group > a:focus-visible,
#projects-grid .group a:focus-visible { border-radius: .75rem; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
    .badge-pulse, .animate-ping { animation: none !important; }
    html.motion-ready .motion-reveal:not(.is-visible) { opacity: 1; transform: none; }
}

/* Multi-category labels use stable per-tag hues and preserve legible contrast. */
.project-tag { display:inline-flex; align-items:center; padding:.18rem .5rem; border-radius:.5rem; border:1px solid hsl(var(--tag-hue) 75% 60% / .25); color:hsl(var(--tag-hue) 85% 76%); background:hsl(var(--tag-hue) 70% 45% / .12); font-size:.64rem; line-height:1.25; white-space:nowrap; }
.download-total { color:#d8e3ec; font-weight:700; white-space:nowrap; }
.download-platforms { color:#8392a2; white-space:nowrap; }
.platform-page .project-filters { display:none; }
.detail-section-nav { position:sticky; top:4.5rem; z-index:20; display:flex; gap:.5rem; overflow-x:auto; padding:.55rem; border:1px solid rgba(114,185,245,.14); border-radius:.9rem; background:rgba(8,15,36,.94); backdrop-filter:blur(14px); }
.detail-section-nav a { flex:0 0 auto; padding:.55rem .85rem; border-radius:.65rem; color:#b8c7d6; font-size:.8rem; font-weight:600; }
.detail-section-nav a:hover { color:#fff; background:rgba(16,185,129,.14); }
.language-toggle { flex:0 0 auto; min-width:42px; min-height:38px; padding:.4rem .65rem; border:1px solid rgba(114,185,245,.24); border-radius:.65rem; background:rgba(16,19,22,.8); color:#d9eeff; font-size:.72rem; font-weight:700; }
.language-toggle:hover { border-color:rgba(16,185,129,.6); color:#a7f3d0; }

.platform-chooser { display:grid; grid-template-columns:1fr; gap:.7rem; padding:1rem; border:1px solid rgba(114,185,245,.16); border-radius:1.1rem; background:linear-gradient(120deg,rgba(15,23,42,.96),rgba(15,30,48,.88)); }
.platform-chooser-heading { display:flex; align-items:baseline; justify-content:space-between; gap:.5rem; color:#dce7f0; font-size:.88rem; font-weight:700; }
.platform-chooser-heading small { color:#718096; font-size:.68rem; font-weight:500; }
.platform-chooser-links { display:grid; grid-template-columns:1fr; gap:.55rem; }
.platform-choice,.home-platform-quicklinks a { display:flex; align-items:center; justify-content:center; gap:.55rem; min-height:46px; padding:.65rem .75rem; border:1px solid rgba(114,185,245,.17); border-radius:.8rem; background:rgba(8,15,36,.78); color:#cbd5e1; font-size:.79rem; font-weight:700; transition:transform 160ms ease,border-color 160ms ease,color 160ms ease,background 160ms ease; }
.platform-choice:hover,.platform-choice.is-active,.home-platform-quicklinks a:hover { border-color:rgba(16,185,129,.55); background:rgba(16,185,129,.1); color:#a7f3d0; transform:translateY(-1px); }
.platform-choice i,.home-platform-quicklinks i { color:#6ee7b7; }
.home-platform-quicklinks { display:flex; flex-wrap:wrap; gap:.55rem; margin-top:1rem; }
.home-platform-quicklinks a { justify-content:flex-start; min-height:40px; }
.project-category-grid { display:grid; grid-template-columns:1fr; gap:1rem; }
.project-category-card { position:relative; display:flex; align-items:center; gap:1rem; min-height:88px; padding:1rem; border:1px solid rgba(114,185,245,.17); border-radius:1rem; background:linear-gradient(135deg,rgba(15,23,42,.96),rgba(15,30,48,.88)); color:#e2e8f0; transition:transform 160ms ease,border-color 160ms ease,background 160ms ease; }
.project-category-card:hover { transform:translateY(-2px); border-color:rgba(16,185,129,.55); background:linear-gradient(135deg,rgba(16,185,129,.12),rgba(15,30,48,.92)); }
.project-category-card:focus-visible { outline:2px solid #34d399; outline-offset:3px; }
.project-category-icon { display:grid; flex:0 0 2.8rem; width:2.8rem; height:2.8rem; place-items:center; border:1px solid rgba(16,185,129,.22); border-radius:.8rem; background:rgba(16,185,129,.1); color:#6ee7b7; font-size:1.05rem; }
.project-category-copy { display:grid; gap:.2rem; padding-right:1.5rem; }
.project-category-copy strong { color:#f1f5f9; font-size:.98rem; }
.project-category-copy small { color:#94a3b8; font-size:.75rem; }
.project-category-arrow { position:absolute; top:50%; right:1rem; color:#6ee7b7; transform:translateY(-50%); transition:transform 160ms ease; }
.project-category-card:hover .project-category-arrow { transform:translate(3px,-50%); }
@media(min-width:768px){.platform-chooser{grid-template-columns:auto 1fr;align-items:center}.platform-chooser-heading{min-width:11rem}.platform-chooser-links{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:768px){.project-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.project-category-card{min-height:160px;align-items:flex-start;flex-direction:column;justify-content:flex-start;padding:1.25rem}.project-category-arrow{top:1.5rem;transform:none}.project-category-card:hover .project-category-arrow{transform:translateX(3px)}}


/* Project detail layout: Modrinth-inspired hierarchy with NonKungCh Hub colors. */
.detail-main-shell { max-width: 82rem; }
.detail-back-link { display:inline-flex; align-items:center; gap:.55rem; min-height:42px; padding:.35rem .2rem; color:#94a3b8; font-size:.82rem; font-weight:600; text-decoration:none; transition:color 150ms ease; }
.detail-back-link:hover { color:#6ee7b7; }
.detail-back-link:focus-visible,.detail-section-nav a:focus-visible,.detail-download-link:focus-visible,.detail-gallery-item:focus-visible { outline:2px solid #34d399; outline-offset:3px; }
.detail-project-summary { position:relative; isolation:isolate; overflow:hidden; padding:clamp(1.15rem,3vw,2rem); border:1px solid rgba(148,163,184,.16); border-radius:1.35rem; background:linear-gradient(120deg,#111c2d 0%,#101827 52%,#0c1721 100%); box-shadow:0 18px 44px rgba(0,0,0,.22); }
.detail-summary-glow { position:absolute; z-index:-1; width:22rem; height:22rem; right:-9rem; bottom:-15rem; border-radius:50%; background:rgba(16,185,129,.18); filter:blur(75px); pointer-events:none; }
.detail-summary-content { display:grid; grid-template-columns:5.5rem minmax(0,1fr); align-items:start; gap:1.2rem; }
.detail-project-icon { width:5.5rem; height:5.5rem; border:1px solid rgba(110,231,183,.32); border-radius:1.2rem; background:#0b1220; object-fit:cover; box-shadow:0 8px 24px rgba(0,0,0,.28); }
.detail-summary-copy { min-width:0; }
.detail-title-row { display:flex; align-items:center; flex-wrap:wrap; gap:.55rem; }
.detail-title-row h1 { min-width:0; margin:0; color:#f8fafc; font-size:clamp(1.45rem,3.4vw,2.15rem); font-weight:700; line-height:1.2; text-wrap:pretty; }
.detail-type-badge { display:inline-flex; align-items:center; min-height:25px; padding:.18rem .62rem; border:1px solid rgba(110,231,183,.23); border-radius:999px; background:rgba(16,185,129,.11); color:#a7f3d0; font-size:.72rem; font-weight:700; }
.detail-new-badge { padding:.22rem .58rem; border-radius:999px; background:#34d399; color:#062b20; font-size:.67rem; font-weight:700; }
.detail-project-description { margin-top:.5rem; color:#a7b2c1; font-size:.92rem; line-height:1.6; text-wrap:pretty; }
.detail-project-platform { display:inline-flex; align-items:center; gap:.45rem; margin-top:.75rem; padding:.35rem .62rem; border:1px solid rgba(148,163,184,.16); border-radius:.65rem; background:rgba(2,6,23,.36); color:#cbd5e1; font-size:.72rem; }
.detail-summary-stats { display:flex; flex-wrap:wrap; align-items:center; gap:.45rem 1.1rem; margin-top:1rem; padding-top:.85rem; border-top:1px solid rgba(148,163,184,.12); color:#8392a2; font-size:.72rem; }
.detail-summary-stats > span:not(.detail-download-breakdown) { display:inline-flex; align-items:center; gap:.38rem; }
.detail-summary-stats i { color:#6ee7b7; }
.detail-download-breakdown { color:#64748b; font-size:.67rem; }
.detail-section-nav { top:4.75rem; gap:.35rem; padding:.4rem; border-color:rgba(148,163,184,.15); border-radius:.9rem; background:rgba(8,15,28,.94); box-shadow:0 8px 24px rgba(0,0,0,.18); }
.detail-section-nav a { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:.55rem 1rem; border:1px solid transparent; border-radius:.65rem; color:#94a3b8; font-size:.82rem; transition:background 150ms ease,color 150ms ease,border-color 150ms ease; }
.detail-section-nav a:hover,.detail-section-nav a.is-active { border-color:rgba(52,211,153,.17); background:rgba(16,185,129,.12); color:#a7f3d0; }
.detail-layout { display:grid; grid-template-columns:minmax(0,1fr) 18.5rem; align-items:start; gap:1.25rem; }
.detail-main-column { display:grid; min-width:0; gap:1.15rem; }
.detail-content-panel,.detail-sidebar-card { min-width:0; padding:clamp(1rem,2vw,1.45rem); border:1px solid rgba(148,163,184,.14); border-radius:1rem; background:linear-gradient(145deg,rgba(17,27,43,.96),rgba(12,19,32,.96)); }
.detail-panel-heading { display:flex; align-items:center; gap:.65rem; margin-bottom:1rem; }
.detail-panel-heading h2,.detail-sidebar-title h2 { margin:0; color:#e7edf4; font-size:1rem; font-weight:700; }
.detail-heading-mark { width:.42rem; height:1.15rem; border-radius:1rem; background:#34d399; box-shadow:0 0 14px rgba(52,211,153,.38); }
.detail-long-description { color:#c1cad2; font-size:.92rem; line-height:1.85; overflow-wrap:anywhere; }
.detail-long-description h2,.detail-long-description h3 { margin:1.2rem 0 .45rem; color:#f1f5f9; font-weight:700; }
.detail-long-description h2:first-child,.detail-long-description h3:first-child { margin-top:0; }
.detail-long-description ul,.detail-long-description ol { margin:.55rem 0; padding-left:1.35rem; }
.detail-long-description li { margin:.3rem 0; }
.detail-gallery-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
.detail-gallery-item { position:relative; display:block; min-width:0; overflow:hidden; aspect-ratio:16/9; border:1px solid rgba(148,163,184,.16); border-radius:.8rem; background:#0b1220; }
.detail-gallery-item img { display:block; width:100%; height:100%; object-fit:cover; transition:transform 220ms ease,opacity 220ms ease; }
.detail-gallery-item:hover img { transform:scale(1.035); opacity:.92; }
.detail-gallery-empty { grid-column:1/-1; margin:0; padding:1rem; border:1px dashed rgba(148,163,184,.2); border-radius:.8rem; color:#8492a4; font-size:.85rem; }
.detail-panel-subtitle { display:flex; align-items:center; gap:.5rem; margin:-.45rem 0 1rem; color:#8190a2; font-size:.75rem; }
.detail-panel-subtitle i { color:#6ee7b7; }
.detail-version-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.65rem; margin-bottom:.85rem; }
.detail-version-filters label { display:grid; gap:.35rem; color:#94a3b8; font-size:.72rem; font-weight:600; }
.detail-version-filters select { width:100%; min-width:0; min-height:44px; padding:.55rem .65rem; border:1px solid rgba(148,163,184,.2); border-radius:.65rem; background:#080f1d; color:#e2e8f0; font:inherit; font-size:.76rem; }
.detail-version-filters select:focus-visible { outline:2px solid #34d399; outline-offset:2px; }
.detail-version-filters select:disabled { opacity:.55; }
.detail-version-status { margin:0 0 .7rem; color:#748397; font-size:.7rem; }
.detail-version-list { display:grid; gap:.7rem; }
.detail-sidebar { position:sticky; top:5.8rem; display:grid; gap:.9rem; min-width:0; }
.detail-sidebar-card { padding:1rem; }
.detail-sidebar-title { display:flex; align-items:center; gap:.55rem; margin:0 0 .85rem; }
.detail-sidebar-title > i { color:#6ee7b7; font-size:.9rem; }
.detail-sidebar-title h2 { font-size:.9rem; }
.detail-sidebar-row { display:flex; align-items:flex-start; justify-content:space-between; gap:.65rem; padding:.6rem 0; border-top:1px solid rgba(148,163,184,.1); font-size:.72rem; }
.detail-sidebar-row span { color:#8492a4; }
.detail-sidebar-row strong { max-width:62%; color:#d6e0e9; font-weight:600; text-align:right; overflow-wrap:anywhere; }
.detail-download-links { display:grid; gap:.55rem; }
.detail-download-link { display:flex; align-items:center; gap:.65rem; min-height:46px; padding:.65rem .75rem; border:1px solid rgba(148,163,184,.18); border-radius:.7rem; color:#eaf2f8; font-size:.76rem; font-weight:700; text-decoration:none; transition:transform 150ms ease,border-color 150ms ease,background 150ms ease; }
.detail-download-link:hover { transform:translateY(-1px); }
.detail-download-modrinth { border-color:rgba(52,211,153,.24); background:rgba(16,185,129,.11); }
.detail-download-modrinth:hover { border-color:rgba(52,211,153,.55); background:rgba(16,185,129,.18); }
.detail-download-curseforge { border-color:rgba(241,100,54,.24); background:rgba(241,100,54,.1); }
.detail-download-curseforge > i:first-child { color:#fb9a73; }
.detail-download-curseforge:hover { border-color:rgba(241,100,54,.5); background:rgba(241,100,54,.16); }
.detail-external-icon { margin-left:auto; color:#8190a2; font-size:.65rem; }
.detail-download-note { margin:.7rem 0 0; color:#748397; font-size:.68rem; line-height:1.5; }
@media (min-width:900px) { .detail-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:899px) { .detail-layout { grid-template-columns:minmax(0,1fr); } .detail-sidebar { position:static; grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) {
    .detail-main-shell { padding-left:1rem; padding-right:1rem; }
    .detail-summary-content { grid-template-columns:3.8rem minmax(0,1fr); align-items:start; gap:.8rem; }
    .detail-project-icon { width:3.8rem; height:3.8rem; border-radius:.9rem; }
    .detail-title-row h1 { flex-basis:100%; font-size:1.45rem; }
    .detail-project-description { font-size:.86rem; }
    .detail-summary-stats { gap:.45rem .8rem; font-size:.68rem; }
    .detail-section-nav { top:4.3rem; margin-left:-.15rem; margin-right:-.15rem; }
    .detail-section-nav a { min-width:5.25rem; padding:.5rem .75rem; }
    .detail-sidebar { grid-template-columns:minmax(0,1fr); }
    .detail-version-filters { grid-template-columns:minmax(0,1fr); }
    .detail-version-filters label { font-size:.75rem; }
    .detail-version-filters select { min-height:46px; font-size:.82rem; }
    .detail-gallery-grid { gap:.55rem; }
}
@media (max-width:360px) { .detail-gallery-grid { grid-template-columns:minmax(0,1fr); } }
@media (prefers-reduced-motion:reduce) { .detail-gallery-item img,.detail-download-link,.detail-section-nav a { transition:none; } }

/* Ensure primary navigation targets meet the minimum comfortable touch size. */
.detail-back-link,.detail-section-nav a { min-height:44px; }
