@font-face {
  font-family: "Barlow Condensed";
  src: url("BarlowCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alfa Slab One";
  src: url("AlfaSlabOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #17171b;
  --muted: #74747a;
  --paper: #f5f3ef;
  --line: #dedbd5;
  --red: #e60023;
  --red-dark: #b90020;
  --panel: #fffefd;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: "Avenir Next", "Helvetica Neue", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.site-shell { min-height: 100vh; background: radial-gradient(circle at 18% 15%, #fffdf9 0, transparent 32%), var(--paper); }
.site-header { height: 91px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px clamp(24px, 4vw, 72px); border-bottom: 1px solid var(--line); background: rgba(255, 254, 252, .83); }
.brand-mark { width: 118px; height: 63px; display: flex; align-items: center; }
.brand-mark img { display: block; width: 118px; height: auto; }
.brand-mark-light { width: 154px; padding: 8px 11px; border-radius: 10px; background: #142138; }
.brand-mark-light img { width: 100%; max-height: 50px; object-fit: contain; }
.header-label { margin-left: auto; color: #36363a; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 18px; letter-spacing: .08em; }
.header-label span { margin-left: 9px; color: #aaa7a1; font-family: "Avenir Next", sans-serif; font-size: 10px; letter-spacing: .14em; vertical-align: 2px; }
.brand-switch { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #f6f4f0; }
.brand-switch a { padding: 9px 12px; border-radius: 999px; color: #555359; font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand-switch a:hover { color: var(--red-dark); }
.brand-switch a[aria-current="page"] { background: var(--red); color: #fff; }
.brand-switch-mobile { display: none; position: relative; }
.brand-switch-mobile summary { list-style: none; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; background: #fff; color: #3d3c40; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.brand-switch-mobile summary::-webkit-details-marker { display: none; }
.brand-switch-mobile summary::after { content: "⌄"; margin-left: 8px; }
.brand-switch-mobile nav { position: absolute; z-index: 12; top: calc(100% + 8px); right: 0; display: grid; gap: 4px; min-width: 180px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 14px 30px rgba(20, 20, 30, .12); }
.brand-switch-mobile a { border-radius: 7px; padding: 10px 12px; color: var(--ink); font-size: 12px; font-weight: 700; text-decoration: none; }
.brand-switch-mobile a[aria-current="page"] { background: var(--red); color: #fff; }
.logout-button { border: 1px solid var(--line); border-radius: 99px; background: transparent; padding: 10px 16px; color: #504f4e; font-size: 12px; font-weight: 700; }
.logout-button:hover { background: #eeeae3; }
body[data-authenticated="true"]:not([data-brand="wide-logo"]) .site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
body[data-authenticated="true"]:not([data-brand="wide-logo"]) .header-label { display: none; }
body[data-authenticated="true"]:not([data-brand="wide-logo"]) .brand-switch,
body[data-authenticated="true"]:not([data-brand="wide-logo"]) .brand-switch-mobile { grid-column: 2; grid-row: 1; }
body[data-authenticated="true"]:not([data-brand="wide-logo"]) .logout-button { grid-column: 3; grid-row: 1; justify-self: end; }

body[data-brand="inset-logo"] { --red: #238947; --red-dark: #176d39; --paper: #f0f6ef; }
body[data-brand="inset-alt"] { --red: #183e68; --red-dark: #102844; --paper: #f0f3f7; }
body[data-brand="inset-logo"] .reel-logo,
body[data-brand="inset-alt"] .reel-logo { padding: .7%; border-radius: 4px; background: rgba(10, 18, 28, .65); }
body[data-brand="inset-logo"] .image-preview-logo,
body[data-brand="inset-alt"] .image-preview-logo { padding: .7%; border-radius: 4px; background: rgba(10, 18, 28, .65); }

.editor-layout { display: grid; grid-template-areas: "modes modes" "settings preview" "editor preview"; grid-template-columns: minmax(320px, 540px) minmax(320px, 430px); grid-template-rows: min-content min-content 1fr; justify-content: center; column-gap: clamp(24px, 3vw, 42px); row-gap: 0; max-width: 1240px; margin: auto; padding: 52px clamp(24px, 4vw, 64px) 90px; }
.editor-panel { grid-area: editor; min-width: 0; }
.editor-mode-switch { grid-area: modes; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin-bottom: 25px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.editor-mode-switch button { display: inline-flex; align-items: center; flex: none; white-space: nowrap; gap: 7px; border: 1px solid #ddd6d0; border-radius: 8px; background: #fff; padding: 10px 16px; color: #59545a; font-size: 13px; font-weight: 800; cursor: pointer; }
.editor-mode-switch button.is-active { border-color: var(--red); background: var(--red); color: #fff; }
.editor-mode-switch svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.editor-mode-switch small { margin-left: 4px; opacity: .7; }
.photo-url-row { display: flex; gap: 6px; margin-top: 8px; }
.photo-url-row input { flex: 1; min-width: 0; border: 1px solid #cfcac3; border-radius: 7px; padding: 9px; font-size: 11px; }
.photo-url-row button { flex: none; border: 0; border-radius: 7px; background: var(--ink); padding: 9px 11px; color: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.photo-url-row button:disabled { opacity: .55; }
.photo-url-row select { flex: none; max-width: 96px; border: 1px solid #cfcac3; border-radius: 7px; padding: 7px; background: #fff; font-size: 11px; }
.photo-url-message { min-height: 1.2em; margin: 4px 0 0; color: #7d777a; font-size: 10px; }
.image-title-settings { display: grid; gap: 13px; margin: 18px 0; }
.image-title-settings label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 800; }
.image-title-settings input[type=range] { flex: 1; accent-color: var(--red); }
.image-title-settings select { border: 1px solid #ccc; border-radius: 6px; padding: 7px; background: #fff; }
.trim-limit-control { display: flex; align-items: center; gap: 5px; flex: none; }
.trim-limit-control span { border-radius: 5px; background: #fff0f2; padding: 6px 8px; color: var(--red-dark); font-size: 9px; font-weight: 900; letter-spacing: .05em; white-space: nowrap; }
.trim-limit-control button { width: 27px; height: 27px; border: 1px solid var(--red); border-radius: 6px; background: #fff; color: var(--red); font-size: 19px; font-weight: 700; line-height: 1; cursor: pointer; }
.trim-limit-control button:disabled { opacity: .35; cursor: default; }
.image-preview { grid-area: preview; position: sticky; top: 16px; align-self: start; width: 100%; max-width: 430px; min-width: 0; }
.image-preview-stage { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 12px; align-items: start; }
.image-preview-frame { position: relative; overflow: hidden; width: 100%; aspect-ratio: 4 / 5; container-type: inline-size; background-color: #242129; background-position: center; background-size: cover; box-shadow: 0 24px 70px rgba(23,17,20,.17); }
.carousel-preview-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 70px 8px 0; color: var(--ink); font-size: 12px; font-weight: 800; }
.carousel-preview-nav button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font-size: 25px; line-height: 1; cursor: pointer; }
.carousel-preview-nav button:disabled { opacity: .35; cursor: default; }
.carousel-thumbnails { display: flex; gap: 7px; overflow-x: auto; margin-right: 70px; padding: 4px 2px 9px; scrollbar-width: thin; }
.carousel-thumbnail { flex: 0 0 45px; height: 57px; overflow: hidden; border: 2px solid transparent; border-radius: 6px; background: #e5e1dc; padding: 0; cursor: pointer; }
.carousel-thumbnail.is-active { border-color: var(--red); }
.carousel-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.carousel-file-list { display: grid; gap: 7px; margin-top: 10px; }
.carousel-file-row { display: flex; align-items: center; gap: 8px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 6px 8px; }
.carousel-file-row img { width: 35px; height: 43px; flex: none; border-radius: 4px; object-fit: cover; }
.carousel-file-row span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.carousel-file-row button { flex: none; border: 0; border-radius: 5px; background: #f1eeeb; padding: 7px 8px; color: var(--ink); font-size: 11px; font-weight: 800; cursor: pointer; }
.carousel-file-row button:disabled { opacity: .4; cursor: default; }
.image-preview-main, .image-preview-photo { position: absolute; background-position: center; background-size: cover; background-repeat: no-repeat; }
.image-preview-main { inset: 0; }
.image-preview-photo { left: 0; right: 0; }
.image-preview-photo-top { top: 0; }
.image-preview-photo-bottom { bottom: 0; }
.image-preview-top, .image-preview-bottom { position: absolute; inset-inline: 0; pointer-events: none; }
.image-preview-top { top: 0; height: 29%; background: linear-gradient(to bottom, var(--image-top-color, #09080d), transparent); opacity: 0; }
.image-preview-bottom { bottom: 0; height: 48.8889%; background: linear-gradient(to top, var(--image-bottom-color, #000000), transparent); opacity: .6; }
.image-preview-logo { position: absolute; z-index: 2; top: 7%; right: 5%; width: 22%; height: auto; }
.image-preview-title { position: absolute; z-index: 2; bottom: 6%; left: 6.7%; right: 6%; color: #fff; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 6cqw; line-height: 1.12; white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: 0 2px 4px rgba(20,0,0,.3); }
body[data-brand="studio"] .image-preview-title,
body[data-brand="inset-logo"] .image-preview-title,
body[data-brand="inset-alt"] .image-preview-title { font-family: "Alfa Slab One", serif; font-weight: 400; }
.image-settings-rail .tool-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.collage-preview { grid-area: preview; position: sticky; top: 16px; align-self: start; width: 100%; max-width: 430px; min-width: 0; }
.collage-preview-frame { position: relative; overflow: hidden; width: 100%; aspect-ratio: 4 / 5; container-type: inline-size; background: #fff; box-shadow: 0 24px 70px rgba(23,17,20,.17); touch-action: none; }
.collage-gradient { position: absolute; z-index: 1; left: 0; right: 0; pointer-events: none; }
.collage-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; color: #777; text-align: center; font-size: 13px; }
.collage-cell { position: absolute; overflow: hidden; background-repeat: no-repeat; cursor: grab; touch-action: none; }
.collage-cell.is-dragging { cursor: grabbing; filter: brightness(.8); }
.collage-cell.is-drop-target { outline: 3px solid var(--red); outline-offset: -3px; }
.collage-cell-number { position: absolute; left: 8px; top: 8px; border-radius: 50%; background: rgba(0,0,0,.62); color: white; width: 22px; height: 22px; display: grid; place-items: center; font-size: 11px; font-weight: 800; pointer-events: none; }
.collage-zoom { position: absolute; z-index: 12; right: 7px; top: 7px; display: flex; gap: 4px; }
.collage-zoom button { width: 24px; height: 24px; border: 0; border-radius: 5px; background: rgba(0,0,0,.65); color: white; font-size: 17px; cursor: pointer; }
.collage-divider { position: absolute; z-index: 5; touch-action: none; }
.collage-divider::before { content: ''; position: absolute; background: rgba(255,255,255,.95); box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.collage-divider::after { content: '⋮'; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; }
.collage-divider.is-vertical { width: 22px; transform: translateX(-50%); cursor: col-resize; }
.collage-divider.is-vertical::before { width: 2px; top: 0; bottom: 0; left: 10px; }
.collage-divider.is-horizontal { height: 22px; transform: translateY(-50%); cursor: row-resize; }
.collage-divider.is-horizontal::before { height: 2px; left: 0; right: 0; top: 10px; }
.collage-preview-frame .image-preview-logo, .collage-preview-frame .image-preview-title { pointer-events: none; }
.collage-settings-rail { display: grid; align-content: start; gap: 14px; }
.collage-settings-rail[hidden] { display: none; }
.collage-settings-rail .tool-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.collage-setting { display: grid; gap: 8px; margin: 15px 0; font-size: 12px; font-weight: 800; }
.collage-setting input[type=range] { width: 100%; accent-color: var(--red); }
.collage-colors { display: flex; align-items: center; gap: 10px; }
.collage-colors button { width: 31px; height: 31px; border: 1px solid #bdb8b4; border-radius: 50%; background: var(--swatch); cursor: pointer; }
.collage-colors input[type=color] { width: 38px; height: 32px; border: 0; padding: 0; background: transparent; }
.collage-file-list { display: grid; gap: 7px; margin-top: 12px; }
.collage-file-list:empty { display: none; }
.collage-file-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 7px; background: #fff; }
.collage-file-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.collage-file-item span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.collage-file-item button { border: 0; background: none; color: var(--red-dark); font-size: 12px; font-weight: 800; cursor: pointer; }
.image-focus-group, .image-gradient-group { margin-top: 17px; border-top: 1px solid #eee9e3; padding-top: 13px; }
.image-focus-group > strong { font-size: 12px; }
.image-gradient-group > label { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; }
.image-gradient-colors { display: inline-flex; align-items: center; gap: 8px; margin-top: 9px; }
.image-gradient-colors button { width: 29px; height: 29px; border: 1px solid #bcb5af; border-radius: 50%; background: var(--swatch); }
.image-gradient-colors button.is-active { outline: 2px solid var(--red); outline-offset: 2px; }
.image-gradient-colors label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.image-gradient-colors input[type=color] { width: 33px; height: 29px; border: 0; padding: 0; background: transparent; }
.image-title-align { display: grid; gap: 8px; font-size: 12px; font-weight: 800; }
.image-title-settings { margin-top: 18px; }
.history-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; border-top: 1px solid #eee8e3; padding-top: 11px; }
.history-actions .history-download { margin-top: 0; border-top: 0; padding-top: 0; }
.history-copy { border: 0; background: transparent; color: var(--red-dark); font-size: 11px; font-weight: 900; cursor: pointer; }
.history-copy-options { margin-top: 7px; border: 1px solid #ddd6d0; border-radius: 7px; padding: 8px; font-size: 11px; }
.history-copy-options label { display: grid; gap: 5px; }
.history-copy-options select { width: 100%; min-width: 0; border: 1px solid #ddd; border-radius: 5px; padding: 7px; background: #fff; }
.history-copy-options button { width: 100%; margin-top: 7px; border: 0; border-radius: 5px; padding: 8px; background: var(--ink); color: #fff; font-weight: 800; cursor: pointer; }
.history-copy-options p { margin: 6px 0 0; font-size: 10px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #474448; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(230, 0, 35, .09); }
h1 { margin: 18px 0 6px; font-family: "Barlow Condensed", sans-serif; font-size: clamp(58px, 6vw, 88px); font-weight: 700; letter-spacing: -.035em; line-height: .94; }
h1 em { color: var(--red); font-style: normal; }
.lead { color: #636165; font-size: 15px; line-height: 1.6; margin: 18px 0 37px; }
.field-group { min-width: 0; margin-bottom: 26px; }
.field-label { display: flex; align-items: center; min-height: 24px; gap: 10px; margin-bottom: 11px; font-size: 14px; font-weight: 800; }
.field-number { color: var(--red); font-family: "Barlow Condensed", sans-serif; font-size: 18px; font-weight: 700; letter-spacing: .03em; }
.video-source-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 10px; }
.video-source-choice button { border: 1px solid var(--line); border-radius: 9px; background: var(--panel); padding: 10px 12px; color: #646166; font-size: 12px; font-weight: 800; }
.video-source-choice button.is-active { border-color: var(--red); background: #fff1f3; color: var(--red-dark); }
.video-source-choice button:focus-visible, .video-link-row button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.video-link-field { border: 1px dashed #bcb8b1; border-radius: 15px; background: rgba(255, 255, 255, .74); padding: 17px; }
.video-link-field > label { display: block; margin-bottom: 9px; color: #383438; font-size: 12px; font-weight: 800; }
.video-link-row { display: flex; gap: 8px; }
.video-link-row input { min-width: 0; flex: 1; border: 1px solid #cfcac3; border-radius: 8px; background: #fff; padding: 11px 12px; color: var(--ink); font-size: 12px; outline: none; }
.video-link-row input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(230, 0, 35, .09); }
.video-link-row button { flex: none; border: 0; border-radius: 8px; background: var(--ink); padding: 10px 13px; color: #fff; font-size: 12px; font-weight: 800; }
.video-link-row button:hover { background: var(--red-dark); }
.video-link-row button:disabled { opacity: .6; cursor: wait; }
.video-link-field > p { margin: 10px 0 0; color: #827e81; font-size: 11px; line-height: 1.5; }
.video-link-field .video-link-message { min-height: 16px; color: var(--red-dark); font-weight: 700; }
.required, .optional { margin-left: auto; font-size: 9px; font-weight: 900; letter-spacing: .12em; white-space: nowrap; }
.required { color: var(--red); }
.optional { color: #89878a; }
.dropzone { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; min-height: 50px; padding: 9px 13px; border: 1px dashed #bcb8b1; border-radius: 9px; background: rgba(255, 255, 255, .74); text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--red); background: #fff; transform: translateY(-1px); }
.dropzone input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.drop-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border: 1px solid #c9c5c0; border-radius: 50%; color: var(--red); font-size: 19px; line-height: 1; }
.drop-title { display: block; overflow: hidden; width: 100%; max-width: 320px; color: #242325; font-size: 13px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.drop-note { display: none; }
.trim-panel, .tool-panel { width: min(100%, 430px); margin: 16px 0 22px; border: 1px solid #e6e0d9; border-radius: 14px; background: #fffefd; padding: 19px 22px 17px; box-shadow: 0 9px 30px rgba(23, 17, 20, .035); }
.trim-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.trim-heading strong { font-family: "Barlow Condensed", sans-serif; font-size: 23px; line-height: 1; }
.trim-heading p { margin: 5px 0 0; color: #817c7f; font-size: 11px; }
.trim-heading > span { border-radius: 5px; background: #fff0f2; padding: 6px 8px; color: var(--red-dark); font-size: 9px; font-weight: 900; letter-spacing: .05em; white-space: nowrap; }
.trim-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 22px; }
.trim-metrics > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 1px solid #e9e5e0; padding-bottom: 8px; }
.trim-metrics small { color: #8c8787; font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.trim-metrics strong { color: #242025; font-family: "Barlow Condensed", sans-serif; font-size: 23px; line-height: 1; white-space: nowrap; }
.trim-metrics > div:last-child strong { color: var(--red); }
.trim-track { position: relative; height: 52px; margin-inline: 13px; border-radius: 5px; background: repeating-linear-gradient(90deg, transparent 0 24px, rgba(255,255,255,.075) 24px 27px), linear-gradient(135deg, #333035, #545057 52%, #252227); touch-action: none; }
.trim-selection { position: absolute; top: 0; bottom: 0; border-block: 2px solid var(--red); background: rgba(230, 0, 35, .23); pointer-events: none; }
.trim-playhead { position: absolute; z-index: 1; top: -4px; bottom: -4px; width: 2px; background: #fff; box-shadow: 0 0 0 1px #201d20; pointer-events: none; }
.trim-handle { position: absolute; z-index: 2; top: -5px; display: grid; place-items: center; width: 25px; height: 62px; transform: translateX(-50%); border: 2px solid var(--red); border-radius: 5px; background: #fff; box-shadow: 0 3px 9px rgba(23,17,20,.19); cursor: ew-resize; touch-action: none; }
.trim-handle span { width: 5px; height: 22px; border-left: 1px solid var(--red); border-right: 1px solid var(--red); }
.trim-handle:focus-visible { outline: 3px solid #1f1d21; outline-offset: 3px; }
.trim-time-labels { display: flex; justify-content: space-between; margin: 15px 1px 0; color: #625e62; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.media-options { margin: -8px 0 24px; }
.media-options-toolbar { display: flex; gap: 9px; }
.media-options-toolbar button { position: relative; display: grid; place-items: center; width: 46px; height: 46px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); cursor: pointer; }
.media-options-toolbar button:hover, .media-options-toolbar button.is-active { border-color: var(--red); color: var(--red-dark); background: #fff5f5; }
.media-options-toolbar button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.media-options-toolbar svg { width: 22px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.media-options-toolbar .option-band { fill: currentColor; stroke: none; }
.option-symbol { font-size: 24px; line-height: 1; }
.option-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.media-option-panel { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.media-option-panel[hidden] { display: none; }
.media-option-panel > .field-group { margin: 0; }
.media-option-panel .logo-choice { margin: 0; }
.media-option-panel .rv-music { margin: 0; border: 0; background: transparent; }
.media-option-panel .rv-music > summary { display: none; }
.media-option-panel .rv-music__body { padding: 0; }
.dropzone-small { min-height: 50px; }
.photo-picker { position: relative; }
.remove-photo { position: absolute; z-index: 2; right: 10px; bottom: 10px; border: 1px solid #e4c7cb; border-radius: 7px; background: #fff; padding: 6px 9px; color: var(--red-dark); font-size: 10px; font-weight: 800; }
.remove-photo:hover { background: #fff1f3; }
textarea, .login-panel input[type="password"], #voiceDuration { width: 100%; border: 1px solid #cfcac3; outline: none; border-radius: 13px; background: #fffefd; padding: 17px 18px; color: var(--ink); }
  #voiceDuration:focus-visible { outline: 2px solid var(--accent, #b62129); outline-offset: 2px; }
textarea { resize: vertical; min-height: 98px; line-height: 1.5; }
textarea:focus, .login-panel input[type="password"]:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(230, 0, 35, .09); }
textarea::placeholder, input::placeholder { color: #aaa7a4; }
.field-helper { display: flex; justify-content: space-between; gap: 20px; margin-top: 9px; color: #9b9896; font-size: 11px; }
.title-controls { display: grid; gap: 14px; margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px; }
.tool-panel .title-controls { border: 0; background: transparent; padding: 0; }
.title-control-row { display: grid; grid-template-columns: 94px minmax(0, 1fr); align-items: center; gap: 12px; color: #565159; font-size: 12px; font-weight: 800; }
.title-color-choices, .title-align-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.title-color-button, .title-align-choices button, .title-custom-color { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 10px; color: var(--ink); font-size: 11px; font-weight: 800; }
.title-color-button.is-active, .title-align-choices button.is-active { border-color: var(--red); background: #fff1f3; color: var(--red-dark); }
.title-color-button:focus-visible, .title-align-choices button:focus-visible, .title-custom-color:focus-within { outline: 3px solid var(--red); outline-offset: 2px; }
.title-color-dot { width: 14px; height: 14px; border: 1px solid #b9b4b6; border-radius: 50%; }
.title-color-dot.white { background: #fff; }
.title-color-dot.black { background: #000; }
.title-custom-color { cursor: pointer; }
.title-custom-color input { width: 20px; height: 20px; border: 0; background: none; padding: 0; cursor: pointer; }
.title-size-row { grid-template-columns: 94px minmax(0, 1fr) 44px; }
.title-size-row input { width: 100%; min-width: 0; accent-color: var(--red); }
.title-size-row output { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.logo-choice { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 3px 0 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 13px 14px 14px; }
.logo-choice legend { padding: 0 6px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.logo-choice label { position: relative; flex: 1 1 170px; cursor: pointer; }
.logo-choice input { position: absolute; opacity: 0; }
.logo-choice span { display: flex; align-items: center; gap: 10px; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--ink); font-size: 12px; font-weight: 800; }
.logo-choice span::before { content: ""; width: 15px; height: 15px; flex: none; border: 1.5px solid #9b9896; border-radius: 50%; background: #fff; }
.logo-choice input:checked + span { border-color: var(--red); background: #fff5f5; color: var(--red-dark); }
.logo-choice input:checked + span::before { border-color: var(--red); box-shadow: inset 0 0 0 4px #fff; background: var(--red); }
.logo-choice input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.primary-button { display: flex; width: 100%; min-height: 57px; align-items: center; justify-content: space-between; gap: 16px; border: none; border-radius: 12px; background: var(--red); padding: 14px 20px; color: #fff; font-family: "Barlow Condensed", sans-serif; font-size: 23px; font-weight: 700; letter-spacing: .01em; text-align: left; transition: background .18s, transform .18s; }
.primary-button:hover { background: var(--red-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .68; transform: none; }
.primary-button span { font-family: sans-serif; font-size: 20px; }
.form-message { min-height: 17px; margin: 11px 0 0; color: var(--red-dark); font-size: 12px; line-height: 1.4; }
.retention-note { color: #9b9896; font-size: 11px; margin: 18px 0 0; }
.job-panel { display: flex; align-items: center; gap: 15px; margin-top: 18px; border: 1px solid #f2d4d9; border-radius: 13px; background: #fffafa; padding: 16px; }
.job-panel strong { display: block; font-size: 13px; }
.job-panel p { margin: 4px 0 0; color: #7f7778; font-size: 11px; line-height: 1.4; }
.job-pulse { width: 11px; height: 11px; flex: none; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 6px rgba(230, 0, 35, .1); animation: pulse 1.6s ease-in-out infinite; }
.job-panel.is-done .job-pulse { background: #169b6b; box-shadow: 0 0 0 6px rgba(22, 155, 107, .12); animation: none; }
.job-panel.is-error .job-pulse { animation: none; }
.download-button { margin-left: auto; flex: none; border-radius: 8px; background: var(--ink); padding: 11px 14px; color: white; font-size: 11px; font-weight: 800; text-decoration: none; }

.preview-column { display: contents; }
.preview-main { grid-area: preview; position: sticky; top: 16px; align-self: start; min-width: 0; width: 100%; max-width: min(430px, calc((100dvh - 135px) * .5625 + 70px)); }
.settings-rail { grid-area: settings; min-width: 0; width: 100%; margin-bottom: 18px; }
.settings-rail .trim-panel, .settings-rail .tool-panel { width: 100%; margin: 0; padding: 18px; }
.preview-header, .preview-foot { display: flex; justify-content: space-between; gap: 18px; color: #656369; font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.preview-header { margin: 2px 0 13px; }
.preview-header span:last-child { color: #aaa8a6; letter-spacing: .07em; }
.preview-stage { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 12px; width: 100%; align-items: start; }
.preview-frame { position: relative; overflow: hidden; width: 100%; aspect-ratio: 9 / 16; container-type: inline-size; isolation: isolate; background: #201b1f; box-shadow: 0 24px 70px rgba(23, 17, 20, .17); }
.preview-tools { display: flex; flex-direction: column; gap: 9px; }
.tool-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 57px; border: 1px solid #dcd6d1; border-radius: 10px; background: #fffefd; color: #292529; font-size: 10px; font-weight: 800; }
.tool-button:hover, .tool-button.is-active { border-color: var(--red); background: #fff1f3; color: var(--red-dark); }
.tool-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool-button:focus-visible, .player-controls button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.player-controls { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 13px; border: 1px solid #e5dfda; border-radius: 10px; background: #fffefd; padding: 7px 10px; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.player-controls button { flex: none; width: 29px; height: 29px; border: 0; border-radius: 6px; background: #272328; color: #fff; font-size: 13px; }
.player-controls #muteToggle { display: grid; place-items: center; background: #f1ece8; color: #383238; }
.player-controls #muteToggle.is-muted { color: var(--red-dark); }
.player-controls #muteToggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.player-controls #muteToggle .sound-slash, .player-controls #muteToggle.is-muted .sound-wave { display: none; }
.player-controls #muteToggle.is-muted .sound-slash { display: initial; }
.player-controls input { flex: 1; min-width: 0; accent-color: var(--red); }
.crop-fields { display: grid; gap: 13px; margin: 20px 0 15px; }
.crop-fields label { display: grid; grid-template-columns: 1fr auto; gap: 6px; color: #383438; font-size: 11px; font-weight: 800; }
.crop-fields output { color: var(--red-dark); font-variant-numeric: tabular-nums; }
.crop-fields input { grid-column: 1 / -1; width: 100%; accent-color: var(--red); }
.subtle-button { border: 1px solid #ded8d3; border-radius: 7px; background: #fff; padding: 8px 11px; color: #504b4f; font-size: 11px; font-weight: 800; }
.crop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crop-apply-button { border: 1px solid var(--red); border-radius: 7px; background: var(--red); padding: 9px 13px; color: #fff; font-size: 11px; font-weight: 900; }
.crop-apply-button:disabled { opacity: .5; cursor: not-allowed; }
.gradient-fields { display: grid; gap: 17px; margin-top: 18px; }
.gradient-field { border-top: 1px solid #eee9e3; padding-top: 13px; }
.gradient-field > label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.gradient-field input[type="checkbox"] { accent-color: var(--red); }
.color-presets { display: flex; align-items: center; gap: 9px; margin: 12px 0 0 4px; }
.color-preset { width: 28px; height: 28px; border: 1px solid #bcb5af; border-radius: 50%; background: var(--swatch); }
.color-preset.is-selected { outline: 2px solid var(--red); outline-offset: 3px; }
.custom-color { display: flex; align-items: center; gap: 5px; margin-left: auto; color: #726c70; font-size: 10px; font-weight: 800; }
.custom-color input { width: 32px; height: 28px; border: 0; padding: 0; background: transparent; cursor: pointer; }
.opacity-control { display: grid !important; grid-template-columns: 1fr auto; gap: 6px; margin-top: 15px; color: #383438; font-size: 11px !important; }
.opacity-control output { color: var(--red-dark); font-variant-numeric: tabular-nums; }
.opacity-control input { grid-column: 1 / -1; width: 100%; accent-color: var(--red); }
.area-switch, .aspect-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.area-switch button { border: 1px solid #ddd6d0; border-radius: 8px; background: #fff; padding: 9px; color: #696368; font-size: 11px; font-weight: 800; }
.area-switch button.is-active, .aspect-presets button.is-active { border-color: var(--red); background: #fff1f3; color: var(--red-dark); }
.aspect-presets { margin-top: 9px; }
.aspect-presets button { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 1px solid #ddd6d0; border-radius: 8px; background: #fff; padding: 8px 2px; color: #696368; font-size: 11px; font-weight: 800; }
.aspect-presets small { color: #989096; font-size: 9px; }
.direction-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; color: #383438; font-size: 11px; font-weight: 800; }
.direction-buttons { display: flex; gap: 7px; }
.direction-buttons button { display: grid; place-items: center; width: 38px; height: 34px; border: 1px solid #ded8d3; border-radius: 7px; background: #fff; color: #514950; font-size: 21px; line-height: 1; }
.direction-buttons button.is-active { border-color: var(--red); background: #fff1f3; color: var(--red-dark); }
.photo-fields { margin-top: 18px; }
.tool-hint { color: #827b7f; font-size: 11px; line-height: 1.4; }
.crop-subheading { margin-top: 22px; border-top: 1px solid #eee9e3; padding-top: 16px; color: #9a9095; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.background-presets { margin-top: 19px; }
.background-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.background-upload span { min-width: 100%; color: #817a7d; font-size: 11px; overflow-wrap: anywhere; }
.reel-top, .reel-video, .reel-bottom { position: absolute; left: 0; width: 100%; overflow: hidden; background: #231e21; }
.reel-top { z-index: 2; top: 0; height: 35.9375%; background-position: center; background-size: cover; }
.is-layout-editing .reel-top, .is-layout-editing .reel-bottom { cursor: move; touch-action: none; }
.reel-video { z-index: 1; top: 35.9375%; height: 31.7708%; background: #121011; }
.video-source { position: absolute; inset: 0; }
.has-video .reel-video { background: transparent; cursor: grab; touch-action: none; }
.has-video .reel-video:active { cursor: grabbing; }
.reel-video:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }
.reel-video video { width: 100%; height: 100%; display: block; object-fit: cover; background: #121011; pointer-events: none; }
.reel-video img#voicePreviewPhoto { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.reel-video video[hidden], .reel-video img[hidden] { display: none; }
.reel-top[hidden], .reel-bottom[hidden] { display: none; }
.voice-scene-context { margin: 12px 0; padding: 10px 12px; border-left: 3px solid var(--red); background: var(--panel); color: var(--ink); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.voice-scenes { display: grid; gap: 10px; margin-top: 12px; }
.voice-scene { padding: 12px; border: 1px solid #e8e0db; border-radius: 8px; min-width: 0; }
.voice-scene-select { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px; text-align: left; background: transparent; border: 0; }
.voice-scene-select[aria-pressed="true"] { outline: 2px solid var(--red); outline-offset: 2px; }
.voice-scene-select img, .voice-scene-select video { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.voice-scene-select span { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.voice-scene-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; align-items: center; }
.voice-scene-fields label { display: grid; gap: 6px; font-size: 11px; }
.voice-scene-fields input { width: 100%; min-width: 0; }
.voice-scene-fields .voice-scene-title { grid-column: 1 / -1; }
.voice-scene-title textarea { width: 100%; min-width: 0; min-height: 66px; resize: vertical; }
.voice-scene-actions { display: flex; gap: 8px; margin-top: 10px; }
.voice-scene-actions button, .voice-timeline button { border: 1px solid #e8e0db; background: #fff; border-radius: 5px; min-height: 32px; padding: 5px 10px; cursor: pointer; }
.voice-audio-settings { margin-bottom: 20px; }
.voice-audio-settings summary { cursor: pointer; font-weight: 700; }
.voice-audio-settings select { width: 100%; padding: 9px; border: 1px solid #e8e0db; border-radius: 6px; }
.voice-result { border: 1px solid #e8e0db; border-radius: 8px; padding: 14px; margin-bottom: 18px; background: #fff; }
.voice-result video { width: 100%; max-height: 500px; display: block; background: #151515; }
.voice-timeline { display: flex; gap: 3px; margin-top: 12px; overflow-x: auto; }
.voice-timeline button { flex-basis: 0; min-width: 65px; font-size: 10px; font-variant-numeric: tabular-nums; }
.voice-result p { font-size: 12px; line-height: 1.5; }
.voice-result[hidden], #voiceFields[hidden], #singleVideoFields[hidden] { display: none; }
.reel-bottom { z-index: 2; top: 67.7083%; height: 32.2917%; background-position: center; background-size: cover; }
.has-video:not(.has-bottom) .reel-bottom { display: none; }
.media-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .23); font-family: "Barlow Condensed", sans-serif; font-size: 20px; letter-spacing: .18em; }
.is-vertical .reel-top { display: none; }
.is-vertical.has-top .reel-top { display: block; }
.is-vertical .reel-video video { object-fit: cover; }
.reel-shade-top, .reel-shade-bottom { position: absolute; left: 0; width: 100%; z-index: 3; pointer-events: none; }
.reel-shade-top { top: 0; height: 35.9375%; }
.reel-shade-bottom { top: 60.9375%; height: 39.0625%; }
.photo-guide { position: absolute; z-index: 5; border: 2px dashed #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.7), inset 0 0 0 1px rgba(0,0,0,.45); pointer-events: none; }
.video-guide { position: absolute; z-index: 6; border: 2px dashed #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.8), inset 0 0 0 1px rgba(0,0,0,.45); cursor: move; touch-action: none; }
.video-guide span { position: absolute; top: 4px; left: 4px; border-radius: 3px; background: rgba(0,0,0,.7); padding: 3px 5px; color: #fff; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.video-guide-handle { position: absolute; right: -3px; bottom: -3px; width: 24px; height: 24px; border: 2px solid #fff; border-radius: 4px; background: var(--red); box-shadow: 0 1px 5px rgba(0,0,0,.55); cursor: nwse-resize; }
.crop-guide { position: absolute; z-index: 8; border: 2px dashed #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.8), inset 0 0 0 1px rgba(0,0,0,.45); cursor: move; touch-action: none; }
.crop-guide span { position: absolute; top: 5px; left: 5px; border-radius: 3px; background: rgba(0,0,0,.74); padding: 3px 5px; color: #fff; font-size: 8px; font-weight: 900; letter-spacing: .06em; white-space: nowrap; }
.crop-guide-handle { position: absolute; width: 26px; height: 26px; padding: 0; border: 2px solid #fff; border-radius: 3px; background: #e02032; box-shadow: 0 1px 5px rgba(0,0,0,.55); transform: translate(-50%, -50%); touch-action: none; }
.crop-guide-handle:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.crop-guide-handle[data-crop-resize="nw"] { left: 0; top: 0; cursor: nwse-resize; }
.crop-guide-handle[data-crop-resize="n"] { left: 50%; top: 0; cursor: ns-resize; }
.crop-guide-handle[data-crop-resize="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.crop-guide-handle[data-crop-resize="e"] { left: 100%; top: 50%; cursor: ew-resize; }
.crop-guide-handle[data-crop-resize="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
.crop-guide-handle[data-crop-resize="s"] { left: 50%; top: 100%; cursor: ns-resize; }
.crop-guide-handle[data-crop-resize="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.crop-guide-handle[data-crop-resize="w"] { left: 0; top: 50%; cursor: ew-resize; }
.content-description { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; margin: 10px 0 0; }
.job-panel { flex-wrap: wrap; }
.job-panel .content-description { flex-basis: 100%; width: 100%; }
.crop-guide:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.crop-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 17px 0 12px; }
.crop-metrics span { display: flex; justify-content: space-between; gap: 4px; border: 1px solid #eee9e3; border-radius: 7px; padding: 9px; color: #797176; font-size: 10px; }
.crop-metrics strong { color: var(--red-dark); font-variant-numeric: tabular-nums; }
.crop-fine-tune { margin-top: 16px; border-top: 1px solid #eee9e3; padding-top: 13px; }
.crop-fine-tune summary { color: var(--red-dark); font-size: 11px; font-weight: 800; cursor: pointer; }
.crop-fine-tune .crop-fields { margin: 15px 0 4px; }
.area-divider { position: absolute; z-index: 7; left: 0; width: 100%; height: 22px; transform: translateY(-50%); cursor: ns-resize; touch-action: none; }
.area-divider::before { content: ""; position: absolute; top: 10px; left: 0; right: 0; border-top: 2px dashed #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.8)); }
.divider-grip { position: absolute; right: 0; top: 1px; width: 25px; height: 20px; background: var(--red); clip-path: polygon(0 50%, 100% 0, 100% 100%); filter: drop-shadow(0 1px 3px #000); }
.area-divider:focus-visible { outline: 3px solid #fff; }
.reel-logo { position: absolute; z-index: 4; top: 6.7%; right: 5.2%; width: 21.3%; height: auto; pointer-events: none; }
.reel-title { position: absolute; z-index: 4; top: 69.4%; left: 6.7%; right: 6%; color: #fff; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 6cqw; line-height: 1.12; white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: 0 2px 4px rgba(20, 0, 0, .25); pointer-events: none; }
body[data-brand="studio"] .reel-title,
body[data-brand="inset-logo"] .reel-title,
body[data-brand="inset-alt"] .reel-title { font-family: "Alfa Slab One", serif; font-weight: 400; }
.preview-foot { margin-top: 13px; font-size: 9px; letter-spacing: .08em; font-weight: 600; }
.history-section { max-width: 1540px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 80px) 100px; }
.history-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 32px 0 25px; }
.history-heading h2 { margin: 9px 0 0; color: var(--ink); font-family: "Barlow Condensed", sans-serif; font-size: clamp(32px, 3vw, 43px); line-height: 1; }
.history-heading p { margin: 0 0 4px; color: #8e898d; font-size: 11px; }
.history-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.history-empty { grid-column: 1 / -1; margin: 0; border: 1px dashed #d8d2ce; border-radius: 11px; padding: 32px; color: #817b7e; font-size: 13px; text-align: center; }
.history-card { min-width: 0; overflow: hidden; border: 1px solid #e6e0d9; border-radius: 11px; background: #fffefd; box-shadow: 0 7px 20px rgba(23, 17, 20, .035); }
.history-poster { position: relative; overflow: hidden; height: clamp(190px, 22vw, 280px); background: #242024; }
.history-poster img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.history-poster-fallback { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; font-family: "Barlow Condensed", sans-serif; font-size: 24px; font-weight: 800; letter-spacing: .12em; }
.history-duration { position: absolute; right: 10px; bottom: 10px; border-radius: 4px; background: rgba(19, 16, 18, .84); padding: 5px 7px; color: #fff; font-size: 10px; font-weight: 800; }
.history-card-body { display: flex; flex-direction: column; gap: 12px; min-height: 154px; padding: 15px; }
.history-card h3 { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin: 0; color: #242025; font-size: 13px; font-weight: 800; line-height: 1.35; }
.history-card time { color: #938d90; font-size: 10px; }
.history-download { display: flex; align-items: center; justify-content: space-between; margin-top: auto; border-top: 1px solid #eee8e3; padding-top: 11px; color: var(--red-dark); font-size: 11px; font-weight: 900; text-decoration: none; }
.history-download:hover { color: var(--ink); }
.preview-foot span:first-child { color: #333; font-weight: 800; letter-spacing: .1em; }
.preview-foot i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--red); vertical-align: 1px; }

.login-layout { display: grid; grid-template-columns: minmax(420px, 1fr) 400px; align-items: center; gap: 70px; min-height: calc(100vh - 91px); max-width: 1280px; margin: auto; padding: 60px; }
.login-copy h1 { font-size: clamp(74px, 9vw, 122px); }
.login-copy p { max-width: 460px; color: #6d696a; line-height: 1.6; }
.login-panel { padding: 36px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 24px 65px rgba(23, 17, 20, .06); }
.panel-index { color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.login-panel h2 { margin: 14px 0 26px; font-family: "Barlow Condensed", sans-serif; font-size: 38px; line-height: 1; }
.login-panel label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 800; }
.login-panel .primary-button { margin-top: 16px; }

@keyframes pulse { 50% { box-shadow: 0 0 0 11px rgba(230, 0, 35, .02); } }
@media (max-width: 1080px) {
  .history-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .editor-layout { grid-template-columns: minmax(280px, 1fr) minmax(300px, 390px); column-gap: 24px; padding-inline: 24px; }
  .photo-row { grid-template-columns: 1fr; gap: 0; }
  .field-label { font-size: 12px; }
  .optional, .required { font-size: 8px; }
}
@media (max-width: 780px) {
  .history-section { padding-inline: 20px; }
  .history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .history-poster { height: clamp(210px, 48vw, 300px); }
  .site-header { height: 77px; gap: 9px; padding-inline: 20px; }
  .brand-mark, .brand-mark img { width: 100px; }
  .brand-mark-light { width: 104px; padding: 6px; }
  .brand-mark-light img { width: 100%; max-height: 54px; }
  .brand-switch { display: none; }
  .brand-switch-mobile { display: block; margin-left: 0; }
  .header-label { display: none; }
  .editor-layout, .login-layout { display: flex; flex-direction: column; align-items: stretch; padding: 34px 20px 70px; gap: 38px; }
  .editor-mode-switch { margin-bottom: -14px; }
  h1 { font-size: clamp(60px, 14vw, 78px); }
  .lead { margin-bottom: 30px; }
  .preview-column { display: flex; flex-direction: column; align-items: center; width: 100%; }
  .preview-main { position: static; width: min(100%, 430px); max-width: 430px; }
  .image-preview { position: static; width: min(100%, 430px); max-width: 430px; }
  .collage-preview { position: static; width: min(100%, 430px); max-width: 430px; }
  .settings-rail { width: min(100%, 430px); margin: 0; }
  .settings-rail .trim-panel, .settings-rail .tool-panel { margin-top: 16px; }
  .preview-stage, .player-controls { margin-inline: auto; }
  .preview-header, .preview-foot { max-width: 430px; margin-inline: auto; }
  .login-layout { min-height: auto; }
  .login-copy h1 { font-size: clamp(68px, 15vw, 90px); }
  .login-panel { width: 100%; max-width: 450px; align-self: center; }
}
@media (max-width: 600px) {
  .history-heading { align-items: start; flex-direction: column; gap: 8px; }
  .history-poster { height: clamp(190px, 55vw, 290px); }
  .history-card-body { min-height: 151px; padding: 12px; }
  .trim-panel { padding-inline: 15px; }
  .trim-metrics { gap: 16px; }
  .trim-metrics > div { flex-direction: column; gap: 3px; }
  .photo-row { grid-template-columns: 1fr; gap: 0; }
  .photo-row .field-label { display: flex; min-height: 24px; font-size: 13px; }
  .photo-row .optional, .photo-row .required { display: inline; margin-left: auto; font-size: 8px; }
  .dropzone-small { padding: 9px 12px; }
  .drop-note { line-height: 1.2; }
}
@media (max-width: 480px) {
  .brand-mark, .brand-mark img { width: 82px; }
  .brand-mark-light { width: 82px; }
  .brand-mark-light img { width: 100%; }
  .title-control-row { grid-template-columns: 1fr; gap: 7px; }
  .title-size-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .title-size-row label { grid-column: 1 / -1; }
  .video-link-row { flex-direction: column; }
  .preview-stage { grid-template-columns: minmax(0, 1fr) 50px; gap: 9px; }
  .image-preview-stage { grid-template-columns: minmax(0, 1fr) 50px; gap: 9px; }
  .tool-button { min-height: 52px; }
  .job-panel { flex-wrap: wrap; }
  .download-button { width: 100%; text-align: center; }
  .login-panel { padding: 27px; }
}

/* Compact, touch-friendly controls stay attached to their own image. */
.photo-zoom-buttons { display: inline-flex; gap: 4px; margin-top: 6px; pointer-events: auto; }
.photo-zoom-buttons button { display: grid; place-items: center; width: 32px; height: 32px; padding: 5px; border: 1px solid #ffffff80; border-radius: 6px; background: #161b22e6; color: white; cursor: pointer; touch-action: manipulation; }
.photo-zoom-buttons svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.photo-zoom-buttons button:focus-visible { outline: 3px solid #e8aa38; outline-offset: 2px; }
.image-preview-main > .photo-zoom-buttons, .image-preview-photo > .photo-zoom-buttons, .reel-top > .photo-zoom-buttons, .reel-bottom > .photo-zoom-buttons, .reel-video > .photo-zoom-buttons { position: absolute; top: 8px; left: 8px; z-index: 12; margin: 0; }
.reel-top, .reel-bottom { background-repeat: no-repeat; }
body:not([data-editor-mode="voice"]) .voice-photo-zoom { display: none; }
body[data-editor-mode="voice"] .video-zoom { display: none; }
.preview-frame > .photo-zoom-buttons { position: absolute; top: 8px; left: 8px; z-index: 12; margin: 0; }
.preview-frame:not(.has-video) > .photo-zoom-buttons { display: none; }
.image-preview-photo:has(> .photo-zoom-buttons) { overflow: hidden; }
.collage-zoom .photo-zoom-buttons { margin: 0; }
.collage-file-item .collage-list-zoom { flex: none; overflow: visible; margin: 0; }

body[data-brand="footer-logo"] .reel-logo, body[data-brand="footer-logo"] .image-preview-logo { top: 80.5%; right: auto; left: 9%; width: 82%; padding: 0; background: none; }
body[data-brand="footer-logo"] .reel-title, body[data-brand="footer-logo"] .image-preview-title { top: 43%; bottom: auto; text-align: center; }
body[data-brand="footer-logo"] .brand-mark { background: #253844; border-radius: 8px; padding: 5px 12px; }

.background-zoom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; font-size: 12px; }
.background-zoom input { flex: 1; min-width: 100px; }

.image-preview-main, .image-preview-photo, .reel-top, .reel-bottom { cursor: grab; touch-action: none; }
.is-panning { cursor: grabbing !important; }
.image-preview-logo, .image-preview-title { pointer-events: none; user-select: none; }

/* Standalone single-brand header. */
body[data-authenticated="true"] .site-header:has(.bp-trigger) { grid-template-columns: minmax(120px, 1fr) auto auto auto; }
.studio-header-name { font-family: "Barlow Condensed", sans-serif; font-size: 24px; text-align: center; }
@media (max-width: 700px) { .studio-header-name { display: none; } }
