/* Alliance Wars - social chat: world / clan / private views, cards, action sheet, friends, settings. Navy + gold, parchment for own lines. */
#panel[data-panel="chat"] .pn-body.cv-body { display: flex; flex-direction: column; overflow: hidden; padding: 0 0 calc(6px + var(--safe-b)); }
#panel[data-panel="chat"] .pn-head h2 { margin-right: 0; }
#panel[data-panel="chat"] .pn-extra { display: flex; gap: 6px; }
.cv-hbtn { position: relative; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(#34425f, #222c41); border: 2px solid #0d111a; box-shadow: inset 0 0 0 1px rgba(233,199,106,.35), inset 0 -3px 0 rgba(0,0,0,.3); }
.cv-hbtn .ic { width: 24px; height: 24px; } .cv-hbtn .ic.sm { width: 20px; height: 20px; }
.cv-hbtn.on { box-shadow: inset 0 0 0 2px #e9c76a; background: linear-gradient(#5a4a22, #2e2614); }
.cv-hbtn .dot { top: -3px; right: -3px; }
.cv-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.cv-list { flex: 1; overflow-y: auto; padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 6px; touch-action: pan-y; min-height: 0;
  background: radial-gradient(120% 60% at 50% 0%, rgba(233,199,106,.06), transparent 60%), repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 8px, transparent 8px 16px); }
.cv-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 24px; text-align: center; color: var(--mute); font-weight: 700; }
.cv-empty .ic.xl { width: 56px; height: 56px; opacity: .8; }

/* time separator: a small gold-edged ribbon */
.cv-time { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; color: #e9d7a8; font: 800 12px var(--pix); }
.cv-time::before, .cv-time::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(233,199,106,.35), transparent); }
.cv-time span { padding: 2px 10px; border-radius: 9px; background: #1a2236; border: 1.5px solid rgba(233,199,106,.45); }
.cv-sys { align-self: center; max-width: 86%; text-align: center; font-size: 12.5px; color: var(--mute); background: rgba(10,14,24,.55); border-radius: 10px; padding: 3px 10px; font-style: italic; }

/* message rows */
.cv-row { display: flex; gap: 8px; align-items: flex-start; max-width: 90%; }
.cv-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.cv-av { flex: none; padding-top: 2px; }
.cv-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.cv-row.mine .cv-main { align-items: flex-end; }
.cv-head { display: flex; align-items: baseline; gap: 2px; font-size: 12.5px; margin: 0 4px 2px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cv-tag { color: #f5c63c; font-weight: 900; } .cv-nm { color: #dfe6f5; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.cv-bub { position: relative; background: linear-gradient(175deg, #2c3a58, #222d46); border: 2px solid #0e131e; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 rgba(0,0,0,.3); border-radius: 4px 14px 14px 14px; padding: 7px 11px 8px; min-width: 44px; cursor: pointer; }
.cv-row.mine .cv-bub { background: linear-gradient(175deg, #f4e6c4, #e3cf9f); border-color: #6b4f25; color: #3b2a1a; border-radius: 14px 4px 14px 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 0 rgba(0,0,0,.35); }
.cv-row.ment .cv-bub { box-shadow: 0 0 0 2px #f5c63c, 0 0 14px rgba(245,198,60,.35); }
.cv-txt { display: block; font-size: 15px; line-height: 1.32; color: var(--ink); word-break: break-word; user-select: text; -webkit-user-select: text; }
.cv-row.mine .cv-txt { color: #3b2a1a; }
.cv-at { color: #7fc4ff; font-weight: 800; } .cv-at.me { color: #1a1206; background: #f5c63c; border-radius: 5px; padding: 0 3px; }
.cv-row.mine .cv-at { color: #1d56a6; }
.cv-quote { display: block; margin: 0 0 5px; padding: 3px 8px; border-left: 3px solid #e9c76a; background: rgba(0,0,0,.22); border-radius: 4px 8px 8px 4px; font-size: 12.5px; color: var(--ink2); max-width: 260px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cv-row.mine .cv-quote { background: rgba(107,79,37,.15); color: #5b4630; border-color: #a7772a; }
.cv-quote b { color: inherit; font-weight: 900; }

/* framed portrait */
.cv-fr { position: relative; display: inline-block; line-height: 0; }
.cv-fr .avatar { border-width: 2.5px; border-radius: 11px; }
.cv-fr.lg-bronze .avatar { border-color: #c98a55; } .cv-fr.lg-silver .avatar { border-color: #cfd8e4; } .cv-fr.lg-gold .avatar { border-color: #f5c63c; }
.cv-fr.lg-platinum .avatar { border-color: #8fe3d9; } .cv-fr.lg-diamond .avatar { border-color: #8fd0ff; } .cv-fr.lg-legend .avatar { border-color: #ff8e8e; }
.cv-fr.vip .avatar { border-color: #c48bff; box-shadow: 0 0 0 2px #2a1640, 0 0 10px rgba(196,139,255,.6); }
.cv-fr .av-lvl { min-width: 18px; height: 18px; font-size: 11px; line-height: 14px; bottom: -6px; right: -6px; padding: 0 3px; }
.cv-rank { position: absolute; top: -6px; left: -6px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font: 900 11px/1 var(--pix); font-style: normal; color: #2a1c06; background: linear-gradient(#ffe08a, #d79a22); border: 1.5px solid #3b2a1a; }
.cv-rank.officer { background: linear-gradient(#bfe0ff, #5a8fd0); color: #0b1a33; }
.cv-on { position: absolute; bottom: -2px; left: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid #121826; }
.cv-ond { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 4px; vertical-align: 1px; }

/* rich cards */
.cv-card { display: flex; gap: 10px; align-items: center; text-align: left; min-width: 210px; max-width: 250px; padding: 8px 10px; margin: 1px 0 3px; border-radius: 10px; background: linear-gradient(170deg, #34466b, #253250); border: 2px solid #0e131e; box-shadow: inset 0 0 0 1px rgba(233,199,106,.3); color: var(--ink); }
.cv-card > span { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.cv-card b { font: 800 14px var(--pix); color: #ffe7a8; } .cv-card small { color: var(--ink2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-card em { font-style: normal; font-size: 11.5px; color: #9fc6ff; display: flex; align-items: center; gap: 3px; }
.cv-card .ic.lg { width: 38px; height: 38px; filter: drop-shadow(0 2px 1px rgba(0,0,0,.5)); }
.cv-card.rep.win { box-shadow: inset 0 0 0 1px rgba(79,207,110,.6); } .cv-card.rep.loss { box-shadow: inset 0 0 0 1px rgba(224,87,77,.7); }
.cv-card.pouch { background: linear-gradient(170deg, #7a2b2b, #4c1919); box-shadow: inset 0 0 0 1.5px #f5c63c, 0 0 12px rgba(245,198,60,.25); }
.cv-card.pouch em { color: #ffd75f; font-weight: 800; }
.cv-card.pouch.mine, .cv-card.pouch.gone, .cv-card.pouch.empty, .cv-card.pouch.late { filter: saturate(.45) brightness(.85); }
.cv-row.mine .cv-card { color: var(--ink); }

/* jump to newest, reply strip, emoji, composer */
.cv-jump { position: absolute; right: 12px; bottom: 10px; display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 17px; background: linear-gradient(#ffd75f, #e09a1f); color: #3b2a1a; font: 800 13px var(--pix); border: 2px solid #3b2a1a; box-shadow: 0 3px 8px rgba(0,0,0,.45); }
.cv-jump .ic { transform: rotate(-90deg); }
.cv-reply { display: flex; align-items: center; gap: 8px; margin: 0 10px; padding: 5px 10px; border-radius: 10px 10px 0 0; background: #1a2236; border: 1.5px solid #3a4867; border-bottom: 0; font-size: 12.5px; color: var(--ink2); }
.cv-reply span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .cv-reply b { color: #ffe7a8; }
.cv-reply button { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.06); }
.cv-emo { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin: 0 10px 4px; padding: 6px; background: #1a2236; border: 1.5px solid #3a4867; border-radius: 12px; }
.cv-emo button { height: 38px; font-size: 22px; border-radius: 8px; } .cv-emo button:active { background: rgba(233,199,106,.2); }
.cv-say { display: flex; gap: 6px; padding: 8px 10px 0; border-top: 2px solid #0d111a; box-shadow: inset 0 1px 0 rgba(233,199,106,.25); background: linear-gradient(#1f2840, #182033); }
.cv-say input { flex: 1; min-width: 0; min-height: 44px; font-size: 15px; border-radius: 22px; padding: 9px 14px; background: #0f1522; }
.cv-emob { width: 44px; height: 44px; flex: none; font-size: 22px; border-radius: 50%; background: #2b3752; border: 2px solid #0d111a; }
.cv-send { min-width: 52px; min-height: 44px; border-radius: 22px; }

/* action sheet + share */
.md.cv-sheet { padding-top: 12px; }
.cv-sh-q { display: flex; gap: 10px; align-items: center; padding: 6px 4px 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.cv-sh-q > span { display: flex; flex-direction: column; min-width: 0; gap: 2px; } .cv-sh-q small { color: var(--ink2); font-size: 12.5px; word-break: break-word; }
.cv-sh-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cv-sh-btns .btn { justify-content: flex-start; font-size: 14px; padding: 0 12px; }
.cv-share input { margin: 10px 0; } .cv-shcard { display: flex; justify-content: center; pointer-events: none; }
.cv-rsides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.cv-rside { display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: 10px; background: var(--card); } .cv-rside small { color: var(--mute); }

/* private: list + conversation */
.cv-pv { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cv-pv-top { display: flex; gap: 8px; padding: 10px 10px 8px; }
.cv-pv-top input { flex: 1; min-height: 42px; border-radius: 21px; }
.cv-convs { flex: 1; overflow-y: auto; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.cv-conv { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 10px; border-radius: 12px; background: linear-gradient(175deg, #283450, #1f283d); border: 2px solid #0e131e; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); cursor: pointer; }
.cv-conv.new { box-shadow: inset 0 0 0 1px rgba(233,199,106,.45); }
.cv-cm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cv-ct { display: flex; align-items: baseline; gap: 6px; } .cv-ct b { font: 800 15px var(--pix); color: #ffe7a8; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cv-ct small { margin-left: auto; color: var(--mute); font-size: 12px; flex: none; }
.cv-cp { color: var(--ink2); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cv-conv.new .cv-cp { color: var(--ink); }
.cv-cnt { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font: 900 12px/22px var(--pix); text-align: center; font-style: normal; border: 1.5px solid #fff; flex: none; }
.cv-atb { font-style: normal; color: #1a1206; background: #f5c63c; border-radius: 6px; padding: 0 4px; font-weight: 900; font-size: 12px; }
.cv-pin { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; opacity: .35; filter: grayscale(1); flex: none; }
.cv-pin.on { opacity: 1; filter: none; }
.cv-grp { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(#3a5a8a, #24365a); border: 2.5px solid #e9c76a; }
.cv-grp b { position: absolute; bottom: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 10px; background: #1a2236; border: 1.5px solid #e9c76a; font: 900 11px/17px var(--pix); text-align: center; padding: 0 3px; }
.cv-cbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: linear-gradient(#222c41, #1a2236); border-bottom: 2px solid #0d111a; }
.cv-back { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(0,0,0,.25); }
.cv-cbt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .cv-cbt b { font: 800 16px var(--pix); color: #ffe7a8; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .cv-cbt small { color: var(--mute); font-size: 12px; }
.cv-convbody { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cv-mems { display: flex; flex-direction: column; gap: 6px; max-height: 44vh; overflow-y: auto; }
.cv-mem { display: flex; align-items: center; gap: 10px; } .cv-mem > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cv-adm { color: #f5c63c; font-weight: 800; }

/* friends panel */
.fr { display: flex; flex-direction: column; gap: 6px; }
.fr-add { display: flex; gap: 8px; margin-bottom: 4px; } .fr-add input { flex: 1; min-height: 42px; }
.fr-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px; background: linear-gradient(175deg, #283450, #1f283d); border: 2px solid #0e131e; }
.fr-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; } .fr-mid > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-mid small { color: var(--ink2); font-size: 12px; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.fr-btns { display: flex; gap: 6px; flex: none; } .fr-btns .btn.small { min-height: 36px; padding: 0 10px; }
.fr-cnt { display: inline-block; min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font: 900 12px/20px var(--pix); text-align: center; font-style: normal; margin-left: 4px; }
.fr-set { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); } .fr-set > span:first-child { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fr-set small { color: var(--mute); font-size: 12px; } .fr-set.off { opacity: .45; pointer-events: none; }
.fr-step { display: flex; align-items: center; gap: 4px; } .fr-step button { width: 36px; height: 36px; border-radius: 10px; background: var(--card2); border: 2px solid #0d111a; font: 900 18px var(--pix); }
.fr-step b { min-width: 30px; text-align: center; font: 900 17px var(--pix); color: #ffe7a8; }
.fr-pick input[data-gn], .fr-pick input[data-fq] { margin-bottom: 8px; }
.fr-plist { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow-y: auto; }
.fr-prow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--card); cursor: pointer; }
.fr-prow input { width: 22px; height: 22px; flex: none; accent-color: #e9b53c; }
@media (max-width: 370px) { .cv-card { min-width: 180px; } .cv-sh-btns { grid-template-columns: 1fr; } .fr-btns .btn.small { padding: 0 8px; font-size: 12px; } }
/* HUD chat bar channel tag */
.chat-prev .hc-ch { font-style: normal; font: 900 10.5px/1 var(--pix); text-transform: uppercase; padding: 3px 5px; margin-right: 5px; border-radius: 5px; background: #2f7fd6; color: #fff; vertical-align: 1px; }
.chat-prev .hc-ch.clan { background: #23803a; }
/* city sheet: bookmark + share stacked */
.cs-acts { display: flex; flex-direction: column; gap: 6px; align-self: flex-start; }
.cs-acts .cs-bm { margin-left: 6px; }
.cs-bm.cs-share { opacity: 1; filter: none; }
.so-share { margin-left: 8px; }
.cv-bub.card-only, .cv-row.mine .cv-bub.card-only { background: none; border: 0; box-shadow: none; padding: 0; }
.cv-row.ment .cv-bub.card-only { box-shadow: none; }
.fr-nm { display: flex; gap: 2px; min-width: 0; overflow: hidden; white-space: nowrap; } .fr-nm .cv-nm { overflow: hidden; text-overflow: ellipsis; }
