:root {
    --paper: #F2F1EC;
    --surface: #FFFFFF;
    --surface-sunken: #EAE8E0;
    --ink: #1C2430;
    --ink-muted: #5C6470;
    --ink-faint: #8B929C;
    --line: #DAD6C9;
    --line-strong: #C7C2B2;
    --primary: #a3c43a;
    --primary-ink: #FFFFFF;
    --primary-hover: #1B3C57;
    --accent: #D89A2C;
    --accent-ink: #2A2000;
    --danger: #A6402F;
    --brass: #a3c43a;
    --danger-soft: #F4E4DF;
    --shadow-card: 0 1px 2px rgba(28, 36, 48, 0.06), 0 6px 16px rgba(28, 36, 48, 0.08);
    --shadow-lift: 0 10px 24px rgba(28, 36, 48, 0.20), 0 2px 6px rgba(28, 36, 48, 0.12);
    --radius-s: 6px;
    --radius-m: 10px;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #171B22;
        --surface: #1F242D;
        --surface-sunken: #262C36;
        --ink: #EDEFF2;
        --ink-muted: #A4ACB8;
        --ink-faint: #757E8A;
        --line: #333A46;
        --line-strong: #454E5C;
        --primary: #a3c43a;
        --primary-ink: #0F1720;
        --primary-hover: #8CB9D8;
        --accent: #E4B052;
        --accent-ink: #241900;
        --danger: #E08871;
        --danger-soft: #3A241F;
        --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.35);
        --shadow-lift: 0 10px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
    }
}

:root[data-theme="dark"] {
    --paper: #171B22;
    --surface: #1F242D;
    --surface-sunken: #262C36;
    --ink: #EDEFF2;
    --ink-muted: #A4ACB8;
    --ink-faint: #757E8A;
    --line: #333A46;
    --line-strong: #454E5C;
    --primary: #a3c43a;
    --primary-ink: #0F1720;
    --primary-hover: #8CB9D8;
    --accent: #E4B052;
    --accent-ink: #241900;
    --danger: #E08871;
    --danger-soft: #3A241F;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 10px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.page-hero-title {
    font-weight: 800;
    display: block;
    font-family: 'Bricolage Grotesque', 'DM Sans', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 3.75rem);
    background: linear-gradient(to right, #a3c43a, #a866ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 24px 64px;
}


/* ---------- Layout ---------- */
.layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}

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

/* ---------- Dropzone ---------- */
.dropzone {
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-m);
    background: var(--surface);
    padding: 56px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible {
    border-color: var(--primary);
}

.dropzone.dragover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.dropzone svg {
    width: 40px;
    height: 40px;
    color: var(--ink-faint);
    margin-bottom: 14px;
}

.dz-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 6px;
}

.dz-sub {
    color: var(--ink-muted);
    font-size: 0.92rem;
    margin: 0;
}

.dz-limits {
    color: var(--ink-faint);
    font-size: 0.8rem;
    margin: 10px 0 0;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--primary);
    font-weight: 600;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hidden {
    display: none !important;
}

/* ---------- Tray ---------- */
.tray-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tray-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.count-label {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.tray-actions {
    display: flex;
    gap: 8px;
}

.hint {
    margin: -6px 0 0;
    color: var(--ink-faint);
    font-size: 0.85rem;
}

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

.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-card);
    padding: 10px;
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.card:active {
    cursor: grabbing;
}

.card.sortable-chosen {
    box-shadow: var(--shadow-lift);
}

.card.sortable-drag {
    transform: rotate(-2deg);
}

.card.sortable-ghost {
    opacity: 0.35;
}

.card-thumb {
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-s);
    overflow: hidden;
    background: var(--surface-sunken);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.card-number {
    position: absolute;
    top: -8px;
    left: -8px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-ink);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.card-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 2;
    padding: 0;
}

.card-remove:hover {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: var(--danger);
}

.card-remove svg {
    width: 13px;
    height: 13px;
}

.card-name {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Panel ---------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 20px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 20px;
    /* width: 334px; */
}

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

.panel-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 18px;
}

.field {
    margin-bottom: 18px;
}

.field-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 8px;
}

.seg {
    display: flex;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    overflow: hidden;
    background: var(--surface-sunken);
}

.seg-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 6px;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    border-right: 1px solid var(--line);
}

.seg-btn:last-child {
    border-right: none;
}

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

.seg-btn.active {
    background: var(--primary);
    color: var(--primary-ink);
}

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

.text-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.92rem;
    padding: 9px 10px;
}

/* .text-input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
} */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-s);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.88rem;
    /* padding: 9px 14px; */
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
}

.btn:active {
    transform: translateY(1px);
}

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

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink-muted);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-ghost.btn-danger:hover:not(:disabled) {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-soft);
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-ink);
}


.btn-export {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
}

.btn-export svg {
    width: 16px;
    height: 16px;
}

.status-msg {
    margin: 10px 0 0;
    font-size: 0.82rem;
    color: var(--ink-muted);
    min-height: 1.2em;
}

.status-msg.is-error {
    color: var(--danger);
}

.status-msg.is-success {
    color: var(--primary);
}

/* focus visibility */
a:focus-visible,
button:focus-visible,
/* input:focus-visible, */
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* ================================
   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;
}

.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-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);
}



.faq-search input
 {
    background: unset;
}

.faq-contact-card {
    background: var(--ink-faint);
}


/* .faq-cat-btn {
    background: var(--ink-faint);
} */

.faq-cat-btn:hover {
    background: var(--ink);
    color: var(--line);
}


