:root {
    --primary-dark: #F5F5F5;
    --text-color: #16213e;
    --border-color: #CCCCCC;
    --button-primary: #FF6B35;
    --button-hover: #E85A2D;
    --accent: #ff6408;
    --navbar-bg: #FF6B35;
    --navbar-text: #FFFFFF;
    --poster-ink: #1a1a1a;
    --poster-bg: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-color);
    line-height: 1.55;
    overflow: hidden;
    height: 100vh;
}

.clip-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Navbar */
.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--navbar-bg);
    color: var(--navbar-text);
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 52px;
}

.back-to-site a {
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.back-to-site .back-text { font-size: 0.85rem; font-weight: 500; color: #fff !important; }
.navbar-title { color: #fff; font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; }

/* Layout */
.placemap-layout {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
}

.placemap-layout .main-content {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 52px);
    overflow: hidden;
}

.preview-section {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px 20px 8px;
    background: linear-gradient(180deg, #f7f8fa 0%, #eef1f5 100%);
    position: relative;
}

.preview-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.preview-zoom-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 10px rgba(15,23,42,0.15);
    cursor: pointer;
    color: #334155;
}
.preview-zoom-btn:hover { background: #fff; color: var(--accent); }

.loading-overlay[hidden] { display: none !important; }
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(247,248,250,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    border-radius: 12px;
}
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #ddd;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.preview-note {
    margin-top: 12px;
    font-size: 0.78rem;
    color: #64748b;
    text-align: center;
    max-width: 360px;
}

/* Poster */
.poster-stage {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.poster-frame {
    background: #1a1a1a;
    padding: 10px;
    box-shadow:
        0 12px 40px rgba(15, 23, 42, 0.18),
        0 2px 8px rgba(15, 23, 42, 0.08);
}

.poster-canvas {
    width: min(340px, 72vw);
    aspect-ratio: 3 / 4;
    background: var(--poster-bg);
    color: var(--poster-ink);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Háttér textúrák a térkép mögé */
.poster-canvas.bg-tex-paper {
    background-image:
        radial-gradient(ellipse 90% 55% at 50% -5%, rgba(255,255,255,0.65), transparent 60%),
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(120,90,50,0.03) 3px, rgba(120,90,50,0.03) 4px);
}
.poster-canvas.bg-tex-soft {
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.5), transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(0,0,0,0.04), transparent 45%);
}
.poster-canvas.bg-tex-mist {
    background-image:
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255,255,255,0.55), transparent 55%),
        linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.03) 100%);
}
.poster-canvas.bg-tex-grain {
    background-image:
        repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(0,0,0,0.02) 1px, rgba(0,0,0,0.02) 2px),
        repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0,0,0,0.015) 1px, rgba(0,0,0,0.015) 2px);
}
.poster-canvas:not(.bg-light).bg-tex-paper,
.poster-canvas:not(.bg-light).bg-tex-soft,
.poster-canvas:not(.bg-light).bg-tex-mist,
.poster-canvas:not(.bg-light).bg-tex-grain {
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.08), transparent 55%),
        linear-gradient(180deg, transparent, rgba(0,0,0,0.25));
}

.poster-canvas.is-exporting {
    /* ideiglenes 2× méret a JS-ből – ne törje a stage layoutot animációval */
    box-shadow: none !important;
    transition: none !important;
}
/* Leaflet csempevarrás / vízszintes csíkok csökkentése exportnál */
.poster-canvas.is-exporting .leaflet-tile,
.leaflet-host img.leaflet-tile {
    outline: 1px solid transparent;
    backface-visibility: hidden;
}

.poster-map-area {
    flex: 1 1 58%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5% 7% 6%;
    position: relative;
    z-index: 1;
}

/* Szív: nagyobb, majdnem széltől szélig */
.poster-canvas:has(.map-mask.mask-heart) .poster-map-area,
.poster-canvas:has(.map-mask.mask-split-heart) .poster-map-area {
    flex: 1 1 72%;
    padding: 1% 0.5% 2%;
}

.poster-title-top {
    flex: 0 0 auto;
    text-align: center;
    padding: 6% 8% 0;
}
.poster-title-top[hidden] { display: none !important; }
.pt-title-top {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.05rem, 4.8vw, 1.45rem);
    font-weight: 600;
    line-height: 1.25;
}

.poster-canvas.layout-classic .poster-map-area,
.poster-canvas.layout-couple .poster-map-area {
    flex-basis: 56%;
    padding: 4% 7% 5%;
}

.poster-canvas.layout-classic .map-mask.mask-rectangle,
.poster-canvas.layout-classic .map-mask.mask-rounded {
    /* klasszikus elrendezésnél is a konténerbe férjen */
    max-width: 100%;
    max-height: 100%;
}

.map-compose {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    container-type: size;
    isolation: isolate;
}

.map-mask {
    position: relative;
    /* Fallback + container query: mindig belefér a map-compose-ba */
    width: 88%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
    color: #1a1a1a;
    z-index: 1;
}
@supports (width: 1cqw) {
    .map-mask {
        width: min(100cqw, 100cqh);
        height: min(100cqw, 100cqh);
    }
    .map-mask.mask-rectangle {
        width: min(100cqw, calc(100cqh * 1 / 1.05));
        height: min(100cqh, calc(100cqw * 1.05));
    }
    .map-mask.mask-heart,
    .map-mask.mask-split-heart {
        width: min(100cqw, calc(100cqh * 903 / 767));
        height: min(100cqh, calc(100cqw * 767 / 903));
    }
}

.map-mask.mask-rectangle {
    aspect-ratio: 1 / 1.05;
    width: 88%;
    height: auto;
    border-radius: 0;
    clip-path: none;
}
.map-mask.mask-rounded {
    border-radius: 18px;
    clip-path: none;
}
.map-mask.mask-circle {
    border-radius: 50%;
    clip-path: none;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.14);
}
.poster-canvas:not(.bg-light) .map-mask.mask-circle {
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
}
.map-mask.mask-heart,
.map-mask.mask-split-heart {
    border-radius: 0;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 903 / 767;
    overflow: hidden;
    background: transparent;
    color: inherit;
    /* heart.svg – clip-path a megbízható export miatt elsődleges */
    clip-path: url(#clip-heart);
    -webkit-clip-path: url(#clip-heart);
    -webkit-mask-image: none;
    mask-image: none;
}
.heart-stroke-img {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 560;
    opacity: 0.88;
    filter: invert(1) drop-shadow(0 0 1px rgba(0,0,0,0.35));
}
.poster-canvas.bg-light .heart-stroke-img {
    filter: none;
    opacity: 0.55;
}
.poster-canvas:not(.bg-light) .heart-stroke-img {
    filter: invert(1);
    opacity: 0.7;
}
.map-mask.mask-heart .heart-stroke-img,
.map-mask.mask-split-heart .heart-stroke-img {
    display: block;
}
.map-mask.mask-heart .mask-stroke .stroke-heart,
.map-mask.mask-split-heart .mask-stroke .stroke-heart { display: none; }
.map-mask.mask-fade {
    border-radius: 0;
    clip-path: none;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: auto;
    /* Átlátszó: az átmenetnél a poszter háttér látszik, nem szürke/fehér sáv */
    background: transparent !important;
    -webkit-mask-image: none;
    mask-image: none;
}
.map-fade-overlay {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 0%, var(--poster-bg, #ffffff) 100%);
}
/* Átmenet: a térkép alja átlátszó → a poszter háttér (szín/kép) látszik át */
.poster-canvas.has-fade .map-fade-overlay {
    display: none !important;
    background: none !important;
}
.poster-canvas.has-fade .map-pane .leaflet-host {
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 42%,
        rgba(0, 0, 0, 0.72) 58%,
        rgba(0, 0, 0, 0.28) 75%,
        rgba(0, 0, 0, 0.06) 90%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 42%,
        rgba(0, 0, 0, 0.72) 58%,
        rgba(0, 0, 0, 0.28) 75%,
        rgba(0, 0, 0, 0.06) 90%,
        transparent 100%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}
.poster-canvas.has-fade .poster-map-area {
    flex: 1 1 68%;
    padding: 0;
    align-items: stretch;
    position: relative;
    z-index: 1;
}
.poster-canvas.has-fade .map-compose {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    isolation: isolate;
}
.poster-canvas.has-fade .map-mask {
    z-index: 1;
    background: transparent !important;
}
.poster-canvas.has-fade .poster-text-area {
    position: relative;
    z-index: 30;
    margin-top: -14%;
    padding-top: 8px;
    padding-left: 10%;
    padding-right: 10%;
    background: transparent;
    min-height: 26%;
    pointer-events: none;
}
.poster-canvas.has-fade .poster-text-area .text-block {
    pointer-events: auto;
}
.poster-canvas.has-fade .mask-stroke { display: none; }
.poster-canvas.has-fade .photo-overlay {
    z-index: 700;
}

.opt-btn .mask-thumb.fade {
    background: linear-gradient(to bottom, #64748b 0%, #cbd5e1 55%, transparent 100%);
    border-radius: 2px;
}
.opt-btn.active .mask-thumb.fade {
    background: linear-gradient(to bottom, var(--accent) 0%, #fdba74 55%, transparent 100%);
}

.split-row {
    display: flex;
    width: 100%;
    height: 100%;
}
.map-pane {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    flex: 1 1 100%;
}
.map-mask.mask-split-heart .map-pane,
.map-mask.is-dual .map-pane {
    flex: 1 1 50%;
    width: 50%;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
/* Dual: nincs középső elválasztó vonal + 1px átfedés a subpixel rés ellen */
.map-mask.is-dual .map-pane-a {
    border-right: none !important;
    margin-right: -1px;
    z-index: 1;
}
.map-mask.is-dual .map-pane-b {
    border-left: none !important;
}
.map-mask.is-dual .map-pane.is-active-side {
    outline: 2px solid rgba(255, 107, 53, 0.85);
    outline-offset: -2px;
    z-index: 2;
}
.map-pane[hidden] { display: none !important; }

.leaflet-host {
    width: 100%;
    height: 100%;
    /* Átlátszó: átmenetnél a poszter háttér látszik át, nem fehér sáv */
    background: transparent !important;
    filter: none;
}
.leaflet-host.leaflet-container,
.leaflet-host .leaflet-container {
    background: transparent !important;
}
.leaflet-host .leaflet-tile-pane {
    /* a tényleges kontraszt a JS filteren van a host-on */
}

.leaflet-host .leaflet-control-attribution,
.leaflet-host .leaflet-control-zoom {
    display: none !important;
}

.mask-stroke {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 550;
    overflow: visible;
}
.mask-stroke .stroke-heart,
.mask-stroke .stroke-circle,
.mask-stroke .stroke-rect,
.mask-stroke .stroke-rounded { display: none; }

.map-mask.mask-heart .stroke-heart,
.map-mask.mask-split-heart .stroke-heart { display: none; }
.map-mask.mask-circle .stroke-circle { display: block; }
.map-mask.mask-rectangle .stroke-rect { display: block; }
.map-mask.mask-rounded .stroke-rounded { display: block; }

.map-center-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -58%);
    z-index: 600;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
    user-select: none;
}
.map-center-marker:active { cursor: grabbing; }
.map-pin-svg {
    display: block;
    line-height: 0;
}
.map-pin-svg svg {
    display: block;
    overflow: visible;
}

/* Photo overlay – születésnapi mintájára: JS cover + clamp, overflow hidden */
.photo-overlay {
    position: absolute;
    z-index: 700;
    width: var(--photo-size, 28%);
    pointer-events: auto;
}
.photo-overlay[hidden] { display: none !important; }
/* Beljebb a szélektől – a forgatás + polaroid miatt ne vágódjon le a poszter overflow-ján */
.photo-overlay.pos-bottom-right { right: 6%; bottom: 8%; transform: rotate(5deg); }
.photo-overlay.pos-bottom-left { left: 6%; bottom: 8%; transform: rotate(-5deg); }
.photo-overlay.pos-top-right { right: 6%; top: 10%; transform: rotate(4deg); }
.photo-overlay.pos-top-left { left: 6%; top: 10%; transform: rotate(-4deg); }

.photo-frame {
    --ox: 0px;
    --oy: 0px;
    --ps: 1.15;
    width: 100%;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15,23,42,0.22);
    position: relative;
    cursor: grab;
}
.photo-frame:active { cursor: grabbing; }
.photo-frame.is-uploadable { cursor: pointer; }

.photo-mask-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    touch-action: none;
    background: #e2e8f0;
}
/* Méretet a JS állítja valódi cover-re (egyik oldal nagyobb a maszknál) */
.photo-mask-inner img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: fill;
    transform: translate(calc(-50% + var(--ox, 0px)), calc(-50% + var(--oy, 0px))) scale(var(--ps, 1.15));
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    display: block;
}
.photo-mask-inner img[hidden] { display: none !important; }

.photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8%;
    color: #94a3b8;
    background: #f1f5f9;
    text-align: center;
    padding: 8%;
    pointer-events: none;
    user-select: none;
}
.photo-placeholder[hidden] { display: none !important; }
.photo-placeholder i { font-size: 1.35rem; opacity: 0.85; }
.photo-placeholder span {
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.01em;
}
.photo-frame.is-uploadable:hover .photo-placeholder {
    color: #64748b;
    background: #e2e8f0;
}

.photo-overlay.frame-polaroid .photo-frame {
    padding: 5% 5% 12%;
    border-radius: 2px;
}
.photo-overlay.frame-circle .photo-frame {
    border-radius: 50%;
    padding: 0;
    border: 3px solid #fff;
}
.photo-overlay.frame-circle .photo-mask-inner {
    border-radius: 50%;
}
.photo-overlay.frame-rounded .photo-frame {
    border-radius: 14px;
    padding: 4%;
    border: 2px solid #fff;
}
.photo-overlay.frame-rounded .photo-mask-inner {
    border-radius: 10px;
}

.btn.btn-photo-upload,
#photoUploadBtn.btn-photo-upload {
    flex: 1 1 auto;
    min-width: 160px;
    justify-content: center;
    background: #FF6B35 !important;
    background-color: #FF6B35 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}
.btn.btn-photo-upload:hover,
#photoUploadBtn.btn-photo-upload:hover {
    background: #E85A2D !important;
    background-color: #E85A2D !important;
}
.btn.btn-photo-remove,
#photoRemoveBtn.btn-photo-remove {
    background: #fff !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}
.btn.btn-photo-remove:hover,
#photoRemoveBtn.btn-photo-remove:hover {
    background: #fef2f2 !important;
}
.photo-drag-hint {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.photo-drag-hint[hidden] { display: none !important; }
.photo-drag-hint i { color: var(--accent); }

.map-pin { display: inline-block; line-height: 1; }
.map-pin-fa { font-size: 20px; }
.map-pin-tall { font-size: 26px; }
.map-pin-heart { font-size: 22px; }
.map-pin-marker { font-size: 26px; }
.map-pin-star { font-size: 22px; }
.map-pin-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
    display: inline-block;
}
.pt-ornament .fa-heart { font-size: 0.55rem; }

/* Text area */
.poster-text-area {
    flex: 0 0 auto;
    padding: 3% 8% 7%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 30%;
    position: relative;
    z-index: 20;
    background: transparent;
}

.text-block { display: none; width: 100%; }
.poster-canvas.layout-began .text-layout-began { display: block; }
.poster-canvas.layout-firstmet .text-layout-firstmet { display: block; }
.poster-canvas.layout-couple .text-layout-couple { display: block; }
.poster-canvas.layout-classic .text-layout-classic { display: block; }
.poster-canvas.layout-romance .text-layout-romance { display: block; }

.poster-canvas.layout-couple .poster-text-area {
    padding-top: 1.5%;
    padding-bottom: 3%;
}
.poster-canvas.layout-couple .pt-title,
.poster-canvas.layout-couple .text-layout-began { display: none; }

.couple-cols {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 4px 6px;
    width: 100%;
    padding: 0 3%;
    align-items: start;
}
.couple-col { text-align: center; min-width: 0; }
.couple-col .pt-names-script {
    font-size: clamp(1rem, 4.2vw, 1.35rem);
    margin-bottom: 0.2em;
    line-height: 1.15;
}
.couple-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.35em;
    opacity: 0.55;
    font-size: clamp(0.55rem, 2vw, 0.7rem);
    color: inherit;
}
.pt-place-couple {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.5rem, 2.1vw, 0.62rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.88;
    line-height: 1.25;
    margin: 0;
}
.couple-places-line {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.42rem, 1.75vw, 0.52rem);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    margin: 0.65em 4% 0.15em;
    opacity: 0.7;
}
.couple-places-line[hidden] { display: none !important; }
.text-layout-couple .pt-quote {
    margin-top: 0.55em;
    margin-bottom: 0.2em;
}
.text-layout-couple .pt-date {
    margin-top: 0.25em;
    margin-bottom: 0.15em;
}
.text-layout-couple .pt-ornament {
    margin-top: 0.35em;
}

.pt-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.15rem, 5.2vw, 1.55rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.55em;
    color: inherit;
}

.pt-names,
.pt-place,
.pt-date,
.pt-coords,
.pt-quote,
.pt-subtitle,
.pt-date-place,
.pt-event,
.pt-place-sm {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
    color: inherit;
}

.pt-names {
    font-size: clamp(0.62rem, 2.6vw, 0.78rem);
    font-weight: 600;
    margin-bottom: 0.35em;
}

.pt-place,
.pt-date,
.pt-coords,
.pt-subtitle,
.pt-date-place,
.pt-place-sm {
    font-size: clamp(0.48rem, 2vw, 0.58rem);
    margin-bottom: 0.28em;
    opacity: 0.92;
}

.pt-place-sm {
    letter-spacing: 0.08em;
    text-transform: none;
    font-size: clamp(0.42rem, 1.7vw, 0.52rem);
    opacity: 0.75;
}

.pt-event {
    font-size: clamp(0.42rem, 1.7vw, 0.5rem);
    letter-spacing: 0.28em;
    color: #94a3b8;
    margin: 0.35em 0 0.45em;
    font-weight: 500;
}

.pt-quote {
    font-size: clamp(0.42rem, 1.7vw, 0.5rem);
    letter-spacing: 0.22em;
    margin-top: 0.7em;
    opacity: 0.85;
}

.opt-btn .mask-thumb.split-heart {
    background: transparent;
    position: relative;
    width: 28px;
    height: 28px;
}
.opt-btn .mask-thumb.split-heart::before {
    content: '♥';
    font-size: 26px;
    color: #cbd5e1;
    line-height: 28px;
    background: linear-gradient(90deg, #cbd5e1 50%, #f0a8c0 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.opt-btn.active .mask-thumb.split-heart::before {
    background: linear-gradient(90deg, var(--accent) 50%, #f472b6 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.side-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.side-tabs[hidden] { display: none !important; }
.side-tab {
    flex: 1;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    padding: 9px 8px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}
.side-tab.active {
    border-color: var(--accent);
    background: #fff7f2;
    color: #9a3412;
}

.photo-upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.btn-secondary {
    background: #eef1f5 !important;
    color: #334155 !important;
    border: 1px solid #d0d5dd;
}
.btn-secondary:hover { background: #e2e8f0 !important; }
.option-grid.four { grid-template-columns: repeat(4, 1fr); }

.global-overlay[hidden] { display: none !important; }
.global-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    z-index: 5000;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    transform: none !important;
}
.global-overlay-content {
    position: relative;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 36px 40px 32px;
    text-align: center;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.6) inset,
        0 24px 64px rgba(15,23,42,0.28);
    max-width: 360px;
    width: min(360px, 92vw);
    margin: 0 auto;
}
.global-overlay-content .gen-spinner-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;
    position: relative;
}
.global-overlay-content .gen-spinner-wrap .spinner {
    width: 56px;
    height: 56px;
    border-width: 3px;
    border-color: #e2e8f0;
    border-top-color: #ff6408;
}
.global-overlay-content h2 {
    margin: 12px 0 8px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}
.global-overlay-content p {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0;
}
.global-overlay-content .gen-hint {
    margin-top: 14px;
    font-size: 0.78rem;
    color: #94a3b8;
}
.zoom-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px;
    color: #334155;
}
.zoom-modal-loading[hidden] { display: none !important; }
.zoom-modal-image {
    display: block;
    max-width: min(520px, 88vw);
    max-height: 82vh;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.zoom-modal-image[hidden] { display: none !important; }

.pt-ornament {
    margin-top: 0.55em;
    font-size: 0.55rem;
    color: inherit;
    opacity: 0.9;
}
.pt-ornament[hidden],
.poster-canvas.hide-ornament .pt-ornament { display: none !important; }

.pt-names-script {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.25rem, 5.5vw, 1.7rem);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.02em;
    margin-bottom: 0.4em;
}
.pt-names-script .inline-heart {
    font-size: 0.75em;
    margin: 0 0.15em;
    vertical-align: middle;
}

.text-layout-classic .pt-names {
    font-size: clamp(0.72rem, 3vw, 0.9rem);
    letter-spacing: 0.22em;
    margin-bottom: 0.45em;
}

.poster-canvas.hide-coords .pt-coords { display: none !important; }

/* Editor */
.editor-section {
    flex: 0 0 min(440px, 40vw);
    width: min(440px, 40vw);
    max-height: calc(100vh - 52px);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -8px 0 28px rgba(15, 23, 42, 0.08);
    border-left: 1px solid rgba(0,0,0,0.06);
    z-index: 5;
}

.mobile-tabs {
    display: none;
    gap: 4px;
    padding: 10px 12px 0;
    background: #fff;
    border-bottom: 1px solid #eceff3;
}

.mob-tab {
    flex: 1;
    border: none;
    background: #eef1f5;
    color: #334155;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 10px 6px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
}
.mob-tab.active {
    background: #fff;
    color: var(--accent);
    box-shadow: 0 -1px 0 #fff;
    border: 1px solid #eceff3;
    border-bottom-color: #fff;
}

.single-page-sections {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 18px 28px;
    min-height: 0;
}

.designer-section {
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid #eceff3;
}
.designer-section:last-of-type { border-bottom: none; }

.section-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title i { color: var(--accent); }

.section-lead {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 0.88rem;
}

.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    color: #1e293b;
    background: #fff;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 100, 8, 0.15);
}

.location-hint { display: block; margin-top: 6px; color: #94a3b8; font-size: 0.75rem; }

.location-autocomplete-wrap { position: relative; }
.location-suggestions {
    position: absolute;
    left: 0; right: 0; top: calc(100% + 4px);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.12);
    z-index: 50;
    max-height: 240px;
    overflow-y: auto;
}
.location-suggestion {
    display: grid;
    grid-template-columns: 18px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 10px 12px;
    cursor: pointer;
    font-family: inherit;
}
.location-suggestion i {
    grid-row: 1 / span 2;
    color: var(--accent);
    margin-top: 3px;
}
.location-suggestion .loc-main {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}
.location-suggestion .loc-sub {
    font-size: 0.72rem;
    color: #94a3b8;
}
.location-suggestion:hover { background: #f8fafc; }
.location-suggestion.empty {
    display: block;
    color: #94a3b8;
    cursor: default;
}

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.coord-card {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffaf6 0%, #fff7f0 100%);
    border: 1px solid #fed7aa;
    box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}
.coord-card-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9a3412;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.coord-card-title i { color: var(--accent); }
.coord-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.coord-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #78716c;
    margin-bottom: 4px;
}
.coord-field input {
    width: 100%;
    border: 1px solid #e7e5e4;
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    color: #1c1917;
    box-shadow: 0 1px 2px rgba(28,25,23,0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.coord-field input:focus {
    outline: none;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.22);
}

.bg-swatch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.bg-swatch {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid #e7e5e4;
    cursor: pointer;
    padding: 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
    background-color: #fff;
}
.bg-swatch.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.35);
}
.poster-canvas.has-bg-image {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.map-color-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 6px;
    margin-bottom: 4px;
    max-width: 220px;
}
.map-color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}
.map-color-swatch .map-color-thumb {
    width: 36px;
    height: 36px;
    aspect-ratio: 1;
    border-radius: 8px;
    border: 2px solid #e7e5e4;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.map-color-swatch.active .map-color-thumb {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.35);
}
.map-color-swatch .map-color-name {
    font-size: 0.62rem;
    color: #64748b;
    text-align: center;
    line-height: 1.15;
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.map-color-swatch.active .map-color-name {
    color: #1e293b;
    font-weight: 600;
}

.dual-location-row {
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #fff7f2;
    border: 1px solid #fed7aa;
    border-radius: 12px;
}
.dual-location-row .section-lead {
    margin: 8px 0 0;
    font-size: 0.8rem;
}

.advanced-coords {
    margin-top: 8px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 4px 12px 8px;
}
.advanced-coords summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    padding: 8px 0;
    list-style: none;
}
.advanced-coords summary::-webkit-details-marker { display: none; }

.map-controls-inline { margin: 14px 0; }
.zoom-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.zoom-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.btn-icon {
    width: 36px;
    height: 36px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    color: #334155;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }

/* Option grids */
.option-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.option-grid.markers {
    grid-template-columns: repeat(4, 1fr);
}

.opt-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    color: #475569;
    transition: border-color 0.15s, background 0.15s;
}
.opt-btn i { font-size: 1.15rem; color: #64748b; }
.opt-btn.active {
    border-color: var(--accent);
    background: #fff7f2;
    color: #9a3412;
}
.opt-btn.active i { color: var(--accent); }
.opt-btn .mask-thumb {
    width: 28px;
    height: 28px;
    background: #cbd5e1;
}
.opt-btn .mask-thumb.rect { border-radius: 2px; }
.opt-btn .mask-thumb.circle { border-radius: 50%; }
.opt-btn .mask-thumb.rounded { border-radius: 8px; }
.opt-btn .mask-thumb.heart {
    background: transparent;
    position: relative;
}
.opt-btn .mask-thumb.heart::before {
    content: '♥';
    font-size: 26px;
    color: #cbd5e1;
    line-height: 28px;
}
.opt-btn.active .mask-thumb.heart::before { color: var(--accent); }
.opt-btn.active .mask-thumb:not(.heart) { background: var(--accent); }

.style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.style-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.style-btn.active {
    border-color: var(--accent);
    background: #fff7f2;
}
.style-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}
.style-btn strong {
    display: block;
    font-size: 0.78rem;
    color: #1e293b;
}
.style-btn small {
    display: block;
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 2px;
}

.layout-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.layout-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.layout-btn.active {
    border-color: var(--accent);
    background: #fff7f2;
}
.layout-btn strong { font-size: 0.88rem; color: #1e293b; }
.layout-btn small { font-size: 0.75rem; color: #94a3b8; }

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #334155;
    font-weight: 500;
}
.toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

.text-color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.text-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    position: relative;
}
.text-color.active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent);
}
.text-color-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px dashed #94a3b8;
    color: #64748b;
    overflow: hidden;
}
.text-color-custom input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* Sticky bar – csillagtérkép stílus */
.sticky-cart-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
    z-index: 40;
}
.sticky-cart-price {
    display: flex;
    flex-direction: column;
    min-width: 110px;
    gap: 1px;
}
.sticky-cart-price span {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sticky-cart-price .price {
    font-size: 1.15rem;
    color: #0f172a;
    font-weight: 700;
}
.sticky-cart-price .price-breakdown {
    font-size: 11px;
    color: #64748b;
    line-height: 1.25;
    text-transform: none;
    letter-spacing: 0;
}
.sticky-cart-price .frame-surcharge { color: #ea580c; }
.sticky-cart-price .frame-surcharge strong { color: #c2410c; font-weight: 700; }

.btn {
    border: none;
    background: var(--button-primary);
    color: #fff !important;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sticky-cart-btn {
    flex: 1;
    margin: 0 !important;
    padding: 14px 16px !important;
    font-size: 1rem !important;
    background: #22c55e !important;
    border: none;
    color: #fff !important;
    font-family: inherit;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.sticky-cart-btn:hover { background: #16a34a !important; }

/* Összecsukható szekciók */
.section-fold {
    margin-bottom: 10px;
    padding-bottom: 0;
    border-bottom: 1px solid #eceff3;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eceff3;
    overflow: hidden;
}
.section-fold-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px;
    cursor: pointer;
    user-select: none;
    background: #f8fafc;
}
.section-fold-summary::-webkit-details-marker { display: none; }
.section-fold-summary .section-title {
    margin: 0;
    font-size: 1rem;
}
.fold-chevron {
    color: #94a3b8;
    transition: transform 0.2s;
    font-size: 0.85rem;
}
.section-fold[open] .fold-chevron { transform: rotate(180deg); }
.section-fold[open] .section-fold-summary {
    border-bottom: 1px solid #eceff3;
    background: #fff;
}
.section-fold-body {
    padding: 14px 14px 16px;
}
.single-page-sections .designer-section {
    margin-bottom: 10px;
    padding-bottom: 0;
    border-bottom: none;
}
.subheading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 16px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.subheading i { color: var(--accent); }

/* Stílussablonok – csillagtérkép mintára */
.style-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.style-cat-tab {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 7px 12px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.style-cat-tab.active {
    border-color: #ff6408;
    background: #fff7ed;
    color: #0f172a;
}
.style-cat-tab.active i { color: #ff6408; }

.style-presets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
@media (min-width: 901px) {
    .style-presets-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
}
.style-preset {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.style-preset:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}
.style-preset.active {
    border-color: #ff6408;
    box-shadow: 0 0 0 1px #ff6408;
}
.style-preset-thumb {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12%;
}
.style-preset-shape {
    width: 72%;
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.style-preset-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff6408;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
}
.style-preset-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: #334155;
    text-align: center;
    line-height: 1.2;
    padding: 0 1px 2px;
}

/* Méret / keret */
.size-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.size-option {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.size-option.active {
    border-color: #ff6408;
    background: #fff7f2;
}
.size-option strong { display: block; font-size: 0.9rem; color: #1e293b; }
.size-option small { color: #64748b; font-size: 0.75rem; }

.frame-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.frame-option {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}
.frame-option.active {
    border-color: #ff6408;
    background: #fff7f2;
}
.frame-option-preview {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 4px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
}
.frame-option-preview.frame-none {
    background: repeating-linear-gradient(45deg,#f1f5f9,#f1f5f9 4px,#e2e8f0 4px,#e2e8f0 8px);
}
.frame-option-preview.frame-white { background: #f3f4f6; box-shadow: inset 0 0 0 5px #f8fafc; }
.frame-option-preview.frame-black { background: #111827; box-shadow: inset 0 0 0 5px #111827; }
.frame-option-inner {
    width: 55%;
    aspect-ratio: 3/4;
    background: #fff;
    border-radius: 1px;
}
.frame-option-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #334155;
}
.frame-option-price {
    display: block;
    font-size: 0.65rem;
    color: #ea580c;
    margin-top: 2px;
}
.frame-option-price.muted { color: #94a3b8; }
.frame-unavailable {
    font-size: 0.82rem;
    color: #64748b;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 8px;
}

.poster-frame.frame-white {
    background: #f3f4f6;
    padding: 12px;
    box-shadow: 0 12px 40px rgba(15,23,42,0.12);
}
.poster-frame.frame-black {
    background: #111827;
    padding: 12px;
}
.poster-frame.frame-none {
    background: transparent;
    padding: 0;
    box-shadow: 0 8px 28px rgba(15,23,42,0.12);
}

/* Zoom modal – mindig viewport közép */
.zoom-modal[hidden] { display: none !important; }
.zoom-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    z-index: 5000;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    transform: none !important;
}
.zoom-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.zoom-modal-content {
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 28px 28px 22px;
    border-radius: 20px;
    max-height: 92vh;
    overflow: auto;
    margin: 0 auto;
    box-shadow: 0 24px 64px rgba(15,23,42,0.3);
    max-width: min(560px, 94vw);
}
.zoom-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #ff6408;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255,100,8,0.35);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zoom-modal-close:hover { filter: brightness(1.05); }
.zoom-modal-loading {
    min-height: 180px;
    justify-content: center;
}
.zoom-modal-loading .spinner {
    width: 52px;
    height: 52px;
    border-width: 3px;
    border-color: #e2e8f0;
    border-top-color: #ff6408;
}
.zoom-modal-poster {
    display: flex;
    justify-content: center;
    padding: 12px 8px;
}
.zoom-modal-poster .poster-frame {
    transform: scale(1.15);
    transform-origin: center center;
}
.zoom-modal-poster .poster-canvas {
    width: min(420px, 78vw);
}

/* Mobile */
@media (max-width: 900px) {
    body { overflow: auto; height: auto; }
    .placemap-layout .main-content {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 52px);
    }
    .preview-section {
        padding: 12px;
        min-height: 48vh;
    }
    .poster-canvas { width: min(280px, 78vw); }
    .editor-section {
        flex: none;
        width: 100%;
        max-height: none;
        box-shadow: none;
        border-left: none;
        border-top: 1px solid #e2e8f0;
        position: relative;
        padding-bottom: 76px;
    }
    .mobile-tabs { display: flex; }
    .single-page-sections .designer-section { display: none; }
    .single-page-sections .designer-section.mobile-active { display: block; }
    .back-to-site .back-text { display: none; }
    .navbar-title { font-size: 0.85rem; }

    .sticky-cart-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.1);
    }
    .sticky-cart-btn {
        padding: 11px 14px !important;
        font-size: 0.92rem !important;
    }
    .style-presets-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 901px) {
    .single-page-sections .designer-section { display: block !important; }
}

/* Finomhangol� gomb + modal */
.btn-fine-tune {
    width: 100%;
    margin-top: 10px;
    justify-content: center;
    background: #FF6B35 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.35);
}
.btn-fine-tune:hover {
    background: #E85A2D !important;
}
.fine-tune-coords { margin-top: 10px; }

.fine-tune-modal[hidden] { display: none !important; }
.fine-tune-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.fine-tune-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
}
.fine-tune-panel {
    position: relative;
    z-index: 1;
    width: min(720px, 96vw);
    max-height: 94vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fine-tune-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.fine-tune-header h3 {
    font-size: 1.05rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.fine-tune-header h3 i { color: var(--accent); }
.fine-tune-close {
    border: none;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: #334155;
}
.fine-tune-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}
.fine-tune-map-wrap {
    position: relative;
    width: 100%;
    height: min(58vh, 480px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #e2e8f0;
}
.fine-tune-map {
    width: 100%;
    height: 100%;
}
.fine-tune-center-pin {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -90%);
    z-index: 500;
    pointer-events: none;
    color: #e31c3d;
    font-size: 2rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35));
}
.fine-tune-zoom-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.fine-tune-zoom-row input[type="range"] { flex: 1; }
.fine-tune-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.btn-fine-apply {
    background: #22c55e !important;
    color: #fff !important;
}
.btn-fine-apply:hover { background: #16a34a !important; }

@media (max-width: 600px) {
    .fine-tune-map-wrap { height: 52vh; }
    .fine-tune-actions { flex-direction: column-reverse; }
    .fine-tune-actions .btn { width: 100%; justify-content: center; }
}
