/* Arms Race: running phase, chests, schedule strip, ranking (client/panels-armsrace.js) */
.ar-root .pn-title { margin-bottom: 10px; }
.ar-help { width: 36px; height: 36px; padding: 0 !important; border-radius: 50%; border: 2px solid var(--pn-gold2); background: rgba(0,0,0,.35); color: var(--pn-gold); font: 900 17px/1 system-ui !important; }
.ar-tabs button { flex: 1 1 0; min-height: 44px; font-size: 14px; font-weight: 700; }
.ar-tabs .pn-bdg { top: -5px; right: -2px; }
.ar-body { display: grid; gap: 10px; min-width: 0; }
.ar-body > * { min-width: 0; }

/* banner of the running phase */
.ar-banner { --tc: #d98a2b; padding: 12px 12px 10px; border-radius: 14px; border: 1px solid var(--tc);
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--tc) 45%, transparent), transparent 60%), linear-gradient(135deg, #2c2a1c, #17201a 75%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 12px rgba(0,0,0,.35); }
.ar-banner .top { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; }
.ar-banner .top > .ic { width: 48px; height: 48px; display: grid; place-items: center; font-size: 28px; border-radius: 14px; background: rgba(0,0,0,.4); box-shadow: inset 0 0 0 2px var(--tc); }
.ar-banner small { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ar-banner .nm { min-width: 0; }
.ar-banner .nm b { display: block; font: 900 19px/1.15 system-ui; color: #fff; }
.ar-banner .nm i, .ar-banner .pts i { display: block; font-style: normal; font-size: 11px; line-height: 1.3; color: #cfd8c9; }
.ar-banner .pts { text-align: right; }
.ar-banner .pts small { justify-content: flex-end; }
.ar-banner .pts b { display: block; font: 900 24px/1.1 system-ui; color: var(--c-amber-hi); text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.ar-banner .cd { margin-top: 8px; font-size: 13px; color: #e8dcc0; }
.ar-banner .cd b { font: 900 15px/1 ui-monospace, Menlo, Consolas, monospace; color: #fff; }
.ar-banner .cd span { color: var(--muted); font-size: 12px; }
.ar-track { position: relative; height: 74px; margin: 4px 26px 0 6px; }
.ar-bar { position: absolute; left: 0; right: 0; bottom: 22px; height: 12px; border-radius: 6px; background: var(--c-ink); box-shadow: inset 0 0 0 1px #4a5a3c; overflow: hidden; }
.ar-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--c-amber-lo), var(--c-amber-hi)); transition: width .4s; }
.ar-chest { position: absolute; bottom: 0; width: 48px; margin-left: -24px; padding: 0; border: 0; background: none; color: #fff; display: grid; justify-items: center; gap: 12px; }
.ar-chest .ic { width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px; border-radius: 12px; background: linear-gradient(#3a4a3e, #222d26); box-shadow: 0 0 0 2px #56695a, 0 3px 0 #0d130f; filter: grayscale(.6) brightness(.85); }
.ar-chest b { min-width: 34px; padding: 1px 5px; border-radius: 999px; background: var(--c-ink); border: 1px solid #4a5a3c; font: 800 11px/1.3 system-ui; color: #cfd8c9; white-space: nowrap; }
.ar-chest.ready .ic { filter: none; background: linear-gradient(var(--c-amber-hi), #e3a03a); box-shadow: 0 0 0 2px #fff3c8, 0 3px 0 #8a5a10, 0 0 14px rgba(255,215,106,.7); animation: ar-bob 1.2s ease-in-out infinite; animation-delay: inherit; }
.ar-chest.ready b { background: var(--pn-gold); border-color: #fff3c8; color: var(--c-amber-ink); }
.ar-chest.done .ic { filter: none; background: #1f3a1c; box-shadow: 0 0 0 2px #3f7a3a; font-size: 18px; }
.ar-chest.done b { color: var(--good); border-color: #3f7a3a; }
@keyframes ar-bob { 50% { transform: translateY(-3px); } }
.ar-x2 { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #4a1830; border: 1px solid #c8557a; color: #ffc2d6; font: 800 10px/1.4 system-ui; letter-spacing: 0; text-transform: none; white-space: nowrap; vertical-align: 1px; }
.ar-x2.sm { margin: 0; }

/* daily badges */
.ar-daily { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.ar-daily .lb b { display: block; font: 900 20px/1.1 system-ui; color: var(--c-amber-hi); white-space: nowrap; } .ar-daily .lb b span { font-size: 13px; color: #d9c48c; }
.ar-daily .lb small { color: var(--muted); font-size: 11px; }
.ar-daily .boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ar-dchest { min-height: 52px; padding: 4px 2px; border-radius: 12px; border: 0; display: grid; justify-items: center; gap: 1px; color: #fff; background: linear-gradient(#3a4a3e, #222d26); box-shadow: 0 0 0 2px #56695a, 0 3px 0 #0d130f; }
.ar-dchest span { font-size: 22px; line-height: 1.1; filter: grayscale(.6); } .ar-dchest b { font: 800 11px/1.1 system-ui; white-space: nowrap; }
.ar-dchest.ready { background: linear-gradient(var(--c-amber-hi), #e3a03a); color: var(--c-amber-ink); box-shadow: 0 0 0 2px #fff3c8, 0 3px 0 #8a5a10, 0 0 14px rgba(255,215,106,.7); animation: ar-bob 1.2s ease-in-out infinite; }
.ar-dchest.ready span, .ar-dchest.done span { filter: none; } .ar-dchest.done { opacity: .75; } .ar-dchest.done b { color: var(--good); }

/* cards */
.ar-card { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.ar-cardhead { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.ar-cardhead > b { font-size: 15px; margin-right: auto; white-space: nowrap; }
.ar-seg { display: inline-flex; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.ar-seg button { min-height: 32px; padding: 4px 9px; border: 0; border-radius: 0; background: var(--c-ink); color: var(--muted); font: 700 12px/1 system-ui; white-space: nowrap; }
.ar-seg button.active { background: var(--pn-gold); color: var(--c-amber-ink); }
.ar-swapbtn { min-height: 32px; padding: 4px 9px; border-radius: 9px; background: linear-gradient(#3f7fc0, #24558a); border: 1px solid #8fbdf0; color: #fff; font: 800 12px/1 system-ui; white-space: nowrap; }
.ar-swapped { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* what scores */
.ar-acts { display: grid; gap: 6px; }
.ar-act { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.07); }
.ar-act.sm { grid-template-columns: 26px 1fr auto; padding: 5px 8px; }
.ar-act .ic { font-size: 20px; text-align: center; }
.ar-act .lb { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.25; }
.ar-act > b { font: 900 14px/1 system-ui; color: var(--c-amber-hi); white-space: nowrap; }
.ar-go { min-width: 52px; min-height: 38px; padding: 4px 10px; border-radius: 10px; font: 800 14px/1 system-ui; background: linear-gradient(#3f7fc0, #24558a); border: 1px solid #8fbdf0; color: #fff; box-shadow: 0 2px 0 #12304f; }

/* advice */
.ar-adv { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; }
.ar-adv .ic { width: 34px; height: 34px; display: grid; place-items: center; font-size: 20px; border-radius: 10px; background: var(--c-ink); border: 1px solid var(--line); }
.ar-adv b { display: block; font-size: 14px; line-height: 1.25; } .ar-adv small { display: block; font-size: 12px; line-height: 1.35; color: #cfd8c9; }
.ar-adv .ar-in { font-weight: 700; color: var(--pn-gold); white-space: nowrap; }
.ar-adv.duel { padding-top: 8px; border-top: 1px dashed var(--line); } .ar-adv.duel:first-child { padding-top: 0; border-top: 0; }
.ar-adv em { font-style: normal; font-weight: 700; color: #ffc2d6; }

/* schedule strip */
.ar-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.ar-cell { --tc: #8a6a2a; position: relative; min-height: 76px; padding: 6px 0 5px; border-radius: 10px; display: grid; justify-items: center; align-content: center; gap: 2px; color: #fff;
  background: linear-gradient(color-mix(in srgb, var(--tc) 30%, #141c17), #141c17); border: 1px solid color-mix(in srgb, var(--tc) 55%, #2a3a2e); }
.ar-cell .ic { font-size: 22px; line-height: 1.1; }
.ar-cell b { font: 800 11px/1.1 system-ui; white-space: nowrap; }
.ar-cell small { max-width: 100%; font: 700 9.5px/1.1 system-ui; color: #cfd8c9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-cell.past { opacity: .5; }
.ar-cell.now { border: 2px solid var(--pn-gold); box-shadow: 0 0 10px rgba(240,180,60,.45); }
.ar-cell.now small { color: var(--pn-gold); }
.ar-cell .x2 { position: absolute; top: -5px; right: -3px; padding: 0 4px; border-radius: 999px; background: #a8305a; border: 1px solid #ffc2d6; color: #fff; font: 800 9px/1.5 system-ui; font-style: normal; }

/* swap popup */
.ar-swaplist { display: grid; gap: 6px; margin-top: 8px; }
.ar-swapit { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; min-height: 48px; padding: 6px 10px; border-radius: 10px; text-align: left; background: rgba(0,0,0,.3); border: 1px solid var(--line); color: #fff; }
.ar-swapit .ic { font-size: 22px; text-align: center; } .ar-swapit small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ar-swapit.on { border-color: var(--pn-gold); background: #3a2a0a; box-shadow: 0 0 8px rgba(240,180,60,.4); }

/* ranking */
.ar-rklist { display: grid; gap: 4px; }
.ar-rk { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; min-height: 40px; padding: 4px 8px; border-radius: 10px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.07); }
.ar-rk .rk { font: 900 14px/1 system-ui; text-align: center; color: #cfd8c9; } .ar-rk .rk.r1, .ar-rk .rk.r2, .ar-rk .rk.r3 { font-size: 20px; }
.ar-rk .nm { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-rk .nm i { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--pn-gold); color: var(--c-amber-ink); font: 800 10px/1.5 system-ui; font-style: normal; }
.ar-rk > b { font: 900 14px/1 system-ui; color: var(--c-amber-hi); white-space: nowrap; }
.ar-rk .rw { font-size: 11px; color: #cfd8c9; white-space: nowrap; }
.ar-rk.me { border-color: var(--pn-gold2); background: linear-gradient(135deg, #2e2a14, rgba(0,0,0,.28) 70%); }
.ar-rkrw { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: center; }
.ar-rkrw > b { font: 900 13px/1 system-ui; color: var(--pn-gold); }

/* reward chips and popups */
.ar-rws { display: flex; flex-wrap: wrap; gap: 4px; }
.ar-rw { display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.12); font-size: 12px; white-space: nowrap; }
#sheet .ar-rws { margin-top: 6px; gap: 6px; } #sheet .ar-rw { font-size: 14px; padding: 3px 10px; }
.ar-rws.named { display: grid; grid-template-columns: 1fr 1fr; } .ar-rws.named .ar-rw { gap: 5px; border-radius: 10px; min-width: 0; }
.ar-rws.named small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.ar-note { font-size: 13px; line-height: 1.4; margin: 10px 0 0; }
.ar-duelnote { color: #ffc2d6; }
.ar-rules { margin: 4px 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.4; }
#sheet .ar-acts { margin-top: 8px; }
.ar-pop .ec-pop-card { display: grid; gap: 10px; }
