/* The UI gallery (/gallery/ui, /gallery/ui/<id>; static/js/uigallery.js), the Maps | UIs switch above both galleries
   and the UI Designer's public / private row. The viewer itself is css/uiweb.css. */

/* ---------------------------------------------------------------- Maps | UIs */
.gallery-tabs { display: flex; width: max-content; max-width: 100%; margin: 0 auto 18px; gap: 6px; padding: 5px; background: var(--surface-2);
  border: 2px solid var(--line); border-radius: 16px; }
.gallery-tabs a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 18px; border-radius: 11px; color: var(--ink-2);
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; text-decoration: none; }
.gallery-tabs a .i { width: 18px; height: 18px; }
.gallery-tabs a:hover { background: var(--surface-3); color: var(--ink); }
.gallery-tabs a[aria-current="page"] { background: var(--blue); color: #fff; box-shadow: 0 3px 0 var(--blue-d); }

/* ---------------------------------------------------------------- the list */
.ug-toolbar { justify-content: space-between; margin-bottom: 14px; }
.ug-sort { width: auto; grid-auto-columns: minmax(96px, auto); }
.ug-sort .seg-btn { min-height: 38px; padding: 6px 14px; }
.ug-genres { margin-bottom: 20px; }
.ug-genres .chip { padding: 5px 12px; font-size: 0.86rem; }
.ug-card .thumb { aspect-ratio: 16 / 9; background: #0b0f1e; }
.ug-card .thumb img { object-fit: cover; }
.ug-card .thumb .ug-genre { background: rgba(10, 14, 32, 0.72); color: #fff; box-shadow: none; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ug-count { position: absolute; right: 10px; bottom: 10px; padding: 1px 9px; border-radius: 999px; background: rgba(10, 14, 32, 0.72); color: #fff;
  font-size: 0.74rem; font-weight: 800; }
.ug-card .ug-title { -webkit-line-clamp: 1; line-clamp: 1; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; }
.ug-prompt { color: var(--ink-2); font-size: 0.88rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; }
#ug-sentinel { height: 1px; }
@media (max-width: 560px) {
  .ug-toolbar .search { max-width: none; min-width: 0; flex-basis: 100%; }
  .ug-sort { width: 100%; grid-auto-columns: 1fr; }
}

/* ---------------------------------------------------------------- one design */
.ug-page { padding-top: 18px; padding-bottom: 48px; max-width: 1600px; }
.ug-top { margin-bottom: 10px; }
.ug-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; text-decoration: none; color: var(--ink-2); }
.ug-back .i { width: 18px; height: 18px; transform: rotate(180deg); }
.ug-back:hover { color: var(--blue); }
.ug-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); align-items: start; }
.ug-main { min-width: 0; }
.ug-main .ui-head h1 { margin: 0 0 2px; font-size: clamp(1.5rem, 2.6vw, 2rem); overflow-wrap: anywhere; }
.ug-side { display: grid; gap: 18px; min-width: 0; }
.ug-side .owner-line { min-height: 40px; }
.ug-side .owner-line .who { display: grid; line-height: 1.2; min-width: 0; }
.ug-side .owner-line .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ug-chip { cursor: default; box-shadow: none; padding: 4px 11px; font-size: 0.84rem; }
.ug-chip:hover { border-color: var(--line); color: var(--ink-2); }
.ug-chip:active { transform: none; box-shadow: none; }
.ug-side .result-prompt { font-size: 1.02rem; overflow-wrap: anywhere; }
.ug-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.ug-report { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border: 0; background: none; color: var(--ink-3); font: inherit;
  font-weight: 800; cursor: pointer; border-radius: 8px; }
.ug-report .i { width: 16px; height: 16px; }
.ug-report:hover { color: var(--pink); }
.ug-report:disabled { cursor: default; color: var(--ink-3); }
.ug-reasons { display: grid; gap: 6px; margin: 4px 0 12px; }
.ug-reason { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 700; }
.ug-reason:hover { border-color: var(--blue); }
.ug-reason input { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; }
.ug-reasons + .textarea { width: 100%; margin-bottom: 12px; }
@media (max-width: 1000px) { .ug-layout { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- the UI Designer's public / private row */
.ui-share { padding: 10px 0 0; }
.ui-share-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.ui-share-side .tiny { max-width: 44ch; }
