.ed { display: grid; grid-template-columns: 1fr 400px; height: calc(100vh - 64px); min-height: 560px; }
.stage { position: relative; display: grid; place-items: center; padding: 16px; background: radial-gradient(70% 60% at 50% 100%, rgba(245,138,31,.12), transparent 70%), var(--ink); overflow: hidden; }
.side { background: var(--panel); border-left: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; min-height: 0; }
.side .body { flex: 1; overflow: auto; padding: 18px 18px 8px; }
.side .actions { padding: 14px 18px 18px; border-top: 1px solid rgba(255,255,255,.07); background: var(--panel2); }
.side .actions .row { display: flex; gap: 10px; }
.side .actions .btn { flex: 1; }
#msg { font-size: 12px; color: var(--mute); margin-top: 10px; min-height: 18px; text-align: center; }

.tabs3 { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid rgba(255,255,255,.07); }
.tabs3 button { border: 0; background: transparent; color: var(--mute); font: inherit; font-weight: 700; font-size: 14px; padding: 15px 8px; cursor: pointer; border-bottom: 3px solid transparent; }
.tabs3 button.on { color: var(--cream); border-bottom-color: var(--orange); }

/* área vazia */
.empty { text-align: center; max-width: 440px; }
.empty .drop { border: 2px dashed var(--track); border-radius: 28px; padding: 46px 28px; background: rgba(18,41,44,.5); }
.empty .drop.over { border-color: var(--orange); background: rgba(245,138,31,.08); }
.empty h2 { font-size: 26px; }
.empty .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* faixa de fotos (até 5) */
.strip { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; gap: 10px; justify-content: center; align-items: center; padding: 0 12px; }
.strip .ph { position: relative; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; border: 2px solid transparent; background: var(--panel2); cursor: pointer; flex: none; padding: 0; }
.strip .ph.on { border-color: var(--orange); }
.strip .ph canvas { width: 100%; height: 100%; display: block; object-fit: cover; }
.strip .ph .rm { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; line-height: 20px; cursor: pointer; padding: 0; }
.strip .add { width: 64px; height: 64px; border-radius: 14px; border: 2px dashed var(--track); background: transparent; color: var(--orange); font-size: 26px; font-weight: 600; cursor: pointer; flex: none; }
.strip .count { color: var(--mute); font-size: 12px; font-weight: 700; margin-left: 4px; }
.savebar { display: flex; gap: 8px; margin-bottom: 14px; }
.fcard .del { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 14px; line-height: 22px; cursor: pointer; padding: 0; }
.fcard.new .th { display: grid; place-items: center; border: 2px dashed var(--orange); color: var(--orange); font-size: 30px; font-weight: 500; }

/* foto com antes/depois */
.frame { position: relative; touch-action: none; user-select: none; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5); cursor: ew-resize; background: #000; }
.frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.handle { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--cream); transform: translateX(-1px); pointer-events: none; }
.handle i { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; border-radius: 50%; background: var(--cream); transform: translate(-50%, -50%); box-shadow: 0 3px 12px rgba(0,0,0,.4); }
.handle i::before, .handle i::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border-top: 2.5px solid var(--orange); border-left: 2.5px solid var(--orange); }
.handle i::before { left: 7px; transform: translateY(-50%) rotate(-45deg); }
.handle i::after { right: 7px; transform: translateY(-50%) rotate(135deg); }
.tg { position: absolute; top: 10px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.55); color: var(--cream); padding: 5px 12px; border-radius: 999px; pointer-events: none; }
.tg.l { left: 10px; } .tg.r { right: 10px; }

/* filtros */
.packs { display: flex; gap: 20px; margin-bottom: 14px; }
.packs button { border: 0; background: transparent; color: var(--mute); font: inherit; font-weight: 700; font-size: 13px; padding: 4px 0 6px; cursor: pointer; border-bottom: 3px solid transparent; }
.packs button.on { color: var(--cream); border-bottom-color: var(--orange); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 14px 10px; }
.fcard { border: 0; background: transparent; color: var(--soft); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; padding: 0; text-align: center; }
.fcard .th { position: relative; display: block; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--panel2); border: 2px solid transparent; margin-bottom: 6px; }
.fcard.on .th { border-color: var(--orange); }
.fcard.on { color: var(--orange); }
.fcard canvas { width: 100%; height: 100%; display: block; }
.fcard .pro { position: absolute; top: 5px; right: 5px; font-size: 9px; font-weight: 800; letter-spacing: .06em; background: var(--sun); color: #2a1408; padding: 2px 6px; border-radius: 999px; }
.fcard.locked canvas { filter: saturate(.6) brightness(.8); }

/* controles */
.grp { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); margin: 18px 0 6px; }
.grp:first-child { margin-top: 0; }
.sl { display: grid; grid-template-columns: 1fr 1.3fr; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; color: var(--soft); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: var(--track); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--orange); border: 3px solid var(--cream); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--orange); border: 3px solid var(--cream); cursor: pointer; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.opt { border: 0; background: rgba(255,255,255,.07); color: var(--soft); font: inherit; font-weight: 600; font-size: 12px; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.opt.on { background: rgba(245,138,31,.2); color: var(--orange); box-shadow: inset 0 0 0 1.5px var(--orange); }
.chk { display: flex; align-items: center; gap: 10px; font-size: 13px; margin: 14px 0 4px; color: var(--soft); cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--orange); }

@media (max-width: 860px) {
  .ed { grid-template-columns: 1fr; grid-template-rows: 54vh auto; height: auto; }
  .side { border-left: 0; border-top: 1px solid rgba(255,255,255,.06); }
  .side .body { max-height: 38vh; }
}
