/* Clan Duel (client/panels-duel.js) — gunmetal arena, hazard-stripe header, steel blue (us) vs rust red (them). */
.dl-root { --us: #3f8fd8; --us2: #1f5a9a; --them: #d0503a; --them2: #8a2a1a;
  min-height: 100%; display: flex; flex-direction: column; margin: -12px -12px 0;
  background: radial-gradient(ellipse at 50% 0%, #3a4048, #161a1e 70%); }
#panel .pn-wrap.dl-root { padding-bottom: 0; min-height: calc(100% + 12px); } /* tab bar sits flush at the bottom even on short tabs */
.dl-head { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 12px 14px;
  background: linear-gradient(rgba(20,22,26,.82), rgba(20,22,26,.92)), repeating-linear-gradient(-45deg, #e0a52a 0 14px, #2a2a2a 14px 28px);
  border-bottom: 3px solid #e0a52a; box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.dl-head .tt { flex: 1; min-width: 0; display: grid; }
.dl-head .tt b { font: 900 20px/1.15 system-ui; color: var(--c-amber-hi); text-shadow: 0 2px 0 #000; letter-spacing: .02em; }
.dl-head .tt small { color: #c9d1d8; font-size: 12px; }
.dl-help { flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 2px solid #e0a52a; background: #23272c; color: var(--c-amber-hi); font: 900 18px/1 system-ui; }
.dl-body { flex: 1; display: grid; align-content: start; gap: 12px; padding: 12px 12px 16px; }

/* today */
.dl-theme { --tc: #d98a2b; position: relative; overflow: hidden; display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; padding: 12px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 70%, #000), color-mix(in srgb, var(--tc) 25%, #111) 75%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tc) 80%, #fff), 0 6px 16px rgba(0,0,0,.45); }
.dl-theme.rest { --tc: #4a6a5a; }
.dl-theme .ic { grid-row: span 2; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.dl-theme .tx small { font: 800 11px/1 system-ui; letter-spacing: .1em; color: rgba(255,255,255,.75); }
.dl-theme .tx b { display: block; font: 900 21px/1.15 system-ui; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.45); }
.dl-theme .tx p { margin: 3px 0 0; font-size: 13px; line-height: 1.3; color: rgba(255,255,255,.88); }
.dl-theme .cd { grid-column: 1 / -1; justify-self: start; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.45); }
.dl-theme .wp { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.dl-theme .wp b { min-width: 26px; padding: 2px 8px; border-radius: 8px; text-align: center; font: 900 17px/1.15 system-ui; color: #2a1a04; background: linear-gradient(var(--c-amber-hi), #e3a03a); box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.dl-theme .wp small { font: 800 12px/1 system-ui; color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.dl-theme .wp.dbl b { background: linear-gradient(#fff, var(--c-amber-hi)); box-shadow: 0 0 10px var(--c-amber-hi), 0 2px 0 rgba(0,0,0,.35); }
.dl-theme .cd small { font-size: 11px; color: #d8dde2; } .dl-theme .cd b { font: 900 14px/1 ui-monospace, Menlo, monospace; color: var(--c-amber-hi); }
.dl-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dl-sd { --tc: #4a6a5a; display: grid; justify-items: center; gap: 1px; padding: 5px 0 4px; border-radius: 9px; background: #23292e; border: 1px solid #343c43; opacity: .75; }
.dl-sd span { font-size: 18px; } .dl-sd b { font: 800 10px/1 system-ui; color: #aab4bd; }
.dl-sd i { font: 900 10px/1.2 system-ui; font-style: normal; color: var(--c-amber-hi); min-height: 12px; }
.dl-sd.past { opacity: .45; }
.dl-sd.on { opacity: 1; background: color-mix(in srgb, var(--tc) 55%, #111); border-color: var(--c-amber-hi); box-shadow: 0 0 10px color-mix(in srgb, var(--tc) 70%, transparent); }
.dl-sd.on b { color: #fff; }
.dl-join { display: grid; grid-template-columns: 40px 1fr; gap: 6px 10px; align-items: center; padding: 12px; border-radius: 12px; background: #2a2418; border: 1px dashed var(--c-amber-lo); }
.dl-join .big { font-size: 32px; } .dl-join b { display: block; color: var(--c-amber-hi); font-size: 15px; } .dl-join small { color: var(--muted); font-size: 12px; }
.dl-join button { grid-column: 1 / -1; height: 40px; border-radius: 10px; border: 0; font: 900 15px/1 system-ui; color: #2a1a04; background: linear-gradient(var(--c-amber-hi), #e3a03a); box-shadow: 0 3px 0 #8a5a10; }
.dl-score { padding: 12px; border-radius: 14px; background: linear-gradient(#262c32, #1a1f24); border: 1px solid #3a434b; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.dl-score .top { display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.dl-score .top small { color: var(--muted); font-size: 12px; } .dl-score .top b { display: block; font: 900 28px/1.1 system-ui; color: #fff; }
.dl-score .top .nx { text-align: right; color: var(--c-amber-hi); font-weight: 700; }
.dl-bar { position: relative; height: 14px; margin: 10px 4px 12px; border-radius: 7px; background: #0e1114; box-shadow: inset 0 0 0 1px #3a434b; }
.dl-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: linear-gradient(90deg, var(--c-amber-lo), var(--c-amber-hi)); }
.dl-bar .mk { position: absolute; top: -3px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: #59636d; }
.dl-bar .mk.ok { background: #fff; box-shadow: 0 0 6px var(--c-amber-hi); }
.dl-chests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dl-chest { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 0; color: #fff;
  background: linear-gradient(#3a434b, #262c32); box-shadow: 0 0 0 2px #59636d, 0 4px 0 #15191c; }
.dl-chest .ic { font-size: 30px; line-height: 1.1; } .dl-chest b { font: 800 11px/1.15 system-ui; text-align: center; } .dl-chest small { font: 800 11px/1 system-ui; color: #aab4bd; }
.dl-chest.locked .ic { filter: grayscale(.9) brightness(.7); }
.dl-chest.ready { background: linear-gradient(var(--c-amber-hi), #e3a03a); color: #2a1a04; box-shadow: 0 0 0 2px #fff3c8, 0 4px 0 #8a5a10, 0 0 16px rgba(255,215,106,.6); animation: dl-pulse 1.4s ease-in-out infinite; }
.dl-chest.ready small { color: #2a1a04; font-size: 13px; }
.dl-chest.done { opacity: .6; } .dl-chest.done small { color: var(--good); }
@keyframes dl-pulse { 50% { transform: translateY(-2px); box-shadow: 0 0 0 2px #fff3c8, 0 6px 0 #8a5a10, 0 0 24px rgba(255,215,106,.85); } }
.dl-acts, .dl-days { border-radius: 14px; overflow: hidden; background: #1c2126; border: 1px solid #343c43; }
.dl-acts h4, .dl-days h4 { margin: 0; padding: 8px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--c-amber-hi); background: #252b31; }
.dl-act { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 9px 12px; border-top: 1px solid rgba(255,255,255,.05); }
.dl-act .ic { font-size: 20px; text-align: center; } .dl-act .lb { font-size: 14px; }
.dl-act b { padding: 3px 9px; border-radius: 999px; background: #1f3a1c; color: var(--c-good-hi); font: 900 13px/1.2 system-ui; white-space: nowrap; }

.dl-paid { margin-top: 10px; padding-top: 9px; border-top: 1px dashed #3a434b; display: grid; gap: 5px; }
.dl-paid .row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; } .dl-paid .row b { font: 900 13px/1.2 system-ui; color: #9fd0ff; white-space: nowrap; }
.dl-paid .bar { height: 6px; border-radius: 3px; background: #0e1114; overflow: hidden; } .dl-paid .bar i { display: block; height: 100%; background: linear-gradient(90deg, #3f8fd8, #9fd0ff); }
.dl-paid small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.dl-paid.full .row b { color: #ff9a7a; } .dl-paid.full .bar i { background: linear-gradient(90deg, #d0503a, #ff9a7a); }
.dl-hint { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #2c2a1a, #1e2126); border: 1px solid var(--c-amber-lo); }
.dl-hint .ic { font-size: 28px; text-align: center; } .dl-hint small { font: 800 11px/1 system-ui; letter-spacing: .08em; color: var(--c-amber-hi); }
.dl-hint p { margin: 3px 0 0; font-size: 13px; line-height: 1.35; color: var(--c-text); }

/* match */
.dl-vs { position: relative; display: grid; grid-template-columns: 1fr 92px 1fr; align-items: center; min-height: 128px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(105deg, var(--us2) 0 48%, #111 48% 52%, var(--them2) 52%); box-shadow: 0 0 0 2px #59636d, 0 6px 16px rgba(0,0,0,.5); }
.dl-side { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; min-width: 0; text-align: center; }
.dl-side .flag { width: 56px; height: 62px; display: grid; place-items: center; align-content: center; clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
  background: linear-gradient(#fff3, #0003), var(--us); }
.dl-side.them .flag { background: linear-gradient(#fff3, #0003), var(--them); }
.dl-side .flag span { font-size: 20px; line-height: 1; } .dl-side .flag b { font: 900 12px/1.1 system-ui; color: #fff; text-shadow: 0 1px 0 #000; }
.dl-side .nm { max-width: 100%; font: 800 14px/1.15 system-ui; color: #fff; overflow-wrap: anywhere; text-shadow: 0 1px 0 #000; }
.dl-side .npc, .dl-side .pw { padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.4); color: #ffb39a; font-size: 10px; font-weight: 800; }
.dl-side .pw { color: var(--c-text); }
.dl-vs .mid { display: grid; justify-items: center; gap: 2px; z-index: 1; }
.dl-vs .mid b { font: 900 24px/1 system-ui; color: var(--c-amber-hi); text-shadow: 0 2px 0 #000; }
.dl-vs .mid .vs { font: italic 900 30px/1 system-ui; color: #fff; text-shadow: 0 0 10px #ff8a3a, 0 2px 0 #000; }
.dl-vs .mid small { font-size: 10px; color: #d8dde2; text-shadow: 0 1px 0 #000; }
.dl-final { padding: 10px; border-radius: 12px; text-align: center; font: 900 17px/1.2 system-ui; }
.dl-final.win { background: linear-gradient(var(--c-amber-pale), var(--c-amber)); color: #3a2304; } .dl-final.loss { background: #3a1f1a; color: #ffb39a; } .dl-final.draw { background: #2a3036; color: var(--c-text); }
.dl-live { padding: 10px 12px; border-radius: 14px; background: #1c2126; border: 1px solid #343c43; display: grid; gap: 8px; }
.dl-live .hd { display: flex; justify-content: space-between; gap: 8px; font: 800 13px/1.2 system-ui; }
.dl-live .live, .pill.live { color: #ff6a5a; }
.dl-live .hd small { color: var(--muted); font-weight: 600; font-size: 11px; text-align: right; }
.dl-live.wk .dl-pbar { height: 14px; } .dl-live.wk .dl-pbar span { line-height: 14px; font-size: 10px; } .dl-live.wk .dl-tot { font-size: 14px; }
.dl-day .nm .mv { display: flex; gap: 10px; overflow: hidden; white-space: nowrap; } .dl-day .nm .mv .us { color: #8fc4f5; } .dl-day .nm .mv .them { color: #f5a08a; }
.dl-day .nm small { display: block; }
.dl-pbar { position: relative; display: flex; height: 22px; border-radius: 11px; overflow: hidden; box-shadow: inset 0 0 0 1px #000; }
.dl-pbar i.us { background: linear-gradient(#6fb0f0, var(--us)); } .dl-pbar i.them { background: linear-gradient(#f08a6a, var(--them)); }
.dl-pbar span { position: absolute; top: 0; line-height: 22px; font: 900 12px/22px system-ui; color: #fff; text-shadow: 0 1px 0 #000; }
.dl-pbar .l { left: 8px; } .dl-pbar .r { right: 8px; }
.dl-tot { display: flex; justify-content: space-between; font: 900 18px/1 system-ui; } .dl-tot .us { color: #8fc4f5; } .dl-tot .them { color: #f5a08a; }
.dl-mvps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dl-mvp { display: grid; grid-template-columns: 26px 1fr auto; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 10px; min-width: 0; }
.dl-mvp.us { background: color-mix(in srgb, var(--us) 25%, #15191c); } .dl-mvp.them { background: color-mix(in srgb, var(--them) 25%, #15191c); }
.dl-mvp .ic { font-size: 20px; } .dl-mvp small { display: block; font-size: 10px; color: var(--muted); }
.dl-mvp b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-mvp > div { min-width: 0; } .dl-mvp i { font: 900 12px/1 system-ui; font-style: normal; color: var(--c-amber-hi); }
.dl-day, .dl-hist { display: grid; grid-template-columns: 28px 28px 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid rgba(255,255,255,.05); }
.dl-hist { grid-template-columns: 28px 1fr auto; }
.dl-hist.muted { display: block; color: var(--muted); font-size: 13px; }
.dl-day.on { background: rgba(255,215,106,.07); box-shadow: inset 3px 0 0 var(--c-amber-hi); }
.dl-day .d { font: 900 12px/1 system-ui; color: #aab4bd; } .dl-day .ic, .dl-hist .ic { font-size: 20px; text-align: center; }
.dl-day .nm, .dl-hist .nm { min-width: 0; } .dl-day .nm b, .dl-hist .nm b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-day .nm small, .dl-hist .nm small { color: var(--muted); font-size: 12px; }
.pill { padding: 3px 9px; border-radius: 999px; background: #2a3036; color: #aab4bd; font: 800 12px/1.2 system-ui; white-space: nowrap; }
.pill.win { background: #1f3a1c; color: var(--c-good-hi); } .pill.loss { background: #3a1f1a; color: #ff8a6a; } .pill.draw { color: var(--c-text); } .pill.live { background: #3a1f1a; }

/* league */
.dl-league { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 14px;
  background: radial-gradient(circle at 15% 50%, rgba(255,215,106,.25), transparent 50%), linear-gradient(135deg, #2c333a, #1a1f24); border: 2px solid var(--c-amber-lo); }
.dl-league .big { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; background: #12161a; box-shadow: 0 0 0 3px var(--c-amber-lo), 0 0 18px rgba(255,215,106,.35); }
.dl-league b { display: block; font: 900 20px/1.2 system-ui; color: var(--c-amber-hi); } .dl-league small { display: block; color: #d8dde2; font-size: 13px; } .dl-league .nx { color: var(--muted); font-size: 12px; margin-top: 2px; }

.dl-league { border-color: var(--lc, var(--c-amber-lo)); } .dl-league .big { box-shadow: 0 0 0 3px var(--lc, var(--c-amber-lo)), 0 0 18px color-mix(in srgb, var(--lc, var(--c-amber-hi)) 45%, transparent); }
.dl-league .nx b { color: var(--c-amber-hi); font: 900 12px/1 ui-monospace, Menlo, monospace; }
.dl-ladder { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.dl-ladder .lg { display: grid; justify-items: center; gap: 1px; padding: 5px 0 4px; border-radius: 9px; background: #23292e; border: 1px solid #343c43; opacity: .6; }
.dl-ladder .lg span { font-size: 18px; } .dl-ladder .lg b { font: 800 10px/1 system-ui; color: #d8dde2; } .dl-ladder .lg i { font: 900 10px/1.2 system-ui; font-style: normal; color: #aab4bd; }
.dl-ladder .lg.on { opacity: 1; border-color: var(--lc); background: color-mix(in srgb, var(--lc) 30%, #15191c); box-shadow: 0 0 10px color-mix(in srgb, var(--lc) 60%, transparent); } .dl-ladder .lg.on i { color: #fff; }
.dl-last { padding: 8px 12px; border-radius: 10px; background: #252b31; color: #d8dde2; font: 700 13px/1.3 system-ui; }
.dl-last.up { background: #1f3a1c; color: #a8f07a; } .dl-last.down { background: #3a1f1a; color: #ffb39a; }
.dl-table .trow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 26px 26px 26px 34px; gap: 4px; align-items: center; padding: 7px 8px 7px 6px; border-top: 1px solid rgba(255,255,255,.05); font-size: 13px; }
.dl-table .trow.th { padding-top: 5px; padding-bottom: 5px; font: 800 10px/1 system-ui; text-transform: uppercase; letter-spacing: .04em; color: #aab4bd; }
.dl-table .trow.th .wk.cur { color: var(--c-amber-hi); }
.dl-table .rk { font: 900 13px/1 system-ui; color: #aab4bd; text-align: right; white-space: nowrap; }
.dl-table .cl { display: flex; gap: 5px; align-items: center; min-width: 0; } .dl-table .cl i { font-style: normal; font-size: 13px; }
.dl-table .cl b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-table .wk { text-align: center; font: 800 12px/20px system-ui; border-radius: 5px; color: #7d8791; }
.dl-table .trow:not(.th) .wk.win { background: #1f3a1c; color: var(--c-good-hi); } .dl-table .trow:not(.th) .wk.loss { background: #3a1f1a; color: #ff8a6a; }
.dl-table .trow:not(.th) .wk.draw { background: #2a3036; color: var(--c-text); } .dl-table .trow:not(.th) .wk.live { background: #2c2a1a; color: var(--c-amber-hi); }
.dl-table .sc { text-align: right; font: 900 14px/1 system-ui; color: #fff; } .dl-table .trow.th .sc { font: inherit; color: inherit; }
.dl-table .trow.up { box-shadow: inset 3px 0 0 #6fd13a; background: rgba(111,209,58,.06); } .dl-table .trow.up .rk { color: var(--c-good-hi); }
.dl-table .trow.down { box-shadow: inset 3px 0 0 #d0503a; background: rgba(208,80,58,.07); } .dl-table .trow.down .rk { color: #ff8a6a; }
.dl-table .trow.me { background: rgba(255,215,106,.14); } .dl-table .trow.me .cl b { color: var(--c-amber-hi); font-weight: 900; }
.dl-table .legend { display: grid; gap: 3px; padding: 8px 12px 10px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; line-height: 1.35; color: var(--muted); }
.dl-table .legend .up { color: var(--c-good-hi); font-weight: 700; } .dl-table .legend .down { color: #ff8a6a; font-weight: 700; }
.dl-hist.rw { grid-template-columns: 70px 1fr; } .dl-hist.rw .pill { text-align: center; }

/* rules popup */
.dl-rules { margin: 4px 0 8px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; }
.dl-rh { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--pn-gold); }
.dl-rrow { display: grid; gap: 4px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.06); font-size: 14px; }
.dl-rws { display: flex; flex-wrap: wrap; gap: 6px; } .dl-rw { padding: 3px 9px; border-radius: 999px; background: var(--c-ink); border: 1px solid var(--line); font-size: 13px; }
.dl-note { font-size: 13px; margin: 10px 0 0; }

/* bottom tab slider */
.dl-tabs { position: sticky; bottom: 0; display: flex; gap: 2px; align-items: stretch; padding: 6px 6px calc(8px + var(--safe-bottom));
  background: linear-gradient(#2c3238, #181c20); border-top: 3px solid #e0a52a; box-shadow: 0 -6px 14px rgba(0,0,0,.5); }
.dl-back { flex: 0 0 48px; height: 48px; align-self: center; border-radius: 50%; border: 0; font-size: 22px; color: #fff; background: radial-gradient(circle at 50% 35%, #59636d, #2a3036); box-shadow: 0 0 0 2px #e0a52a; }
.dl-tab { position: relative; flex: 1 0 60px; padding: 6px 2px; border: 0; border-radius: 10px 10px 4px 4px; background: none; display: grid; justify-items: center; gap: 2px; color: #fff; }
.dl-tab .ic { font-size: 26px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.dl-tab b { font: 900 12px/1.1 system-ui; text-shadow: 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000, 0 -1px 0 #000; }
.dl-tab.on { background: linear-gradient(var(--c-amber-hi), #e3a03a); box-shadow: 0 -2px 0 #fff3c8 inset; }
.dl-tab .hud-bdg { top: 2px; right: 6px; }
