/* Prompt — image → generation prompt */

#panel-prompt.panel[hidden] {
  display: none !important;
}

#panel-prompt.panel.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 5rem);
  max-height: calc(100dvh - 5rem);
  overflow: hidden;
  padding: 0;
  margin: 0;
}

body.pr-tab-active #panel-prompt.panel.active {
  min-height: 100dvh;
  max-height: 100dvh;
}

body.pr-tab-active .site-footer,
body.pr-tab-active .site-header .subtitle {
  display: none;
}

body.pr-tab-active .site-header {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.pr-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, #1a1e28 0%, #0c0e12 50%, #08090c 100%);
  color: #e8eef6;
}

.pr-top {
  flex: 0 0 auto;
  padding: 0.5rem 0.9rem 0.4rem;
  border-bottom: 1px solid rgba(140, 170, 210, 0.2);
}

.pr-top h2 {
  margin: 0 0 0.12rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  background: linear-gradient(90deg, #c8e0ff, #9eb8e0, #f0f4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pr-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted, #9aa8b8);
  line-height: 1.4;
  max-width: 48rem;
}

.pr-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 0;
  overflow: hidden;
}

@media (max-width: 860px) {
  .pr-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }
}

.pr-drop-col,
.pr-out-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.75rem;
}

.pr-drop-col {
  border-right: 1px solid rgba(120, 150, 190, 0.15);
}

.pr-dropzone {
  flex: 0 0 auto;
  min-height: 9rem;
  border: 1.5px dashed rgba(140, 180, 230, 0.4);
  border-radius: 12px;
  background: rgba(20, 28, 40, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: center;
}

.pr-dropzone:hover,
.pr-dropzone.is-drag {
  border-color: rgba(200, 170, 90, 0.65);
  background: rgba(40, 36, 20, 0.35);
}

.pr-dropzone strong {
  font-size: 0.95rem;
  color: #e0eaf8;
  font-weight: 600;
}

.pr-dropzone span {
  font-size: 0.78rem;
  color: #8a9aac;
}

.pr-tray {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0.55rem;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-content: flex-start;
}

.pr-thumb {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(140, 170, 210, 0.3);
  background: #121820;
  flex: 0 0 auto;
}

.pr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pr-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 1.35rem;
  height: 1.35rem;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
}

.pr-thumb-remove:hover {
  background: rgba(160, 50, 50, 0.9);
}

.pr-thumb-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 0.6rem;
  padding: 0.15rem 0.25rem;
  background: rgba(0, 0, 0, 0.55);
  color: #c8d4e4;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pr-controls {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.55rem;
}

.pr-emphasis {
  flex: 1 1 12rem;
  min-width: 8rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(120, 160, 200, 0.3);
  background: rgba(12, 16, 22, 0.9);
  color: #e8eef6;
  font: inherit;
  font-size: 0.85rem;
}

.pr-btn {
  appearance: none;
  border: 1px solid rgba(140, 180, 220, 0.4);
  background: linear-gradient(180deg, #3a5a7a 0%, #2a4058 100%);
  color: #f0f6fc;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
}

.pr-btn:hover {
  filter: brightness(1.1);
}

.pr-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.pr-btn.accent {
  border-color: rgba(220, 180, 80, 0.5);
  background: linear-gradient(180deg, #a88430 0%, #7a5c18 100%);
  color: #fff8e8;
}

.pr-status {
  flex: 0 0 auto;
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: #9aabbc;
  min-height: 1.1rem;
}

.pr-status.ok {
  color: #7dffb3;
}

.pr-status.error {
  color: #ff8a9a;
}

.pr-status.pending {
  color: #9ec8f0;
}

.pr-out-label {
  flex: 0 0 auto;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8aa0b8;
  margin-bottom: 0.3rem;
}

.pr-output {
  flex: 1 1 auto;
  min-height: 12rem;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(140, 180, 220, 0.28);
  background: rgba(8, 12, 18, 0.92);
  color: #e8f0fa;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
}

.pr-output:focus {
  outline: none;
  border-color: rgba(180, 200, 240, 0.5);
  box-shadow: 0 0 0 2px rgba(100, 140, 200, 0.15);
}

.pr-out-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.pr-meta {
  flex: 0 0 auto;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: #7a8a9c;
  line-height: 1.35;
}
