/* refresh/universes.css — Play vs bots, universes first: the list of
   universes, a universe's page (its ladder, then the selected bot and the game
   options pinned at the bottom), and the Home card's boss circle. The page
   frame (padding, header) comes from shell.css. */

/* --- the list of universes ----------------------------------------------- */
#screen-universes .universes-body { display: flex; flex-direction: column; gap: 14px; }
.universes-list { display: flex; flex-direction: column; gap: 10px; }
.uv-card {
  display: flex; align-items: center; gap: 14px; width: 100%; box-sizing: border-box;
  padding: 14px 14px 14px 12px !important; margin: 0; text-align: left;
  background: var(--rf-surface); border: 1px solid var(--rf-card-line); border-radius: 18px !important;
  color: var(--rf-text); font: inherit; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}
.uv-card:active { transform: scale(.985); }
.uv-card.on { border-color: color-mix(in srgb, var(--rf-accent) 55%, transparent); }
.uv-card-ava {
  flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--rf-accent);
  background: radial-gradient(circle at 40% 35%, var(--rf-ava-a) 0%, var(--rf-ava-b) 72%);
  font: 700 24px var(--rf-font-display); color: color-mix(in srgb, var(--rf-text) 85%, transparent);
}
.uv-card-ava img, .uv-boss-ava img, .uv-ava img, .sel-ava img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block;
}
.uv-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.uv-card-text > b { font: 700 19px/1.15 var(--rf-font-display); color: var(--rf-text); }
.uv-card-blurb {
  font: 400 13px/1.35 var(--rf-font-sans); color: var(--rf-text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.uv-card-meta { display: flex; justify-content: space-between; gap: 8px; font: 600 12px var(--rf-font-sans); color: var(--rf-sub); }
.uv-card-meta i { font-style: normal; font-weight: 700; color: var(--rf-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uv-card-meta span { flex: none; }
.uv-bar { display: block; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--rf-text) 10%, transparent); overflow: hidden; }
.uv-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--rf-accent); }
.uv-chev { flex: none; font: 400 26px var(--rf-font-sans); color: var(--rf-sub); margin-left: -2px; }
#screen-universes .uv-all {
  align-self: center; height: 40px; margin: 2px 0 8px; padding: 0 !important; background: none;
  color: var(--rf-accent); font: 700 14px var(--rf-font-sans);
}

/* --- a universe's page ---------------------------------------------------- */
/* The page fills the screen: the ladder scrolls, the options stay at the bottom. */
:is(#screen-universe, #screen-group).active { display: flex; flex-direction: column; height: 100dvh; min-height: 0; overflow: hidden; }
:is(#screen-universe, #screen-group) .universe-body {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  margin: 0 -20px !important; padding: 0 20px 12px !important;
}
.uv-hero { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.uv-boss-ava {
  flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  box-shadow: 0 0 0 3px var(--rf-accent), 0 0 0 9px color-mix(in srgb, var(--rf-accent) 10%, transparent);
  background: radial-gradient(circle at 40% 35%, var(--rf-ava-a) 0%, var(--rf-ava-b) 72%);
  font: 700 28px var(--rf-font-display); color: color-mix(in srgb, var(--rf-text) 85%, transparent);
}
.uv-hero-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.uv-hero-text h2 { margin: 0; font: 700 24px/1.1 var(--rf-font-display); color: var(--rf-text); text-transform: none; }
.uv-hero-text p { margin: 0; font: 400 13px/1.35 var(--rf-font-sans); color: var(--rf-text-2); }
.uv-hero-text span { font: 700 12px var(--rf-font-sans); color: var(--rf-accent); }

.uv-list { display: flex; flex-direction: column; gap: 8px; }
.uv-row {
  display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; min-height: 64px;
  padding: 10px 14px 10px 10px !important; margin: 0; text-align: left;
  background: var(--rf-surface); border: 1px solid var(--rf-card-line); border-radius: 16px !important;
  color: var(--rf-text); font: inherit; cursor: pointer; transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.uv-row:active { transform: scale(.985); }
.uv-row.on {
  border-color: var(--rf-accent);
  background: color-mix(in srgb, var(--rf-accent) 10%, var(--rf-surface));
}
.uv-row.boss { border-color: color-mix(in srgb, var(--rf-accent) 35%, var(--rf-card-line)); }
.uv-row.boss.on { border-color: var(--rf-accent); }
.uv-rung { flex: none; width: 18px; text-align: center; font: 700 14px var(--rf-font-display); color: var(--rf-sub); }
.uv-ava {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: visible;
  display: grid; place-items: center; font: 400 22px/1 var(--rf-font-sans);
  background: radial-gradient(circle at 40% 35%, var(--rf-ava-a) 0%, var(--rf-ava-b) 72%);
  box-shadow: 0 0 0 1px var(--rf-card-line);
}
.uv-ava.has-face { overflow: hidden; }
.uv-row.boss .uv-ava { box-shadow: 0 0 0 2px var(--rf-accent); }
.uv-tick {
  position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font: 800 11px/1 var(--rf-font-sans); font-style: normal;
  background: var(--rf-accent); color: var(--rf-accent-text); box-shadow: 0 0 0 2px var(--rf-surface);
}
.uv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.uv-text b { font: 700 15px var(--rf-font-sans); color: var(--rf-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uv-text > span { font: 400 12px/1.3 var(--rf-font-sans); color: var(--rf-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uv-boss-tag {
  display: inline-block; margin-left: 4px; padding: 2px 6px; border-radius: 6px; vertical-align: 2px;
  font: 800 9px var(--rf-font-sans); font-style: normal; letter-spacing: .12em;
  background: color-mix(in srgb, var(--rf-accent) 18%, transparent); color: var(--rf-accent);
}
/* The tag sits inside the name; home-play.css's ".uv-text span" clamp rule
   would otherwise turn it into a full-width block. */
#screen-universe .uv-text b .uv-boss-tag { display: inline-block; font: 800 9px var(--rf-font-sans); color: var(--rf-accent); -webkit-line-clamp: unset; }
.uv-elo { flex: none; font: 800 13px var(--rf-font-sans); color: var(--rf-accent); }

/* --- the selected bot and the game options --------------------------------- */
.uv-controls-slot {
  flex: none; margin: 0 -20px; padding: 12px 20px 0;
  border-top: 1px solid var(--rf-card-line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--rf-bg) 70%, transparent), var(--rf-bg) 30%);
}
.play-controls-slot { margin-top: auto; }
#screen-play .play-body { justify-content: flex-end; }
:is(#screen-play, #screen-universe, #screen-group) .sel-bot { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; align-self: stretch; box-sizing: border-box; }
.sel-ava {
  flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--rf-accent); background: radial-gradient(circle at 40% 35%, var(--rf-ava-a) 0%, var(--rf-ava-b) 72%);
  font: 400 26px/1 var(--rf-font-sans); color: color-mix(in srgb, var(--rf-text) 85%, transparent);
}
.sel-ava:not(.has-face) { font-family: var(--rf-font-display); font-weight: 700; font-size: 20px; }
.sel-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sel-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sel-top b { font: 700 18px var(--rf-font-display); color: var(--rf-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#screen-play, #screen-universe, #screen-group) .sel-top .elo { flex: none; font-size: 12px; }
:is(#screen-play, #screen-universe, #screen-group) .sel-text .quote {
  max-width: none; margin: 0; font: italic 400 13px/1.3 var(--rf-font-display); color: var(--rf-text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sel-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sel-tags:not(:has(> :not(.hidden))) { display: none; }
:is(#screen-play, #screen-universe, #screen-group) .sel-tags :is(.beaten, .play-wardrobe):not(.hidden) {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font: 700 11px var(--rf-font-sans);
}
:is(#screen-play, #screen-universe, #screen-group) .sel-tags #play-style { font-size: 12px; }

/* Home's bots card: refresh/home-play.css (#65 put Online first). */

@media (prefers-reduced-motion: reduce) {
  .uv-card, .uv-row {
    transition: border-color .12s ease, background .12s ease !important;
  }
  .uv-card:active, .uv-row:active {
    transform: none !important;
  }
}

.uv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px 20px;
}
.uv-poster {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--rf-card-line);
  background: var(--rf-surface);
  aspect-ratio: 3 / 4;
  cursor: pointer;
}
.uv-poster-img {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 40% 35%, var(--rf-ava-a) 0%, var(--rf-ava-b) 72%);
  display: grid;
  place-items: center;
  font: 700 32px var(--rf-font-display);
  color: rgba(243, 236, 221, .85);
}
.uv-poster-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
}
.uv-poster-grad {
  position: absolute;
  top: 40%; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(13, 11, 20, 0.95));
}
.uv-poster-text {
  position: relative;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1;
  text-align: left;
}
.uv-poster-text b, .uv-poster .uv-poster-text b.serif {
  font: 700 16px/1.2 var(--rf-font-display);
  color: #F7F1E4;
}
.uv-poster-meta {
  font: 600 11px var(--rf-font-sans);
  color: #CFC6B3; /* on the picture's dark fade, in every theme */
}

.uv-group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 0 16px;
}
.uv-group-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--rf-card-line);
  background: var(--rf-surface);
  cursor: pointer;
  text-align: center;
}
.uv-group-card.boss {
  border-color: var(--rf-accent);
}
.uv-group-ava {
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 35%, var(--rf-ava-a) 0%, var(--rf-ava-b) 72%);
  font: 700 20px var(--rf-font-display);
  color: color-mix(in srgb, var(--rf-text) 85%, transparent);
  box-shadow: 0 0 0 1px var(--rf-card-line);
}
.uv-group-card.boss .uv-group-ava {
  box-shadow: 0 0 0 2px var(--rf-accent);
}
.uv-group-ava img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
}
.uv-group-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.uv-group-text b {
  font: 700 14px/1.2 var(--rf-font-sans);
  color: var(--rf-text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.uv-group-meta {
  font: 400 12px var(--rf-font-sans);
  color: var(--rf-sub);
}
