/* Artwork modal — the picture side of an adventure (static/artwork.js).
   Rides the existing .modal / .modal-content shell; everything here is .art-*. */

.art-modal { width: min(560px, calc(100vw - 2 * var(--sp-2))); }

.art-tabs { display: flex; gap: 6px; margin: 0 0 14px; }
.art-tabs.hidden { display: none; }
.art-tab {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text-faint);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.art-tab:hover { color: var(--text); }
.art-tab.active { color: var(--accent); border-color: var(--accent); }

/* How the NEXT draw is staged. Two cards rather than a segmented control: each
   look needs a line of explanation, because "Scene" and "Anime character"
   describe a difference you cannot see until after you have paid for it. */
.art-looks { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.art-looks.hidden { display: none; }
.art-looks-lead {
  flex: 1 0 100%;
  margin: 0 0 2px;
  color: var(--text-faint);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.art-look {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text-faint);
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.art-look strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.art-look span { font-size: 12px; line-height: 1.45; opacity: 0.85; }
.art-look:hover { color: var(--text); }
.art-look.active { color: var(--accent); border-color: var(--accent); }

/* The pinned image. Each slot has its own shape, so the frame matches what the
   picture will actually be used as rather than letterboxing everything. */
.art-current {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  margin-bottom: 14px;
  padding: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
}
.art-current-img {
  display: block;
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}
.art-current-img.art-thumbnail { max-height: 300px; }
.art-current-img.art-cover { max-height: 220px; }
.art-current-img.art-sigil,
.art-current-img.art-portrait { max-height: 200px; border-radius: 6px; }
.art-none {
  color: var(--text-faint);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 15px;
}

/* The alternates already generated for this slot — switching is free. */
.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.art-grid.hidden { display: none; }
.art-thumb {
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: none;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  transition: border-color 0.15s, transform 0.15s;
}
.art-thumb:hover { transform: translateY(-2px); }
.art-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.art-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.art-err {
  margin-bottom: 10px;
  color: var(--danger, #dc5a4e);
  font-size: 14px;
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.art-err.hidden { display: none; }

.art-actions .art-spacer { flex: 1; }
.art-actions .hidden { display: none; }

/* Party-panel portraits: the generated face replaces the initial in .pm-avatar
   (see renderMember in app.js) without changing the bubble's geometry. */
.pm-avatar.has-portrait { padding: 0; overflow: hidden; background: none; }
.pm-avatar.has-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.pm-portrait-btn {
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text-faint);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13px;
  cursor: pointer;
}
.pm-portrait-btn:hover { color: var(--accent); border-color: var(--accent); }
