/* ==========================================================================
   The desktop page for Unlocks (dt-unlocks.js): the collection in the desktop packs' style (desktop.css .dt-panel,
   DT Sport / DT Body), laid out in the content area's own pixels (1494 x 900, or 1494 x 776 over the ad dock: html.dt-ads).
   The art is the owner's Unlocks pack (3 Oct 2026, assets/unl; tools/cut_unlocks.py): the trophy-room strip behind the banner
   (recoloured to your colours: --dtu-room), the collection plate, the tabs, the tile frames, the chips, tags and group icons;
   the .unl-* pieces are drawn in unlocks.css. Also the Unlocks chip on My Club's banner (dt-club.js).
   Only under html.dt-on: phones and the app never see any of it.
   ========================================================================== */
.dtu { position: absolute; inset: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); grid-template-rows: 140px minmax(0, 1fr); gap: 18px; font-size: 24px; color: #edfaff; }
html.dt-ads .dtu { grid-template-rows: 111px minmax(0, 1fr); gap: 15px; }
.dtu .dt-panel { border-color: rgba(25, 214, 240, 0.584); position: relative; min-height: 0; min-width: 0; }
#dt-root .dt-pg .dtu h1, #dt-root .dt-pg .dtu h2, #dt-root .dt-pg .dtu h3 { margin: 0; font-family: var(--dt-sport); font-weight: 400; }
.dtu p { margin: 0; }
.dtu button { cursor: pointer; }
.dtu em, .dtu i { font-style: normal; }

/* ---------- the banner: Back, the collection plate (your totals and the meter), the NEW tag and a line on the room ---------- */
.dtu-banner { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; padding: 14px 26px; overflow: visible; z-index: 3;
  background: var(--dtu-room, none) 50% 36% / cover no-repeat, linear-gradient(145deg, #0c1c3a, #050f24); border-color: rgba(120, 170, 220, 0.5); }
.dtu .dtu-back { flex: none; width: 62px; height: 62px; border-radius: 16px; }
.dtu .dtu-back .dt-ic { width: 34px; height: 34px; }
.dtu-bw { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 24px; }
.dtu-plate { --ph: 112px; position: relative; flex: 0 1 800px; min-width: 0; height: var(--ph); box-sizing: border-box; display: flex; align-items: center; gap: 26px; padding: 0 calc(var(--ph) * 0.1875 + 18px) 0 calc(var(--ph) * 1.03125 + 14px); }
.dtu-plate::before { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-style: solid; border-color: transparent; pointer-events: none; filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.5));
  border-width: calc(var(--ph) * 0.1875) calc(var(--ph) * 0.1875) calc(var(--ph) * 0.1875) calc(var(--ph) * 1.03125);
  border-image: url("assets/unl/collection_plate.webp") 60 60 60 330 fill / calc(var(--ph) * 0.1875) calc(var(--ph) * 0.1875) calc(var(--ph) * 0.1875) calc(var(--ph) * 1.03125) stretch; }
.dtu-plate > * { position: relative; }
.dtu-seal { position: absolute !important; left: calc(var(--ph) * -0.08); top: calc(var(--ph) * -0.14); height: calc(var(--ph) * 1.28); width: auto; pointer-events: none; filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.55)); }
.dtu-id { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
#dt-root .dt-pg .dtu-banner h1 { font-size: 40px; line-height: 1; margin: 0; white-space: nowrap; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45); }
.dtu-banner h1 small { font-size: 0.62em; color: #b4cce5; }
.dtu-banner h1 em { font-size: 0.5em; color: #ffd75a; letter-spacing: 1px; margin-left: 6px; }
.dtu-sub { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #dceefa; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); }
.dtu-sub b { font-weight: 700; color: #ffd75a; }
.dtu-meter { flex: none; width: 170px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.dtu-meter b { font: 36px/1 var(--dt-sport); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); }
.dtu-meter .unl-bar { --bh: 17px; width: 100%; }
.dtu-right { margin-left: auto; flex: 0 0 310px; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 5px; padding: 8px 14px; border-radius: 14px; text-align: right; background: linear-gradient(90deg, rgba(4, 12, 30, 0), rgba(4, 12, 30, 0.74) 24%); }
.dtu-right .dtu-newbig { --tg: 34px; }
.dtu-eyebrow { font: 700 20px var(--dt-body); color: #ffd75a; letter-spacing: 2px; white-space: nowrap; text-shadow: 0 2px 3px rgba(0, 0, 0, 0.7); }
.dtu-line { font-size: 19px; line-height: 1.12; color: #cfe3f5; text-shadow: 0 2px 3px rgba(0, 0, 0, 0.7); }
html.dt-ads .dtu-banner { padding: 10px 23px; gap: 18px; }
html.dt-ads .dtu .dtu-back { width: 54px; height: 54px; }
html.dt-ads .dtu-plate { --ph: 90px; gap: 20px; }
html.dt-ads #dt-root .dt-pg .dtu-banner h1 { font-size: 32px; }
html.dt-ads .dtu-sub { font-size: 17px; }
html.dt-ads .dtu-meter { width: 150px; }
html.dt-ads .dtu-meter b { font-size: 28px; }
html.dt-ads .dtu-meter .unl-bar { --bh: 15px; }
html.dt-ads .dtu-eyebrow { font-size: 19px; }
html.dt-ads .dtu-line { font-size: 16px; }
html.dt-ads .dtu-right { flex-basis: 290px; }

/* ---------- the side: the sections (the pack's tabs), the groups to jump to ---------- */
.dtu-side { display: flex; flex-direction: column; padding: 20px 18px; gap: 12px; }
.dtu-tabs { display: grid; gap: 12px; }
.dtu .dtu-tab { --th: 62px; position: relative; width: 100%; height: var(--th); box-sizing: border-box; padding: 0 20px 0 66px; display: flex; align-items: center; justify-content: space-between; border: 0; background: none; color: #f4f8ff; font: 28px var(--dt-sport); text-align: left; transition: transform 0.12s, filter 0.12s; }
.dtu .dtu-tab::before { content: ""; position: absolute; inset: 0; box-sizing: border-box; border-style: solid; border-color: transparent; pointer-events: none;
  border-width: calc(var(--th) * 0.375); border-image: url("assets/unl/tab_normal.webp") 60 fill / calc(var(--th) * 0.375) stretch; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4)); }
.dtu .dtu-tab.on::before { border-image-source: url("assets/unl/tab_selected.webp"); }
.dtu .dtu-tab:hover { filter: brightness(1.1); transform: translateY(-1px); }
.dtu .dtu-tab > * { position: relative; }
.dtu .dtu-tab > span { text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); }
.dtu .dtu-tab b { font: 700 22px var(--dt-body); color: #b3c7e2; }
.dtu .dtu-tab.on { color: #2a1900; }
.dtu .dtu-tab.on > span { text-shadow: 0 1px 0 rgba(255, 244, 170, 0.6); }
.dtu .dtu-tab.on b { color: #5a3a00; }
.dtu .dtu-tab > .dtu-tic { position: absolute; left: 16px; top: 50%; width: 40px; height: 40px; transform: translateY(-50%); background: center / contain no-repeat; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }
.dtu .dtu-tab .dt-badge { position: absolute; right: -8px; top: -8px; }
.dtu-side h3 { margin-top: 10px !important; font-size: 22px !important; color: #a9c5dc; letter-spacing: 1px; }
.dtu-jumps { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #2c5571 transparent; }
.dtu .dtu-jump { display: grid; grid-template-columns: 30px 1fr auto; gap: 4px 10px; align-items: center; padding: 9px 12px; border-radius: 10px; border: 1px solid #2c4a68; background: linear-gradient(#163452, #0b2240); font-size: 21px; text-align: left; transition: border-color 0.12s, box-shadow 0.12s; }
.dtu .dtu-jump:hover { border-color: #19d6f0; box-shadow: 0 0 12px rgba(25, 214, 240, 0.3); }
.dtu .dtu-jump > .dtu-gi { grid-row: 1 / 3; width: 30px; height: 30px; align-self: center; }
.dtu .dtu-jump > span:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtu .dtu-jump b { font-weight: 700; color: #a9c5dc; font-size: 19px; }
.dtu .dtu-jump .unl-bar { grid-column: 2 / -1; --bh: 12px; }
.dtu-gi { display: block; flex: none; background: center / contain no-repeat; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }
.dtu-tip { font-size: 19px; line-height: 1.3; color: #a9c5dc; }
html.dt-ads .dtu-side { padding: 16px; gap: 10px; }
html.dt-ads .dtu .dtu-tab { --th: 54px; font-size: 25px; }

/* ---------- the groups ---------- */
.dtu-main { padding: 0; }
.dtu-scroll { position: absolute; inset: 0; overflow-y: auto; padding: 20px 24px 30px; scrollbar-width: thin; scrollbar-color: #2c5571 transparent; }
.dtu-grp { content-visibility: auto; contain-intrinsic-size: auto 480px; padding-bottom: 4px; }
.dtu-grp + .dtu-grp { margin-top: 26px; }
.dtu-gh { display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: 16px; margin-bottom: 14px; }
.dtu-gh .dtu-gi { width: 50px; height: 50px; margin: -6px 0; }
#dt-root .dt-pg .dtu-gh h2 { font-size: 30px; color: #fff4ac; white-space: nowrap; }
.dtu-gh .dt-muted { font-size: 21px; white-space: nowrap; }
.dtu-gh .unl-bar { --bh: 16px; max-width: 260px; justify-self: end; width: 100%; }
.dtu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 14px; }
.dtu-grid.sw { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }

/* a tile: its frame (the state's 9-slice), the picture, the name, what it is to you */
.dtu .dtu-tile { position: relative; height: 212px; min-width: 0; padding: 0; border: 0; background: none; --fb: 22px; color: #edfaff; transition: transform 0.12s, filter 0.12s; }
.dtu .dtu-tile:hover { transform: translateY(-2px); filter: brightness(1.12); }
.dtu .dtu-grid.sw .dtu-tile { height: 192px; }
.dtu-tile > * { position: absolute; pointer-events: none; }
.dtu-pic { left: 8px; right: 8px; top: 24px; height: 90px; display: flex; align-items: center; justify-content: center; }
.dtu-grid.sw .dtu-pic { top: 22px; height: 76px; }
.dtu-pic img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; }
.dtu-pic .ulk-sw { width: 74px; height: 74px; border-radius: 50%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45)); }
.dtu-grid.sw .dtu-pic .ulk-sw { width: 66px; height: 66px; }
.dtu-pic .ulk-shirt, .dtu-pic .ulk-art, .dtu-pic .ulk-head, .dtu-pic .ulk-celeb { height: 90px; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.45)); }
.dtu-grid.sw .dtu-pic .ulk-head { height: 76px; }
.dtu-pic .ulk-art.em { height: 80px; }
.dtu-pic .ulk-boot { display: block; width: 128px; height: 92px; background-repeat: no-repeat; background-size: 800% 100%; background-position: 14.2857% 0; }
.dtu-pic .ulk-svg { display: block; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45)); }
.dtu-pic .ulk-svg svg { width: 88px; height: 88px; display: block; overflow: visible; }
.dtu-tile.k-cstar .dtu-pic .ulk-svg svg { width: 94px; height: 94px; }
.dtu-pic .ulk-ava { display: block; width: 84px; height: 84px; border-radius: 50%; background: center / contain no-repeat; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.45)); }
.dtu-pic .ulk-glyph { font-size: 52px; line-height: 1; }
.dtu-nm { left: 8px; right: 8px; top: 120px; text-align: center; font: 19px var(--dt-sport); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4); }
.dtu-grid.sw .dtu-nm { top: 100px; font-size: 18px; }
.dtu-st { left: 10px; right: 10px; top: 148px; bottom: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.dtu-st > * { flex: none; }
.dtu-grid.sw .dtu-st { top: 126px; }
.dtu-st .unl-tag { --tg: 30px; }
.dtu-go { font: italic 800 17px/1 var(--font-display); letter-spacing: 0.5px; color: #ffd75a; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 200, 60, 0.45); white-space: nowrap; }
.dtu-how { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; text-align: center; font-size: 15px; line-height: 1.12; color: #9fe8ff; }
.dtu-prog { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0 4px; box-sizing: border-box; }
.dtu-prog .unl-bar { --bh: 12px; flex: 1 1 auto; min-width: 0; }
.dtu-prog small { flex: none; font-size: 14px; color: #cfe0f5; }

/* locked: the picture dimmed, the padlock (gold: you could buy it now; grey: not yet), the chip */
.dtu-tile.lk .dtu-pic > * { filter: grayscale(0.55) brightness(0.62); }
.dtu-tile.lk.can .dtu-pic > * { filter: grayscale(0.25) brightness(0.85); }
.dtu-tile.lk .dtu-nm { color: #a9b8cf; }
.dtu-tile > .unl-lock { right: 9px; top: 8px; --pl: 38px; z-index: 2; }
.dtu-tile > .unl-chip { left: 9px; top: 9px; --ch: 28px; z-index: 2; }
.dtu-tile > .unl-tag.n { right: 3px; top: 7px; --tg: 26px; z-index: 2; }
.dtu .dtu-tile.dtu-got { animation: dtuGot 1s ease-out; z-index: 3; }
@keyframes dtuGot { 0% { transform: scale(0.9); filter: brightness(1.8); } 35% { transform: scale(1.06); filter: brightness(1.35) drop-shadow(0 0 18px rgba(247, 201, 72, 0.9)); } 100% { transform: none; filter: none; } }
.dtu .ulk-load { width: 40px; height: 40px; border-width: 4px; border-top-color: #19d6f0; }

/* My Club's banner (dt-club.js): the Unlocks chip, its NEW badge */
.dtc-more .dtu-chip2 { position: relative; }
.dtc-more .dtu-chip2 .dt-badge { right: -9px; top: -10px; }
@media (prefers-reduced-motion: reduce) { .dtu .dtu-tile.dtu-got { animation: none; } .dtu .dtu-tile:hover, .dtu .dtu-tab:hover { transform: none; } }
