/* Clan Battlefield (client/panels-battlefield.js). --bf-mine / --bf-foe / --bf-z = the three owner colours. */
.pn-wrap { --bf-mine: #4e8fe0; --bf-mine-hi: #9cc6ff; --bf-foe: #e0574c; --bf-foe-hi: #ffb0a6; --bf-z: #8a9a5a; }

/* sign-up */
.bf-hero { margin-bottom: 10px; padding: 14px 12px; border-radius: 14px; text-align: center; border: 1px solid #3c4f6b;
  background: radial-gradient(120% 90% at 50% 0%, #24364f 0%, #172231 60%, #10171f 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 0 var(--c-ink); }
.bf-hero.on { border-color: var(--c-good); }
.bf-kicker { font: 800 11.5px/1.3 system-ui; letter-spacing: .08em; text-transform: uppercase; color: var(--c-amber-pale); }
.bf-big { margin: 4px 0 2px; font: 900 28px/1.1 system-ui; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.6); font-variant-numeric: tabular-nums; }
.bf-line { font-size: 13px; color: var(--c-text-2); }
.bf-line b { color: var(--c-amber-hi); font-variant-numeric: tabular-nums; }
.bf-off { margin-top: 10px; min-height: 40px; }
.bf-go { width: 100%; margin: 4px 0 10px; }
.bf-slot { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; background: linear-gradient(#202b24, #171f1a); border: 1px solid var(--line); min-height: 60px; }
.bf-slot.on { border-color: var(--c-good); box-shadow: 0 0 10px rgba(94,196,107,.25); }
.bf-slot .mid { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bf-slot .mid b { font-size: 17px; font-variant-numeric: tabular-nums; }
.bf-slot .mid b i { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.bf-slot .mid small { font-size: 12px; color: var(--muted); }
.bf-sign { flex: none; min-width: 92px; }
.bf-tag { padding: 2px 9px; border-radius: 999px; font: 800 11px/1.5 system-ui; letter-spacing: .04em; text-transform: uppercase; background: var(--c-ink); border: 1px solid var(--line); color: var(--c-text-2); white-space: nowrap; }
.bf-tag.good { background: var(--c-good-deep); border-color: var(--c-good); color: #c9ffd0; }
.bf-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bf-sec small { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); font-weight: 400; }

/* the scoreboard */
.bf-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px 8px; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(78,143,224,.22), #151c18 42%, #151c18 58%, rgba(224,87,76,.22)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 0 var(--c-ink); }
.bf-score.won { border-color: var(--c-good); } .bf-score.lost { border-color: var(--c-blood-lo); }
.bf-score .side { display: grid; min-width: 0; }
.bf-score .side small { font: 800 11.5px/1.3 system-ui; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-score .side b { font: 900 28px/1.1 system-ui; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.bf-score .side.mine small { color: var(--bf-mine-hi); } .bf-score .side.mine b { color: #fff; }
.bf-score .side.foe { text-align: right; } .bf-score .side.foe small { color: var(--bf-foe-hi); } .bf-score .side.foe b { color: #fff; }
.bf-score .mid { display: grid; justify-items: center; padding: 3px 10px; border-radius: 10px; background: rgba(0,0,0,.45); border: 1px solid var(--line); min-width: 84px; }
.bf-score .mid small { font: 700 10px/1.3 system-ui; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bf-score .mid b { font: 900 18px/1.2 system-ui; color: var(--c-amber-hi); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bf-bar { grid-column: 1 / -1; display: flex; height: 8px; border-radius: 5px; overflow: hidden; background: var(--c-ink); border: 1px solid var(--line); }
.bf-bar i { display: block; height: 100%; transition: width .4s; }
.bf-bar i.mine { background: linear-gradient(90deg, #2f6fa8, var(--bf-mine)); } .bf-bar i.foe { background: linear-gradient(90deg, var(--bf-foe), #a33a32); }
.bf-tick { grid-column: 1 / -1; text-align: center; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bf-brief { margin-bottom: 8px; padding: 7px 10px; border-radius: 10px; font-size: 13px; background: rgba(240,180,60,.1); border: 1px solid var(--c-amber-deep); color: var(--c-amber-pale); }

/* the field: a schematic, my camp at the bottom */
.bf-field { position: relative; width: 100%; aspect-ratio: 1 / 1.12; margin-bottom: 10px; border-radius: 14px; overflow: hidden; border: 2px solid var(--c-rust-3);
  background:
    radial-gradient(60% 40% at 50% 50%, rgba(240,180,60,.10), transparent 70%),
    linear-gradient(180deg, rgba(224,87,76,.16) 0%, transparent 28%, transparent 72%, rgba(78,143,224,.18) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 28px), repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 28px),
    #1a2319;
  box-shadow: inset 0 0 40px rgba(0,0,0,.6), 0 3px 0 var(--c-ink); }
.bf-roads { position: absolute; inset: 0; pointer-events: none; }
.bf-roads svg { width: 100%; height: 100%; display: block; }
.bf-roads line { stroke: rgba(232,199,154,.2); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-dasharray: 2 5; stroke-linecap: round; }
.bf-pt { position: absolute; transform: translate(-50%, -50%); width: 58px; height: 58px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--bf-z); overflow: visible;
  background: radial-gradient(circle at 50% 35%, #46523a, #1c2418 78%); box-shadow: 0 3px 0 rgba(0,0,0,.55), inset 0 0 10px rgba(0,0,0,.5); }
.bf-pt.big { width: 70px; height: 70px; }
.bf-pt .ic { font-size: 24px; line-height: 1; } .bf-pt.big .ic { font-size: 30px; }
.bf-pt .val { position: absolute; top: -7px; right: -9px; min-width: 24px; padding: 0 4px; border-radius: 9px; font: 900 11px/17px system-ui; font-style: normal; color: var(--c-amber-ink); background: var(--c-amber); border: 1px solid #ffe7a6; }
.bf-pt b { position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); padding: 0 5px; border-radius: 6px; font: 800 10px/14px system-ui; white-space: nowrap; color: #fff; background: rgba(8,12,9,.82); }
.bf-pt small { position: absolute; top: calc(100% + 18px); left: 50%; transform: translateX(-50%); font: 700 10px/13px system-ui; white-space: nowrap; color: var(--c-text-2); text-shadow: 0 1px 2px #000; }
.bf-pt.mine { border-color: var(--bf-mine); background: radial-gradient(circle at 50% 35%, #3f6ea8, #14263d 78%); box-shadow: 0 3px 0 rgba(0,0,0,.55), 0 0 14px rgba(78,143,224,.7), inset 0 0 10px rgba(0,0,0,.4); }
.bf-pt.foe { border-color: var(--bf-foe); background: radial-gradient(circle at 50% 35%, #a8483f, #3d1614 78%); box-shadow: 0 3px 0 rgba(0,0,0,.55), 0 0 14px rgba(224,87,76,.7), inset 0 0 10px rgba(0,0,0,.4); }
.bf-camp { position: absolute; transform: translate(-50%, -50%); min-height: 34px; padding: 3px 12px; display: flex; align-items: center; gap: 5px; border-radius: 999px; font-size: 12px; white-space: nowrap; border: 2px solid var(--bf-mine); background: rgba(20,38,61,.94); box-shadow: 0 2px 0 rgba(0,0,0,.5); }
.bf-camp.foe { border-color: var(--bf-foe); background: rgba(61,22,20,.94); }
.bf-camp:disabled { opacity: 1; filter: none; }
.bf-camp span { font-size: 16px; } .bf-camp b { font-weight: 800; color: #fff; } .bf-camp small { color: var(--c-text-2); font-size: 10.5px; }
.bf-sq { position: absolute; z-index: 2; transform: translate(-50%, -50%); width: 17px; height: 17px; border-radius: 50%; font: 900 9.5px/15px system-ui; font-style: normal; text-align: center; color: #fff; pointer-events: none;
  background: var(--bf-mine); border: 1px solid #dcebff; box-shadow: 0 1px 2px rgba(0,0,0,.7); }
.bf-sq.foe { background: var(--bf-foe); border-color: #ffdcd6; }
.bf-sq.me { width: 21px; height: 21px; font: 900 12px/18px system-ui; color: var(--c-amber-ink); background: var(--c-amber-hi); border: 2px solid #fff; box-shadow: 0 0 8px var(--c-amber-hi), 0 1px 2px rgba(0,0,0,.7); z-index: 3; }
.bf-sq.walk { box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 1px 2px rgba(0,0,0,.7); }

/* my squad */
.bf-mine-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.bf-mine-head h3 { margin: 0; }
.bf-status { font-size: 14px; } .bf-status b { color: var(--c-amber-hi); } .bf-status span { font-variant-numeric: tabular-nums; }
.bf-meter { display: grid; grid-template-columns: 1fr auto; align-items: baseline; margin-top: 8px; font-size: 12.5px; color: var(--c-text-2); }
.bf-meter b { font-weight: 700; } .bf-meter .pn-bar { grid-column: 1 / -1; }
.bf-mine .pn-note { margin-top: 6px; } .bf-mine .bf-go { margin: 8px 0 0; } .bf-mine .bf-off { width: 100%; }

/* feed and roster */
.bf-feed { display: grid; gap: 4px; }
.bf-ev { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 9px; border-radius: 8px; font-size: 12.5px; background: #131a16; border-left: 3px solid var(--bf-z); }
.bf-ev.mine { border-left-color: var(--bf-mine); } .bf-ev.foe { border-left-color: var(--bf-foe); }
.bf-ev span { min-width: 0; overflow-wrap: anywhere; } .bf-ev small { flex: none; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.bf-row { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 7px 8px; margin-bottom: 6px; border-radius: 10px; background: linear-gradient(#202b24, #171f1a); border: 1px solid var(--line); border-left: 4px solid var(--bf-mine); }
.bf-row.foe { border-left-color: var(--bf-foe); }
.bf-row.me { background: linear-gradient(#2f2a14, #1f1b0e); }
.bf-row .no { text-align: center; font-weight: 800; color: var(--muted); }
.bf-row .mid { min-width: 0; display: grid; gap: 1px; }
.bf-row .mid b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-row .mid b i { font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); }
.bf-row .mid small { font-size: 11.5px; color: var(--muted); }
.bf-row .v { font-weight: 800; color: var(--pn-gold, var(--c-amber)); font-variant-numeric: tabular-nums; }
