/* Character profile v3 (2026-11-23): module colours (blue lines, light-blue titles, white values; gold only for VIP and item levels),
   stats / points / activity sections, equipment laid out like the game window. */

.char-card {
    --ch-accent: #9fd0f5; --ch-white: #eef4fa; --ch-line: rgba(110, 170, 220, .18); --ch-line-2: rgba(110, 170, 220, .42); --ch-blue: #7fb8e6;
    --ch-text: #d9e2ea; --ch-mute: #8fa3b4; --ch-panel: linear-gradient(180deg, rgba(16, 28, 42, .9), rgba(7, 12, 20, .94));
    --ch-serif: 'Cinzel', 'Trajan Pro', Georgia, serif;
    position: relative; padding: 22px; color: var(--ch-text); font: 14px/1.45 'Segoe UI', Inter, Arial, sans-serif;
    background: radial-gradient(ellipse at 15% 0%, rgba(110, 170, 220, .09), transparent 55%), linear-gradient(180deg, rgba(14, 22, 34, .95), rgba(6, 10, 17, .96));
    border: 1px solid var(--ch-line); border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.char-card *, .char-card *::before, .char-card *::after { box-sizing: border-box; }

/* ---- top: portrait left, details right ---- */
.char-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: stretch; }
.char-side { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.char-portrait { position: relative; width: 220px; height: 220px; padding: 5px; border: 1px solid var(--ch-line-2); border-radius: 6px; background: var(--ch-panel); box-shadow: 0 10px 26px rgba(0, 0, 0, .5), 0 0 22px rgba(110, 170, 220, .14); }
.char-portrait::after { content: ''; position: absolute; inset: 0; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), inset 0 -40px 40px -30px rgba(0, 0, 0, .7); pointer-events: none; }
.char-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; border-radius: 4px; }
.char-portrait.is-custom { flex: 1 1 auto; height: auto; min-height: 280px; border-color: rgba(159, 208, 245, .7); box-shadow: 0 10px 26px rgba(0, 0, 0, .5), 0 0 26px rgba(110, 170, 220, .3); }
.char-portrait.is-custom img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); }
.char-vip-tag { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 2px 8px; color: #1a1205; font: 800 10px/1.4 Arial, sans-serif; letter-spacing: 1px; background: linear-gradient(180deg, #f3d27a, #c9982f); border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }

.char-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px; color: #f0b4b4; font: 800 10px/1.4 'Segoe UI', Arial, sans-serif; letter-spacing: 1.5px; text-transform: uppercase; background: rgba(120, 24, 24, .35); border: 1px solid rgba(220, 70, 70, .45); border-radius: 999px; }
.char-badge::before { content: ''; width: 7px; height: 7px; background: #d9534f; border-radius: 50%; box-shadow: 0 0 6px rgba(217, 83, 79, .8); }
.char-badge.is-online { color: #c8f5d2; background: rgba(20, 110, 50, .35); border-color: rgba(70, 200, 110, .5); }
.char-badge.is-online::before { background: #3ddc84; box-shadow: 0 0 8px rgba(61, 220, 132, .9); animation: chPulse 1.6s ease-in-out infinite; }
@keyframes chPulse { 50% { opacity: .35; } }

.char-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.char-basic { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; background: linear-gradient(90deg, rgba(110, 170, 220, .1), transparent 60%), var(--ch-panel); border: 1px solid var(--ch-line); border-left: 3px solid var(--ch-blue); border-radius: 6px; }
.char-name { color: var(--ch-white); font: 700 28px/1.1 var(--ch-serif); letter-spacing: 1px; overflow-wrap: anywhere; text-shadow: 0 2px 12px rgba(0, 0, 0, .8), 0 0 18px rgba(110, 170, 220, .35); }
.char-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.char-chip { display: inline-flex; align-items: center; padding: 4px 10px; color: #b9c6d2; font: 700 10px/1.4 'Segoe UI', Arial, sans-serif; letter-spacing: 1.3px; text-transform: uppercase; white-space: nowrap; background: rgba(8, 14, 22, .7); border: 1px solid var(--ch-line); border-radius: 3px; }
.char-chip.is-accent { color: var(--ch-accent); border-color: var(--ch-line-2); background: rgba(110, 170, 220, .08); }
.char-chip.is-gm { gap: 5px; color: #e8f6ff; background: linear-gradient(180deg, #3b9be0, #1a5f9c); border-color: #7cc4f5; box-shadow: 0 0 8px rgba(59, 155, 224, .5); }
.char-location { display: flex; align-items: center; gap: 6px; color: var(--ch-accent); font-size: 13px; font-weight: 700; letter-spacing: .4px; }
.char-location i { color: var(--ch-blue); }

/* ---- sections ---- */
.char-sec-title { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; color: var(--ch-accent); font: 700 12px/1.4 var(--ch-serif); letter-spacing: 2.5px; text-transform: uppercase; }
.char-sec-title::before, .char-sec-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--ch-line-2), transparent); }
.char-tiles { display: grid; gap: 8px; }
.char-tiles.is-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.char-tiles.is-boxes { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.t-label { color: var(--ch-mute); font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
.t-value { color: var(--ch-white); font-weight: 800; font-variant-numeric: tabular-nums; }
.t-value small { color: var(--ch-mute); font-weight: 600; }
.t-value a { color: inherit; text-decoration: none; }
.t-value a:hover { color: var(--ch-accent); text-decoration: underline; }
.t-value.is-hidden { color: #6d7a88; letter-spacing: 2px; }

.char-tile { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; background: var(--ch-panel); border: 1px solid var(--ch-line); border-radius: 5px; transition: border-color .15s; }
.char-tile:hover { border-color: var(--ch-line-2); }
.char-tile .t-label { font-size: 12px; text-transform: none; letter-spacing: .3px; color: #aebccb; }
.char-tile .t-value { font-size: 15px; }

.char-blocks { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.char-box { display: grid; gap: 3px; justify-items: center; padding: 10px 8px; text-align: center; background: var(--ch-panel); border: 1px solid var(--ch-line); border-top: 2px solid var(--ch-line-2); border-radius: 5px; }
.char-box .t-value { font-size: 15px; overflow-wrap: anywhere; }
.char-box .t-value.is-small { font-size: 13px; }
.char-box.is-wide { grid-column: 1 / -1; }

.char-notice { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; color: #c3cfdb; font-size: 12px; text-align: center; background: rgba(90, 110, 150, .12); border: 1px solid rgba(150, 170, 210, .28); border-radius: 5px; }
.char-notice i { color: var(--ch-blue); }
.char-equip-hidden { margin-top: 18px; }

/* ---- equipment: laid out like the game's character window ---- */
.char-equip { margin-top: 18px; padding: 14px 16px 18px; background: radial-gradient(ellipse at 50% 45%, rgba(110, 170, 220, .08), transparent 62%), var(--ch-panel); border: 1px solid var(--ch-line); border-radius: 6px; }
.eq-grid {
    display: grid; justify-content: center; gap: 8px;
    grid-template-columns: 84px 46px 84px 46px 84px;
    grid-template-rows: 100px 46px 66px 84px;
    grid-template-areas:
        "pet    pet     helm  wings wings"
        "weapon pendant armor .     shield"
        "weapon .       armor .     shield"
        "gloves ring1   pants ring2 boots";
}
.eq-pet { grid-area: pet; } .eq-helm { grid-area: helm; } .eq-wings { grid-area: wings; }
.eq-weapon { grid-area: weapon; } .eq-pendant { grid-area: pendant; } .eq-armor { grid-area: armor; } .eq-shield { grid-area: shield; }
.eq-gloves { grid-area: gloves; } .eq-ring1 { grid-area: ring1; } .eq-pants { grid-area: pants; } .eq-ring2 { grid-area: ring2; } .eq-boots { grid-area: boots; }
.eq-pet { justify-self: center; align-self: end; width: 84px; height: 84px; }
.eq-wings { justify-self: center; width: 133px; height: 100px; }
.eq-helm { align-self: end; height: 84px; }
.eq-pendant, .eq-ring1, .eq-ring2 { align-self: center; height: 46px; }
.eq-weapon, .eq-armor, .eq-shield { align-self: stretch; }
.eq-slot {
    position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: radial-gradient(circle at 50% 40%, rgba(40, 58, 76, .55), rgba(6, 10, 16, .95) 75%);
    border: 1px solid var(--ch-line); border-radius: 4px;
    box-shadow: inset 0 0 14px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .04);
    transition: border-color .15s, box-shadow .15s;
}
.eq-slot.is-filled { cursor: help; border-color: var(--ch-line-2); }
.eq-slot.is-filled:hover, .eq-slot.is-filled:focus-visible { outline: none; border-color: rgba(159, 208, 245, .9); box-shadow: inset 0 0 14px rgba(0, 0, 0, .6), 0 0 14px rgba(110, 170, 220, .35); }
.eq-slot.q-excellent { border-color: rgba(98, 214, 122, .5); box-shadow: inset 0 0 14px rgba(0, 0, 0, .7), inset 0 0 18px rgba(98, 214, 122, .12); }
.eq-slot.q-ancient { border-color: rgba(70, 200, 230, .55); box-shadow: inset 0 0 14px rgba(0, 0, 0, .7), inset 0 0 18px rgba(70, 200, 230, .14); }
.eq-slot.q-excellent:hover { box-shadow: inset 0 0 14px rgba(0, 0, 0, .6), 0 0 12px rgba(98, 214, 122, .35); }
.eq-slot.q-ancient:hover { box-shadow: inset 0 0 14px rgba(0, 0, 0, .6), 0 0 12px rgba(70, 200, 230, .35); }
.eq-slot .item-img { position: relative; max-width: 100%; max-height: 100%; image-rendering: auto; pointer-events: none; }
.eq-slot .item-img.is-fitted { position: absolute; max-width: none; max-height: none; }
.eq-lvl { position: absolute; right: 3px; bottom: 2px; padding: 0 4px; color: #83bdea; font: 800 9.5px/1.4 Arial, sans-serif; background: rgba(0, 0, 0, .7); border-radius: 3px; pointer-events: none; }
.eq-empty { display: none; }
/* empty slot: the game's own slot silhouette (client newui_item_*.OZT, frame removed), faded in the middle */
.eq-slot:not(.is-filled)::before { content: ''; position: absolute; inset: 14%; background: var(--eq-sil) center / contain no-repeat; opacity: .3; pointer-events: none; }
.eq-pendant:not(.is-filled)::before, .eq-ring1:not(.is-filled)::before, .eq-ring2:not(.is-filled)::before { inset: 16%; }
.eq-pet     { --eq-sil: url(../../../img/equip-sil/fairy.png); }
.eq-helm    { --eq-sil: url(../../../img/equip-sil/cap.png); }
.eq-wings   { --eq-sil: url(../../../img/equip-sil/wing.png); }
.eq-weapon  { --eq-sil: url(../../../img/equip-sil/weapon-l.png); }
.eq-shield  { --eq-sil: url(../../../img/equip-sil/weapon-r.png); }
.eq-pendant { --eq-sil: url(../../../img/equip-sil/necklace.png); }
.eq-armor   { --eq-sil: url(../../../img/equip-sil/upper.png); }
.eq-pants   { --eq-sil: url(../../../img/equip-sil/lower.png); }
.eq-gloves  { --eq-sil: url(../../../img/equip-sil/gloves.png); }
.eq-boots   { --eq-sil: url(../../../img/equip-sil/boots.png); }
.eq-ring1, .eq-ring2 { --eq-sil: url(../../../img/equip-sil/ring.png); }

/* ---- bag 8 x 8 and extensions 8 x 4: cells like the game, an item spans w x h cells ---- */
/* game-like cell size (Item Editor: 34px); the bag sits centred under the equipment */
.char-bag { --cell: 32px; }
.char-sec-title.is-sub { margin: 18px 0 10px; font-size: 11px; letter-spacing: 2px; }
.bag-sub { margin: 14px 0 6px; color: var(--ch-mute); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-align: center; text-transform: uppercase; }
.bag-grid {
    display: grid; width: fit-content; margin: 0 auto;
    grid-template-columns: repeat(var(--cols), var(--cell)); grid-template-rows: repeat(var(--rows), var(--cell));
    background-color: rgba(5, 9, 15, .9);
    background-image: linear-gradient(rgba(110, 170, 220, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 170, 220, .12) 1px, transparent 1px);
    background-size: var(--cell) var(--cell);
    border: 1px solid var(--ch-line-2); border-radius: 3px;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, .7);
}
.bag-item {
    position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: help;
    background: radial-gradient(circle at 50% 40%, rgba(60, 90, 120, .35), rgba(10, 16, 24, .6) 75%);
    border: 1px solid var(--ch-line-2); transition: border-color .15s, box-shadow .15s;
}
.bag-item:hover, .bag-item:focus-visible { outline: none; z-index: 1; border-color: rgba(159, 208, 245, .9); box-shadow: 0 0 12px rgba(110, 170, 220, .4); }
.bag-item.q-excellent { border-color: rgba(98, 214, 122, .55); background-color: rgba(98, 214, 122, .06); }
.bag-item.q-ancient { border-color: rgba(70, 200, 230, .6); background-color: rgba(70, 200, 230, .07); }
.bag-item .item-img { position: relative; max-width: 100%; max-height: 100%; pointer-events: none; }
.bag-item .item-img.is-fitted { position: absolute; max-width: none; max-height: none; }

/* item tooltip container (filled by profile-equipment.js) */
#tooltip { position: fixed; z-index: 9999; pointer-events: none; opacity: 0; background: none !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; transition: opacity .1s ease; }
#tooltip.show { opacity: 1; }

/* ---- small screens ---- */

@media (max-width: 640px) {
    .char-card { padding: 14px; }
    .char-layout { grid-template-columns: 1fr; justify-items: center; }
    .char-main { width: 100%; }
    .char-portrait { width: 180px; height: 180px; }
    .char-portrait.is-custom { flex: none; width: 220px; height: 360px; }
    .char-basic { align-items: center; text-align: center; border-left-width: 1px; border-top: 3px solid var(--ch-blue); }
    .char-name { font-size: 24px; }
    .char-meta { justify-content: center; }
    .char-tiles.is-rows { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .eq-grid { grid-template-columns: 64px 36px 64px 36px 64px; grid-template-rows: 80px 36px 52px 66px; gap: 6px; }
    .eq-pet { width: 64px; height: 64px; } .eq-wings { width: 106px; height: 80px; }
    .eq-helm { height: 66px; } .eq-pendant, .eq-ring1, .eq-ring2 { height: 36px; }
    .char-bag { --cell: 28px; }
}
