 :root {
     --paper: #FAFAF7;
     --panel: #FFFFFF;
     --line: #E4E1DA;
     --ink: #17171A;
     --ink-soft: #57565C;
     --ink-faint: #9A989E;
     --accent: var(--primary);
     --accent-soft: #EEF0FD;
     --danger: #C4432E;
     --radius: 14px;
     --shadow: 0 1px 2px rgba(23, 23, 26, .04), 0 8px 24px -12px rgba(23, 23, 26, .10);
 }

 * {
     box-sizing: border-box;
 }



 .page-hero-title {
     font-weight: 800;
     display: block;
     /* background: linear-gradient(90deg, #6c5ce7, #a866ff); */
     background: linear-gradient(to right, #a3c43a, #a866ff);
     -webkit-background-clip: text;
     background-clip: text;
     color: transparent;
 }

 ::selection {
     background: var(--accent-soft);
     color: var(--ink);
 }

 a {
     color: inherit;
 }


 /* ---------- Hero ---------- */
 .hero {
     max-width: 1180px;
     margin: 0 auto;
     padding: 2.6rem 1.25rem 1.4rem;
 }

 .hero h1 {
     font-weight: 600;
     line-height: 1.08;
     letter-spacing: -.015em;
     max-width: 15ch;
     margin-bottom: .65rem;
     font-family: 'Bricolage Grotesque', 'DM Sans', sans-serif;
     font-size: clamp(2.2rem, 5.5vw, 3.75rem);
 }

 .hero p {
     color: var(--ink-soft);
     font-size: 1.02rem;
     max-width: 52ch;
     margin-bottom: 0;
 }

 /* ---------- Layout shell ---------- */
 .shell {
     max-width: 1180px;
     margin: 0 auto;
     padding: 0 1.25rem 4rem;
     display: grid;
     grid-template-columns: 330px 1fr;
     gap: 1.5rem;
     align-items: start;
 }

 @media (max-width: 940px) {
     .shell {
         grid-template-columns: 1fr;
     }
 }

 /* ---------- Control panel ---------- */
 .panel {
     /* background: var(--dark); */
     border: 1px solid var(--line);
     border-radius: var(--radius);
     box-shadow: var(--shadow);
 }

 .control-panel {
     position: sticky;
     top: 82px;
     padding: 1.3rem;
 }

 @media (max-width: 940px) {
     .control-panel {
         position: static;
     }
 }

 .panel-title {
     font-weight: 600;
     font-size: .95rem;
     margin-bottom: 1rem;
     display: flex;
     align-items: center;
     gap: .5rem;
 }

 .panel-title i {
     color: var(--accent);
 }

 .dropzone {
     border: 1.5px dashed var(--line);
     border-radius: 10px;
     padding: 1.6rem 1rem;
     text-align: center;
     cursor: pointer;
     transition: border-color .15s ease, background .15s ease;
     color: var(--text);
 }

 .dropzone:hover,
 .dropzone.drag-over {
     border-color: var(--ink-faint);
     background: var(--ink-soft);
     color: var(--primary);
 }

 .dropzone i {
     font-size: 1.5rem;
     color: var(--accent);
     margin-bottom: .4rem;
     display: block;
 }

 .dropzone .dz-title {
     font-weight: 600;
     font-size: .92rem;
     margin-bottom: .15rem;
 }

 .dropzone .dz-sub {
     font-size: .78rem;
     color: var(--ink-faint);
 }

 .quota-row {
     display: flex;
     align-items: center;
     justify-content: space-between;
     margin-top: .85rem;
     font-size: .78rem;
     color: var(--ink-faint);
 }

 .quota-bar {
     height: 4px;
     border-radius: 3px;
     background: var(--line);
     overflow: hidden;
     margin-top: .4rem;
 }

 .quota-bar>span {
     display: block;
     height: 100%;
     background: var(--accent);
     transition: width .25s ease;
 }

 hr.sep {
     border: none;
     border-top: 1px solid var(--line);
     margin: 1.2rem 0;
 }

 .field-label {
     font-size: .8rem;
     font-weight: 600;
     /* color: var(--text); */
     display: flex;
     align-items: center;
     justify-content: space-between;
     margin-bottom: .5rem;
 }

 .field-label .val {
     font-weight: 500;
     font-size: .76rem;
     color: var(--accent);
     background: var(--accent-soft);
     padding: .1rem .45rem;
     border-radius: 6px;
 }

 .form-range {
     accent-color: var(--accent);
 }

 input[type="range"]::-webkit-slider-thumb {
     -webkit-appearance: none;
     width: 14px;
     height: 14px;
     border-radius: 50%;
     background: var(--accent);
     cursor: pointer;
     border: 2px solid #121316;
     box-shadow: 0 0 0 1px var(--accent);
 }

 input[type="range"]::-moz-range-thumb {
     width: 14px;
     height: 14px;
     border-radius: 50%;
     background: var(--accent);
     cursor: pointer;
     border: 2px solid #121316;
     box-shadow: 0 0 0 1px var(--accent);
 }

 .field-hint {
     font-size: .74rem;
     color: var(--ink-faint);
     margin-top: .35rem;
 }

 .toggle-row {
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: .5rem 0;
 }

 .toggle-row .t-label {
     font-size: .85rem;
     font-weight: 500;
 }

 .toggle-row .t-hint {
     font-size: .74rem;
     color: var(--ink-faint);
 }

 .form-check-input {
     cursor: pointer;
 }

 .form-check-input:checked {
     background-color: var(--accent);
     border-color: var(--accent);
 }

 .btn-ink {
     background: var(--primary);
     color: #fff;
     border: 1px solid var(--ink);
     font-weight: 600;
     font-size: .85rem;
     border-radius: 9px;
     padding: .55rem .9rem;
     display: inline-flex;
     align-items: center;
     gap: .4rem;
     transition: transform .1s ease, opacity .15s ease;
 }

 .btn-ink:hover {
     opacity: .88;
     color: #fff;
     background: var(--hover);
 }

 .btn-ink:active {
     transform: scale(.98);
 }

 */ .btn-outline-soft {
     background: transparent;
     color: var(--ink);
     border: 1px solid var(--line);
     font-weight: 600;
     font-size: .82rem;
     border-radius: 9px;
     padding: .5rem .85rem;
     display: inline-flex;
     align-items: center;
     gap: .4rem;
 }

 .btn-outline-soft:hover {
     border-color: var(--ink);
     color: var(--ink);
     background: #fff;
 }

 /* ---------- Empty state ---------- */
 .empty-state {
     border: 1px dashed var(--line);
     border-radius: var(--radius);
     /* background: var(--panel); */
     padding: 3.4rem 1.5rem;
     text-align: center;
     color: var(--ink-faint);
 }

 .empty-state i {
     font-size: 2.1rem;
     color: var(--line);
     margin-bottom: .75rem;
     display: block;
 }

 .empty-state .e-title {
     font-size: 1.15rem;
     color: var(--ink-soft);
     margin-bottom: .25rem;
 }

 .empty-state .e-sub {
     font-size: .86rem;
     max-width: 34ch;
     margin: 0 auto;
 }

 /* ---------- Result cards ---------- */
 .results-head {
     display: flex;
     align-items: baseline;
     justify-content: space-between;
     margin-bottom: 1rem;
     flex-wrap: wrap;
     gap: .5rem;
 }

 .results-head h2 {
     font-weight: 600;
     font-size: 1.25rem;
     margin: 0;
 }

 .results-head .count {
     color: var(--ink-faint);
     font-size: .85rem;
 }

 .card-stack {
     display: flex;
     flex-direction: column;
     gap: 1.1rem;
 }

 .img-card {
     /* background: var(--panel); */
     border: 1px solid var(--line);
     border-radius: var(--radius);
     box-shadow: var(--shadow);
     padding: 1.1rem;
     display: grid;
     grid-template-columns: 168px 1fr;
     gap: 1.1rem;
 }

 @media (max-width: 620px) {
     .img-card {
         grid-template-columns: 1fr;
     }
 }

 .img-card .thumb-wrap {
     position: relative;
     border-radius: 10px;
     overflow: hidden;
     background: #F0EEE9;
     aspect-ratio: 1 / 1;
 }

 .img-card .thumb-wrap img {
     width: 100%;
     height: 100%;
     object-fit: cover;
     display: block;
 }

 .img-card .thumb-remove {
     position: absolute;
     top: .4rem;
     right: .4rem;
     width: 26px;
     height: 26px;
     border-radius: 7px;
     background: rgba(23, 23, 26, .55);
     color: #fff;
     border: none;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: .85rem;
     backdrop-filter: blur(2px);
 }

 .img-card .thumb-remove:hover {
     background: rgba(196, 67, 46, .9);
 }

 .img-card .meta-name {
     font-size: .78rem;
     font-weight: 600;
     margin-top: .5rem;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
 }

 .img-card .meta-dims {
     font-size: .72rem;
     color: var(--ink-faint);
 }

 .card-body-head {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: .6rem;
     margin-bottom: .75rem;
 }

 .status-pill {
     font-size: .72rem;
     font-weight: 600;
     padding: .2rem .55rem;
     border-radius: 20px;
     display: inline-flex;
     align-items: center;
     gap: .35rem;
 }

 .status-pill.working {
     color: var(--accent);
     background: var(--accent-soft);
 }

 .status-pill.done {
     color: #1F7A55;
     background: #E7F5EE;
 }

 .card-actions {
     display: flex;
     gap: .4rem;
 }

 .icon-btn {
     width: 30px;
     height: 30px;
     border-radius: 8px;
     border: 1px solid var(--line);
     background: #fff;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: .85rem;
     color: var(--ink-soft);
 }

 .icon-btn:hover {
     border-color: var(--ink);
     color: var(--ink);
 }

 .swatch-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
     gap: .6rem;
 }

 .swatch {
     border-radius: 10px;
     overflow: hidden;
     border: 1px solid var(--line);
     cursor: pointer;
     /* background: #fff; */
     transition: transform .1s ease, box-shadow .15s ease;
     position: relative;
 }

 .swatch:hover {
     transform: translateY(-2px);
     box-shadow: 0 6px 16px -8px rgba(23, 23, 26, .28);
 }

 .swatch .chip {
     height: 52px;
     width: 100%;
 }

 .swatch .swatch-info {
     padding: .35rem .45rem .45rem;
 }

 .swatch .hex {
     font-size: .7rem;
     font-weight: 500;
     display: block;
 }

 .swatch .pct {
     font-size: .66rem;
     color: var(--ink-faint);
 }

 .swatch .copy-flag {
     position: absolute;
     inset: 0;
     background: rgba(23, 23, 26, .72);
     color: #fff;
     font-size: .72rem;
     font-weight: 600;
     display: flex;
     align-items: center;
     justify-content: center;
     opacity: 0;
     transition: opacity .12s ease;
     pointer-events: none;
 }

 .swatch.copied .copy-flag {
     opacity: 1;
 }

 .skeleton-row {
     display: flex;
     gap: .6rem;
 }

 .skeleton-chip {
     height: 52px;
     flex: 1;
     border-radius: 10px;
     background: linear-gradient(90deg, #F0EEE9 25%, #F7F5F1 37%, #F0EEE9 63%);
     background-size: 400% 100%;
     animation: shimmer 1.3s ease infinite;
 }

 @keyframes shimmer {
     0% {
         background-position: 100% 0;
     }

     100% {
         background-position: 0 0;
     }
 }

 /* toast */
 .toast-lite {
     position: fixed;
     bottom: 1.25rem;
     left: 50%;
     transform: translateX(-50%) translateY(8px);
     background: var(--ink);
     color: #fff;
     font-size: .82rem;
     font-weight: 500;
     padding: .55rem .95rem;
     border-radius: 9px;
     box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4);
     opacity: 0;
     pointer-events: none;
     transition: opacity .18s ease, transform .18s ease;
     z-index: 50;
     display: flex;
     align-items: center;
     gap: .45rem;
 }

 .toast-lite.show {
     opacity: 1;
     transform: translateX(-50%) translateY(0);
 }

 .footer-note {
     max-width: 1180px;
     margin: 0 auto;
     padding: 0 1.25rem 2.5rem;
     color: var(--ink-faint);
     font-size: .78rem;
 }

 input[type=file] {
     display: none;
 }


 /* ================================
   Section Heading
================================ */

 .section-heading {
     max-width: 700px;

     margin: 100px auto 45px;
 }

 .section-tag {
     display: inline-block;

     margin-bottom: 12px;

     color: var(--primary);

     font-size: 12px;
     font-weight: 750;
     letter-spacing: 1px;
 }

 .section-heading h2 {
     margin-bottom: 12px;

     font-size: clamp(26px, 4vw, 34px);
     font-weight: 750;
     letter-spacing: -0.8px;
 }

 .section-heading p {
     margin: 0;

     color: var(--muted);
 }


 /* ================================
   Feature Cards
================================ */

 .feature-card {
     height: 100%;

     padding: 26px;

     border: 1px solid var(--border);
     border-radius: 16px;

     background: var(--white);

     box-shadow: var(--shadow-sm);

     transition:
         transform 0.2s ease,
         box-shadow 0.2s ease;
 }

 .feature-card:hover {
     transform: translateY(-4px);
     box-shadow: var(--shadow-md);
 }

 .feature-icon {
     width: 48px;
     height: 48px;

     display: flex;
     align-items: center;
     justify-content: center;

     margin-bottom: 20px;

     border-radius: 12px;

     background: rgba(108, 92, 231, 0.10);

     color: var(--primary);

     font-size: 22px;
 }

 .feature-card h4 {
     margin-bottom: 10px;
     font-size: 17px;
     font-weight: 700;
     color: var(--text);
 }

 .feature-card p {
     margin: 0;

     color: var(--muted);

     font-size: 14px;
     line-height: 1.7;
 }


 /* ================================
   How To Section
================================ */

 .how-section {
     padding-bottom: 20px;
 }

 .steps-container {
     display: flex;
     align-items: flex-start;

     gap: 15px;

     max-width: 1100px;

     margin: 0 auto;
     margin-bottom: 50px;
 }

 .step {
     flex: 1;

     text-align: center;
 }

 .step h4 {
     color: var(--text);
 }


 .step-number {
     width: 48px;
     height: 48px;

     display: flex;
     align-items: center;
     justify-content: center;

     margin: 0 auto 18px;

     border-radius: 50%;

     background: var(--primary);

     color: var(--dark);

     font-weight: 750;
 }

 .step h4 {
     margin-bottom: 8px;

     font-size: 16px;
     font-weight: 700;
 }

 .step p {
     margin: 0;

     color: var(--muted);

     font-size: 13px;
     line-height: 1.6;
 }

 .step-line {
     width: 70px;
     height: 1px;
     margin-top: 24px;
     background: var(--primary);
 }