/* 
  editfyl.com Theme
*/

/* design tokens */
:root {
    --bg:           #f4f3ed;
    --surface:      #ffffff;
    --surface-2:    #fbfaf7;
    --surface-3:    #e5e3db;
    --border:       #dcdad2;
    --border-soft:  #eae8e1;
    --border-glow:  #111111;
    --accent:       #111111;
    --accent-dim:   rgba(0, 0, 0, 0.05);
    --accent-glow:  rgba(0, 0, 0, 0.1);
    --text:         #1a1a1a;
    --text-dim:     #555555;
    --text-faint:   #888888;
    --text-muted:   #999999;
    --ok:           #2f855a;
    --font:         'Outfit', system-ui, sans-serif;
    --font-serif:   'Playfair Display', serif;
    --mono:         'IBM Plex Mono', monospace;
    --radius-sm:    2px;
    --radius:       0px;
    --radius-lg:    0px;
    --shadow:       none;
    --shadow-sm:    none;
    --trans:        0.2s ease-out;
}

/* css reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.01em;
}

a { color: inherit; text-decoration: none; }

/* topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
}

.brand-icon {
    font-size: 1.35rem;
    color: var(--accent);
    line-height: 1;
}

.brand-name {
    font-weight: 700;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: var(--text);
}

.brand-logo {
    height: 28px;
    display: block;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    min-height: 24px;
}

.bc-sep { opacity: 0.4; }
.bc-active { color: var(--accent); font-weight: 500; }

/* ================================================================
   SCREENS
================================================================ */
.screen {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 2.5rem 2rem 5rem;
    animation: fadeUp 0.4s ease-out both;
}

.footbar {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 0.8rem;
}

.ad-slot {
    margin: 2.5rem auto;
    width: 100%;
    max-width: 728px;
    height: 90px;
    background-color: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.ad-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.ad-slot:hover img {
    opacity: 1;
}

@media (max-width: 768px) {
    .ad-slot {
        height: auto;
        min-height: 50px;
        aspect-ratio: 320/50; /* Mobile leaderboard */
    }
}

.screen:not([hidden]) {
    animation: screenIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes screenIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

/* ================================================================
   SCREEN 1 — HOME
================================================================ */
.home-hero {
    text-align: center;
    margin-bottom: 3.5rem;
}

.home-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 1.5rem 0;
    color: var(--text);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    padding: 1.5rem 0;
    border-top: 1px solid var(--text);
    border-bottom: 1px solid var(--text);
}

.home-hero p {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    max-width: 480px;
    margin: 0 auto;
}

/* trust badges strip */
.trust-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    margin-top: 1.25rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--border);
    transition: color 0.15s, border-color 0.15s;
}

.trust-badge svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.trust-badge:hover {
    color: var(--text);
    border-color: var(--accent);
}

.trust-badge:hover svg {
    opacity: 1;
}

.trust-sep {
    color: var(--border);
    font-size: 1rem;
    line-height: 1;
    user-select: none;
}

/* Category grid */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* Category card */
.cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2.2rem 1.5rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    overflow: hidden;
    transition:
        transform var(--trans),
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(245,185,66,0.07) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.cat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245,185,66,0.45);
    box-shadow:
        0 16px 48px rgba(0,0,0,0.45),
        0 0 0 1px rgba(245,185,66,0.12),
        0 0 40px rgba(245,185,66,0.08);
}

.cat-card:hover::before { opacity: 1; }

/* Icon circle */
.cat-icon-bg {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245,185,66,0.1);
    border: 1.5px solid rgba(245,185,66,0.2);
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.cat-card:hover .cat-icon-bg {
    background: rgba(245,185,66,0.18);
    border-color: rgba(245,185,66,0.45);
    transform: scale(1.06);
}

.cat-icon-svg {
    width: 38px;
    height: 38px;
    color: var(--accent);
}

.cat-card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
}

.cat-card p {
    font-size: 0.81rem;
    color: var(--text-dim);
    line-height: 1.55;
}

.cat-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.8rem;
    background: var(--accent-dim);
    border: 1px solid rgba(245,185,66,0.25);
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: auto;
}

.home-footer-note {
    text-align: center;
    margin-top: 2.5rem;
    font-size: 0.75rem;
    color: var(--text-faint);
    letter-spacing: 0.02em;
}

/* ================================================================
   SCREEN 2 — CATEGORY
================================================================ */
.screen-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background var(--trans), color var(--trans), border-color var(--trans);
}

.back-btn:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--text-dim);
}

.screen-title {
    font-size: 1.45rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: var(--text);
    line-height: 1.2;
}

/* Tool cards grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
}

/* Tool card */
.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    text-align: center;
    color: inherit;
    font-family: inherit;
    aspect-ratio: 1 / 1;
    transition: var(--trans);
}

.tool-card:hover {
    background: var(--surface-2);
    border-color: var(--accent);
}

.tc-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 0.25rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.tool-card:hover .tc-img {
    transform: scale(1.15) translateY(-4px);
}

.tc-text { flex: none; width: 100%; }

.tc-name {
    display: block;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

.tc-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.77rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* ================================================================
   SCREEN 3 — TOOL
================================================================ */
.tool-panel { max-width: 100%; }

.tool-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-soft);
}

.tool-header h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.tool-header p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Dropzone */
.dropzone {
    border: 1px dashed var(--border);
    padding: 2.75rem 1.5rem;
    text-align: center;
    cursor: pointer;
    background: var(--surface);
    margin-bottom: 1.75rem;
    transition: var(--trans);
}

.dropzone:hover,
.dropzone.is-dragover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.dz-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    pointer-events: none;
}
.dz-inner .btn-link { pointer-events: auto; }

.dz-icon {
    width: 46px;
    height: 46px;
    color: var(--text-faint);
    transition: color var(--trans);
}

.dropzone:hover .dz-icon,
.dropzone.is-dragover .dz-icon {
    color: var(--accent);
}

.dropzone p {
    font-size: 0.87rem;
    color: var(--text-dim);
}

/* Tool-grid */
.tool-grid {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.tool-grid canvas {
    flex: 1 1 220px;
    max-width: 50%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-3);
    display: block;
}

[hidden] { display: none !important; }

/* Controls column */
.controls-col {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    min-width: 200px;
}

.controls-col.full {
    flex-basis: 100%;
    max-width: 460px;
    margin: 0 auto;
}

/* Form elements */
label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

label.check {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"],
select,
textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem; /* 16px — prevents iOS Safari auto-zoom on focus */
    padding: 0.55rem 0.8rem;
    width: 100%;
    outline: none;
    transition: border-color var(--trans), box-shadow var(--trans);
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a94ad' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    cursor: pointer;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--surface-2);
    border-radius: 99px;
    outline: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-glow);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

textarea { resize: vertical; }

input[type="checkbox"] {
    accent-color: var(--accent);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Buttons */
.btn-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.58rem 1.35rem;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.87rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background var(--trans),
        color var(--trans),
        border-color var(--trans),
        transform 0.1s ease,
        box-shadow var(--trans);
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}
.btn-primary:hover {
    background: var(--surface-2);
    border-color: var(--text);
}
.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-accent {
    background: var(--text);
    color: var(--bg);
    display: none;
}
.btn-accent.is-ready {
    display: inline-flex;
}
.btn-accent.is-ready:hover {
    background: var(--text-dim);
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.btn-link:hover { color: #e8aa30; }

/* Meta / Note */
.meta {
    font-size: 0.81rem;
    color: var(--text-dim);
    font-family: var(--mono);
    line-height: 1.5;
}

.note {
    font-size: 0.82rem;
    color: var(--text-dim);
    background: rgba(245,185,66,0.06);
    border-left: 3px solid rgba(245,185,66,0.4);
    padding: 0.65rem 1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

/* File list */
.filelist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.filelist::-webkit-scrollbar { width: 4px; }
.filelist::-webkit-scrollbar-track { background: var(--surface); border-radius: 99px; }
.filelist::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.filelist li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--mono);
}

.filelist li span:last-child { color: var(--text-dim); flex-shrink: 0; }

/* Crop */
.crop-stage {
    flex: 1 1 220px;
    max-width: 50%;
    min-width: 200px;
}
.crop-stage canvas {
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: crosshair;
    display: block;
}

/* BG Remove */
.bg-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 200px;
    flex-wrap: wrap;
}

.bg-preview img {
    max-width: 130px;
    max-height: 150px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    border: 1px solid var(--border);
}

.arrow {
    font-size: 1.4rem;
    color: var(--text-faint);
    flex-shrink: 0;
}

.checker-frame {
    max-width: 130px;
    min-width: 60px;
    max-height: 150px;
    border-radius: var(--radius-sm);
    background-image:
        conic-gradient(#555 25%, transparent 25% 75%, #555 75%) 0 0 / 14px 14px,
        conic-gradient(#555 25%, transparent 25% 75%, #555 75%) 7px 7px / 14px 14px;
    background-color: #3a3a3a;
    overflow: hidden;
    border: 1px solid var(--border);
}

.checker-frame img {
    display: block;
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

/* QR */
.qr-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: #fff;
    border-radius: var(--radius);
    flex: 0 0 auto;
}

/* Progress ring */
.progress-ring-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 0.5rem;
    filter: drop-shadow(0 0 10px var(--accent-glow));
    animation: ringAppear 0.22s ease both;
}

@keyframes ringAppear {
    from { opacity: 0; transform: scale(0.75); }
    to   { opacity: 1; transform: scale(1); }
}

.progress-ring {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.progress-ring__track {
    fill: none;
    stroke: var(--surface-3);
    stroke-width: 6;
}

.progress-ring__fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-ring__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.02em;
    pointer-events: none;
}

/* ================================================================
   FOOTER
================================================================ */
.footbar {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.76rem;
    color: var(--text-faint);
    border-top: 1px solid var(--border-soft);
}

.foot-mark {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* ================================================================
   FOCUS
================================================================ */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 700px) {
    .topbar { padding: 0.8rem 1.1rem; }
    .screen { padding: 1.75rem 1rem 4rem; }

    .cat-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .cat-card {
        flex-direction: row;
        text-align: left;
        align-items: center;
        padding: 1.25rem;
        gap: 1rem;
    }

    .cat-icon-bg { width: 56px; height: 56px; flex-shrink: 0; }
    .cat-icon-svg { width: 28px; height: 28px; }
    .cat-card h2 { font-size: 0.97rem; }

    /* Square tool cards — 2 per row on mobile */
    .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .tc-name { font-size: 0.9rem; }
    .tc-desc { display: none; } /* hide desc on small screens to keep squares clean */
    .tool-card { padding: 1.25rem 0.75rem; }
    .tool-grid canvas { max-width: 100%; }
    .bg-preview { flex-direction: column; align-items: flex-start; }
}

/* ================================================================
   TUTORIAL BUTTON
================================================================ */
.tutorial-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.1rem;
    background: var(--accent-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--trans), border-color var(--trans), color var(--trans);
    white-space: nowrap;
}

.tutorial-btn:hover {
    background: var(--surface-3);
    border-color: var(--text-dim);
}

.tool-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-soft);
}

.tool-header-row h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.tool-header-row p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ================================================================
   NEXT DOCUMENT BANNER
================================================================ */
#next-doc-banner {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1.5rem;
}

#next-doc-banner.visible {
    opacity: 1;
}

.next-doc-inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: bannerIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bannerIn {
    from { transform: scale(0.88) translateY(20px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

.next-doc-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(52,199,89,0.1);
    border: 2px solid rgba(52,199,89,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--ok);
    margin-bottom: 0.5rem;
}

.next-doc-inner h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.next-doc-inner p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.next-doc-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.next-doc-home {
    font-size: 0.82rem;
    color: var(--text-dim);
    text-decoration: none;
    margin-top: 0.25rem;
}

.next-doc-home:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ================================================================
   CV MAKER
================================================================ */
.cv-maker-wrap { display: flex; gap: 2rem; align-items: flex-start; }
.cv-form-col { flex: 0 0 350px; display: flex; flex-direction: column; gap: 1.5rem; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 0.5rem; }
.cv-preview-col { flex: 1; background: var(--surface-3); border: 1px solid var(--border); position: sticky; top: 80px; height: calc(100vh - 120px); display: flex; justify-content: center; align-items: flex-start; padding: 1rem; overflow: hidden; }
#cv-preview-scale-wrap { transform-origin: top center; flex-shrink: 0; overflow: hidden; }
#cv-preview-doc { width: 794px; min-height: 1123px; background: #fff; color: #333; line-height: 1.5; font-family: 'Inter', sans-serif; box-sizing: border-box; box-shadow: 0 12px 40px rgba(0,0,0,0.25); overflow: hidden; position: relative; }

.cv-form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.cv-form-section h3 { font-size: 1.05rem; font-family: var(--font-serif); font-weight: 700; margin-bottom: 1rem; color: var(--text); }
.cv-form-section .form-group { margin-bottom: 1rem; }
.cv-form-section input, .cv-form-section textarea { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0.6rem; color: var(--text); font-family: inherit; outline: none; }
.cv-form-section input:focus, .cv-form-section textarea:focus { border-color: var(--text); }
.section-title-wrap { display: flex; align-items: center; margin-bottom: 1rem; position: relative; }
.section-title-input { font-size: 1.05rem; font-family: var(--font-serif); font-weight: 700; color: var(--text); background: transparent; border: 1px dashed transparent; padding: 0.2rem 0; width: 100%; outline: none; transition: 0.2s; margin-bottom: 0; }
.section-title-input[readonly] { border-color: transparent; cursor: default; pointer-events: none; }
.section-title-input:not([readonly]):hover { border-bottom-color: var(--border); }
.section-title-input:not([readonly]):focus { border-bottom-color: var(--primary); }
.btn-edit-title { background: none; border: none; color: var(--text-dim); cursor: pointer; margin-left: 0.5rem; opacity: 0.5; transition: 0.2s; display: flex; align-items: center; justify-content: center; padding: 0.2rem; }
.section-title-wrap:hover .btn-edit-title { opacity: 1; }
.btn-edit-title:hover { color: var(--primary); }
.section-header-flex { display: flex; justify-content: space-between; align-items: flex-start; }
.btn-add-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; color: var(--text); padding: 0.1rem 0.5rem; cursor: pointer; transition: 0.2s; font-size: 0.9rem; }
.btn-add-item:hover { background: var(--surface-3); }
.cv-dynamic-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; position: relative; }
.cv-dynamic-item:last-child { margin-bottom: 0; }
.btn-remove-item { position: absolute; top: 0.5rem; right: 0.5rem; background: none; border: none; color: #ef4444; cursor: pointer; font-size: 1rem; opacity: 0.5; transition: 0.2s; }
.btn-remove-item:hover { opacity: 1; }
/* SEO and FAQ Section */
.seo-faq-section { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); text-align: left; }
.tutorial-link-heading { display: inline-block; margin-bottom: 2rem; color: var(--primary); text-decoration: none; font-family: var(--font-serif); transition: 0.2s; }
.tutorial-link-heading h2 { font-size: 1.8rem; margin: 0; }
.tutorial-link-heading:hover { color: var(--text); }
.faq-container { margin-top: 2rem; }
.faq-container h3 { font-size: 1.3rem; margin-bottom: 1.5rem; font-family: var(--font-serif); }
.faq-item { margin-bottom: 1.5rem; }
.faq-item strong { display: block; font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--text); }
.faq-item p { color: var(--text-dim); line-height: 1.6; margin: 0; }

/* CV Templates Base */
/* CV Templates Base — keep at 794px width from #cv-preview-doc base rule */
#cv-preview-doc .cv-photo { width: 120px; height: 120px; border-radius: 50%; margin-bottom: 1.5rem; border: 4px solid rgba(255,255,255,0.2); background-size: cover; background-position: center; background-repeat: no-repeat; }
#cv-preview-doc .cv-heading { font-size: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
#cv-preview-doc .cv-icon { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 4px; }
.cv-template-golden .cv-icon { color: #d81b60; }
.cv-template-midnight .cv-icon { color: #cbd5e1; }
.cv-template-creative .cv-icon { color: #d4a132; }
#cv-preview-doc .cv-item { margin-bottom: 1.25rem; }
#cv-preview-doc .cv-item-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.2rem; }
#cv-preview-doc .cv-item-meta { font-size: 0.9rem; color: #666; margin-bottom: 0.4rem; font-style: italic; }
#cv-preview-doc .cv-item-company { font-weight: 600; font-size: 1rem; margin-bottom: 0.4rem; }
#cv-preview-doc .cv-item-desc { font-size: 0.95rem; line-height: 1.6; color: #444; }
#cv-preview-doc .list-style { padding-left: 1rem; }

/* 1. Golden Professional */
#cv-preview-doc.cv-template-golden { display: flex; }
.cv-template-golden .cv-sidebar { width: 280px; background: #fdf5d3; padding: 2.5rem 2rem; color: #333; border-right: 1px solid #f0e2b6; }
.cv-template-golden .cv-sb-header { margin-bottom: 2.5rem; font-size: 0.9rem; line-height: 1.8; }
.cv-template-golden .cv-contact-item { margin-bottom: 0.5rem; }
.cv-template-golden .cv-photo { width: 160px; height: 160px; border-radius: 50%; border: none; margin: 0 auto 2.5rem; display: block; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.cv-template-golden .cv-section.sb { margin-bottom: 2rem; }
.cv-template-golden .cv-heading { margin-bottom: 1rem; color: #111; display: block; }
.cv-template-golden .cv-heading span { border-bottom: 3px solid #f5b942; padding-bottom: 0.4rem; display: inline-block; }
.cv-template-golden .cv-skills-list { list-style: none; padding: 0; }
.cv-template-golden .cv-skills-list li { margin-bottom: 0.5rem; font-weight: 500; font-size: 0.95rem; }
.cv-template-golden .cv-skills-list li::before { content: '•'; color: #f5b942; font-weight: bold; display: inline-block; width: 1em; margin-left: -1em; }
.cv-template-golden .cv-main { flex: 1; padding: 3rem; background: #fff; }
.cv-template-golden .cv-main-header { border-bottom: 2px solid #eee; padding-bottom: 1.5rem; margin-bottom: 2rem; }
.cv-template-golden h1 { font-size: 3.2rem; font-weight: 800; color: #111; line-height: 1.1; margin-bottom: 0.5rem; }
.cv-template-golden .cv-section { margin-bottom: 2.5rem; }

/* 2. Midnight Executive */
#cv-preview-doc.cv-template-midnight { display: flex; background: #fff; }
.cv-template-midnight .cv-sidebar { width: 300px; background: #1c2738; color: #e2e8f0; padding: 0; display: flex; flex-direction: column; }
.cv-template-midnight .cv-photo-wrap { padding: 3rem 2rem 2rem; text-align: center; background: #161f2d; }
.cv-template-midnight .cv-photo { width: 160px; height: 160px; border-radius: 50%; border: 4px solid #f5b942; margin-bottom: 0; }
.cv-template-midnight .cv-section { padding: 2rem 2.5rem 0; }
.cv-template-midnight .cv-heading { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem; margin-bottom: 1.25rem; font-size: 1.1rem; letter-spacing: 0.1em; }
.cv-template-midnight .cv-contact-item { font-size: 0.9rem; margin-bottom: 1rem; display: flex; gap: 0.75rem; align-items: center; color: #cbd5e1; }
.cv-template-midnight .cv-skill-item { font-size: 0.9rem; margin-bottom: 0.75rem; color: #cbd5e1; }
.cv-template-midnight .cv-main { flex: 1; padding: 3rem 3.5rem; }
.cv-template-midnight .cv-header { margin-bottom: 3rem; }
.cv-template-midnight h1 { font-size: 3rem; font-weight: 800; color: #1c2738; margin-bottom: 0.2rem; }
.cv-template-midnight .cv-role { font-size: 1.4rem; color: #3b82f6; font-weight: 500; }
.cv-template-midnight .cv-main .cv-heading { color: #1c2738; border-bottom: 2px solid #1c2738; padding-bottom: 0.5rem; font-size: 1.3rem; margin-bottom: 1.5rem; }
.cv-template-midnight .cv-item-title { color: #1c2738; font-size: 1.2rem; }
.cv-template-midnight .cv-item-company { font-style: italic; color: #64748b; font-weight: normal; margin-bottom: 0.5rem; }

/* 3. Creative Studio */
#cv-preview-doc.cv-template-creative { display: flex; background: #1a1a1a; color: #e5e5e5; }
.cv-template-creative .cv-sidebar { width: 280px; background: #111; display: flex; flex-direction: column; }
.cv-template-creative .cv-photo { width: 160px; height: 160px; border-radius: 50%; border: 4px solid #333; margin: 30px 0 0 30px; }
.cv-template-creative .cv-sidebar-pad { padding: 2.5rem 2rem; }
.cv-template-creative .cv-heading { color: #d4a132; font-size: 1.1rem; letter-spacing: 0.1em; margin-bottom: 1rem; border-bottom: 1px solid rgba(212,161,50,0.3); padding-bottom: 0.4rem; }
.cv-template-creative .cv-item-desc { color: #a3a3a3; font-size: 0.9rem; }
.cv-template-creative .cv-main { flex: 1; padding: 3rem 3.5rem; display: flex; flex-direction: column; }
.cv-template-creative .cv-header { border-bottom: 1px solid #333; padding-bottom: 2rem; margin-bottom: 2.5rem; }
.cv-template-creative h1 { font-size: 2.8rem; font-weight: 400; letter-spacing: 0.2em; color: #fff; margin-bottom: 0.5rem; line-height: 1.2; }
.cv-template-creative .cv-role { font-size: 1.1rem; letter-spacing: 0.3em; color: #d4a132; font-weight: 600; }
.cv-template-creative .cv-item-title.accent-box { display: inline-block; background: #d4a132; color: #000; padding: 0.2rem 0.6rem; font-size: 1rem; margin-bottom: 0.5rem; }
.cv-template-creative .cv-skills-list { display: flex; flex-wrap: wrap; gap: 0.8rem; list-style: none; padding: 0; }
.cv-template-creative .cv-skills-list li { background: #333; padding: 0.4rem 0.8rem; border-radius: 4px; font-size: 0.85rem; color: #ddd; }
.cv-template-creative .cv-footer-contact { margin-top: auto; padding-top: 2rem; border-top: 1px solid #333; display: flex; justify-content: space-between; font-size: 0.85rem; color: #888; }

/* 4. Elegant Right-Sidebar */
#cv-preview-doc.cv-template-elegant { display: flex; background: #fff; }
.cv-template-elegant .cv-main { flex: 1; padding: 4rem; }
.cv-template-elegant .cv-sidebar { width: 300px; background: #f3f6f9; color: #333; padding: 4rem 2.5rem; border-left: 1px solid #e2e8f0; }
.cv-template-elegant .cv-photo { width: 180px; height: 180px; border-radius: 50%; margin: 0 auto 3rem; display: block; border: 6px solid #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.cv-template-elegant h1 { font-family: var(--font-serif); font-size: 3.5rem; font-weight: 700; color: #1e293b; margin-bottom: 0.25rem; line-height: 1.1; letter-spacing: -0.02em; }
.cv-template-elegant .cv-role { font-size: 1.25rem; font-weight: 500; color: #3d5a80; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 3rem; }
.cv-template-elegant .cv-heading { border-bottom: 2px solid #e2e8f0; padding-bottom: 0.5rem; margin-bottom: 1.5rem; }
.cv-template-elegant .cv-heading span { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: #1e293b; text-transform: none; letter-spacing: 0; }
.cv-template-elegant .cv-sidebar .cv-heading span { font-size: 1.1rem; }
.cv-template-elegant .cv-contact-item { font-size: 0.9rem; margin-bottom: 0.75rem; color: #475569; }
.cv-template-elegant .cv-skills-list { list-style: none; padding: 0; }
.cv-template-elegant .cv-skills-list li { padding: 0.3rem 0; font-size: 0.95rem; color: #475569; border-bottom: 1px solid rgba(0,0,0,0.05); }
.cv-template-elegant .cv-item-title { color: #1e293b; font-size: 1.15rem; font-weight: 600; }
.cv-template-elegant .cv-item-company { color: #3d5a80; font-weight: 500; margin-bottom: 0.5rem; }
.cv-template-elegant .cv-item-desc { color: #475569; }

/* 5. Vibrant Dark Mode */
#cv-preview-doc.cv-template-vibrant { display: flex; background: #0f172a; color: #cbd5e1; }
.cv-template-vibrant .cv-sidebar { width: 280px; background: #1e293b; padding: 4rem 2rem; border-right: 1px solid rgba(255,255,255,0.05); }
.cv-template-vibrant .cv-photo { width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 3rem; display: block; border: 4px solid #e01bc3; box-shadow: 0 0 25px rgba(224, 27, 195, 0.3); }
.cv-template-vibrant .cv-main { flex: 1; padding: 4rem 3.5rem; }
.cv-template-vibrant h1 { font-size: 3.5rem; font-weight: 800; color: #fff; margin-bottom: 0.2rem; letter-spacing: -0.02em; line-height: 1.1; }
.cv-template-vibrant .cv-role { font-size: 1.2rem; color: #e01bc3; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 3rem; }
.cv-template-vibrant .cv-heading { margin-bottom: 1.5rem; }
.cv-template-vibrant .cv-heading span { font-size: 1.15rem; font-weight: 700; color: #fff; letter-spacing: 0.1em; text-transform: uppercase; padding-bottom: 0.4rem; border-bottom: 3px solid #e01bc3; display: inline-block; }
.cv-template-vibrant .cv-contact-item { font-size: 0.9rem; margin-bottom: 1rem; color: #94a3b8; }
.cv-template-vibrant .cv-skills-list { display: flex; flex-wrap: wrap; gap: 0.75rem; list-style: none; padding: 0; }
.cv-template-vibrant .cv-skills-list li { background: rgba(224, 27, 195, 0.1); border: 1px solid rgba(224, 27, 195, 0.3); padding: 0.4rem 1rem; border-radius: 99px; font-size: 0.85rem; color: #e2e8f0; }
.cv-template-vibrant .cv-item-title { font-size: 1.2rem; margin-bottom: 0.2rem; }
.cv-template-vibrant .cv-item-company { color: #94a3b8; font-style: normal; font-weight: 500; margin-bottom: 0.5rem; }
.cv-template-vibrant .cv-item-desc { color: #cbd5e1; }

/* -------------------------- */
/* Mockup Generator Styles    */
/* -------------------------- */
.mockup-canvas {
    transition: padding 0.2s, background 0.3s;
}

/* Gradients */
.grad-sunset { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); }
.grad-ocean { background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%); }
.grad-candy { background: linear-gradient(to top, #ff0844 0%, #ffb199 100%); }
.grad-midnight { background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%); }
.solid-white { background: #ffffff; }
.solid-black { background: #000000; }

.mockup-frame {
    transition: border-radius 0.2s, box-shadow 0.3s;
    position: relative;
    background: #fff; /* fallback */
}

/* Frame Styles */
.frame-macos {
    box-shadow: 0 20px 40px rgba(0,0,0,0.25), 0 5px 15px rgba(0,0,0,0.15);
    overflow: hidden;
}
.frame-shadow {
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    overflow: hidden;
}
.frame-none {
    box-shadow: none;
    border-radius: 0 !important;
    overflow: visible;
}

/* macOS Titlebar */
.macos-titlebar {
    background: #f1f1f1;
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    border-bottom: 1px solid #e5e5e5;
}
.macos-titlebar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.macos-titlebar span:nth-child(1) { background: #ff5f56; border: 1px solid #e0443e; }
.macos-titlebar span:nth-child(2) { background: #ffbd2e; border: 1px solid #dea123; }
.macos-titlebar span:nth-child(3) { background: #27c93f; border: 1px solid #1aab29; }

/* Phone Frame */
.frame-phone {
    width: 300px;
    max-width: 100%;
    box-shadow: inset 0 0 0 2px #2a2a2a, 0 30px 60px rgba(0,0,0,0.3);
    border: 14px solid #111;
    border-radius: 44px !important;
    position: relative;
    background: #000;
}
.frame-phone img {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 30px;
}

/* Hardware Buttons */
.phone-btn {
    position: absolute;
    background: #2a2a2a;
    width: 3px;
    z-index: 5;
}
.phone-btn.pwr {
    right: -17px;
    top: 100px;
    height: 60px;
    border-radius: 0 3px 3px 0;
}
.phone-btn.vol-up {
    left: -17px;
    top: 100px;
    height: 45px;
    border-radius: 3px 0 0 3px;
}
.phone-btn.vol-down {
    left: -17px;
    top: 160px;
    height: 45px;
    border-radius: 3px 0 0 3px;
}
.phone-btn.silent {
    left: -17px;
    top: 60px;
    height: 25px;
    border-radius: 3px 0 0 3px;
}

/* Absolute floating notch */
.phone-notch-wrap {
    position: absolute;
    top: 10px;
    left: calc(50% - 50px);
    width: 100px;
    height: 28px;
    background: #000;
    border-radius: 20px;
    z-index: 10;
}

@media (max-width: 900px) {
    .cv-maker-wrap { flex-direction: column; gap: 1.5rem; }
    .cv-form-col { flex: none; width: 100%; max-height: none; padding-right: 0; }
    .cv-preview-col { position: relative; top: 0; height: auto; min-height: 400px; padding: 0.5rem; width: 100%; box-sizing: border-box; }
}

@media (max-width: 480px) {
    .tool-header-row { flex-direction: column; align-items: stretch; }
    .tutorial-btn { justify-content: center; width: 100%; }
    
    .trust-strip {
        flex-wrap: nowrap;
        overflow-x: hidden;
        justify-content: space-between;
        gap: 0.2rem;
        padding-bottom: 5px;
        width: 100%;
    }
    .trust-strip::-webkit-scrollbar {
        display: none;
    }
    .trust-badge {
        flex-shrink: 1;
        white-space: nowrap;
        font-size: 1.6vw;
        padding: 0.5vw 0.8vw;
        gap: 0.3vw;
    }
    .trust-badge svg {
        width: 1.8vw;
        height: 1.8vw;
    }
    .trust-sep {
        flex-shrink: 1;
        font-size: 1.8vw;
    }
}

