/* === Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f8f6f3;
    color: #2d2d2d;
    display: flex;
    min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e8e4df;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 10;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    padding: 0 8px;
}
.logo-icon { font-size: 28px; height: 32px; width: auto; vertical-align: middle; }
.logo-text { font-size: 18px; font-weight: 600; color: #2d2d2d; }
.nav-links { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.15s;
}
.nav-link:hover { background: #f5f2ef; color: #2d2d2d; }
.nav-link.active { background: #f0ebe5; color: #2d2d2d; font-weight: 500; }
.nav-icon { font-size: 18px; }
.sidebar-refresh-btn {
    background: #fff;
    border: 1px solid #e8e4df;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    margin-bottom: 12px;
    color: #666;
    transition: all 0.15s;
    flex-shrink: 0;
}
.sidebar-refresh-btn:hover { background: #f5f2ef; color: #2d2d2d; }
.sidebar-refresh-btn:active { transform: scale(0.95); }
.sidebar-refresh-btn:disabled { opacity: 0.6; cursor: wait; }
.sidebar-refresh-btn.spinning { animation: wardrobeSpin 0.8s linear infinite; }
@keyframes wardrobeSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.sidebar-version {
    font-size: 10px;
    color: #aaa;
    margin: 0 0 12px 4px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

/* === Content === */
.content {
    margin-left: 220px;
    padding: 32px 40px;
    flex: 1;
    max-width: 1200px;
}

/* === Page Header === */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 28px; font-weight: 600; color: #1a1a1a; }
.subtitle { color: #888; font-size: 14px; margin-top: 4px; }

/* === Stats Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e8e4df;
}
.stat-card.accent {
    background: linear-gradient(135deg, #f5e6ee, #efe0e8);
    border-color: #e8cdd8;
}
.stat-number { font-size: 36px; font-weight: 600; color: #1a1a1a; }
.stat-label { font-size: 13px; color: #888; margin-top: 4px; }

/* === Cards === */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e8e4df;
    margin-bottom: 20px;
}

/* === Filters === */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-select, .filter-input {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e0dbd5;
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: #2d2d2d;
}
.results-count { font-size: 13px; color: #888; margin-left: auto; }

/* === Grid === */
.inspo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 12px;
}
.inspo-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: opacity 0.3s, transform 0.15s;
    position: relative;
}
.inspo-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.inspo-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.inspo-actions {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.inspo-delete {
    width: 28px; height: 28px;
    border-radius: 50%; border: none;
    background: #f5f2ef; color: #999;
    font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.inspo-delete:hover { background: #fee2e2; color: #c44040; }

/* === Buttons === */
.btn-primary {
    padding: 8px 20px; border-radius: 8px; border: none;
    background: #d4a9b8; color: white;
    font-size: 13px; font-family: inherit; font-weight: 500;
    cursor: pointer; transition: background 0.15s;
}
.btn-primary:hover { background: #c49aa8; }
.btn-secondary {
    padding: 8px 20px; border-radius: 8px;
    border: 1px solid #e0dbd5; background: #fff;
    color: #555; font-size: 13px; font-family: inherit; font-weight: 500;
    cursor: pointer;
}
.btn-secondary:hover { background: #f5f2ef; }
.action-btn {
    width: 28px; height: 28px;
    border-radius: 50%; border: none;
    background: #f5f2ef; font-size: 14px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s; text-decoration: none; color: inherit;
}
.action-btn:hover { background: #e8e4df; }

/* === Placeholder === */
.garment-img-container {
    width: 100%; aspect-ratio: 3/4; overflow: hidden;
    background: #fff; display: flex; align-items: center; justify-content: center;
}
.garment-placeholder { font-size: 40px; color: #ccc; }

/* === Loading & Empty === */
.loading-spinner {
    width: 40px; height: 40px; margin: 0 auto;
    border: 3px solid #e8e4df; border-top-color: #d4a9b8;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-text { font-size: 13px; color: #aaa; font-style: italic; }

/* === Novita === */
.novita-info { padding: 10px 12px; }
.novita-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.novita-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.novita-price { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.store-badge {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; padding: 2px 8px; border-radius: 10px; color: #fff;
}
.store-zara { background: #1a1a1a; }
.store-hm { background: #cc0000; }
.store-mango { background: #b8860b; }
.store-zalando { background: #ff6900; }
.store-manual { background: #888; }
.section-badge {
    font-size: 10px; padding: 2px 8px; border-radius: 10px;
    background: #f0ebe5; color: #888;
}
.bookmark-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; margin-bottom: 16px;
    background: #f5e6ee; border-radius: 12px;
    font-size: 14px; font-weight: 500; color: #8b5a6b;
}
.toggle-label { font-size: 13px; display: flex; align-items: center; gap: 6px; cursor: pointer; color: #555; }
.toggle-label input { accent-color: #d4a9b8; }

/* === Wishlist === */
.wishlist-info { padding: 10px 12px; }
.wishlist-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wishlist-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wishlist-price { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.wishlist-cat { font-size: 11px; color: #888; margin-top: 4px; }
.wishlist-notes { font-size: 11px; color: #aaa; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-trend { font-size: 11px; margin-top: 4px; font-weight: 500; }
.price-down { color: #16a34a; }
.price-up { color: #dc2626; }
.style-tag {
    font-size: 10px; padding: 2px 8px; border-radius: 10px;
    background: #f0ebe5; color: #888;
}
.style-tag.highlight { background: #f5e6ee; color: #8b5a6b; }
.style-tag.accent { background: #fef3c7; color: #92400e; }
.style-tag.searching { background: #e0f2fe; color: #0369a1; animation: pulse-search 1.5s ease-in-out infinite; }
@keyframes pulse-search { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* === Modal === */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); z-index: 100;
    display: flex; align-items: center; justify-content: center;
}
.modal-content {
    background: #fff; border-radius: 16px; padding: 28px;
    width: 480px; max-width: 90vw; max-height: 85vh;
    overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-content h2 { font-size: 20px; font-weight: 600; margin-bottom: 20px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; font-weight: 500; color: #888; margin-bottom: 4px; }
.form-row-inline { display: flex; gap: 12px; margin-bottom: 14px; }
.form-row-inline > div { flex: 1; }
.form-row-inline label { display: block; font-size: 12px; font-weight: 500; color: #888; margin-bottom: 4px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* === Dashboard === */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { width: 140px; font-size: 13px; color: #555; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 22px; background: #f0ebe5; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #d4a9b8, #e8b4c8); border-radius: 6px; transition: width 0.5s ease; }
.bar-value { width: 30px; font-size: 13px; font-weight: 500; color: #555; }
.color-palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 12px; }
.color-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.color-swatch { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #e8e4df; }
.color-name { font-size: 11px; color: #888; }
.color-count { font-size: 12px; font-weight: 600; color: #555; }
.style-profile-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.style-formula { margin-top: 16px; }
.formula-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.formula-step { padding: 8px 16px; background: #f5f2ef; border-radius: 8px; font-size: 13px; font-weight: 500; }
.formula-arrow { color: #ccc; font-size: 18px; }
.gap-list { display: flex; flex-direction: column; gap: 8px; }
.gap-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; }
.gap-item.urgent { background: #fef2f2; }
.gap-item.medium { background: #fefce8; }
.gap-item.low { background: #f0fdf4; }
.card-subtitle { color: #888; font-size: 13px; margin-bottom: 16px; margin-top: -8px; }

/* === Guardaroba === */
.garments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.garment-card { background: #fff; border-radius: 12px; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.garment-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.garment-card .garment-img-container { aspect-ratio: 1; }
.garment-card img { width: 100%; height: 100%; object-fit: contain; }
.garment-info { padding: 10px 12px; }
.garment-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.garment-details { font-size: 11px; color: #888; display: flex; align-items: center; gap: 4px; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #ddd; flex-shrink: 0; }
.garment-category { font-size: 11px; color: #aaa; margin-top: 4px; }
.filter-input { padding: 8px 14px; border-radius: 8px; border: 1px solid #e0dbd5; background: #fff; font-size: 13px; font-family: inherit; color: #2d2d2d; width: 200px; }

/* === Profilo === */
.dual-personality { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.personality-side { padding: 20px; border-radius: 12px; text-align: center; }
.personality-side.understated { background: #f5f2ef; }
.personality-side.expressive { background: #f5e6ee; }
.personality-side h3 { margin-bottom: 6px; }
.personality-side p { font-size: 13px; color: #666; }
.personality-colors { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.p-color { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.personality-divider { font-size: 16px; color: #ccc; font-weight: 300; }
.rules-list { display: flex; flex-direction: column; gap: 6px; }
.rule { padding: 8px 14px; background: #f5f2ef; border-radius: 6px; font-size: 13px; border-left: 3px solid #d4a9b8; }
.avoid-list { display: flex; flex-direction: column; gap: 6px; }
.avoid-item { padding: 8px 14px; background: #fef8f8; border-radius: 6px; font-size: 13px; border-left: 3px solid #e0a0a0; }
.materials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.material-group { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.material-group h3 { width: 100%; margin-bottom: 10px; }
.material-tag { padding: 5px 12px; background: #f0fdf4; border-radius: 16px; font-size: 12px; color: #3a6b3a; }
.material-tag.banned { background: #fef2f2; color: #8b3a3a; }
.brands-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.brand-group { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.brand-group h3 { width: 100%; margin-bottom: 8px; }
.brand-tag { padding: 5px 12px; background: #f5f2ef; border-radius: 16px; font-size: 12px; color: #555; }
.brand-tag.aspirational { background: #f5e6ee; color: #8b5a6b; }
.influences-list { display: flex; flex-direction: column; gap: 8px; }
.influence-tag { padding: 8px 14px; background: #f5f2ef; border-radius: 8px; font-size: 13px; }

/* === Drop Zone === */
.drop-zone {
    background: #fff;
    border: 2px dashed #d4cfc8;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 20px;
}
.drop-zone.dragover {
    border-color: #8b6f5e;
    background: #faf6f2;
    transform: scale(1.01);
}
.drop-zone-content { pointer-events: none; }
.drop-icon { font-size: 48px; display: block; margin-bottom: 8px; }
.drop-text { font-size: 15px; font-weight: 500; color: #2d2d2d; margin-bottom: 4px; }
.drop-subtext { font-size: 13px; color: #888; }
.drop-hint { font-size: 12px; color: #aaa; margin-top: 8px; }
.drop-subtext .drop-link { color: #8b6f5e; cursor: pointer; text-decoration: underline; pointer-events: all; }
.drop-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}
.drop-preview:empty { margin-top: 0; }
.drop-thumb {
    position: relative;
    width: 100px;
    height: 130px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.drop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drop-thumb .thumb-status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px;
    font-size: 11px;
    text-align: center;
    background: rgba(0,0,0,0.6);
    color: #fff;
}
.drop-thumb .thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    line-height: 20px;
}
.drop-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

/* === Card Placeholder === */
.card-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    background: #f5f2ef;
    border-radius: 12px 12px 0 0;
    gap: 6px;
}
.placeholder-icon { font-size: 36px; opacity: 0.5; }
.placeholder-text { font-size: 12px; color: #aaa; }

/* === Mobile === */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .sidebar {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px 12px;
        border-right: none;
        border-bottom: 1px solid #e8e4df;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .sidebar::-webkit-scrollbar { display: none; }
    .sidebar-logo { display: none; }
    .sidebar-refresh-btn { margin-bottom: 0; margin-right: 8px; padding: 6px 10px; font-size: 18px; }
    .sidebar-version { font-size: 9px; margin: 0 8px 0 0; line-height: 1.2; align-self: center; white-space: nowrap; }
    .nav-links {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 4px;
        width: max-content;
    }
    .nav-link {
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 6px 10px;
        font-size: 10px;
        white-space: nowrap;
        min-width: 60px;
    }
    .nav-icon { font-size: 22px; }
    .content { margin-left: 0; padding: 16px; width: 100%; max-width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
    .inspo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .garments-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dual-personality { grid-template-columns: 1fr; }
    .personality-divider { text-align: center; }
    .materials-grid { grid-template-columns: 1fr; }
    .brands-grid { grid-template-columns: 1fr; }
    /* Tap target iOS/Android >= 44px */
    .nav-link, button, .btn, .btn-primary, .btn-secondary, .vote-btn, .action-btn,
    .filter-btn, .pill-btn, .close-btn, .menu-btn, .icon-btn {
        min-height: 44px;
        min-width: 44px;
    }
    a.nav-link { display: inline-flex; align-items: center; }
}

/* ===== Ispirazione vote (v16 · 28/04 unify) ===== */
.version-tag { font-size: 11px; color: #999; font-weight: 400; margin-left: 8px; vertical-align: middle; }

.inspo-card { position: relative; transition: opacity .25s, transform .25s; }
.inspo-card.inspo-fadeout { opacity: 0; transform: scale(.95); pointer-events: none; }
.inspo-card.inspo-liked { box-shadow: 0 0 0 2px #e8b4c8, 0 2px 8px rgba(232,180,200,.25); }

.inspo-source-chip {
    position: absolute; top: 6px; left: 6px; z-index: 2;
    background: rgba(255,255,255,0.92); border-radius: 14px;
    padding: 2px 7px; font-size: 13px; line-height: 1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08); pointer-events: none;
}

.inspo-vote-bar {
    display: flex; gap: 6px; padding: 8px 10px; background: #fafafa;
    border-top: 1px solid #f0f0f0; justify-content: space-between;
}
.inspo-vote-btn {
    flex: 1; min-height: 36px; border: 1px solid #e5e5e5; background: #fff;
    border-radius: 8px; font-size: 18px; cursor: pointer; padding: 0;
    transition: background .15s, transform .1s;
}
.inspo-vote-btn:active { transform: scale(.94); }
.inspo-vote-btn:hover { background: #f5f5f5; }
.inspo-like-btn.active { background: #fde2eb; border-color: #e8b4c8; }
.inspo-dislike-btn:hover { background: #ffe6e6; border-color: #e57373; }
.inspo-broken-btn:hover { background: #f0f0f0; border-color: #999; }
.inspo-mic-btn:disabled { cursor: not-allowed; }
.inspo-mic-pulse {
    animation: micPulse 1s ease-in-out infinite;
    background: #fff3cd !important; border-color: #ffd966 !important;
}
@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,217,102,.7); }
    50% { box-shadow: 0 0 0 6px rgba(255,217,102,0); }
}
.inspo-restore {
    background: #e8f5e9; border-color: #81c784; color: #2e7d32;
    font-size: 13px; font-weight: 500;
}

.inspo-vote-tag { margin-left: 6px; font-size: 14px; }
.inspo-transcript {
    font-size: 12px; color: #666; font-style: italic; padding: 6px 10px;
    background: #fafaf5; border-top: 1px solid #f0f0f0; line-height: 1.4;
}

/* ===== Voice modal ===== */
.voice-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; padding: 20px;
}
.voice-modal-card {
    background: #fff; border-radius: 16px; padding: 24px;
    max-width: 420px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.voice-title { margin: 0 0 8px; font-size: 18px; }
.voice-status { font-size: 13px; color: #666; margin: 0 0 12px; }
.voice-transcript {
    width: 100%; box-sizing: border-box; min-height: 90px; padding: 12px;
    background: #f7f7f7; border: 1px solid #e0e0e0; border-radius: 8px;
    font-size: 14px; line-height: 1.5; margin-bottom: 16px; color: #333;
    font-family: inherit; resize: vertical;
}
.voice-transcript:focus { outline: none; border-color: #e8b4c8; background: #fff; }
.voice-buttons { display: flex; gap: 8px; }
.voice-btn {
    flex: 1; min-height: 44px; border: 1px solid #ddd; background: #fff;
    border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.voice-btn-primary { background: #e8b4c8; color: #fff; border-color: #e8b4c8; }
.voice-btn-save { background: #81c784; color: #fff; border-color: #81c784; }
.voice-btn-save:disabled { opacity: .4; cursor: not-allowed; }
.voice-btn-cancel { background: #fff; color: #999; }
.voice-hint { font-size: 11px; color: #999; text-align: center; margin: 12px 0 0; }

/* ===== Toast ===== */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    padding: 10px 18px; border-radius: 22px; font-size: 13px; font-weight: 500;
    background: #333; color: #fff; opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s; z-index: 9998; max-width: 90vw;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.toast.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-ok { background: #4caf50; }
.toast.toast-err { background: #e57373; }

/* ===== Stylist feed (v2 · 27/04) ===== */
.stylist-feed { display: flex; flex-direction: column; gap: 24px; max-width: 720px; margin: 0 auto; }
.stylist-card {
    background: #fff; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.06);
    overflow: hidden;
}
.stylist-card-header {
    display: flex; gap: 12px; padding: 14px; align-items: flex-start;
    border-bottom: 1px solid #f0f0f0;
}
.stylist-inspo-img {
    width: 100px; height: 130px; object-fit: cover; border-radius: 8px; flex-shrink: 0;
}
.stylist-card-meta { flex: 1; }
.stylist-card-title { font-size: 14px; margin: 0 0 6px; color: #333; line-height: 1.4; }
.stylist-card-source { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .5px; }
.stylist-card-transcript {
    font-size: 12px; color: #666; font-style: italic; margin-top: 8px;
    padding: 6px 10px; background: #fafaf5; border-radius: 6px; line-height: 1.4;
}
.stylist-pile-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px; padding: 14px;
}
.stylist-pile {
    border: 1px solid #f0f0f0; border-radius: 10px; padding: 10px;
    background: #fafafa; display: flex; flex-direction: column;
}
.stylist-pile.matched { border-color: #c8e6c9; background: #f1f8f1; }
.stylist-pile.missing { border-color: #ffe0b2; background: #fff8f0; }
.stylist-pile-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
    color: #666; margin-bottom: 6px; font-weight: 500;
}
.stylist-pile-desc { font-size: 12px; color: #333; margin-bottom: 8px; line-height: 1.3; }
.stylist-pile-img {
    width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px;
    background: #eee; cursor: pointer;
}
.stylist-pile-status {
    font-size: 10px; padding: 3px 6px; border-radius: 4px; align-self: flex-start;
    margin-bottom: 6px;
}
.stylist-pile-status.matched { background: #c8e6c9; color: #2e7d32; }
.stylist-pile-status.missing { background: #ffe0b2; color: #e65100; }
.stylist-alts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.stylist-alt {
    width: 56px; height: 56px; border-radius: 4px; overflow: hidden; cursor: pointer;
    border: 1px solid #eee; flex-shrink: 0;
}
.stylist-alt img { width: 100%; height: 100%; object-fit: cover; }
.stylist-card-actions {
    padding: 12px 14px; border-top: 1px solid #f0f0f0; display: flex; gap: 8px;
    background: #fafafa;
}
.stylist-action-btn {
    flex: 1; min-height: 44px; border: 1px solid #e8b4c8; background: #fff;
    color: #c95775; border-radius: 8px; font-size: 14px; font-weight: 500;
    cursor: pointer;
}
.stylist-action-btn:hover { background: #fde2eb; }
.stylist-action-btn:disabled { cursor: wait; opacity: .6; }
.stylist-action-btn.done { background: #c8e6c9; border-color: #81c784; color: #2e7d32; }
.stylist-card-note {
    padding: 12px 14px; border-top: 1px solid #f0f0f0; background: #f1f8f1;
    color: #2e7d32; font-size: 13px; text-align: center;
}
.stylist-card-failed {
    padding: 24px; text-align: center; color: #e65100;
    background: #fff8f0;
}
.stylist-retry-btn {
    margin-top: 12px; padding: 10px 20px; border: 1px solid #ffb74d;
    background: #fff; border-radius: 22px; cursor: pointer; font-weight: 500;
}
.stylist-retry-btn:hover { background: #fff8f0; }

@media (max-width: 600px) {
    .stylist-card-header { flex-direction: column; }
    .stylist-inspo-img { width: 100%; height: 200px; }
    .stylist-pile-grid { grid-template-columns: repeat(2, 1fr); }
}
