/* update 89: first contact popup, Contacts list, wars */
.cpop { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 60; width: min(440px, calc(100vw - 24px)); background: var(--panel); border: 1px solid var(--gold); box-shadow: 0 10px 44px rgba(0,0,0,.75), 0 0 0 1px rgba(245,192,74,.15); padding: 10px 12px 12px; animation: cpop-in .28s ease-out; }
@keyframes cpop-in { from { opacity: 0; transform: translate(-50%, -14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cpop-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cpop-top b { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; flex: 1; }
.cc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cc-head .grow { min-width: 0; }
.cc-name { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-title { font-size: 11px; font-weight: 400; }
.cc-rows { display: grid; gap: 2px; font-size: 12px; }
.cc-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.cc-row > span:first-child { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.cc-note { font-size: 10px; margin-top: 8px; opacity: .8; }
.cc-actions { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); align-items: center; }
.cc-actions .grow { min-width: 120px; }
.cc-line { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border: 1px solid var(--line); margin-bottom: 3px; cursor: pointer; background: rgba(255,255,255,.015); }
.cc-line:hover, .cc-line.on { border-color: var(--line2); background: rgba(var(--acc-rgb),.06); }
.cc-line .grow { flex: 1; }
.cc-when { font-size: 11px; white-space: nowrap; }
.cc-open { border: 1px solid var(--line2); border-top: 0; padding: 8px 10px 10px; margin: -4px 0 6px; background: rgba(0,0,0,.18); }
.atwar { display: inline-block; padding: 0 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: #fff; background: #b3263a; border: 1px solid #ff5b6b; text-transform: uppercase; }

/* update 138: contacts are easy to find: a chip in the top bar, a pulse while there is a new one */
.badge.contacts-chip { border: 1px solid var(--line2); }
.badge.contacts-chip.new { color: var(--gold); border-color: var(--gold); background: rgba(245,192,74,.14); animation: cc-pulse 1.7s ease-in-out infinite; }
@keyframes cc-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,192,74,.0); } 50% { box-shadow: 0 0 10px 1px rgba(245,192,74,.55); } }
.cpop { animation: cpop-in .28s ease-out, cpop-glow 2.2s ease-in-out .3s infinite; }
@keyframes cpop-glow { 0%, 100% { box-shadow: 0 10px 44px rgba(0,0,0,.75), 0 0 0 1px rgba(245,192,74,.15); } 50% { box-shadow: 0 10px 44px rgba(0,0,0,.75), 0 0 18px 2px rgba(245,192,74,.5); } }

/* update 138: the PLAYER CARD (click a commander's name anywhere): photo first, the flag in its bottom right corner, where you stand, public facts */
.cmdr-link { cursor: pointer; text-decoration: underline dotted rgba(200,215,235,.4); text-underline-offset: 3px; }
.cmdr-link:hover, .cmdr-link:focus-visible { text-decoration-style: solid; filter: brightness(1.3); outline: none; }
.badge.ident.cmdr-link { text-decoration: none; }
.pc-back { position: fixed; inset: 0; z-index: 90; background: rgba(2,6,12,.62); display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px); animation: pc-fade .15s ease-out; }
@keyframes pc-fade { from { opacity: 0; } to { opacity: 1; } }
.pcard { position: relative; width: min(380px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--rc, var(--line2)); box-shadow: 0 16px 60px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.04); padding: 12px 14px 14px; animation: pc-pop .18s ease-out; }
@keyframes pc-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.pcard .pc-x, .pcard .pc-x:focus-visible { position: absolute; top: 20px; right: 22px; left: auto; z-index: 3; background: rgba(5,10,18,.7); }   /* polish.css gives every .btn and every :focus-visible button position:relative, which is why this needs the longer selector */
.pc-photo { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 300px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--rc, var(--line2)); background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc, var(--cyan)) 36%, #0b1522) 0%, #08101b 72%); }
.pc-photo .sp-pic { filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)); }
.pc-photo.pc-anon { background: repeating-linear-gradient(135deg, #0c1420 0 10px, #0a111b 10px 20px); border-color: var(--line); }
.pc-q { font-size: 120px; color: #3a4658; line-height: 1; font-weight: 700; }
.pc-flag { position: absolute; right: 8px; bottom: 8px; padding: 0; border: 2px solid rgba(230,237,245,.85); background: #0b1522; box-shadow: 0 4px 14px rgba(0,0,0,.7); cursor: zoom-in; line-height: 0; transition: transform .15s; }
.pc-flag:hover, .pc-flag:focus-visible { transform: scale(1.07); outline: none; border-color: #fff; }
.pc-flag .pc-zi { position: absolute; left: 3px; top: 3px; font-size: 11px; line-height: 1; background: rgba(0,0,0,.65); padding: 2px 3px; opacity: .0; transition: opacity .15s; }
.pc-flag:hover .pc-zi, .pc-flag:focus-visible .pc-zi { opacity: 1; }
.pc-id { margin-top: 10px; }
.pc-name { font-size: 20px; font-weight: 700; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.pc-title, .pc-tag { font-size: 12px; font-weight: 400; }
.pc-tag { color: var(--gold); }
.pc-sub { font-size: 12px; margin-top: 1px; }
.pc-on { width: 8px; height: 8px; border-radius: 50%; background: #5be3a0; box-shadow: 0 0 6px #5be3a0; align-self: center; }
.pc-dip { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.pc-dip.good { border-color: rgba(91,227,160,.45); background: rgba(91,227,160,.06); }
.pc-dip.bad { border-color: rgba(255,107,123,.5); background: rgba(255,107,123,.07); }
.pc-dip.self { border-color: rgba(var(--acc-rgb),.4); background: rgba(var(--acc-rgb),.05); }
.pc-pill { flex: none; font-weight: 800; letter-spacing: .12em; font-size: 12px; padding: 4px 10px; border: 1px solid currentColor; color: #aab3c2; }
.pc-pill.good { color: #5be3a0; } .pc-pill.bad { color: #ff6b7b; } .pc-pill.self { color: var(--cyan); }
.pc-dl { font-size: 12px; line-height: 1.45; min-width: 0; }
.pc-rows { margin-top: 10px; }
.pcard .cc-actions { margin-top: 12px; }
.pc-zoom { position: fixed; inset: 0; z-index: 95; background: rgba(1,4,9,.84); display: flex; align-items: center; justify-content: center; padding: 16px; animation: pc-fade .15s ease-out; }
.pc-zbox { background: var(--panel); border: 1px solid var(--line2); padding: 10px 12px 12px; max-width: 100%; max-height: 100%; overflow: auto; box-shadow: 0 16px 60px rgba(0,0,0,.8); }
.pc-zhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 15px; }
.pc-zflag { display: flex; justify-content: center; padding: 6px 0; }
.pc-zflag .flagbadge { max-width: 100%; height: auto !important; }
.pc-zflag svg { max-width: 100%; height: auto; display: block; }
.pc-zfacts { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 12px; margin-top: 6px; }
.pc-sws { display: inline-flex; gap: 4px; margin-left: auto; }
.pc-sw { width: 16px; height: 16px; display: inline-block; border: 1px solid rgba(255,255,255,.35); }
