/* Premium public / showcase player card */

body.mode-showcase {
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(200, 255, 60, 0.1), transparent 50%),
    radial-gradient(800px 500px at 0% 100%, rgba(46, 224, 176, 0.08), transparent 45%),
    #05070c;
}
body.mode-showcase #app {
  width: min(430px, 100%);
  padding: 0 0 calc(28px + var(--safe-bottom));
}
body.mode-showcase .topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  margin: 0;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: linear-gradient(to bottom, rgba(5, 7, 12, 0.72), transparent);
}
body.mode-showcase .brand-text { display: none; }
body.mode-showcase .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding-block: 4px;
  padding-inline-start: 10px;
  padding-inline-end: 14px;
  border-radius: 999px;
  background: rgba(8, 14, 12, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  color: #f4f7f2;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
body.mode-showcase .brand:active {
  transform: scale(0.97);
  background: rgba(8, 14, 12, 0.88);
  border-color: rgba(200, 255, 60, 0.4);
  filter: brightness(1.08);
}
body.mode-showcase .home-back,
body.mode-showcase .home-back-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.mode-showcase .home-back-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
  color: #c8ff3c;
}
body.mode-showcase .home-back-label {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #f4f7f2;
}
body.mode-showcase .logo-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  font-size: 0.85rem;
  box-shadow: 0 0 0 3px rgba(200, 255, 60, 0.15);
}

.ut-card {
  position: relative;
  background: #0a1118;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.ut-card.compact {
  border-radius: 28px;
  margin: 0 16px 16px;
  border: 1px solid rgba(200, 255, 60, 0.12);
}

.ut-hero {
  position: relative;
  height: 400px;
  background: #122018;
  overflow: hidden;
}
.ut-card.compact .ut-hero { height: 260px; }
.ut-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
}
.ut-hero-img.is-cloud { object-position: center center; }
.ut-hero-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 5rem;
  color: rgba(200, 255, 60, 0.35);
  background: linear-gradient(160deg, #1a3a30, #0a1512);
}
.ut-hero-img { opacity: 0; }
.ut-hero.has-photo.is-ready .ut-hero-fallback { display: none; }
.ut-hero.is-ready .ut-hero-img { opacity: 1; }
.ut-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #070b12 0%, rgba(7, 11, 18, 0.82) 28%, rgba(7, 11, 18, 0.15) 55%, transparent 70%),
    linear-gradient(to bottom, rgba(5, 7, 12, 0.25), transparent 22%);
  pointer-events: none;
}

.ut-hero-content {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 0 18px 18px;
  z-index: 1;
}

.ut-badge {
  flex: 0 0 86px;
  width: 86px;
  border-radius: 20px;
  background: linear-gradient(180deg, #e8ff7a 0%, #b6f12a 40%, #7fb80c 100%);
  color: #07140a;
  text-align: center;
  padding: 10px 6px 8px;
  box-shadow: 0 0 0 3px rgba(200, 255, 60, 0.22), 0 10px 28px rgba(0, 0, 0, 0.4);
}
.ut-badge b {
  display: block;
  font-family: "Oswald", "Heebo", sans-serif;
  font-size: 2.7rem;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.ut-badge span {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  margin-top: 4px;
  line-height: 1.2;
}
.ut-badge em {
  display: block;
  font-style: normal;
  font-weight: 800;
  font-size: 0.72rem;
  opacity: 0.75;
  margin-top: 1px;
}
.ut-badge.band-D { background: linear-gradient(180deg, #bfe8e4, #6aa8a4); }
.ut-badge.band-C { background: linear-gradient(180deg, #7ff5d4, #1aa88a); }
.ut-badge.band-B { background: linear-gradient(180deg, #e8ff7a, #7fb80c); }
.ut-badge.band-A { background: linear-gradient(180deg, #ffe08a, #e0a020); }

.ut-id { flex: 1; min-width: 0; padding-bottom: 2px; }
.ut-id h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}
.ut-card.compact .ut-id h1 { font-size: 1.4rem; }
.ut-id p {
  margin: 4px 0 0;
  color: rgba(243, 247, 241, 0.82);
  font-weight: 600;
  font-size: 0.95rem;
}

.ut-body { padding: 8px 16px 22px; }
.ut-card.compact .ut-body { padding: 6px 14px 16px; }

.ut-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0 12px;
}
.ut-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 10px 10px;
}
.ut-stat .ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(200, 255, 60, 0.1);
  color: var(--lime);
  display: grid;
  place-items: center;
  flex: 0 0 32px;
}
.ut-stat .ico svg { width: 18px; height: 18px; display: block; }
.ut-stat .k { display: block; font-size: 0.68rem; color: var(--muted); font-weight: 700; }
.ut-stat .v { display: block; font-size: 0.92rem; font-weight: 800; line-height: 1.2; }

.ut-section {
  margin: 14px 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.ut-shots, .shot-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ut-shots .pill, .ut-card .pill {
  background: rgba(200, 255, 60, 0.08);
  border: 1px solid rgba(200, 255, 60, 0.22);
  color: var(--lime);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}
.ut-ratings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.ut-rate {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}
.ut-rate .rk { display: block; font-size: 0.68rem; color: var(--muted); font-weight: 700; letter-spacing: 0.04em; }
.ut-rate .rv {
  display: block;
  font-family: "Oswald", "Heebo", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--lime);
  line-height: 1.1;
  margin-top: 2px;
}
.ut-rating-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(200, 255, 60, 0.08);
  border: 1px solid rgba(200, 255, 60, 0.28);
}
.ut-rating-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.ut-rating-value {
  font-family: "Oswald", "Heebo", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--lime);
  line-height: 1;
  font-style: normal;
}
.ut-card.compact .ut-rating-line { padding: 11px 14px; margin-bottom: 10px; }
.ut-card.compact .ut-rating-value { font-size: 1.4rem; }
.pair-plate #pair-level-num {
  direction: ltr;
  font-family: "Oswald", "Heebo", sans-serif;
  letter-spacing: 0.02em;
  font-size: 0.86rem;
  margin-top: 3px;
}
#local-card-actions {
  display: grid;
  gap: 10px;
}
.ut-line {
  margin: 10px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}
.ut-line b { color: var(--text); font-weight: 800; }

.ut-card .partner-chip, .ut-card .ut-partner {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.04);
}
.ut-card .video-list { margin-top: 0; }
.ut-card .video-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}
.ut-card .empty-videos {
  background: transparent;
  border-style: dashed;
  margin: 0;
}

.ut-dock {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, 100%);
  padding: 16px 16px calc(16px + var(--safe-bottom));
  background: linear-gradient(to top, #05070c 55%, rgba(5, 7, 12, 0));
  z-index: 40;
}
.btn-dock {
  width: 100%;
  font-size: 1.05rem;
  padding: 15px 18px;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.28);
}
.dock-phone { display: none !important; }
body.mode-showcase.has-dock #app { padding-bottom: 0; }
body.mode-showcase.has-dock #card-root { padding-bottom: 118px; }
.ut-hero-content { flex-direction: row; }


.ut-owner-bar {
  padding: 16px 16px 8px;
  display: grid;
  gap: 10px;
}

/* Pair plate */
.pair-plate {
  text-align: center;
  padding: calc(64px + var(--safe-top)) 20px 22px;
}
.pair-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--lime);
  border: 1px solid rgba(200, 255, 60, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.pair-plate .ut-badge {
  margin: 0 auto 14px;
  flex: none;
  width: 100px;
  padding: 12px 8px 10px;
}
.pair-plate .ut-badge b { font-size: 3.1rem; }
.pair-names {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pair-plate .pair-flags {
  justify-content: center;
  margin-bottom: 8px;
}
.pair-blurb {
  margin: 0 auto;
  max-width: 34em;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.pair-stack { padding-bottom: 8px; }

/* Home demos */
.demo-block { margin-top: 22px; display: grid; gap: 10px; position: relative; z-index: 1; }
.demo-kicker {
  margin: 0 0 2px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.demo-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 12px 8px 8px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.demo-tile:hover { border-color: rgba(200, 255, 60, 0.45); }
.demo-tile > img, .demo-duo img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: #163226;
}
.demo-duo { display: flex; }
.demo-duo img { width: 44px; height: 56px; }
.demo-duo img + img { margin-right: -12px; border: 2px solid #10241c; }
.demo-copy { display: flex; flex-direction: column; }
.demo-copy strong { font-size: 0.95rem; font-weight: 800; }
.demo-copy em { font-style: normal; color: var(--muted); font-size: 0.8rem; font-weight: 600; }

.ut-wa-mini {
  display: block;
  margin-top: 12px;
  text-align: center;
  background: #25d366;
  color: #06210f;
  font-weight: 800;
  text-decoration: none;
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 0.9rem;
}

.ut-phone-line {
  margin: 10px 18px 0;
  text-align: center;
  font-family: "Oswald", "Heebo", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: rgba(232, 244, 236, 0.72);
  direction: ltr;
}


.ut-video-tile, .video-item.ut-video-tile {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #05070c;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}
.ut-video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #12161d;
}
.ut-video-fallback {
  background:
    radial-gradient(circle at 30% 20%, rgba(123, 255, 74, 0.16), transparent 50%),
    #12161d;
}
.ut-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 12, 10, 0.62);
  box-shadow: 0 0 0 3px rgba(123, 255, 74, 0.85), 0 10px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  appearance: none;
}
.ut-play-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #7bff4a;
  transform: translate(-50%, -50%);
}
.ut-video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  max-height: none;
  border-radius: 16px;
}
.ut-card .ut-video-tile {
  border: 1px solid rgba(255, 255, 255, 0.08);
}


/* Owner-only prompt to replace a legacy low-res / data-URL photo */
.photo-quality-prompt {
  margin: 14px 16px 0;
  padding: 14px 16px 16px;
  border-radius: 18px;
  background: rgba(200, 255, 60, 0.1);
  border: 1px solid rgba(200, 255, 60, 0.3);
  display: grid;
  gap: 10px;
}
.photo-quality-prompt.hidden { display: none; }
.photo-quality-prompt p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  color: #f4ffe8;
}
.photo-quality-prompt #card-photo-upload-label {
  position: relative;
  overflow: hidden;
}
.photo-quality-prompt input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  display: block;
  font-size: 24px;
  z-index: 2;
}
.photo-quality-prompt .btn { width: 100%; text-align: center; margin: 0; }
.photo-quality-prompt .upload-progress { margin-top: 2px; }

.ut-card > .photo-quality-prompt {
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}

.ut-video-tile .ut-track-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  margin: 0;
}

/* ---------- AI Rating (v12) ---------- */
.ut-rating-line + .ut-ai { margin-top: -6px; }
.ut-ai {
  margin: 0 0 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(46, 224, 176, 0.12), rgba(46, 224, 176, 0.04) 60%);
  border: 1px solid rgba(46, 224, 176, 0.32);
  overflow: hidden;
}
.ut-ai-line {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: right;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ut-ai-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ut-ai-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--teal);
  direction: ltr;
  unicode-bidi: isolate;
  align-self: flex-start;
}
.ut-ai-spark { display: inline-block; margin-inline-end: 5px; font-size: 0.85em; }
.ut-ai-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.ai-conf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.7rem;
  border: 1px solid currentColor;
}
.ai-conf::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ai-conf.conf-low { color: var(--gold); background: rgba(240, 193, 74, 0.1); }
.ai-conf.conf-medium { color: #7fd8ff; background: rgba(127, 216, 255, 0.1); }
.ai-conf.conf-high { color: var(--lime); background: rgba(200, 255, 60, 0.1); }
.ut-ai-value {
  font-family: "Oswald", "Heebo", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--teal);
  line-height: 1;
  white-space: nowrap;
}
.ut-ai-chev {
  width: 9px; height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-top: -5px;
  transition: transform 0.2s ease;
  flex: none;
}
.ut-ai.is-open .ut-ai-chev { transform: rotate(-135deg); margin-top: 5px; }
.ut-ai-details { padding: 2px 16px 14px; border-top: 1px solid rgba(46, 224, 176, 0.18); }
.ut-ai-expl { margin: 12px 0 4px; font-size: 0.92rem; line-height: 1.6; color: var(--text); }
.ut-ai-group { margin: 12px 0 6px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); }
.ai-bar { display: grid; grid-template-columns: 7.2em 1fr 3.6em; align-items: center; gap: 10px; margin: 7px 0; font-size: 0.84rem; }
.ai-bar-k { font-weight: 700; color: var(--text); white-space: nowrap; }
.ai-bar-track { height: 7px; border-radius: 99px; background: rgba(244, 247, 242, 0.08); overflow: hidden; direction: rtl; }
.ai-bar-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(270deg, var(--teal), var(--lime)); }
.ai-bar-v { font-family: "Oswald", "Heebo", sans-serif; font-weight: 600; color: var(--muted); text-align: left; font-size: 0.82rem; }
.ai-bar.is-empty .ai-bar-v { font-family: var(--font); font-size: 0.72rem; }
.ai-bar.is-empty .ai-bar-k { color: var(--muted); }
.ut-ai-foot { margin: 12px 0 0; font-size: 0.72rem; color: var(--muted); }
.ut-card.compact .ut-ai-line { padding: 10px 14px; }
.ut-card.compact .ut-ai-value { font-size: 1.4rem; }
.ut-card.compact .ai-bar { grid-template-columns: 6.4em 1fr 3.2em; gap: 7px; font-size: 0.78rem; }

.ut-ai-cta { margin: 14px 0 4px; }
.btn-ai {
  width: 100%;
  color: #04140f;
  background: linear-gradient(135deg, var(--teal), var(--lime));
  box-shadow: 0 10px 28px rgba(46, 224, 176, 0.22);
}
.btn-ai .ut-ai-spark { margin: 0; }
.btn-ai.is-loading, .btn-ai:disabled {
  cursor: progress;
  color: var(--text);
  background: rgba(46, 224, 176, 0.12);
  border: 1px solid rgba(46, 224, 176, 0.4);
  box-shadow: none;
  font-size: 0.92rem;
  opacity: 1;
}
.ai-spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(46, 224, 176, 0.25);
  border-top-color: var(--teal);
  animation: ai-spin 0.8s linear infinite;
  flex: none;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ut-ai-hint { margin: 8px 2px 0; font-size: 0.76rem; color: var(--muted); line-height: 1.5; text-align: center; }

/* ---------- AI Rating progress + per-video status (v13) ---------- */
.ai-run {
  border-radius: 18px;
  padding: 14px 14px 12px;
  background: linear-gradient(160deg, rgba(46, 224, 176, 0.12), rgba(16, 36, 28, 0.6));
  border: 1px solid rgba(46, 224, 176, 0.34);
  margin-bottom: 10px;
}
.ai-run-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ai-run-title { font-weight: 800; font-size: 0.98rem; color: var(--text); }
.ai-run-title .ut-ai-spark { color: var(--teal); }
.ai-run-pct { font-family: "Oswald", "Heebo", sans-serif; font-size: 1.35rem; font-weight: 700; color: var(--teal); line-height: 1; }
.ai-run-bar {
  position: relative;
  height: 10px;
  margin: 10px 0 8px;
  border-radius: 99px;
  background: rgba(244, 247, 242, 0.08);
  overflow: hidden;
  direction: rtl;
}
.ai-run-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(270deg, var(--teal), var(--lime));
  transition: width 0.25s linear;
  position: relative;
  overflow: hidden;
}
.ai-run.is-running .ai-run-fill::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(100%);
  animation: ai-shine 1.6s ease-in-out infinite;
}
@keyframes ai-shine { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.ai-run-stage { margin: 0 0 8px; font-size: 0.82rem; font-weight: 700; color: var(--muted); min-height: 1.2em; }
.ai-run.is-finished .ai-run-stage { color: var(--text); }
.ai-run-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-run-list.idle { margin: 10px 0 0; }
.ai-run-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 12px;
  background: rgba(7, 18, 14, 0.45);
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ai-thumb {
  flex: none;
  width: 54px; height: 34px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #163228, #0c1c16);
  border: 1px solid rgba(244, 247, 242, 0.08);
}
.ai-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-run-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ai-run-txt b { font-size: 0.88rem; }
.ai-run-sub { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-run-mini { display: block; height: 4px; border-radius: 99px; background: rgba(244, 247, 242, 0.08); overflow: hidden; margin-top: 4px; direction: rtl; }
.ai-run-mini-fill { display: block; height: 100%; background: var(--teal); border-radius: 99px; transition: width 0.25s linear; }
.ai-st {
  flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.st-done .ai-st { color: var(--lime); background: rgba(200, 255, 60, 0.12); }
.st-running { border-color: rgba(46, 224, 176, 0.55); background: rgba(46, 224, 176, 0.08); }
.st-running .ai-st { color: var(--teal); background: rgba(46, 224, 176, 0.14); }
.st-waiting .ai-st { color: var(--muted); background: rgba(244, 247, 242, 0.06); }
.st-failed { border-color: rgba(255, 107, 107, 0.45); }
.st-failed .ai-st { color: var(--danger); background: rgba(255, 107, 107, 0.12); }
.st-failed .ai-run-sub { color: #ffb0b0; }
.st-unmarked .ai-st { color: var(--gold); background: rgba(240, 193, 74, 0.1); }
.st-waiting .ai-thumb, .st-unmarked .ai-thumb { opacity: 0.6; }
.ai-check {
  width: 9px; height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-1px);
  display: inline-block;
}
.ai-spinner.sm { width: 11px; height: 11px; border-width: 2px; }
.btn-ai.is-complete {
  color: var(--lime);
  background: rgba(200, 255, 60, 0.08);
  border: 1px solid rgba(200, 255, 60, 0.3);
  box-shadow: none;
  cursor: default;
}
.btn-ai.is-complete .ai-check { width: 12px; height: 6px; }
.ai-reanalyze {
  display: block;
  margin: 8px auto 0;
  padding: 6px 10px;
  background: none;
  border: 0;
  color: var(--teal);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ai-basis { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-basis-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: rgba(7, 18, 14, 0.4); border: 1px solid var(--line-strong); }
.ai-basis-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-basis-txt b { font-size: 0.86rem; }
.ai-basis-txt small { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-basis-lv { font-family: "Oswald", "Heebo", sans-serif; font-weight: 700; color: var(--teal); font-size: 1.05rem; }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ai-dot.conf-low { background: var(--gold); }
.ai-dot.conf-medium { background: #7fd8ff; }
.ai-dot.conf-high { background: var(--lime); }
@media (prefers-reduced-motion: reduce) {
  .ai-run.is-running .ai-run-fill::after, .ai-spinner { animation: none; }
}

/* Range badge (quiz + AI) */
.ut-badge.is-range { flex-basis: 108px; width: 108px; padding: 12px 6px 9px; }
.ut-badge.is-range b { font-size: 1.85rem; letter-spacing: -0.01em; white-space: nowrap; }
.ut-badge.is-range b i { font-style: normal; opacity: 0.55; margin: 0 1px; }
.ut-badge.is-range span { margin-top: 6px; }

/* Level-range confirm dialog */
.lvl-dialog, .admin-dialog {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px calc(16px + var(--safe-bottom));
  background: rgba(3, 8, 6, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lvl-fade 0.18s ease-out;
}
@keyframes lvl-fade { from { opacity: 0; } to { opacity: 1; } }
.lvl-dialog-card, .admin-dialog-card {
  width: 100%; max-width: 440px;
  border-radius: 24px;
  padding: 20px 18px 16px;
  background: linear-gradient(180deg, #13281f, #0c1c16);
  border: 1px solid rgba(46, 224, 176, 0.3);
  box-shadow: var(--shadow);
  animation: lvl-up 0.22s ease-out;
}
@keyframes lvl-up { from { transform: translateY(24px); } to { transform: none; } }
.lvl-dialog-levels { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.lvl-chip { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 8px 10px; border-radius: 16px; }
.lvl-chip small { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; opacity: 0.8; }
.lvl-chip b { font-family: "Oswald", "Heebo", sans-serif; font-size: 1.9rem; line-height: 1; }
.lvl-chip.quiz { color: var(--lime); background: rgba(200, 255, 60, 0.08); border: 1px solid rgba(200, 255, 60, 0.3); }
.lvl-chip.ai { color: var(--teal); background: rgba(46, 224, 176, 0.1); border: 1px solid rgba(46, 224, 176, 0.35); }
.lvl-arrow { font-size: 1.5rem; color: var(--muted); }
.lvl-dialog-text, .admin-dialog-title { margin: 0 0 6px; font-size: 1.02rem; font-weight: 700; line-height: 1.55; text-align: center; }
.lvl-dialog-note, .admin-dialog-note { margin: 0 0 14px; font-size: 0.78rem; color: var(--muted); text-align: center; }
.lvl-dialog .btn-row .btn, .admin-dialog .btn-row .btn { font-size: 0.95rem; padding: 13px 10px; }

/* Collapsible videos section (v13) */
.ut-vids { margin: 14px 0 0; border-radius: 18px; border: 1px solid var(--line-strong); background: rgba(7, 18, 14, 0.35); overflow: hidden; }
.ut-vid-toggle {
  appearance: none; width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: transparent; border: 0; color: inherit; font: inherit; text-align: right;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ut-vid-toggle:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; border-radius: 18px; }
.ut-vid-title { font-size: 0.95rem; font-weight: 800; color: var(--text); }
.ut-vid-title b { color: var(--lime); font-weight: 800; }
.ut-vid-peeks { display: inline-flex; margin-inline-start: auto; transition: opacity 0.2s ease; }
.ut-vid-peek {
  width: 34px; height: 24px; border-radius: 7px; overflow: hidden;
  background: linear-gradient(135deg, #163228, #0c1c16);
  border: 1.5px solid var(--bg-2);
  margin-inline-start: -8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.ut-vid-peek:first-child { margin-inline-start: 0; }
.ut-vid-peek img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ut-vids.is-open .ut-vid-peeks { opacity: 0; }
.ut-vid-hint { font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.ut-vid-chev {
  width: 8px; height: 8px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); margin-top: -4px;
  transition: transform 0.25s ease, margin 0.25s ease;
}
.ut-vids.is-open .ut-vid-chev { transform: rotate(-135deg); margin-top: 4px; }
.ut-vid-body { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 0.3s ease, visibility 0s linear 0.3s; }
.ut-vids.is-open .ut-vid-body { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.3s ease, visibility 0s; }
.ut-vid-inner { overflow: hidden; min-height: 0; }
.ut-vid-inner .video-list { padding: 0 10px 10px; }
@media (prefers-reduced-motion: reduce) { .ut-vid-body, .ut-vid-chev { transition: none; } }

/* ---------- Certified star rating (v19) ---------- */
.ut-hero-badges {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex: 0 0 auto;
}
.ut-hero-badges .ut-badge { flex-basis: auto; }
.ut-star-badge {
  flex: 0 0 auto;
  min-width: 86px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffe7a3 0%, #f0c14a 42%, #c48914 100%);
  color: #3a2808;
  text-align: center;
  padding: 8px 6px 7px;
  box-shadow: 0 0 0 3px rgba(240, 193, 74, 0.28), 0 8px 20px rgba(0, 0, 0, 0.35);
}
.ut-star-badge b {
  display: block;
  font-family: "Oswald", "Heebo", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.ut-star-badge span {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  margin-top: 3px;
  line-height: 1.2;
}
.ut-card.compact .ut-star-badge { min-width: 72px; padding: 6px 5px; }
.ut-card.compact .ut-star-badge b { font-size: 1.25rem; }

.ut-star-slot { margin: 0 0 10px; }
.ut-star {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 224, 138, 0.16), rgba(80, 52, 8, 0.28)),
    rgba(28, 20, 8, 0.92);
  border: 1px solid rgba(240, 193, 74, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 232, 160, 0.1), 0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.ut-star-line {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: right;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ut-star-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ut-star-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f0c14a;
  align-self: flex-start;
}
.ut-star-ico { margin-inline-end: 4px; }
.ut-star-meta { font-size: 0.8rem; color: rgba(255, 236, 190, 0.86); font-weight: 600; }
.ut-star-value {
  font-family: "Oswald", "Heebo", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffe08a;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 16px rgba(240, 193, 74, 0.35);
}
.ut-star-chev {
  width: 9px; height: 9px;
  border-right: 2px solid rgba(240, 193, 74, 0.7);
  border-bottom: 2px solid rgba(240, 193, 74, 0.7);
  transform: rotate(45deg);
  margin-top: -5px;
  transition: transform 0.2s ease;
  flex: none;
}
.ut-star.is-open .ut-star-chev { transform: rotate(-135deg); margin-top: 5px; }
.ut-star-details { padding: 2px 16px 14px; border-top: 1px solid rgba(240, 193, 74, 0.22); }
.ut-star-expl, .ut-star-foot { margin: 10px 0 0; font-size: 0.8rem; color: rgba(255, 236, 190, 0.75); line-height: 1.5; }
.ut-star-foot { margin-top: 8px; }
.ut-star-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.ut-star-list li {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(240, 193, 74, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
}
.ut-star-item-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.ut-star-item-level { font-family: "Oswald", "Heebo", sans-serif; font-size: 1.15rem; color: #ffe08a; }
.ut-star-item-name { font-weight: 700; }
.ut-star-item-date { margin-inline-start: auto; font-size: 0.75rem; color: var(--muted); }
.ut-star-note { margin: 6px 0 0; font-size: 0.88rem; line-height: 1.5; color: var(--text); }
.ut-card.compact .ut-star-line { padding: 11px 12px; }
.ut-card.compact .ut-star-value { font-size: 1.4rem; }
.ut-star + .ut-rating-line { margin-top: 0; }


/* v21 four-row ratings + weighted highlight */
.ut-ratings-block { display: grid; gap: 8px; margin: 0 0 14px; }
.ut-ratings-block .ut-rating-line,
.ut-ratings-block .ut-ai,
.ut-ratings-block .ut-star-slot,
.ut-ratings-block .ut-star { margin: 0; }
.ut-rating-label { text-transform: none; letter-spacing: 0.02em; font-size: 0.8rem; }
.ut-weighted {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(200, 255, 60, 0.22), rgba(46, 224, 176, 0.12));
  border: 1px solid rgba(200, 255, 60, 0.55);
  box-shadow: 0 0 0 1px rgba(200, 255, 60, 0.12), 0 10px 24px rgba(0, 0, 0, 0.25);
}
.ut-weighted-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ut-weighted-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--lime);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ut-weight-info {
  appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(200, 255, 60, 0.6);
  background: rgba(8, 20, 14, 0.5);
  color: var(--lime);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.ut-weighted-value {
  font-family: "Oswald", "Heebo", sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--lime);
  line-height: 1;
}
.ut-weight-tip {
  display: none;
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text);
  font-weight: 600;
  max-width: 36rem;
}
.ut-weighted.is-open .ut-weight-tip { display: block; }
.ut-ai-label { letter-spacing: 0.02em; }
