/* Social layer: right-click interaction menu, equipment of another character, invitations, duel banner, group list. */
.ctxmenu { position: fixed; z-index: 2147482000; min-width: 190px; padding: 4px; display: flex; flex-direction: column; gap: 2px; border-radius: 8px;
  background: linear-gradient(rgba(70, 46, 24, 0.97), rgba(34, 21, 10, 0.97)); box-shadow: var(--bevel), var(--drop); }
.ctxmenu.hidden { display: none; }
.ctx-head { display: flex; flex-direction: column; padding: 5px 10px 6px; margin-bottom: 2px; border-bottom: 1px solid var(--bronze); }
.ctx-head b { color: var(--gold-hi); font-size: 14px; text-shadow: var(--outline); }
.ctx-head span { color: #c9b583; font-size: 11px; }
.ctx-item { text-align: left; padding: 6px 12px; border: 0; border-radius: 5px; background: transparent; color: #fff6dc; font-size: 13px; font-weight: 700; text-shadow: var(--outline); }
.ctx-item:hover { background: linear-gradient(rgba(241, 192, 74, 0.28), rgba(241, 192, 74, 0.12)); box-shadow: inset 0 0 0 1px var(--gold-lo); }
.ctx-item.danger { color: #ffb4ae; }
.ctx-item.off { opacity: 0.45; cursor: not-allowed; }
.ctx-item.off:hover { background: transparent; box-shadow: none; }

.soc-hud { position: absolute; inset: 0; pointer-events: none; }
.soc-invites { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.soc-invite { position: relative; pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 8px 14px 11px; border-radius: 8px; color: #fff6dc; font-size: 13px; overflow: hidden;
  background: linear-gradient(rgba(70, 46, 24, 0.96), rgba(34, 21, 10, 0.96)); box-shadow: var(--bevel), var(--drop); animation: socIn 0.2s ease-out; }
.soc-invite .soc-text b { color: var(--gold-hi); }
.soc-invite .soc-btns { display: flex; gap: 6px; }
.soc-invite .btn { padding: 3px 12px; font-size: 12px; }
.soc-timer { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: linear-gradient(90deg, #f1c04a, #ffe9a0); transform-origin: left; animation: socTimer linear forwards; }
.soc-duel { position: absolute; left: 50%; top: 44px; transform: translateX(-50%); pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 5px 14px; border-radius: 16px;
  color: #ffd0cb; font-weight: 700; background: linear-gradient(rgba(110, 24, 28, 0.94), rgba(60, 12, 16, 0.94)); box-shadow: 0 0 0 2px var(--wood-dark), inset 0 0 0 1px #ff7a72, var(--drop); }
.soc-duel.hidden { display: none; }
.soc-duel .btn { padding: 2px 10px; font-size: 12px; }
.btn.small { padding: 0 7px; font-size: 11px; line-height: 16px; }
@keyframes socIn { from { opacity: 0; transform: translateY(-8px); } }
@keyframes socTimer { to { transform: scaleX(0); } }

.insp-head { text-align: center; padding: 2px 0 6px; font-size: 13px; }
.insp-doll .gf-tile { cursor: default; }
.insp-title { margin: 8px 0 4px; font-weight: 800; font-size: 12px; text-align: center; }
.insp-row { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }

/* Social panel (O): fixed-height virtualised table */
.sp-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.sp-filters select, .sp-filters input { height: 24px; font-size: 12px; padding: 0 6px; }
.sp-filters input { width: 110px; }
.sp-kinds { display: flex; gap: 2px; }
.sp-count { font-size: 12px; font-weight: 700; margin: 2px 2px 6px; }
.sp-head, .sp-row { display: grid; grid-template-columns: 1.5fr 0.9fr 0.4fr 1.4fr 1fr 0.8fr; align-items: center; }
.sp-head { background: linear-gradient(#cdb27a, #b99a5e); border-radius: 4px 4px 0 0; box-shadow: inset 0 0 0 1px #5b3a18; }
.sp-head button { background: none; border: 0; text-align: left; padding: 3px 8px; font-weight: 800; font-size: 12px; color: #3a2208; }
.sp-head button:hover { color: #000; text-decoration: underline; }
.sp-view { position: relative; overflow-y: auto; background: #f1e6ca; box-shadow: inset 0 0 0 1px #5b3a18; }
.sp-spacer { position: relative; width: 100%; }
.sp-row { position: absolute; left: 0; right: 0; top: 0; font-size: 12px; border-bottom: 1px solid rgba(91, 58, 24, 0.18); will-change: transform; }
.sp-row span { padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sp-row:hover { background: rgba(241, 192, 74, 0.28); }
.sp-row .sp-name { font-weight: 700; color: #3a2208; }
.sp-row.bot .sp-name { color: #3d5a80; }
.sp-row.bot .sp-name::after { content: ' ·bot'; font-weight: 400; font-size: 10px; opacity: 0.7; }
.sp-row.grouped .sp-name::before { content: '♛ '; color: #b5801f; }
.sp-state.st-combat { color: #b3262c; font-weight: 700; }
.sp-state.st-arena, .sp-state.st-queue { color: #7a4fa3; font-weight: 700; }
.sp-state.st-online { color: #2f7a35; }
.sp-state.st-connecting, .sp-state.st-traveling { color: #7a6a3a; font-style: italic; }

/* Group frames (PartyFrames.js) */
.partyframes { display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.frame.pm { padding: 5px 9px 7px 7px; gap: 7px; cursor: pointer; }
.frame.pm .fbody { min-width: 0; flex: 1; }
.frame.pm .nameplate b { font-size: 12.5px; }
.frame.pm .tinfo { font-size: 10.5px; }
.frame.pm .buffs:empty { display: none; }
.frame.pm.sel { box-shadow: 0 0 0 2px var(--wood-dark), inset 0 0 0 2px #7be39a, 0 0 10px rgba(80, 220, 130, 0.4); }
.frame.pm.dead { opacity: 0.5; filter: grayscale(0.8); }
.frame.pm.far { opacity: 0.6; }
.pm-portrait { position: relative; width: 34px; height: 34px; flex: none; border-radius: 50%; background: radial-gradient(#4a3a5a, #241a30); box-shadow: 0 0 0 1px var(--wood-dark), 0 0 0 3px var(--bronze); display: flex; align-items: center; justify-content: center; }
.pm-portrait img { width: 30px; height: 30px; border-radius: 50%; }
.pm-lvl { position: absolute; right: -6px; bottom: -6px; min-width: 16px; padding: 0 3px; text-align: center; font-size: 10px; font-weight: 800; color: #3a2208; background: linear-gradient(#ffe9a0, #d9a43a); border-radius: 8px; box-shadow: 0 0 0 1px var(--wood-dark); }
.frame.pm .bar { height: 11px; }
.frame.pm.summary .nameplate { display: flex; align-items: baseline; gap: 6px; }
.pm-arrow { margin-left: auto; color: var(--gold-hi); }
.pm-icons { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.pm-ic img { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1px var(--wood-dark); display: block; }
.pm-ic.dead { opacity: 0.35; filter: grayscale(1); }
.pm-more { font-size: 10px; color: #c9b583; align-self: center; }
.pm-list { display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow-y: auto; }

/* Debug > Bots */
.nd-bots { display: flex; flex-direction: column; gap: 6px; font-size: 12px; max-height: 520px; overflow-y: auto; }
.bd-summary { font-weight: 800; }
.bd-pop, .bd-create, .bd-filters, .bd-pager { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bd-num b { display: inline-block; min-width: 28px; text-align: center; }
.bd-cfg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; }
.bd-cfgrow { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.bd-cfgrow input[type=number] { width: 72px; height: 20px; font-size: 11px; }
.bd-zone { font-size: 11px; color: #3a2208; }
.bd-row { padding: 4px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.35); box-shadow: inset 0 0 0 1px rgba(91, 58, 24, 0.25); display: flex; flex-direction: column; gap: 2px; }
.bd-row.off { opacity: 0.65; }
.bd-sub { font-size: 11px; color: #5a4524; }
.bd-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.bd-acts select { height: 20px; font-size: 11px; }
.gf-btn.small { padding: 1px 8px; font-size: 11px; }
/* Debug > Bots: the list (name, level, gold, euros, activity) and the sheet of one bot */
.bd-listhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bd-search { height: 22px; font-size: 12px; min-width: 130px; }
.bd-sorts { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font-size: 11px; }
.bd-sorts .gf-btn.on { background: #f0b92a; color: #2a1a05; }
.bd-row.bd-colhead, .bd-list .bd-row.bd-click { display: grid; grid-template-columns: minmax(110px, 1.3fr) 34px minmax(80px, 1.2fr) 62px minmax(100px, 1.6fr); gap: 8px; align-items: center; }
.bd-row.bd-colhead { background: transparent; box-shadow: none; font-weight: 800; font-size: 11px; color: #5a4524; padding-bottom: 0; }
.bd-click { cursor: pointer; }
.bd-click:hover { background: rgba(255, 244, 200, 0.7); }
.bd-name em { font-style: normal; font-size: 10px; color: #6a5230; }
.bd-lv { font-weight: 800; text-align: center; }
.bd-eur { font-variant-numeric: tabular-nums; font-size: 11px; }
.bd-state { font-size: 11px; color: #3a2208; }
.bd-state.off { color: #7a6a4a; font-style: italic; }
.bd-toolshead { margin-top: 6px; }
.bd-tools { display: flex; flex-direction: column; gap: 6px; }
.bd-detail { display: flex; flex-direction: column; gap: 8px; }
.bd-head { font-size: 14px; }
.bd-pill { padding: 1px 8px; border-radius: 10px; font-size: 11px; background: rgba(60, 40, 18, 0.2); }
.bd-pill.online { background: #4c9a2a; color: #fff; }
.bd-pill.offline { background: #8a7a5a; color: #fff; }
.bd-sec { padding: 6px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.4); box-shadow: inset 0 0 0 1px rgba(91, 58, 24, 0.25); display: flex; flex-direction: column; gap: 3px; }
.bd-sec h5 { margin: 0 0 2px; font-size: 12px; color: #5a3a18; text-transform: uppercase; letter-spacing: 0.04em; }
.bd-bar { position: relative; height: 16px; border-radius: 8px; background: rgba(60, 40, 18, 0.25); overflow: hidden; }
.bd-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#f6d36a, #d19a1e); }
.bd-bar span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 16px; font-weight: 700; color: #1f1608; }
.bd-gear { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; font-size: 11px; }
.bd-gear em { font-style: normal; color: #8a5a10; }
.bd-gear em.bad { color: #b3261e; font-weight: 700; }
.bd-trade { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; font-size: 11px; align-items: baseline; }
.bd-trade em { font-style: normal; color: #7a6a4a; font-size: 10px; white-space: nowrap; }
/* Debug > Économie (ui/debug/) and Debug > Groupes (social/BotGroups.js) */
.nd-eco, .nd-groups { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; }
.eco-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: sticky; top: 0; z-index: 1; background: rgba(240, 225, 190, 0.96); padding: 2px 0; }
.eco-bar .gf-btn.on { background: #f0b92a; color: #2a1a05; }
.eco-status { font-size: 10px; margin-left: auto; }
.eco-view { display: flex; flex-direction: column; gap: 8px; }
.eco-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; }
.eco-tile { padding: 6px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 0 0 1px rgba(91, 58, 24, 0.25); display: flex; flex-direction: column; gap: 1px; }
.eco-tl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: #5a3a18; }
.eco-tv { font-size: 15px; color: #1f1608; font-variant-numeric: tabular-nums; }
.eco-ts { font-size: 10px; color: #5a4524; }
.eco-alert { margin: 0; padding: 4px 8px; border-radius: 4px; background: rgba(179, 38, 30, 0.12); color: #7a1a12; font-weight: 700; font-size: 12px; }
.eco-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px; }
.eco-fig { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.eco-fig figcaption { font-size: 11px; font-weight: 700; color: #3a2208; }
.eco-chart { width: 100%; height: auto; background: rgba(255, 255, 255, 0.35); border-radius: 4px; }
.eco-chart rect:hover, .eco-chart circle:hover { opacity: 0.8; }
.eco-legend { display: flex; gap: 10px; font-size: 10px; color: #3a2208; }
.eco-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.eco-tablewrap { overflow-x: auto; }
.eco-table { width: 100%; border-collapse: collapse; font-size: 11px; color: #1f1608; }
.eco-table th { text-align: left; font-size: 10px; color: #5a3a18; border-bottom: 1px solid rgba(91, 58, 24, 0.35); padding: 2px 4px; white-space: nowrap; }
.eco-table td { padding: 2px 4px; border-bottom: 1px solid rgba(91, 58, 24, 0.12); vertical-align: top; }
.eco-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eco-table tr.neg td.num { color: #8a2a12; }
.eco-table tr.pos td.num { color: #2a5a12; }
.eco-table tr.odd td { background: rgba(240, 120, 40, 0.14); }
.eco-filters { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.eco-filters input[type=number] { width: 104px; height: 22px; font-size: 11px; }
.eco-filters select { height: 22px; font-size: 11px; }
.bg-zones { display: flex; flex-direction: column; gap: 6px; }
.bg-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.bg-group { padding: 4px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.45); box-shadow: inset 0 0 0 1px rgba(91, 58, 24, 0.3); display: flex; flex-direction: column; gap: 2px; }
.bg-ghead { font-size: 10px; color: #5a3a18; font-weight: 700; }
.bg-mem { font-size: 11px; display: flex; gap: 4px; align-items: baseline; cursor: pointer; border-radius: 3px; padding: 0 3px; }
.bg-mem:hover, .bg-mem.on { background: rgba(255, 244, 200, 0.9); }
.bg-mem.dead { opacity: 0.55; }
.bg-mem em { font-style: normal; font-size: 10px; color: #6a5230; }
.bg-lead { color: #b07a00; }
.bg-hp { margin-left: auto; font-size: 10px; color: #5a4524; }
.bg-solos { display: flex; flex-wrap: wrap; gap: 3px; }
.bg-solo { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: rgba(60, 40, 18, 0.15); cursor: pointer; }
.bg-solo.off { opacity: 0.6; font-style: italic; }
.bg-solo.on, .bg-solo:hover { background: #f0b92a; }
/* Group members standing on another map (the group lives on every map): name and where they are. */
.pm-away { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px; font-size: 11px; color: #e8dcc0; background: rgba(30, 18, 9, 0.78); border-radius: 6px; box-shadow: 0 0 0 1px var(--wood-dark); max-width: 220px; }
.pm-away-t { font-size: 10px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.pm-away-r { display: flex; align-items: center; gap: 5px; opacity: 0.85; }
.pm-away-r .mute { margin-left: auto; font-size: 10px; }
