/* ============================================================
   ÂÊËÀÄÊÈ — öåíòðèðóåì íàä îêíàìè ñîäåðæèìîãî
   ============================================================ */
#character .menu {
    left: calc(var(--body-left) + (var(--w) - var(--body-left) - var(--body-right)) / 2);
    transform: translateX(-50%);
}

/* ============================================================
   ÏÈÒÎÌÅÖ — âèäæåò âíóòðè #character
   ============================================================ */
#character .ch-box.pet-box {
    height: 200px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#character .ch-box.pet-box .ch-box-t {
    flex: 0 0 auto;
}

#character .pet-widget {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 0;
}

#character .pet-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

#character .pet-arrow {
    background: none;
    border: none;
    padding: 2px 4px;
    font-size: 16px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
}
#character .pet-arrow:hover { opacity: .55; }

#character .pet-globe {
    --pet-size: 112px;
    position: relative;
    width: var(--pet-size);
    height: var(--pet-size);
    flex: 0 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.65), rgba(255,255,255,.12) 55%, rgba(255,255,255,0) 78%),
        rgba(200,225,245,.25);
    box-shadow:
        inset 0 0 12px rgba(255,255,255,.5),
        0 2px 8px rgba(0,0,0,.25);
}

#character .pet-img {
    position: absolute;
    left: 0;
    width: 100%;
    height: var(--pet-size);
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
    display: block;
}
#character .pet-img-base {
    top: 0;
    filter: grayscale(100%);
}

/* çàëèâêà ñíèçó ââåðõ — êàê ñòàêàí âîäû */
#character .pet-fill {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0%;
    overflow: hidden;
    transition: height .6s ease;
}
#character .pet-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,.6);
}
#character .pet-fill .pet-img-color {
    top: auto;
    bottom: 0;
}

#character .pet-info {
    flex: 1 1 auto;
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#character .pet-name {
    font: 700 12px var(--def-font);
    text-transform: uppercase;
    margin-bottom: 5px;
    flex: 0 0 auto;
}

#character .pet-tasks {
    flex: 0 1 auto;
    max-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 11px;
    line-height: 1.4;
    padding-right: 4px;
}
#character .pet-tasks::-webkit-scrollbar { width: 4px; }
#character .pet-tasks::-webkit-scrollbar-thumb { background: #bbb; border-radius: 10px; }

#character .pet-task {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 4px;
}

#character .pet-mark {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-top: 3px;
    border-radius: 2px;
    background: #ccc;
}
#character .pet-task.done .pet-mark {
    background: #6462b5;
}
#character .pet-task.done span {
    text-decoration: line-through;
    opacity: .55;
}