@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&display=swap');
/* gauntlet piece "unit": full-screen hero detail (Epic Seven-style hero info stage) */
.modal-bg.ud-bg { padding: 0; background: #03050d; place-items: stretch; }
.modal.unit.ud { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0 !important; border-radius: 0; box-shadow: none; overflow: hidden; display: block; animation: udIn .32s ease-out;
  --tc: #e5533d; --tc2: #4a0f1a; --tc3: #1b0710;
  background: radial-gradient(ellipse 60% 70% at 47% 48%, var(--tc2), var(--tc3) 70%, #040509); color: #eef2ff; }
.modal.unit.ud.t-BLADE { --tc: #3fbf6a; --tc2: #0f3a2a; --tc3: #06140f; }
.modal.unit.ud.t-SHOT { --tc: #3c8de0; --tc2: #10285a; --tc3: #050b1d; }
@keyframes udIn { from { opacity: 0; } to { opacity: 1; } }

/* backdrop layers */
.ud .ud-bgimg { position: absolute; inset: 0; background: center / cover no-repeat; opacity: .92; }
.ud .ud-bgimg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(3,5,14,.92) 0, rgba(3,5,14,.55) 24%, rgba(3,5,14,0) 40%, rgba(3,5,14,0) 60%, rgba(3,5,14,.6) 72%, rgba(3,5,14,.94) 100%),
              linear-gradient(0deg, rgba(3,5,14,.85), rgba(3,5,14,0) 26%), linear-gradient(180deg, rgba(3,5,14,.8), rgba(3,5,14,0) 14%); }
.ud .ud-sigil { position: absolute; left: 46%; top: 50%; width: 600px; height: 600px; margin: -300px 0 0 -300px; border-radius: 50%; pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--tc) 55%, #fff 10%); opacity: .38; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--tc) 60%, transparent) 0 1.2deg, transparent 1.2deg 7.5deg);
  -webkit-mask: radial-gradient(circle, transparent 0 63%, #000 64% 70%, transparent 71% 84%, #000 85% 100%);
  mask: radial-gradient(circle, transparent 0 63%, #000 64% 70%, transparent 71% 84%, #000 85% 100%);
  animation: udSpin 90s linear infinite; }
.ud .ud-sigil::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tc) 50%, transparent) 0, transparent 60%); }
@keyframes udSpin { to { transform: rotate(360deg); } }
.ud .ud-motes { position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(1.6px 1.6px at 20% 30%, #fff, transparent), radial-gradient(1.2px 1.2px at 70% 60%, #fff, transparent),
    radial-gradient(2px 2px at 40% 80%, color-mix(in srgb, var(--tc) 70%, #fff), transparent), radial-gradient(1.4px 1.4px at 85% 20%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 55% 15%, color-mix(in srgb, var(--tc) 60%, #fff), transparent);
  background-size: 260px 260px, 340px 340px, 300px 300px, 420px 420px, 380px 380px; animation: udMotes 40s linear infinite; }
@keyframes udMotes { to { background-position: 0 -260px, 0 -340px, 0 -300px, 0 -420px, 0 -380px; } }

/* the hero */
.ud .um-art { position: absolute; left: 46%; bottom: 0; top: 58px; width: min(600px, 48vw); transform: translateX(-50%); min-height: 0; z-index: 2;
  background: center bottom / contain no-repeat; background-color: transparent !important; filter: drop-shadow(0 0 26px color-mix(in srgb, var(--tc) 45%, transparent)) drop-shadow(0 12px 18px rgba(0,0,0,.6));
  animation: udArt .5s cubic-bezier(.2,1,.3,1); }
@keyframes udArt { from { opacity: 0; transform: translateX(-46%) scale(.97); } to { opacity: 1; transform: translateX(-50%); } }
.ud .ud-floor { position: absolute; left: 46%; bottom: 0; width: 520px; height: 120px; margin-left: -260px; z-index: 1;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--tc) 55%, transparent), transparent 70%); opacity: .7; }

/* header */
.ud .ud-top { position: absolute; top: 0; left: 0; right: 0; height: 52px; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 8px;
  background: linear-gradient(180deg, rgba(2,3,10,.95), rgba(2,3,10,.55)); border-bottom: 1px solid rgba(255,255,255,.08); }
#ui .ud .ud-back, .ud .ud-back { position: static; width: 44px; height: 44px; background: none; border: 0; box-shadow: none; color: #fff; font: 46px/38px 'Lilita One', sans-serif; padding: 0; cursor: pointer; }
.ud .ud-back:hover { color: #ffd36a; }
.ud .ud-top > b { font: 26px 'Lilita One', sans-serif; letter-spacing: .5px; text-shadow: 0 2px 0 #000; }
.ud .ud-cur { margin-left: auto; display: flex; gap: 22px; font: 700 15px Nunito, sans-serif; color: #cfd8f2; }
.ud .ud-cur b { color: #fff; font: 18px 'Lilita One', sans-serif; margin-left: 4px; }

/* left: profile + stats */
.ud .ud-left { position: absolute; left: 0; top: 52px; bottom: 0; width: 330px; padding: 16px 22px 18px 30px; z-index: 4; display: flex; flex-direction: column; }
.ud .ud-kind { display: flex; gap: 14px; font: 700 15px Nunito, sans-serif; color: #c9d3ee; flex-wrap: wrap; }
.ud .ud-kind .k-t { color: var(--tc); filter: brightness(1.35); }
.ud .ud-name { margin: 2px 0 0; font: 48px/1.02 'Lilita One', sans-serif !important; letter-spacing: .5px; color: #fff; text-transform: none; -webkit-text-stroke: 0;
  text-shadow: 0 3px 0 rgba(0,0,0,.6), 0 0 22px rgba(0,0,0,.6); background: none; transform: none; }
.ud .ud-stars { font-size: 24px; letter-spacing: 1px; color: #ffc93a; text-shadow: 0 0 8px rgba(255,170,30,.6), 0 2px 0 #6a3a00; display: flex; align-items: center; gap: 8px; }
.ud .ud-stars.r5 { color: #ff8be0; text-shadow: 0 0 10px rgba(255,80,210,.7), 0 2px 0 #5a0040; }
.ud .ud-stars small { font: 700 12px Nunito, sans-serif; color: #9aa6c8; letter-spacing: 1px; text-transform: uppercase; text-shadow: none; }
.ud .ud-stars em { font-style: normal; font-size: 16px; }
.ud .ud-title { color: #aab4d4; font: 600 14px Nunito, sans-serif; margin-top: 2px; }
.ud .ud-rule { position: relative; height: 1px; margin: 12px 0 10px; background: linear-gradient(90deg, rgba(216,170,90,.9), rgba(216,170,90,.15)); }
.ud .ud-rule::before, .ud .ud-rule::after { content: ''; position: absolute; top: -4px; width: 7px; height: 7px; background: #d8aa5a; transform: rotate(45deg); }
.ud .ud-rule::before { left: -2px; } .ud .ud-rule::after { right: 0; background: rgba(216,170,90,.3); }
.ud .ud-lv { font: 38px/1 'Lilita One', sans-serif; background: linear-gradient(180deg, #ffd04a, #ff7a1a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)); }
.ud .ud-lv b { font-weight: 400; } .ud .ud-lv i { font-style: normal; margin: 0 2px; opacity: .8; }
.ud .ud-lv em { font-style: normal; font-size: 18px; margin-left: 10px; vertical-align: middle; }
.ud .ud-lv.lock { font-size: 28px; background: linear-gradient(#c8d0e8, #8a94b0); -webkit-background-clip: text; background-clip: text; }
.ud .ud-hint { color: #aab4d4; font-size: 13px; margin: 6px 0 0; }
.ud .ud-xp { position: relative; height: 14px; margin: 8px 0 12px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.18); border-radius: 2px; overflow: hidden; }
.ud .ud-xp i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #b8650d, #ffc23a); box-shadow: 0 0 10px #ffb02e; }
.ud .ud-xp span { position: relative; display: block; text-align: center; font: 700 11px/14px Nunito, sans-serif; color: #fff; text-shadow: 0 1px 2px #000; }
.ud .ud-cp { display: flex; align-items: baseline; gap: 10px; padding: 2px 0 8px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 6px; }
.ud .ud-cp i { font-style: normal; font-size: 22px; color: #ffd36a; }
.ud .ud-cp b { font: 34px/1 'Lilita One', sans-serif; color: #fff; text-shadow: 0 2px 0 #000; }
.ud .ud-cp small { font: 700 12px Nunito, sans-serif; color: #9aa6c8; text-transform: uppercase; letter-spacing: 1.5px; }
.ud .ud-stats { display: flex; flex-direction: column; }
.ud .ud-st { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; padding: 5px 2px; font: 600 16px Nunito, sans-serif; color: #d4dcf2; }
.ud .ud-st + .ud-st { border-top: 1px solid rgba(255,255,255,.05); }
.ud .ud-st i { font-style: normal; color: #8fa0c8; font-size: 15px; }
.ud .ud-st b { font: 18px 'Lilita One', sans-serif; color: #fff; font-weight: 400; }
.ud .ud-st b small { color: #8f9abb; font-size: 13px; }
.ud .um-next { margin-top: auto; font: 600 13px Nunito, sans-serif; color: #b8c6ec; padding-top: 8px; }
.ud .um-next b { color: #ffd36a; }

/* right: skills / gear / board / bounty */
.ud .ud-right { position: absolute; right: 0; top: 52px; bottom: 0; width: 390px; max-height: none; padding: 10px 20px 18px 16px; z-index: 4; overflow-y: auto; min-width: 0; flex: none;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.ud .um-tabs { position: sticky; top: -10px; z-index: 2; margin: -10px -4px 10px; padding: 8px 4px 0; background: linear-gradient(180deg, rgba(4,6,16,.97) 70%, rgba(4,6,16,.85)); border-bottom: 1px solid rgba(216,170,90,.45); gap: 2px; }
.ud .um-tabs button { font: 16px 'Lilita One', sans-serif; color: #8f9abb; padding: 6px 12px 8px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.ud .um-tabs button.on { color: #ffd36a; border-bottom-color: #ffb22e; text-shadow: 0 0 10px rgba(255,180,40,.5); }
.ud .um-frag { background: rgba(10,14,32,.75); border: 1px solid rgba(255,255,255,.08); border-radius: 4px; }
.ud .um-sp { position: relative; background: linear-gradient(90deg, rgba(14,20,44,.9), rgba(10,14,30,.75)); border: 1px solid rgba(255,255,255,.08); border-left: 3px solid #d8aa5a; border-radius: 4px; padding: 8px 12px; margin: 8px 0; }
.ud .um-sp h4 { font: 16px 'Lilita One', sans-serif; font-weight: 400; color: #ffd36a; }
.ud .um-sp p { color: #d8e0f6; font-size: 13.5px; }
.ud .ud-sk { padding-left: 76px; min-height: 66px; }
.ud .ud-skic { position: absolute; left: 10px; top: 9px; width: 54px; height: 54px; display: grid; place-items: center; font-style: normal; font-size: 26px; border-radius: 10px;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tc) 85%, #fff 20%), color-mix(in srgb, var(--tc) 70%, #000) 70%);
  border: 2px solid rgba(255,255,255,.55); box-shadow: 0 0 14px color-mix(in srgb, var(--tc) 60%, transparent), inset 0 0 10px rgba(0,0,0,.4); }
.ud .sk-lv { float: right; font: 13px 'Lilita One', sans-serif; color: #9fc1ff; }
.ud .trait { background: rgba(14,20,44,.85); border: 1px solid rgba(255,255,255,.12); }

/* bottom: round action buttons */
.ud .ud-dock { position: absolute; left: 330px; right: 390px; bottom: 14px; z-index: 5; display: flex; justify-content: center; gap: 16px; }
#ui .ud .ud-act, .ud .ud-act { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 92px; padding: 0; background: none; border: 0; box-shadow: none; color: #fff; cursor: pointer; font: inherit; }
.ud .ud-act i { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; font-style: normal; font-size: 28px;
  background: radial-gradient(circle at 50% 35%, #3f6fd0, #16306e 60%, #0a1638); border: 3px solid #a9c6ff;
  box-shadow: 0 0 0 2px #0a1430, 0 0 18px rgba(80,140,255,.55), inset 0 -6px 12px rgba(0,0,0,.45), inset 0 4px 8px rgba(255,255,255,.25); transition: transform .12s, box-shadow .12s; }
.ud .ud-act b { font: 16px 'Lilita One', sans-serif; font-weight: 400; text-shadow: 0 2px 0 #000, 0 0 6px #000; margin-top: 2px; }
.ud .ud-act small { font: 700 11px Nunito, sans-serif; color: #ffd36a; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.ud .ud-act:hover:not(:disabled) i { transform: translateY(-2px) scale(1.05); box-shadow: 0 0 0 2px #0a1430, 0 0 26px rgba(120,170,255,.85), inset 0 -6px 12px rgba(0,0,0,.45), inset 0 4px 8px rgba(255,255,255,.25); }
.ud .ud-act:disabled { opacity: .45; cursor: default; filter: grayscale(.6); }
.ud .ud-act.t1 i { background: radial-gradient(circle at 50% 35%, #ffb54a, #c3610f 60%, #5a2504); border-color: #ffe0a0; box-shadow: 0 0 0 2px #2a1000, 0 0 20px rgba(255,160,40,.6), inset 0 -6px 12px rgba(0,0,0,.4), inset 0 4px 8px rgba(255,255,255,.3); }

/* flip through the crew */
#ui .ud .ud-nav, .ud .ud-nav { position: absolute; top: 46%; z-index: 5; width: 40px; height: 64px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 6px;
  background: rgba(4,8,22,.55); color: #fff; font: 34px/1 'Lilita One', sans-serif; box-shadow: none; cursor: pointer; }
.ud .ud-nav.prev { left: 340px; } .ud .ud-nav.next { right: 400px; }
.ud .ud-nav:hover { background: rgba(40,70,150,.7); }

@media (max-width: 760px) {
  .modal.unit.ud { overflow-y: auto; display: flex; flex-direction: column; }
  .ud .ud-top { order: -1; top: 0; flex: none; } .ud .um-art, .ud .ud-left, .ud .ud-dock, .ud .ud-right { flex: none; }
  .ud .ud-left, .ud .ud-right, .ud .ud-dock { position: relative; inset: auto; width: auto; left: auto; right: auto; top: auto; bottom: auto; }
  .ud .ud-left { padding: 8px 16px; }
  .ud .ud-bgimg { position: fixed; }
  .ud .ud-top { position: sticky; }
  .ud .um-art { position: relative; left: 50%; top: auto; height: 320px; width: 92vw; margin-top: 4px; }
  .ud .ud-sigil, .ud .ud-floor, .ud .ud-nav { display: none; }
  .ud .ud-dock { flex-wrap: wrap; padding: 8px 16px; gap: 8px; }
  .ud .ud-right { padding: 8px 16px 24px; overflow: visible; }
  .ud .ud-cur { gap: 10px; font-size: 12px; } .ud .ud-cur span:nth-child(n+3) { display: none; }
}

/* ---- round 2: skill tiles + selected-skill detail (Skills tab), kit moved to its own Traits tab ---- */
.ud .ud-sigil { opacity: .16; }
.ud .ud-bgimg { opacity: .7; filter: saturate(.75) brightness(.8); }
@media (min-width: 761px) { .ud .ud-right { width: 400px; padding: 10px 22px 18px 18px; background: linear-gradient(90deg, rgba(3,5,14,0), rgba(3,5,14,.55) 14%, rgba(3,5,14,.7)); } .ud .ud-dock { right: 400px; } .ud .ud-nav.next { right: 410px; } }
.ud .um-tabs { display: flex; justify-content: space-between; background: none; border-bottom: 1px solid rgba(216,170,90,.35); margin-bottom: 18px; }
.ud .um-tabs button { font-size: 17px; padding: 8px 6px 10px; }
.ud .ud-skills { animation: udFade .25s ease-out; }
@keyframes udFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ud .ud-tiles { display: grid; grid-template-columns: repeat(4, 76px); justify-content: space-between; gap: 8px; margin: 4px 2px 0; }
.ud .ud-tiles.n5 { grid-template-columns: repeat(5, 64px); }
.ud .ud-tiles.n2 { grid-template-columns: repeat(2, 76px); justify-content: start; gap: 18px; }
.ud .ud-tiles.n3 { grid-template-columns: repeat(3, 76px); justify-content: start; gap: 18px; }
#ui .ud .ud-tile, .ud .ud-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; background: none; border: 0; box-shadow: none; cursor: pointer; color: #9aa6c8; font: inherit; }
.ud .ud-tile i { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; background-size: cover, cover; background-position: 30% 35%, center; background-color: #1a2140;
  border: 2px solid rgba(160,180,230,.35); box-shadow: 0 6px 14px rgba(0,0,0,.55), inset 0 0 0 1px rgba(0,0,0,.6); transition: transform .14s, border-color .14s, box-shadow .14s; overflow: hidden; }
.ud .ud-tile i::after { content: ''; position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(160deg, rgba(255,255,255,.28), rgba(255,255,255,0) 38%), linear-gradient(0deg, rgba(0,0,0,.35), rgba(0,0,0,0) 45%); }
.ud .ud-tile em { position: absolute; right: -6px; top: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; font: 14px/22px 'Lilita One', sans-serif; font-style: normal; color: #fff;
  background: linear-gradient(180deg, #3a64c8, #1a2f72); border: 1.5px solid #bcd2ff; box-shadow: 0 2px 6px rgba(0,0,0,.6); text-shadow: 0 1px 0 #000; z-index: 1; }
.ud .ud-tile em.mx { background: linear-gradient(180deg, #ffcb4a, #c3700f); border-color: #ffeeb8; }
.ud .ud-tile.k-sp em { background: linear-gradient(180deg, #ffb54a, #b8560c); border-color: #ffe2a8; }
.ud .ud-tile span { font: 14px 'Lilita One', sans-serif; letter-spacing: .3px; text-shadow: 0 1px 0 #000; }
.ud .ud-tile:hover i { transform: translateY(-2px); border-color: rgba(220,230,255,.7); }
.ud .ud-tile.on i { border-color: #ffd36a; box-shadow: 0 0 0 2px rgba(255,190,60,.35), 0 0 22px rgba(255,180,40,.55), 0 6px 14px rgba(0,0,0,.55); transform: translateY(-2px); }
.ud .ud-tile.on span { color: #ffd36a; }
.ud .ud-tile.on::after { content: ''; position: absolute; bottom: -14px; left: 50%; margin-left: -7px; border: 7px solid transparent; border-bottom-color: rgba(216,170,90,.7); }
.ud .ud-skd { position: relative; margin-top: 14px; padding: 16px 18px 18px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(16,22,48,.92), rgba(8,11,26,.9)); border: 1px solid rgba(216,170,90,.45);
  box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06); }
.ud .ud-skd::before { content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, #d8aa5a, transparent); }
.ud .ud-skd h3 { margin: 0; font: 26px/1.1 'Lilita One', sans-serif; font-weight: 400; color: #fff; text-shadow: 0 2px 0 #000; letter-spacing: .3px; }
.ud .ud-sub { margin: 4px 0 12px; font: 700 13px Nunito, sans-serif; color: #e9b75a; letter-spacing: .6px; text-transform: uppercase; }
.ud .ud-skb p { margin: 0 0 8px; font: 600 16px/1.45 Nunito, sans-serif; color: #e3e9fa; }
.ud .ud-skb p.ud-dim { font-size: 13.5px; color: #8f9abb; }
.ud .ud-skb b { color: #ffd36a; }
.ud .ud-skpips { display: flex; gap: 6px; margin: 4px 0 14px; }
.ud .ud-skpips i { width: 30px; height: 8px; border-radius: 2px; background: rgba(255,255,255,.12); transform: skewX(-18deg); }
.ud .ud-skpips i.on { background: linear-gradient(90deg, #ff9a2a, #ffd04a); box-shadow: 0 0 8px rgba(255,170,40,.6); }
#ui .ud .skup, .ud .skup { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 10px 12px 9px; font: 19px 'Lilita One', sans-serif; color: #3a1c00;
  background: linear-gradient(180deg, #ffe08a, #ffb22e 55%, #e8890f); border: 1px solid #fff0c0; border-radius: 6px; box-shadow: 0 3px 0 #8a4a05, 0 6px 16px rgba(0,0,0,.45); text-shadow: none; }
.ud .skup small { font: 800 12px Nunito, sans-serif; color: #5a2c00; margin-top: 1px; }
.ud .skup:disabled { filter: grayscale(.7) brightness(.75); }
.ud .ud-ln { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; }
.ud .ud-ln + .ud-ln { border-top: 1px solid rgba(255,255,255,.08); }
.ud .ud-ln b { font: 16px 'Lilita One', sans-serif; font-weight: 400; color: #ffd36a; }
.ud .ud-ln span { font: 600 15px/1.35 Nunito, sans-serif; color: #e3e9fa; }
.ud .ud-ln small { font: 700 12.5px Nunito, sans-serif; color: #8f9abb; }
.ud .ud-ln.locked b { color: #8f9abb; } .ud .ud-ln.locked span { color: #9aa4c0; }

/* Traits tab: the full kit, readable, no web-link styling */
.ud .ud-kit .um-sp.link, .ud .ud-kit .um-sp { text-decoration: none; font: inherit; cursor: default; color: inherit; }
.ud .ud-kit .um-sp.link { border-left-color: #6ac8ff; }
.ud .ud-kit .um-sp p { font-size: 14.5px; line-height: 1.4; }
.ud .ud-kit .trait { font-size: 12.5px; padding: 4px 10px; }
.ud .ud-kit .um-frag { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 13px; }

/* the dock no longer sits on a busy floor: a soft shelf under the buttons */
.ud .ud-dock::before { content: ''; position: absolute; left: -40px; right: -40px; bottom: -14px; height: 120px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 100% at 50% 100%, rgba(3,5,14,.85), rgba(3,5,14,0)); }

/* crew rail under the skills: flip to another hero in one tap */
.ud .ud-roster { margin-top: 16px; }
.ud .ud-rh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ud .ud-rh b { font: 17px 'Lilita One', sans-serif; font-weight: 400; color: #fff; }
.ud .ud-rh small { font: 700 12px Nunito, sans-serif; color: #8f9abb; text-transform: uppercase; letter-spacing: 1px; }
.ud .ud-rg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#ui .ud .ud-ru, .ud .ud-ru { position: relative; padding: 0; height: 74px; border-radius: 6px; overflow: hidden; cursor: pointer; background: #121a36; border: 2px solid rgba(160,180,230,.28); box-shadow: 0 4px 10px rgba(0,0,0,.5); font: inherit; }
.ud .ud-ru.r5 { border-color: rgba(255,120,220,.55); } .ud .ud-ru.r4 { border-color: rgba(241,194,75,.55); }
.ud .ud-ru i { position: absolute; inset: 0; background: 50% 4% / 230% no-repeat; }
.ud .ud-ru::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.8), rgba(0,0,0,0) 50%); }
.ud .ud-ru em { position: absolute; left: 5px; bottom: 2px; z-index: 1; font: 15px 'Lilita One', sans-serif; font-style: normal; color: #ffb43a; text-shadow: 0 1px 0 #000; }
.ud .ud-ru span { position: absolute; right: 4px; bottom: 4px; z-index: 1; font-size: 9px; color: #ffc93a; letter-spacing: -1px; }
.ud .ud-ru.r5 span { color: #ff8be0; }
.ud .ud-ru.on { border-color: #ffd36a; box-shadow: 0 0 0 2px rgba(255,190,60,.3), 0 0 16px rgba(255,180,40,.55); }
.ud .ud-ru:hover:not(.on) { border-color: rgba(220,230,255,.7); }

/* ---- round 3: the hero is lit INTO the scene (no sticker rim), clean starfield stage, framed per-skill icons ---- */
.modal.unit.ud { background: radial-gradient(ellipse 60% 70% at 47% 48%, #1a2350, #0a0f26 70%, #04060f); }
.ud .ud-bgimg { opacity: 1; filter: none; }
.ud .ud-bgimg::after {
  background: linear-gradient(90deg, rgba(4,7,20,.9) 0, rgba(4,7,20,.45) 22%, rgba(4,7,20,0) 38%, rgba(4,7,20,0) 62%, rgba(4,7,20,.5) 72%, rgba(4,7,20,.92) 100%),
              linear-gradient(0deg, rgba(4,7,20,.7), rgba(4,7,20,0) 22%), linear-gradient(180deg, rgba(4,7,20,.75), rgba(4,7,20,0) 13%); }
.ud .ud-sigil { opacity: .1; }
/* a soft key light behind the hero: the figure sits in a pool of light, not on a cut-out outline */
.ud .ud-backlight { position: absolute; left: 46%; top: 6%; width: 760px; height: 760px; margin-left: -380px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--tc) 30%, rgba(255,236,200,.35)) 0, color-mix(in srgb, var(--tc) 14%, transparent) 30%, transparent 62%);
  mix-blend-mode: screen; opacity: .85; }
.ud .um-art { filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)) drop-shadow(-10px 0 22px rgba(2,4,14,.45)); }
/* the scene's light falls across the figure: cool fill from the sky on the left, warm key from the right, darker toward the ground */
.ud .um-art canvas.living { -webkit-mask: none; }
.ud .ud-shadow { position: absolute; left: 46%; bottom: -30px; width: 560px; height: 110px; margin-left: -280px; z-index: 1; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,.75), rgba(0,0,0,0) 70%); pointer-events: none; }
.ud .ud-floor { z-index: 1; opacity: .35; background: radial-gradient(ellipse at 50% 100%, rgba(150,180,255,.5), transparent 70%); }
.ud .ud-mist { position: absolute; left: 330px; right: 400px; bottom: 0; height: 150px; z-index: 3; pointer-events: none;
  background: linear-gradient(0deg, rgba(5,8,22,.92) 0, rgba(5,8,22,.6) 38%, rgba(5,8,22,0) 100%); }
@media (max-width: 760px) { .ud .ud-backlight, .ud .ud-shadow, .ud .ud-mist { display: none; } }

/* skill icons: painted per-skill art in a bevelled metal frame */
.ud .ud-tiles { grid-template-columns: repeat(4, 74px); }
.ud .ud-tile i { border-radius: 14px; background-position: center !important; background-size: cover !important; border: 0;
  box-shadow: 0 0 0 2px #0b0f22, 0 0 0 4px #7f8fb8, 0 0 0 5px #0b0f22, 0 8px 16px rgba(0,0,0,.6); }
.ud .ud-tile i::after { border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), inset 0 -10px 16px rgba(0,0,0,.35);
  background: linear-gradient(155deg, rgba(255,255,255,.32) 0, rgba(255,255,255,.06) 30%, rgba(255,255,255,0) 46%); }
.ud .ud-tile.k-sp i { box-shadow: 0 0 0 2px #1a0d02, 0 0 0 4px #e0a24a, 0 0 0 5px #1a0d02, 0 8px 16px rgba(0,0,0,.6); }
.ud .ud-tile.on i { transform: translateY(-3px);
  box-shadow: 0 0 0 2px #2a1600, 0 0 0 4px #ffd36a, 0 0 0 5px #2a1600, 0 0 24px 4px rgba(255,190,60,.55), 0 10px 18px rgba(0,0,0,.6); }
.ud .ud-tile:not(.on) i { filter: saturate(.8) brightness(.82); }
.ud .ud-tile:hover:not(.on) i { filter: none; }
.ud .ud-tile em { right: -9px; top: -9px; }
.ud .ud-tile span { margin-top: 3px; }
.ud .ud-skd h3 { display: flex; align-items: center; gap: 10px; }
/* scene light wrapped onto the figure itself (masked by its own silhouette): cool sky fill from the upper left, warm horizon glow from below right */
.ud .um-art::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  -webkit-mask: var(--art) center bottom / contain no-repeat; mask: var(--art) center bottom / contain no-repeat;
  background: linear-gradient(115deg, rgba(120,150,255,.55) 0, rgba(120,150,255,0) 38%, rgba(0,0,0,0) 62%, rgba(255,180,110,.45) 100%),
              linear-gradient(0deg, rgba(8,12,34,.75) 0, rgba(8,12,34,0) 30%);
  mix-blend-mode: soft-light; }
@media (max-width: 760px) { .ud .um-art::after { display: none; } }

/* ---- round 4: game-screen layout. icon rail on the left edge, profile + skill icons in one column, skill detail in a popover,
   a slanted crew strip fanned down the right edge, and an open stage for the hero in between ---- */
.modal.unit.ud { --lw: 372px; --rw: 300px; --mid: calc(var(--lw) + (100vw - var(--lw) - var(--rw)) / 2); }
.modal.unit.ud:not(.tab-info) { --rw: 400px; }
.modal.unit.ud.tab-none { --lw: 300px; }
@media (min-width: 761px) {
  .ud .um-art { left: var(--mid); top: 54px; bottom: 98px; width: min(640px, calc(100vw - var(--lw) - var(--rw) + 60px)); }
  .ud .ud-backlight { left: var(--mid); } .ud .ud-sigil { left: var(--mid); }
  .ud .ud-shadow { left: var(--mid); bottom: 56px; width: 460px; margin-left: -230px; height: 90px; }
  .ud .ud-floor { left: var(--mid); bottom: 70px; }
  .ud .ud-mist { left: var(--lw); right: var(--rw); height: 120px; }
  .ud .ud-dock { left: var(--lw); right: var(--rw); bottom: 8px; gap: 10px; }
  .ud .ud-nav.prev { left: calc(var(--lw) + 8px); } .ud .ud-nav.next { right: calc(var(--rw) + 10px); }
  .ud .ud-left { left: 72px; width: 300px; padding: 12px 18px 14px 22px; background: linear-gradient(90deg, rgba(3,5,14,.55), rgba(3,5,14,0)); }
  .modal.unit.ud.tab-none .ud-left { left: 0; }
  .ud .ud-right { width: var(--rw); }
  .ud .ud-bgimg::after {
    background: linear-gradient(90deg, rgba(4,7,20,.92) 0, rgba(4,7,20,.5) 26%, rgba(4,7,20,0) 40%, rgba(4,7,20,0) 64%, rgba(4,7,20,.35) 76%, rgba(4,7,20,.8) 100%),
                linear-gradient(0deg, rgba(4,7,20,.7), rgba(4,7,20,0) 20%), linear-gradient(180deg, rgba(4,7,20,.75), rgba(4,7,20,0) 13%); }
}

/* left rail: the hero's sections as icons */
.ud .ud-rail { position: absolute; left: 0; top: 52px; bottom: 0; width: 72px; z-index: 6; display: flex; flex-direction: column; padding-top: 6px;
  background: linear-gradient(180deg, rgba(8,12,30,.96), rgba(4,6,16,.96)); border-right: 1px solid rgba(140,170,255,.14); box-shadow: 4px 0 18px rgba(0,0,0,.45); }
#ui .ud .ud-rail button, .ud .ud-rail button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 74px; padding: 8px 0 0; margin: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; color: #8592b8; font: 12px 'Lilita One', sans-serif; letter-spacing: .3px; cursor: pointer; }
.ud .ud-rail i { width: 38px; height: 38px; background: center / contain no-repeat; filter: grayscale(1) brightness(1.5) contrast(.9); opacity: .55; transition: opacity .15s, transform .15s; }
.ud .ud-rail button:hover i { opacity: .9; }
.ud .ud-rail button.on { color: #fff; background: linear-gradient(90deg, rgba(60,120,255,.55), rgba(40,90,220,.15)); }
.ud .ud-rail button.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #7fb4ff; box-shadow: 0 0 10px #4f8fff; }
.ud .ud-rail button.on i { filter: drop-shadow(0 0 6px rgba(120,170,255,.7)); opacity: 1; transform: scale(1.08); }

/* profile column, tightened so the skill icons fit underneath */
.ud .ud-kind { font-size: 13.5px; gap: 10px; }
.ud .ud-name { font-size: 44px !important; }
.ud .ud-stars { font-size: 21px; }
.ud .ud-title { font-size: 13px; }
.ud .ud-rule { margin: 9px 0 8px; }
.ud .ud-lv { font-size: 34px; }
.ud .ud-xp { margin: 6px 0 8px; }
.ud .ud-cp { padding-bottom: 6px; margin-bottom: 2px; } .ud .ud-cp b { font-size: 30px; }
.ud .ud-st { padding: 3px 2px; font-size: 14.5px; } .ud .ud-st b { font-size: 16px; }
.ud .ud-left .ud-skills { margin-top: 12px; animation: none; }
.ud .ud-left .ud-tiles, .ud .ud-left .ud-tiles.n2, .ud .ud-left .ud-tiles.n3, .ud .ud-left .ud-tiles.n4, .ud .ud-left .ud-tiles.n5 { grid-template-columns: repeat(auto-fill, 54px); justify-content: start; gap: 10px; margin: 0 0 0 4px; }
.ud .ud-left .ud-tile { gap: 4px; }
.ud .ud-left .ud-tile i { border-radius: 12px; } .ud .ud-left .ud-tile i::after { border-radius: 12px; }
.ud .ud-left .ud-tile em { min-width: 20px; height: 20px; font-size: 12px; line-height: 18px; padding: 0 5px; right: -8px; top: -8px; }
.ud .ud-left .ud-tile span { font-size: 11.5px; margin-top: 2px; }
.ud .ud-left .ud-tile.on::after { display: none; }
.ud .um-next { font-size: 12px; }

/* the skill popover: opens over the stage beside the icons */
.ud .ud-pop { position: absolute; left: calc(var(--lw) + 6px); bottom: 96px; width: 340px; z-index: 9; padding: 16px 18px 16px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(18,26,58,.97), rgba(8,11,28,.97)); border: 1px solid rgba(216,170,90,.6);
  box-shadow: 0 18px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); animation: udPop .18s cubic-bezier(.2,1.4,.4,1); transform-origin: 0 100%; }
.ud .ud-pop::before { content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, #d8aa5a, transparent); }
.ud .ud-pop::after { content: ''; position: absolute; left: -9px; bottom: 34px; width: 16px; height: 16px; transform: rotate(45deg);
  background: rgba(10,14,34,.98); border-left: 1px solid rgba(216,170,90,.6); border-bottom: 1px solid rgba(216,170,90,.6); }
@keyframes udPop { from { opacity: 0; transform: scale(.92) translateX(-6px); } to { opacity: 1; transform: none; } }
.ud .ud-pop h3 { margin: 0 26px 0 0; font: 24px/1.1 'Lilita One', sans-serif; font-weight: 400; color: #fff; text-shadow: 0 2px 0 #000; }
.ud .ud-pop .ud-skb p { font-size: 15px; }
#ui .ud .ud-popx, .ud .ud-popx { position: absolute; right: 8px; top: 6px; width: 30px; height: 30px; padding: 0; background: none; border: 0; box-shadow: none; color: #9aa6c8; font: 26px/1 'Lilita One', sans-serif; cursor: pointer; }
.ud .ud-popx:hover { color: #fff; }

/* the crew strip: slanted cards fanned around the selected hero, portraits bleeding off the right edge */
.ud .ud-strip { position: absolute; right: 0; top: 52px; bottom: 0; width: 300px; z-index: 5; display: flex; flex-direction: column; }
.ud .ud-sh { display: flex; align-items: baseline; gap: 10px; margin: 8px 14px 0 34px; padding: 6px 4px 8px; border-bottom: 1px solid rgba(216,170,90,.35); }
.ud .ud-sh b { font: 19px 'Lilita One', sans-serif; font-weight: 400; color: #fff; text-shadow: 0 2px 0 #000; }
.ud .ud-sh small { font: 15px 'Lilita One', sans-serif; color: #ffd36a; }
.ud .ud-sh span { margin-left: auto; font: 700 11.5px Nunito, sans-serif; color: #8f9abb; letter-spacing: .5px; }
.ud .ud-sl { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 26px 0 60px; scrollbar-width: none;
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 7%, #000 88%, transparent 100%); mask: linear-gradient(180deg, transparent 0, #000 7%, #000 88%, transparent 100%); }
.ud .ud-sl::-webkit-scrollbar { display: none; }
#ui .ud .ud-rc, .ud .ud-rc { position: relative; display: block; width: calc(100% - 30px - var(--d) * 8px); flex: none; height: 64px; margin: -6px 0 0 calc(30px + var(--d) * 8px); padding: 0; background: none; border: 0; border-radius: 0;
  box-shadow: none; font: inherit; color: #fff; cursor: pointer; text-align: left; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); transition: margin .2s; }
.ud .ud-rc::before { content: ''; position: absolute; inset: 0; clip-path: polygon(16px 0, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,0) 35%), linear-gradient(90deg, #1d2750, #10183a 60%, #0a1130); }
.ud .ud-rc::after { content: ''; position: absolute; inset: 0; clip-path: polygon(16px 0, 19px 0, 3px 100%, 0 100%); background: #6f80b0; }
.ud .ud-rc.r5::after { background: #ff7ad8; } .ud .ud-rc.r4::after { background: #f1c24b; }
.ud .ud-rc i { position: absolute; right: 0; top: 0; bottom: 0; width: 60%; background: 50% 5% / 250% auto no-repeat;
  -webkit-mask: linear-gradient(90deg, transparent, #000 45%); mask: linear-gradient(90deg, transparent, #000 45%); opacity: .8; }
.ud .ud-rc b { position: absolute; left: 24px; top: 8px; z-index: 1; display: flex; align-items: center; gap: 5px; max-width: 70%; white-space: nowrap; overflow: hidden;
  font: 16px 'Lilita One', sans-serif; font-weight: 400; color: #e8eeff; text-shadow: 0 2px 0 #000, 0 0 6px #000; }
.ud .ud-rc b s { text-decoration: none; font-size: 13px; }
.ud .ud-rc span { position: absolute; left: 16px; bottom: 8px; z-index: 1; display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: #ffc93a; letter-spacing: -1px; text-shadow: 0 1px 2px #000; }
.ud .ud-rc.r5 span { color: #ff8be0; }
.ud .ud-rc span em { font: 18px 'Lilita One', sans-serif; font-style: normal; color: #ffb43a; letter-spacing: 0; }
.ud .ud-rc:hover:not(.on)::before { background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 35%), linear-gradient(90deg, #26346a, #141e48 60%, #0c1436); }
#ui .ud .ud-rc.on, .ud .ud-rc.on { z-index: 3; width: 100%; height: 84px; margin: -4px 0 4px 0; filter: drop-shadow(0 0 10px rgba(110,170,255,.85)) drop-shadow(0 6px 10px rgba(0,0,0,.7)); }
.ud .ud-rc.on::before { clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 40%), linear-gradient(90deg, #3d78e6, #1d4aa8 50%, #12307a); }
.ud .ud-rc.on::after { clip-path: polygon(22px 0, 26px 0, 4px 100%, 0 100%); background: #fff; }
.ud .ud-rc.on i { width: 64%; opacity: 1; }
.ud .ud-rc.on b { left: 32px; top: 10px; font-size: 21px; color: #fff; }
.ud .ud-rc.on span { left: 24px; bottom: 10px; font-size: 15px; } .ud .ud-rc.on span em { font-size: 24px; color: #ffcf4a; }

/* the bottom dock: one compact row on the floor, under the hero's feet */
#ui .ud .ud-act, .ud .ud-act { width: 84px; }
.ud .ud-act i { width: 54px; height: 54px; font-size: 22px; border-width: 2px; }
.ud .ud-act b { font-size: 14px; margin-top: 1px; }
.ud .ud-act small { font-size: 10.5px; }
.ud .ud-dock::before { bottom: -8px; height: 110px; }

/* other sections (Traits, Gear, Board, Bounty) keep a side panel with a heading */
.ud .ud-right .um-tabs { position: static; margin: 0 0 12px; padding: 4px 0 8px; display: block; }
.ud .ud-right .um-tabs b { font: 22px 'Lilita One', sans-serif; font-weight: 400; color: #ffd36a; text-shadow: 0 2px 0 #000; }

@media (max-width: 760px) {
  .ud .ud-rail { position: relative; top: auto; width: auto; flex-direction: row; height: auto; padding: 0; }
  .ud .ud-rail button { flex: 1; height: 62px; }
  .ud .ud-strip { position: relative; top: auto; width: auto; height: 260px; flex: none; order: 9; }
  .ud .ud-pop { position: fixed; left: 16px; right: 16px; bottom: 16px; width: auto; }
  .ud .ud-pop::after { display: none; }
}

/* ---- round 5: the hero stands IN the scene. backlight bloom along the silhouette, contact shadow + horizon glow under the boots,
   mist over the feet, bokeh depth, side vignette, figure shrunk so the dock has its own floor ---- */
@media (min-width: 761px) {
  .ud .um-art { top: 66px; bottom: 136px; width: min(600px, calc(100vw - var(--lw) - var(--rw) + 40px));
    filter: drop-shadow(0 0 1px rgba(10,14,34,.9)) drop-shadow(0 14px 22px rgba(0,0,0,.5)); }
  .ud .ud-bloom { position: absolute; left: var(--mid); top: 66px; bottom: 136px; width: min(600px, calc(100vw - var(--lw) - var(--rw) + 40px));
    background: center bottom / contain no-repeat; transform: translateX(-50%) scale(1.05, 1.03); transform-origin: 50% 100%; z-index: 2; pointer-events: none;
    /* the hero's own silhouette, turned into warm light and blurred: a backlight bloom wrapping the cape */
    filter: brightness(0) invert(1) brightness(.55) sepia(1) saturate(9) hue-rotate(-14deg) brightness(1.5) blur(22px); opacity: .9; mix-blend-mode: screen;
    animation: udBloomIn .5s .3s both, udBloom 4.5s .8s ease-in-out infinite alternate; }
  /* a tighter rim pushed up and right, so a lit edge only peeks out along the shoulders, arm and cape */
  .ud .ud-bloom.rim { transform: translate(calc(-50% + 6px), -5px); filter: brightness(0) invert(1) brightness(.7) sepia(1) saturate(5) hue-rotate(-6deg) brightness(1.45) blur(4px); opacity: .45; animation: udRimIn .5s .3s backwards; }
  @keyframes udBloom { from { opacity: .82; } to { opacity: 1; } }
  @keyframes udBloomIn { from { opacity: 0; } to { opacity: .82; } }
  @keyframes udRimIn { from { opacity: 0; } to { opacity: .45; } }

  /* the floor the hero stands on: a warm horizon band and a contact shadow right under the boots */
  .ud .ud-horizon { position: absolute; left: var(--lw); right: var(--rw); bottom: 96px; height: 120px; z-index: 1; pointer-events: none;
    background: radial-gradient(ellipse 50% 40% at 50% 62%, rgba(255,190,120,.55), rgba(255,140,80,.18) 45%, rgba(255,120,60,0) 75%),
                linear-gradient(0deg, rgba(120,150,255,0) 30%, rgba(150,170,255,.16) 58%, rgba(120,150,255,0) 72%); mix-blend-mode: screen; }
  .ud .ud-shadow { left: var(--mid); bottom: 112px; width: 360px; height: 54px; margin-left: -180px; z-index: 2;
    background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,.85) 0, rgba(0,0,0,.55) 35%, rgba(0,0,0,0) 70%); }
  .ud .ud-floor { left: var(--mid); bottom: 92px; width: 620px; margin-left: -310px; height: 80px; opacity: .5;
    background: radial-gradient(ellipse at 50% 50%, rgba(120,160,255,.35), transparent 70%); }
  /* low mist drifting across the boots so the figure is grounded in the scene, not cut out */
  .ud .ud-mist { left: calc(var(--lw) - 40px); right: calc(var(--rw) - 40px); bottom: 0; height: 200px; z-index: 3;
    background: radial-gradient(ellipse 45% 22% at 50% 30%, rgba(170,185,230,.22), rgba(170,185,230,0) 100%),
                linear-gradient(0deg, rgba(4,7,20,.96) 0, rgba(4,7,20,.82) 30%, rgba(8,12,32,.35) 58%, rgba(8,12,32,0) 78%); }
  .ud .ud-dock { bottom: 4px; }
  .ud .ud-dock::before { display: none; }
  /* depth behind the figure: soft out-of-focus lights in the sky */
  .ud .ud-backlight { top: 0; width: 900px; height: 720px; margin-left: -450px; border-radius: 0; opacity: 1;
    background: radial-gradient(circle at 50% 46%, rgba(255,220,170,.22) 0, rgba(190,140,255,.12) 26%, transparent 52%),
                radial-gradient(circle 26px at 18% 30%, rgba(255,210,150,.35), transparent 100%),
                radial-gradient(circle 18px at 80% 22%, rgba(170,200,255,.4), transparent 100%),
                radial-gradient(circle 34px at 86% 58%, rgba(255,170,120,.22), transparent 100%),
                radial-gradient(circle 14px at 12% 64%, rgba(180,210,255,.35), transparent 100%),
                radial-gradient(circle 22px at 30% 12%, rgba(220,190,255,.28), transparent 100%),
                radial-gradient(circle 12px at 70% 8%, rgba(255,230,190,.4), transparent 100%); filter: blur(3px); }
  /* side vignette */
  .ud .ud-bgimg { box-shadow: inset 0 0 220px 60px rgba(0,0,0,.75); }
}

/* rail: real icons (they were zero-size inline <i>), one type system with the rest of the screen */
.ud .ud-rail i { display: block; width: 34px; height: 34px; flex: none; filter: saturate(.35) brightness(1.15); opacity: .7; }
#ui .ud .ud-rail button, .ud .ud-rail button { height: 76px; padding-top: 10px; gap: 4px; color: #a9b4d6; font: 13px 'Lilita One', sans-serif; text-shadow: 0 1px 0 #000; }
.ud .ud-rail button.on i { filter: drop-shadow(0 0 8px rgba(150,190,255,.8)); opacity: 1; }
.ud .ud-kind { font-family: 'Lilita One', sans-serif; font-weight: 400; }

/* ---- round 6: the hero stands INSIDE the scene. no outer glow: thin purple / blue rim light cut inside the silhouette,
   figure scaled up ~25% so it bleeds behind the profile panel and the dock, boots planted on a lit floor with a contact shadow;
   a clean condensed type face across the screen; roster portraits framed on the face (ui.js udFaceCrop) ---- */
@media (min-width: 761px) {
  .ud .ud-bloom, .ud .ud-bloom.rim { display: none; }
  .ud .um-art { top: 40px; bottom: 22px; width: min(658px, calc(100vw - var(--lw) - var(--rw) + 150px)); left: calc(var(--mid) + 4px);
    filter: drop-shadow(0 10px 16px rgba(2,3,12,.55)); }
  /* scene light on the figure: cool sky fill from the upper left, violet bounce from the lower right, shade toward the floor */
  .ud .um-art::after { background: linear-gradient(115deg, rgba(130,160,255,.55) 0, rgba(130,160,255,0) 36%, rgba(0,0,0,0) 60%, rgba(170,110,255,.5) 100%),
      linear-gradient(0deg, rgba(10,8,34,.8) 0, rgba(10,8,34,.25) 14%, rgba(10,8,34,0) 32%); }
  /* rim light: a thin band INSIDE the edge, where the art minus the art nudged away from the light leaves only the lit rim */
  .ud .ud-rim { position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: screen; filter: blur(1.2px); }
  .ud .ud-rim.l { opacity: .95;
    background: linear-gradient(160deg, #a9c4ff 0, #7f9dff 35%, rgba(110,140,255,.35) 70%, rgba(110,140,255,.05) 100%); }
  .ud .ud-rim.r { opacity: .9;
    background: linear-gradient(200deg, #e2b0ff 0, #b77bff 40%, rgba(150,90,255,.45) 75%, rgba(150,90,255,.1) 100%); }
  /* behind the figure: a violet / indigo haze in the sky, not a halo traced around it */
  .ud .ud-backlight { background: radial-gradient(ellipse 34% 46% at 50% 44%, rgba(150,120,255,.26) 0, rgba(90,110,255,.1) 45%, transparent 75%),
      radial-gradient(circle 26px at 18% 30%, rgba(200,170,255,.3), transparent 100%), radial-gradient(circle 18px at 80% 22%, rgba(170,200,255,.4), transparent 100%),
      radial-gradient(circle 34px at 86% 58%, rgba(190,140,255,.22), transparent 100%), radial-gradient(circle 14px at 12% 64%, rgba(180,210,255,.35), transparent 100%),
      radial-gradient(circle 22px at 30% 12%, rgba(220,190,255,.28), transparent 100%), radial-gradient(circle 12px at 70% 8%, rgba(210,220,255,.4), transparent 100%); }
  /* the floor: the sea's horizon gives way to a dark glassy deck that catches violet light, so the boots stand ON something */
  .ud .ud-horizon { left: 72px; right: 0; bottom: 118px; height: 70px; z-index: 1;
    background: radial-gradient(ellipse 40% 50% at 46% 50%, rgba(190,160,255,.45), rgba(140,120,255,.12) 50%, rgba(120,110,255,0) 80%); }
  .ud .ud-ground { position: absolute; left: 72px; right: 0; bottom: 0; height: 150px; z-index: 1; pointer-events: none;
    background: radial-gradient(ellipse 34% 60% at calc(var(--mid) - 72px) 100%, rgba(120,100,230,.42), rgba(70,60,170,.16) 55%, rgba(40,40,120,0) 80%),
      repeating-linear-gradient(0deg, rgba(160,170,255,.06) 0 1px, transparent 1px 9px),
      linear-gradient(180deg, rgba(10,12,34,0) 0, rgba(10,10,32,.7) 22%, rgba(8,8,26,.92) 100%); }
  .ud .ud-ground::before { content: ''; position: absolute; left: 0; right: 0; top: 30px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(190,170,255,.55) 30%, rgba(220,200,255,.8) 48%, rgba(190,170,255,.55) 66%, transparent); filter: blur(.6px); }
  .ud .ud-shadow { left: var(--mid); bottom: 6px; width: 560px; height: 62px; margin-left: -276px; z-index: 2;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0,0,6,.9) 0, rgba(0,0,8,.6) 38%, rgba(0,0,10,0) 72%); }
  .ud .ud-floor { bottom: 0; width: 700px; margin-left: -350px; height: 60px; z-index: 1; opacity: .6;
    background: radial-gradient(ellipse at 50% 60%, rgba(160,140,255,.45), transparent 70%); }
  /* a low violet fog across the shins, and just enough shade along the bottom edge for the dock labels */
  .ud .ud-mist { left: 72px; right: 0; bottom: 0; height: 170px; z-index: 3;
    background: radial-gradient(ellipse 36% 30% at calc(var(--mid) - 72px) 62%, rgba(150,140,230,.16), rgba(150,140,230,0) 100%),
      linear-gradient(0deg, rgba(4,5,18,.72) 0, rgba(4,5,18,.35) 30%, rgba(4,5,18,0) 70%); }
  .ud .ud-left { background: linear-gradient(90deg, rgba(3,5,14,.78) 0, rgba(3,5,14,.55) 70%, rgba(3,5,14,0)); }
  .ud .ud-bgimg::after {
    background: linear-gradient(90deg, rgba(4,7,20,.9) 0, rgba(4,7,20,.4) 24%, rgba(4,7,20,0) 38%, rgba(4,7,20,0) 66%, rgba(4,7,20,.3) 78%, rgba(4,7,20,.75) 100%),
                linear-gradient(180deg, rgba(4,7,20,.7), rgba(4,7,20,0) 13%); }
  .ud .ud-act i { box-shadow: 0 0 0 2px #0a1430, 0 0 18px rgba(110,130,255,.55), 0 6px 14px rgba(0,0,0,.7), inset 0 -6px 12px rgba(0,0,0,.45), inset 0 4px 8px rgba(255,255,255,.25); }
}

/* one clean condensed type face: names, numbers and labels read like a game UI, not a rounded casual font */
.modal.unit.ud { --udf: 'Barlow Condensed', 'Arial Narrow', sans-serif; }
.ud .ud-top > b { font: 700 30px var(--udf); letter-spacing: .4px; }
.ud .ud-cur, .ud .ud-cur b { font-family: var(--udf); font-weight: 600; }
.ud .ud-cur b { font-size: 21px; }
.ud .ud-kind { font: 600 17px var(--udf); letter-spacing: .3px; }
.ud .ud-name { font: 700 54px/1 var(--udf) !important; letter-spacing: .3px; text-shadow: 0 2px 0 rgba(0,0,0,.55), 0 0 22px rgba(0,0,0,.6); }
.ud .ud-stars small, .ud .ud-cp small { font-family: var(--udf); font-weight: 600; font-size: 14px; }
.ud .ud-title { font: 500 16px var(--udf); letter-spacing: .3px; }
.ud .ud-lv { font: 700 40px/1 var(--udf); }
.ud .ud-xp span { font: 600 12.5px/14px var(--udf); letter-spacing: .4px; }
.ud .ud-cp b { font: 700 34px/1 var(--udf); }
.ud .ud-st { font: 500 17px var(--udf); letter-spacing: .3px; }
.ud .ud-st b { font: 700 19px var(--udf); }
.ud .ud-tile span, .ud .ud-left .ud-tile span { font: 600 14px var(--udf); letter-spacing: .3px; }
.ud .ud-tile em, .ud .ud-left .ud-tile em { font-family: var(--udf); font-weight: 700; }
.ud .um-next { font: 500 14.5px var(--udf); letter-spacing: .3px; }
#ui .ud .ud-rail button, .ud .ud-rail button { font: 600 15px var(--udf); letter-spacing: .4px; }
.ud .ud-act b { font: 700 17px var(--udf); letter-spacing: .3px; }
.ud .ud-act small { font: 600 12px var(--udf); letter-spacing: .3px; }
.ud .ud-sh b { font: 700 22px var(--udf); } .ud .ud-sh small { font: 600 17px var(--udf); } .ud .ud-sh span { font: 500 14px var(--udf); }
.ud .ud-rc b { font: 600 18px var(--udf); letter-spacing: .3px; }
.ud .ud-rc.on b { font-size: 23px; font-weight: 700; }
.ud .ud-rc span em { font: 700 20px var(--udf); } .ud .ud-rc.on span em { font-size: 26px; }
.ud .ud-pop h3, .ud .ud-right .um-tabs b { font-family: var(--udf); font-weight: 700; }
@media (max-width: 760px) { .ud .ud-rim, .ud .ud-ground { display: none; } }
