/* CP screen: six parts with caps, grades, Raise buttons and permanent CP (client/panels-cp.js) */
#hud .hud-stats .pw, #top .who .power { cursor: pointer; }

/* grade medal: a cut-corner plate in the grade's colour */
.cp-medal { --g: var(--c-muted); --g2: #56655a; width: 34px; height: 34px; display: grid; place-items: center; flex: none; clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); background: linear-gradient(160deg, var(--g), var(--g2)); }
.cp-medal b { font: 900 18px/1 system-ui; color: #1a1408; text-shadow: 0 1px 0 rgba(255,255,255,.45); }
.cp-medal.gS { --g: #ffe08a; --g2: var(--c-amber-lo); } .cp-medal.gA { --g: #d9a8f5; --g2: #8a45c0; } .cp-medal.gB { --g: #9cc8f5; --g2: #3a74c4; } .cp-medal.gC { --g: #c3cfc6; --g2: #66756a; }
.cp-medal.big { width: 72px; height: 78px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.55)); } .cp-medal.big b { font-size: 42px; }
.cp-medal.sm { width: 24px; height: 24px; } .cp-medal.sm b { font-size: 13px; }

/* header */
.cp-head { display: grid; gap: 10px; padding: 14px 12px 12px; margin-bottom: 4px; border-radius: 18px; border: 1px solid var(--pn-gold2); background: radial-gradient(120% 120% at 0% 0%, rgba(240,180,60,.24), transparent 55%), linear-gradient(135deg, #2c3d30, #141d17 75%); box-shadow: 0 6px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,230,160,.18); }
.cp-top { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; }
.cp-total { display: grid; gap: 2px; min-width: 0; }
.cp-total small { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--pn-gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-total b { font: 900 29px/1.05 system-ui; color: #fff; letter-spacing: .01em; text-shadow: 0 2px 0 #000, 0 0 18px rgba(240,180,60,.35); white-space: nowrap; }
.cp-total span { font-size: 12px; color: #cfe0d2; }
.cp-split { display: flex; gap: 2px; height: 10px; border-radius: 6px; overflow: hidden; background: var(--c-ink); border: 1px solid rgba(0,0,0,.6); }
.cp-split i { min-width: 3px; box-shadow: inset 0 2px 0 rgba(255,255,255,.28), inset 0 -2px 0 rgba(0,0,0,.25); }
.cp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cp-tile { display: grid; gap: 1px; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.08); min-width: 0; }
.cp-tile small { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cp-tile b { font: 800 17px/1.2 system-ui; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-tile span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-tile.perm { border-color: rgba(94,196,107,.5); } .cp-tile.perm b { color: #8fe09a; }
.cp-tile.peak b { color: #ffe9b0; } .cp-tile.peak.down span { color: #ff9d92; }

/* the six parts */
.cp-part { position: relative; display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 10px; margin-bottom: 8px; border-radius: 14px; background: linear-gradient(#24332a, #18221c); border: 1px solid #3a5042; box-shadow: 0 3px 0 var(--c-ink), inset 0 1px 0 rgba(255,255,255,.07); }
.cp-part.tap { cursor: pointer; }
.cp-part.best { border-color: var(--pn-gold); box-shadow: 0 3px 0 var(--c-ink), 0 0 0 1px rgba(240,180,60,.35), 0 0 14px rgba(240,180,60,.22), inset 0 1px 0 rgba(255,230,160,.18); }
.cp-ico { --c: #888; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 85%, #fff), color-mix(in srgb, var(--c) 55%, #000)); border: 2px solid rgba(255,230,170,.55); box-shadow: 0 0 0 3px var(--c-ink), inset 0 -5px 8px rgba(0,0,0,.35); text-shadow: 0 2px 3px rgba(0,0,0,.45); }
.cp-mid { display: grid; gap: 3px; min-width: 0; }
.cp-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cp-name b { font-size: 14px; letter-spacing: .02em; white-space: nowrap; }
.cp-arrow { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px; color: var(--c-amber-ink); background: linear-gradient(#ffe08a, var(--pn-gold2)); white-space: nowrap; animation: cpArrow 1.6s ease-in-out infinite; }
@keyframes cpArrow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.cp-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-val b { font: 800 16px/1.1 system-ui; color: #fff; } .cp-val small { font-size: 11px; color: var(--muted); }
.cp-bar { height: 9px; border-radius: 5px; background: var(--c-ink); border: 1px solid var(--line); overflow: hidden; }
.cp-bar i { --c: var(--good); display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000), var(--c)); box-shadow: inset 0 2px 0 rgba(255,255,255,.3); transition: width .3s; }
.cp-bar.thin { height: 5px; }
.cp-sub { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cp-side { display: grid; justify-items: center; gap: 6px; }
.cp-raise { min-width: 62px; min-height: 34px; padding: 4px 10px; font-size: 13px; font-weight: 800; border-radius: 10px; color: #eaf6ec; background: linear-gradient(#3f8f5f, #1f5a38); border: 1px solid var(--c-good); box-shadow: 0 2px 0 var(--c-ink); }
.cp-raise.hot { color: var(--c-amber-ink); background: linear-gradient(#ffe08a, var(--pn-gold2)); border-color: #fff0c0; }
.cp-raise:active { transform: translateY(2px); box-shadow: none; }
.cp-more { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #cfe0d2; }
.cp-more p { margin: 0; } .cp-more p b { color: var(--pn-gold); } .cp-more .cp-next { color: #8fe09a; font-weight: 700; }
.cp-camp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cp-camp button { display: grid; gap: 3px; padding: 6px; text-align: left; font-size: 11px; border-radius: 10px; background: rgba(0,0,0,.3); min-width: 0; }
.cp-camp button span, .cp-camp button b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cp-camp button b { font-size: 11px; color: #fff; }

/* what CP is */
.cp-about { margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--line); font-size: 12.5px; color: #cfe0d2; }
.cp-about h4 { margin: 0 0 6px; font-size: 13px; color: var(--pn-gold); text-transform: uppercase; letter-spacing: .05em; }
.cp-about p { margin: 0 0 8px; } .cp-about .cp-gap { margin: 10px 0 0; color: #ffcfc9; }
.cp-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cp-legend > div { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 10px; background: rgba(255,255,255,.05); }
.cp-legend small { font-size: 10.5px; color: var(--muted); text-align: center; }
