:root {
    --bg: #091c31;
    --bg-2: #13263b;
    --bg-3: #1b3148;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-strong: #ffffff;
    --ink: #2c2932;
    --muted: #625f68;
    --line: rgba(44, 41, 50, 0.12);
    --brand: #0081c7;
    --accent: #00ffff;
    --brand-dark: #2c2932;
    --shadow: 0 28px 70px rgba(3, 10, 22, 0.32);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 52%, var(--bg-3) 100%);
    font-family: "Titillium Web", "Segoe UI", sans-serif;
}

.page-shell {
    padding: 30px 0 56px;
}

.hero-card,
.glass-card,
.glass-alert {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.brand-hero {
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(216, 240, 255, 0.96) 58%, rgba(0, 129, 199, 0.22) 100%);
}

.brand-hero::before {
    content: "portal";
    position: absolute;
    right: -18px;
    bottom: -34px;
    font-size: clamp(5rem, 18vw, 11rem);
    line-height: 0.85;
    font-weight: 700;
    color: rgba(44, 41, 50, 0.06);
    pointer-events: none;
}

.hero-toolbar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.brand-logo {
    display: block;
    width: auto;
    height: 3.6rem;
}

.brand-note {
    color: var(--brand-dark);
    font-size: 1.25rem;
}

.brand-note-highlight,
.section-kicker {
    color: var(--brand);
    font-weight: 700;
}

.hero-advisor {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--brand-dark);
    line-height: 1.35;
}

.hero-advisor-label {
    color: var(--muted);
    font-size: 0.82rem;
}

.hero-advisor-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.hero-advisor-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}

.hero-advisor a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--brand-dark);
    text-decoration: none;
}

.hero-advisor a:hover {
    color: var(--brand);
}

.hero-title {
    font-size: clamp(2.7rem, 5vw, 4.7rem);
    line-height: 0.95;
    font-weight: 700;
    margin: 0.15rem 0 0.8rem;
    color: var(--brand-dark);
}

.hero-subtitle {
    color: var(--muted);
    max-width: 48rem;
    font-size: 1.05rem;
}

.portal-card {
    border: 1px solid rgba(255, 255, 255, 0.68);
}

.section-kicker {
    font-size: 0.9rem;
    letter-spacing: 0;
    margin-bottom: 0.35rem;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.03;
    font-weight: 700;
}

.side-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.muted-note {
    color: var(--muted);
}

.soft-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.82rem;
    border-radius: 999px;
    background: rgba(0, 129, 199, 0.12);
    color: var(--brand-dark);
    font-weight: 700;
}

.portal-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
    position: relative;
    z-index: 1;
    margin-bottom: 1.25rem;
}

.portal-steps span,
.portal-steps a {
    display: inline-flex;
    justify-content: center;
    padding: 0.55rem 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: none;
}

.portal-steps .is-active {
    background: var(--brand);
    color: #ffffff;
}

.booking-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.booking-grid div,
.info-strip,
.content-source {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.booking-grid div {
    padding: 0.95rem;
}

.booking-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
    margin-bottom: 0.15rem;
}

.booking-grid strong {
    display: block;
    font-size: 1.02rem;
    line-height: 1.15;
}

.info-strip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    font-weight: 700;
}

.booking-extra {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.85rem 1rem;
    font-weight: 700;
}

.booking-extra div + div {
    margin-top: 0.35rem;
}

.info-strip i {
    color: var(--brand);
    font-size: 1.2rem;
}

.btn-brand {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
    font-weight: 700;
}

.btn-brand:hover,
.btn-brand:focus {
    background: #006fae;
    border-color: #006fae;
    color: #ffffff;
}

.btn-outline-brand {
    border-color: rgba(0, 129, 199, 0.45);
    color: var(--brand-dark);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.58);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
    background: rgba(0, 129, 199, 0.12);
    border-color: var(--brand);
    color: var(--brand-dark);
}

.form-control,
.form-select,
.input-group-text {
    border-color: rgba(44, 41, 50, 0.16);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.22rem rgba(0, 129, 199, 0.16);
}

.choice-stack {
    display: grid;
    gap: 1rem;
}

.choice-option,
.previous-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    padding: 1rem;
    cursor: pointer;
}

.choice-panel {
    display: block;
}

.choice-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    cursor: pointer;
    margin: 0;
}

.choice-body {
    margin-top: 1rem;
    padding-left: 1.85rem;
}

.compact-drop {
    min-height: 9.5rem;
}

a.previous-card {
    color: inherit;
    text-decoration: none;
}

.choice-option input[type="radio"],
.previous-card input[type="radio"] {
    flex: 0 0 auto;
    margin-top: 0.25rem;
    accent-color: var(--brand);
}

.choice-option strong,
.choice-option small,
.previous-card span {
    display: block;
}

.choice-option small,
.previous-card-meta {
    color: var(--muted);
}

.previous-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.previous-card {
    min-height: 6.25rem;
}

.previous-card.is-finalized {
    border-color: rgba(25, 135, 84, 0.32);
    background: rgba(25, 135, 84, 0.08);
}

.previous-card-title {
    font-weight: 700;
    line-height: 1.15;
}

.booking-finalized-note {
    margin-top: 0.55rem;
    color: #198754;
    font-size: 0.86rem;
    font-weight: 700;
}

.reuse-selects {
    display: grid;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    padding: 1rem;
}

.drop-area {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 16rem;
    padding: 2rem;
    border: 2px dashed rgba(0, 129, 199, 0.42);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--brand-dark);
    text-align: center;
    cursor: pointer;
}

.drop-area i {
    font-size: 4rem;
    color: var(--brand);
}

.drop-area span {
    color: var(--muted);
}

.drop-area input {
    max-width: 24rem;
}

.content-source {
    padding: 1rem;
}

.uploaded-images {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.uploaded-image-item {
    display: grid;
    gap: 0.45rem;
    justify-items: start;
    width: min(18rem, 100%);
}

.uploaded-images img {
    width: 6rem;
    height: 4.2rem;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.upload-actions {
    margin-top: 0.75rem;
}

.upload-delete-btn {
    border-radius: 8px;
}

.image-meta-fields {
    display: grid;
    gap: 0.45rem;
    width: 100%;
    margin-top: 0.2rem;
}

.image-meta-fields .form-label {
    margin-bottom: 0;
    font-size: 0.86rem;
    font-weight: 700;
}

.image-meta-fields textarea {
    min-height: 4rem;
    resize: vertical;
}

.inline-preview {
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
}

.inline-preview-title {
    margin-bottom: 0.65rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ink);
}

.creative-inline-preview {
    display: grid;
    gap: 0.6rem;
}

.creative-inline-preview img,
.creative-inline-preview object {
    width: 100%;
    max-width: 18rem;
    height: 12rem;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.aspect-note {
    margin-top: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    font-size: 0.86rem;
    line-height: 1.35;
}

.aspect-note-info {
    background: rgba(0, 129, 199, 0.1);
    color: var(--brand-dark);
}

.aspect-note-success {
    background: rgba(34, 139, 84, 0.12);
    color: #19623d;
}

.aspect-note-warning {
    background: rgba(244, 168, 35, 0.18);
    color: #815000;
}

.content-assets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
}

.preview-ad-placeholder {
    display: grid;
    align-content: center;
    gap: 0.35rem;
    width: 100%;
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    text-align: center;
}

.preview-ad-placeholder span {
    font-size: 0.75rem;
    color: var(--muted);
}

.editor-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.55rem;
    border: 1px solid rgba(44, 41, 50, 0.16);
    border-bottom: 0;
    border-radius: 0.375rem 0.375rem 0 0;
    background: rgba(255, 255, 255, 0.72);
}

.rich-editor {
    min-height: 17rem;
    overflow-y: auto;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.content-step-card .content-visible-field {
    width: 100%;
}

.preview-modal-content {
    background: #eef3f7;
}

.preview-modal-footer {
    justify-content: flex-start;
    padding-top: 0.45rem;
    padding-bottom: 0.55rem;
    color: rgba(44, 41, 50, 0.56);
    font-size: 0.78rem;
}

.a4-preview {
    position: relative;
    container-type: inline-size;
    width: min(calc((100vh - 180px) * 0.707), 100%);
    aspect-ratio: 210 / 297;
    max-height: calc(100vh - 180px);
    margin: 0 auto;
    background: #ffffff;
    color: #111111;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.preview-content {
    padding: 7.5% 7.5% 0;
}

.preview-content h1 {
    font-family: Roboto, Arial, sans-serif;
    font-size: clamp(0.72rem, 5.6cqw, 1.38rem);
    line-height: 1.05;
    margin: 0 0 2.2%;
}

.preview-text {
    column-count: 3;
    column-gap: 4.2%;
    font-size: clamp(0.34rem, 2.12cqw, 0.52rem);
    line-height: 1.28;
    max-height: 36%;
    overflow: hidden;
    hyphens: auto;
    overflow-wrap: break-word;
}

.preview-text p {
    margin: 0 0 0.62em;
}

.preview-text ul,
.preview-text ol {
    margin: 0 0 0.62em 1.2em;
    padding: 0;
}

.preview-text li {
    margin: 0 0 0.25em;
}

.font-owi {
    font-family: Begatella, Georgia, serif;
}

.font-liwiwi {
    font-family: Officina, Arial, sans-serif;
}

.preview-images {
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 5% 0;
}

.preview-images-after {
    margin: 5% 0 0;
}

.preview-image-frame {
    position: relative;
    padding-right: 1.15em;
}

.preview-images img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin: 0 0 3%;
    object-fit: cover;
}

.preview-image-caption,
.preview-image-source {
    font-size: 0.72em;
    line-height: 1.25;
    color: #333;
}

.preview-image-caption {
    font-weight: 700;
}

.preview-image-source {
    position: absolute;
    right: 0;
    bottom: 0.15em;
    max-height: calc(100% - 0.3em);
    color: #555;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    overflow: hidden;
    text-align: right;
}

.preview-images-wide {
    column-span: all;
    width: 66%;
    margin-right: auto;
}

.preview-ad {
    position: absolute;
    right: 7.5%;
    top: 45%;
    width: 38%;
    height: 28%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}

.preview-ad.with-content {
    width: 46%;
    height: 24%;
}

.preview-ad.is-wide {
    left: 0;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 100%;
    height: 24%;
}

.preview-ad.is-tall {
    top: 0;
    right: 0;
    bottom: auto;
    width: 29%;
    height: 100%;
    max-height: none;
}

.preview-ad.only-ad.is-full {
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
}

.preview-ad.only-ad.is-format-sized {
    top: auto;
    left: auto;
    right: var(--preview-ad-right, 7.5%);
    bottom: var(--preview-ad-bottom, 7.5%);
    width: var(--preview-ad-width, 38%);
    height: var(--preview-ad-height, 28%);
    max-height: none;
}

.ad-layout-tall .preview-content {
    width: 71%;
    padding-right: 4.5%;
}

.ad-layout-tall .preview-text {
    column-count: 2;
    max-height: 62%;
}

.ad-layout-wide .preview-content {
    padding-bottom: 0;
}

.ad-layout-wide .preview-text {
    max-height: 38%;
}

.preview-ad img,
.preview-ad object,
.preview-ad iframe,
.preview-ad canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 0;
    background: #fff;
}

.preview-ad.is-tall img,
.preview-ad.is-tall object,
.preview-ad.is-tall iframe,
.preview-ad.is-tall canvas {
    height: 100%;
}

.preview-ad.is-wide img,
.preview-ad.is-wide object,
.preview-ad.is-wide iframe,
.preview-ad.is-wide canvas {
    width: 100%;
    height: 100%;
}

.preview-ad.is-full img,
.preview-ad.is-full object,
.preview-ad.is-full iframe,
.preview-ad.is-full canvas,
.preview-ad.is-format-sized img,
.preview-ad.is-format-sized object,
.preview-ad.is-format-sized iframe,
.preview-ad.is-format-sized canvas {
    width: 100%;
    height: 100%;
}

.char-counter {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.done-icon {
    display: inline-flex;
    width: 4.4rem;
    height: 4.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 129, 199, 0.14);
    color: var(--brand);
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

@media (max-width: 767.98px) {
    .page-shell {
        padding: 16px 0 34px;
    }

    .brand-logo {
        height: 2.8rem;
    }

    .hero-advisor {
        max-width: calc(100% - 8rem);
        font-size: 0.82rem;
    }

    .hero-advisor-label {
        font-size: 0.72rem;
    }

    .hero-advisor-name {
        font-size: 0.92rem;
    }

    .hero-advisor-links {
        align-items: flex-end;
    }

    .portal-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .booking-grid,
    .previous-grid {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .glass-card,
    .glass-alert {
        border-radius: 18px;
    }
}
