/* ---------- Attach menu (G1) ---------- */
.attach-menu-wrap { position: relative; }
.menu {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 20;
  min-width: 200px; padding: 6px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: pop .15s var(--ease);
  transform-origin: bottom left;
}
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 9px; font-size: 14px; text-align: left;
}
.menu button:hover { background: var(--bg-hover); }
.menu .ico { color: var(--text-2); }

/* ---------- Toasts (I7) ---------- */
.toasts {
  position: fixed; left: 50%; top: calc(12px + var(--safe-top)); transform: translateX(-50%);
  z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: calc(100vw - 24px);
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-radius: 12px;
  background: var(--accent); color: var(--accent-text);
  font-size: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-8px);
  transition: opacity .2s, transform .2s var(--ease);
  max-width: 100%;
}
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--danger); color: #fff; }
.toast-action { font-weight: 600; text-decoration: underline; color: inherit; }

/* ---------- Lightbox (E13) ---------- */
.lightbox {
  border: 0; padding: 0; margin: 0; background: transparent;
  width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh;
}
.lightbox::backdrop { background: rgba(0,0,0,.88); }
.lightbox[open] { display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 90dvh; object-fit: contain; border-radius: 8px; }

/* ---------- Drag & drop (G1) ---------- */
.drop-overlay {
  position: absolute; inset: 10px; z-index: 50;
  display: grid; place-items: center;
  border: 2px dashed var(--brand); border-radius: 20px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  font-size: 18px; font-weight: 600; color: var(--brand);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.drop-overlay.show { opacity: 1; }
