        :root {
            --navy: #1e293b;
            --sage: #6b8f71;
            --sand: #d4a574;
            --light: #f8fafc;
            --grey: #64748b;
            --white: #ffffff;
            --accent: #3b82f6;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
            --card-shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--light);
            color: var(--navy);
            line-height: 1.6;
        }

        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, var(--navy) 0%, #334155 50%, var(--sage) 100%);
            color: white;
            padding: 80px 40px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
            background-size: 30px 30px;
        }

        .hero h1 {
            font-family: 'Playfair Display', serif;
            font-size: 3.5rem;
            margin-bottom: 12px;
            position: relative;
        }

        .hero p {
            font-size: 1.2rem;
            opacity: 0.85;
            font-weight: 300;
            position: relative;
        }

        .hero .stats {
            display: flex;
            justify-content: center;
            gap: 40px;
            margin-top: 40px;
            position: relative;
        }

        .hero .stat {
            text-align: center;
        }

        .hero .stat-number {
            font-size: 2.5rem;
            font-weight: 800;
            display: block;
        }

        .hero .stat-label {
            font-size: 0.85rem;
            opacity: 0.7;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        /* Navigation */
        .nav {
            background: var(--white);
            padding: 16px 40px;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            display: flex;
            justify-content: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .nav a {
            text-decoration: none;
            color: var(--grey);
            padding: 8px 20px;
            border-radius: 100px;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.3s;
        }

        .nav a:hover, .nav a.active {
            background: var(--navy);
            color: white;
        }

        /* Sections */
        .section {
            max-width: 1400px;
            margin: 0 auto;
            padding: 60px 40px;
        }

        .section-title {
            font-family: 'Playfair Display', serif;
            font-size: 2.2rem;
            margin-bottom: 8px;
            color: var(--navy);
        }

        .section-subtitle {
            color: var(--grey);
            font-size: 1rem;
            margin-bottom: 40px;
            font-weight: 300;
        }

        /* Wardrobe Grid */
        .category-title {
            font-size: 1.3rem;
            font-weight: 700;
            margin: 40px 0 20px;
            padding-bottom: 10px;
            border-bottom: 3px solid var(--sage);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .category-title .emoji {
            font-size: 1.5rem;
        }

        .category-title .count {
            background: var(--sage);
            color: white;
            font-size: 0.75rem;
            padding: 2px 10px;
            border-radius: 100px;
            font-weight: 600;
        }

        .inventory-filters {
            display: grid;
            grid-template-columns: minmax(190px, 1.4fr) repeat(4, minmax(130px, 1fr)) auto;
            gap: 10px;
            margin-bottom: 30px;
            padding: 14px;
            border: 1px solid #e2e8f0;
            border-radius: 14px;
            background: #f8fafc;
        }

        .inventory-filters input,
        .inventory-filters select,
        .inventory-filters button {
            width: 100%;
            min-height: 42px;
            border: 1px solid #cbd5e1;
            border-radius: 9px;
            background: white;
            color: var(--navy);
            padding: 8px 10px;
            font: inherit;
            font-size: 0.8rem;
        }

        .inventory-filters button {
            width: auto;
            cursor: pointer;
            color: var(--grey);
            font-weight: 600;
        }

        .inventory-filters button:hover {
            background: #eef2f7;
            color: var(--navy);
        }

        .filter-result {
            grid-column: 1 / -1;
            margin: 0;
            color: var(--grey);
            font-size: 0.76rem;
        }

        #inventaire .item-card[hidden],
        #inventaire .items-grid[hidden],
        #inventaire .category-title[hidden] {
            display: none !important;
        }

        .items-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }

        .item-card {
            background: var(--white);
            border-radius: 16px;
            padding: 24px;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
            border: 1px solid rgba(0,0,0,0.04);
            position: relative;
            overflow: hidden;
        }

        .item-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--card-shadow-hover);
        }

        .item-card .color-bar {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
        }

        .item-card .item-thumb {
            width: 100%;
            height: 180px;
            object-fit: cover;
            border-radius: 10px;
            margin-bottom: 12px;
            margin-top: 4px;
            background: #f1f5f9;
            cursor: pointer;
            transition: transform 0.3s ease;
        }

        .item-card .item-thumb:hover {
            transform: scale(1.03);
        }

        /* Cadrage portrait : chaque vêtement reste visible en entier. */
        .item-card .item-thumb {
            height: auto;
            aspect-ratio: 3 / 4;
            object-fit: contain;
        }

        /* Prolonge la couleur du fond retouché lorsque le format portrait
           laisse apparaître une marge autour de la photo. */
        .item-card .item-thumb[src*="-fond-ardoise."] {
            background-color: #26384a;
        }

        .item-card .item-thumb[src*="-fond-ivoire."] {
            background-color: #e8dfcf;
        }

        .item-card .item-thumb[src*="-fond-pierre."] {
            background-color: #ded4c6;
        }

        .item-card .item-thumb[src*="-fond-bleu."] {
            background-color: #526579;
        }

        .item-card .item-thumb[src*="-fond-olive."] {
            background-color: #3f4a43;
        }

        /* Lightbox */
        .lightbox {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.85);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        .lightbox.active {
            display: flex;
        }

        .lightbox img {
            max-width: 90%;
            max-height: 90vh;
            border-radius: 12px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        }

        .item-card .item-number {
            font-size: 0.75rem;
            color: var(--grey);
            font-weight: 600;
            margin-bottom: 4px;
        }

        .item-card .item-name {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .item-card .item-details {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 10px;
        }

        .tag {
            font-size: 0.72rem;
            padding: 3px 10px;
            border-radius: 100px;
            font-weight: 500;
        }

        .tag-color {
            background: #fef3c7;
            color: #92400e;
        }

        .tag-material {
            background: #e0e7ff;
            color: #3730a3;
        }

        .tag-style {
            background: #d1fae5;
            color: #065f46;
        }

        .tag-brand {
            background: #fce7f3;
            color: #9d174d;
        }

        .item-card .color-swatch {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid rgba(0,0,0,0.1);
            display: inline-block;
            margin-right: 6px;
            vertical-align: middle;
        }

        .compatibility-button {
            width: auto;
            margin-top: 2px;
            padding: 7px 11px;
            border: 1px solid #dbe3ec;
            border-radius: 8px;
            background: #f8fafc;
            color: var(--grey);
            font: inherit;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
        }

        .compatibility-button:hover {
            background: #eef2f7;
            color: var(--navy);
            border-color: #cbd5e1;
        }

        .compatibility-modal {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9000;
            padding: 20px;
            background: rgba(15, 23, 42, 0.72);
            align-items: center;
            justify-content: center;
        }

        .compatibility-modal.active {
            display: flex;
        }

        .compatibility-dialog {
            width: min(760px, 100%);
            max-height: min(88vh, 850px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: white;
            border-radius: 18px;
            padding: 24px;
            box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
        }

        #compatibility-results {
            min-height: 0;
            overflow-y: auto;
            padding-right: 8px;
            scrollbar-gutter: stable;
        }

        .compatibility-dialog-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 20px;
        }

        .compatibility-dialog-header h2 {
            font-size: 1.25rem;
        }

        .compatibility-dialog-header p {
            margin-top: 5px;
            color: var(--grey);
            font-size: 0.82rem;
        }

        .compatibility-close {
            flex: 0 0 auto;
            width: 38px;
            height: 38px;
            border: 0;
            border-radius: 50%;
            background: #f1f5f9;
            color: var(--navy);
            font-size: 1.35rem;
            cursor: pointer;
        }

        .compatibility-group + .compatibility-group {
            margin-top: 24px;
        }

        .compatibility-group h3 {
            margin-bottom: 10px;
            font-size: 1rem;
        }

        .compatible-items {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .compatible-item {
            display: grid;
            grid-template-columns: 64px 1fr;
            align-items: center;
            gap: 12px;
            min-width: 0;
            padding: 8px;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            background: #fff;
        }

        .compatible-item img {
            width: 64px;
            height: 64px;
            object-fit: cover;
            border-radius: 9px;
            background: #f1f5f9;
            cursor: pointer;
        }

        .compatible-item strong {
            display: block;
            color: var(--sage-dark);
            font-size: 0.75rem;
            margin-bottom: 3px;
        }

        .compatible-item span {
            display: block;
            font-size: 0.84rem;
            font-weight: 600;
            line-height: 1.3;
        }

        .compatibility-score {
            display: inline-flex !important;
            width: fit-content;
            margin-top: 6px;
            padding: 3px 7px;
            border-radius: 999px;
            font-size: 0.7rem !important;
            font-weight: 800 !important;
        }

        .score-great {
            color: #065f46;
            background: #d1fae5;
        }

        .score-possible {
            color: #92400e;
            background: #fef3c7;
        }

        @media (max-width: 560px) {
            .compatibility-modal {
                padding: 12px;
                align-items: center;
            }
            .compatibility-dialog {
                width: 100%;
                max-height: calc(100vh - 24px);
                border-radius: 18px;
                padding: 18px 14px 24px;
            }
            .compatible-items { grid-template-columns: 1fr; }
            .compatible-item { grid-template-columns: 58px 1fr; }
            .compatible-item img { width: 58px; height: 58px; }
        }

        /* Outfits Section */
        .outfits-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
            gap: 24px;
        }

        .outfit-card {
            background: var(--white);
            border-radius: 16px;
            padding: 28px;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
            border: 1px solid rgba(0,0,0,0.04);
        }

        .outfit-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--card-shadow-hover);
        }

        .outfit-card .outfit-context {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            font-weight: 700;
            margin-bottom: 6px;
        }

        .outfit-card .outfit-context.bureau { color: var(--accent); }
        .outfit-card .outfit-context.teletravail { color: var(--sage); }
        .outfit-card .outfit-context.weekend { color: var(--sand); }
        .outfit-card .outfit-context.maison { color: #8b5cf6; }
        .outfit-card .outfit-context.sortie { color: #8b5cf6; }
        .outfit-card .outfit-context.ete { color: #d97706; }

        #tenues .outfits-grid {
            margin-bottom: 28px;
        }

        .outfit-card .outfit-name {
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: 16px;
        }

        .outfit-pieces {
            list-style: none;
        }

        .outfit-pieces li {
            padding: 8px 0;
            border-bottom: 1px solid #f1f5f9;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .outfit-pieces li:last-child {
            border-bottom: none;
        }

        .outfit-pieces .piece-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
            flex-shrink: 0;
        }

        .outfit-pieces li {
            position: relative;
            cursor: pointer;
        }

        .outfit-pieces li .piece-number {
            font-size: 0.7rem;
            font-weight: 700;
            color: var(--grey);
            background: #f1f5f9;
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: auto;
            flex-shrink: 0;
        }

        .outfit-pieces li .hover-thumb {
            display: none;
            position: absolute;
            right: -10px;
            bottom: 100%;
            width: 140px;
            height: 140px;
            object-fit: cover;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.25);
            border: 3px solid white;
            z-index: 50;
            pointer-events: none;
        }

        .outfit-pieces li:hover .hover-thumb {
            display: block;
            animation: thumbPop 0.2s ease forwards;
        }

        @keyframes thumbPop {
            from { opacity: 0; transform: scale(0.8) translateY(5px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        /* Matrix Section */
        .matrix-container {
            overflow-x: auto;
            border-radius: 16px;
            box-shadow: var(--card-shadow);
            background: var(--white);
            padding: 24px;
        }

        .matrix-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.78rem;
            min-width: 900px;
        }

        .matrix-table th {
            padding: 10px 8px;
            font-weight: 600;
            text-align: center;
            background: #f8fafc;
            position: sticky;
            top: 0;
        }

        .matrix-table th.row-header {
            text-align: left;
            min-width: 180px;
            background: var(--white);
            position: sticky;
            left: 0;
            z-index: 2;
        }

        .matrix-table td {
            padding: 8px;
            text-align: center;
            border: 1px solid #f1f5f9;
        }

        .matrix-table td.row-label {
            text-align: left;
            font-weight: 500;
            background: var(--white);
            position: sticky;
            left: 0;
            z-index: 1;
            border-right: 2px solid #e2e8f0;
        }

        .matrix-table .compat-yes {
            background: #d1fae5;
            color: #065f46;
            font-weight: 700;
            border-radius: 4px;
        }

        .matrix-table .compat-maybe {
            background: #fef3c7;
            color: #92400e;
            font-weight: 600;
        }

        .matrix-table .compat-no {
            background: #fee2e2;
            color: #991b1b;
        }

        .matrix-table thead th:not(.row-header) {
            writing-mode: vertical-lr;
            transform: rotate(180deg);
            height: 140px;
            font-size: 0.72rem;
            white-space: nowrap;
        }

        .matrix-table th:not(.row-header),
        .matrix-table td.row-label {
            cursor: help;
        }

        .matrix-hover-preview {
            display: none;
            position: fixed;
            z-index: 10000;
            width: 150px;
            padding: 7px;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            background: white;
            box-shadow: 0 14px 36px rgba(15, 23, 42, 0.28);
            pointer-events: none;
        }

        .matrix-hover-preview.active { display: block; }

        .matrix-hover-preview img {
            display: block;
            width: 136px;
            height: 136px;
            object-fit: cover;
            border-radius: 8px;
            background: #f1f5f9;
        }

        .matrix-hover-preview span {
            display: block;
            margin-top: 6px;
            color: var(--navy);
            font-size: 0.75rem;
            font-weight: 700;
            line-height: 1.3;
        }

        @media (hover: none) {
            .matrix-table th:not(.row-header),
            .matrix-table td.row-label { cursor: default; }
        }

        /* Shopping List */
        .shopping-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }

        .shopping-card {
            background: var(--white);
            border-radius: 16px;
            padding: 24px;
            box-shadow: var(--card-shadow);
            border-left: 4px solid;
            transition: all 0.3s ease;
        }

        .shopping-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--card-shadow-hover);
        }

        .shopping-card.priority-1 { border-left-color: var(--danger); }
        .shopping-card.priority-2 { border-left-color: var(--warning); }
        .shopping-card.priority-3 { border-left-color: var(--accent); }
        .shopping-card.replace { border-left-color: #64748b; }

        .shopping-card .priority-badge {
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
        }

        .shopping-card.priority-1 .priority-badge { color: var(--danger); }
        .shopping-card.replace .priority-badge { color: #475569; }

        .shopping-swatch {
            display: inline-block;
            width: 16px;
            height: 16px;
            flex: 0 0 16px;
            border: 1px solid rgba(15, 23, 42, 0.12);
            border-radius: 50%;
        }

        .shopping-note {
            max-width: 900px;
            margin: -8px 0 20px;
            color: var(--grey);
            line-height: 1.6;
        }
        .shopping-card.priority-2 .priority-badge { color: var(--warning); }
        .shopping-card.priority-3 .priority-badge { color: var(--accent); }

        .shopping-card .item-title {
            font-size: 1rem;
            font-weight: 700;
            margin-bottom: 6px;
        }

        .shopping-card .item-reason {
            font-size: 0.85rem;
            color: var(--grey);
            line-height: 1.5;
        }

        .shopping-card .colors-suggestion {
            margin-top: 10px;
            display: flex;
            gap: 6px;
            align-items: center;
        }

        .shopping-card .colors-suggestion span {
            font-size: 0.75rem;
            color: var(--grey);
        }

        /* Palette Section */
        .palette-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 16px;
            margin-bottom: 30px;
        }

        .palette-item {
            border-radius: 12px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
        }

        .palette-swatch {
            height: 80px;
        }

        .palette-label {
            background: white;
            padding: 12px;
            font-size: 0.8rem;
            font-weight: 600;
            text-align: center;
        }

        /* Looks 2026 Section */
        .looks-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 24px;
        }

        .look-card {
            background: var(--white);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
        }

        .look-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--card-shadow-hover);
        }

        .look-visual {
            height: 200px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .look-silhouette {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .silhouette-layer {
            border-radius: 6px;
        }

        .silhouette-layer.blazer {
            width: 70px;
            height: 50px;
            position: absolute;
            top: 40px;
            border-radius: 8px;
            opacity: 0.9;
        }

        .silhouette-layer.top, .silhouette-layer.tshirt {
            width: 60px;
            height: 45px;
            border-radius: 8px;
        }

        .silhouette-layer.tshirt {
            width: 50px;
            height: 30px;
            margin-top: -15px;
        }

        .silhouette-layer.bottom {
            width: 50px;
            height: 60px;
            border-radius: 6px;
        }

        .silhouette-layer.shoes {
            width: 40px;
            height: 16px;
            border-radius: 10px;
        }

        .look-context-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            font-weight: 700;
            color: var(--grey);
            padding: 20px 24px 0;
        }

        .look-title {
            font-size: 1.15rem;
            font-weight: 700;
            padding: 6px 24px 12px;
        }

        .look-items {
            list-style: none;
            padding: 0 24px;
        }

        .look-items li {
            font-size: 0.85rem;
            padding: 6px 0;
            border-bottom: 1px solid #f1f5f9;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .look-items li:last-child {
            border-bottom: none;
        }

        .look-swatch {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            flex-shrink: 0;
            display: inline-block;
        }

        .look-trend {
            font-size: 0.75rem;
            color: var(--grey);
            padding: 12px 24px 20px;
            font-style: italic;
        }

        /* Weekly Planner */
        .week-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 12px;
        }

        @media (max-width: 1000px) {
            .week-grid {
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            }
        }

        .day-card {
            background: var(--white);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: all 0.3s;
        }

        .day-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--card-shadow-hover);
        }

        .day-card .day-header {
            padding: 12px;
            font-weight: 700;
            font-size: 0.85rem;
            text-align: center;
            color: white;
        }

        .day-card .day-content {
            padding: 16px 12px;
            font-size: 0.8rem;
            line-height: 1.6;
        }

        .day-card .day-context {
            font-size: 0.7rem;
            color: var(--grey);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        /* Footer */
        footer {
            background: var(--navy);
            color: rgba(255,255,255,0.7);
            text-align: center;
            padding: 40px;
            font-size: 0.85rem;
        }

        footer strong {
            color: white;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .hero { padding: 50px 20px; }
            .hero h1 { font-size: 2.2rem; }
            .hero .stats { gap: 20px; flex-wrap: wrap; }
            .section { padding: 40px 20px; }
            /* Laisse passer la barre d'état Android lorsque le menu devient fixe. */
            .nav { top: 32px; padding: 12px 16px; overflow-x: auto; justify-content: flex-start; }
            .nav a { padding: 6px 14px; font-size: 0.8rem; }
            .items-grid { grid-template-columns: 1fr; }
            .inventory-filters {
                grid-template-columns: 1fr 1fr;
                margin-bottom: 24px;
            }
            .inventory-filters .filter-search,
            .inventory-filters .filter-result {
                grid-column: 1 / -1;
            }
            .item-card {
                display: grid;
                grid-template-columns: 112px minmax(0, 1fr);
                grid-template-rows: auto auto 1fr auto;
                column-gap: 14px;
                row-gap: 4px;
                align-items: start;
                padding: 14px;
            }
            .item-card .item-thumb {
                grid-column: 1;
                grid-row: 1 / 5;
                width: 112px;
                height: 158px;
                margin: 4px 0 0;
                object-fit: cover;
            }
            .item-card .item-thumb {
                aspect-ratio: auto;
                object-fit: contain;
            }
            .item-card .item-number {
                grid-column: 2;
                grid-row: 1;
                margin: 2px 0 0;
            }
            .item-card .item-name {
                grid-column: 2;
                grid-row: 2;
                margin-bottom: 4px;
                line-height: 1.25;
            }
            .item-card .item-details {
                grid-column: 2;
                grid-row: 3;
                align-content: start;
                margin-bottom: 4px;
            }
            .item-card .compatibility-button {
                grid-column: 2;
                grid-row: 4;
                justify-self: start;
                margin-top: 2px;
            }
            .outfits-grid { grid-template-columns: 1fr; }
            .shopping-grid { grid-template-columns: 1fr; }
        }

        @media (max-width: 380px) {
            .section { padding-left: 12px; padding-right: 12px; }
            .item-card {
                grid-template-columns: 96px minmax(0, 1fr);
                column-gap: 11px;
                padding: 12px;
            }
            .item-card .item-thumb {
                width: 96px;
                height: 144px;
            }
            .item-card .tag {
                padding: 3px 7px;
                font-size: 0.66rem;
            }
            .item-card .compatibility-button {
                padding: 6px 8px;
                font-size: 0.69rem;
            }
            .inventory-filters { grid-template-columns: 1fr; }
            .inventory-filters .filter-search,
            .inventory-filters .filter-result { grid-column: 1; }
        }

        /* Animations */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .item-card, .outfit-card, .shopping-card {
            animation: fadeInUp 0.5s ease forwards;
        }

        /* Tips Section */
        .tips-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }

        .tip-card {
            background: var(--white);
            border-radius: 16px;
            padding: 24px;
            box-shadow: var(--card-shadow);
            display: flex;
            gap: 16px;
            align-items: flex-start;
        }

        .tip-card .tip-number {
            width: 36px;
            height: 36px;
            background: var(--navy);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.85rem;
            flex-shrink: 0;
        }

        .tip-card .tip-text {
            font-size: 0.9rem;
            line-height: 1.6;
        }

        .tip-card .tip-text strong {
            display: block;
            margin-bottom: 4px;
        }

        .category-count-grid,
        .compatibility-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 14px;
        }
        .category-count-card,
        .compatibility-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 16px;
        }
        .category-count-card {
            display: grid;
            grid-template-columns: auto 1fr;
            align-items: center;
            column-gap: 12px;
        }
        .category-count-card span { grid-row: 1 / 3; font-size: 1.6rem; }
        .category-count-card strong { font-size: 1.45rem; color: var(--navy); }
        .category-count-card small { color: var(--grey); font-size: .85rem; }
        .compatibility-card h3 { font-size: .95rem; margin-bottom: 8px; color: var(--navy); }
        .compatibility-card p { font-size: .82rem; line-height: 1.5; color: var(--grey); }
        .matrix-note { margin-top: 16px; font-size: .85rem; color: var(--grey); }
        @media (max-width: 480px) {
            .category-count-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .compatibility-grid { grid-template-columns: 1fr; }
            .category-count-card, .compatibility-card { padding: 12px; }
            .compatibility-card p { overflow-wrap: anywhere; }
        }

        .matrix-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 14px 20px;
            margin-top: 14px;
            color: var(--grey);
            font-size: .82rem;
        }
        .matrix-legend i {
            display: inline-block;
            width: 14px;
            height: 14px;
            margin-right: 5px;
            border-radius: 3px;
            vertical-align: -2px;
        }
        .legend-yes { background: #d1fae5; }
        .legend-maybe { background: #fef3c7; }
        .legend-no { background: #fee2e2; }
        @media (max-width: 768px) {
            .matrix-container {
                max-height: 72vh;
                overflow: auto;
                border: 1px solid #e2e8f0;
                border-radius: 12px;
                overscroll-behavior: contain;
                -webkit-overflow-scrolling: touch;
            }
            .matrix-table { min-width: 1040px; }
            .matrix-table th,
            .matrix-table td {
                min-width: 58px;
                padding: 9px 5px;
                font-size: .72rem;
            }
            .matrix-table .row-header,
            .matrix-table td.row-label {
                position: sticky;
                left: 0;
                z-index: 3;
                min-width: 132px;
                max-width: 132px;
                background: white;
                box-shadow: 3px 0 5px rgba(15, 23, 42, .08);
            }
            .matrix-table thead th {
                position: sticky;
                top: 0;
                z-index: 2;
            }
            .matrix-table thead .row-header { z-index: 5; }
        }
