/* GALER-IA is the single, native project editor surface.  The React form
 * remains mounted underneath so its state and save pipeline stay intact. */
body.filmeds-bento-native-open {
  overflow: hidden !important;
  background: #0e0f13 !important;
}

body.filmeds-bento-native-open
  .filmeds-editor-workspace[data-filmeds-editor-kind="project"] {
  position: absolute !important;
  inset: auto !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.filmeds-bento-native {
  --bento-bg: #0e0f13;
  --bento-panel: #14161c;
  --bento-panel-2: #191c23;
  --bento-panel-3: #20242d;
  --bento-line: #292e39;
  --bento-line-strong: #3a4150;
  --bento-text: #eef0f6;
  --bento-muted: #8e96a8;
  --bento-subtle: #626b7d;
  --bento-accent: #aeb8ff;
  --bento-accent-strong: #7b87ff;
  --bento-danger: #ff777c;
  --bento-radius: 10px;
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: grid;
  overflow: hidden;
  color: var(--bento-text);
  background: var(--bento-bg);
  font: 12px/1.35 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.005em;
}

.filmeds-bento-native *,
.filmeds-bento-native *::before,
.filmeds-bento-native *::after {
  box-sizing: border-box;
}

.filmeds-bento-native button,
.filmeds-bento-native input,
.filmeds-bento-native select,
.filmeds-bento-native summary {
  font: inherit;
}

.filmeds-bento-native button,
.filmeds-bento-native summary {
  -webkit-tap-highlight-color: transparent;
}

.filmeds-bento-native button {
  cursor: pointer;
}

.filmeds-bento-native button:focus-visible,
.filmeds-bento-native input:focus-visible,
.filmeds-bento-native select:focus-visible,
.filmeds-bento-native summary:focus-visible {
  outline: 2px solid var(--bento-accent-strong);
  outline-offset: 2px;
}

.filmeds-bento-native .bento-topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid var(--bento-line);
  background: #121318;
}

.filmeds-bento-native .bento-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  color: var(--bento-text);
  font-size: 13px;
  font-weight: 700;
}

.filmeds-bento-native .bento-brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  grid-template-columns: repeat(2, 6px);
  grid-template-rows: repeat(2, 6px);
  place-content: center;
  gap: 3px;
  border: 1px solid var(--bento-line-strong);
  border-radius: 8px;
  background: #1d2028;
}

.filmeds-bento-native .bento-brand-mark i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #aab4ff;
}

.filmeds-bento-native .bento-topbar-tools {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filmeds-bento-native .bento-topbar-tools::-webkit-scrollbar {
  display: none;
}

.filmeds-bento-native .bento-topbar-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--bento-subtle);
  font-size: 10px;
  white-space: nowrap;
}

.filmeds-bento-native .bento-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6bdb9c;
  box-shadow: 0 0 0 3px rgba(107, 219, 156, 0.1);
}

.filmeds-bento-native[data-dirty="true"] .bento-status-dot {
  background: #ffc46b;
  box-shadow: 0 0 0 3px rgba(255, 196, 107, 0.1);
}

.filmeds-bento-native .bento-btn {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--bento-line);
  border-radius: 9px;
  color: var(--bento-text);
  background: var(--bento-panel-2);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.filmeds-bento-native .bento-btn:hover {
  border-color: var(--bento-line-strong);
  background: var(--bento-panel-3);
}

.filmeds-bento-native .bento-btn.primary {
  border-color: #cbd0ff;
  color: #11131a;
  background: #edf0ff;
}

.filmeds-bento-native .bento-btn.primary:hover {
  border-color: #fff;
  background: #fff;
}

.filmeds-bento-native .bento-btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--bento-muted);
}

.filmeds-bento-native .bento-btn.ghost:hover {
  border-color: var(--bento-line);
  color: var(--bento-text);
  background: var(--bento-panel-2);
}

.filmeds-bento-native .bento-btn.danger {
  color: var(--bento-danger);
}

.filmeds-bento-native .bento-btn.icon {
  width: 32px;
  padding: 0;
  font-size: 15px;
}

.filmeds-bento-native .bento-btn.small {
  min-height: 28px;
  padding-inline: 9px;
  border-radius: 8px;
  font-size: 10px;
}

.filmeds-bento-native .bento-workarea {
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(340px, 1fr) 328px;
}

.filmeds-bento-native .bento-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--bento-panel);
  scrollbar-color: #343b49 transparent;
  scrollbar-width: thin;
}

.filmeds-bento-native .bento-panel.left {
  border-right: 1px solid var(--bento-line);
}

.filmeds-bento-native .bento-panel.right {
  border-left: 1px solid var(--bento-line);
}

.filmeds-bento-native .bento-panel::-webkit-scrollbar {
  width: 7px;
}

.filmeds-bento-native .bento-panel::-webkit-scrollbar-thumb {
  border: 2px solid var(--bento-panel);
  border-radius: 99px;
  background: #343b49;
}

.filmeds-bento-native .bento-panel-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--bento-line);
}

.filmeds-bento-native .bento-panel-title,
.filmeds-bento-native .bento-kicker,
.filmeds-bento-native .bento-field label,
.filmeds-bento-native .bento-section > summary {
  color: var(--bento-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.filmeds-bento-native .bento-panel-title {
  color: #c1c7d4;
}

.filmeds-bento-native .bento-saved {
  color: var(--bento-subtle);
  font-size: 9px;
  white-space: nowrap;
}

.filmeds-bento-native .bento-notice {
  margin: 12px;
  padding: 10px 11px;
  border: 1px solid #303748;
  border-radius: 8px;
  color: var(--bento-muted);
  background: #171a21;
  font-size: 10px;
}

.filmeds-bento-native .bento-notice strong {
  color: #d5d9e3;
  font-weight: 700;
}

.filmeds-bento-native .bento-project-details {
  margin: 0 12px 12px;
  padding: 0 10px 10px;
  border: 1px solid var(--bento-line);
  border-radius: 9px;
  background: #16181f;
}

.filmeds-bento-native .bento-project-details > summary {
  padding: 10px 0;
  color: #b3bac8;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filmeds-bento-native .bento-section {
  border-bottom: 1px solid var(--bento-line);
}

.filmeds-bento-native .bento-section > summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: #9ea6b5;
  cursor: pointer;
  list-style: none;
}

.filmeds-bento-native .bento-section > summary::-webkit-details-marker,
.filmeds-bento-native .bento-project-details > summary::-webkit-details-marker {
  display: none;
}

.filmeds-bento-native .bento-section > summary::after,
.filmeds-bento-native .bento-project-details > summary::after {
  color: var(--bento-subtle);
  content: "⌄";
  font-size: 14px;
  letter-spacing: 0;
  transform: translateY(-1px);
}

.filmeds-bento-native .bento-section:not([open]) > summary::after,
.filmeds-bento-native .bento-project-details:not([open]) > summary::after {
  transform: rotate(-90deg);
}

.filmeds-bento-native .bento-section-body {
  padding: 0 16px 15px;
}

.filmeds-bento-native .bento-section-body.compact {
  padding-inline: 10px;
}

.filmeds-bento-native .bento-field {
  min-width: 0;
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.filmeds-bento-native .bento-field:first-child {
  margin-top: 0;
}

.filmeds-bento-native .bento-field label {
  color: var(--bento-subtle);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.filmeds-bento-native .bento-row {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.filmeds-bento-native .bento-row.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filmeds-bento-native .bento-input,
.filmeds-bento-native .bento-select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--bento-line);
  border-radius: 8px;
  color: #e9ebf2;
  outline: 0;
  background: #1b1e25;
}

.filmeds-bento-native .bento-input:hover,
.filmeds-bento-native .bento-select:hover {
  border-color: var(--bento-line-strong);
}

.filmeds-bento-native .bento-input[type="number"] {
  appearance: textfield;
}

.filmeds-bento-native .bento-input[type="number"]::-webkit-inner-spin-button,
.filmeds-bento-native .bento-input[type="number"]::-webkit-outer-spin-button {
  opacity: 0.7;
}

.filmeds-bento-native .bento-input[type="color"] {
  padding: 3px;
}

.filmeds-bento-native textarea.bento-input {
  height: auto;
  min-height: 60px;
  padding-block: 8px;
  resize: vertical;
}

.filmeds-bento-native .bento-range-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filmeds-bento-native input[type="range"] {
  min-width: 0;
  width: 100%;
  accent-color: var(--bento-accent-strong);
}

.filmeds-bento-native .bento-range-value {
  min-width: 38px;
  color: #d2d6e0;
  font-size: 10px;
  text-align: right;
}

.filmeds-bento-native .bento-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 14px;
  margin-top: 12px;
}

.filmeds-bento-native .bento-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--bento-muted);
  font-size: 10px;
  cursor: pointer;
}

.filmeds-bento-native .bento-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filmeds-bento-native .bento-switch {
  position: relative;
  width: 29px;
  height: 17px;
  border: 1px solid #414858;
  border-radius: 99px;
  background: #20242c;
  transition: background 140ms ease, border-color 140ms ease;
}

.filmeds-bento-native .bento-switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8b93a2;
  content: "";
  transition: transform 140ms ease, background 140ms ease;
}

.filmeds-bento-native .bento-toggle input:checked + .bento-switch {
  border-color: #7b87ff;
  background: #30396d;
}

.filmeds-bento-native .bento-toggle input:checked + .bento-switch::after {
  background: #e8ebff;
  transform: translateX(12px);
}

.filmeds-bento-native .bento-templates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.filmeds-bento-native .bento-template {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--bento-line);
  border-radius: 9px;
  color: #c9ced9;
  text-align: left;
  background: #191c23;
}

.filmeds-bento-native .bento-template:hover,
.filmeds-bento-native .bento-template.is-active {
  border-color: #6672c9;
  background: #20243a;
}

.filmeds-bento-native .bento-template strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filmeds-bento-native .bento-template-preview {
  width: 34px;
  height: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
}

.filmeds-bento-native .bento-template-preview i {
  display: block;
  min-width: 0;
  min-height: 0;
  border-radius: 2px;
  background: #58627a;
}

.filmeds-bento-native .bento-template-preview i:nth-child(2n) {
  background: #7b87ff;
}

.filmeds-bento-native .bento-template-preview i:nth-child(3n) {
  background: #4d746f;
}

.filmeds-bento-native .bento-template-preview i.is-wide {
  grid-column: span 2;
}

.filmeds-bento-native .bento-template-preview i.is-tall {
  grid-row: span 2;
}

.filmeds-bento-native .bento-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.filmeds-bento-native .bento-action-row + .bento-action-row {
  margin-top: 8px;
}

.filmeds-bento-native .bento-panel-footer {
  display: flex;
  gap: 8px;
  padding: 14px 16px 18px;
}

.filmeds-bento-native .bento-stage-area {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0c0d11;
}

.filmeds-bento-native .bento-stage-toolbar {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid #191c23;
  color: var(--bento-muted);
}

.filmeds-bento-native .bento-stage-toolbar strong {
  overflow: hidden;
  color: #b8becb;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filmeds-bento-native .bento-stage-toolbar span {
  color: var(--bento-subtle);
  font-size: 10px;
  white-space: nowrap;
}

.filmeds-bento-native .bento-stage-viewport {
  min-width: 0;
  min-height: 0;
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 32px;
  scrollbar-color: #343b49 #0c0d11;
  scrollbar-width: thin;
}

.filmeds-bento-native .bento-stage-viewport::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.filmeds-bento-native .bento-stage-viewport::-webkit-scrollbar-thumb {
  border: 2px solid #0c0d11;
  border-radius: 99px;
  background: #343b49;
}

.filmeds-bento-native .bento-stage-frame {
  --bento-cols: 6;
  --bento-rows: 8;
  --bento-gap-x: 24px;
  --bento-gap-y: 24px;
  --bento-padding: 42px;
  --bento-frame-ratio: 3 / 4;
  position: relative;
  width: min(100%, 650px);
  aspect-ratio: var(--bento-frame-ratio);
  display: grid;
  grid-template-columns: repeat(var(--bento-cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--bento-rows), minmax(0, 1fr));
  gap: var(--bento-gap-y) var(--bento-gap-x);
  padding: var(--bento-padding);
  border: 1px solid #222733;
  border-radius: 2px;
  background: #151827;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.02);
  transform-origin: center;
  transition: width 180ms ease, aspect-ratio 180ms ease;
}

.filmeds-bento-native .bento-stage-frame::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: var(--bento-canvas-bg, #151827);
  content: "";
}

.filmeds-bento-native .bento-grid-layer {
  position: absolute;
  z-index: 1;
  inset: var(--bento-padding);
  display: grid;
  grid-template-columns: repeat(var(--bento-cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--bento-rows), minmax(0, 1fr));
  gap: var(--bento-gap-y) var(--bento-gap-x);
  pointer-events: none;
}

.filmeds-bento-native .bento-grid-cell {
  min-width: 0;
  min-height: 0;
  border: 1px dashed rgba(149, 160, 194, 0.18);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.008);
}

.filmeds-bento-native .bento-stage-frame[data-show-grid="false"] .bento-grid-layer {
  display: none;
}

.filmeds-bento-native .bento-box {
  min-width: 0;
  min-height: 0;
  position: relative;
  z-index: 2;
  overflow: visible;
  border: 1px solid transparent;
  border-radius: var(--bento-box-radius, 12px);
  background: linear-gradient(135deg, #222a42, #283353);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  cursor: grab;
  isolation: isolate;
  touch-action: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.filmeds-bento-native .bento-box:active {
  cursor: grabbing;
}

.filmeds-bento-native .bento-box:hover {
  border-color: rgba(206, 213, 255, 0.4);
}

.filmeds-bento-native .bento-box.is-selected {
  z-index: 10;
  border-color: #f1f2ff;
  box-shadow: 0 0 0 1px #11131a, 0 0 0 2px #c2c8ff, 0 12px 28px rgba(0, 0, 0, 0.34);
}

.filmeds-bento-native .bento-box-media,
.filmeds-bento-native .bento-box-placeholder {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.filmeds-bento-native .bento-box-media {
  display: block;
  object-fit: cover;
  transform: var(--bento-media-transform, scale(1));
  transform-origin: center;
}

.filmeds-bento-native .bento-box-media.is-contain {
  object-fit: contain;
  background: #151821;
}

.filmeds-bento-native .bento-box-placeholder {
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(240, 243, 255, 0.54);
  background: linear-gradient(135deg, var(--bento-placeholder-a, #273353), var(--bento-placeholder-b, #313a5d));
  font-size: 10px;
  text-align: center;
}

.filmeds-bento-native .bento-box-placeholder::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.11), transparent 48%);
  content: "";
}

.filmeds-bento-native .bento-box-placeholder span {
  position: relative;
}

.filmeds-bento-native .bento-box-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 7px;
  border-radius: inherit;
  pointer-events: none;
}

.filmeds-bento-native .bento-box-label,
.filmeds-bento-native .bento-box-menu {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  color: #fff;
  background: rgba(12, 14, 20, 0.72);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.filmeds-bento-native .bento-box-menu {
  align-self: flex-end;
  width: 24px;
  padding: 0;
  justify-content: center;
  border-radius: 999px;
  pointer-events: auto;
}

.filmeds-bento-native .bento-box-menu:hover {
  background: rgba(12, 14, 20, 0.92);
}

.filmeds-bento-native .bento-resize-handle {
  position: absolute;
  z-index: 4;
  width: 9px;
  height: 9px;
  border: 1px solid #101219;
  border-radius: 2px;
  background: #f0f1ff;
  opacity: 0;
  pointer-events: none;
}

.filmeds-bento-native .bento-box.is-selected .bento-resize-handle {
  opacity: 1;
  pointer-events: auto;
}

.filmeds-bento-native .bento-resize-handle[data-resize="nw"] { top: -5px; left: -5px; cursor: nwse-resize; }
.filmeds-bento-native .bento-resize-handle[data-resize="n"] { top: -5px; left: calc(50% - 4px); cursor: ns-resize; }
.filmeds-bento-native .bento-resize-handle[data-resize="ne"] { top: -5px; right: -5px; cursor: nesw-resize; }
.filmeds-bento-native .bento-resize-handle[data-resize="e"] { top: calc(50% - 4px); right: -5px; cursor: ew-resize; }
.filmeds-bento-native .bento-resize-handle[data-resize="se"] { right: -5px; bottom: -5px; cursor: nwse-resize; }
.filmeds-bento-native .bento-resize-handle[data-resize="s"] { bottom: -5px; left: calc(50% - 4px); cursor: ns-resize; }
.filmeds-bento-native .bento-resize-handle[data-resize="sw"] { bottom: -5px; left: -5px; cursor: nesw-resize; }
.filmeds-bento-native .bento-resize-handle[data-resize="w"] { top: calc(50% - 4px); left: -5px; cursor: ew-resize; }

.filmeds-bento-native .bento-stage-frame[data-corners="square"] .bento-box { --bento-box-radius: 0px; }
.filmeds-bento-native .bento-stage-frame[data-corners="rounded"] .bento-box { --bento-box-radius: 12px; }
.filmeds-bento-native .bento-stage-frame[data-corners="round"] .bento-box { --bento-box-radius: 24px; }
.filmeds-bento-native .bento-stage-frame[data-corners="squircle"] .bento-box { --bento-box-radius: 18px; }
.filmeds-bento-native .bento-stage-frame[data-corners="cut"] .bento-box { --bento-box-radius: 4px; }
.filmeds-bento-native .bento-stage-frame[data-corners="asymmetric"] .bento-box { --bento-box-radius: 18px 5px 18px 5px; }

.filmeds-bento-native .bento-stage-frame.is-playing .bento-box:nth-of-type(3n + 1) {
  animation: filmeds-bento-float 1600ms ease-in-out infinite alternate;
}

.filmeds-bento-native .bento-stage-frame.is-playing .bento-box:nth-of-type(3n + 2) {
  animation: filmeds-bento-float 1900ms 120ms ease-in-out infinite alternate-reverse;
}

@keyframes filmeds-bento-float {
  to { transform: translateY(-5px); }
}

.filmeds-bento-native .bento-inspector-empty {
  margin: 14px 16px;
  padding: 14px;
  border: 1px dashed #353b49;
  border-radius: 9px;
  color: var(--bento-muted);
  background: #171a21;
  font-size: 11px;
}

.filmeds-bento-native .bento-inspector-section {
  border-bottom: 1px solid var(--bento-line);
}

.filmeds-bento-native .bento-inspector-section > summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: #a1a9b8;
  cursor: pointer;
  list-style: none;
}

.filmeds-bento-native .bento-inspector-section > summary::-webkit-details-marker {
  display: none;
}

.filmeds-bento-native .bento-inspector-section > summary::after {
  color: var(--bento-subtle);
  content: "⌄";
  font-size: 13px;
}

.filmeds-bento-native .bento-inspector-section:not([open]) > summary::after {
  transform: rotate(-90deg);
}

.filmeds-bento-native .bento-inspector-body {
  padding: 0 16px 14px;
}

.filmeds-bento-native .bento-selection-head,
.filmeds-bento-native .bento-media-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.filmeds-bento-native .bento-selection-head strong {
  display: block;
  color: #e6e8ef;
  font-size: 13px;
}

.filmeds-bento-native .bento-selection-meta,
.filmeds-bento-native .bento-media-sub {
  margin-top: 2px;
  color: var(--bento-subtle);
  font-size: 10px;
}

.filmeds-bento-native .bento-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid var(--bento-line);
  border-radius: 6px;
  color: #b4bbca;
  background: #1b1e26;
  font-size: 9px;
  white-space: nowrap;
}

.filmeds-bento-native .bento-pill.is-media {
  border-color: #3c6d5c;
  color: #9ae1bc;
  background: #1b2b27;
}

.filmeds-bento-native .bento-media-card {
  margin-bottom: 11px;
  padding: 9px;
  border: 1px solid var(--bento-line);
  border-radius: 8px;
  background: #171a21;
}

.filmeds-bento-native .bento-media-card .bento-media-preview {
  width: 42px;
  height: 42px;
  float: left;
  margin-right: 9px;
  overflow: hidden;
  border-radius: 6px;
  background: #252a35;
}

.filmeds-bento-native .bento-media-preview img,
.filmeds-bento-native .bento-media-preview video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.filmeds-bento-native .bento-media-card::after {
  display: block;
  clear: both;
  content: "";
}

.filmeds-bento-native .bento-media-name {
  min-height: 42px;
  display: grid;
  align-content: center;
  overflow: hidden;
  color: #d9dde7;
  font-size: 10px;
  text-overflow: ellipsis;
}

.filmeds-bento-native .bento-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.filmeds-bento-native .bento-segmented button {
  min-height: 32px;
  border: 1px solid var(--bento-line);
  border-radius: 7px;
  color: var(--bento-muted);
  background: #1a1d24;
  font-size: 10px;
  font-weight: 600;
}

.filmeds-bento-native .bento-segmented button.is-active {
  border-color: #8c96e4;
  color: #eef0ff;
  background: #30365f;
}

.filmeds-bento-native .bento-corner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.filmeds-bento-native .bento-corner-option {
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--bento-line);
  border-radius: 7px;
  color: var(--bento-muted);
  background: #1a1d24;
  font-size: 8px;
}

.filmeds-bento-native .bento-corner-option.is-active {
  border-color: #8c96e4;
  color: #eef0ff;
  background: #30365f;
}

.filmeds-bento-native .bento-corner-shape {
  width: 20px;
  height: 16px;
  display: block;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.03);
}

.filmeds-bento-native .bento-corner-option[data-corner="square"] .bento-corner-shape { border-radius: 0; }
.filmeds-bento-native .bento-corner-option[data-corner="rounded"] .bento-corner-shape { border-radius: 4px; }
.filmeds-bento-native .bento-corner-option[data-corner="round"] .bento-corner-shape { border-radius: 9px; }
.filmeds-bento-native .bento-corner-option[data-corner="squircle"] .bento-corner-shape { border-radius: 7px; }
.filmeds-bento-native .bento-corner-option[data-corner="cut"] .bento-corner-shape { clip-path: polygon(18% 0, 100% 0, 100% 82%, 82% 100%, 0 100%, 0 18%); }
.filmeds-bento-native .bento-corner-option[data-corner="asymmetric"] .bento-corner-shape { border-radius: 9px 2px 9px 2px; }

.filmeds-bento-native .bento-timeline {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-top: 1px solid var(--bento-line);
  background: #121318;
}

.filmeds-bento-native .bento-timeline > div {
  min-width: 0;
}

.filmeds-bento-native .bento-timeline-label {
  overflow: hidden;
  color: var(--bento-subtle);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filmeds-bento-native .bento-time {
  min-width: 86px;
  color: #aeb5c4;
  font: 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: right;
}

.filmeds-bento-native .bento-toast {
  position: absolute;
  z-index: 40;
  right: 16px;
  bottom: 78px;
  max-width: min(360px, calc(100% - 32px));
  padding: 10px 12px;
  border: 1px solid #434b63;
  border-radius: 8px;
  color: #eef0ff;
  background: #252a3e;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.filmeds-bento-native .bento-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.filmeds-bento-native .bento-present-overlay {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: none;
  place-items: center;
  background: #090a0e;
}

.filmeds-bento-native.is-presenting .bento-present-overlay {
  display: grid;
}

.filmeds-bento-native .bento-present-stage {
  width: min(88vw, 900px);
  height: min(84vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.filmeds-bento-native .bento-present-stage .bento-stage-frame {
  width: min(100%, 680px);
  max-height: 100%;
}

.filmeds-bento-native .bento-present-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.filmeds-bento-native .bento-project-details .bento-field {
  margin-top: 8px;
}

.filmeds-bento-native .bento-project-details .bento-field label {
  letter-spacing: 0.08em;
}

@media (max-width: 1180px) {
  .filmeds-bento-native .bento-workarea {
    grid-template-columns: 240px minmax(300px, 1fr) 286px;
  }

  .filmeds-bento-native .bento-stage-viewport {
    padding: 22px;
  }
}

@media (max-width: 900px) {
  .filmeds-bento-native {
    grid-template-rows: 56px minmax(clamp(360px, 58vh, 510px), 1fr) minmax(205px, 28vh) 62px;
    grid-template-columns: 1fr;
  }

  .filmeds-bento-native .bento-topbar {
    grid-column: 1;
  }

  .filmeds-bento-native .bento-workarea {
    display: contents;
  }

  .filmeds-bento-native .bento-panel.left {
    display: none;
  }

  .filmeds-bento-native .bento-stage-area {
    grid-row: 2;
    min-height: 0;
  }

  .filmeds-bento-native .bento-panel.right {
    grid-row: 3;
    max-height: 100%;
    border-top: 1px solid var(--bento-line);
    border-left: 0;
  }

  .filmeds-bento-native .bento-timeline {
    grid-row: 4;
  }

  .filmeds-bento-native .bento-stage-frame {
    width: min(100%, 520px);
  }

  .filmeds-bento-native .bento-inspector-section {
    max-width: 760px;
    margin-inline: auto;
  }

  .filmeds-bento-native .bento-inspector-body {
    padding-inline: 20px;
  }
}

@media (max-width: 650px) {
  .filmeds-bento-native .bento-topbar {
    gap: 6px;
    padding-inline: 8px;
  }

  .filmeds-bento-native .bento-brand {
    gap: 6px;
    font-size: 11px;
  }

  .filmeds-bento-native .bento-brand-mark {
    width: 26px;
    height: 26px;
  }

  .filmeds-bento-native .bento-topbar-status,
  .filmeds-bento-native .bento-topbar [data-bento-action="details"],
  .filmeds-bento-native .bento-topbar [data-bento-action="shuffle"] span,
  .filmeds-bento-native .bento-topbar [data-bento-action="add-media"] span,
  .filmeds-bento-native .bento-topbar [data-bento-action="present"] span,
  .filmeds-bento-native .bento-topbar [data-bento-action="export"] span {
    display: none;
  }

  .filmeds-bento-native .bento-topbar-tools {
    gap: 5px;
  }

  .filmeds-bento-native .bento-btn {
    min-height: 30px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .filmeds-bento-native .bento-stage-toolbar {
    min-height: 36px;
    padding-inline: 10px;
  }

  .filmeds-bento-native .bento-stage-viewport {
    align-items: flex-start;
    padding: 18px 12px 24px;
  }

  .filmeds-bento-native .bento-stage-frame {
    width: min(84vw, 360px);
    flex: 0 0 auto;
  }

  .filmeds-bento-native .bento-box-placeholder span {
    display: none;
  }

  .filmeds-bento-native .bento-box-placeholder::after {
    position: relative;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: rgba(240, 243, 255, 0.76);
    content: "+";
    font-size: 20px;
    font-weight: 300;
  }

  .filmeds-bento-native .bento-panel.right {
    overflow-x: hidden;
  }

  .filmeds-bento-native .bento-panel-head,
  .filmeds-bento-native .bento-inspector-body {
    padding-inline: 12px;
  }

  .filmeds-bento-native .bento-inspector-section > summary {
    padding-inline: 12px;
  }

  .filmeds-bento-native .bento-timeline {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 6px;
    padding-inline: 8px;
  }

  .filmeds-bento-native .bento-time {
    display: none;
  }

  .filmeds-bento-native .bento-timeline-label {
    font-size: 9px;
  }
}

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

/* Filmeds integration: the gallery editor shares the same light editorial
 * palette, typography and controls as the rest of the platform. */
body.filmeds-bento-native-open {
  background: #fdfbf7 !important;
}

.filmeds-bento-native {
  --bento-bg: #f8f6f1;
  --bento-panel: #fdfbf7;
  --bento-panel-2: #f4f1eb;
  --bento-panel-3: #ebe7df;
  --bento-line: rgba(48, 48, 48, 0.12);
  --bento-line-strong: rgba(48, 48, 48, 0.26);
  --bento-text: #303030;
  --bento-muted: rgba(48, 48, 48, 0.66);
  --bento-subtle: rgba(48, 48, 48, 0.48);
  --bento-accent: #303030;
  --bento-accent-strong: #303030;
  --bento-danger: #a33a35;
  --bento-radius: 12px;
  grid-template-rows: 64px minmax(0, 1fr) 58px;
  background: var(--bento-bg);
  color: var(--bento-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.filmeds-bento-native .bento-topbar {
  grid-column: 1;
  grid-row: 1;
  min-height: 64px;
  padding-inline: clamp(14px, 2vw, 28px);
  border-bottom-color: var(--bento-line);
  background: rgba(253, 251, 247, 0.98);
  box-shadow: 0 1px 0 rgba(48, 48, 48, 0.04);
}

.filmeds-bento-native .bento-brand {
  color: #303030;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filmeds-bento-native .bento-brand-mark {
  border-color: rgba(48, 48, 48, 0.18);
  border-radius: 8px;
  background: #fff;
}

.filmeds-bento-native .bento-brand-mark i,
.filmeds-bento-native .bento-brand-mark i:nth-child(2n),
.filmeds-bento-native .bento-brand-mark i:nth-child(3n) {
  background: #303030;
}

.filmeds-bento-native .bento-topbar-status {
  color: var(--bento-subtle);
}

.filmeds-bento-native .bento-status-dot {
  background: #638a6f;
  box-shadow: 0 0 0 3px rgba(99, 138, 111, 0.12);
}

.filmeds-bento-native[data-dirty="true"] .bento-status-dot {
  background: #b17d42;
  box-shadow: 0 0 0 3px rgba(177, 125, 66, 0.12);
}

.filmeds-bento-native .bento-btn {
  min-height: 36px;
  border-color: rgba(48, 48, 48, 0.14);
  border-radius: 8px;
  color: #303030;
  background: #fff;
}

.filmeds-bento-native .bento-btn:hover {
  border-color: rgba(48, 48, 48, 0.28);
  background: #f1eee8;
}

.filmeds-bento-native .bento-btn.primary,
.filmeds-bento-native .bento-btn.primary:hover {
  border-color: #303030;
  color: #fff;
  background: #303030;
}

.filmeds-bento-native .bento-btn.ghost {
  border-color: transparent;
  color: rgba(48, 48, 48, 0.66);
  background: transparent;
}

.filmeds-bento-native .bento-btn.ghost:hover {
  border-color: rgba(48, 48, 48, 0.12);
  color: #303030;
  background: #f1eee8;
}

.filmeds-bento-native .bento-btn.danger {
  color: var(--bento-danger);
}

.filmeds-bento-native .bento-workarea {
  grid-column: 1;
  grid-row: 2;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(260px, 300px);
  background: #f8f6f1;
}

.filmeds-bento-native .bento-panel {
  background: var(--bento-panel);
  scrollbar-color: #bdb8ae transparent;
}

.filmeds-bento-native .bento-panel.left {
  border-right-color: var(--bento-line);
}

.filmeds-bento-native .bento-panel.right {
  border-left-color: var(--bento-line);
}

.filmeds-bento-native .bento-panel::-webkit-scrollbar-thumb {
  border-color: var(--bento-panel);
  background: #bdb8ae;
}

.filmeds-bento-native .bento-panel-head,
.filmeds-bento-native .bento-inspector-section,
.filmeds-bento-native .bento-section {
  border-color: var(--bento-line);
}

.filmeds-bento-native .bento-panel-title,
.filmeds-bento-native .bento-kicker,
.filmeds-bento-native .bento-field label,
.filmeds-bento-native .bento-section > summary,
.filmeds-bento-native .bento-inspector-section > summary {
  color: rgba(48, 48, 48, 0.56);
}

.filmeds-bento-native .bento-panel-title {
  color: #303030;
}

.filmeds-bento-native .bento-saved,
.filmeds-bento-native .bento-field label,
.filmeds-bento-native .bento-selection-meta,
.filmeds-bento-native .bento-media-sub,
.filmeds-bento-native .bento-stage-toolbar span,
.filmeds-bento-native .bento-timeline-label {
  color: rgba(48, 48, 48, 0.48);
}

.filmeds-bento-native .bento-notice {
  border-color: rgba(48, 48, 48, 0.12);
  color: rgba(48, 48, 48, 0.62);
  background: #f5f1e9;
}

.filmeds-bento-native .bento-notice strong {
  color: #303030;
}

.filmeds-bento-native .bento-project-details {
  border-color: var(--bento-line);
  background: #fff;
}

.filmeds-bento-native .bento-project-details > summary,
.filmeds-bento-native .bento-section > summary,
.filmeds-bento-native .bento-inspector-section > summary {
  color: rgba(48, 48, 48, 0.68);
}

.filmeds-bento-native .bento-input,
.filmeds-bento-native .bento-select {
  border-color: rgba(48, 48, 48, 0.14);
  color: #303030;
  background: #f7f4ee;
}

.filmeds-bento-native .bento-input:hover,
.filmeds-bento-native .bento-select:hover,
.filmeds-bento-native .bento-input:focus,
.filmeds-bento-native .bento-select:focus {
  border-color: rgba(48, 48, 48, 0.32);
}

.filmeds-bento-native .bento-range-value {
  color: rgba(48, 48, 48, 0.66);
}

.filmeds-bento-native input[type="range"] {
  accent-color: #303030;
}

.filmeds-bento-native .bento-switch {
  border-color: rgba(48, 48, 48, 0.24);
  background: #e2ded5;
}

.filmeds-bento-native .bento-switch::after {
  background: #fff;
  box-shadow: 0 1px 2px rgba(48, 48, 48, 0.18);
}

.filmeds-bento-native .bento-toggle input:checked + .bento-switch {
  border-color: #303030;
  background: #303030;
}

.filmeds-bento-native .bento-toggle input:checked + .bento-switch::after {
  background: #fff;
}

.filmeds-bento-native .bento-template {
  border-color: rgba(48, 48, 48, 0.12);
  color: rgba(48, 48, 48, 0.72);
  background: #fff;
}

.filmeds-bento-native .bento-template:hover,
.filmeds-bento-native .bento-template.is-active {
  border-color: rgba(48, 48, 48, 0.34);
  color: #303030;
  background: #f1eee8;
}

.filmeds-bento-native .bento-template-preview i {
  background: #c9c1b5;
}

.filmeds-bento-native .bento-template-preview i:nth-child(2n) {
  background: #303030;
}

.filmeds-bento-native .bento-template-preview i:nth-child(3n) {
  background: #a79b8d;
}

.filmeds-bento-native .bento-stage-area {
  background: #eeeae3;
}

.filmeds-bento-native .bento-stage-toolbar {
  border-bottom-color: var(--bento-line);
  color: rgba(48, 48, 48, 0.62);
  background: #f8f6f1;
}

.filmeds-bento-native .bento-stage-toolbar strong {
  color: #303030;
  font: 700 13px/1.25 Merriweather, Georgia, serif;
}

.filmeds-bento-native .bento-stage-viewport {
  background: #eeeae3;
  scrollbar-color: #bdb8ae #eeeae3;
}

.filmeds-bento-native .bento-stage-viewport::-webkit-scrollbar-thumb {
  border-color: #eeeae3;
  background: #bdb8ae;
}

.filmeds-bento-native .bento-stage-frame {
  border-color: rgba(48, 48, 48, 0.16);
  border-radius: 10px;
  background: #e5e0d8;
  box-shadow: 0 18px 42px rgba(48, 48, 48, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.filmeds-bento-native .bento-stage-frame::before {
  background: var(--bento-canvas-bg, #e5e0d8);
}

.filmeds-bento-native .bento-grid-cell {
  border-color: rgba(48, 48, 48, 0.14);
  background: rgba(255, 255, 255, 0.12);
}

.filmeds-bento-native .bento-box {
  border-color: transparent;
  background: linear-gradient(135deg, #d7cfc3, #eee9e1);
  box-shadow: 0 6px 14px rgba(48, 48, 48, 0.12);
}

.filmeds-bento-native .bento-box:hover {
  border-color: rgba(48, 48, 48, 0.34);
}

.filmeds-bento-native .bento-box.is-selected {
  border-color: #303030;
  box-shadow: 0 0 0 1px #fff, 0 0 0 2px #303030, 0 10px 24px rgba(48, 48, 48, 0.2);
}

.filmeds-bento-native .bento-box-media.is-contain {
  background: #fdfbf7;
}

.filmeds-bento-native .bento-box-placeholder {
  color: rgba(48, 48, 48, 0.62);
  background: linear-gradient(135deg, var(--bento-placeholder-a, #d7cfc3), var(--bento-placeholder-b, #eee9e1));
}

.filmeds-bento-native .bento-box-placeholder::before {
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.36), transparent 48%);
}

.filmeds-bento-native .bento-box-label,
.filmeds-bento-native .bento-box-menu {
  border-color: rgba(255, 255, 255, 0.58);
  color: #fff;
  background: rgba(48, 48, 48, 0.78);
}

.filmeds-bento-native .bento-box-menu:hover {
  background: rgba(48, 48, 48, 0.94);
}

.filmeds-bento-native .bento-resize-handle {
  border-color: #303030;
  background: #fff;
}

.filmeds-bento-native .bento-inspector-empty {
  border-color: rgba(48, 48, 48, 0.22);
  color: rgba(48, 48, 48, 0.62);
  background: #f5f1e9;
}

.filmeds-bento-native .bento-selection-head strong,
.filmeds-bento-native .bento-media-name {
  color: #303030;
}

.filmeds-bento-native .bento-pill {
  border-color: rgba(48, 48, 48, 0.14);
  color: rgba(48, 48, 48, 0.66);
  background: #f1eee8;
}

.filmeds-bento-native .bento-pill.is-media {
  border-color: rgba(74, 117, 87, 0.3);
  color: #416b4d;
  background: #eaf2eb;
}

.filmeds-bento-native .bento-media-card {
  border-color: rgba(48, 48, 48, 0.12);
  background: #fff;
}

.filmeds-bento-native .bento-media-card .bento-media-preview {
  background: #ebe7df;
}

.filmeds-bento-native .bento-segmented button,
.filmeds-bento-native .bento-corner-option {
  border-color: rgba(48, 48, 48, 0.14);
  color: rgba(48, 48, 48, 0.64);
  background: #fff;
}

.filmeds-bento-native .bento-segmented button.is-active,
.filmeds-bento-native .bento-corner-option.is-active {
  border-color: #303030;
  color: #fff;
  background: #303030;
}

.filmeds-bento-native .bento-corner-shape {
  background: rgba(48, 48, 48, 0.04);
}

.filmeds-bento-native .bento-timeline {
  grid-column: 1;
  grid-row: 3;
  border-top-color: var(--bento-line);
  background: #fdfbf7;
}

.filmeds-bento-native .bento-time {
  color: rgba(48, 48, 48, 0.58);
}

.filmeds-bento-native .bento-toast {
  border-color: rgba(48, 48, 48, 0.16);
  color: #303030;
  background: #fff;
  box-shadow: 0 12px 30px rgba(48, 48, 48, 0.16);
}

.filmeds-bento-native .bento-present-overlay {
  background: rgba(253, 251, 247, 0.98);
}

@media (max-width: 1180px) and (min-width: 901px) {
  .filmeds-bento-native .bento-workarea {
    grid-template-columns: 220px minmax(0, 1fr) 280px;
  }
}

@media (max-width: 900px) {
  .filmeds-bento-native {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f8f6f1;
  }

  .filmeds-bento-native .bento-topbar {
    position: sticky;
    z-index: 50;
    top: 0;
    flex: 0 0 auto;
    grid-column: auto;
    grid-row: auto;
    min-height: 58px;
    padding: 8px 12px;
  }

  .filmeds-bento-native .bento-workarea {
    display: contents;
    grid-column: auto;
    grid-row: auto;
  }

  .filmeds-bento-native .bento-panel.left {
    display: none;
  }

  .filmeds-bento-native .bento-stage-area {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
  }

  .filmeds-bento-native .bento-stage-toolbar {
    min-height: 44px;
    padding-inline: 16px;
  }

  .filmeds-bento-native .bento-stage-viewport {
    height: min(56dvh, 500px);
    min-height: 340px;
    flex: 0 0 auto;
    overflow: hidden;
    padding: 18px 12px;
  }

  .filmeds-bento-native .bento-stage-frame {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .filmeds-bento-native .bento-panel.right {
    order: 2;
    flex: 0 0 auto;
    width: 100%;
    max-height: none;
    overflow: visible;
    border-top: 1px solid var(--bento-line);
    border-left: 0;
  }

  .filmeds-bento-native .bento-panel.right .bento-panel-head {
    min-height: 52px;
    padding-inline: 16px;
    background: #fdfbf7;
  }

  .filmeds-bento-native .bento-inspector-empty {
    margin: 14px 16px;
  }

  .filmeds-bento-native .bento-inspector-section {
    max-width: none;
    margin-inline: 0;
  }

  .filmeds-bento-native .bento-inspector-body {
    padding-inline: 16px;
  }

  .filmeds-bento-native .bento-timeline {
    order: 3;
    position: sticky;
    z-index: 45;
    bottom: 0;
    flex: 0 0 auto;
    min-height: 58px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    background: rgba(253, 251, 247, 0.97);
  }

  .filmeds-bento-native .bento-timeline .bento-btn.icon {
    min-width: 42px;
    min-height: 42px;
  }

  .filmeds-bento-native .bento-toast {
    right: 12px;
    bottom: 76px;
  }
}

@media (max-width: 650px) {
  .filmeds-bento-native .bento-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto auto;
    grid-template-areas:
      "brand present export save close"
      "tools tools tools tools tools";
    gap: 8px 6px;
    min-height: 96px;
    padding: 8px 12px 7px;
  }

  .filmeds-bento-native .bento-brand {
    grid-area: brand;
    min-width: 0;
    gap: 6px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .filmeds-bento-native .bento-brand-mark {
    width: 26px;
    height: 26px;
  }

  .filmeds-bento-native .bento-topbar-tools {
    grid-area: tools;
    width: 100%;
    min-width: 0;
    gap: 6px;
    padding: 1px 0 2px;
    overflow-x: auto;
  }

  .filmeds-bento-native .bento-topbar-tools .bento-btn {
    flex: 0 0 auto;
    min-height: 40px;
    padding-inline: 10px;
  }

  .filmeds-bento-native .bento-topbar-tools [data-bento-action="details"] {
    display: inline-flex !important;
  }

  .filmeds-bento-native .bento-topbar-tools [data-bento-action="shuffle"] span,
  .filmeds-bento-native .bento-topbar-tools [data-bento-action="add-media"] span {
    display: inline !important;
  }

  .filmeds-bento-native .bento-topbar-status {
    display: none;
  }

  .filmeds-bento-native .bento-topbar > [data-bento-action="present"] {
    grid-area: present;
  }

  .filmeds-bento-native .bento-topbar > [data-bento-action="export"] {
    grid-area: export;
  }

  .filmeds-bento-native .bento-topbar > [data-bento-action="save"] {
    grid-area: save;
  }

  .filmeds-bento-native .bento-topbar > [data-bento-action="close"] {
    grid-area: close;
  }

  .filmeds-bento-native .bento-topbar > [data-bento-action="present"],
  .filmeds-bento-native .bento-topbar > [data-bento-action="export"],
  .filmeds-bento-native .bento-topbar > [data-bento-action="save"],
  .filmeds-bento-native .bento-topbar > [data-bento-action="close"] {
    min-height: 40px;
    padding-inline: 9px;
  }

  .filmeds-bento-native .bento-topbar > [data-bento-action="present"] span,
  .filmeds-bento-native .bento-topbar > [data-bento-action="export"] span {
    display: none !important;
  }

  .filmeds-bento-native .bento-stage-toolbar {
    padding-inline: 14px;
  }

  .filmeds-bento-native .bento-stage-toolbar strong {
    max-width: 64%;
    font-size: 12px;
  }

  .filmeds-bento-native .bento-stage-toolbar span {
    font-size: 9px;
  }

  .filmeds-bento-native .bento-stage-viewport {
    height: min(56dvh, 500px);
    min-height: 320px;
    padding: 16px 12px 20px;
  }

  .filmeds-bento-native .bento-box-menu {
    width: 30px;
    min-height: 30px;
  }

  .filmeds-bento-native .bento-resize-handle {
    width: 12px;
    height: 12px;
  }

  .filmeds-bento-native .bento-row.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filmeds-bento-native .bento-btn,
  .filmeds-bento-native .bento-segmented button,
  .filmeds-bento-native .bento-corner-option {
    min-height: 44px;
  }

  .filmeds-bento-native .bento-input,
  .filmeds-bento-native .bento-select {
    height: 42px;
  }

  .filmeds-bento-native .bento-inspector-section > summary {
    min-height: 48px;
    padding-inline: 16px;
  }

  .filmeds-bento-native .bento-panel-footer {
    padding: 16px;
  }

  .filmeds-bento-native .bento-panel-footer .bento-btn {
    flex: 1 1 0;
  }
}

@media (max-width: 380px) {
  .filmeds-bento-native .bento-brand-mark {
    display: none;
  }

  .filmeds-bento-native .bento-topbar {
    grid-template-columns: minmax(0, 1fr) auto auto auto auto;
    padding-inline: 8px;
  }

  .filmeds-bento-native .bento-topbar > [data-bento-action="present"],
  .filmeds-bento-native .bento-topbar > [data-bento-action="export"],
  .filmeds-bento-native .bento-topbar > [data-bento-action="save"],
  .filmeds-bento-native .bento-topbar > [data-bento-action="close"] {
    padding-inline: 7px;
  }
}
