/* Alapvető színváltozók */
:root {
    --primary-dark: #F5F5F5;
    --secondary-dark: #16213e;
    --accent-color: #4A5568;
    --text-color: #16213e;
    --border-color: #CCCCCC;
    --tab-active: #FF6B35;
    --tab-inactive: #16213e;
    --button-primary: #FF6B35;
    --button-hover: #E85A2D;
    --button-secondary: #6c757d;
    --starmap-bg: #132854;
    --navbar-bg: #FF6B35;
    --navbar-text: #FFFFFF;
    --navbar-hover: #E85A2D;
}

/* Alapvető stílusok */
* {
    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.6;
}

/* Világos téma szöveg színek */
h2, h3, p, label, span, small, div {
    color: #16213e;
}

/* Form labels */
.form-group label {
    color: #16213e;
}

.exact-time-group {
    margin-top: 4px;
}

.exact-time-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 0;
    padding: 10px 12px;
    background: #eef1f5;
    border-radius: 8px;
    color: #334155;
    user-select: none;
}

.exact-time-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ff6408;
    flex-shrink: 0;
    margin: 0;
}

.exact-time-toggle small,
.exact-time-toggle .exact-time-hint {
    font-weight: 400;
    color: #64748b;
}

.exact-time-fields {
    margin-top: 10px;
}

/* display:flex felülírná a [hidden]-t — ezért kötelező */
.exact-time-fields[hidden] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Toggle text */
.toggle-container span {
    color: #16213e;
}

/* Tab button text */
.tab-btn {
    color: #16213e;
}

/* Új navigációs sáv */
.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--navbar-bg);
    color: var(--navbar-text);
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.back-to-site a {
    color: var(--navbar-text);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.back-to-site a:hover {
    color: #fff;
}

.back-to-site .back-text {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Navbar szöveg mindig fehér (kivéve a kosár gombot) */
.top-navbar .back-to-site a,
.top-navbar .back-to-site span,
.top-navbar .back-to-site i,
.top-navbar .back-text {
    color: #FFFFFF !important;
}

/* Kosár gomb a navbarban */
.btn-cart {
    background-color: var(--button-primary);
    color: #fff !important;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.btn-cart i {
    font-size: 1.15rem;
}

.btn-cart:hover {
    background-color: var(--button-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.btn-cart:active {
    transform: translateY(0);
}

/* Konténer és elrendezés */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

.main-content {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    align-items: flex-start;
    height: calc(100vh - 50px);
    overflow: hidden;
    position: relative;
}

.editor-section {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 480px;
    max-height: 100%;
    overflow-y: auto;
    padding: 15px 0 0 0;
    background-color: rgba(245, 245, 245, 0.97);
    box-shadow: 6px 0 24px rgba(0,0,0,0.18);
    z-index: 10;
    border-right: 1px solid rgba(0,0,0,0.06);
}

.preview-section {
    width: calc(100% - 480px);
    margin-left: 480px;
    min-width: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    align-self: auto;
    max-height: calc(100vh - 50px);
    overflow-y: auto;
}

.preview-section h2 {
    display: none;
}

.room-foreground {
    max-height: calc(100vh - 120px);
    width: 100%;
    object-fit: contain;
}

/* Tabs navigáció */
.tabs-nav {
    display: flex;
    width: 100%;
    background-color: var(--secondary-dark);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    min-width: 0;
    padding: 12px 2px;
    background-color: var(--tab-inactive);
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tab-btn:hover {
    background-color: rgba(255, 107, 53, 0.7);
}

.tab-btn.active {
    background-color: var(--tab-active);
}

.tab-btn i {
    font-size: 20px;
    margin-bottom: 4px;
    color: #FFFFFF;
}

.tab-btn span {
    font-size: 11px;
    text-transform: uppercase;
    color: #FFFFFF;
    white-space: nowrap;
}

/* Tab tartalom */
.tab-content {
    background-color: #FFFFFF;
    padding: 25px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.tab-pane {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.tab-pane.active {
    display: flex;
}

.tab-pane h2 {
    margin-bottom: 15px;
    border-bottom: 2px solid var(--button-primary);
    padding-bottom: 8px;
}

/* Űrlap elemek */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    background-color: rgb(255 255 255 / 70%);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: #000000;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--button-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.25);
}

.date-inputs {
    display: flex;
    gap: 10px;
}

.date-inputs > div {
    flex: 1;
}

/* Előnézeti panel */
.preview-wrapper {
    background-color: var(--starmap-bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border: 1px solid rgba(22, 33, 62, 0.1);
}

/* Szoba illusztráció (virtuális szoba preview) */
.preview-wrapper.room-preview {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    overflow: hidden;
    position: relative;
    display: block;
    line-height: 0; /* szöveges tartalom miatt ne legyen extra gap */
}

/* Az előtér kép határozza meg a konténer magasságát */
.room-foreground {
    position: relative;
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    z-index: 3;
}

.room-wall {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e8e4df;
    z-index: 1;
}

.room-poster {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(200px, 28%, 420px);
    aspect-ratio: 2 / 3;
    background: var(--starmap-bg, #fff);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    border: 6px solid #fff;
    overflow: hidden;
    z-index: 2;
}

@media (max-width: 768px) {
    .room-poster {
        top: 2%;
        left: 50%;
        transform: translateX(-50%);
        width: clamp(140px, 35%, 260px);
    }
}

.room-poster .celestial-container {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    /* Egységes kitöltés: ne legyen nagy üres sáv alul */
    padding: 8px 6px 12px !important;
    border-radius: 0 !important;
    background-color: var(--starmap-bg);
    justify-content: space-between !important;
    gap: 2px !important;
    box-sizing: border-box !important;
    container-type: size;
}

.room-poster .celestial-map-container {
    /*
     * Szabályos kör: a rövidebb korlát dönt.
     * Rövid idézetnél is töltse ki a poszter közepét (ne legyen üres alul).
     */
    width: min(80cqw, 54cqh) !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 4px auto !important;
    aspect-ratio: 1 / 1 !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255,255,255,0.7) !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

/* A canvas a poszteren belül is kör alakú, mint a generált képen */
.room-poster .celestial-map-container {
    -webkit-mask-image: -webkit-radial-gradient(circle, #000 99%, transparent 100%);
    mask-image: radial-gradient(circle, #000 99%, transparent 100%);
}

.room-poster .planet-background,
.room-poster .celestial-map,
.room-poster .celestial-map canvas {
    border-radius: 50% !important;
    width: 100% !important;
    height: 100% !important;
    clip-path: circle(50% at 50% 50%);
    overflow: hidden !important;
}

/* A térkép tartalma a poszteren belül – nincs scale, eredeti arányok */
.room-poster .celestial-map {
    width: 100% !important;
    height: 100% !important;
}

/* Alap portrait elrendezés a poszteren belül */
#posterMap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    gap: 2px !important;
    height: 100% !important;
}

#posterMap .map-title,
#posterMap .map-quote,
#posterMap .date-location,
#posterMap .map-names {
    grid-column: auto !important;
    grid-row: auto !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

#posterMap .map-title {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 10% !important;
    padding-right: 10% !important;
}

#posterMap .map-quote {
    width: 76% !important;
    max-width: 76% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 4% !important;
    padding-right: 4% !important;
    /* descender (g/y/p/q) + italic: alsó sor ne vágódjon */
    padding-bottom: 0.65em !important;
    margin-bottom: 0.4em !important;
    flex: 0 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

#posterMap .date-location,
#posterMap .map-names {
    width: 80% !important;
    max-width: 80% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    flex: 0 0 auto !important;
}

#posterMap .map-title {
    flex: 0 0 auto !important;
}

#posterMap .map-names {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* ——— Szöveg-elrendezés sablonok (MySky-szerű) ——— */
#posterMap.text-layout-1,
#posterMap.text-layout-2,
#posterMap.text-layout-3 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: center !important;
    height: 100% !important;
}

/* 1: cím fent → kör → idézet + dátum */
#posterMap.text-layout-1 .map-title { order: 1; margin-bottom: 2px !important; }
#posterMap.text-layout-1 .celestial-map-container { order: 2; margin: 2px auto !important; }
#posterMap.text-layout-1 .photo-map-container { order: 3; }
#posterMap.text-layout-1 .map-quote { order: 4; margin-top: 4px !important; }
#posterMap.text-layout-1 .date-location { order: 5; }
#posterMap.text-layout-1 .map-names { order: 6; }

/* 2: kör fent → minden szöveg lent */
#posterMap.text-layout-2 .celestial-map-container { order: 1; margin: 0 auto 4px !important; }
#posterMap.text-layout-2 .photo-map-container { order: 2; }
#posterMap.text-layout-2 .map-title { order: 3; margin-top: 4px !important; }
#posterMap.text-layout-2 .map-quote { order: 4; }
#posterMap.text-layout-2 .date-location { order: 5; }
#posterMap.text-layout-2 .map-names { order: 6; }

/* 3: kompakt — kisebb kör, sűrűbb szöveg */
#posterMap.text-layout-3 .map-title { order: 1; }
#posterMap.text-layout-3 .celestial-map-container { order: 2; width: 78% !important; margin: 2px auto !important; }
#posterMap.text-layout-3 .photo-map-container { order: 3; }
#posterMap.text-layout-3 .map-quote { order: 4; }
#posterMap.text-layout-3 .date-location { order: 5; }
#posterMap.text-layout-3 .map-names { order: 6; }
#posterMap.text-layout-3 .map-info { line-height: 1.15 !important; }

/* Elrendezés választó UI */
.text-layout-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 6px;
}
.text-layout-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.text-layout-option img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: contain;
    background: #0f172a;
    border-radius: 4px;
}
.text-layout-option span {
    font-size: 10px;
    font-weight: 600;
    color: #475569;
}
.text-layout-option:hover { border-color: #ff7845; }
.text-layout-option.active {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px #22c55e;
}

/* Fekvő elrendezés a poszteren belül – térkép és fotó egymás mellé */
#posterMap.landscape {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-content: center !important;
    gap: 4px !important;
}

#posterMap.landscape .celestial-map-container {
    width: 38% !important;
    order: 1 !important;
}

#posterMap.landscape .photo-map-container {
    width: 36% !important;
    order: 2 !important;
}

#posterMap.landscape .map-title {
    width: 100% !important;
    order: -1 !important;
    font-size: clamp(6px, 1.4vw, 10px) !important;
    margin-bottom: 1px !important;
}

#posterMap.landscape .map-quote,
#posterMap.landscape .date-location,
#posterMap.landscape .map-names {
    width: 100% !important;
    order: 10 !important;
}

/* Fekvő poszteren belül még kisebb szövegek */
#posterMap.landscape .map-quote {
    font-size: clamp(4px, 0.9vw, 6px) !important;
    margin-top: 1px !important;
    line-height: 1.05 !important;
}

#posterMap.landscape .date-location,
#posterMap.landscape .map-names {
    font-size: clamp(4px, 0.9vw, 6px) !important;
    margin-top: 1px !important;
}

/* Szövegek a poszteren: nagyobb, beljebb (margó), skálázható CSS változókkal */
.room-poster #posterMap,
.room-poster .celestial-container {
    --poster-title-fs: clamp(8px, 1.4vw, 13px);
    --poster-quote-fs: clamp(5.5px, 1.05vw, 9.5px);
    --poster-meta-fs: clamp(4.5px, 0.8vw, 7px);
    --poster-pad-x: 12%;
    --poster-title-scale: 1;
    --poster-quote-scale: 1;
}

.room-poster .map-title {
    font-size: calc(var(--poster-title-fs) * var(--poster-title-scale, 1)) !important;
    margin-bottom: 2px !important;
    line-height: 1.15 !important;
    padding: 0 var(--poster-pad-x) !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.room-poster .map-quote {
    font-size: calc(var(--poster-quote-fs) * var(--poster-quote-scale, 1)) !important;
    margin-top: 3px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    /* 1.25 túl szűk: utolsó sor alja levágódik (html2canvas + italic) */
    line-height: 1.45 !important;
    padding: 0 var(--poster-pad-x) 0.55em !important;
    margin-bottom: 0.35em !important;
    max-width: 76% !important;
    width: 76% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    overflow: visible !important;
}

.room-poster .date-location,
.room-poster .map-names {
    font-size: var(--poster-meta-fs) !important;
    margin-top: 2px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    /* 1.2 túl szűk: g/y/p/q alja levágódik (html2canvas + overflow) */
    line-height: 1.4 !important;
    padding: 0 var(--poster-pad-x) 0.28em !important;
    max-width: 80% !important;
    width: 80% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.room-poster .date-location div {
    line-height: 1.4 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0.05em !important;
    font-size: inherit !important;
    color: #FFFFFF;
    overflow: visible !important;
}

/* A poszteren belül rejtjük a feltöltés overlay-t és zoom gombokat */
.room-poster .photo-upload-overlay,
.room-poster .photo-zoom-controls {
    display: none !important;
}

/* Ha nincs fotó a poszteren belül, mutassuk az overlay-t */
.room-poster .photo-map-container.empty-photo .photo-upload-overlay {
    display: flex !important;
}

/* Fotó konténer a poszteren belül – alapból rejtve, csak ha van with-photo */
.room-poster .photo-map-container {
    display: none !important;
}

/* Ha van fotó (with-photo osztály a celestial-container-en), megjelenik */
.room-poster .celestial-container.with-photo .photo-map-container {
    display: flex !important;
    aspect-ratio: 1 / 1 !important;
}

/* ───── Poszter with-photo: körök egymás mellett/alatt, szöveg nem tolódik le ───── */

/* Fekvő poszter: két kör egymás mellé, egyforma méretű, minimális rés */
.room-poster .celestial-container.landscape.with-photo {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto auto;
    gap: 2px;
    align-items: center;
    justify-items: center;
    padding: 6px 4px 4px !important;
}

.room-poster .celestial-container.landscape.with-photo .map-title {
    grid-column: 1 / 3;
    grid-row: 1;
    text-align: center;
    width: 100%;
}

.room-poster .celestial-container.landscape.with-photo .celestial-map-container {
    grid-column: 1;
    grid-row: 2;
    width: 48% !important;
    margin: 0 !important;
    justify-self: end;
}

.room-poster .celestial-container.landscape.with-photo .photo-map-container {
    grid-column: 2;
    grid-row: 2;
    width: 48% !important;
    margin: 0 !important;
    justify-self: start;
}

.room-poster .celestial-container.landscape.with-photo .map-quote {
    grid-column: 1 / 3;
    grid-row: 3;
    text-align: center;
    width: 100%;
}

.room-poster .celestial-container.landscape.with-photo .date-location {
    grid-column: 1 / 3;
    grid-row: 4;
    text-align: center;
    width: 100%;
}

.room-poster .celestial-container.landscape.with-photo .map-names {
    grid-column: 1 / 3;
    grid-row: 5;
    text-align: center;
    width: 100%;
}

/* Poszteren belül csak kamera ikon, ne szöveg */
.room-poster .photo-upload-overlay span {
    display: none;
}
.room-poster .photo-upload-overlay i {
    font-size: 14px;
}

/* Álló poszter: nagy térkép, kisebb fotó jobbra lent rácsúszva */
.room-poster .celestial-container.portrait.with-photo {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start !important;
    position: relative;
    padding: 6px 6px 4px !important;
}

/* Nagy csillagtérkép kör */
.room-poster .celestial-container.portrait.with-photo .celestial-map-container {
    width: 80% !important;
    margin: 0 auto !important;
    flex-shrink: 0;
}

/* Kisebb fotó kör, jobbra lent rácsúszik */
.room-poster .celestial-container.portrait.with-photo .photo-map-container {
    width: 42% !important;
    margin: -14% 0 0 22% !important;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

/* Szövegek: maradjanak a helyükön, ne tolja le őket a fotó */
.room-poster .celestial-container.with-photo .map-quote,
.room-poster .celestial-container.with-photo .date-location,
.room-poster .celestial-container.with-photo .map-names {
    position: relative;
    z-index: 3;
    margin-top: 4px !important;
    width: 100%;
    text-align: center;
}

.room-poster .celestial-container.with-photo .map-title {
    position: relative;
    z-index: 3;
    width: 100%;
    text-align: center;
}

/* Dátum és helyszín a poszteren – normál folyásban, ne takarjon el semmit */
.room-poster .celestial-container {
    position: relative !important;
}

.room-poster .celestial-container .date-location,
#posterMap .date-location,
.room-poster #posterMap .map-info.date-location {
    position: relative !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    text-align: center !important;
    width: 80% !important;
    max-width: 80% !important;
    font-size: clamp(4.5px, 0.8vw, 7px) !important;
    margin-top: 2px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 10% 0.28em !important;
    box-sizing: border-box !important;
    z-index: 4 !important;
    line-height: 1.4 !important;
    overflow: visible !important;
    grid-column: auto !important;
    grid-row: auto !important;
    grid-area: auto !important;
    align-self: auto !important;
    justify-self: auto !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
}

@media (max-width: 768px) {
    .room-poster .celestial-container,
    .room-poster #posterMap {
        position: relative !important;
    }
    .room-poster .celestial-container .date-location,
    .room-poster .celestial-container .date-location div,
    #posterMap .date-location,
    #posterMap .date-location div,
    .room-poster #posterMap .map-info.date-location,
    .room-poster #posterMap .map-info.date-location div {
        position: relative !important;
        text-align: center !important;
        width: 100% !important;
        font-size: clamp(6px, 1.4vw, 10px) !important;
        margin-top: 2px !important;
        z-index: 4 !important;
        line-height: 1.4 !important;
        padding-bottom: 0.28em !important;
        overflow: visible !important;
        bottom: auto !important;
        right: auto !important;
        left: auto !important;
        top: auto !important;
    }
}

/* Új, teljes előnézeti konténer */
.celestial-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--starmap-bg);
}

/* Cím a kör FELETT */
.map-title {
    width: 100%;
    text-align: center;
    color: white;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

/* Csillagtérkép KÖR konténer */
.celestial-map-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Csillagtérkép maga */
.celestial-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

/* D3-Celestial canvas — töltse ki a kört (ne legyen kisebb „belső” égbolt) */
.celestial-map canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50%;
    display: block;
}

/* Idézet a kör ALATT */
.map-quote {
    width: 100%;
    text-align: center;
    color: white;
    font-size: 16px;
    line-height: 1.5;
    margin-top: 30px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

/* Dátum és hely a kör ALATT és az idézet ALATT */
.date-location {
    width: 100%;
    text-align: center;
    color: #FFFFFF;
    font-size: 14px;
    margin-top: 15px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

/* A globális `div { color:#16213e }` felülírná az öröklött fehéret — explicit fehér alap */
.date-location div,
#posterMap .date-location div,
#map-date,
#map-location {
    color: #FFFFFF;
}

/* Új: Nevek megjelenítése */
.map-names {
    width: 100%;
    text-align: center;
    color: white;
    font-size: 14px;
    margin-top: 10px;
    font-style: italic;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

/* Betöltő animáció */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 33, 62, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    display: none;
    border-radius: 12px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--button-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Gombok */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--button-primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s, transform 0.1s;
}

.btn:hover {
    background-color: var(--button-hover);
}

.btn:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: var(--button-secondary);
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-full {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    margin-top: 15px;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Név-dátum párok */
.name-date-pair {
    background-color: rgba(22, 33, 62, 0.05);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    position: relative;
    border: 1px solid rgba(22, 33, 62, 0.1);
}

.remove-pair {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 18px;
    cursor: pointer;
}

.add-pair-btn {
    width: 100%;
    padding: 10px;
    background-color: rgba(255, 107, 53, 0.2);
    border: 1px dashed rgba(255, 107, 53, 0.5);
    color: var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.2s;
}

.add-pair-btn:hover {
    background-color: rgba(255, 107, 53, 0.3);
}

/* Színminták - kompakt (legacy) */
.color-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.color-swatch {
    width: 100%;
    height: 52px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.color-swatch:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.color-swatch.active {
    border-color: #ff7845;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.45);
}

.color-swatch .inner-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.color-swatch .swatch-name {
    font-size: 9px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    text-align: center;
    line-height: 1.1;
    padding: 0 2px;
}

/* Kör háttér — MySky-szerű kompakt rács */
.section-hint {
    font-size: 12px;
    color: #64748b;
    margin: -4px 0 10px;
}
.circle-bg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.circle-bg-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.circle-bg-option:hover {
    background: rgba(255, 120, 69, 0.08);
}
.circle-bg-option.active {
    border-color: #ff7845;
    background: rgba(255, 120, 69, 0.12);
}
.circle-bg-disk {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cb-fill, #132854);
    box-shadow: inset 0 0 0 1.5px var(--cb-ring, rgba(255,255,255,0.35));
    flex-shrink: 0;
}
.circle-bg-label {
    font-size: 9px;
    font-weight: 600;
    color: #475569;
    text-align: center;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Csillagtérkép (poszter) háttere — a Kör háttér alatt */
.poster-bg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding: 2px 2px 6px;
    scrollbar-width: thin;
}
.poster-bg-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.poster-bg-option:hover {
    background: rgba(255, 120, 69, 0.08);
}
.poster-bg-option.active {
    border-color: #ff7845;
    background: rgba(255, 120, 69, 0.12);
}
.poster-bg-thumb {
    width: 40px;
    height: 52px;
    border-radius: 6px;
    background: var(--pb-fill, #132854) center / cover no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
    flex-shrink: 0;
}
.poster-bg-option[data-poster="none"] .poster-bg-thumb {
    background:
        linear-gradient(135deg, transparent 46%, #94a3b8 46%, #94a3b8 54%, transparent 54%),
        #e2e8f0;
}
.poster-bg-label {
    font-size: 9px;
    font-weight: 600;
    color: #475569;
    text-align: center;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.poster-bg-upload-block {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

/* Speciális effekt opciók (ha még van legacy) */
.effects-section {
    margin-top: 12px;
}

.effects-heading {
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.effects-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.effect-option {
    width: 72px;
    text-align: center;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.effect-option:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.effect-option.active {
    background-color: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.4);
}

.effect-preview {
    width: 48px;
    height: 48px;
    margin: 0 auto 4px;
    background-color: #16213e;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.25);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Szövegszín választó */
.text-color-selector {
    margin-bottom: 20px;
}

.text-color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.text-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.2s;
}

.text-color:hover {
    transform: scale(1.1);
}

.text-color.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--button-primary);
}

.text-color-custom {
    position: relative;
    overflow: hidden;
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
.text-color-custom input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    border: none;
    padding: 0;
}
.text-color-custom-icon {
    pointer-events: none;
    color: #fff;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
    z-index: 1;
}
.text-color-custom.active {
    box-shadow: 0 0 0 2px var(--button-primary);
}

.location-suggestions {
    z-index: 80;
}

/* Megjelenítési beállítások */
.toggle-group {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.toggle-container {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: rgba(22, 33, 62, 0.2);
    border-radius: 5px;
    border: 1px solid rgba(22, 33, 62, 0.1);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
}

.toggle-switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--button-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Betűtípus előnézet */
.font-preview {
    padding: 15px;
    background-color: rgba(22, 33, 62, 0.05);
    border-radius: 8px;
    margin-top: 15px;
    font-size: 20px;
    text-align: center;
    border: 1px solid rgba(22, 33, 62, 0.1);
}

/* Idézet javaslatok */
.quote-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quote-btn {
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.4);
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quote-btn:hover {
    background-color: rgba(255, 107, 53, 0.4);
}

.font-selector {
    margin-bottom: 15px;
}

/* Méretválasztó gombok */
.size-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.size-option {
    position: relative;
    padding: 15px 10px;
    background-color: rgba(22, 33, 62, 0.2);
    border: 2px solid transparent;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.size-option:hover {
    background-color: rgba(255, 107, 53, 0.2);
}

.size-option.active {
    border-color: var(--button-primary);
    background-color: rgba(255, 107, 53, 0.2);
}

.size-option .size-preview {
    margin: 0 auto 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
}

.size-portrait {
    width: 40px;
    height: 60px;
}

.size-landscape {
    width: 60px;
    height: 40px;
}

.preview-note {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #16213e;
    text-align: center;
    background-color: rgba(255, 107, 53, 0.2);
    padding: 8px;
    border-radius: 5px;
}

/* Összegzés lap */
.summary-card {
    background-color: rgba(22, 33, 62, 0.05);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid rgba(22, 33, 62, 0.1);
}

.summary-card h3 {
    margin-bottom: 15px;
    color: var(--button-primary);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 8px;
}

.summary-card ul {
    list-style-type: none;
    padding: 0;
}

.summary-card li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.summary-card li:last-child {
    border-bottom: none;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ───── Előnézet: közös beállítások ───── */
.celestial-container{
  display:grid;
  grid-template-columns: 1fr;          /* portrait alap */
  justify-items:center;
  gap:24px;
  padding:40px 20px;
}

/* ───── Portrait (álló) ───── */
.celestial-container.portrait .celestial-map-container{
  width:80%;
  aspect-ratio: 1 / 1;
}

/* ───── Landscape (fekvő) ───── */
.celestial-container.landscape{
  grid-template-columns: 1fr 1fr;     /* két oszlop */
  grid-auto-rows: max-content;
}

.celestial-container.landscape .celestial-map-container{
  grid-column:1/2; grid-row:1/5;      /* bal oldalon, végig */
  width:90%;
  aspect-ratio: 1 / 1;                /* kör marad */
}

.celestial-container.landscape .map-title     { grid-column:2; grid-row:1; align-self:center; }
.celestial-container.landscape .map-quote     { grid-column:2; grid-row:2; }
.celestial-container.landscape .date-location { grid-column:2; grid-row:3; }
.celestial-container.landscape .map-names     { grid-column:2; grid-row:4; }

/* Igazítás a landscape‑hasábban */
.celestial-container.landscape .map-info{
  text-align:left;
}

/* ───── Landscape with-photo (két kör egymás mellé) ───── */
.celestial-container.landscape.with-photo {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto auto auto;
  gap: 16px;
  align-items: center;
}

.celestial-container.landscape.with-photo .map-title {
  grid-column: 1 / 3;
  grid-row: 1;
  text-align: center;
}

.celestial-container.landscape.with-photo .celestial-map-container {
  grid-column: 1;
  grid-row: 2;
  width: 95%;
  justify-self: end;
  align-self: center;
}

.celestial-container.landscape.with-photo .photo-map-container {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  width: 95%;
  justify-self: start;
  align-self: center;
  position: relative;
  aspect-ratio: 1 / 1;
}

.celestial-container.landscape.with-photo .photo-zoom-controls {
  position: absolute;
  bottom: -52px;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
}

.celestial-container.landscape.with-photo .map-quote {
  grid-column: 1 / 3;
  grid-row: 3;
  text-align: center;
}

.celestial-container.landscape.with-photo .date-location {
  grid-column: 1 / 3;
  grid-row: 4;
  text-align: center;
}

.celestial-container.landscape.with-photo .map-names {
  grid-column: 1 / 3;
  grid-row: 5;
  text-align: center;
}

/* Portrait with-photo: fotó a térkép alatt */
.celestial-container.portrait.with-photo {
  grid-template-columns: 1fr;
  gap: 16px;
}

.celestial-container.portrait.with-photo .photo-map-container {
  display: flex;
  width: 80%;
  margin: 0 auto;
}

/* Új: Idézet modal ablak stílusok */
.quote-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 33, 62, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.quote-modal-content {
    background-color: #F0F2F5;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #16213e;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #FF6B35;
}

.quote-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.quote-category {
    padding: 8px 15px;
    background-color: #E2E8F0;
    border: 1px solid rgba(22, 33, 62, 0.15);
    border-radius: 5px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.quote-category:hover {
    background-color: rgba(255, 107, 53, 0.2);
}

.quote-category.active {
    background-color: var(--button-primary);
    color: white;
}

.quote-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.quote-item {
    background-color: #FFFFFF;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid rgba(22, 33, 62, 0.1);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.quote-item:hover {
    transform: translateY(-3px);
    background-color: #E2E8F0;
}

.quote-item p {
    margin-bottom: 10px;
    font-style: italic;
    line-height: 1.4;
}

.quote-item small {
    color: #16213e;
    margin-bottom: 15px;
    display: block;
    text-align: right;
}

.quote-item button {
    margin-top: auto;
    align-self: flex-end;
    padding: 6px 12px;
    background-color: var(--button-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quote-item button:hover {
    background-color: var(--button-hover);
}

/* Anyagválasztó — kompakt flat FA5 */
.material-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 6px 0 4px;
}

.material-option {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    color: #16213e;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    text-align: left;
    font: inherit;
    outline: none;
    box-shadow: none;
}

.material-option:hover {
    border-color: #ff7845;
    background: #fffaf7;
}

.material-option.active {
    border-color: #ff6408;
    background: #fff7ed;
    color: #16213e;
    outline: none;
}

.material-option > i {
    flex-shrink: 0;
    width: 1.15rem;
    font-size: 1.05rem;
    line-height: 1;
    text-align: center;
    color: #64748b;
}

.material-option.active > i {
    color: #ff6408;
}

.material-option-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.material-option-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: #0f172a;
}

.material-option-desc {
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
    color: #64748b;
}

.material-preview {
    display: none;
}

/* Árjelző blokk */
.price-display {
    background-color: #E9ECEF;
    color: #16213e;
    padding: 15px 20px;
    margin: 0 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-display span:first-child {
    font-size: 16px;
    color: #16213e;
}

.price-display .price {
    font-size: 24px;
    font-weight: 700;
    color: var(--button-primary);
}

/* Navigációs gombok */
.navigation-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding: 0 20px;
}

/* ── MÉRET‑GOMBOK ─────────────────────────────────────────── */
.size-option{
  display:flex; flex-direction:column; gap:4px;
  padding:12px 14px; border:2px solid #DEE2E6;
  border-radius:8px; background:#FFFFFF; color:#16213e;
  cursor:pointer; transition:all .2s;
}
.size-option:hover{ border-color:#ff7845; }
.size-option.active{
  border-color:#ff7845; background:#E9ECEF; color:#16213e;
}
.size-option small{ font-size:.75rem; color:#16213e; }

/* Fix for circular boundary containment */
.celestial-map-container {
  position: relative;
  border-radius: 50%;
  overflow: hidden !important; /* Force hidden overflow */
  transform: translateZ(0); /* Enable hardware acceleration */
}

.celestial-map {
  position: absolute;
  width: 100% !important;
  height: 100% !important;
  top: 0;
  left: 0;
  border-radius: 50%;
  overflow: hidden !important;
}

.celestial-map canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  transform: scale(1.01); /* Slight scale to prevent thin border artifact */
}

/* MOBILESZKÖZ JAVÍTÁSOK */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .editor-section {
        position: relative;
        right: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
        box-shadow: none;
        border-left: none;
    }

    .preview-section {
        position: relative;
        top: auto;
        align-self: auto;
        max-height: none;
        margin-left: 0;
        width: 100%;
        padding-top: 20px;
    }

    .preview-section h2 {
        display: block;
    }

    .room-poster {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }

    .room-foreground {
        min-height: 350px;
        object-fit: cover;
    }
    
    .tab-btn i {
        font-size: 18px;
    }
    
    .tab-btn span {
        font-size: 10px;
    }
    
    /* Mobile nézetben mindig álló elrendezés */
    .celestial-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 10px;
    }
    
    /* Körbe rajzolás minden nézetben */
    .celestial-map-container {
        width: 80% !important;
        margin: 0 auto;
        aspect-ratio: 1 / 1 !important;
        border-radius: 50% !important;
    }
    
    /* Minden szöveg középre mobilon */
    .celestial-container .map-info {
        width: 100%;
        text-align: center !important;
        padding: 0 10px;
    }
    
    .map-title {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .map-quote {
        font-size: 14px;
        margin-top: 15px;
    }
    
    .date-location, .map-names {
        font-size: 12px;
        margin-top: 10px;
    }
    
    /* Modal javítások mobilra */
    .quote-modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .quote-list {
        grid-template-columns: 1fr;
    }
    
    .quote-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .quote-category {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Egyéb mobilnézet javítások */
    .color-options {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .material-options {
        flex-direction: column;
    }
    
    .effects-options {
        justify-content: center;
    }
    
    .toggle-group {
        grid-template-columns: 1fr;
    }
    
    .top-navbar {
        flex-direction: row;
        text-align: center;
        gap: 5px;
        padding: 8px 12px;
    }

    /* Mobilon a vissza gomb csak nyíl */
    .back-to-site .back-text {
        display: none;
    }

    .btn-cart {
        padding: 6px 12px;
    }
    
    /* Ár blokk mobile */
    .price-display {
        flex-direction: column;
        padding: 10px;
        margin: 10px 0;
    }
    
    .price-display .price {
        margin-top: 5px;
    }
}


/* ================ MOBILNÉZET ÉS NAGYÍTÓ FUNKCIÓ ================ */

/* Mobilnézet javítások */
@media (max-width: 768px) {
    /* Mobilon mindig legyen nagyobb margó */
    .celestial-container {
        padding: 10px 5px !important;
    }
    
    /* Térkép középre igazítása és méretezése */
    .celestial-map-container {
        width: 80% !important;
        max-width: 300px !important;
        aspect-ratio: 1/1 !important;
        margin: 0 auto !important;
        position: relative;
    }
    
    
    /* Fekvő tájolású csillagtérkép mobilon */
    .mobile-landscape-view {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .mobile-landscape-view .celestial-map-container {
        width: 70% !important;
    }
    
    /* Minden szöveg középre mobilon */
    .celestial-container .map-info {
        width: 100% !important;
        text-align: center !important;
        padding: 0 5px !important;
    }
    
    /* Cím és idézet mérete legyen kisebb mobilon */
    .map-title {
        font-size: 18px !important;
        margin-bottom: 10px !important;
    }
    
    .map-quote {
        font-size: 14px !important;
        margin-top: 10px !important;
    }
    
    .date-location div,
    .map-names {
        font-size: 12px !important;
    }
}

/* Nagyítás ikon — a bemutató jobb felső sarkában */
.preview-wrapper.room-preview .preview-zoom-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 33, 62, 0.72);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background-color 0.2s, transform 0.15s, border-color 0.2s;
}

.preview-wrapper.room-preview .preview-zoom-btn:hover {
    background: rgba(255, 107, 53, 0.92);
    border-color: rgba(255, 255, 255, 0.85);
    transform: scale(1.06);
}

.preview-wrapper.room-preview .preview-zoom-btn i {
    font-size: 16px;
    line-height: 1;
}

@media (max-width: 768px) {
    .preview-wrapper.room-preview .preview-zoom-btn {
        top: 8px;
        right: 8px;
        width: 38px;
        height: 38px;
    }
    .preview-wrapper.room-preview .preview-zoom-btn i {
        font-size: 14px;
    }
}

#celestial-form {
    display: none !important;
}

/* Nagyító modál — teljes poszter a választott méretaránnyal */
.starmap-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 33, 62, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    overflow-y: auto;
}

.starmap-modal-content.zoomed-poster-frame {
    position: relative;
    width: auto;
    max-width: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.starmap-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background-color: rgba(22, 33, 62, 0.85);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    font-size: 22px;
    line-height: 1;
    padding: 0;
}

.starmap-close:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.zoomed-size-label {
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Valós (canvas) előnézet — ugyanaz a kép, mint kosárba rakáskor */
.zoomed-real-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: min(92vw, 900px);
    max-height: 82vh;
}

.zoomed-preview-image {
    display: block;
    max-width: min(92vw, 900px);
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
    border: 10px solid #fff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.zoomed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 220px;
    min-height: 180px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

.zoomed-loading .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@media (max-width: 768px) {
    .zoomed-preview-image {
        border-width: 6px;
        max-width: 94vw;
        max-height: 78vh;
    }
    .starmap-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
}

/* Nagyobb képernyőkön a preview nagyobb helyet kap */
@media (min-width: 1400px) {
    .preview-section {
        flex: 1.3;
    }
    .editor-section {
        flex: 0.7;
    }
}

@media (min-width: 1920px) {
    .preview-section {
        flex: 1.4;
    }
    .editor-section {
        flex: 0.6;
    }
}

/* Mobilnézet további javítások */
@media (max-width: 768px) {
    /* Fekvő tájolású térképek mobilon: elemek egymás mellé */
    .celestial-container.landscape {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px;
    }
    
    /* A térkép legyen mindig kerek és arányos */
    .celestial-map-container {
        width: 70% !important;
        max-width: 280px !important;
        aspect-ratio: 1/1 !important;
        margin: 0 auto 15px auto !important;
    }
    
    /* Minden szöveg középre igazítva */
    .celestial-container.landscape .map-info {
        text-align: center !important;
        width: 100% !important;
        padding: 0 10px !important;
    }

    /* Fekvő tájolásnál a térkép kisebb, hogy elférjen egymás mellé */
    .celestial-container.landscape .celestial-map-container {
        width: 45% !important;
        max-width: 160px !important;
        margin: 5px !important;
    }
}



/* ─── Sablon választó ─── */
.template-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.template-option {
    background-color: #FFFFFF;
    border: 2px solid #DEE2E6;
    border-radius: 10px;
    padding: 15px;
    color: #16213e;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.template-option:hover {
    border-color: #ff7845;
}

.template-option.active {
    border-color: #ff7845;
    background-color: #E9ECEF;
}

.template-preview {
    width: 100%;
    height: 70px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
}

.template-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #132854, #4ECDC4);
    border: 2px solid rgba(255,255,255,0.3);
}

.template-circle.small {
    width: 32px;
    height: 32px;
}

.template-bg {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: linear-gradient(to bottom, #001233, #FF595E);
}

.template-circle.overlay {
    position: relative;
    z-index: 2;
    width: 36px;
    height: 36px;
}

.template-option span {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.template-option small {
    color: #94A3B8;
    font-size: 12px;
}

@media (max-width: 768px) {
    .template-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 12px;
    }

    .template-option {
        padding: 8px 6px;
        border-radius: 8px;
        border-width: 1.5px;
    }

    .template-preview {
        height: 40px;
        margin-bottom: 4px;
    }

    .template-circle {
        width: 32px;
        height: 32px;
    }

    .template-circle.small {
        width: 22px;
        height: 22px;
    }

    .template-option span {
        font-size: 11px;
        margin-bottom: 1px;
        line-height: 1.2;
    }

    .template-option small {
        font-size: 10px;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ─── További méretek gomb ─── */
.show-more-sizes {
    text-align: center;
    margin: 15px 0 25px 0;
}

.size-option.hidden-size {
    display: none;
}

/* ─── Fotó feltöltés overlay a körben ─── */
.photo-upload-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(22, 33, 62, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
}

.photo-upload-overlay:hover {
    background: rgba(22, 33, 62, 0.8);
}

.photo-upload-overlay i {
    font-size: 28px;
    margin-bottom: 6px;
}

.photo-upload-overlay span {
    font-size: 12px;
    font-weight: 500;
}

.photo-upload-overlay.hidden {
    display: none !important;
}

/* ─── Zoom controls ─── */
.photo-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(22, 33, 62, 0.3);
    border-radius: 20px;
}

.photo-zoom-controls button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 107, 53, 0.8);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: background 0.2s;
}

.photo-zoom-controls button:hover {
    background: rgba(255, 107, 53, 1);
}

.photo-zoom-controls input[type="range"] {
    flex: 1;
    min-width: 80px;
    margin: 0;
    accent-color: #ff7845;
}

/* Portrait with-photo: térkép felül, fotó alul */
.celestial-container.portrait.with-photo {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto auto;
    gap: 16px;
}

.celestial-container.portrait.with-photo .map-title {
    grid-column: 1;
    grid-row: 1;
}

.celestial-container.portrait.with-photo .celestial-map-container {
    grid-column: 1;
    grid-row: 2;
    width: 80%;
    margin: 0 auto;
}

.celestial-container.portrait.with-photo .photo-map-container {
    grid-column: 1;
    grid-row: 3;
    display: flex;
    width: 80%;
    margin: 0 auto;
}

.celestial-container.portrait.with-photo .map-quote {
    grid-column: 1;
    grid-row: 4;
}

.celestial-container.portrait.with-photo .date-location {
    grid-column: 1;
    grid-row: 5;
}

.celestial-container.portrait.with-photo .map-names {
    grid-column: 1;
    grid-row: 6;
}

/* Egyedi háttér feltöltés */
.custom-bg-upload {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(255, 107, 53, 0.4);
}

.custom-bg-upload label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-color);
    font-weight: 500;
}

.custom-bg-upload input[type="file"] {
    display: none;
}

/* Színátmenet testreszabó */
.gradient-customizer {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.gradient-customizer h4 {
    margin-bottom: 10px;
    font-size: 16px;
}

.gradient-colors {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.gradient-color {
    flex: 1;
}

.gradient-color label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.gradient-color input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.gradient-preview {
    height: 50px;
    border-radius: 8px;
    margin-top: 10px;
    background: linear-gradient(to bottom, #001233, #FF595E);
}

/* Háttérkép szekció */
.background-section {
    margin-top: 30px;
}

.backgrounds-heading {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.background-btn {
    margin-top: 10px;
    background-color: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-background-preview {
    margin-top: 15px;
    background-color: rgba(22, 33, 62, 0.05);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(22, 33, 62, 0.1);
    min-height: 60px;
    display: flex;
    align-items: center;
}

.selected-background-preview img {
    max-width: 100%;
    max-height: 80px;
    border-radius: 4px;
}

/* Háttérkép modal */
.background-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 33, 62, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.background-modal-content {
    background-color: var(--secondary-dark);
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.background-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.background-category {
    padding: 8px 15px;
    background-color: rgba(22, 33, 62, 0.05);
    border: 1px solid rgba(22, 33, 62, 0.15);
    border-radius: 5px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.background-category:hover {
    background-color: rgba(255, 107, 53, 0.2);
}

.background-category.active {
    background-color: var(--button-primary);
    color: white;
}

.background-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.background-item {
    background-color: rgba(22, 33, 62, 0.05);
    padding: 10px;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.background-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 107, 53, 0.4);
}

.background-item.active {
    border-color: var(--button-primary);
}

.background-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.background-item p {
    text-align: center;
    font-size: 14px;
    margin: 0;
}

.remove-background {
    margin-top: 20px;
    background-color: #dc3545;
    color: white;
}

.remove-background:hover {
    background-color: #bd2130;
}

.loading-backgrounds {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #aaa;
}


/* Színátmenet előnézet stílus */
.gradient-preview {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #ddd;
}

/* Színválasztó mezők stílusa */
.gradient-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.gradient-color {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gradient-color input[type="color"] {
    width: 80px;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}


/* Kontúr testreszabó stílusok */
.border-customizer {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.border-colors {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.border-color, .border-width {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.border-color input[type="color"] {
    width: 80px;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.border-width {
    display: flex;
    align-items: center;
    gap: 10px;
}

.border-width input[type="range"] {
    flex-grow: 1;
}

.border-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #132854;
    margin: 15px auto;
    border: 5px solid #132854;
}


/* Globális overlay a kosárba rakáshoz */
.global-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 33, 62, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.global-overlay-content {
    background-color: #F0F2F5;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    border: 1px solid #CCCCCC;
    animation: fadeIn 0.3s ease-out;
    color: #16213e;
}

.global-overlay-content h2,
.global-overlay-content p {
    color: #16213e;
}

.global-spinner {
    width: 70px;
    height: 70px;
    border: 6px solid rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    border-top-color: var(--button-primary);
    margin: 0 auto 20px auto;
    animation: spin 1.2s linear infinite;
}

.cart-gen-modal h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #132854;
}

.cart-gen-message {
    min-height: 2.6em;
    margin: 0 0 18px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #3a4660;
    transition: opacity 0.25s ease;
}

.cart-gen-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(19, 40, 84, 0.12);
    overflow: hidden;
    margin: 0 auto 10px;
}

.cart-gen-progress-bar {
    height: 100%;
    width: 12%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff6b35, #ff9a5a);
    transition: width 0.55s ease;
}

.cart-gen-step {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: #6b778f;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Betűtípus választó csoport stílusok */
optgroup {
    font-weight: bold;
    color: var(--accent-color);
    background-color: rgba(22, 33, 62, 0.1);
}

option {
    font-weight: normal;
    padding: 5px;
}

select {
    padding: 10px;
}


/* Csillagtérkép bolygó/háttér kezelése — szigorú kör maszk */
.celestial-map-container {
    position: relative;
    border-radius: 50% !important;
    overflow: hidden !important;
    z-index: 1;
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(circle, #000 99%, transparent 100%);
    mask-image: radial-gradient(circle, #000 99%, transparent 100%);
}

/* Háttérréteg a bolygó mögött */
.planet-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50% !important;
    overflow: hidden !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
    clip-path: circle(50% at 50% 50%);
    transition: background-image 0.25s ease, background-color 0.25s ease;
}

/* A csillagtérkép a háttér felett */
.celestial-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50% !important;
    overflow: hidden !important;
    z-index: 2;
    background-color: transparent;
    clip-path: circle(50% at 50% 50%);
}

/* Csillagtérkép canvas transzparens háttere */
.celestial-map canvas {
    border-radius: 50% !important;
    background-color: transparent !important;
    clip-path: circle(50% at 50% 50%);
}

/* Speciális effekt opciók a listában */
.effect-option {
    width: 120px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.effect-option:hover {
    transform: translateY(-5px);
}



.effect-option.active .effect-preview {
    border-color: var(--button-primary);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}

/* ─── Saját fotó szekció ─── */
.photo-upload-section {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-heading {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-upload-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.photo-hint {
    margin-top: 10px;
    color: #16213e;
}

/* ─── Fotó maszk (kör) ─── */
.photo-map-container {
    display: none; /* JS kapcsolja be */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.photo-mask {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    background-color: #16213e;
}

.photo-mask img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: auto;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
    touch-action: none;
}

.photo-mask img:active {
    cursor: grabbing;
}

/* Mobilon fekvő tájolásnál egymás mellé, állónál oszlopban */
@media (max-width: 768px) {
    .celestial-container.with-photo {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .celestial-container.with-photo.landscape {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px;
    }
    .celestial-container.with-photo .celestial-map-container,
    .celestial-container.with-photo .photo-map-container {
        width: 80% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }
    .celestial-container.with-photo.landscape .celestial-map-container,
    .celestial-container.with-photo.landscape .photo-map-container {
        width: 42% !important;
        max-width: 160px !important;
        margin: 5px !important;
    }
    .celestial-container.with-photo .map-title,
    .celestial-container.with-photo .map-quote,
    .celestial-container.with-photo .date-location,
    .celestial-container.with-photo .map-names {
        width: 100% !important;
        text-align: center !important;
    }
}
/* ===== Helysz�n �l� keres� (autocomplete) ===== */
.location-search-group {
    position: relative;
}

.location-autocomplete-wrap {
    position: relative;
}

.location-autocomplete-wrap #location {
    width: 100%;
    box-sizing: border-box;
}

.location-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

.location-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}

.location-suggestion {
    display: grid;
    grid-template-columns: 18px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    color: #1e293b;
}

.location-suggestion i {
    grid-row: 1 / span 2;
    color: #94a3b8;
    margin-top: 3px;
    font-size: 14px;
}

.location-suggestion .loc-main {
    font-weight: 600;
    font-size: 14px;
}

.location-suggestion .loc-sub {
    grid-column: 2;
    font-size: 12px;
    color: #64748b;
}

.location-suggestion:hover,
.location-suggestion:focus {
    background: #fff0e6;
    outline: none;
}

.location-suggestion:hover i {
    color: #ff6408;
}

.location-suggestion.empty {
    display: block;
    cursor: default;
    color: #64748b;
    font-size: 13px;
}

/* ========== MySky egyoldalas rendelő ========== */
.mysky-layout {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 12px 24px;
}

.mysky-layout .main-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    height: calc(100vh - 56px);
    overflow: hidden;
    position: relative;
}

.mysky-layout .preview-section {
    flex: 1 1 auto;
    width: auto;
    margin-left: 0;
    min-width: 0;
    max-height: calc(100vh - 56px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 16px;
    background: linear-gradient(180deg, #f7f8fa 0%, #eef1f5 100%);
}

.mysky-layout .preview-section h2 {
    display: none;
}

.mysky-layout .editor-section {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    flex: 0 0 min(460px, 40vw);
    width: min(460px, 40vw);
    max-height: calc(100vh - 56px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #fff;
    box-shadow: -8px 0 28px rgba(15, 23, 42, 0.08);
    border-right: none;
    border-left: 1px solid rgba(0,0,0,0.06);
    z-index: 5;
}

.mysky-layout .single-page-sections {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 18px 100px;
    min-height: 0;
    display: block;
    background: #fff;
    border-radius: 0;
}

.mysky-layout .single-page-sections .tab-pane,
.mysky-layout .single-page-sections .designer-section {
    display: block !important;
    flex: none;
    overflow: visible;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eceff3;
}

.mysky-layout .single-page-sections .designer-section:last-of-type {
    border-bottom: none;
}

.mysky-layout .section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mysky-layout .section-title i {
    color: #ff6408;
}

.mysky-layout .section-lead {
    margin: 0 0 16px;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.45;
}

.mysky-layout .subheading {
    font-size: 0.95rem;
    margin: 18px 0 10px;
    color: #334155;
}

.mysky-layout .navigation-buttons,
.mysky-layout .tabs-nav {
    display: none !important;
}

.mysky-layout .advanced-coords,
.mysky-layout .advanced-style {
    margin-top: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0;
    background: #f8fafc;
}

/* Finomhangolás — mindig feltűnő, alapból nyitva */
.mysky-layout .advanced-style.fine-tune-panel {
    margin-top: 16px;
    border: 2px solid #ff7845;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff7f2 0%, #ffffff 40%);
    box-shadow: 0 4px 14px rgba(255, 120, 69, 0.18);
}

.mysky-layout .advanced-style.fine-tune-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #9a3412;
    background: rgba(255, 120, 69, 0.08);
    border-radius: 10px 10px 0 0;
}

.mysky-layout .advanced-style.fine-tune-panel summary:hover {
    background: rgba(255, 120, 69, 0.14);
}

.mysky-layout .fine-tune-summary-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mysky-layout .fine-tune-summary-main i {
    color: #ff7845;
}

.mysky-layout .fine-tune-badge {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: #ff7845;
    box-shadow: 0 2px 6px rgba(255, 120, 69, 0.35);
}

.mysky-layout .advanced-coords summary,
.mysky-layout .advanced-style summary {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    list-style: none;
}

.mysky-layout .advanced-coords summary::-webkit-details-marker,
.mysky-layout .advanced-style summary::-webkit-details-marker {
    display: none;
}

.mysky-layout .advanced-style[open] {
    padding-bottom: 14px;
}

.mysky-layout .advanced-style.fine-tune-panel[open] summary {
    border-bottom: 1px solid rgba(255, 120, 69, 0.25);
}

.mysky-layout .advanced-style > *:not(summary) {
    padding-left: 14px;
    padding-right: 14px;
}

/* Stíluskategória tabok */
.style-category-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 10px;
    flex-wrap: wrap;
}
.style-cat-tab {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.style-cat-tab i { color: #94a3b8; font-size: 0.9rem; }
.style-cat-tab:hover { border-color: #ff7845; background: #fffaf7; }
.style-cat-tab.active {
    border-color: #ff6408;
    background: #fff7ed;
    color: #0f172a;
}
.style-cat-tab.active i { color: #ff6408; }

/* Stílussablon rács — kompakt, max ~20 sablon */
.style-presets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 4px 0 8px;
    max-height: none;
    overflow: visible;
}

.style-presets-empty {
    grid-column: 1 / -1;
    margin: 8px 0;
    color: #64748b;
    font-size: 0.9rem;
}

@media (min-width: 961px) {
    .style-presets-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        max-height: none;
    }
}

.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;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.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: 2 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: #0b1a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10% 12% 22%;
}

.style-preset-circle {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #000000;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
}

.style-preset-sky {
    display: none;
}

.style-preset-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    border-radius: 50%;
    /* Fekete SVG kitöltés átlátszóvá: alatta a kör színe (kék/fekete) látszik, fehér csillagok megmaradnak */
    mix-blend-mode: screen;
}

.style-preset-badge {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 2;
    background: #ff6408;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.style-preset-badge--heart {
    background: #ff6408;
    padding: 2px 5px;
    font-size: 9px;
}

.style-preset-name {
    font-size: 9px;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
    padding: 0 1px 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

/* Sticky kosár */
.sticky-cart-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
}

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

.sticky-cart-btn {
    flex: 1;
    margin: 0 !important;
    padding: 14px 16px !important;
    font-size: 1rem !important;
    background: #22c55e !important;
    border-color: #16a34a !important;
}

.sticky-cart-btn:hover {
    background: #16a34a !important;
}

.mysky-layout .compact-summary {
    margin-top: 16px;
}

.mysky-layout .compact-summary ul {
    margin: 0;
    padding-left: 18px;
}

.mysky-layout .preview-note {
    text-align: center;
    font-size: 13px;
    color: #334155;
    margin-top: 8px;
    line-height: 1.4;
}

@media (max-width: 960px) {
    /* Narancssárga felső sáv elrejtve — több hely az előnézetnek */
    .top-navbar {
        display: none !important;
    }

    .mysky-layout {
        padding: 0;
        margin: 0;
        max-width: none;
    }

    .mysky-layout .main-content {
        flex-direction: column;
        height: 100dvh;
        height: 100svh;
        overflow: hidden;
        gap: 0;
    }

    .mysky-layout .preview-section {
        position: relative;
        top: auto;
        z-index: 8;
        flex: 0 0 52vh;
        max-height: 52vh;
        width: 100%;
        padding: 0;
        margin: 0;
        box-shadow: none;
        overflow: hidden;
        background: #e8e4df;
    }

    .mysky-layout .preview-section h2 {
        display: none;
    }

    .mysky-layout .preview-note {
        display: none;
    }

    .mysky-layout .preview-wrapper.room-preview {
        height: 100%;
        width: 100%;
        max-height: 52vh;
    }

    .mysky-layout .room-wall {
        background: #e8e4df;
    }

    .mysky-layout .room-foreground {
        width: 100%;
        height: 100%;
        max-height: none !important;
        min-height: 0 !important;
        object-fit: cover;
        object-position: center 18%;
    }

    .mysky-layout .room-poster {
        top: 5%;
        left: 50%;
        transform: translateX(-50%);
        width: clamp(168px, 46vw, 280px);
        border-width: 5px;
    }

    .mysky-layout .editor-section {
        flex: 1 1 auto;
        width: 100%;
        max-height: none;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        box-shadow: none;
        border-left: none;
        background: #fff;
        position: relative;
    }

    .mysky-layout .single-page-sections {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 12px calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .mysky-layout .section-title {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .mysky-layout .section-lead {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .style-presets-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }

    .mysky-layout .sticky-cart-bar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        min-height: 0;
        box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
    }

    .mysky-layout .sticky-cart-btn {
        padding: 11px 14px !important;
        font-size: 0.92rem !important;
    }
}

@media (max-width: 480px) {
    .style-presets-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }

    .mysky-layout .preview-section {
        flex: 0 0 50vh;
        max-height: 50vh;
    }

    .mysky-layout .preview-wrapper.room-preview {
        max-height: 50vh;
    }

    .mysky-layout .room-poster {
        top: 4%;
        width: clamp(175px, 52vw, 260px);
    }

    .style-preset-name {
        font-size: 8px;
    }
}

/* ========== Mobil MySky tabok + keret + SVG sablon ========== */
.mysky-mobile-tabs {
    display: none;
    flex-shrink: 0;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #e8f2fa;
    border-bottom: 1px solid #cfe0ee;
    scrollbar-width: none;
}
.mysky-mobile-tabs::-webkit-scrollbar { display: none; }

.mysky-tab {
    flex: 1 0 auto;
    min-width: 4.2rem;
    padding: 12px 10px 10px;
    border: none;
    background: transparent;
    color: #3d5f7a;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}
.mysky-tab.active {
    color: #0f3d5c;
    background: rgba(255, 255, 255, 0.55);
}
.mysky-tab.active::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #3b82c4;
}

/* SVG thumb — mix-blend a kör színén */
.style-preset-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    border-radius: 50%;
    mix-blend-mode: screen;
}
.style-preset-sky {
    display: none !important;
}

.frame-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.frame-block {
    margin-top: 16px;
    padding-top: 4px;
}

.frame-block .subheading {
    margin-top: 8px;
}

.frame-block .subheading i {
    color: #ff6408;
    margin-right: 4px;
}
.frame-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 6px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.frame-option.active {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px #22c55e;
}
.frame-option-preview {
    width: 42px;
    height: 54px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.frame-option-preview.frame-none {
    background: #f1f5f9;
    border: 1px dashed #94a3b8;
}
.frame-option-preview.frame-white {
    border: 4px solid #f8fafc;
    box-shadow: 0 0 0 1px #cbd5e1;
    background: #1e293b;
}
.frame-option-preview.frame-black {
    border: 4px solid #111827;
    background: #1e293b;
}
.frame-option-inner {
    width: 70%;
    height: 55%;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.7);
    background: radial-gradient(circle at 40% 40%, #334155, #0f172a);
}
.frame-option-label {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    line-height: 1.2;
}
.frame-option-price {
    font-size: 11px;
    font-weight: 700;
    color: #ea580c;
}
.frame-option-price.muted {
    color: #94a3b8;
    font-weight: 500;
}
.frame-unavailable {
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.9rem;
}

.room-poster.has-frame-white {
    box-shadow:
        0 0 0 6px #f8fafc,
        0 0 0 7px #cbd5e1,
        0 12px 28px rgba(0,0,0,0.25);
}
.room-poster.has-frame-black {
    box-shadow:
        0 0 0 6px #111827,
        0 0 0 7px #000,
        0 12px 28px rgba(0,0,0,0.35);
}

@media (max-width: 960px) {
    .mysky-mobile-tabs {
        display: flex;
        position: relative;
        top: auto;
        z-index: 9;
        flex-shrink: 0;
    }

    .mysky-layout .single-page-sections .designer-section,
    .mysky-layout .single-page-sections .tab-pane {
        display: none !important;
        margin-bottom: 0;
        padding-bottom: 12px;
        border-bottom: none;
    }
    .mysky-layout .single-page-sections .designer-section.mobile-pane-active {
        display: block !important;
    }

    .mysky-layout .section-title {
        font-size: 1.05rem;
    }

    .frame-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 961px) {
    .mysky-mobile-tabs {
        display: none !important;
    }
    .mysky-layout .single-page-sections .designer-section {
        display: block !important;
    }
}
