:root {
  --ink: #18261d;
  --muted: #637468;
  --line: rgba(24,38,29,.13);
  --paper: #ffffff;
  --canvas: #f5f7f1;
  --green: #0b1410;
  --green-2: #4e7d12;
  --green-soft: rgba(196,255,77,.22);
  --gold: #c4ff4d;
  --danger: #a63c32;
  --shadow: 0 18px 55px rgba(23, 40, 34, 0.09);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Manrope", sans-serif; letter-spacing: -0.035em; }

.eyebrow {
  margin: 0 0 7px;
  color: var(--green-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Manrope", sans-serif;
  font-weight: 750;
  letter-spacing: -0.025em;
}
.brand-lockup--light { color: white; }
.brand-lockup em { color: var(--green-2); font-style: normal; }
.brand-lockup--light em { color: var(--gold); }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.brand-mark--property-media { border: 0; border-radius: 9px; color: var(--green); background: linear-gradient(135deg, var(--gold), #f2eddc); font-size: 11px; font-weight: 850; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(420px, 0.95fr);
}
.login-visual {
  position: relative;
  min-height: 100vh;
  padding: 44px 54px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(145deg, rgba(11, 20, 16, 0.96), rgba(24, 49, 30, 0.78)),
    url("https://images.unsplash.com/photo-1600566753086-00f18fb6b3ea?auto=format&fit=crop&w=1600&q=80") center/cover;
}
.login-visual::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -110px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255,255,255,.035), 0 0 0 140px rgba(255,255,255,.025);
}
.login-copy {
  position: absolute;
  z-index: 1;
  left: 54px;
  bottom: 120px;
  max-width: 600px;
}
.login-copy .eyebrow { color: var(--gold); }
.login-copy h1 { margin-bottom: 25px; font-size: clamp(52px, 6vw, 88px); line-height: .98; }
.login-copy > p:last-child { max-width: 540px; margin: 0; color: rgba(255,255,255,.8); font-size: 18px; line-height: 1.65; }
.login-note { position: absolute; left: 54px; bottom: 42px; color: rgba(255,255,255,.58); font-size: 13px; }
.login-panel { display: grid; place-items: center; padding: 48px; background: #fafbf9; }
.login-card { width: min(420px, 100%); }
.login-card h2 { margin-bottom: 9px; font-size: 38px; }
.login-card > .muted { margin-bottom: 34px; }
.mobile-brand { display: none; margin-bottom: 44px; }
.agency-brand-logo { flex: 0 0 auto; width: 64px; height: 64px; padding: 5px; object-fit: contain; border-radius: 5px; background: white; }
.agency-brand-label { display: grid; gap: 3px; }
.agency-brand-label em { font-size: 12px; font-weight: 500; letter-spacing: .03em; }
.studio-login-footer { margin: 24px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.studio-login-footer a { color: inherit; text-underline-offset: 3px; }
.studio-capability-notice { display: flex; flex-wrap: wrap; gap: 5px 16px; margin: 0 0 24px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 12px; line-height: 1.6; }
.studio-capability-notice span { color: var(--muted); }
.is-agency-branded { --ink: #36302a; --muted: #73695f; --line: rgba(54,48,42,.14); --canvas: #f6f3ec; }
.is-agency-branded .login-visual {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--green) 98%, transparent), color-mix(in srgb, var(--green) 84%, transparent)),
    url("https://images.unsplash.com/photo-1600566753086-00f18fb6b3ea?auto=format&fit=crop&w=1600&q=80") center/cover;
}
.is-agency-branded .login-visual .agency-brand-logo { width: 106px; height: 106px; padding: 7px; }
.is-agency-branded .login-visual .agency-brand-label { font-size: 20px; }
.is-agency-branded .login-panel { background: var(--canvas); }
.is-agency-branded .login-copy { right: 44px; }
.is-agency-branded .login-copy h1 { font-size: clamp(44px, 4.7vw, 76px); line-height: 1.07; }
.is-agency-branded .login-card h2 { font-size: 32px; line-height: 1.2; }
.is-agency-branded .mobile-brand { display: inline-flex; margin-bottom: 36px; }
.is-agency-branded .topbar .agency-brand-logo { width: 46px; height: 46px; }
.is-agency-branded .button--primary:hover { background: color-mix(in srgb, var(--gold) 80%, white); }
.is-agency-branded .field input:focus, .is-agency-branded .field select:focus, .is-agency-branded .field textarea:focus { box-shadow: 0 0 0 3px var(--green-soft); }
.is-agency-branded .media-watermark { padding: 4px; border-radius: 3px; background: rgba(255,255,255,.92); opacity: .94; }
.is-agency-branded .media-watermark > img { width: 44px; height: 44px; max-height: none; object-fit: contain; }
.video-unavailable .studio-tool-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.video-unavailable [data-tool-panel="video"], .video-unavailable [data-tool="video"] { display: none !important; }
.video-unavailable .motion-select { display: none; }
.video-unavailable .photo-controls { grid-template-columns: minmax(0, 1fr) auto; }

.field { display: grid; gap: 9px; margin-bottom: 18px; }
.field > span { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid #cfd6d2;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: white;
  transition: border .18s, box-shadow .18s;
}
.field textarea { min-height: 80px; padding-top: 12px; padding-bottom: 12px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(30,91,78,.1); }
.form-error { min-height: 20px; margin: 0 0 12px; color: var(--danger); font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.button {
  min-height: 43px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .15s, background .15s, border .15s, opacity .15s;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button--primary { color: var(--green); background: var(--gold); }
.button--primary:hover { background: #d5ff7c; }
.button--secondary { border-color: #ccd5d1; background: white; }
.button--secondary:hover { border-color: #9eb0a8; }
.button--ghost { background: transparent; }
.button--wide { width: 100%; min-height: 52px; }
.text-button { padding: 4px; border: 0; cursor: pointer; color: var(--muted); background: transparent; }

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
}
.topbar .brand-lockup { color: var(--green); }
.topbar .brand-lockup em { color: var(--green-2); }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; color: #466259; font-size: 12px; font-weight: 700; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #2ea46e; box-shadow: 0 0 0 4px #dff3e9; }

.workspace { display: grid; min-height: calc(100vh - 72px); grid-template-columns: 286px 1fr; }
.property-rail { min-width: 0; padding: 27px 18px; border-right: 1px solid var(--line); background: #fafbf9; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 18px; }
.rail-heading h2 { margin: 0; font-size: 22px; }
.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 22px;
  background: white;
}
.property-list { display: grid; min-width: 0; gap: 7px; }
.property-item {
  min-width: 0;
  width: 100%;
  padding: 13px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  background: transparent;
}
.property-item:hover { background: #f0f3f0; }
.property-item.is-active { border-color: #cbd8d2; background: var(--green-soft); }
.property-item strong { display: block; width: 100%; margin-bottom: 5px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.property-item span { color: var(--muted); font-size: 11px; }
.rail-empty { display: grid; gap: 5px; padding: 25px 10px; color: var(--muted); font-size: 12px; }

.main-canvas { min-width: 0; padding: 35px clamp(25px, 4vw, 68px) 70px; }
.welcome-state { display: grid; min-height: calc(100vh - 180px); place-items: center; align-content: center; text-align: center; }
.welcome-icon { display: grid; width: 66px; height: 66px; place-items: center; margin-bottom: 25px; border-radius: 50%; color: white; background: var(--green); font-size: 32px; }
.welcome-state h1 { max-width: 640px; margin: 0 0 18px; font-size: clamp(34px, 4vw, 54px); }
.welcome-state > p:not(.eyebrow) { max-width: 610px; margin: 0 0 30px; color: var(--muted); line-height: 1.65; }

.project-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 29px; }
.breadcrumb { display: flex; gap: 8px; margin-bottom: 10px; color: #84908b; font-size: 12px; }
.breadcrumb b { font-weight: 400; }
.project-header h1 { margin: 0 0 12px; font-size: clamp(31px, 3.6vw, 49px); }
.project-facts { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.project-facts i { width: 3px; height: 3px; border-radius: 50%; background: #a8b1ad; }
.project-actions { display: flex; flex: 0 0 auto; gap: 9px; }

.studio-tool-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 25px; }
.studio-tool-nav button { display: grid; min-width: 0; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; text-align: left; background: white; }
.studio-tool-nav button > span { grid-row: 1 / 3; display: grid; width: 38px; height: 38px; place-items: center; align-self: center; border-radius: 9px; color: var(--green); background: var(--green-soft); font-size: 17px; }
.studio-tool-nav b { align-self: end; font-size: 13px; }
.studio-tool-nav small { align-self: start; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.studio-tool-nav button.is-active { border-color: var(--green); color: white; background: var(--green); box-shadow: 0 10px 25px rgba(18,60,52,.16); }
.studio-tool-nav button.is-active > span { color: var(--green); background: white; }
.studio-tool-nav button.is-active small { color: rgba(255,255,255,.72); }

.preset-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 25px;
  padding: 21px 23px;
  border: 1px solid #cddbd5;
  border-radius: 12px;
  background: linear-gradient(105deg, #edf4f1, #f8faf9);
}
.preset-symbol { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 25px; }
.preset-copy h3 { margin: 0 0 5px; font-size: 17px; }
.preset-copy p:last-child { margin: 0; color: #617069; font-size: 12px; line-height: 1.5; }
.status-chip { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.status-chip--ready { color: #1a674c; background: #d9eee4; }
.status-chip--queued { color: #855c13; background: #f5e9cf; }
.example-link { color: var(--green); font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.example-link:hover { text-decoration: underline; }

.video-builder-panel { padding: 28px; }
.video-type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.video-type-card {
  position: relative;
  min-height: 150px;
  padding: 16px;
  border: 1px solid #d9dfdc;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  background: #fbfcfb;
  transition: border .16s, background .16s, transform .16s;
}
.video-type-card:hover { border-color: #a9bab2; transform: translateY(-1px); }
.video-type-card.is-selected { border-color: var(--green-2); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green-2); }
.video-type-card strong { display: block; margin: 30px 0 7px; font-family: "Manrope", sans-serif; font-size: 13px; line-height: 1.25; }
.video-type-card small { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; }
.video-type-tag { position: absolute; top: 13px; left: 13px; padding: 4px 7px; border-radius: 999px; color: #496158; background: #edf1ef; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.video-type-card.is-selected .video-type-tag { color: white; background: var(--green); }
.director-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 30px 0 15px; padding-top: 25px; border-top: 1px solid var(--line); }
.director-heading h3 { margin: 0; font-size: 19px; }
.director-heading > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.video-control-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.video-control-grid .field { margin-bottom: 0; }
.format-and-audio { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, .8fr); gap: 20px; margin-top: 22px; }
.format-control > span { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.format-toggle { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 9px; background: #edf1ef; }
.format-toggle button { min-height: 42px; border: 0; border-radius: 7px; cursor: pointer; color: #65716c; background: transparent; font-size: 11px; font-weight: 800; }
.format-toggle button.is-active { color: white; background: var(--green); box-shadow: 0 4px 12px rgba(18,60,52,.16); }
.audio-control .field { margin: 0; }
.music-library-note { color: var(--muted); font-size: 9px; font-weight: 600; line-height: 1.35; }
.music-preview-controls { display: flex; align-items: center; gap: 9px; margin-top: 9px; }
.music-preview-button { min-height: 36px; padding: 0 13px; border: 1px solid #9eb9ae; border-radius: 8px; cursor: pointer; color: var(--green); background: #f8fbf9; font-size: 10px; font-weight: 800; }
.music-preview-button:hover { color: white; background: var(--green); }
.music-preview-button:disabled { cursor: not-allowed; opacity: .5; }
.music-preview-controls > span { color: var(--muted); font-size: 9px; font-weight: 700; }
.studio-toggles { display: flex; flex-wrap: wrap; gap: 18px 25px; margin-top: 20px; padding: 17px 0; border-top: 1px solid var(--line); }
.studio-toggles label { display: flex; align-items: center; gap: 9px; cursor: pointer; color: #44524c; font-size: 11px; font-weight: 650; }
.studio-toggles input { position: absolute; opacity: 0; pointer-events: none; }
.studio-toggles label > span { position: relative; width: 34px; height: 19px; border-radius: 999px; background: #cbd3cf; transition: background .18s; }
.studio-toggles label > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: white; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.studio-toggles input:checked + span { background: var(--green-2); }
.studio-toggles input:checked + span::after { transform: translateX(15px); }
.truth-strip { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 3px; color: #6c7772; font-size: 10px; }
.truth-strip b, .truth-strip span { padding: 6px 9px; border-radius: 6px; background: #f0f3f1; }
.truth-strip b { color: #285046; }
.render-video-bar { position: sticky; z-index: 5; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 27px; padding: 18px 20px; border: 1px solid #b9cec5; border-radius: 13px; background: rgba(249,252,250,.96); box-shadow: 0 12px 32px rgba(18,60,52,.16); backdrop-filter: blur(12px); }
.render-video-bar .eyebrow { margin-bottom: 3px; }
.render-video-bar strong { display: block; margin-bottom: 4px; font-family: "Manrope", sans-serif; font-size: 15px; }
.render-video-bar span { color: var(--muted); font-size: 10px; }
.render-selected-video-button { min-width: 210px; min-height: 50px; font-size: 12px; }

.student-reel-editor { margin-top: 28px; padding: 24px; border: 1px solid #c9d9d2; border-radius: 13px; background: linear-gradient(140deg, #f7faf8, #edf4f1); }
.student-reel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.student-reel-heading h3 { margin: 0 0 7px; font-size: 23px; }
.student-reel-heading p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.portrait-spec { flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; color: white; background: var(--green); font-size: 10px; font-weight: 800; }
.student-reel-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 30px; align-items: start; }
.social-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.social-room-picker { margin: 2px 0 20px; padding: 16px; border: 1px solid #d4dfda; border-radius: 10px; background: rgba(255,255,255,.65); }
.social-room-picker legend { padding: 0 7px; font-size: 13px; font-weight: 800; }
.social-room-picker > p { margin: 0 0 13px; color: var(--muted); font-size: 11px; }
.social-room-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.social-room-choice input { position: absolute; opacity: 0; pointer-events: none; }
.social-room-choice span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #cad6d0; border-radius: 999px; cursor: pointer; color: #50605a; background: white; font-size: 10px; font-weight: 800; }
.social-room-choice small { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 50%; background: #edf2ef; font-size: 9px; }
.social-room-choice input:checked + span { border-color: var(--green); color: white; background: var(--green); }
.social-room-choice input:checked + span small { color: var(--green); background: white; }
.social-caption-editor { margin-bottom: 20px; border: 1px solid #d4dfda; border-radius: 10px; background: rgba(255,255,255,.72); }
.social-caption-editor summary { padding: 15px 17px; cursor: pointer; font-size: 13px; font-weight: 800; }
.social-caption-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding: 0 17px 4px; }
.social-caption-grid .field > span { font-size: 10px; }
.social-caption-grid .field input, .social-caption-grid .field select { min-height: 43px; }
.social-branding-grid { padding-top: 2px; }
.logo-upload-field input { padding-top: 11px; font-size: 11px; }
.social-safe-toggle { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; color: #46554f; font-size: 11px; font-weight: 750; }
.social-preview-column { position: sticky; top: 92px; }
.social-preview-column > p { margin: 12px auto 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.social-phone-preview { position: relative; width: 230px; aspect-ratio: 9 / 16; margin: auto; overflow: hidden; border: 7px solid #12231e; border-radius: 27px; background: #dcebe4; box-shadow: 0 18px 45px rgba(18,60,52,.18); }
.social-phone-preview > img { position: absolute; top: 9.896%; left: 0; width: 100%; height: 65.625%; object-fit: cover; object-position: center; border-top: 1px solid #cba66c; border-bottom: 1px solid #cba66c; background: #dcebe4; }
.safe-area-guide { position: absolute; z-index: 2; top: 12.8%; right: 16%; bottom: 17%; left: 7.5%; border: 1px dashed rgba(255,255,255,.75); border-radius: 8px; pointer-events: none; }
.safe-area-guide span { position: absolute; top: 5px; left: 6px; padding: 3px 5px; border-radius: 4px; color: white; background: rgba(0,0,0,.44); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.social-phone-preview.hide-safe-area .safe-area-guide { display: none; }
.preview-caption { position: absolute; z-index: 3; right: 18%; bottom: 29%; left: 8%; animation: caption-rise .55s ease both; }
.preview-caption strong { display: inline; color: white; font-family: "Manrope", sans-serif; font-size: 14px; font-weight: 900; line-height: 1.25; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 2px 3px rgba(0,0,0,.75); }
.preview-controls-mask { position: absolute; z-index: 3; right: 6px; bottom: 18%; color: rgba(255,255,255,.85); font-size: 15px; font-weight: 800; line-height: 2; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
@keyframes caption-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.panel { margin-bottom: 25px; padding: 25px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: 0 3px 15px rgba(23,40,34,.025); }
.panel-heading, .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2, .section-heading h2 { margin: 0; font-size: 22px; }
.panel-hint, .section-heading > p { margin: 0; color: var(--muted); font-size: 12px; }
.sequence-actions { display: flex; align-items: center; justify-content: flex-end; gap: 13px; }
.ai-director-status { display: grid; gap: 3px; text-align: right; }
.ai-director-status strong { color: var(--green); font-size: 11px; }
.ai-director-status span { max-width: 460px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ai-director-status.is-unconfigured strong { color: #855c13; }
.ai-assess-button { white-space: nowrap; }
.sequence-note { margin: -8px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.dropzone {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed #aebcb5;
  border-radius: 11px;
  cursor: pointer;
  color: var(--muted);
  background: #f8faf8;
  transition: background .18s, border .18s;
}
.dropzone:hover, .dropzone.is-dragging { border-color: var(--green-2); background: #eff5f2; }
.dropzone strong { color: var(--ink); font-size: 15px; }
.dropzone span:last-child { font-size: 12px; }
.upload-icon { display: grid; width: 37px; height: 37px; place-items: center; margin-bottom: 3px; border: 1px solid #cad5d0; border-radius: 50%; color: var(--green-2); font-size: 20px; background: white; }
.upload-progress { margin-top: 17px; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e8edea; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green-2); transition: width .2s; }

.photo-workspace { margin: 34px 0; }
.room-groups { display: grid; gap: 20px; }
.room-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
.room-group-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; border-bottom: 1px solid var(--line); background: #fafbf9; }
.room-group-heading strong { font-family: "Manrope", sans-serif; font-size: 14px; }
.room-group-heading span { color: var(--muted); font-size: 11px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1px; background: var(--line); }
.photo-card { min-width: 0; background: white; }
.photo-preview { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #e7ece9; }
.photo-preview > img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.media-watermark { position: absolute; z-index: 1; right: 10px; top: 10px; display: inline-flex; max-width: calc(100% - 20px); align-items: center; gap: 5px; padding: 2px; opacity: .64; color: #0b1410; font-size: 9px; font-weight: 800; letter-spacing: .015em; line-height: 1.2; text-shadow: 0 0 2px rgba(255,255,255,1), 0 0 5px rgba(255,255,255,.96); pointer-events: none; }
.media-watermark > img { width: 82px; height: auto; max-height: 22px; flex: 0 0 auto; object-fit: contain; border-radius: 0; }
.media-watermark > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-preview .media-watermark { right: 9px; }
.photo-card:hover .photo-preview > img { transform: scale(1.025); }
.photo-index { position: absolute; top: 10px; left: 10px; display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: white; background: rgba(15,33,28,.76); font-size: 10px; font-weight: 800; backdrop-filter: blur(6px); }
.ai-photo-badges { position: absolute; right: 9px; bottom: 9px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.ai-badge { padding: 5px 7px; border-radius: 999px; color: white; background: rgba(18,60,52,.86); font-size: 9px; font-weight: 800; backdrop-filter: blur(6px); }
.ai-badge--review { background: rgba(151,102,24,.9); }
.ai-badge--duplicate { background: rgba(132,64,54,.9); }
.photo-info { padding: 13px; }
.photo-name { display: block; margin-bottom: 10px; overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.photo-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 7px; }

.listing-gallery { margin: 24px 0 34px; }
.listing-gallery-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 24px; border: 1px solid #cddbd5; border-radius: 14px; background: linear-gradient(135deg, #fff 0%, #edf5f1 100%); }
.listing-gallery-hero h2 { margin: 0 0 8px; }
.listing-gallery-hero p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.listing-gallery-hero > strong { flex: 0 0 auto; padding: 9px 12px; border-radius: 999px; color: var(--green); background: #fff; font-size: 11px; box-shadow: 0 4px 14px rgba(18,60,52,.08); }
.listing-gallery-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.listing-gallery-select-all { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; }
.listing-gallery-toolbar > strong { color: var(--muted); font-size: 11px; }
.listing-gallery-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.listing-gallery-download-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border: 1px solid #ccd5d1; border-radius: 8px; background: #f8faf9; }
.listing-gallery-download-choice span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.listing-gallery-download-choice select { min-width: 126px; height: 30px; border: 0; color: var(--ink); background: transparent; font-size: 10px; font-weight: 800; }
.button--danger { color: #fff; border-color: #a63c32; background: #a63c32; }
.button--danger:hover { background: #8f3028; }
.listing-gallery-share-result { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.5fr) auto; align-items: center; gap: 12px; margin-bottom: 16px; padding: 16px; border: 1px solid #a8c7b9; border-radius: 12px; background: #edf5f1; }
.listing-gallery-share-result > div:first-child { display: grid; gap: 3px; }
.listing-gallery-share-result strong { color: var(--green); font-size: 12px; }
.listing-gallery-share-result span { color: var(--muted); font-size: 10px; }
.listing-gallery-share-result input { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid #b9cbc3; border-radius: 8px; color: var(--ink); background: #fff; font-size: 11px; }
.listing-gallery-share-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.listing-gallery-share-history { display: grid; gap: 7px; margin-bottom: 16px; }
.listing-gallery-share-history-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.72); }
.listing-gallery-share-history-row span { color: var(--muted); font-size: 10px; }
.listing-gallery-share-history-row .button { margin-left: auto; min-height: 32px; padding: 0 10px; font-size: 9px; }
.listing-gallery-empty { display: grid; gap: 5px; padding: 50px 24px; border: 1px dashed #bdcbc5; border-radius: 13px; color: var(--muted); text-align: center; background: rgba(255,255,255,.66); }
.listing-gallery-empty strong { color: var(--ink); font-family: "Manrope", sans-serif; }
.listing-gallery-empty span { font-size: 12px; }
.listing-gallery-groups { display: grid; gap: 20px; }
.listing-gallery-room { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.listing-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1px; background: var(--line); }
.listing-gallery-card { min-width: 0; background: #fff; }
.listing-gallery-preview { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #e7ece9; }
.listing-gallery-preview > img { width: 100%; height: 100%; object-fit: cover; }
.listing-gallery-select { position: absolute; z-index: 2; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px; color: #fff; background: rgba(18,60,52,.9); font-size: 9px; font-weight: 800; cursor: pointer; }
.listing-gallery-select input { margin: 0; accent-color: #f2c66d; }
.listing-gallery-card.is-selected { box-shadow: inset 0 0 0 3px #d4a84f; }
.listing-gallery-badges { position: absolute; right: 10px; bottom: 10px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.listing-gallery-badges span { padding: 5px 8px; border-radius: 999px; color: #1d2b26; background: rgba(242,198,109,.94); font-size: 9px; font-weight: 800; }
.listing-gallery-badges .listing-gallery-status { color: #fff; background: rgba(134,91,20,.92); }
.listing-gallery-badges .listing-gallery-status--approved { background: rgba(18,60,52,.92); }
.listing-gallery-badges .listing-gallery-status--rejected { background: rgba(166,60,50,.92); }
.listing-gallery-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; }
.listing-gallery-info > div { display: grid; min-width: 0; gap: 3px; }
.listing-gallery-info strong { font-size: 12px; }
.listing-gallery-info small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.listing-gallery-info .button { flex: 0 0 auto; min-height: 36px; padding: 0 12px; font-size: 10px; }
.room-select { min-width: 0; height: 36px; padding: 0 9px; border: 1px solid #d5dcd8; border-radius: 7px; color: #34413c; background: white; font-size: 11px; }
.motion-select { min-width: 0; height: 36px; padding: 0 7px; border: 1px solid #d5dcd8; border-radius: 7px; color: #34413c; background: white; font-size: 10px; }
.delete-photo { width: 36px; height: 36px; border: 1px solid #ead9d6; border-radius: 7px; cursor: pointer; color: #a34d43; background: #fffafa; }

.video-photo-selector { margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.video-photo-selector-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.video-photo-selector-heading h3 { margin: 0 0 7px; font-size: 20px; }
.video-photo-selector-heading p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.video-photo-selector-heading > strong { flex: 0 0 auto; padding: 9px 12px; border-radius: 999px; color: var(--green); background: #edf5f1; font-size: 11px; }
.video-photo-selection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 12px; }
.video-photo-choice { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; transition: border-color .18s, opacity .18s, box-shadow .18s; }
.video-photo-choice.is-included { border-color: #aacabe; box-shadow: 0 4px 15px rgba(17,58,50,.06); }
.video-photo-choice.is-excluded { opacity: .56; }
.video-photo-choice.uses-enhanced { border-color: #b79555; }
.video-photo-choice-preview { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e7ece9; }
.video-photo-choice-preview > img { width: 100%; height: 100%; object-fit: cover; }
.video-photo-choice-preview > .video-photo-version { position: absolute; right: 9px; bottom: 9px; padding: 5px 8px; border-radius: 999px; color: #fff; background: rgba(17,58,50,.9); font-size: 9px; font-weight: 800; }
.video-photo-choice.uses-enhanced .video-photo-choice-preview > .video-photo-version { color: #1b2a25; background: rgba(242,198,109,.94); }
.video-photo-choice-body { display: grid; gap: 9px; padding: 13px; }
.video-photo-include { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; }
.video-photo-choice-body > small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.video-photo-choice-body .field { gap: 5px; }
.video-photo-choice-body .field select { height: 38px; font-size: 11px; }
.video-photo-choice-body > em { color: #86661f; font-size: 9px; font-style: normal; line-height: 1.4; }

.jobs-panel { margin-top: 31px; }
.job-list { display: grid; gap: 9px; }
.job-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; }
.job-row--completed { padding: 16px; border-color: #bfd4ca; background: #fbfdfc; }
.job-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 8px; color: white; background: var(--green); }
.job-copy strong { display: block; margin-bottom: 4px; font-size: 13px; }
.job-copy span { color: var(--muted); font-size: 11px; }
.job-progress { grid-column: 2 / -1; display: grid; gap: 7px; }
.job-progress-track { overflow: hidden; height: 6px; border-radius: 999px; background: #e5ece8; }
.job-progress-track i { position: relative; display: block; overflow: hidden; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #5c9987); transition: width .35s ease; }
.job-progress-track i::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent); transform: translateX(-100%); animation: render-progress-shimmer 1.45s linear infinite; }
.job-progress small { color: var(--muted); font-size: 10px; }
.completed-video-actions { grid-column: 2 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 13px; border-top: 1px solid var(--line); }
.video-action-link { color: var(--green); font-size: 11px; font-weight: 800; text-decoration: none; }
.video-action-link:hover { text-decoration: underline; }
.download-mp4-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 21px; text-decoration: none; }
.small-empty { padding: 20px 0 4px; color: var(--muted); font-size: 12px; text-align: center; }
.render-video-bar.is-rendering { border-color: #a8cabb; background: #f0f7f3; }
.render-video-bar.is-rendering .render-selected-video-button:disabled { color: #f4fbf8; background: #4e7e70; opacity: 1; cursor: progress; }
@keyframes render-progress-shimmer { to { transform: translateX(100%); } }

.gpt-image-editor { display: grid; gap: 22px; }
.image-editor-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; padding: 28px; border-radius: 15px; color: white; background: linear-gradient(125deg, #113a32, #1f6253); box-shadow: 0 14px 38px rgba(18,60,52,.16); }
.image-editor-hero .eyebrow { color: #ddc69d; }
.image-editor-hero h2 { margin: 0 0 9px; font-size: 27px; }
.image-editor-hero p:last-child { max-width: 690px; margin: 0; color: rgba(255,255,255,.76); font-size: 12px; line-height: 1.6; }
.editor-model-status { flex: 0 0 auto; padding: 8px 11px; border: 1px solid rgba(255,255,255,.23); border-radius: 999px; color: #e7f5ef; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 800; }
.editor-model-status.is-unconfigured { color: #ffe2a8; }
.editor-upload-row { display: grid; grid-template-columns: 1fr auto; align-items: stretch; gap: 12px; }
.editor-dropzone { display: grid; min-height: 92px; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; align-content: center; align-items: center; gap: 2px 11px; padding: 16px 20px; border: 1px dashed #aebcb5; border-radius: 12px; cursor: pointer; background: white; }
.editor-dropzone:hover, .editor-dropzone.is-dragging { border-color: var(--green-2); background: var(--green-soft); }
.editor-dropzone > span { grid-row: 1 / 3; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: white; background: var(--green); }
.editor-dropzone b { align-self: end; font-size: 13px; }
.editor-dropzone small { align-self: start; color: var(--muted); font-size: 10px; }
.editor-batch-summary { display: grid; min-width: 190px; place-content: center; padding: 15px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: right; }
.editor-batch-summary b { font-size: 14px; }
.editor-batch-summary span { color: var(--muted); font-size: 10px; }
.editor-workbench { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 20px; align-items: start; }
.editor-source-panel, .editor-controls-panel, .editor-result-panel, .editor-history-panel { padding: 24px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 3px 15px rgba(23,40,34,.025); }
.editor-source-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.editor-source-heading h3, .editor-section-heading h3 { margin: 0; font-size: 20px; }
.select-all-toggle { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 750; }
.editor-thumbnail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 9px; }
.editor-thumbnail { min-width: 0; overflow: hidden; border: 1px solid #dbe1de; border-radius: 9px; background: #fafbf9; }
.editor-thumbnail.is-active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(30,91,78,.12); }
.editor-thumbnail.is-selected { background: var(--green-soft); }
.editor-thumbnail-preview { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #e8ecea; }
.editor-thumbnail-preview img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.editor-thumbnail > label { display: grid; min-width: 0; grid-template-columns: auto 1fr; gap: 2px 7px; padding: 9px; cursor: pointer; }
.editor-thumbnail > label input { grid-row: 1 / 3; align-self: center; }
.editor-thumbnail > label span { overflow: hidden; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.editor-thumbnail > label small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.editor-photo-status { position: absolute; right: 6px; bottom: 6px; padding: 4px 6px; border-radius: 999px; color: white; background: rgba(18,60,52,.88); font-size: 8px; font-weight: 800; }
.editor-photo-status--failed { background: rgba(153,58,48,.9); }
.editor-photo-status--processing, .editor-photo-status--queued { background: rgba(134,91,20,.9); }
.editor-section-heading { margin-bottom: 18px; }
.editor-setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.editing-safeguards { margin: 2px 0 19px; border: 1px solid #d8e1dd; border-radius: 9px; background: #f6f9f7; }
.editing-safeguards summary { padding: 12px 14px; cursor: pointer; color: var(--green); font-size: 11px; font-weight: 800; }
.editing-safeguards p { margin: 0; padding: 0 14px 14px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.editor-cost-estimate { display: grid; gap: 6px; margin: 0 0 17px; padding: 14px; border: 1px solid #d7c39b; border-radius: 10px; background: #fffaf0; }
.editor-cost-estimate > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.editor-cost-estimate span { color: #6f572d; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.editor-cost-estimate strong { color: var(--green); font-size: 20px; }
.editor-cost-estimate p { margin: 0; color: #4c514d; font-size: 11px; line-height: 1.45; }
.editor-cost-estimate small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.editor-cost-estimate a { width: fit-content; color: var(--green); font-size: 9px; font-weight: 800; text-decoration: none; }
.editor-cost-estimate a:hover { text-decoration: underline; }
.editor-generate-actions, .editor-result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-progress { margin-top: 17px; }
.editor-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.editor-result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.before-after-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 18px; }
.before-after-grid figure { min-width: 0; margin: 0; }
.before-after-grid figcaption { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.before-after-grid figcaption b { font-size: 12px; }
.before-after-grid figcaption span { color: var(--muted); font-size: 9px; }
.comparison-image { position: relative; display: grid; min-height: 280px; overflow: hidden; place-items: center; border-radius: 10px; background: #edf1ef; }
.comparison-image > img { display: block; width: 100%; height: 100%; max-height: 620px; object-fit: contain; }
.comparison-image--edited { background: #13221d; }
.comparison-image .media-watermark { top: auto; bottom: 10px; }
.comparison-image > img[hidden] + .media-watermark { display: none; }
.comparison-placeholder { max-width: 250px; padding: 25px; color: rgba(255,255,255,.66); font-size: 11px; line-height: 1.5; text-align: center; }
.editor-result-actions .button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.edit-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 10px; }
.edit-history-card { display: grid; min-width: 0; grid-template-columns: 86px minmax(0, 1fr); gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
.edit-history-card.is-active { border-color: var(--green); background: var(--green-soft); }
.history-preview { display: grid; width: 86px; height: 75px; overflow: hidden; place-items: center; padding: 0; border: 0; border-radius: 7px; cursor: pointer; color: var(--muted); background: #e5ebe8; }
.history-preview img { width: 100%; height: 100%; object-fit: cover; }
.history-copy { min-width: 0; }
.history-copy strong, .history-copy span, .history-copy small { display: block; }
.history-copy strong { overflow: hidden; margin-bottom: 4px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-copy span { color: var(--muted); font-size: 8px; line-height: 1.45; }
.history-state { margin-top: 5px; color: var(--green); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.history-state--failed, .history-state--rejected { color: var(--danger); }
.history-copy p { margin: 5px 0 0; color: var(--danger); font-size: 8px; line-height: 1.4; }
.history-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 7px; padding-top: 7px; border-top: 1px solid var(--line); }
.history-actions button { padding: 3px 5px; border: 0; cursor: pointer; color: var(--muted); background: transparent; font-size: 8px; font-weight: 800; }
.history-actions button:last-child { color: var(--danger); }

.photo-preview > img, .listing-gallery-preview > img, .editor-thumbnail-preview img, .comparison-image > img, .history-preview img { cursor: zoom-in; }
.image-viewer { width: min(96vw, 1800px); max-width: none; height: 94vh; max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 14px; color: #fff; background: #101713; box-shadow: 0 28px 90px rgba(0,0,0,.48); }
.image-viewer::backdrop { background: rgba(5,11,8,.86); backdrop-filter: blur(5px); }
.image-viewer-toolbar { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 14px 10px 20px; border-bottom: 1px solid rgba(255,255,255,.12); background: #16221d; }
.image-viewer-toolbar > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.image-viewer-toolbar > div { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.image-viewer-toolbar .button { min-height: 38px; color: #fff; border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.08); }
.image-viewer-close { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; cursor: pointer; color: #fff; background: rgba(255,255,255,.08); font-size: 26px; }
.image-viewer-stage { display: grid; height: calc(94vh - 62px); overflow: auto; place-items: center; padding: 18px; }
.image-viewer-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.image-viewer-stage img.is-actual-size { width: auto; height: auto; max-width: none; max-height: none; cursor: zoom-out; }

.modal { width: min(560px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 14px; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(12,28,23,.48); backdrop-filter: blur(4px); }
.modal-card { padding: 27px; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 25px; }
.modal-heading h2 { margin: 0; font-size: 27px; }
.modal-close { width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer; color: #6e7a75; background: #f0f3f1; font-size: 23px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 8px; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 390px; padding: 13px 17px; border-radius: 9px; color: white; background: #193d35; box-shadow: 0 14px 35px rgba(0,0,0,.16); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: #8d3b34; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 30px; }
  .mobile-brand { display: inline-flex; }
  .workspace { grid-template-columns: 1fr; }
  .property-rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .property-list { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .project-header { align-items: flex-start; flex-direction: column; }
  .project-actions { width: 100%; }
  .project-actions .button { flex: 1; }
  .video-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-reel-layout { grid-template-columns: 1fr; }
  .social-preview-column { position: static; }
  .video-photo-selector-heading { display: grid; gap: 12px; }
  .video-photo-selector-heading > strong { justify-self: start; }
  .editor-workbench { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { height: 62px; padding: 0 16px; }
  .topbar .brand-mark { width: 32px; height: 32px; }
  .live-pill { display: none; }
  .workspace { min-height: calc(100vh - 62px); }
  .main-canvas { padding: 25px 15px 55px; }
  .property-rail { padding: 18px 10px; }
  .project-header h1 { font-size: 29px; }
  .project-facts { flex-wrap: wrap; }
  .preset-banner { grid-template-columns: auto 1fr; }
  .preset-banner .example-link { grid-column: 1 / -1; }
  .panel { padding: 18px; }
  .panel-heading, .section-heading { align-items: flex-start; flex-direction: column; }
  .sequence-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .ai-director-status { text-align: left; }
  .ai-director-status span { max-width: 100%; white-space: normal; }
  .panel-hint { line-height: 1.45; }
  .photo-grid { grid-template-columns: 1fr; }
  .listing-gallery-hero { display: grid; padding: 18px; }
  .listing-gallery-hero > strong { justify-self: start; }
  .listing-gallery-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .listing-gallery-toolbar-actions { width: 100%; margin-left: 0; }
  .listing-gallery-download-choice { flex: 1 1 100%; justify-content: space-between; }
  .listing-gallery-toolbar-actions .button { flex: 1 1 180px; }
  .listing-gallery-share-result { grid-template-columns: 1fr; }
  .listing-gallery-grid { grid-template-columns: 1fr; }
  .video-photo-selector { padding: 17px; }
  .video-photo-selection-grid { grid-template-columns: 1fr; }
  .video-type-grid, .video-control-grid, .format-and-audio { grid-template-columns: 1fr; }
  .social-field-grid, .social-caption-grid { grid-template-columns: 1fr; }
  .student-reel-editor { padding: 17px; }
  .student-reel-heading { flex-direction: column; }
  .render-video-bar { position: static; align-items: stretch; flex-direction: column; }
  .render-selected-video-button { width: 100%; }
  .format-toggle { grid-template-columns: 1fr; }
  .photo-controls { grid-template-columns: 1fr 1fr auto; }
  .completed-video-actions { grid-column: 1 / -1; align-items: stretch; flex-direction: column; }
  .video-action-link { padding: 8px 2px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .studio-tool-nav, .video-unavailable .studio-tool-nav { grid-template-columns: 1fr; }
  .image-editor-hero { flex-direction: column; }
  .editor-upload-row, .before-after-grid { grid-template-columns: 1fr; }
  .editor-batch-summary { min-width: 0; text-align: left; }
  .editor-setting-grid { grid-template-columns: 1fr; }
  .editor-source-panel, .editor-controls-panel, .editor-result-panel, .editor-history-panel { padding: 17px; }
  .comparison-image { min-height: 220px; }
  .image-viewer { width: 100vw; height: 100vh; border-radius: 0; }
  .image-viewer-toolbar { align-items: flex-start; }
  .image-viewer-toolbar > strong { padding-top: 11px; }
  .image-viewer-toolbar .button { min-width: 0; padding: 0 9px; font-size: 9px; }
  .image-viewer-stage { height: calc(100vh - 62px); padding: 8px; }
}
