
:root {
    --burgundy: #70243b;
    --burgundy-hover: #56182d;
    --burgundy-dark: #3d1423;
    --burgundy-light: #f8f1f3;
    --burgundy-border: #e8d6dc;
    --text: #211a1c;
    --muted: #81747a;
    --border: #e5dfe2;
    --white: #fff;
    --shadow: 0 18px 60px rgba(61, 20, 35, .14);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    color: var(--text);
    background: var(--white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(112, 36, 59, .2);
    outline-offset: 2px;
}

.canvas-app,
.canvas-workspace,
.canvas-viewport {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.canvas-app {
    background: #fff;
}

#ad-canvas {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}

.canvas-hint {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;
    max-width: min(360px, calc(100vw - 36px));
    padding: 11px 15px;
    border: 1px solid rgba(112, 36, 59, .1);
    border-radius: 14px;
    color: #674451;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 28px rgba(61, 20, 35, .08);
    font-size: 12px;
    line-height: 1.5;
    backdrop-filter: blur(18px);
}

/* Tombol informasi */

.about-trigger {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 30;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--burgundy);
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 4px 18px rgba(61, 20, 35, .06);
    transition: .2s ease;
    backdrop-filter: blur(16px);
}

.about-trigger:hover {
    color: #fff;
    background: var(--burgundy);
    border-color: var(--burgundy);
    transform: translateY(-1px);
}

/* Modal */

.iklanin-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(35, 20, 25, .4);
    backdrop-filter: blur(8px);
}

.iklanin-overlay.is-open {
    display: flex;
}

.iklanin-modal {
    position: relative;
    width: min(100%, 620px);
    max-height: 90dvh;
    overflow-y: auto;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
    animation: modal-in .2s ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.iklanin-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 0;
    border-radius: 13px;
    color: #65565c;
    background: #f5f2f3;
    font-size: 23px;
    transition: .2s;
}

.iklanin-modal-close:hover {
    color: var(--burgundy);
    background: var(--burgundy-light);
}

.iklanin-brand {
    margin: 0 0 16px;
    color: var(--burgundy);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.iklanin-modal h1,
.iklanin-modal h2 {
    margin: 0 48px 8px 0;
    color: var(--burgundy-dark);
    font-size: clamp(25px, 4vw, 30px);
    font-weight: 750;
    letter-spacing: -.8px;
    line-height: 1.2;
}

.iklanin-subtitle {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

/* Ringkasan harga */

.iklanin-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 22px 0 28px;
    padding: 20px;
    border: 1px solid var(--burgundy-border);
    border-radius: 16px;
    background: #fcf8f9;
}

.iklanin-summary-item {
    min-width: 0;
}

.iklanin-summary-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.iklanin-summary-value {
    display: block;
    overflow-wrap: anywhere;
    color: var(--burgundy-dark);
    font-size: 15px;
    font-weight: 750;
}

.price-value {
    color: var(--burgundy);
}

/* Formulir */

.iklanin-form {
    display: grid;
    gap: 19px;
}

.iklanin-field {
    display: grid;
    gap: 8px;
}

.iklanin-field label {
    color: #39282f;
    font-size: 13px;
    font-weight: 650;
}

.optional {
    color: var(--muted);
    font-weight: 400;
}

.iklanin-field input,
.iklanin-field textarea {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 13px 14px;
    border: 1px solid #ded5d9;
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}

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

.iklanin-field input::placeholder,
.iklanin-field textarea::placeholder {
    color: #aa9da2;
}

.iklanin-field input:focus,
.iklanin-field textarea:focus {
    border-color: var(--burgundy);
    box-shadow: 0 0 0 4px rgba(112, 36, 59, .1);
}

.iklanin-field input[type="file"] {
    min-height: auto;
    padding: 12px;
    background: #fdfafb;
}

.iklanin-help,
.iklanin-footnote {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.iklanin-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #57464d;
    font-size: 12px;
    line-height: 1.6;
}

.iklanin-checkbox input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: var(--burgundy);
    flex-shrink: 0;
}

/* Tombol */

.iklanin-button {
    display: inline-flex;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 19px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, transform .2s, box-shadow .2s;
}

.iklanin-button-primary {
    color: #fff;
    background: var(--burgundy);
    box-shadow: 0 5px 14px rgba(112, 36, 59, .16);
}

.iklanin-button-primary:hover {
    color: #fff;
    background: var(--burgundy-hover);
    box-shadow: 0 8px 20px rgba(112, 36, 59, .2);
    transform: translateY(-1px);
}

.iklanin-button-secondary {
    border-color: var(--border);
    color: #55434a;
    background: #fff;
}

.iklanin-button-secondary:hover {
    border-color: var(--burgundy-border);
    color: var(--burgundy);
    background: var(--burgundy-light);
}

.iklanin-button:disabled {
    cursor: not-allowed;
    opacity: .6;
    transform: none;
}

.iklanin-button-full {
    width: 100%;
}

.iklanin-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.iklanin-actions .iklanin-button-primary {
    flex: 1;
}

/* Pesan */

.iklanin-message {
    display: none;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--burgundy-border);
    border-radius: 12px;
    color: var(--burgundy-dark);
    background: var(--burgundy-light);
    font-size: 13px;
    line-height: 1.55;
}

.iklanin-message.is-visible {
    display: block;
}

.iklanin-message.is-error {
    border-color: #efcaca;
    color: #8a2424;
    background: #fff6f6;
}

/* Tentang */

.about-modal {
    width: min(100%, 430px);
}

.about-mark {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(145deg, #87344d, #4a1529);
    font-size: 24px;
    font-weight: 800;
}

.about-description {
    margin: 15px 0 22px;
    color: #76666c;
    font-size: 14px;
    line-height: 1.75;
}

.about-note {
    padding: 15px;
    border: 1px solid var(--burgundy-border);
    border-radius: 14px;
    color: #65414d;
    background: #fcf7f9;
    font-size: 13px;
    line-height: 1.6;
}

.about-steps {
    display: grid;
    gap: 7px;
    margin: 10px 0 0;
    padding-left: 20px;
}

.about-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0;
    color: var(--muted);
    font-size: 13px;
}

.about-price strong {
    color: var(--burgundy);
    font-size: 20px;
}

@media (max-width: 600px) {
    .canvas-hint {
        right: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
        padding: 10px 12px;
        font-size: 11px;
    }

    .about-trigger {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .iklanin-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .iklanin-modal {
        width: 100%;
        max-height: 92dvh;
        padding: 24px 20px calc(22px + env(safe-area-inset-bottom));
        border-radius: 23px 23px 0 0;
    }

    .iklanin-summary {
        gap: 17px 12px;
        padding: 16px;
    }

    .iklanin-summary-value {
        font-size: 14px;
    }

    .iklanin-actions {
        flex-direction: column;
    }

    .iklanin-actions .iklanin-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

.about-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.about-modal-actions .iklanin-button {
    width: 100%;
    min-height: 52px;
}

.iklanin-button-secondary {
    color: var(--burgundy);
    background: #fff;
    border: 1px solid var(--burgundy-border);
}

.iklanin-button-secondary:hover {
    background: var(--burgundy-light);
}

@media (max-width: 400px) {
    .about-modal-actions {
        grid-template-columns: 1fr;
    }
}

/* IKLANIN LEGAL CHECKOUT */

.iklanin-legal {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid var(--border, #e5dfe2);
    border-radius: 12px;
    background: #fcfafb;
}

.iklanin-legal h3 {
    margin: 0 0 12px;
    color: var(--text, #211a1c);
    font-size: 15px;
    font-weight: 700;
}

.iklanin-legal-details {
    padding: 11px 0;
    border-bottom: 1px solid var(--border, #e5dfe2);
}

.iklanin-legal-details summary {
    cursor: pointer;
    color: var(--text, #211a1c);
    font-size: 13px;
    font-weight: 600;
}

.iklanin-legal-details summary::marker {
    color: var(--burgundy, #70243b);
}

.iklanin-legal-details p {
    margin: 10px 0 0;
    color: var(--muted, #81747a);
    font-size: 12px;
    line-height: 1.7;
}

.iklanin-legal-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    line-height: 1.6;
}

.iklanin-legal-consent input {
    flex: 0 0 auto;
    margin-top: 4px;
    accent-color: var(--burgundy, #70243b);
}

.iklanin-legal-consent span {
    color: var(--text, #211a1c);
    font-size: 12px;
}

/* IKLANIN — BURGUNDY CANVAS FRAME */

.canvas-viewport {
    position: relative;
    border: 2px solid #70243b;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    box-shadow:
        0 0 0 1px rgba(112, 36, 59, 0.12),
        0 8px 24px rgba(61, 20, 35, 0.18),
        0 18px 45px rgba(61, 20, 35, 0.12);
}

#ad-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border: none;
    border-radius: 4px;
}

.canvas-workspace {
    padding: 5px;
}

@media (max-width: 600px) {
    .canvas-workspace {
        padding: 10px;
    }

    .canvas-viewport {
        border-width: 2px;
        border-radius: 6px;
        box-shadow:
            0 0 0 1px rgba(112, 36, 59, 0.1),
            0 5px 16px rgba(61, 20, 35, 0.16);
    }
}

