/* Arthur Vision — full-page A1111 editor (phone shell hidden) */

body.av-open {
  overflow: hidden;
}
body.av-open .stage {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform .45s ease, opacity .35s ease;
}
.stage {
  transition: transform .45s ease, opacity .35s ease;
}

#arthur-vision {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  flex-direction: column;
  background: #05010a;
  color: #fff5fb;
  font-family: Syne, system-ui, sans-serif;
}
body.av-open #arthur-vision {
  display: flex;
}

.av-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 1px solid rgba(255,45,149,.28);
  background: #0a0314;
}
.av-top h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.av-engine {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #00f0ff;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.av-back {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(0,240,255,.4);
  background: transparent;
  color: #00f0ff;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.av-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
}
@media (max-width: 860px) {
  .av-layout { grid-template-columns: 1fr; grid-template-rows: minmax(240px, 48vh) 1fr; }
}

.av-stage {
  position: relative;
  background: #000;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.av-stage canvas {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
}
#av-mask { cursor: crosshair; }

.av-panel {
  overflow: auto;
  padding: 12px 14px 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  border-left: 1px solid rgba(255,45,149,.22);
  background: rgba(8,2,16,.96);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.av-panel label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffc2e2;
}
.av-panel textarea,
.av-panel input[type="text"],
.av-panel select,
.av-panel input[type="number"] {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,45,149,.35);
  background: #14081c;
  color: #fff5fb;
  font: 15px/1.35 system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  padding: 8px 10px;
}
.av-panel textarea { min-height: 72px; resize: vertical; }
.av-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.av-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.av-tools button, .av-run, .av-file {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.av-tools button {
  background: #ffffff14;
  color: #fff;
  padding: 0 10px;
}
.av-tools button.on { background: #ff2d95; }
.av-run {
  background: linear-gradient(90deg, #ff2d95, #9b30ff);
  color: #fff;
  box-shadow: 0 0 22px rgba(255,45,149,.35);
}
.av-run:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.av-status { min-height: 1.3em; font-size: 13px; color: #f3c6e4; }
.av-status.err { color: #ff6b8a; }
.av-status.ok { color: #3dffb5; }
.av-range { display: grid; gap: 4px; }
.av-range input { width: 100%; accent-color: #ff2d95; }
.av-file { background: #00f0ff22; color: #00f0ff; padding: 0 12px; display: grid; place-items: center; }
.av-hint { font-size: 12px; color: #f3c6e4cc; letter-spacing: 0; text-transform: none; }
