/* frame2frame — Fauxmoni internal product visual language */

@property --hue {
  syntax: "<number>";
  inherits: true;
  initial-value: 270;
}

@keyframes hue-cycle {
  to { --hue: 630; }
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-3px, 1px) rotate(-0.5deg); }
  40% { transform: translate(2px, -2px) rotate(0.5deg); }
  60% { transform: translate(-2px, 2px) rotate(-0.5deg); }
  80% { transform: translate(3px, -1px) rotate(0.5deg); }
}

@keyframes bar-shimmer {
  0% { background-position: 0 0; }
  100% { background-position: 32px 0; }
}

:root {
  --bg: #000;
  --neon: hsl(var(--hue), 100%, 50%);
  --neon-soft: hsla(var(--hue), 100%, 50%, 0.18);
  --neon-trace: hsla(var(--hue), 100%, 50%, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--neon);
  font-family: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
  animation: hue-cycle 36s linear infinite;
}
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
}

/* ============ MARQUEES ============ */

.marquee {
  display: flex;
  overflow: hidden;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 6px 0;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 2em;
  animation: marquee 40s linear infinite;
  padding-right: 2em;
  will-change: transform;
  backface-visibility: hidden;
}
.marquee-track > span { flex-shrink: 0; }
.marquee.reverse .marquee-track {
  animation-direction: reverse;
  animation-duration: 55s;
}

/* ============ HEADER ============ */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 2px solid currentColor;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand-mark { letter-spacing: -2px; font-size: 22px; }
.brand-name {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.brand-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.55;
}
.actions { display: flex; gap: 10px; }

/* ============ BUTTONS ============ */

.ghost-btn,
.primary-btn {
  background: transparent;
  color: currentColor;
  border: 2px solid currentColor;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ghost-btn.small,
.primary-btn.small { padding: 6px 10px; font-size: 11px; }
.ghost-btn-tiny {
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin-left: 8px;
}
.ghost-btn-tiny:hover { opacity: 1; }
.primary-btn {
  background: var(--neon);
  color: #000;
  border-color: var(--neon);
}
.ghost-btn:hover:not(:disabled),
.primary-btn:hover:not(:disabled) {
  transform: translate(3px, -3px);
  box-shadow: -3px 3px 0 0 currentColor;
}
.primary-btn:hover:not(:disabled) {
  box-shadow: -3px 3px 0 0 var(--neon);
}
.ghost-btn:active:not(:disabled),
.primary-btn:active:not(:disabled) {
  transform: translate(0, 0);
  box-shadow: none;
}
.ghost-btn:disabled,
.primary-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ============ SCREEN ROUTER ============ */

.screen { display: none; min-height: 0; min-width: 0; }

/* ============ SCREEN: UPLOAD ============ */

.screen-upload {
  align-items: center;
  justify-content: center;
  padding: 32px;
}
body[data-screen="upload"] .screen-upload { display: flex; }

.upload-drop {
  width: min(720px, 100%);
  border: 3px dashed currentColor;
  padding: 64px 32px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  background: var(--neon-trace);
}
.upload-drop:hover,
.upload-drop.dragover {
  background: var(--neon-soft);
  transform: translate(2px, -2px);
}
.upload-drop.dragover {
  outline: 3px solid currentColor;
  outline-offset: -10px;
  animation: shake 0.4s ease-in-out infinite;
}
.upload-mark {
  font-size: 80px;
  letter-spacing: -12px;
  margin-bottom: 18px;
  text-shadow: 0 0 20px currentColor;
}
.upload-title {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
}
.upload-sub {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0 0 22px;
  opacity: 0.85;
}
.upload-meta {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  opacity: 0.55;
  margin: 0;
}

/* ============ SCREEN: TRIM ============ */

.screen-trim {
  padding: 16px 24px 20px;
  grid-template-rows: auto 1fr;
  gap: 14px;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body[data-screen="trim"] .screen-trim { display: grid; }

.trim-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 2px solid currentColor;
}
.trim-top .trim-options {
  flex: 1;
  justify-content: center;
}
.primary-btn-big {
  font-size: 14px;
  padding: 12px 22px;
  box-shadow: 0 0 0 0 var(--neon), 0 0 14px var(--neon-soft);
}

.trim-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 20px 0;
  align-items: center;
  overflow: hidden;
}

.trim-instructions {
  text-align: center;
}
.trim-instructions h2 {
  font-size: clamp(16px, 2.4vw, 22px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
}
.trim-instructions p {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.65;
  margin: 0;
}

/* timeline strip — agora hero da tela */
.trim-strip-wrap {
  position: relative;
  width: min(960px, 92%);
  height: 140px;
  border: 3px solid currentColor;
  background: var(--neon-trace);
  box-shadow: 0 0 0 1px #000, 0 0 30px var(--neon-soft);
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.trim-strip {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
}
.trim-strip img {
  height: 100%;
  width: auto;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
}
.trim-range {
  position: absolute;
  inset: 0;
}
.trim-mask {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: grayscale(80%) brightness(40%);
  -webkit-backdrop-filter: grayscale(80%) brightness(40%);
  pointer-events: none;
}
.trim-mask-left { left: 0; right: auto; }
.trim-mask-right { right: 0; left: auto; }

.trim-window {
  position: absolute;
  top: -3px;
  bottom: -3px;
  border: 4px solid var(--neon);
  background: transparent;
  cursor: grab;
  pointer-events: all;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  box-shadow:
    0 0 0 1px #000,
    0 0 30px var(--neon),
    inset 0 0 0 2px rgba(0, 0, 0, 0.4);
}
.trim-window:active { cursor: grabbing; }

.trim-handle {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 32px;
  background: var(--neon);
  border: 2px solid #000;
  cursor: ew-resize;
  pointer-events: all;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.trim-handle::before {
  content: "";
  width: 4px;
  height: 36px;
  background: #000;
  border-radius: 2px;
}
.trim-handle-left  { left: -16px; }
.trim-handle-right { right: -16px; }
.trim-handle-label {
  position: absolute;
  top: -22px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--neon);
  text-shadow: 0 0 4px #000;
  pointer-events: none;
  white-space: nowrap;
}

/* timecode + frame count abaixo da strip */
.trim-info {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.trim-info-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.trim-info-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  opacity: 0.55;
}
.trim-info-value {
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.trim-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.trim-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.trim-opt select {
  background: transparent;
  color: currentColor;
  border: 2px solid currentColor;
  padding: 6px 10px;
  font: inherit;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.trim-opt select option { background: #000; color: #fff; }

.trim-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* ============ SCREEN: EXTRACTING ============ */

.screen-extracting {
  align-items: center;
  justify-content: center;
  padding: 32px;
}
body[data-screen="extracting"] .screen-extracting { display: flex; }

.extract-card {
  width: min(640px, 100%);
  border: 3px solid currentColor;
  background: #000;
  padding: 28px 24px 22px;
  box-shadow: 0 0 0 1px #000, 0 0 40px var(--neon-soft);
  position: relative;
}
.extract-stage {
  font-size: clamp(22px, 5vw, 38px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 18px;
}
.extract-bar {
  position: relative;
  height: 24px;
  border: 2px solid currentColor;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 7px,
      rgba(255, 255, 255, 0.06) 7px,
      rgba(255, 255, 255, 0.06) 8px
    );
}
.extract-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background:
    linear-gradient(
      90deg,
      transparent 0,
      currentColor 6px,
      currentColor 14px,
      transparent 16px,
      currentColor 18px,
      currentColor 26px,
      transparent 32px
    );
  background-size: 32px 100%;
  animation: bar-shimmer 0.7s linear infinite;
  box-shadow: 0 0 14px currentColor, inset 0 0 8px currentColor;
  transition: width 0.18s linear;
}
.extract-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.extract-sub {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.8;
  text-align: center;
}

/* ============ SCREEN: EDITOR ============ */

.screen-editor {
  grid-template-columns: 110px 1fr 280px;
  grid-template-rows: 1fr auto;
  min-height: 0;
  min-width: 0;
  position: relative;
}
body[data-screen="editor"] .screen-editor { display: grid; }

.editor-stage {
  position: relative;
  grid-row: 1;
  grid-column: 2;
  background: #000;
  overflow: hidden;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.editor-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
}
.editor-bg     { z-index: 1; }
.editor-onion  { z-index: 2; opacity: 0.35; pointer-events: none; }
.editor-draw   { z-index: 3; cursor: crosshair; }
.editor-cursor { z-index: 4; pointer-events: none; }

/* ============ FLOATING LEFT TOOLBAR ============ */

.floating-toolbar {
  grid-row: 1;
  grid-column: 1;
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #000;
  border: 2px solid currentColor;
  padding: 8px;
  margin: 12px;
  box-shadow: 4px 4px 0 0 var(--neon-soft);
}
.ftool {
  width: 72px;
  height: 56px;
  background: transparent;
  color: currentColor;
  border: 2px solid currentColor;
  padding: 4px;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: background 0.15s ease;
}
.ftool:hover { background: var(--neon-soft); }
.ftool.active {
  background: var(--neon);
  color: #000;
  border-color: var(--neon);
}
.ftool-icon { font-size: 18px; line-height: 1; }
.ftool-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ftool-divider {
  height: 2px;
  background: currentColor;
  opacity: 0.3;
  margin: 2px 0;
}

/* ============ RIGHT DETAILS PANEL ============ */

.editor-details {
  grid-row: 1;
  grid-column: 3;
  background: #000;
  border-left: 2px solid currentColor;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: currentColor transparent;
}
.editor-details::-webkit-scrollbar { width: 6px; }
.editor-details::-webkit-scrollbar-thumb { background: currentColor; }

.tools-block {
  border: 2px solid currentColor;
  margin: 0;
  padding: 8px 10px 10px;
}
.tools-block legend {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.25em;
  font-weight: 900;
  padding: 0 6px;
}

.tool-row,
.shapes-row {
  display: flex;
  gap: 5px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.tool-btn {
  flex: 1;
  background: transparent;
  color: currentColor;
  border: 2px solid currentColor;
  padding: 6px 4px;
  font: inherit;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.tool-btn.active {
  background: var(--neon);
  color: #000;
  border-color: var(--neon);
}

.shape-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  background: transparent;
  color: currentColor;
  border: 2px solid currentColor;
  cursor: pointer;
  position: relative;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-sans-serif, system-ui, sans-serif;
  padding: 0;
}
.shape-btn::after {
  content: "";
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 0 4px currentColor;
}
.shape-btn[data-shape="round"]::after   { content: "●"; }
.shape-btn[data-shape="square"]::after  { content: "■"; }
.shape-btn[data-shape="calligL"]::after { content: "╱"; font-size: 22px; }
.shape-btn[data-shape="calligR"]::after { content: "╲"; font-size: 22px; }
.shape-btn[data-shape="spray"]::after   { content: "✱"; font-size: 22px; }
.shape-btn[data-shape="ink"]::after     { content: "≋"; font-size: 24px; }

.shape-btn.active {
  background: var(--neon);
  color: #000;
  border-color: var(--neon);
}

.size-control {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.size-preview {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  position: relative;
}
.size-preview::after {
  content: "";
  background: var(--neon);
  border-radius: 50%;
  width: var(--preview-size, 12px);
  height: var(--preview-size, 12px);
  max-width: 50px;
  max-height: 50px;
  box-shadow: 0 0 8px var(--neon);
  transition: width 0.12s ease, height 0.12s ease;
}

#sizeSlider {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 36px;
  cursor: pointer;
  padding: 0;
  margin: 0;
}
#sizeSlider::-webkit-slider-runnable-track {
  height: 14px;
  background: var(--neon);
  border: 2px solid currentColor;
  box-shadow: 0 0 12px var(--neon-soft), inset 0 0 0 2px rgba(0, 0, 0, 0.55);
}
#sizeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  background: #000;
  border: 4px solid var(--neon);
  border-radius: 50%;
  margin-top: -10px;
  cursor: grab;
  box-shadow: 0 0 14px var(--neon), 0 0 0 2px #000;
}
#sizeSlider::-moz-range-track {
  height: 14px;
  background: var(--neon);
  border: 2px solid currentColor;
  box-shadow: 0 0 12px var(--neon-soft), inset 0 0 0 2px rgba(0, 0, 0, 0.55);
}
#sizeSlider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: #000;
  border: 4px solid var(--neon);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 0 14px var(--neon), 0 0 0 2px #000;
}

.palette {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 6px;
}
.palette-swatch {
  aspect-ratio: 1;
  border: 2px solid currentColor;
  cursor: pointer;
  position: relative;
}
.palette-swatch.active {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  transform: scale(1.05);
}

#customColor {
  -webkit-appearance: none;
  appearance: none;
  background: #111;
  border: 2px solid currentColor;
  width: 100%;
  height: 32px;
  padding: 3px;
  cursor: pointer;
  margin-top: 6px;
}
#customColor::-webkit-color-swatch-wrapper { padding: 0; }
#customColor::-webkit-color-swatch { border: none; }
#customColor::-moz-color-swatch { border: none; }

.onion-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.onion-toggle input { accent-color: var(--neon); }

.frame-quick { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }

/* drawer-tab (mobile) */
.drawer-tab { display: none; }
.editor-backdrop { display: none; }

/* ============ FRAME NAV ============ */

.editor-frame-nav {
  grid-row: 2;
  grid-column: 1 / -1;
  border-top: 2px solid currentColor;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 2px solid currentColor;
  background: var(--bg);
}
.nav-btn {
  width: 38px;
  height: 38px;
  background: transparent;
  color: currentColor;
  border: 2px solid currentColor;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-btn:hover { background: var(--neon-soft); }
.nav-play {
  background: var(--neon-soft);
  font-size: 14px;
}
.nav-play.playing {
  background: var(--neon);
  color: #000;
  border-color: var(--neon);
}

.frame-strip {
  flex: 1;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: currentColor transparent;
  padding: 2px 0;
}
.frame-strip::-webkit-scrollbar { height: 4px; }
.frame-strip::-webkit-scrollbar-thumb { background: currentColor; }

.frame-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 36px;
  background: #111;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.frame-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.frame-thumb.active {
  border-color: currentColor;
  box-shadow: 0 0 10px var(--neon-soft);
}
.frame-thumb.has-drawing::after {
  content: "•";
  position: absolute;
  top: 0;
  right: 2px;
  font-size: 14px;
  color: currentColor;
  text-shadow: 0 0 4px #000;
}

.frame-indicator {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ============ EXPORT OVERLAY ============ */

.export-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  padding: 16px;
}
.export-overlay[hidden] { display: none; }

.export-card {
  width: 100%;
  max-width: 640px;
  border: 3px solid currentColor;
  background: #000;
  padding: 28px 24px 24px;
  box-shadow: 0 0 0 1px #000, 0 0 40px var(--neon-soft);
}
.export-stage {
  font-size: clamp(22px, 5vw, 38px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 18px;
}
.export-bar {
  position: relative;
  height: 24px;
  border: 2px solid currentColor;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 7px,
      rgba(255, 255, 255, 0.06) 7px,
      rgba(255, 255, 255, 0.06) 8px
    );
}
.export-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background:
    linear-gradient(
      90deg,
      transparent 0,
      currentColor 6px,
      currentColor 14px,
      transparent 16px,
      currentColor 18px,
      currentColor 26px,
      transparent 32px
    );
  background-size: 32px 100%;
  animation: bar-shimmer 0.7s linear infinite;
  box-shadow: 0 0 14px currentColor;
  transition: width 0.18s linear;
}
.export-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.export-sub {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
  text-align: center;
  line-height: 1.6;
}
.export-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.export-actions[hidden] { display: none; }
.export-actions .primary-btn { flex: 2; }
.export-actions .ghost-btn { flex: 1; }

/* ============ RESPONSIVE ============ */

@media (max-width: 880px) {
  .marquee { font-size: 12px; }
  .brand-name { font-size: 18px; }
  .brand-sub { display: none; }

  .screen-editor {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto auto;
  }
  .editor-stage {
    grid-column: 1;
    border-left: none;
    border-right: none;
  }

  /* Floating toolbar vira horizontal bottom bar em mobile (overlay sobre stage) */
  .floating-toolbar {
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    justify-self: stretch;
    flex-direction: row;
    gap: 4px;
    padding: 6px;
    margin: 0 12px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 10;
  }
  .floating-toolbar::-webkit-scrollbar { display: none; }
  .ftool {
    width: 64px;
    height: 50px;
    flex-shrink: 0;
  }
  .ftool-divider {
    width: 2px;
    height: 36px;
    margin: 0 2px;
    align-self: center;
  }

  /* Details panel vira drawer slide-from-right */
  .editor-details {
    grid-row: unset;
    grid-column: unset;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 88vw);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    z-index: 60;
    background: #000;
    border-left: 2px solid currentColor;
    border-top: none;
    border-bottom: none;
    border-right: none;
    box-shadow: -8px 0 0 -1px var(--neon-soft), 0 0 40px var(--neon-soft);
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
    transition: transform 280ms cubic-bezier(0.32, 0.72, 0.27, 1);
    padding: 18px 14px;
  }
  .editor-details.open {
    transform: translateX(0);
    -webkit-transform: translateX(0);
  }

  .drawer-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 30%;
    right: 0;
    transform: translateY(-50%);
    width: 34px;
    height: 76px;
    background: #000;
    color: currentColor;
    border: 2px solid currentColor;
    border-right: none;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    padding: 0;
    font: inherit;
    font-weight: 900;
    font-size: 22px;
    z-index: 70;
    transition: right 280ms cubic-bezier(0.32, 0.72, 0.27, 1);
    box-shadow: -4px 4px 0 -1px var(--neon-trace);
  }
  .drawer-tab.open {
    right: min(320px, 88vw);
    box-shadow: none;
  }

  .editor-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 55;
    opacity: 0;
    transition: opacity 260ms ease;
    pointer-events: none;
  }
  .editor-backdrop:not([hidden]) {
    opacity: 1;
    pointer-events: all;
  }

  /* Trim em mobile: opções colapsam pra coluna */
  .trim-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .trim-top .trim-options { justify-content: flex-start; }
}
