@font-face {
    font-family: 'DesignArial';
    src: url('fonts/arial.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DesignArialBold';
    src: url('fonts/arialbd.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DesignTimes';
    src: url('fonts/times.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DesignMontserrat';
    src: url('fonts/montserrat.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DesignCaveat';
    src: url('fonts/caveat.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DesignHandjet';
    src: url('fonts/handjet.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DesignSymbols';
    src: url('fonts/gensymbols.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DesignZekton';
    src: url('fonts/zekton.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DesignCJK';
    src: url('fonts/gencjk.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DesignRusso';
    src: url('fonts/russoone.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DesignCourier';
    src: url('fonts/cour.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #F5F5F7;
    --card-bg: #FFFFFF;
    --border-color: #E5E5EA;
    --text-main: #1D1D1F;
    --text-secondary: #86868B;
    --accent-color: #007AFF;
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.bg-decor {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-decor::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(58% 48% at 12% 0%, rgba(167, 139, 250, 0.055), transparent 72%),
        radial-gradient(52% 46% at 88% 6%, rgba(236, 72, 153, 0.05), transparent 74%),
        radial-gradient(56% 50% at 78% 100%, rgba(56, 189, 248, 0.05), transparent 72%);
}

.blob {
    position: absolute;
    display: block;
    border-radius: 50%;
    will-change: transform;
    animation-duration: 32s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.blob-1 {
    top: -32vmax;
    left: -32vmax;
    width: 64vmax;
    height: 64vmax;
    background: radial-gradient(circle at 50% 50%,
        rgba(139, 92, 246, 0.10) 0%,
        rgba(139, 92, 246, 0.075) 28%,
        rgba(139, 92, 246, 0.028) 56%,
        rgba(139, 92, 246, 0) 76%);
    animation-name: drift-a;
    animation-duration: 37s;
}

.blob-2 {
    top: -29vmax;
    right: -29vmax;
    width: 58vmax;
    height: 58vmax;
    background: radial-gradient(circle at 50% 50%,
        rgba(236, 72, 153, 0.095) 0%,
        rgba(236, 72, 153, 0.07) 28%,
        rgba(236, 72, 153, 0.022) 58%,
        rgba(236, 72, 153, 0) 78%);
    animation-name: drift-b;
    animation-duration: 46s;
    animation-delay: -12s;
}

.blob-3 {
    bottom: -30vmax;
    right: -30vmax;
    width: 60vmax;
    height: 60vmax;
    background: radial-gradient(circle at 50% 50%,
        rgba(56, 189, 248, 0.09) 0%,
        rgba(56, 189, 248, 0.065) 28%,
        rgba(56, 189, 248, 0.02) 58%,
        rgba(56, 189, 248, 0) 78%);
    animation-name: drift-c;
    animation-duration: 31s;
    animation-delay: -6s;
}

.blob-4 {
    bottom: -25vmax;
    left: -25vmax;
    width: 50vmax;
    height: 50vmax;
    background: radial-gradient(circle at 50% 50%,
        rgba(167, 139, 250, 0.085) 0%,
        rgba(167, 139, 250, 0.06) 30%,
        rgba(167, 139, 250, 0.02) 60%,
        rgba(167, 139, 250, 0) 78%);
    animation-name: drift-d;
    animation-duration: 53s;
    animation-delay: -21s;
}

@keyframes drift-a {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(7vw, 5vh, 0) scale(1.12); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes drift-b {
    0%   { transform: translate3d(0, 0, 0) scale(1.08); }
    50%  { transform: translate3d(-6vw, -7vh, 0) scale(0.94); }
    100% { transform: translate3d(0, 0, 0) scale(1.08); }
}

@keyframes drift-c {
    0%   { transform: translate3d(0, 0, 0) scale(0.92); }
    50%  { transform: translate3d(5vw, -4vh, 0) scale(1.06); }
    100% { transform: translate3d(0, 0, 0) scale(0.92); }
}

@keyframes drift-d {
    0%   { transform: translate3d(0, 0, 0) scale(1.02); }
    50%  { transform: translate3d(-4vw, 3vh, 0) scale(0.9); }
    100% { transform: translate3d(0, 0, 0) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
    .blob { animation: none; }
}

.app-container {
    width: 100%;
    max-width: 1120px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 14px rgba(0,0,0,0.02);
}

.app-header h1 { font-size: 1.55rem; font-weight: 600; letter-spacing: -0.5px; }
.app-header h1 .brand-light {
    color: #9C9CA6;
    font-weight: 600;
}

.app-header h1 .brand {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-secondary);
    margin-left: 4px;
}
.session-info { font-size: 0.85rem; color: var(--text-secondary); }

.card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}

.card h2 { font-size: 1.45rem; margin-bottom: 28px; font-weight: 600; }

.mockup-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.mockup-card {
    position: relative;
    width: 100%;
    max-width: 860px;
    aspect-ratio: 16 / 9; 
    background: #ffffff; 
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.mockup-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1080px;
    transform-origin: top left;
}

.mockup-bg-fill {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #000000;
    z-index: 0;
}

.text-layer {
    position: absolute;
    z-index: 1;
    font-family: 'DesignArialBold', 'DesignSymbols', 'DesignCJK', Arial, sans-serif;
    font-weight: normal;
    line-height: 1;
    font-size: 96px;
    white-space: nowrap;
    user-select: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.mockup-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('mockup-1.png'); 
    background-size: 100% 100%; 
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
    pointer-events: none;
}

#overlay-2 {
    background-image: url('mockup-2.png');
}

.controls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.control-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.control-item.full-width { grid-column: 1 / -1; }
.control-item.checkbox-item { justify-content: flex-end; padding-bottom: 8px; }

.control-item label { font-size: 0.95rem; color: var(--text-secondary); font-weight: 500; }

input[type="text"], select, textarea {
    width: 100%; padding: 14px 16px; border: 1px solid var(--border-color);
    border-radius: 10px; font-size: 1rem; background: #FAFAFC;
    transition: all 0.2s; font-family: inherit;
}

textarea { resize: vertical; min-height: 100px; }

input[type="text"]:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent-color);
    background: #FFFFFF; box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.text-row { display: flex; gap: 10px; align-items: stretch; }
.text-row input { flex: 1; min-width: 0; }

.symbol-picker { position: relative; flex: 0 0 auto; }

.symbol-toggle {
    width: 44px;
    height: 100%;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #FAFAFC;
    color: var(--text-main);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.symbol-toggle:hover,
.symbol-toggle[aria-expanded="true"] {
    background: #FFFFFF;
    border-color: var(--accent-color);
}

.symbol-popup {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    width: min(340px, calc(100vw - 72px));
    max-height: 320px;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
    gap: 2px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.symbol-popup.open { display: grid; }

.symbol-note {
    grid-column: 1 / -1;
    margin: 0 0 6px;
    padding: 0 2px 8px;
    font-size: 0.72rem;
    line-height: 1.3;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.symbol-popup button {
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.symbol-popup button:hover { background: #F2F2F7; }

input[type="range"] {
    width: 100%; height: 6px; background: var(--border-color);
    border-radius: 3px; appearance: none; margin-top: 8px;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none; width: 20px; height: 20px;
    background: var(--accent-color); border-radius: 50%;
    border: 2px solid white; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

.color-buttons { display: flex; gap: 12px; }
.color-btn {
    width: 32px; height: 32px; border-radius: 8px;
    border: 2px solid transparent; cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(0,0,0,0.10);
}
.color-btn-empty {
    background-color: #FFFFFF;
    background-image:
        linear-gradient(45deg, #E5E5EA 25%, transparent 25%, transparent 75%, #E5E5EA 75%),
        linear-gradient(45deg, #E5E5EA 25%, #FFFFFF 25%, #FFFFFF 75%, #E5E5EA 75%);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
}

.color-btn:hover { transform: scale(1.1); }
.color-btn.active { border-color: var(--accent-color); }

.char-counter { font-size: 0.75rem; color: var(--text-secondary); text-align: right; margin-top: 4px; }

.hint {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #F5F5F7;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* абзацы внутри серой подсказки: воздух между блоками */
.hint p {
    margin: 0;
}

.hint p + p {
    margin-top: 10px;
}

/* условия сделки — отдельным блоком, с чуть большим воздухом */
.hint .hint-terms {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #E3E3E8;
}

.hint-legal {
    margin-top: 10px;
    font-size: 0.8rem;
    line-height: 1.5;
    background: transparent;
    padding: 0 4px;
}

.empty-hint {
    margin: 20px 0 0;
    padding: 12px 16px;
    border-radius: 10px;
    background: #FDECEA;
    color: #B42318;
    font-size: 0.86rem;
    line-height: 1.4;
}

.empty-hint[hidden] { display: none; }

.actions { margin-top: 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn {
    padding: 18px 28px; border-radius: 12px; border: none;
    font-weight: 600; cursor: pointer; font-size: 1.05rem; flex: 1; transition: all 0.2s;
}
.actions .btn.secondary { flex: 0 0 auto; }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }

.consent {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 285px;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--text-secondary);
    cursor: pointer;
}
.consent input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--accent-color);
}
.btn.primary { background-color: var(--accent-color); color: white; }
.btn.primary:hover { background-color: #0071e3; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3); }
.btn.secondary { background-color: #F2F2F7; color: var(--text-main); }
.btn.secondary:hover { background-color: #E5E5EA; }

.popup {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%) translateY(12px);
    max-width: 380px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(29, 29, 31, 0.95);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1001;
}

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

.popup strong {
    display: block;
    margin-bottom: 4px;
}

.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #1D1D1F;
    color: #fff;
    text-align: center;
    border-radius: 12px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s, visibility 0.3s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

@media (max-width: 1020px) {
    .actions { flex-wrap: wrap; }
    .consent { flex: 1 1 100%; max-width: none; }
}

@media (max-width: 520px) {
    body { padding: 20px 12px; }
    .card { padding: 20px; }
    .app-header { flex-wrap: wrap; gap: 4px; padding: 14px 16px; }
    /* заголовок одной строкой, подпись автора — под ним */
    .app-header h1 { font-size: 1.15rem; }
    .app-header h1 .brand {
        display: block;
        margin-left: 0;
        margin-top: 2px;
        font-size: 0.8rem;
    }
    .session-info { display: none; }
    .controls-grid { grid-template-columns: 1fr; }
    .actions { gap: 12px; }
    .actions .btn,
    .actions .btn.secondary { flex: 1 1 100%; width: 100%; }
}

.color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.examples-btn {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #FAFAFC;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.examples-btn:hover {
    background: #FFFFFF;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.examples-btn svg { width: 20px; height: 20px; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox.open { display: flex; }

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.45);
    backdrop-filter: blur(6px);
}

.lightbox-panel {
    position: relative;
    width: min(1180px, 100%);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    padding: 24px;
    box-sizing: border-box;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
}

.lightbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.lightbox-head h3 { font-size: 1.15rem; font-weight: 600; }

.lightbox-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: #F5F5F7;
    color: var(--text-secondary);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover { background: #ECECF1; }

.lightbox-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    overflow-y: auto;
}

.lightbox-grid img {
    width: 100%;
    aspect-ratio: 233 / 100;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    background: #F5F5F7;
}

.lightbox-empty {
    grid-column: 1 / -1;
    margin: 24px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.lightbox-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
}

.lb-nav {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #FAFAFC;
    color: var(--text-main);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.lb-nav:hover:not(:disabled) { background: #FFFFFF; border-color: var(--accent-color); }
.lb-nav:disabled { opacity: 0.4; cursor: default; }

#lightbox-counter { min-width: 130px; text-align: center; font-size: 0.9rem; color: var(--text-secondary); }

body.lightbox-open { overflow: hidden; }

@media (max-width: 900px) {
    .lightbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .lightbox { padding: 12px; }
    .lightbox-panel { padding: 16px; max-height: calc(100vh - 24px); }
    .lightbox-grid { grid-template-columns: 1fr; }
}

.hero-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 48px;
}

.hero-text p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .hero-text { grid-template-columns: 1fr; gap: 12px; }
}

.card-strip { padding: 22px 40px; }

.strip-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.strip-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

@media (max-width: 520px) {
    .card-strip { padding: 18px 20px; }
    .strip-row { gap: 12px; }
    .hero p { font-size: 0.95rem; }
}

.footer-card {
    padding: 22px 40px;
    text-align: center;
}

.footer-card p {
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    color: var(--text-secondary);
}

.footer-card .footer-links {
    margin: 0 0 6px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-copy {
    margin: 0;
    font-size: 0.86rem;
    letter-spacing: 0.2px;
    color: var(--text-secondary);
}

.footer-links a {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
    padding-bottom: 1px;
    transition: color 0.15s, border-color 0.15s;
}

.footer-links a:hover {
    color: var(--text-main);
    border-color: var(--text-main);
}

@media (max-width: 520px) {
    .footer-card { padding: 18px 20px; }
    .footer-card p { font-size: 0.82rem; }
    /* ссылки подвала — столбиком: в строку они рвутся как попало */
    .footer-card .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
    }
    .footer-links a { font-size: 0.8rem; }
}

/* Узкие экраны: палитра и кнопка примеров остаются в одной строке.
   Считаем: 7 плашек по 28 + 6 зазоров по 8 = 244, плюс кнопка 38 и зазор 12,
   итого 294 при доступных 326 — влезает. Если цвета добавятся, flex-wrap
   аккуратно перенесёт кнопку, а не вытолкнет её за карточку. */
@media (max-width: 600px) {
    .color-row {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px 12px;
    }
    .color-buttons { flex-wrap: wrap; gap: 8px; }
    .color-btn { width: 28px; height: 28px; border-radius: 7px; }
    .examples-btn { width: 38px; height: 38px; margin-left: auto; }
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.82rem;
    color: var(--accent-color);
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 122, 255, 0.35);
    transition: border-color 0.15s;
}

.link-btn:hover { border-color: var(--accent-color); }

.privacy {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.privacy.open { display: flex; }

.privacy-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.45);
    backdrop-filter: blur(6px);
}

.privacy-panel {
    position: relative;
    width: min(600px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 24px 28px;
    box-sizing: border-box;
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
}

.privacy-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.privacy-head h3 { font-size: 1.1rem; font-weight: 600; margin: 0; }

.privacy-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 9px;
    background: #F5F5F7;
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.privacy-close:hover { background: #ECECF1; }

.privacy-body p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-main);
}

.privacy-body strong { font-weight: 600; }

.privacy-body a { color: var(--accent-color); text-decoration: none; }
.privacy-body a:hover { text-decoration: underline; }

.privacy-operator {
    margin-top: 14px !important;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem !important;
    color: var(--text-secondary) !important;
}

body.privacy-open { overflow: hidden; }

@media (max-width: 520px) {
    .privacy { padding: 12px; }
    .privacy-panel { padding: 18px 18px; }
    .privacy-body p { font-size: 0.86rem; }
}

.email {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    color: var(--text-main);
    user-select: none;
}

.email-user,
.email-domain {
    font-family: 'DesignArial', Arial, sans-serif;
}

.email-at {
    width: 0.95em;
    height: 0.95em;
    margin: 0 1px;
    vertical-align: -0.05em;
    fill: currentColor;
}

/* Изогнутая строка: каждая буква ставится отдельно по дуге */
.text-layer .bend-char {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-block;
    transform-origin: 50% 50%;
    white-space: pre;
    /* глобальный * { font-family } иначе перебивает наследование от .text-layer */
    font-family: inherit;
    font-weight: inherit;
    font-style: inherit;
    letter-spacing: inherit;
}

/* Плашка режима: отпуск или техработы. Висит до перезагрузки и не исчезает. */
.mode-banner {
    position: sticky;
    top: 14px;
    z-index: 60;
    display: block;
    padding: 14px 20px;
    border-radius: 14px;
    background: #1D1D1F;
    color: #FFFFFF;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
    font-size: 0.9rem;
    line-height: 1.5;
}

.mode-banner[hidden] { display: none; }

.mode-title {
    font-weight: 600;
    margin-right: 8px;
}

.mode-text { color: rgba(255, 255, 255, 0.82); }

@media (max-width: 640px) {
    .mode-banner { padding: 12px 16px; }
}

/* Плитка примера: клик = взять настройки в редактор */
.lb-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: #F5F5F7;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.lb-item img {
    display: block;
    width: 100%;
    height: auto;
}

.lb-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.lb-item-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 10px 8px;
    font-size: 0.72rem;
    line-height: 1.2;
    color: #FFFFFF;
    text-align: left;
    background: linear-gradient(to top, rgba(17, 17, 17, 0.82), rgba(17, 17, 17, 0));
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
}

.lb-item:hover .lb-item-hint,
.lb-item:focus-visible .lb-item-hint {
    opacity: 1;
    transform: translateY(0);
}

.lb-item:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Обрезка превью по контуру печатной зоны: чтобы редактор показывал ровно
   то, что попадёт на деталь (раньше текст был виден целиком). */
.zone-clip {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.zone-clip .text-layer { z-index: 0; }

/* Превью из настоящего SVG: тот же файл, что уйдёт в печать */
.svg-preview {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.svg-preview svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Окно подтверждения отправки заказа */
.notify-note {
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.notify-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.notify-actions .btn {
    flex: 1;
}

/* Поле почты в окне отправки заказа */
.notify-field {
    display: block;
    margin-top: 16px;
}

.notify-field span {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.notify-field input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #FAFAFC;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.notify-field input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.notify-field input.invalid {
    border-color: #FF3B30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.10);
}

.notify-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    font-style: normal;
    color: var(--text-secondary);
}

.notify-hint.bad {
    color: #E0342A;
}

.notify-actions .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Сброс — действие необратимое, поэтому кнопка красная */
.btn.danger {
    background: #FF3B30;
    color: #FFFFFF;
}

.btn.danger:hover {
    background: #E0342A;
}
