/* ============================================================
   SlyVTT — Site V2 (prototype)
   Thème sombre "glass" + fond de code animé
   ============================================================ */

:root {
    --bg:        #0a0d12;
    --bg-soft:   #0e131b;
    --panel:     rgba(18, 24, 34, 0.72);
    --panel-brd: rgba(120, 160, 220, 0.16);
    --txt:       #d7dee8;
    --txt-dim:   #8b97a8;
    --accent:    #58a6ff;
    --accent2:   #bc8cff;
    --txt-strong: #ffffff;
    --bg-deep:   #060a10;
    --field:     #0b1017;
    --on-accent: #06111f;
    --shadow:    rgba(0,0,0,0.5);
    --radius:    16px;

    /* couleurs de coloration syntaxique (fond) */
    --c-kw:    #ff7b72;
    --c-type:  #79c0ff;
    --c-str:   #a5d6ff;
    --c-num:   #d2a8ff;
    --c-com:   #6a7a8c;
    --c-fn:    #e5b567;
    --c-pre:   #ff9d6b;
    --c-punct: #9fb0c4;
    --c-id:    #c9d4e2;
}

/* selection highlight: dark blue edges, light pink/magenta sweeping across */
:root {
    --sel-a: #58a6ff;   /* dark blue  — the edges / rest tone */
    --sel-b: #58e6ff;   /* cyan/aqua — the moving highlight */
    --sel-grad: linear-gradient(90deg,
        color-mix(in srgb, var(--sel-a) 20%, transparent) 0%,
        color-mix(in srgb, var(--sel-b) 34%, transparent) 50%,
        color-mix(in srgb, var(--sel-a) 20%, transparent) 100%);
}
@keyframes selSweep {
    0%   { background-position: 0% 0; }     /* bright on the right */
    50%  { background-position: 100% 0; }   /* bright on the left  */
    100% { background-position: 0% 0; }     /* and back to the start */
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--txt);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- fond de code animé ---------- */
#codebg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(1200px 700px at 80% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
        radial-gradient(900px 600px at 0% 110%, color-mix(in srgb, var(--accent2) 10%, transparent), transparent 55%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}
/* le code qui défile, par-dessus l'effet : fondu en haut et en bas pour garder le texte lisible */
.codebg-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 32px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
/* les effets de BenchFX (js/bgfx.js) : tout l'écran, en pleines couleurs sur la moitié droite,
   fondus vers la couleur du fond entre la moitié et le quart de la largeur, absents du quart
   gauche, sous le code */
#bgfx {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: screen;          /* le noir du feu s'efface, les flammes éclairent le fond */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 25%, #000 50%);
            mask-image: linear-gradient(90deg, transparent 0%, transparent 25%, #000 50%);
}
#bgfx.light { mix-blend-mode: normal; opacity: 0.5; }      /* thème clair : Circle Interference */
@media (max-width: 720px) {
    #bgfx { -webkit-mask-image: none; mask-image: none; opacity: 0.5; }
    #bgfx.light { opacity: 0.3; }
}
#codebg-stream {
    margin: 0;
    font-family: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
    font-size: 16px;
    line-height: 1.55;
    white-space: pre;
    opacity: 0.26;
    color: var(--c-id);
    text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 25%, transparent);
    letter-spacing: 0.2px;
}

/* tokens */
.c-kw    { color: var(--c-kw); }
.c-type  { color: var(--c-type); }
.c-str   { color: var(--c-str); }
.c-num   { color: var(--c-num); }
.c-com   { color: var(--c-com); font-style: italic; }
.c-fn    { color: var(--c-fn); }
.c-pre   { color: var(--c-pre); }
.c-punct { color: var(--c-punct); }
.c-id    { color: var(--c-id); }
.c-cursor {
    color: var(--accent);
    animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- barre de navigation ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px clamp(16px, 4vw, 48px);
    background: color-mix(in srgb, var(--bg) 66%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--panel-brd);
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--txt);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.3px;
}
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand b { color: var(--accent); font-weight: 800; }
.links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.links a {
    text-decoration: none;
    color: var(--txt-dim);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 10px;
    transition: color .18s ease, background .18s ease;
}
.links a:hover,
.links a.active { color: var(--txt-strong); background-image: var(--sel-grad); background-size: 200% 100%; animation: selSweep 6s ease-in-out infinite; }
.links a.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sel-b) 45%, transparent); }
.links a.src {
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.links a.src:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* ---------- contenu ---------- */
main {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 32px) 80px;
}

.hero { text-align: center; padding: clamp(40px, 10vw, 110px) 0 60px; }
.hero .eyebrow {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 22px;
}
.hero h1 {
    font-size: clamp(2.4rem, 7vw, 4.2rem);
    line-height: 1.05;
    margin: 0 0 18px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(120deg, var(--txt-strong) 10%, var(--accent) 55%, var(--accent2) 95%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p.lead {
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    color: var(--txt-dim);
    max-width: 640px;
    margin: 0 auto 32px;
}
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
    text-decoration: none;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    transition: transform .15s ease, box-shadow .2s ease;
}
.btn.primary {
    color: var(--on-accent);
    background: linear-gradient(120deg, var(--accent), var(--accent2));
    box-shadow: 0 8px 30px color-mix(in srgb, var(--accent) 28%, transparent);
}
.btn.ghost { color: var(--txt); border: 1px solid var(--panel-brd); background: var(--panel); }
/* « Try it in your browser » : la deuxième couleur du thème, pour se distinguer du bouton principal */
.btn.try {
    color: var(--on-accent);
    background: linear-gradient(120deg, var(--accent2), color-mix(in srgb, var(--accent2) 45%, var(--c-fn)));
    box-shadow: 0 8px 30px color-mix(in srgb, var(--accent2) 30%, transparent);
}
.btn.try::before { content: "▶ "; }
.spot-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.prose .try-cta { text-align: center; margin: 18px 0; }
.prose .btn { display: inline-block; text-decoration: none; margin: 4px 0; }
.btn:hover { transform: translateY(-2px); }

/* carte de contenu en verre */
.panel {
    background: var(--panel);
    border: 1px solid var(--panel-brd);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: clamp(22px, 4vw, 40px);
    box-shadow: 0 20px 60px var(--shadow);
}

/* grille de projets */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 40px;
}
.card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--panel);
    border: 1px solid var(--panel-brd);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .2s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 50%, transparent);
    box-shadow: 0 18px 44px var(--shadow);
}
.card .thumb { aspect-ratio: 16 / 10; background: var(--bg-deep); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 16px 18px 20px; }
.card .body h3 { margin: 0 0 6px; font-size: 1.15rem; }
.card .body p { margin: 0; color: var(--txt-dim); font-size: 0.92rem; }
.card .tag {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--accent);
    margin-top: 12px;
    opacity: 0.9;
}

/* page projet */
.proj-head { margin-bottom: 26px; }
.proj-head h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 0 0 8px; letter-spacing: -0.5px; }
.proj-head .sub { color: var(--txt-dim); font-size: 1.05rem; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; }
.tags span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
    padding: 4px 10px;
    border-radius: 8px;
}
.shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin: 26px 0;
}
.shots img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--panel-brd);
    background: var(--bg-deep);
    display: block;
}
.prose p { color: var(--txt); }
.prose p + p { margin-top: 14px; }
.back {
    display: inline-block;
    margin-top: 28px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.back:hover { text-decoration: underline; }

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--txt-dim);
    font-size: 0.85rem;
    padding: 30px 16px 40px;
    border-top: 1px solid var(--panel-brd);
    margin-top: 40px;
}

@media (prefers-reduced-motion: reduce) {
    .c-cursor { animation: none; }
    .links a, .dd-btn, .dd-menu a { animation: none; background-position: 50% 0; }
    .dd-menu { transition: none; }
}

/* ---------- category dropdown menus ---------- */
.dropdown { position: relative; }
.dd-btn {
    font: inherit; cursor: pointer;
    color: var(--txt-dim); background: none; border: none;
    padding: 8px 14px; border-radius: 10px;
    font-size: 0.95rem; font-weight: 500;
    transition: color .18s ease, background .18s ease;
}
.dd-btn:hover,
.dropdown.open .dd-btn,
.dd-btn.active { color: var(--txt-strong); background-image: var(--sel-grad); background-size: 200% 100%; animation: selSweep 6s ease-in-out infinite; }
.dd-menu {
    position: absolute; top: 100%; left: 0;
    min-width: 210px;
    margin-top: 10px;              /* visual gap below the button */
    background: color-mix(in srgb, var(--bg-soft) 98%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--panel-brd); border-radius: 12px;
    padding: 6px; display: flex; flex-direction: column; gap: 2px;
    box-shadow: 0 18px 44px var(--shadow); z-index: 20;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
/* invisible bridge over the gap so the pointer never crosses a dead zone */
.dd-menu::before {
    content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
}
.dropdown.open > .dd-menu,
.dropdown:focus-within > .dd-menu {
    opacity: 1; visibility: visible; transform: none; pointer-events: auto;
    transition: opacity .16s ease, transform .16s ease;
}
@media (hover: hover) {
    .dropdown:hover > .dd-menu {
        opacity: 1; visibility: visible; transform: none; pointer-events: auto;
        transition: opacity .16s ease, transform .16s ease;
    }
}
.dd-menu a, .dd-soon {
    display: block; padding: 8px 12px; border-radius: 8px;
    text-decoration: none; color: var(--txt); font-size: 0.92rem; white-space: nowrap;
    transition: color .15s ease, background .15s ease;
}
.dd-menu a:hover,
.dd-menu a.active { color: var(--txt-strong); background-image: var(--sel-grad); background-size: 200% 100%; animation: selSweep 6s ease-in-out infinite; }
.dd-soon { color: var(--txt-dim); font-style: italic; }
/* machine menus: one column per project type, side by side when long */
.dd-group { display: flex; flex-direction: column; gap: 2px; }
.dd-group + .dd-group { margin-top: 6px; }
.dd-head {
    padding: 6px 12px 2px; font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: .08em; color: var(--accent);
}
.dd-menu.cols {
    flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 4px 10px;
    width: max-content; max-width: min(720px, 92vw);
}
.dd-menu.cols .dd-group + .dd-group { margin-top: 0; }
.caret { display: inline-block; opacity: .6; font-size: .8em; transition: transform .18s ease; }
.dropdown.open .caret { transform: rotate(180deg); }

/* ---------- Who I Am ---------- */
.who { display: flex; gap: 28px; align-items: center; margin-top: 40px; }
.who-text { flex: 1; }
.who-text h2 { margin-top: 0; font-size: 1.6rem; }
.who-text p a { color: var(--accent); text-decoration: none; }
.who-text p a:hover { text-decoration: underline; }
.who-logo { width: 150px; height: auto; flex-shrink: 0; filter: drop-shadow(0 8px 30px color-mix(in srgb, var(--accent) 25%, transparent)); }
.who-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.who-links a { color: var(--accent); text-decoration: none; font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; }
.who-links a:hover { text-decoration: underline; }
@media (max-width: 640px) { .who { flex-direction: column-reverse; } .who-logo { width: 110px; } }

/* ---------- spotlight (home) ---------- */
.spotlight { display: flex; gap: 32px; align-items: center; margin-top: 10px; }
.spot-logo { flex: 0 0 300px; }
.spot-logo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 30px color-mix(in srgb, var(--accent) 25%, transparent)); }
.spot-logo.boxed img { border-radius: 12px; border: 1px solid var(--panel-brd); }
.spot-text { flex: 1; min-width: 0; }
.spot-text h2 { margin: 6px 0 10px; font-size: 1.8rem; }
.spot-tag { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--accent); }
.spot-shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 20px; }
.spot-shots img { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--panel-brd); image-rendering: pixelated; }
.spot-shots img.photo { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 45%; image-rendering: auto; }
@media (max-width: 800px) { .spotlight { flex-direction: column; } .spot-logo { flex-basis: auto; width: min(260px, 70%); } }

/* ---------- category sections ---------- */
.cat { margin-top: 46px; }
.cat-title { font-size: 1.4rem; display: flex; align-items: center; gap: 10px; margin: 0 0 4px; }
.type-title {
    font-size: 1.05rem; display: flex; align-items: center; gap: 10px;
    margin: 22px 0 10px; color: var(--txt-dim); font-weight: 600;
}
.cat-count {
    font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-radius: 999px; padding: 2px 9px;
}

/* ---------- card extras ---------- */
.card .thumb { position: relative; }
.card .platforms { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.card .platforms span {
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: var(--txt-dim);
    border: 1px solid var(--panel-brd); border-radius: 6px; padding: 2px 7px;
}
.dl-badge {
    position: absolute; top: 8px; right: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--txt-strong);
    background: color-mix(in srgb, var(--bg-deep) 72%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: 999px; padding: 3px 9px; backdrop-filter: blur(4px);
}
.card.soon { opacity: .6; cursor: default; }
.card.soon:hover { transform: none; border-color: var(--panel-brd); box-shadow: none; }

/* ---------- project page: download + links ---------- */
.dl-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
.dl-count { color: var(--txt-dim); font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; }
.btn.disabled { opacity: .55; cursor: not-allowed; }
.btn.dl { color: var(--on-accent); }
.links-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
    color: var(--txt); background: var(--panel); border: 1px solid var(--panel-brd);
    border-radius: 10px; padding: 8px 14px; font-size: 0.9rem; font-weight: 500;
    transition: border-color .18s ease, transform .15s ease;
}
.chip:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); transform: translateY(-2px); }
.chip img { width: 20px; height: 20px; object-fit: contain; }

/* ---------- online-tool cards ---------- */
.tool-open { display: inline-block; margin-top: 12px; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--accent); }
.card.tool .thumb { background: var(--field); display: flex; align-items: center; justify-content: center; }
.card.tool .thumb img { width: auto; height: 62%; object-fit: contain; }

/* ---------- conversion forms (PythonExtra tools) ---------- */
.tool-intro { color: var(--txt-dim); margin: 0 0 24px; max-width: 640px; }
.tool-intro code, .prose code { font-family: 'JetBrains Mono', monospace; font-size: 0.88em; color: var(--accent2); }
.toolform { display: flex; flex-direction: column; gap: 20px; }
.toolform .field { display: flex; flex-direction: column; gap: 6px; }
.toolform label { font-weight: 600; color: var(--txt); }
.toolform small { color: var(--txt-dim); font-size: 0.82rem; }
.toolform input[type=text],
.toolform input[type=number],
.toolform select {
    background: var(--field); color: var(--txt);
    border: 1px solid var(--panel-brd); border-radius: 10px;
    padding: 10px 12px; font: inherit; font-size: 0.95rem; max-width: 440px;
}
.toolform input:focus, .toolform select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.toolform input[type=file] { color: var(--txt-dim); font: inherit; max-width: 440px; }
.toolform input[type=file]::file-selector-button {
    background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 8px;
    padding: 8px 14px; margin-right: 12px; cursor: pointer; font: inherit;
}
.toolform .check { flex-direction: row; align-items: flex-start; gap: 11px; }
.toolform .check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.toolform .check .lbl { display: flex; flex-direction: column; gap: 3px; }
.toolform .submit { margin-top: 6px; align-self: flex-start; border: none; cursor: pointer; font: inherit; font-size: 1rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }

/* ---------- conversion results ---------- */
.result-img { margin: 6px 0 22px; }
.result-img img { max-width: 100%; border: 1px solid var(--panel-brd); border-radius: 10px; background: var(--field); padding: 8px; }
.kv { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; color: var(--txt-dim); line-height: 2; }
.kv b { color: var(--txt); }

/* ============================================================
   Thèmes de couleurs (menu ⚙ à côté du logo, voir js/theme.js).
   Le thème par défaut « Midnight » est celui de :root ci-dessus.
   ============================================================ */
:root[data-theme="synthwave"] {
    --bg: #120a1f; --bg-soft: #1a0f2e; --bg-deep: #0b0614; --field: #1b1030;
    --panel: rgba(36, 18, 60, 0.72); --panel-brd: rgba(255, 110, 199, 0.20);
    --txt: #f1e6ff; --txt-dim: #a893c4; --txt-strong: #ffffff;
    --accent: #ff6ec7; --accent2: #7df9ff; --on-accent: #1a0012;
    --sel-a: #ff6ec7; --sel-b: #ffd319;
    --c-kw: #ff6ec7; --c-type: #7df9ff; --c-str: #ffd319; --c-num: #ff9e64; --c-com: #7a6a96;
    --c-fn: #f9c74f; --c-pre: #ff7edb; --c-punct: #c3a6ff; --c-id: #e8dcff;
}
:root[data-theme="matrix"] {
    --bg: #030a05; --bg-soft: #06120a; --bg-deep: #020603; --field: #07140b;
    --panel: rgba(8, 24, 14, 0.74); --panel-brd: rgba(80, 255, 140, 0.16);
    --txt: #c8f7d4; --txt-dim: #6f9c7c; --txt-strong: #eafff0;
    --accent: #39ff88; --accent2: #b6ff3b; --on-accent: #021208;
    --sel-a: #39ff88; --sel-b: #b6ff3b;
    --c-kw: #39ff88; --c-type: #7dffb0; --c-str: #b6ff3b; --c-num: #5cffc8; --c-com: #3d6b4a;
    --c-fn: #a8ff60; --c-pre: #2ee88a; --c-punct: #6fcf8d; --c-id: #aef5c4;
}
:root[data-theme="ember"] {
    --bg: #120806; --bg-soft: #1a0d09; --bg-deep: #0b0503; --field: #1c0f0a;
    --panel: rgba(36, 18, 12, 0.72); --panel-brd: rgba(255, 150, 90, 0.18);
    --txt: #f5e3d8; --txt-dim: #b08f7e; --txt-strong: #fff7f2;
    --accent: #ff8a3d; --accent2: #ff4d6d; --on-accent: #1f0a00;
    --sel-a: #ff8a3d; --sel-b: #ffd166;
    --c-kw: #ff4d6d; --c-type: #ffb86b; --c-str: #ffd166; --c-num: #f78c6b; --c-com: #8a6a5c;
    --c-fn: #ffcf70; --c-pre: #ff7a59; --c-punct: #d1a18a; --c-id: #f2d9c9;
}
:root[data-theme="macchiato"] {
    --bg: #24273a; --bg-soft: #1e2030; --bg-deep: #181926; --field: #1e2030;
    --panel: rgba(54, 58, 79, 0.72); --panel-brd: rgba(183, 189, 248, 0.18);
    --txt: #cad3f5; --txt-dim: #a5adcb; --txt-strong: #f4f6ff;
    --accent: #8aadf4; --accent2: #c6a0f6; --on-accent: #181926;
    --sel-a: #8aadf4; --sel-b: #f5bde6;
    --c-kw: #c6a0f6; --c-type: #eed49f; --c-str: #a6da95; --c-num: #f5a97f; --c-com: #6e738d;
    --c-fn: #8aadf4; --c-pre: #f5bde6; --c-punct: #939ab7; --c-id: #cad3f5;
    --shadow: rgba(10, 10, 20, 0.45);
}
:root[data-theme="nord"] {
    --bg: #2e3440; --bg-soft: #272c36; --bg-deep: #242933; --field: #3b4252;
    --panel: rgba(59, 66, 82, 0.72); --panel-brd: rgba(136, 192, 208, 0.20);
    --txt: #eceff4; --txt-dim: #a3adbf; --txt-strong: #ffffff;
    --accent: #88c0d0; --accent2: #b48ead; --on-accent: #2e3440;
    --sel-a: #88c0d0; --sel-b: #8fbcbb;
    --c-kw: #81a1c1; --c-type: #8fbcbb; --c-str: #a3be8c; --c-num: #b48ead; --c-com: #616e88;
    --c-fn: #88c0d0; --c-pre: #5e81ac; --c-punct: #d8dee9; --c-id: #e5e9f0;
    --shadow: rgba(15, 18, 24, 0.45);
}
:root[data-theme="paper"] {
    --bg: #f6f4ef; --bg-soft: #ece8df; --bg-deep: #e4dfd3; --field: #ffffff;
    --panel: rgba(255, 255, 255, 0.78); --panel-brd: rgba(60, 50, 30, 0.14);
    --txt: #2b2a27; --txt-dim: #6b665c; --txt-strong: #111111;
    --accent: #1f6feb; --accent2: #c2410c; --on-accent: #ffffff;
    --sel-a: #1f6feb; --sel-b: #7c3aed;
    --c-kw: #cf222e; --c-type: #0550ae; --c-str: #0a3069; --c-num: #8250df; --c-com: #8c959f;
    --c-fn: #953800; --c-pre: #bc4c00; --c-punct: #57606a; --c-id: #24292f;
    --shadow: rgba(60, 50, 30, 0.14);
    color-scheme: light;
}

/* ---------- menu Préférences (⚙ à côté du logo) ---------- */
.brand-wrap { display: flex; align-items: center; gap: 8px; }
.prefs { position: relative; }
.prefs-btn {
    width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
    display: grid; place-items: center; font-size: 1.05rem; line-height: 1;
    color: var(--txt-dim); background: transparent; border: 1px solid var(--panel-brd);
    transition: color .15s ease, background .15s ease, transform .3s ease;
}
.prefs-btn:hover, .prefs.open .prefs-btn {
    color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.prefs.open .prefs-btn { transform: rotate(60deg); }
.prefs-menu {
    position: absolute; top: 100%; left: 0; margin-top: 10px; z-index: 30;
    width: 260px; padding: 12px;
    background: color-mix(in srgb, var(--bg-soft) 98%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--panel-brd); border-radius: 12px;
    box-shadow: 0 18px 44px var(--shadow);
    display: none;
}
.prefs.open .prefs-menu { display: block; }
.prefs-title {
    margin: 0 0 8px; font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: .08em; color: var(--accent);
}
.theme-opt {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 7px 8px; border-radius: 8px; cursor: pointer; text-align: left;
    background: transparent; border: 1px solid transparent; color: var(--txt);
    font: inherit; font-size: 0.9rem;
}
.theme-opt:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.theme-opt[aria-checked="true"] { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.theme-opt .mood { margin-left: auto; color: var(--txt-dim); font-size: 0.78rem; }
.swatch {
    display: inline-flex; flex-shrink: 0; width: 42px; height: 18px; border-radius: 5px; overflow: hidden;
    border: 1px solid var(--panel-brd);
}
.swatch i { flex: 1; }
.prefs-title.neko-title { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--panel-brd); }
.neko-sizes { display: flex; gap: 6px; }
.neko-opt {
    flex: 1; padding: 6px 0; border-radius: 8px; cursor: pointer;
    background: transparent; border: 1px solid var(--panel-brd); color: var(--txt);
    font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
}
.neko-opt:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.neko-opt[aria-checked="true"] { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); }
.swatch.dice { align-items: center; justify-content: center; font-style: normal; font-size: 0.9rem; }

/* ---------- transcribed V1 content (project and about pages) ---------- */
.article { margin-top: 10px; }
.article h2 { font-size: 1.3rem; margin: 34px 0 12px; color: var(--txt-strong); }
.article .prose { margin: 14px 0; }
.prose li { margin: 6px 0 6px 1.2em; }
.prose a { color: var(--accent); }
.prose table { border-collapse: collapse; margin: 12px auto; width: 100%; font-size: 0.92rem; }
.prose td, .prose th { padding: 8px 12px; border-bottom: 1px solid var(--panel-brd); text-align: left; }
.prose tr:first-child td { color: var(--accent); font-weight: 600; }
.prose pre {
    background: var(--field); border: 1px solid var(--panel-brd); border-radius: 10px;
    padding: 12px 14px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
    color: var(--c-str);
}
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px; margin: 18px 0;
}
.gallery.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery img {
    width: 100%; display: block; border-radius: 10px; image-rendering: pixelated;
    border: 1px solid var(--panel-brd); background: var(--bg-deep);
    transition: transform .15s ease, border-color .15s ease;
}
.gallery a:hover img { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.gallery .g-item { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.gallery .g-item figcaption { color: var(--txt-dim); font-size: 0.85rem; line-height: 1.4; text-align: center; padding: 0 4px; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 18px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--panel-brd); }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

/* entre 1024 et 1400 px, la barre tient sur une ligne avec ses dix entrees */
@media (max-width: 1400px) {
    .links { gap: 3px; }
    .links a, .dd-btn { padding: 8px 9px; }
}

/* ---------- documentation pages (doc.html) : code, figures, cards, navigation ---------- */
.prose pre.code { color: var(--c-id); line-height: 1.45; max-height: none; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; scrollbar-color: var(--panel-brd) transparent; }
.prose figure { margin: 20px 0; text-align: center; }
.prose figure img {
    image-rendering: pixelated; border: 1px solid var(--panel-brd); border-radius: 8px;
    max-width: 100%; height: auto; background: var(--bg-deep);
}
/* les logos des logiciels (…/logo.png, détourés) : sans cadre ni fond, le fond du site se voit autour */
.prose figure img[src$="/logo.png"] {
    image-rendering: auto; border: 0; border-radius: 0; background: none;
    filter: drop-shadow(0 8px 30px color-mix(in srgb, var(--accent) 25%, transparent));
}
.prose figcaption { color: var(--txt-dim); font-size: 0.88rem; margin-top: 8px; }
.prose h3.doc-sub { font-size: 1.08rem; color: var(--txt-strong); margin: 28px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--panel-brd); }
.doc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.doc-cards a {
    display: block; border: 1px solid var(--panel-brd); border-radius: 12px; overflow: hidden;
    background: var(--panel); color: var(--txt); text-decoration: none;
    transition: transform .15s ease, border-color .15s ease;
}
.doc-cards a:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.doc-cards img {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: left top;
    image-rendering: pixelated; display: block; background: var(--bg-deep); border-radius: 0;
}
.doc-cards b { display: block; padding: 10px 12px 2px; color: var(--txt-strong); }
.doc-cards span { display: block; padding: 0 12px 12px; font-size: 0.88rem; color: var(--txt-dim); }
.doc-nav { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0 6px; flex-wrap: wrap; }
.doc-nav a { color: var(--accent); text-decoration: none; }
.doc-nav a:hover { text-decoration: underline; }

/* ---------- visionneuse d'images (js/lightbox.js) ---------- */
.shots img, .spot-shots img, .article figure img, .prose figure img { cursor: zoom-in; }
.card img, .spot-logo img { cursor: pointer; }
html.lb-open { overflow: hidden; }
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 56px 72px 64px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
}
.lightbox.open { display: flex; animation: lbIn .16s ease-out; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-fig {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.lb-img {
    display: block;
    max-width: 100%;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--panel-brd);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
    background: var(--bg-deep);
}
.lb-img.crisp { image-rendering: pixelated; }
.lb-cap { color: var(--txt); font-size: .95rem; text-align: center; max-width: 72ch; }
.lb-btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--panel-brd);
    background: color-mix(in srgb, var(--bg-soft) 85%, transparent);
    color: var(--txt-strong);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.lb-btn:hover, .lb-btn:focus-visible {
    background: color-mix(in srgb, var(--accent) 22%, var(--bg-soft));
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    outline: none;
}
.lb-btn[hidden] { display: none; }
.lb-close { top: 14px; right: 16px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-bar {
    position: absolute;
    left: 0; right: 0; bottom: 18px;
    display: flex;
    justify-content: center;
    gap: 22px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .82rem;
    color: var(--txt-dim);
}
.lb-raw { color: var(--accent); text-decoration: none; }
.lb-raw:hover { text-decoration: underline; }
@media (max-width: 720px) {
    .lightbox { padding: 56px 12px 64px; }
    .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; width: 40px; height: 40px; }
}

/* ---------- project page: Download section (files hosted on this server) ---------- */
.proj-head .jump-dl { display: inline-block; margin-top: 18px; padding: 9px 18px; }
.dl-section { margin-top: 34px; }
.dl-section h2 { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; }
.dl-total { color: var(--txt-dim); font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; font-weight: 400; }
.dl-files { display: grid; gap: 12px; }
.dl-file {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px 18px;
    background: var(--panel); border: 1px solid var(--panel-brd); border-radius: 12px; padding: 14px 18px;
}
.dl-ico { position: relative; width: 48px; height: 48px; flex: none; }
.dl-ico img.main { display: block; width: 48px; height: 48px; }
.dl-ico img.app { border-radius: 11px; object-fit: cover; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.dl-ico img.badge { position: absolute; right: -7px; bottom: -7px; width: 24px; height: 24px; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35)); }
.dl-info { min-width: 0; }
.dl-name { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: var(--txt-strong); overflow-wrap: anywhere; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--txt-dim); font-size: 0.86rem; margin-top: 2px; }
.dl-meta span:first-child { color: var(--accent); }
.dl-sha { margin-top: 6px; font-size: 0.8rem; color: var(--txt-dim); }
.dl-sha summary { cursor: pointer; width: max-content; }
.dl-sha code { display: block; margin-top: 4px; font-family: 'JetBrains Mono', monospace; overflow-wrap: anywhere; color: var(--txt); }
.dl-file .btn.dl { white-space: nowrap; padding: 10px 18px; }
.dl-note, .dl-wait { color: var(--txt-dim); font-size: 0.86rem; margin: 6px 0 0; }
.dl-note code { font-family: 'JetBrains Mono', monospace; font-size: 0.9em; color: var(--accent2); }
.dl-note a, footer a { color: var(--accent); }
@media (max-width: 560px) {
    .dl-file { grid-template-columns: auto 1fr; }
    .dl-file .btn.dl { grid-column: 1 / -1; text-align: center; }
}

.spotlight { position: relative; }
.spotlight .spot-badge {
    position: absolute; top: -14px; left: -14px; z-index: 2;
    width: 96px; height: auto; pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45));
    transform: rotate(-8deg);
}
@media (max-width: 600px) { .spotlight .spot-badge { width: 72px; top: -10px; left: -6px; } }

/* AppImage for older Linux distributions (glibc 2.28) */
.dl-archive { margin-top: 18px; border: 1px solid var(--panel-brd); border-radius: 12px; background: var(--panel); padding: 10px 16px; }
.dl-archive > summary { cursor: pointer; font-weight: 600; color: var(--txt-dim); }
.dl-archive[open] > summary { margin-bottom: 8px; }
.dl-arch-ver h3 { font-size: 1rem; margin: 12px 0 6px; }
.dl-arch-ver h3 span { font-weight: 400; color: var(--txt-dim); font-size: 0.85rem; margin-left: 8px; }
.dl-arch-ver ul { list-style: none; margin: 0; padding: 0; }
.dl-arch-ver li { padding: 6px 0; border-top: 1px solid var(--panel-brd); overflow-wrap: anywhere; }
.dl-arch-ver a { color: var(--accent); font-family: ui-monospace, monospace; text-decoration: none; }
.dl-arch-ver a:hover { text-decoration: underline; }
.dl-arch-meta { display: block; font-size: 0.85rem; color: var(--txt-dim); }
.dl-file .dl-for { font-size: 0.86rem; color: var(--accent2); margin-top: 2px; }

/* ---------- nSuit : badge « Part of nSuit » et page de la suite ---------- */
.proj-head { position: relative; }
.suite-badge { display: inline-block; margin-top: 16px; transition: transform .15s ease; }
.suite-badge img { display: block; width: 190px; height: auto; filter: drop-shadow(0 6px 18px var(--shadow)); }
.suite-badge:hover { transform: translateY(-2px) scale(1.03); }
@media (min-width: 820px) {
    .proj-head .suite-badge { position: absolute; top: -6px; right: 0; margin: 0; }
    .proj-head:has(.suite-badge) { padding-right: 215px; min-height: 120px; }
}
.suite-hero { display: block; width: min(560px, 100%); height: auto; margin: 0 auto 8px; filter: drop-shadow(0 8px 30px color-mix(in srgb, var(--accent) 22%, transparent)); }
.suite-lead { text-align: center; font-size: 1.12rem; max-width: 760px; margin: 0 auto 6px; }
.suite-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 22px 0 8px; }
.suite-card {
    display: flex; flex-direction: column; gap: 8px; padding: 16px;
    background: var(--bg-soft); border: 1px solid var(--panel-brd); border-radius: var(--radius);
    color: var(--txt); transition: transform .15s ease, border-color .15s ease;
}
.suite-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.suite-card .sc-head { display: flex; align-items: center; gap: 12px; }
.suite-card .sc-head img { width: 64px; height: 64px; object-fit: contain; flex: 0 0 64px; }
.suite-card h3 { margin: 0; font-size: 1.12rem; color: var(--txt-strong); }
.suite-card .sc-ver { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--accent); }
.suite-card p { margin: 0; font-size: 0.92rem; color: var(--txt-dim); line-height: 1.45; flex: 1; }
.suite-card .sc-links { display: flex; flex-wrap: wrap; gap: 6px; }
.suite-card a.sc-head { color: inherit; text-decoration: none; }
.suite-card .sc-links a {
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; padding: 3px 8px;
    border: 1px solid var(--panel-brd); border-radius: 999px; color: var(--txt); text-decoration: none;
}
.suite-card .sc-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- comments of the project pages ---------- */
.comments { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--panel-brd); }
.comments h2 { margin: 0 0 14px; }
.cm-thread { margin-bottom: 14px; }
.cm { border: 1px solid var(--panel-brd); border-radius: 12px; padding: 10px 14px; background: color-mix(in srgb, var(--panel) 80%, transparent); }
.cm-reply { margin: 8px 0 0 28px; }
.cm-author { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.cm-new { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.cm-hd { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.cm-badge { font-size: .72rem; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.cm-ts { color: var(--txt-dim); font-size: .82rem; }
.cm-body { line-height: 1.55; overflow-wrap: anywhere; }
.cm-body a { color: var(--accent); }
.cm-replybtn { margin: 6px 0 0 28px; background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: .88rem; padding: 2px 0; }
.cm-form { display: grid; gap: 8px; margin: 10px 0; }
.cm-thread .cm-form { margin-left: 28px; }
.cm-form h3 { margin: 10px 0 2px; font-size: 1.05rem; }
.cm-form input, .cm-form textarea { font: inherit; color: inherit; background: var(--field); border: 1px solid var(--panel-brd); border-radius: 10px; padding: 8px 10px; max-width: 100%; }
.cm-form input.cm-name { max-width: 340px; }
.cm-form textarea { min-height: 110px; resize: vertical; }
.cm-form .cm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cm-send { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cm-msg { color: var(--txt-dim); font-size: .9rem; }
.cm-msg.err { color: #ff8c94; }
.cm-note, .cm-none, .cm-wait { color: var(--txt-dim); font-size: .88rem; }
@media (max-width: 600px) { .cm-reply, .cm-replybtn, .cm-thread .cm-form { margin-left: 12px; } }

/* ---------- nShop, the community store (shop.html, js/shop.js) ---------- */
.shop-hero { display: flex; gap: 28px; align-items: center; }
.shop-logo { flex: 0 0 320px; width: 320px; height: auto; filter: drop-shadow(0 8px 30px color-mix(in srgb, var(--accent) 25%, transparent)); }
.shop-intro { flex: 1; min-width: 0; }
.shop-intro h1 { margin: 4px 0 0; font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -1px; color: var(--txt-strong); }
.shop-intro a:not(.btn) { color: var(--accent); }
.shop-slogan { margin: 0 0 10px; font-weight: 700; color: var(--accent2); font-family: 'JetBrains Mono', monospace; font-size: .95rem; }
.btn.shop-share-btn::before { content: "＋ "; }
@media (max-width: 800px) { .shop-hero { flex-direction: column; text-align: center; } .shop-logo { flex-basis: auto; width: min(300px, 80%); } .shop-intro .spot-cta { justify-content: center; } }

.shop-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.shop-cats button {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: inherit; font-size: .88rem; font-weight: 500;
    color: var(--txt); background: var(--panel); border: 1px solid var(--panel-brd); border-radius: 999px; padding: 5px 12px 5px 6px;
    transition: border-color .18s ease, transform .15s ease;
}
.shop-cats button img { width: 24px; height: 24px; object-fit: contain; }
.shop-cats button span { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--txt-dim); }
.shop-cats button:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); transform: translateY(-1px); }
.shop-cats button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--txt-strong); }
.shop-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-tools input, .shop-tools select { font: inherit; color: inherit; background: var(--field); border: 1px solid var(--panel-brd); border-radius: 10px; padding: 8px 12px; }
.shop-tools input { flex: 1; min-width: 200px; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.shop-card {
    display: flex; flex-direction: column; text-decoration: none; color: inherit; overflow: hidden;
    background: var(--panel); border: 1px solid var(--panel-brd); border-radius: 14px; backdrop-filter: blur(10px);
    transition: transform .15s ease, border-color .18s ease, box-shadow .2s ease;
}
.shop-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 40px var(--shadow); }
.shop-card.featured { border-color: color-mix(in srgb, var(--accent2) 60%, transparent); }
.sh-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--field); display: flex; align-items: center; justify-content: center; }
.sh-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sh-thumb img.sh-icon { width: 45%; height: auto; object-fit: contain; opacity: .9; }
.sh-star { position: absolute; top: 8px; left: 8px; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent2); color: var(--on-accent); }
.sh-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sh-app { display: flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: .74rem; color: var(--accent); }
.sh-app img { width: 18px; height: 18px; object-fit: contain; }
.shop-card h3 { margin: 0; font-size: 1.05rem; color: var(--txt-strong); line-height: 1.3; }
.sh-ver { font-family: 'JetBrains Mono', monospace; font-size: .74rem; font-weight: 500; color: var(--txt-dim); }
.sh-desc { margin: 0; font-size: .88rem; color: var(--txt-dim); line-height: 1.45; flex: 1; overflow-wrap: anywhere; }
.sh-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--txt-dim); }
.sh-meta span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-empty { grid-column: 1 / -1; text-align: center; padding: 30px; border: 1px dashed var(--panel-brd); border-radius: 14px; color: var(--txt-dim); }
.shop-empty .btn { display: inline-block; }

.shop-detail { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.shop-detail[hidden] { display: none; }
.shop-detail-back { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg-deep) 78%, transparent); backdrop-filter: blur(3px); }
.shop-detail-box { position: relative; width: min(820px, 100%); background: var(--bg-soft); }
body.shop-modal { overflow: hidden; }
.sd-close { position: absolute; top: 10px; right: 12px; font-size: 1.6rem; line-height: 1; background: none; border: 0; color: var(--txt-dim); cursor: pointer; padding: 4px 8px; }
.sd-close:hover { color: var(--txt-strong); }
.sd-head { display: flex; gap: 14px; align-items: center; padding-right: 30px; }
.sd-head > img { width: 64px; height: 64px; object-fit: contain; flex: 0 0 64px; }
.sd-head h2 { margin: 2px 0; font-size: 1.5rem; color: var(--txt-strong); }
.sd-meta { font-size: .86rem; color: var(--txt-dim); }
.sd-feat { color: var(--accent2); }
.sd-shot { display: block; margin: 16px 0 0; }
.sd-shot img { max-width: 100%; max-height: 420px; display: block; margin: 0 auto; border-radius: 10px; border: 1px solid var(--panel-brd); }
.sd-desc { margin: 16px 0; line-height: 1.6; overflow-wrap: anywhere; }
.sd-desc a { color: var(--accent); }
.sd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-tags button { font: inherit; font-size: .8rem; cursor: pointer; color: var(--accent); background: none; border: 1px solid var(--panel-brd); border-radius: 999px; padding: 1px 9px; }
.shop-detail-box h3 { margin: 18px 0 8px; font-size: 1.05rem; }
.sd-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sd-files li { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--panel-brd); border-radius: 10px; background: var(--panel); }
.sd-fname { font-family: 'JetBrains Mono', monospace; font-size: .9rem; overflow-wrap: anywhere; }
.sd-fsize { font-size: .82rem; color: var(--txt-dim); white-space: nowrap; }
.sd-dl { padding: 6px 14px; font-size: .88rem; }
.sd-sha { grid-column: 1 / -1; font-size: .68rem; color: var(--txt-dim); overflow-wrap: anywhere; }
.sd-pkg { grid-column: 1 / -1; font-size: .85rem; margin-top: .3rem; }
.sd-pkg summary { cursor: pointer; color: var(--accent, inherit); font-weight: 600; }
.sd-pkg ul { margin: .3rem 0 .3rem 1rem; padding: 0; }
.sd-pkg p { margin: .2rem 0; color: var(--txt-dim); }
.sd-papp { color: var(--txt-dim); font-size: .78rem; }
.sd-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0 6px; }
.sd-stars { display: inline-flex; gap: 2px; }
.sd-stars button { font-size: 1.5rem; line-height: 1; cursor: pointer; background: none; border: 0; padding: 0 2px; color: var(--txt-dim); opacity: .45; }
.sd-stars button.on, .sd-stars:hover button { color: #f5b301; opacity: 1; }
.sd-stars button:hover ~ button { color: var(--txt-dim); opacity: .45; }
.sd-rating { font-size: .85rem; color: var(--txt-dim); margin-left: 8px; }
.sh-rate { color: #f5b301; } .sh-rate.none { color: var(--txt-dim); }
.sh-kind { color: var(--accent); }
.sd-web { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.sd-web .btn img { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
.sd-who button { border-style: dashed; }
.sf-aud { border: 1px solid var(--panel-brd); border-radius: 8px; padding: 6px 10px; margin: 0; }
.sf-aud div { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.shop-tools select { min-width: 0; }
@media (max-width: 560px) { .sd-files li { grid-template-columns: 1fr auto; } .sd-dl { grid-column: 1 / -1; text-align: center; } }

.shop-share { margin-top: 40px; }
.shop-share h2, .shop-app-note h2 { margin-top: 0; }
.shop-app-note { margin-top: 24px; }
.shop-app-note a { color: var(--accent); }
.shop-rules { padding-left: 20px; line-height: 1.55; }
.shop-rules li { margin-bottom: 4px; }
.shop-form label { display: grid; gap: 4px; font-size: .88rem; color: var(--txt-dim); }
.shop-form label[hidden] { display: none; }
.shop-form select { font: inherit; color: inherit; background: var(--field); border: 1px solid var(--panel-brd); border-radius: 10px; padding: 8px 10px; }
.shop-form input[type=file] { padding: 6px; }
.shop-form .sf-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.shop-form .sf-check { display: flex; gap: 8px; align-items: flex-start; color: var(--txt); }
.shop-form .sf-check input { margin-top: 4px; }
.shop-form .cm-note a { color: var(--accent); }
.suite-shop { display: flex; gap: 20px; align-items: center; }
.suite-shop > a img { width: 180px; height: auto; display: block; }
.suite-shop .btn { margin-right: 8px; }
@media (max-width: 600px) { .suite-shop { flex-direction: column; text-align: center; } }
