/* Mila Studio CMS additions; legacy site styles remain unchanged. */
.about-content { flex: 1 1 340px; line-height: 1.7; white-space: normal; }
.contact-honeypot { position: absolute !important; left: -9999px !important; opacity: 0 !important; }
.form-note { text-align: center; }
.cms-edit-link { display: inline-block; color: #00ffff; margin: 8px; }
#header { padding: 20px 0; }
.owl-carousel .item a { display: block; }
.owl-carousel .item img { height: 270px; object-fit: contain; }
.cms-shell { max-width: 1120px; margin: 30px auto; padding: 16px; }
.cms-shell a { color: #00ffff; }
.cms-panel { padding: 24px; margin: 12px 0 24px; background: #130529; border: 1px solid #643a86; border-radius: 12px; }
.cms-panel input, .cms-panel textarea, .cms-panel select { width: 100%; box-sizing: border-box; background: #280e43; color: #fff; }
.cms-panel label { display: block; margin-bottom: 12px; line-height: 1.4; }
.cms-panel form { max-width: none; display: block; }
.cms-panel button { padding: 10px 18px; }
.cms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; }
.cms-row { display:flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cms-toolbar { display:flex; gap: 18px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.cms-table { width: 100%; border-collapse: collapse; }
.cms-table th, .cms-table td { padding: 10px; border-bottom: 1px solid #48335b; text-align: left; }
.cms-panel .cms-inline { display: inline; }
.cms-panel .cms-inline button { background: #3b1d51; }
@media(max-width:700px) { .cms-shell{padding:10px;} .cms-table{font-size:13px;} .owl-carousel .item img {height:210px;} }

.cms-inline-edit { display:inline; width:auto; margin:0 8px; padding:2px 7px; font-size:13px; background:#41204c; border:1px solid #ff00ff; }
.cms-dialog { width:min(92vw,640px); border:1px solid #ff00ff; border-radius:12px; padding:24px; background:#150b24; color:#fff; box-shadow:0 10px 60px #0009; }
.cms-dialog::backdrop { background:#000b; }
.cms-dialog form { max-width:none; }
.cms-dialog textarea { min-height:180px; }

.about-extra-photo { float:left; max-width:40%; max-height:none !important; height:auto; margin:0 20px 10px 0; border-radius:12px; }
@media (max-width: 600px) { .about-extra-photo { float:none; display:block; max-width:100%; margin:0 auto 16px; } }

/* Reserve slide space so inactive carousels can be initialized on approach. */
.portfolio-slider.owl-carousel:not(.owl-loaded) {
    display: block;
    min-height: 305px;
    overflow: hidden;
}
.portfolio-slider.owl-carousel:not(.owl-loaded) .item { display: none; }
.portfolio-slider.owl-carousel:not(.owl-loaded) .item:first-child {
    display: block;
    height: 285px;
    max-width: 320px;
    margin: 0 auto;
}
.portfolio-slider .item img { max-width: 100%; }
@media (prefers-reduced-motion: reduce) {
    .owl-carousel .item { transition: none !important; transform: none !important; }
}

#scrollToTop[hidden] { display: none !important; }

/* Fixed backgrounds cause expensive repainting on many mobile browsers. */
@media (max-width: 768px) {
    body { background-attachment: scroll !important; }
}


/* Editorial CMS: standalone workspace, intentionally separate from public branding. */
body:has(.cms-app) { background:#0b1020 !important; background-image:none !important; color:#e7eaf4; }
.cms-app, .cms-editor-dialog { --cms-surface:#171e31; --cms-line:#313b56; --cms-ink:#eff2ff; --cms-muted:#a6b0cc; --cms-accent:#8b74fa; color:var(--cms-ink); font-family:system-ui,-apple-system,"Segoe UI",sans-serif; }
.cms-app *, .cms-editor-dialog * { box-sizing:border-box; }
.cms-app { min-height:100vh; display:grid; grid-template-columns:244px minmax(0,1fr); }
.cms-app .cms-sidebar { position:sticky; top:0; height:100vh; display:flex; flex-direction:column; gap:12px; padding:24px 14px; background:#111729; border-right:1px solid var(--cms-line); overflow-y:auto; }
.cms-app .cms-brand { display:flex; align-items:center; gap:12px; padding:8px 10px 22px; font-weight:760; color:#fff; text-decoration:none; line-height:1.2; }
.cms-brand small { font-size:11px; font-weight:450; color:var(--cms-muted); display:block; margin-top:4px; }
.cms-brand-icon { display:inline-grid; place-items:center; background:linear-gradient(145deg,#aa84ff,#6755e8); width:38px; height:38px; border-radius:12px; color:#fff; font-weight:800; font-size:22px; }
.cms-sidebar-label { color:#7e89a6; font-size:11px; font-weight:750; text-transform:uppercase; letter-spacing:1.6px; margin:8px 14px; }
.cms-app nav.cms-nav { display:flex; flex-direction:column; justify-content:flex-start; background:transparent; padding:0; gap:5px; }
.cms-app .cms-nav a { border:0; border-radius:10px; display:flex; gap:12px; width:100%; padding:13px 14px; text-align:left; color:#aeb9d0; background:transparent; box-shadow:none; font-size:14px; align-items:center; transition:background .12s; }
.cms-app .cms-nav a span { flex:1; }
.cms-app .cms-nav a:hover, .cms-app .cms-nav a.is-active { background:#2c304e; color:#fff; }
.cms-app .cms-nav a.is-active { box-shadow:inset 3px 0 #9b7aff; }
.cms-app .cms-nav a small { border-radius:8px; padding:2px 6px; background:#3c4562; }
.cms-side-bottom { margin-top:auto; padding:16px 10px; border-top:1px solid var(--cms-line); display:grid; gap:10px; font-size:13px; }
.cms-side-bottom a { color:#c2c8dc; text-decoration:none; }
.cms-app form { display:initial; max-width:none; margin:0; gap:0; }
.cms-app .cms-text-button { border:0; background:none; color:#aeb9d0; width:auto; padding:0; font-size:13px; text-align:left; }
.cms-workspace { min-width:0; width:100%; max-width:1600px; padding:0 36px 60px; }
.cms-topbar { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px 0 30px; text-align:left; }
.cms-eyebrow { display:block; font-size:12px; color:var(--cms-muted); margin-bottom:7px; }
.cms-topbar h1 { margin:0; font-size:clamp(24px,2.6vw,33px); font-weight:720; }
.cms-top-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.cms-app .cms-button, .cms-editor-dialog .cms-button { display:inline-flex; gap:8px; align-items:center; justify-content:center; border:1px solid #8a79e8; border-radius:9px; background:#7461d9; padding:11px 16px; color:#fff; font:600 13px/1.2 system-ui,sans-serif; text-decoration:none; cursor:pointer; width:auto; }
.cms-app .cms-button:hover, .cms-editor-dialog .cms-button:hover { background:#8b79ed; }
.cms-app .cms-secondary, .cms-editor-dialog .cms-secondary { background:#232d46; border-color:#435171; color:#e7eaf6; }
.cms-app .cms-secondary:hover, .cms-editor-dialog .cms-secondary:hover { background:#36405c; }
.cms-app .cms-button[hidden], .cms-app .cms-screen[hidden], .cms-app [hidden] { display:none !important; }
.cms-app .cms-screen { max-width:none; padding:0; margin:0; }
.cms-section-intro, .cms-section-header p { color:var(--cms-muted); font-size:14px; line-height:1.55; margin:0 0 20px; }
.cms-section-header { display:flex; gap:14px; justify-content:space-between; align-items:center; margin-bottom:20px; }
.cms-section-header p { margin:0; }
.cms-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:20px 0; }
.cms-search-label { flex:1; min-width:190px; }
.cms-filter-label { min-width:210px; }
.cms-app input:not([type="checkbox"]):not([type="file"]), .cms-app select, .cms-app textarea,
.cms-editor-dialog input:not([type="checkbox"]):not([type="file"]), .cms-editor-dialog select, .cms-editor-dialog textarea {
    display:block; width:100%; min-width:0; padding:11px 13px; border-radius:9px; border:1px solid #45506b;
    background:#11192b; color:#f0f2fd; font:14px/1.4 system-ui,sans-serif;
}
.cms-app input:focus, .cms-app textarea:focus, .cms-app select:focus, .cms-editor-dialog input:focus, .cms-editor-dialog textarea:focus {
    outline:2px solid #9a7cff; outline-offset:1px;
}
.cms-app label, .cms-editor-dialog label { display:block; font-size:13px; font-weight:580; color:#d7dcee; margin-bottom:14px; }
.cms-app label input, .cms-app label textarea, .cms-app label select,
.cms-editor-dialog label input, .cms-editor-dialog label textarea, .cms-editor-dialog label select { margin-top:6px; }
.cms-app .cms-muted, .cms-editor-dialog .cms-muted { color:var(--cms-muted); font-size:12px; line-height:1.4; }
.cms-app .cms-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(205px,1fr)); gap:16px; align-items:start; }
.cms-work { position:relative; border:1px solid #35405b; background:#1b2336; border-radius:12px; min-width:0; overflow:hidden; transition:border-color .12s,transform .12s; }
.cms-work:hover { border-color:#8c79de; transform:translateY(-2px); }
.cms-work[hidden] { display:none !important; }
.cms-work.is-dragging { opacity:.35; }
.cms-work.can-sort .cms-drag-handle { cursor:grab; color:#c4b8ff; }
.cms-work-open { display:block; padding:0; border:0; background:none; width:100%; text-align:left; border-radius:0; color:#f4f4ff; }
.cms-work-open:hover { background:transparent; }
.cms-work-image { display:grid; place-items:center; width:100%; aspect-ratio:4/3; background:#101527; overflow:hidden; position:relative; color:#73809d; font-size:12px; }
.cms-work-image img { width:100%; height:100%; object-fit:contain; }
.cms-work-state { position:absolute; top:10px; right:10px; padding:5px 8px; border-radius:6px; color:#ffdbdc; background:#703740d9; font-size:11px; }
.cms-work-label { display:block; padding:13px 12px 4px; font-size:13px; font-weight:640; min-height:41px; overflow-wrap:anywhere; }
.cms-work-foot { display:flex; align-items:center; gap:8px; justify-content:space-between; color:#9ba6c3; padding:4px 12px 13px; font-size:11px; }
.cms-drag-handle { cursor:default; font-size:22px; user-select:none; line-height:20px; }
.cms-empty { color:#bdc5d9; text-align:center; padding:30px; }
.cms-sort-actions { position:sticky; bottom:18px; z-index:3; display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:15px 20px; background:#26304c; border:1px solid #836efa; border-radius:12px; box-shadow:0 12px 32px #0008; margin-top:18px; }
.cms-app .cms-category-list { display:grid; gap:9px; }
.cms-app .cms-category-entry { width:100%; display:flex; gap:18px; align-items:center; justify-content:space-between; background:#1a2235; border:1px solid #34405a; padding:17px 20px; text-align:left; border-radius:10px; }
.cms-category-entry:hover { background:#28344d; }
.cms-category-entry > span:first-child { flex:1; display:grid; gap:5px; }
.cms-category-entry small { font-size:11px; color:#99a6cb; }
.cms-category-entry > span:last-child { color:#b4a8ff; font-size:12px; }
.cms-app .cms-panel { max-width:none; border:1px solid #35405b; background:#192136; border-radius:12px; margin:0 0 18px; padding:25px; }
.cms-app .cms-panel h2, .cms-app .cms-screen h2 { margin:0 0 18px; text-align:left; text-shadow:none; font-size:19px; font-weight:680; }
.cms-app .cms-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
.cms-media-input { display:flex; gap:8px; align-items:stretch; }
.cms-media-input input { flex:1; }
.cms-app .cms-toggle, .cms-editor-dialog .cms-toggle { display:flex; gap:10px; align-items:center; }
.cms-toggle input { width:18px; height:18px; accent-color:#9476f4; }
.cms-app .cms-sticky-save { position:sticky; bottom:10px; display:flex; justify-content:flex-end; padding:16px 0; }
.cms-upload-zone { display:grid; gap:6px; align-items:center; padding:24px; background:#19233a; border:1px dashed #586587; border-radius:12px; max-width:550px; }
.cms-upload-zone small { color:#a6b0cc; }
.cms-app .cms-media-gallery, .cms-editor-dialog .cms-media-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:11px; margin:20px 0; max-height:400px; overflow-y:auto; }
.cms-app .cms-media-tile, .cms-editor-dialog .cms-media-tile { padding:0; border:1px solid #3c4864; border-radius:9px; background:#121c30; min-width:0; overflow:hidden; text-align:left; }
.cms-media-tile img { display:block; width:100%; height:118px; object-fit:contain; background:#10172a; }
.cms-media-tile span { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:10px; color:#b5beda; padding:8px; }
.cms-app .cms-table-wrap { overflow-x:auto; }
.cms-app .cms-table th, .cms-app .cms-table td { border-color:#35415a; text-align:left; color:#d2d9ec; font-size:13px; vertical-align:top; padding:13px; }
.cms-app .cms-table a { color:#b7a4ff; }
.cms-app .cms-notice { color:#c3f7db; background:#183d38; border:1px solid #3e7c6a; padding:12px; border-radius:8px; }
.cms-app .cms-notice-error { color:#ffd1cc; background:#4b292a; border-color:#8b4c51; }
.cms-sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.cms-editor-dialog { background:#151d30; border:1px solid #59658b; border-radius:16px; padding:24px 30px; max-height:min(92vh,1100px); width:min(96vw,850px); overflow-y:auto; color:#f3f4ff; box-shadow:0 30px 110px #000c; }
.cms-editor-dialog::backdrop { background:rgba(7,9,22,.84); backdrop-filter:blur(4px); }
.cms-small-dialog { width:min(96vw,540px); }
.cms-editor-dialog form { display:block; max-width:none; margin:0; }
.cms-modal-head { display:flex; justify-content:space-between; align-items:start; margin-bottom:22px; gap:16px; }
.cms-modal-head h2 { text-shadow:none; text-align:left; margin:4px 0; }
.cms-modal-head small { font-size:12px; color:#a5b1cd; }
.cms-icon-button { border:0; background:#303b52; border-radius:50%; width:34px; height:34px; padding:0; font-size:24px; }
.cms-editor-grid { display:grid; grid-template-columns:40% 1fr; gap:22px; align-items:start; }
.cms-edit-preview { width:100%; min-height:200px; aspect-ratio:4/3; display:grid; place-items:center; background:#101629; border-radius:11px; overflow:hidden; color:#8b96b1; }
.cms-edit-preview img { width:100%; height:100%; object-fit:contain; }
.cms-edit-preview img[hidden], .cms-edit-preview span[hidden] { display:none; }
.cms-dialog-actions { display:flex; justify-content:flex-end; gap:10px; padding-top:18px; border-top:1px solid #3c4560; margin-top:20px; }
@media (max-width:920px) {
    .cms-app { grid-template-columns:1fr; }
    .cms-app .cms-sidebar { position:static; height:auto; padding:14px; }
    .cms-app .cms-nav { flex-direction:row; flex-wrap:wrap; }
    .cms-app .cms-nav a { width:auto; }
    .cms-side-bottom { margin-top:10px; }
    .cms-workspace { padding:0 20px 38px; }
}
@media (max-width:580px) {
    .cms-topbar { flex-direction:column; align-items:stretch; }
    .cms-app .cms-nav a { padding:10px; font-size:12px; }
    .cms-app .cms-form-grid, .cms-editor-grid { grid-template-columns:1fr; }
    .cms-editor-dialog { padding:20px; }
    .cms-app .cms-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .cms-app .cms-category-entry { flex-wrap:wrap; }
}


/* Editing tools only visible to authenticated editors. */
.cms-public-toolbar { position:fixed; inset:auto 18px 18px 18px; z-index:995; width:max-content; max-width:calc(100vw - 36px); display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding:10px 15px; border-radius:12px; border:1px solid #7265bc; background:#15172cf0; backdrop-filter:blur(10px); font:600 12px system-ui; color:#fff; box-shadow:0 12px 35px #000b; }
.cms-public-toolbar a { color:#c8baff; text-decoration:none; }
.cms-section-edit-link { display:block; width:max-content; margin:0 auto 8px; padding:5px 12px; color:#d8c7ff; background:#291c39; border-radius:20px; text-decoration:none; font-size:12px; }
.cms-item-edit-link { display:block; width:max-content; margin:10px auto 0; padding:5px 12px; color:#e2d7ff; background:#45316b; border-radius:8px; text-decoration:none; font-size:12px; }
