/* ============================================================
   Sunkro UI — feuille de style partagée des outils PDF
   Charte : anthracite #31383F · or #B29C6E · crème #EDE6D8
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600&display=swap');

:root {
    --ink:      #31383F;
    --ink-2:    #3D454D;
    --ink-3:    #4A525A;
    --gold:     #B29C6E;
    --gold-lt:  #C9B788;
    --gold-soft:#D8C7A2;
    --cream:    #EDE6D8;
    --paper:    #FBFAF7;
    --steel:    #8A9BB0;
    --txt:      #2E343A;
    --mute:     #737C86;
    --hair:     #E2DED4;
    --danger:   #B4453C;
    --ok:       #4F7A5B;

    --radius:   14px;
    --radius-s: 9px;
    --shadow:   0 24px 70px rgba(20, 26, 32, .32);
    --shadow-s: 0 2px 10px rgba(49, 56, 63, .06);
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 300;
    background:
        radial-gradient(1000px 620px at 12% -12%, #40484F 0%, transparent 62%),
        radial-gradient(900px 560px at 108% 8%, #3A424A 0%, transparent 58%),
        #2B3138;
    min-height: 100vh;
    padding: 34px 20px;
    color: var(--txt);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ---------------------------------------------------- header */
header {
    position: relative;
    background: var(--ink);
    color: #fff;
    padding: 40px 40px 34px;
    text-align: left;
    overflow: hidden;
}

header::after {
    content: '';
    position: absolute;
    right: -110px; top: -190px;
    width: 520px; height: 460px;
    background: url('orbits.png') no-repeat center / contain;
    opacity: .5;
    pointer-events: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 26px;
    position: relative;
    text-decoration: none;
    transition: opacity .2s;
}

a.brand:hover { opacity: .72; }

.brand img { width: 30px; height: 30px; }

.brand span {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: .12em;
    color: var(--gold);
}

header h1 {
    font-size: 30px;
    font-weight: 200;
    letter-spacing: -.01em;
    line-height: 1.15;
    position: relative;
    margin-bottom: 12px;
}

header h1 em { font-style: normal; color: var(--gold); }

header p {
    font-size: 13px;
    font-weight: 300;
    color: #A9B3BE;
    position: relative;
    max-width: 460px;
}

/* ---------------------------------------------------- nav */
.nav {
    display: flex;
    background: var(--ink-2);
    border-top: 1px solid rgba(255,255,255,.06);
    overflow-x: auto;
    scrollbar-width: thin;
}

.nav a {
    flex: 1 1 auto;
    padding: 15px 20px;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    color: #9FA9B4;
    font-weight: 400;
    font-size: 13.5px;
    letter-spacing: .02em;
    border-bottom: 2px solid transparent;
    transition: color .2s, background .2s, border-color .2s;
}

.nav a:hover { color: var(--cream); background: rgba(255,255,255,.04); }

.nav a.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: rgba(178,156,110,.08);
}

/* lien de retour à l'accueil, épinglé à gauche de la barre */
.nav .nav-home {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 15px 20px;
    border-right: 1px solid rgba(255,255,255,.07);
}

.nav .nav-home svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ---------------------------------------------------- contenu */
.content { padding: 36px 40px 42px; }

.step { display: none; animation: fade .28s ease; }
.step.active { display: block; }

@keyframes fade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-title {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 17px;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hair);
}

.step-title.spaced { margin-top: 36px; }

.step-number {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-weight: 500; font-size: 13px;
}

/* ---------------------------------------------------- dropzone */
.dropzone {
    border: 1.5px dashed var(--gold-soft);
    border-radius: var(--radius-s);
    padding: 52px 24px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(180deg, #FDFCF9 0%, #F7F4EC 100%);
    transition: border-color .25s, background .25s, transform .25s;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--gold);
    background: linear-gradient(180deg, #FBF7EE 0%, #F2ECDD 100%);
    transform: translateY(-1px);
}

.dropzone-icon {
    font-size: 0;
    margin-bottom: 16px;
    line-height: 0;
}

.dropzone-icon svg { width: 42px; height: 42px; stroke: var(--gold); }

.dropzone-text { font-size: 14.5px; color: var(--mute); line-height: 1.65; }
.dropzone-text strong { color: var(--ink); font-weight: 500; display: block; margin-bottom: 3px; }

.file-input { display: none; }

/* ---------------------------------------------------- encadrés */
.info-box, .warning-box, .warn-box, .error-box, .error {
    padding: 15px 17px;
    border-radius: var(--radius-s);
    margin: 22px 0;
    font-size: 13.5px;
    line-height: 1.6;
    border-left: 3px solid var(--gold);
    background: var(--cream);
    color: var(--txt);
}

.info-box strong, .warning-box strong, .warn-box strong { color: var(--ink); font-weight: 500; }

.warning-box, .warn-box {
    background: #FAF3E2;
    border-left-color: #C79A3B;
}

.error-box, .error {
    background: #F8E9E7;
    border-left-color: var(--danger);
    color: #7C2F28;
}

.info-box code, .warn-box code {
    background: rgba(49,56,63,.08);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------------------------------------------------- formulaires */
.form-group { margin: 24px 0; }

/* enfant direct uniquement : sinon la règle écrase les <label> des options
   radio et des lignes d'options, qui sont eux aussi dans un .form-group */
.form-group > label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 9px;
}

.form-group input[type="text"],
.form-group textarea,
.preview-table input,
.range-input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    font-size: 14px;
    font-family: inherit;
    font-weight: 300;
    color: var(--txt);
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.preview-table input:focus,
.range-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(178,156,110,.14);
}

.form-group small { display: block; margin-top: 7px; font-size: 12.5px; color: var(--mute); }

/* ---------------------------------------------------- radios */
.radio-group { display: flex; gap: 11px; flex-wrap: wrap; }

.radio-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 17px;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: border-color .18s, background .18s;
}

.radio-option:hover { border-color: var(--gold-soft); background: #FDFBF6; }

.radio-option input[type="radio"] { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; }

.radio-option:has(input:checked) {
    border-color: var(--gold);
    background: #FBF7EE;
    box-shadow: inset 0 0 0 1px rgba(178,156,110,.35);
}

/* ---------------------------------------------------- boutons */
.btn {
    background: var(--ink);
    color: var(--cream);
    border: 1px solid var(--ink);
    padding: 12px 26px;
    border-radius: var(--radius-s);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .01em;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s, border-color .2s;
}

.btn:hover:not(:disabled) {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
    transform: translateY(-1px);
}

.btn:active:not(:disabled) { transform: translateY(0); }

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

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--hair);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--cream);
    color: var(--ink);
    border-color: var(--gold-soft);
}

.btn-group { display: flex; gap: 11px; margin-top: 28px; flex-wrap: wrap; }

.hidden { display: none !important; }

/* ---------------------------------------------------- canvas (zone) */
.canvas-container {
    position: relative;
    display: inline-block;
    margin: 18px 0;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    overflow: hidden;
    cursor: crosshair;
    box-shadow: var(--shadow-s);
}

.selection-rect {
    position: absolute;
    border: 2px solid var(--gold);
    background: rgba(178,156,110,.18);
    pointer-events: none;
}

/* ---------------------------------------------------- tableau d'aperçu */
.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 13.5px;
    background: #fff;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    overflow: hidden;
}

.preview-table th {
    background: var(--ink);
    color: var(--cream);
    padding: 12px 14px;
    text-align: left;
    font-weight: 400;
    font-size: 11.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    border-bottom: none;
}

.preview-table td { padding: 11px 14px; border-bottom: 1px solid var(--hair); }
.preview-table tr:last-child td { border-bottom: none; }
.preview-table tr.no-name { background: #FAF3E2; }
.preview-table input { padding: 8px 10px; font-size: 13.5px; }

/* ---------------------------------------------------- progression */
.progress-bar {
    width: 100%;
    height: 22px;
    background: var(--hair);
    border-radius: 99px;
    overflow: hidden;
    margin: 22px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #CDB98C);
    width: 0%;
    transition: width .3s ease;
    display: flex; align-items: center; justify-content: center;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
}

/* ---------------------------------------------------- liste de fichiers (fusion) */
.file-list { margin-top: 18px; }

.file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 13px 15px;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    margin-bottom: 10px;
    background: #fff;
    box-shadow: var(--shadow-s);
    transition: border-color .18s, box-shadow .18s, transform .18s, opacity .18s;
}

.file-item:hover { border-color: var(--gold-soft); box-shadow: 0 4px 16px rgba(49,56,63,.08); }
.file-item.dragging { opacity: .35; transform: scale(.99); }
.file-item.dragover-target { border-color: var(--gold); background: #FBF7EE; }

.drag-handle {
    cursor: grab;
    color: #C3BCAC;
    font-size: 17px;
    user-select: none;
    padding: 0 2px;
    transition: color .18s;
}

.drag-handle:hover { color: var(--gold); }
.drag-handle:active { cursor: grabbing; }

.thumb {
    width: 44px; height: 60px;
    border: 1px solid var(--hair);
    border-radius: 4px;
    background: #fff;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: var(--shadow-s);
}

.file-meta { flex: 1; min-width: 0; }

.file-name {
    font-weight: 400;
    font-size: 14px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-sub {
    font-size: 11.5px;
    color: var(--mute);
    margin-top: 3px;
    letter-spacing: .03em;
}

.range-input { width: 132px; padding: 8px 10px; font-size: 13px; }
.range-input.invalid { border-color: var(--danger); background: #FDF5F4; }

.icon-btn {
    background: transparent;
    border: 1px solid var(--hair);
    width: 30px; height: 30px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 11px;
    color: var(--mute);
    transition: all .16s;
    flex-shrink: 0;
}

.icon-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); background: #FBF7EE; }
.icon-btn.remove:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); background: #FDF5F4; }
.icon-btn:disabled { opacity: .25; cursor: not-allowed; }

.summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    background: var(--ink);
    color: var(--cream);
    border-radius: var(--radius-s);
    margin-top: 20px;
    font-size: 13.5px;
    font-weight: 300;
    flex-wrap: wrap;
    gap: 12px;
}

.summary strong { color: var(--gold); font-weight: 500; }

.summary .btn-secondary {
    background: transparent;
    color: #A9B3BE;
    border-color: rgba(255,255,255,.18);
    padding: 7px 15px;
    font-size: 12.5px;
}

.summary .btn-secondary:hover { background: rgba(255,255,255,.08); color: var(--cream); border-color: rgba(255,255,255,.3); }

.empty {
    text-align: center;
    color: var(--mute);
    padding: 34px 12px;
    font-size: 13.5px;
    border: 1px dashed var(--hair);
    border-radius: var(--radius-s);
    background: #fff;
}

/* ---------------------------------------------------- accueil (hub) */
.hub-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hair);
}

.hub-bar h2 {
    font-size: 17px;
    font-weight: 400;
    color: var(--ink);
}

.hub-search {
    width: 220px;
    padding: 9px 13px;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 300;
    color: var(--txt);
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}

.hub-search:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(178,156,110,.14);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 16px;
}

.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 21px 20px;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    background: #fff;
    box-shadow: var(--shadow-s);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.tool-card::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    height: 2px; width: 0;
    background: var(--gold);
    transition: width .3s ease;
}

.tool-card:hover {
    border-color: var(--gold-soft);
    box-shadow: 0 12px 30px rgba(49,56,63,.10);
    transform: translateY(-2px);
}

.tool-card:hover::after { width: 100%; }

.tool-icon {
    width: 44px; height: 44px;
    border-radius: 11px;
    background: var(--cream);
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}

.tool-icon svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; }

.tool-card:hover .tool-icon { background: var(--ink); }
.tool-card:hover .tool-icon svg { stroke: var(--gold); }

.tool-card h3 {
    font-size: 15.5px;
    font-weight: 500;
    color: var(--ink);
}

.tool-card p {
    flex: 1;
    font-size: 13px;
    line-height: 1.65;
    color: var(--mute);
}

.tool-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.tool-tags span {
    font-size: 10px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold-soft);
    border-radius: 99px;
    padding: 3px 9px;
}

.tool-card.soon { opacity: .5; pointer-events: none; }
.tool-tags .soon-tag { color: var(--mute); border-color: var(--hair); }

/* ---------------------------------------------------- lignes d'options */
.opt-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.opt-row label {
    margin: 0;
    min-width: 74px;
    color: var(--mute);
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    font-weight: 400;
}

.opt-row small { margin: 0; flex: 1 1 220px; }

.opt-row .unit { font-size: 13px; color: var(--mute); margin-left: -6px; }

.opt-row select,
.opt-row input[type="number"] {
    padding: 9px 11px;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 300;
    color: var(--txt);
    background: #fff;
}

.opt-row input[type="number"] { width: 108px; }

.opt-row select:focus,
.opt-row input[type="number"]:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(178,156,110,.14);
}

.opt-row input[type="range"] { accent-color: var(--gold); width: 190px; }

.opt-row input[type="color"] {
    width: 44px; height: 32px;
    padding: 2px;
    border: 1px solid var(--hair);
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}

.opt-row output {
    font-size: 13px;
    color: var(--ink);
    font-weight: 400;
    min-width: 46px;
}

.radio-option span em {
    font-style: normal;
    color: var(--mute);
    font-size: 12px;
    display: block;
    margin-top: 1px;
}

/* ---------------------------------------------------- grille d'images */
.img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.img-grid .empty { grid-column: 1 / -1; }

.img-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 13px;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    background: #fff;
    box-shadow: var(--shadow-s);
    transition: border-color .18s, box-shadow .18s;
}

.img-card:hover { border-color: var(--gold-soft); box-shadow: 0 4px 16px rgba(49,56,63,.08); }
.img-card.done { border-color: var(--gold-soft); background: #FDFBF6; }

.img-preview {
    width: 56px; height: 56px;
    flex-shrink: 0;
    border: 1px solid var(--hair);
    border-radius: 7px;
    background:
        linear-gradient(45deg, #EFEDE6 25%, transparent 25%, transparent 75%, #EFEDE6 75%) 0 0 / 12px 12px,
        linear-gradient(45deg, #EFEDE6 25%, #fff 25%, #fff 75%, #EFEDE6 75%) 6px 6px / 12px 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

.img-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

.img-info { flex: 1; min-width: 0; }

.img-name {
    font-size: 13.5px;
    font-weight: 400;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.img-sub, .img-out {
    font-size: 11.5px;
    color: var(--mute);
    margin-top: 3px;
    letter-spacing: .02em;
}

.img-out { color: var(--ink-3); }

.badge {
    display: inline-block;
    font-size: 9.5px;
    letter-spacing: .08em;
    color: var(--gold);
    border: 1px solid var(--gold-soft);
    border-radius: 4px;
    padding: 1px 5px;
    vertical-align: 1px;
}

.capped { color: #B07A2B; }

.icon-btn.dl:hover:not(:disabled) { border-color: var(--ok); color: var(--ok); background: #F1F6F2; }

/* ---------------------------------------------------- allègement */
.presets { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
    padding: 6px 12px;
    border: 1px solid var(--hair);
    border-radius: 99px;
    background: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 300;
    color: var(--mute);
    cursor: pointer;
    transition: border-color .16s, color .16s, background .16s;
}

.chip:hover { border-color: var(--gold); color: var(--gold); background: #FBF7EE; }

.flag {
    display: inline-block;
    margin-left: 6px;
    font-size: 10.5px;
    letter-spacing: .03em;
    border-radius: 99px;
    padding: 2px 8px;
}

.flag.warn { background: #FAF3E2; color: #8A6A22; }
.flag.ok { background: #F1F6F2; color: var(--ok); }

.file-item.done { border-color: var(--gold-soft); background: #FDFBF6; }

.file-out {
    font-size: 12px;
    color: var(--ink-3);
    margin-top: 5px;
}

.file-out strong { color: var(--ok); font-weight: 500; }
.file-out.missed strong { color: #B07A2B; }

/* ---------------------------------------------------- pipette couleurs */
.btn-group.tight { margin-top: 16px; }

.dropzone-text kbd {
    display: inline-block;
    padding: 1px 6px;
    border: 1px solid var(--hair);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    color: var(--ink);
}

.pick-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 13px 16px;
    background: var(--ink);
    color: var(--cream);
    border-radius: var(--radius-s);
    font-size: 13px;
    font-weight: 300;
}

.pick-live { display: flex; align-items: center; gap: 11px; min-width: 0; }

.pick-chip {
    width: 26px; height: 26px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.25);
    background: transparent;
}

.pick-live strong { color: var(--gold); font-weight: 500; }

.pick-live code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    color: #fff;
}

.pick-hint { font-size: 12px; color: #A9B3BE; }

.pick-stage { margin: 18px 0 4px; }

.pick-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    box-shadow: var(--shadow-s);
    cursor: crosshair;
    background:
        linear-gradient(45deg, #EFEDE6 25%, transparent 25%, transparent 75%, #EFEDE6 75%) 0 0 / 16px 16px,
        linear-gradient(45deg, #EFEDE6 25%, #fff 25%, #fff 75%, #EFEDE6 75%) 8px 8px / 16px 16px;
}

.picked-list { margin-top: 20px; }

.picked-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
}

/* ---------------------------------------------------- pastilles de couleur */
.swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    gap: 10px;
}

.swatch {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--hair);
    border-radius: var(--radius-s);
    background: #fff;
    box-shadow: var(--shadow-s);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s, box-shadow .16s, transform .16s;
}

.swatch:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(49,56,63,.08); }
.swatch.copied { border-color: var(--ok); background: #F3F7F4; }

.swatch-color {
    width: 42px; height: 42px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid rgba(49,56,63,.14);
}

.swatch-body { flex: 1; min-width: 0; display: block; }

.swatch-name {
    display: block;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swatch-hex {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    color: var(--gold);
    margin-top: 2px;
    letter-spacing: .04em;
}

.swatch-share { display: block; font-size: 11px; color: var(--mute); margin-top: 2px; }

.swatch-copy {
    flex-shrink: 0;
    font-size: 10.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--mute);
}

.swatch:hover .swatch-copy { color: var(--gold); }
.swatch.copied .swatch-copy { color: var(--ok); }

.family-block { margin-bottom: 22px; }

.family-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--hair);
}

/* ---------------------------------------------------- pied */
.foot {
    padding: 18px 40px 26px;
    border-top: 1px solid var(--hair);
    font-size: 11.5px;
    color: var(--mute);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.foot .dot { color: var(--gold); }

/* ---------------------------------------------------- responsive */
@media (max-width: 760px) {
    body { padding: 16px 12px; }
    header { padding: 30px 24px 26px; }
    header h1 { font-size: 24px; }
    .content { padding: 26px 24px 32px; }
    .foot { padding: 16px 24px 22px; }
    .btn-group { flex-direction: column; }
    .radio-group { flex-direction: column; }
    .file-item { flex-wrap: wrap; }
    .range-input { width: 100%; }

    .hub-bar { flex-direction: column; align-items: stretch; }
    .hub-search { width: 100%; }
    .tool-grid { grid-template-columns: 1fr; }
    .img-grid { grid-template-columns: 1fr; }
    .opt-row label { min-width: 0; }
    .opt-row input[type="range"] { width: 100%; }
    .swatch-grid { grid-template-columns: 1fr; }
    .pick-bar { flex-direction: column; align-items: flex-start; }
}
