/* Мир аналогов — вид сайта.
 * 24.09.2026, по макету Архитектора: тёмно-фиолетовая ночь, стеклянные
 * плашки, фон локации на всю страницу, живая карта под плашками.
 * Цвета и размеры — в переменных ниже: новый блок сразу выходит в стиле. */

:root {
    --bg: #0d0a14;
    --glass: rgba(22, 16, 32, 0.58);
    --glass-strong: rgba(18, 13, 27, 0.8);
    --line: rgba(214, 190, 255, 0.18);
    --line-soft: rgba(214, 190, 255, 0.1);
    --text: #f1ecf7;
    --muted: #a99fb8;
    --faint: #7d7390;
    --accent: #e0772f;
    --accent-hot: #f08a3f;
    --accent-glow: rgba(240, 138, 63, 0.45);
    --violet: #a778ff;
    /* тонкий металлический контур плашек и рамки портрета (слово Архитектора) */
    --metal: linear-gradient(135deg, #e9ecf1 0%, #8b919c 22%, #f4f6f9 45%, #6c727d 68%, #d3d7de 100%);
    --radius: 14px;
    --title: "Cormorant Garamond", "Times New Roman", serif;
    --body: "Manrope", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
    -webkit-tap-highlight-color: transparent;   /* без голубой вспышки при нажатии на телефоне */
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 14px;
}

button { font-family: inherit; }

/* ---------------------------------------------------------------- фон локации */

.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--bg);
    background-size: cover;
    background-position: center top;
}

.backdrop::after {
    /* затемнение книзу: плашки и карта читаются на любом фоне */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 10, 20, 0.15) 0%, rgba(13, 10, 20, 0.55) 45%, rgba(13, 10, 20, 0.9) 100%);
}

/* ---------------------------------------------------------------- шапка */

/* Одна строка (24.09, слово Архитектора): название — плашки — «Скачать».
   Отдельной полосы над картой нет: карте остаётся больше экрана. */
.top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand strip download";
    align-items: center;
    gap: 18px;
    padding: 14px 28px 12px;
}

.brand { grid-area: brand; }
.strip { grid-area: strip; }
.download { grid-area: download; }

@media (max-width: 1279px) {
    .top {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "brand download" "strip strip";
        row-gap: 12px;
    }
}

.brand-mark {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.brand-mark::before {
    content: "◌";
    margin-right: 8px;
    color: var(--violet);
}

.place {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

h1.place-title {
    margin: 2px 0 0;
    font-family: var(--title);
    font-weight: 500;
    font-size: clamp(28px, 3.4vw, 48px);
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

.place-motto {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.place-motto:empty { display: none; }

.place-switch {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--glass);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.place-switch:hover { border-color: var(--violet); }

.place-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 5;
    min-width: 230px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--glass-strong);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.place-menu[hidden] { display: none; }

.place-menu button {
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.place-menu button:hover { background: rgba(167, 120, 255, 0.14); }
.place-menu button.current { color: var(--accent-hot); }
.place-menu li:first-child button { color: var(--muted); border-bottom: 1px solid var(--line-soft); border-radius: 8px 8px 0 0; }

/* кнопка «Скачать» — квадратик с закруглёнными углами и свечением */
.download {
    display: flex;
    flex-flow: row wrap;               /* значок и «Скачать» в строку, версия под ними: вдвое ниже (30.09) */
    align-items: center;
    align-content: center;
    justify-content: center;
    gap: 0 6px;
    width: 96px;
    height: 48px;
    padding: 4px 8px;
    border: 1px solid var(--accent);
    border-radius: 16px;
    background: rgba(40, 20, 12, 0.55);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    box-shadow: 0 0 18px var(--accent-glow), inset 0 0 12px rgba(240, 138, 63, 0.18);
    backdrop-filter: blur(8px);
}

.download[hidden] { display: none; }
.download:hover { background: rgba(70, 32, 16, 0.7); }
.download-icon { color: var(--accent-hot); font-size: 18px; line-height: 1; }
.download-title { font-size: 14px; font-weight: 600; }
.download-note { flex-basis: 100%; color: var(--muted); font-size: 10px; line-height: 1.2; }

/* ---------------------------------------------------------------- стеклянные плашки */

.strip {
    display: grid;
    grid-template-columns: 1fr;          /* телефон — друг под другом */
    gap: 12px;
}

@media (min-width: 900px) {
    /* Плашка пэта — прежней ширины (1,2 из 3,2 доли); «Послания» занимают остальное (30.09: плашку «В мире» убрали). */
    .strip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); }
}

.panel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    height: 96px;
    padding: 10px 16px;
    border: 0;
    border-radius: var(--radius);
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Металлический контур толщиной в точку: кольцо поверх края, без заливки. */
.panel::before,
.avatar::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: var(--metal);
    opacity: 0.55;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
}

.avatar::before { opacity: 0.8; }

.panel-title {
    font-family: var(--title);
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
}

.panel-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line-soft);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    font-size: 20px;
}

.panel-stub {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

/* 1. Мой аналог */

.avatar {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 56px;
    height: 76px;
    border-radius: 8px;
    background: radial-gradient(circle at 50% 30%, rgba(167, 120, 255, 0.28), rgba(20, 14, 30, 0.92) 75%);
}

.live-pet-image {
    max-width: 50px;
    max-height: 70px;
    object-fit: contain;          /* персонаж целиком, ничего не обрезано */
    image-rendering: pixelated;
}

.live-pet-image[hidden],
.live-pet-stub[hidden] { display: none; }

.live-pet-stub { font-size: 30px; line-height: 1; }

.pet-info { flex: 1; min-width: 0; }

.live-pet-name {
    font-family: var(--title);        /* ник — главное на плашке (30.09) */
    color: var(--text);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-pet-note,
.pet-line {
    margin-top: 2px;
    color: var(--faint);
    font-size: 12px;
}

.live-pet-note:empty { display: none; }
.pet-line[hidden] { display: none; }

/* Плашка пэта (30.09): портрет | ник и состояние | «в мире» и кнопки под ним. */
.pet-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}
.pet-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.pet-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.pet-actions .account { flex-direction: column; align-items: flex-end; gap: 6px; }
.pet-actions .account-enter { padding: 6px 16px; font-size: 13px; }

.ghost-button {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.ghost-button:hover { border-color: var(--violet); }
.ghost-button[hidden] { display: none; }

/* Сумка — окно «Экипировка» (bag.js) — стили ниже, в конце файла. */
.pet-panel { z-index: 20; }
.pet-actions { position: relative; }

/* 2. В мире */

/* ---------------------------------------------------------------- карта */

.map-frame {
    position: relative;
    width: calc(100% - 56px);      /* точный размер ставит map.js: карта целиком, снизу отступ */
    height: 420px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(8, 6, 12, 0.6);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}

.map-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: var(--metal);
    opacity: 0.45;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
}

.map-view {
    position: absolute;
    inset: 0;
    overflow: hidden;
    user-select: none;
}

.map-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
}

/* Приближаем содержимое камеры, не рамку, интерфейс или размеры отдельных точек. */
.map-view.scene-camera { touch-action: none; }
.map-frame.reshaping .camera-dragging .map-layer { transition: none; }

/* Рамка меняет пропорцию плавно, когда входишь в место с картинкой другой формы (30.09). */
.map-frame.reshaping { transition: width 0.6s ease, height 0.6s ease; }
.map-frame.reshaping .map-layer { transition: width 0.6s ease, height 0.6s ease, transform 0.6s ease; }

/* Сцены лежат одна на другой; видимая растворяется в следующую. */
.map-scene {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}

.map-scene.shown {
    opacity: 1;
    pointer-events: auto;
}

.map-scene.instant { transition: none; }

.map-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.map-frame.is-empty .map-scene { filter: blur(6px) brightness(0.45); }

.map-points {
    position: absolute;
    inset: 0;
}

/* Телефон (29.09): нажал на значок — без голубой вспышки на всю его прозрачную
   рамку; обводка фокуса — только с клавиатуры. */
.map-point,
.map-point * {
    -webkit-tap-highlight-color: transparent;
}
.map-point:focus { outline: none; }
.map-point:focus-visible { outline: 2px solid var(--accent, #ffb870); outline-offset: 4px; border-radius: 8px; }

.map-point {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
    transform: translate(-50%, -50%);
}

.map-point-mark {
    filter: opacity(var(--icon-opacity, 1));       /* непрозрачность из редактора (29.09) */
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255, 200, 140, 0.9);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 170, 80, 0.9) 0 30%, rgba(255, 140, 50, 0.15) 60%, transparent 70%);
    box-shadow: 0 0 22px var(--accent-glow);
    animation: pulse 2.4s ease-in-out infinite;
}

/* 29.09 (слово Архитектора): точка на карте — середина значка, как в редакторе.
   Подпись висит под значком и не сдвигает его вверх. */
.map-point:not(.member) > .map-point-label {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 6px;
    transform: translateX(-50%);
}

.map-point-label {
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--glass-strong);
    font-size: 13px;
    white-space: nowrap;
}

.map-point:hover .map-point-mark { border-color: #fff; }

/* Игрок у костра: маленькая копия его пэта; имя — только у выбранного нажатием. */
.map-point.member {
    gap: 3px;
    transform: translate(-50%, -85%);
}

.map-figure img,
.map-figure canvas {
    display: block;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

.map-figure.no-picture {
    display: block;
    width: 18px;
    height: 36px;
    border-radius: 9px 9px 4px 4px;
    background: linear-gradient(180deg, rgba(214, 190, 255, 0.85), rgba(120, 90, 170, 0.6));
    box-shadow: 0 0 10px rgba(167, 120, 255, 0.6);
}

.map-point.member .map-point-label {
    display: none;
    padding: 1px 7px;
    font-size: 11px;
}
.map-point.member.member-selected > .map-point-label {
    display: block; padding: 0; border: 0; background: none; line-height: 1.2;
}
.map-member-name { min-width: 0; max-width: min(112px, 45vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-more {
    display: inline-flex; align-items: center; gap: 5px; max-width: min(160px, 60vw);
    min-height: 26px; padding: 2px 8px; border: 1px solid #be9d5fa8; border-radius: 999px;
    background: linear-gradient(#353126f2, #1b1a16f2); color: #e2d1ac;
    box-shadow: inset 0 1px #ead4a529, 0 2px 4px #0005; font: inherit; line-height: 1.2; cursor: pointer;
}
.member-chevron { flex: none; color: #cdb680; font-size: 11px; }
.member-more:hover { border-color: #dfc286; background: linear-gradient(#423a2af5, #242019f5); color: #f2deb4; }
.member-more:active { box-shadow: inset 0 1px 3px #0008; }
.member-more:focus-visible { outline: 1px solid #d0b57e; outline-offset: 1px; }
.map-point.member.member-selected > .map-point-action { top: 34px !important; }
/* 23.10: пэт у нижнего края — таблички над головой (map.js placeMemberPlates) */
.map-point.member.plates-up > .map-point-label { top: auto !important; bottom: calc(var(--plates-head, 40px) + 4px) !important; }
.map-point.member.plates-up > .map-point-action { top: auto !important; bottom: calc(var(--plates-head, 40px) + 4px) !important; }
.map-point.member.plates-up.member-selected > .map-point-action { bottom: calc(var(--plates-head, 40px) + 34px) !important; }

/* Паспортная страница: отдельный слой рядом с фигурой, без роста рамки и страницы. */
.map-point.member.member-tag-open > .map-point-label { visibility: hidden; }
.map-point.member.member-tag-open > .map-point-action { display: none; }
.map-point.member.member-selected::before {
    content: ""; position: absolute; left: 0; bottom: -2px; width: 25px; height: 7px;
    border: 1px solid #d1ba7a99; border-radius: 50%; transform: translateX(-50%); pointer-events: none;
}
.member-name-emoji, .member-card-emoji { flex: none; font: 13px/1.3 "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.member-name-emoji:empty, .member-card-emoji:empty { display: none; }
.member-card {
    position: fixed; z-index: 24; box-sizing: border-box; display: block;
    width: 156px; min-width: 0; max-width: calc(100vw - 16px); overflow: visible;
    padding: 6px 8px 7px; border: 1px solid #9a8460; border-radius: 2px 4px 3px 2px;
    background: repeating-linear-gradient(0deg, #806a4105 0 1px, transparent 1px 4px), linear-gradient(125deg, #eee4cb, #e5d6b5);
    color: #413827; pointer-events: auto; text-align: left;
    box-shadow: 1px 4px 9px #0006, inset 2px 0 #fff5;
    font-size: 10px; line-height: 1.3; text-shadow: none;
}
.member-card::after { content: ""; position: absolute; width: 6px; height: 10px; background: #e9ddbf; pointer-events: none; }
.member-card[data-side="right"]::after { left: -6px; top: var(--member-pointer-y, 24px); transform: translateY(-50%); clip-path: polygon(0 50%, 100% 0, 100% 100%); }
.member-card[data-side="left"]::after { right: -6px; top: var(--member-pointer-y, 24px); transform: translateY(-50%); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.member-card[data-side="above"]::after { bottom: -6px; left: var(--member-pointer-x, 50%); width: 10px; height: 6px; transform: translateX(-50%); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.member-card[data-side="below"]::after { top: -6px; left: var(--member-pointer-x, 50%); width: 10px; height: 6px; transform: translateX(-50%); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.member-card[hidden], .member-card [hidden] { display: none; }
.member-card > * { box-sizing: border-box; min-width: 0; max-width: 100%; }
.member-card * { box-sizing: border-box; }
.member-card-header { display: flex; align-items: center; justify-content: space-between; gap: 3px; margin-bottom: 4px; border-bottom: 1px solid #78664450; color: #756342; font: 8px Georgia, serif; letter-spacing: 0.8px; }
.member-card-identity { display: flex; align-items: center; gap: 7px; }
.member-card-photo { position: relative; flex: none; display: grid; place-items: center; width: 28px; height: 36px; border: 1px solid #8f7b57; background: #cabc9c55; box-shadow: inset 0 0 0 1px #fff5; }
.member-card-photo:not(.ready)::before { content: "◇"; color: #8c7c5f; font-size: 16px; }
.member-card-photo img { display: none; position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); object-fit: contain; }
.member-card-photo.ready img { display: block; }
.member-card-name-line { display: flex; align-items: flex-start; gap: 4px; min-width: 0; flex: 1; }
.member-card-name {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    min-width: 0; overflow-wrap: anywhere; font: 600 13px/1.15 "Cormorant Garamond", Georgia, serif;
    letter-spacing: 0.1px; color: #413827; text-shadow: none;
}
.member-card-status {
    display: block; width: 100%;
    margin: 5px 0 4px; padding: 0 0 4px; border-bottom: 1px solid #8b77542e;
    color: #5b4f3b; overflow-wrap: anywhere; white-space: normal; font-size: 10.5px; line-height: 1.3;
}
.member-card-close {
    flex: none; width: 24px; min-height: 24px; padding: 0; border: 0;
    background: transparent; color: #756342; font: 17px Georgia, serif; cursor: pointer;
}
.member-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.member-card-write.map-pigeon {
    /* Старый голубь стоит снаружи пузыря: его absolute/left/transform здесь не нужны. */
    position: static; inset: auto; transform: none;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    width: 100%; min-width: 0; max-width: 100%; height: auto; min-height: 24px;
    margin: 0; padding: 2px 5px; border: 1px solid #a48b60; border-radius: 3px;
    background: #e3d1ac; box-shadow: none; color: #69573b; font: inherit; font-size: 10px;
}
.member-postmark { display: grid; place-items: center; flex: none; width: 16px; height: 16px; }
.member-card-write .member-postmark svg { width: 13px; height: 13px; fill: currentColor; filter: none; }
.member-card-write.map-pigeon:hover { background: #d9c398; border-color: #8e7147; color: #362b1c; box-shadow: none; }
.member-card-fainted { margin: 5px 0 3px; color: #8c4635; font-size: 10px; }
.member-card-help { display: block; width: 100%; min-height: 24px; margin: 3px 0; padding: 2px 4px; border: 1px solid #a48b60; border-radius: 3px; background: #e3d1ac; color: #57442c; font: inherit; font-size: 10px; cursor: pointer; }
.member-card button:focus-visible { outline: 2px solid #8d6438; outline-offset: 1px; }

/* Общение игроков: отдельное окно, не изменение общей темы и не сценарный Talk. */
.local-chat-ui[hidden], .local-chat-ui [hidden] { display: none !important; }
.lc-panel, .lc-invite, .lc-dock { position: fixed; z-index: 32; box-sizing: border-box; font: 12px/1.4 var(--body); color: #e1d7c1; }
.lc-panel { right: 14px; bottom: 14px; display: flex; flex-direction: column; width: 340px; max-width: calc(100vw - 24px); height: min(440px, 72dvh); min-height: 150px; border: 1px solid #9e8052; border-radius: 6px; background: #1d1723f5; box-shadow: 0 5px 22px #0008; overflow: hidden; }
.lc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 11px; border-bottom: 1px solid #a3874a44; flex: none; }
.lc-head strong { font: 19px var(--title); }
.lc-fold { border: 0; min-width: 28px; min-height: 28px; background: transparent; color: #d9c292; font: 20px Georgia, serif; cursor: pointer; }
.lc-roster { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; max-height: 76px; overflow: auto; padding: 5px 11px; color: #c5b48d; flex: none; font-size: 10px; }
.lc-person { padding: 3px 0; min-height: 24px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-decoration: underline dotted #a58b5a66; }
.lc-audible { margin: 0; padding: 0 11px 6px; color: #a39a89; font-size: 10px; flex: none; }
.lc-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 11px; }
.lc-message { margin: 0 0 9px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.lc-message b { display: block; margin-bottom: 2px; color: #c5a568; font-size: 10px; font-weight: 500; }
.lc-message.lc-system { color: #a398ad; font-style: italic; font-size: 10px; }
.lc-compose { display: flex; align-items: stretch; gap: 6px; padding: 8px 11px; border-top: 1px solid #a3874a33; flex: none; }
.lc-compose textarea { box-sizing: border-box; display: block; flex: 1; width: 0; min-width: 0; min-height: 42px; max-height: 110px; resize: vertical; padding: 7px; border: 1px solid #7d6b4c; border-radius: 3px; background: #110f17; color: #eee6d7; font: 12px/1.35 var(--body); }
.lc-button { padding: 5px 8px; min-height: 28px; border: 1px solid #90734b; border-radius: 3px; background: #463521; color: #e0cfa8; font: 11px/1.3 var(--body); cursor: pointer; }
.lc-button:hover { background: #57412a; }
.lc-button:disabled { opacity: .5; cursor: default; }
.lc-controls { display: flex; justify-content: space-between; gap: 6px; padding: 0 11px 8px; flex: none; }
.lc-controls .lc-button { background: transparent; border-color: #73634b; font-size: 10px; }
.lc-invite { top: 14px; right: 14px; width: 300px; max-width: calc(100vw - 24px); padding: 10px 12px; background: #241b2af5; border: 1px solid #b08b4f; border-radius: 5px; box-shadow: 0 4px 14px #0007; }
.lc-invite p { margin: 0 0 8px; overflow-wrap: anywhere; }
.lc-invite-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.lc-error { flex: none; margin: 0; padding: 3px 11px; color: #e3b191; font-size: 10px; overflow-wrap: anywhere; max-height: 54px; overflow: auto; }
.lc-dock { bottom: 14px; right: 14px; display: flex; gap: 5px; }
.local-chat-ui:has(.lc-panel:not([hidden])) .lc-dock { right: 364px; }
.lc-dock .lc-button { font-size: 10px; background: #201b26ec; }
.local-chat-ui button:focus-visible, .lc-compose textarea:focus-visible { outline: 2px solid #cab174; outline-offset: 1px; }
.member-card-talk { display: block; width: 100%; min-height: 26px; margin: 4px 0 1px; padding: 3px 4px; border: 1px solid #95805b; border-radius: 3px; background: #d9c69c; color: #51402a; font: 10px/1.3 var(--body); cursor: pointer; }
.member-card-talk:disabled { opacity: .6; cursor: default; }
.member-card-chat-block { display: block; width: 100%; min-height: 24px; padding: 2px; margin: 0 0 3px; border: 0; background: transparent; color: #7f654a; font: 9px/1.25 var(--body); cursor: pointer; }
.member-chat-fragment { position: absolute; left: 0; bottom: 52px; width: max-content; max-width: 165px; padding: 3px 6px; border-radius: 8px; background: #171b2244; color: #eee6d5b8; text-shadow: 0 1px 3px #000b; font: italic 12px/1.3 Georgia, serif; text-align: center; overflow-wrap: anywhere; transform: translateX(-50%); pointer-events: none; }
/* 26.10: «отошёл» — связь пропала, игрок ещё в разговоре (до 20 минут). */
.member.member-away { opacity: .45; transition: opacity .6s ease; }
.lc-person.lc-away { opacity: .6; font-style: italic; }
.lc-mobile-bar { display: none; }
.lc-live-feed { position: fixed; z-index: 21; direction: rtl; overflow-x: hidden; overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain; touch-action: pan-y; pointer-events: none; scrollbar-width: thin; scrollbar-color: #b79d6877 transparent; color: #fff4de; }
.lc-live-message { display: block; direction: ltr; text-align: left; width: fit-content; max-width: 100%; box-sizing: border-box; pointer-events: auto; overflow-wrap: anywhere; white-space: pre-wrap; margin: 0 auto 8px 0; padding: 2px 4px; font: 14px/1.35 var(--body); text-shadow: -1px -1px 1px #09070cf0, 1px 1px 1px #09070cf0, 0 2px 5px #000, 0 0 9px #000; background: linear-gradient(90deg, #100e1640, transparent); }
.lc-live-message b { color: #efd19a; font-weight: 600; }
.lc-live-message:not(:last-child) { opacity: .78; }
.local-chat-ui.lc-is-folded .lc-panel, .local-chat-ui.lc-is-folded .lc-live-feed, .local-chat-ui.lc-is-folded .lc-details { display: none !important; }
.local-chat-ui.lc-is-folded .lc-dock { display: flex !important; right: 14px; }
.lc-details { position: fixed; z-index: 34; right: 10px; display: flex; flex-direction: column; width: 350px; max-width: calc(100vw - 20px); overflow: hidden; border: 1px solid #9e8052; border-radius: 5px; background: #1d1723fa; color: #e1d7c1; box-shadow: 0 4px 18px #0008; font: 12px/1.4 var(--body); }
.lc-details-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 10px; flex: none; }
.lc-icon-button { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #dec69a; font: 22px/1 var(--body); cursor: pointer; }
.lc-detail-tabs { display: flex; gap: 6px; padding: 0 10px 8px; flex: none; }
.lc-detail-tabs button[aria-pressed="true"] { border-color: #d0b16d; }
.lc-detail-settings { min-height: 0; overflow: auto; padding: 3px 10px 10px; }
.lc-detail-settings > .lc-button { margin-bottom: 8px; }
.lc-detail-settings .lc-roster { padding: 5px 0; max-height: none; }
.lc-detail-settings .lc-audible { padding: 4px 0 10px; }
.lc-detail-settings .lc-controls { padding: 0; }
.lc-detail-history { display: flex; flex: 1; min-height: 0; max-height: 50dvh; overflow: hidden; }
.lc-detail-history .lc-messages { max-height: 100%; }
@media (max-width: 620px) {
    .lc-panel { right: 8px; max-width: calc(100vw - 16px); width: 350px; height: min(360px, 65dvh); }
    .lc-invite { right: 8px; top: 8px; max-width: calc(100vw - 16px); }
    .local-chat-ui:has(.lc-panel:not([hidden])) .lc-dock { display: none; }
    .lc-compose textarea { font-size: 16px; }
    body.mobile-chat-open { overflow: hidden; overscroll-behavior: none; }
    body.mobile-chat-open > .top { display: none; }
    body.mobile-chat-open #map-frame { position: fixed !important; top: var(--lc-view-top, 0px); left: var(--lc-view-left, 0px); width: var(--lc-view-width, 100vw) !important; height: max(80px, calc(var(--lc-view-height, 100dvh) - var(--lc-composer-height, 76px))) !important; margin: 0; border-radius: 0; z-index: 20; transition: none; }
    body.mobile-chat-open #map-frame .map-layer { transition: none; }
    body.mobile-chat-open .lc-panel { left: var(--lc-view-left, 0px); right: auto; width: var(--lc-view-width, 100vw); max-width: none; height: auto; min-height: 0; border: 0; border-top: 1px solid #9e805288; border-radius: 0; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -2px 8px #0004; }
    body.mobile-chat-open.lc-writing .lc-panel { padding-bottom: 0; }
    body.mobile-chat-open .lc-mobile-bar { display: flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 7px; }
    body.mobile-chat-open .lc-head { display: none; }
    .lc-summary { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 4px 0; min-height: 28px; text-align: left; background: transparent; border: 0; color: #c8b88f; font: 11px/1.3 var(--body); cursor: pointer; }
    .lc-aloud { flex: none; color: #a99a82; font: 9px var(--body); }
    body.mobile-chat-open .lc-compose { padding: 0 7px 6px; gap: 5px; border-top: 0; }
    body.mobile-chat-open .lc-compose textarea { resize: none; min-height: 36px; max-height: 70px; padding: 6px 8px; line-height: 22px; }
    body.mobile-chat-open .lc-compose > .lc-button { min-width: 38px; padding: 3px 8px; font-size: 18px; }
    body.mobile-chat-open .lc-error { max-height: 30px; padding: 0 8px 4px; }
    body.mobile-chat-open .lc-dock { display: none; }
    .lc-roster > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
}

/* Виды точек (24.09): вход ⇨, место ◈ (свечение, как лагерь), осмотр — полупрозрачный глаз, взять ✦. */
.map-point-mark { display: grid; place-items: center; font-size: 13px; line-height: 1; color: #fff3e0; }
.map-point.exit .map-point-mark::after { content: "⇨"; }
.map-point.exit .map-point-mark {
    border-color: rgba(150, 210, 255, 0.9);
    background: radial-gradient(circle, rgba(110, 170, 255, 0.55) 0 35%, rgba(110, 170, 255, 0.12) 65%, transparent 72%);
    box-shadow: 0 0 18px rgba(120, 180, 255, 0.55);
}
.map-point.view .map-point-mark {
    width: 34px;
    height: 22px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    opacity: 0.55;
    animation: none;
    font-size: 22px;
    transition: opacity 0.2s;
}
.map-point.view .map-point-mark::after { content: "👁"; }
.map-point.view:hover .map-point-mark { opacity: 1; }
.map-point.view.found .map-point-mark { opacity: 1; }        /* нашёл — горит (29.09) */
/* Спрятанная точка любого вида (29.09): пока не найдена — бледная, без подписи. */
.map-point.hidden:not(.view) .map-point-mark { --icon-opacity: 0.55; animation: none; }
.map-point.hidden .map-point-mark[style*="--icon-opacity"] { opacity: 1; }
.map-point.board .map-point-mark::after { content: "✎"; color: #e1ffee; }
.map-point.board .map-point-mark {
    border-color: rgba(170, 240, 200, 0.95);
    background: radial-gradient(circle, rgba(90, 210, 150, 0.55) 0 35%, rgba(60, 180, 120, 0.12) 65%, transparent 72%);
    box-shadow: 0 0 18px rgba(90, 220, 160, 0.55);
}
.map-point.item .map-point-mark::after { content: "✦"; color: #ffe9a8; }
.map-point.item .map-point-mark { border-color: rgba(255, 225, 140, 0.95); }
.map-point.item.empty,
.map-point.item.taken { filter: grayscale(1); opacity: 0.55; }
.map-point.item.empty .map-point-mark,
.map-point.item.taken .map-point-mark { animation: none; }

/* Лежит без сил — миниатюра лёжа. */
.map-point.member.fainted .map-figure { transform: rotate(-90deg) translateX(-30%); filter: grayscale(0.6); }
.map-point.member.fainted .map-point-label { border-color: rgba(255, 120, 120, 0.6); }

.map-point-action {
    padding: 2px 8px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: rgba(40, 20, 12, 0.85);
    color: var(--text);
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
}

.map-point-action:hover { background: rgba(80, 36, 16, 0.95); }

.pet-line.fainted { color: #ff9a9a; }

/* ---------------------------------------------------------------- осмотр: арт поверх фона локации */

/* 30.09 (слово Архитектора): открыл осмотр — интерфейс быстро прячется, остаётся
   только фон локации, слегка притемнённый, и арт на нём. */
body > *,
body > .top > * {
    transition: opacity 0.45s ease;
}
/* В обе стороны одна плавная прозрачность. Не скрываем родителя через visibility:
   недоступность скрытых кнопок и клавиатурного фокуса обеспечивает inert в script.js. */
/* На телефоне .top имеет display:contents: её дети рисуются без коробки
   шапки, поэтому гасить нужно и их, а не только невидимый контейнер. */
body.viewing > *:not(.backdrop):not(#lightbox),
body.viewing > .top > * {
    opacity: 0;
    pointer-events: none;
}
.backdrop::after { transition: opacity 0.15s ease; }
body.viewing .backdrop::after { transition: opacity 0.45s ease; }

/* Карта совсем немного приближается к значку открытого осмотра
   (transform-origin — середина значка, ставит script.js). */
.map-view { transition: transform 0.5s ease; }
.map-view.zoom-in { transform: scale(1.07); }
body.viewing .backdrop::after { opacity: 0; }   /* без затемнения книзу — фон виден целиком */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;       /* картинка, а под ней подпись и «Назад» (30.09) */
    gap: 10px;
    padding: 24px 64px;
    background: rgba(8, 6, 14, 0.32);
    animation: fade-in 0.45s ease;
    touch-action: pan-y;          /* свайп влево-вправо — наш, прокрутку страницы не трогаем */
    user-select: none;
}

.lightbox[hidden] { display: none; }

/* «Втягивание» в точку (30.09): фон осмотра уходит сразу, кнопки прячутся,
   арт летит в значок поверх вернувшегося интерфейса. */
.lightbox.closing {
    background: transparent;
    pointer-events: none;
    transition: background 0.15s ease;
}
.lightbox.closing .lightbox-arrow,
.lightbox.closing .lightbox-bottom { visibility: hidden; }
.lightbox.closing .lightbox-frame { box-shadow: none; }

/* Рамка арта: в ней арт; подпись и «Назад» — отдельным рядом под ней. */
.lightbox-frame {
    position: relative;
    line-height: 0;
    overflow: hidden;
    border-radius: 12px;
}

.lightbox-stage {
    position: relative;
    animation: fade-in 0.3s ease;   /* арт проявляется плавно, но быстро */
    transform-origin: 0 0;
}
.lightbox-frame.scene-camera { touch-action: none; }
.lightbox-frame.camera-dragging .lightbox-stage { animation: none; transition: none; }
.lightbox-stage.from-right { animation: view-from-right 0.28s ease; }
.lightbox-stage.from-left { animation: view-from-left 0.28s ease; }

.lightbox-stage img {
    display: block;
    max-width: calc(100vw - 128px);
    max-height: calc(100vh - 48px - 92px);      /* внизу место под подпись и «Назад» */
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    -webkit-user-drag: none;
}

.lightbox-points {
    position: absolute;
    inset: 0;
    line-height: normal;
}

.lightbox .map-point { cursor: pointer; }

.lightbox-bottom {
    position: relative;
    z-index: 3;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    line-height: normal;
    pointer-events: none;
}

/* 13.10: подсказка на осмотре — поверх картинки, у её нижнего края; ничего не сдвигает. */
.lightbox-frame > #info-panel {
    position: absolute;
    z-index: 4;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: fit-content;
    max-width: calc(100% - 24px);
    margin: 0 auto;
    line-height: normal;
}

.lightbox-caption {
    font-family: var(--title);
    font-size: 22px;
    color: var(--text);
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}
.lightbox-caption:empty { display: none; }

/* «Назад» — под картинкой по центру; единственный способ закрыть мышью или пальцем. */
.lightbox-back {
    pointer-events: auto;
    padding: 9px 22px;
    border: 1px solid rgba(201, 168, 255, 0.55);
    border-radius: 999px;
    background: rgba(20, 14, 34, 0.82);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.lightbox-back:hover { background: rgba(40, 28, 66, 0.9); }

/* Стрелки по бокам — еле заметные, только когда осмотров несколько. */
.lightbox-arrow {
    display: none;
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    font-size: 34px;
    line-height: 1;
    opacity: 0.22;
    cursor: pointer;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
    transition: opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.lightbox-arrow.prev { left: 10px; }
.lightbox-arrow.next { right: 10px; }
.lightbox.many .lightbox-arrow { display: block; }
.lightbox-arrow:hover { opacity: 0.6; }

/* Вертикальный экран (телефон): окно как у карты (30.09, слово Архитектора) — шириной
   в экран без полей, квадратное (1:1 — горизонтально влезает больше), со скруглением;
   арт — по высоте окна, в своих пропорциях, двигается в нём пальцем. Вокруг — фон. */
.lightbox.portrait {
    padding: 0 14px;
    touch-action: none;
}
.lightbox.portrait .lightbox-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 80vh;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(8, 6, 12, 0.6);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
}
.lightbox.portrait .lightbox-stage {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
}
.lightbox.portrait .lightbox-stage.settle { transition: left 0.25s ease; }
.lightbox.portrait .lightbox-stage img {
    height: 100%;
    width: auto;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
}
.lightbox.portrait .lightbox-bottom { padding-bottom: env(safe-area-inset-bottom); }

@keyframes view-from-right {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: none; }
}
@keyframes view-from-left {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: none; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.18); opacity: 1; }
}

.map-back {
    border: 1px solid var(--line);
    background: var(--glass-strong);
    color: var(--text);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.map-back:hover { border-color: var(--violet); }

.map-back {
    border: 1px solid var(--line);
    background: var(--glass-strong);
    color: var(--text);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.map-back {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
}

.map-back[hidden] { display: none; }

.map-empty {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: 80%;
    padding: 14px 22px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--glass-strong);
    color: var(--text);
    text-align: center;
    pointer-events: none;
}

.map-empty[hidden] { display: none; }

/* Низ карты (13.10): подсказка над кнопками «Назад» / «Перейти сюда», столбиком — не налезают. */
.map-bottom {
    position: absolute;
    z-index: 3;
    left: 8px;
    right: 8px;
    bottom: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.map-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.map-buttons:not(:has(.map-back:not([hidden]))) { display: none; }
.map-bottom .map-back {
    position: static;
    transform: none;
    pointer-events: auto;
}
.map-go { border-color: var(--accent); }
.map-go:disabled { opacity: 0.6; cursor: default; }
.map-bridge { border-color: var(--accent); text-decoration: none; }

#info-panel {
    position: relative;
    max-width: 100%;
    text-align: center;
    padding: 8px 16px;
    transform: translateY(10px);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--glass-strong);
    color: var(--text);
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

#info-panel.visible {
    opacity: 1;
    transform: none;
}

/* ---------------------------------------------------------------- телефон */

@media (max-width: 640px) {
    .top { padding: 12px 14px 8px; gap: 10px; }
    /* На телефоне: название, затем карта, затем прежние плашки.
       DOM и обработчики плашек не переносим; на компьютере порядок прежний. */
    body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand download" "map map" "strip strip"; align-content: start; row-gap: 8px; }
    body > .top { display: contents; }
    body > .top::after { display: none; }
    .top > .brand { min-width: 0; margin: 12px 0 0 14px; }
    .top > .download { margin: 12px 14px 0 0; }
    .top > .strip { min-width: 0; margin: 0 14px 14px; }
    body > #map-frame { grid-area: map; margin: 0 auto; }
    .strip { gap: 8px; }
    .panel { height: auto; min-height: 0; padding: 10px 12px; }
    .download { width: 96px; height: 36px; }
    .map-frame { width: calc(100% - 28px); margin: 0 auto 14px; }
    .map-view { cursor: grab; touch-action: pan-y; }
    .download-note { display: none; }
}

/* ---------------------------------------------------------------- вход (account.js) */

.account {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.account-enter,
.auth-submit {
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
}

.account-enter:hover,
.auth-submit:hover {
    background: var(--accent-hot);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: default;
}

.account-link,
.auth-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.account-plaque {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.account-plaque .plaque-value {
    font-size: 18px;
}


/* ---------------------------------------------------------------- окно входа */

.modal {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 10, 9, 0.72);
}

.modal[hidden],
.auth-form[hidden],
.auth-tabs[hidden],
.modal-close[hidden] {
    display: none;
}

.modal-box {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 22px 24px 24px;
    border-radius: 14px;
    background: rgba(24, 18, 34, 0.92);
    border: 1px solid var(--line);
    color: var(--text);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(14px);
}

.modal-box h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: none;
    color: #c9c9c4;
    font-size: 24px;
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.auth-tab {
    flex: 1;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: #1a1a19;
    color: #c9c9c4;
    cursor: pointer;
}

.auth-tab.active {
    background: #3d3d3a;
    color: #ffffff;
}

.auth-form {
    display: grid;
    gap: 10px;
}

.auth-form label {
    display: grid;
    gap: 4px;
    font-size: 13px;
    color: #c9c9c4;
}

.auth-form input {
    padding: 9px 10px;
    border: 1px solid #3d3d3a;
    border-radius: 8px;
    background: #1a1a19;
    color: #ffffff;
    font-size: 15px;
}

.auth-form input:focus {
    outline: 2px solid #d95926;
    outline-offset: 0;
}

.auth-form p {
    margin: 0;
}

.auth-hint {
    color: #9d9d97;
    font-size: 12px;
}

.auth-error {
    min-height: 1em;
    color: #ff8a65;
    font-size: 13px;
}

.recovery-code {
    padding: 14px;
    border-radius: 10px;
    background: #1a1a19;
    color: #ffd27a;
    font-family: Consolas, "Courier New", monospace;
    font-size: 22px;
    letter-spacing: 2px;
    text-align: center;
    user-select: all;
}

/* Свой значок точки (25.09.2026): картинка из редактора локаций вместо кружка. */
.map-point-icon {
    display: block;
    object-fit: contain;
    /* Прозрачность из редактора — в том же filter, что и тень (29.09: на телефоне
       отдельная opacity у картинки с тенью не работала). */
    filter: opacity(var(--icon-opacity, 1)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
    transition: transform 0.15s;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.map-point:hover .map-point-icon { transform: scale(1.08); }
.map-point.own-icon.empty .map-point-icon,
.map-point.own-icon.taken .map-point-icon { filter: grayscale(1) opacity(calc(var(--icon-opacity, 1) * 0.6)); }

/* Смена локации (25.09.2026): прежняя картинка растворяется поверх новой. */
.map-ghost {
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.9s ease;
    z-index: 2;
}
.map-ghost.gone { opacity: 0; }

/* Фон страницы меняется плавно — медленнее карты. */
.backdrop-next {
    opacity: 0;
    transition: opacity 1.6s ease;
}
.backdrop-next.shown { opacity: 1; }

/* Свой значок с пульсирующим кружком выбранного цвета. */
.map-point-iconwrap {
    position: relative;
    display: grid;
    place-items: center;
}
.map-point-pulse {
    position: absolute;
    inset: -18%;
    border: 2px solid var(--pulse, #ffc864);
    border-radius: 50%;
    box-shadow: 0 0 18px var(--pulse, #ffc864);
    animation: pulse-ring 2.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes pulse-ring {
    0%, 100% { transform: scale(0.92); opacity: 0.55; }
    50% { transform: scale(1.12); opacity: 1; }
}

/* Поиск (28.09): кнопка «Заняться поиском» и ход поиска — в углу карты. */
/* Поиск (29.09): маленький кружок с факелом; 1–8 ч — компактно рядом. */
.search-panel {
    position: absolute;
    z-index: 2;
    right: 14px;
    top: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.search-panel[hidden] { display: none; }
.search-panel .torch {
    width: 42px;
    height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--glass-strong);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.3s;
}
.search-panel .torch:hover { border-color: var(--violet); }
.search-panel .torch svg { width: 22px; height: 22px; }
.search-panel .torch-stick { fill: #8a7a6a; }
.search-panel .torch-flame { fill: #6f6a80; transition: fill 0.3s; }
.search-panel .torch:hover .torch-flame { fill: #ffb24a; }
.search-panel.lit .torch {
    border-color: rgba(255, 170, 70, 0.7);
    box-shadow: 0 0 14px rgba(255, 150, 50, 0.55);
}
.search-panel.lit .torch-flame {
    fill: #ffb24a;
    transform-origin: 12px 11px;
    animation: torch-flicker 1.4s ease-in-out infinite;
}
@keyframes torch-flicker {
    0%, 100% { transform: scale(1, 1); fill: #ffb24a; }
    50% { transform: scale(0.92, 1.08); fill: #ffd27a; }
}
.search-panel .torch-left {
    font-size: 11px;
    line-height: 1;
    color: #ffd28a;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
}
.search-panel .torch-pop {
    display: none;
    grid-template-columns: repeat(4, 34px);
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--glass-strong);
    backdrop-filter: blur(10px);
}
.search-panel.open .torch-pop { display: grid; }
.search-panel.lit .torch-pop { grid-template-columns: auto; }
.search-panel .torch-pop button {
    height: 26px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.search-panel .torch-pop button:hover { border-color: #ffb24a; color: #ffd28a; }
@media (prefers-reduced-motion: reduce) {
    .search-panel.lit .torch-flame { animation: none; }
}

/* «В мире» — сверху правой колонки плашки пэта (30.09). */
.online-badge {
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    cursor: default;
}
.online-badge b { color: var(--text); font-weight: 600; }
.online-badge i { color: #7be0a0; font-style: normal; font-size: 8px; margin-right: 3px; }


/* ---------------------------------------------------------------- Сумка пэта (bag.js, 30.09)
   Та же, что окно пэта на рабочем столе (bag_window.py): слева кукла со слотами, справа сетка
   с картинками. Общие классы .bag-modal / .bag-window / .bag-head / .bag-close / .bag-btn /
   .bag-status / .bag-none используют и доски посланий (board.js). Менять — в обеих сумках сразу. */
.bag-modal {
    position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 10px; overflow-y: auto;
    background: rgba(6, 4, 12, 0.66); backdrop-filter: blur(3px);
}
.bag-modal[hidden] { display: none; }
.bag-window {
    width: min(640px, 100%); max-height: min(92vh, 720px); overflow-y: auto;
    padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: 16px;
    background: rgba(18, 14, 30, 0.97); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6); text-align: left;
}
.bag-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bag-head h2 { margin: 0; font-family: var(--title); font-size: 20px; font-weight: 600; }
.bag-close { border: 0; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.bag-close:hover { color: var(--text); }
.bag-none { color: var(--muted); font-size: 13px; padding: 8px 2px; }
.bag-btn {
    padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.05);
    color: var(--text); font-size: 13px; cursor: pointer;
}
.bag-btn:hover { border-color: var(--violet); }
.bag-btn:disabled { opacity: 0.5; cursor: default; }
.bag-status { min-height: 18px; margin-top: 8px; font-size: 12px; color: var(--muted); }

.bg-window {
    position: relative; display: flex; width: min(820px, 100%); min-height: 560px; max-height: 96vh; overflow: auto;
    border: 1px solid rgba(200, 185, 255, 0.24); border-radius: 18px; text-align: left; color: #f1edf8;
    background: radial-gradient(ellipse at 50% 0%, rgba(36, 28, 62, 0.97), rgba(18, 13, 32, 0.98));
    box-shadow: 0 0 0 6px rgba(143, 91, 255, 0.12), 0 18px 54px rgba(0, 0, 0, 0.65); user-select: none;
}
.bg-left { flex: none; width: 330px; padding: 14px 14px 14px 16px; border-right: 1px solid rgba(200, 185, 255, 0.18); }
.bg-right { flex: 1; min-width: 0; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.bg-title { margin: 0 0 6px; font-family: var(--title); font-size: 17px; font-weight: 700; }
.bg-top { display: flex; align-items: center; justify-content: space-between; }
.bg-top .bg-title { margin: 0; }
.bg-window > .bg-close { position: absolute; top: 12px; right: 14px; z-index: 6; }
.bg-close {
    width: 28px; height: 28px; border: 1px solid rgba(200, 185, 255, 0.25); border-radius: 14px; background: none;
    color: #a79fbd; font-size: 14px; cursor: pointer;
}
.bg-close:hover { color: #f1edf8; border-color: #c9a8ff; }
.bg-doll { position: relative; width: 300px; height: 330px; margin: 0 auto; }
.bg-figure { position: absolute; left: 80px; top: 36px; width: 140px; height: 280px; object-fit: contain; object-position: bottom; image-rendering: pixelated; pointer-events: none; }
.bg-slot {
    position: absolute; width: 52px; height: 52px; box-sizing: border-box; display: grid; place-items: center;
    border: 1px solid rgba(200, 185, 255, 0.18); border-radius: 12px; background: rgba(10, 8, 20, 0.6); cursor: default;
}
.bg-slot.worn { border: 1.3px solid #e8c27a; background: linear-gradient(#3c2a12cc, #181008cc); cursor: pointer; touch-action: manipulation; }
.bg-slot.fits { border: 1.3px solid #c9a8ff; }
.bg-slot.hot { border: 2px solid #c9a8ff; box-shadow: 0 0 0 4px rgba(201, 168, 255, 0.3); }
.bg-slot-name { font-size: 10.5px; line-height: 1.15; color: #6f6884; text-align: center; white-space: pre-line; }
.bg-pic { display: grid; place-items: center; font-size: 13px; color: #a79fbd; pointer-events: none; }
.bg-pic img { max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: pixelated; }
.bg-stats { width: 100%; margin-top: 4px; border-collapse: collapse; color: #a79fbd; font-size: 13px; }
.bg-stats td { padding: 2px; }
.bg-stats td:last-child { text-align: right; }
.bg-stats b { color: #f1edf8; }
.bg-hp { height: 6px; margin-top: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.bg-hp i { display: block; height: 100%; background: #ff4d5e; }
.bg-filters, .bg-sets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bg-chip {
    padding: 3px 11px; border: 1px solid rgba(200, 185, 255, 0.25); border-radius: 12px; background: transparent;
    color: #a79fbd; font-size: 12.5px; cursor: pointer;
}
.bg-chip:hover { color: #f1edf8; border-color: #c9a8ff; }
.bg-chip.on { color: #f1edf8; border-color: #8f5bff; background: rgba(143, 91, 255, 0.25); }
.bg-sets-label { color: #a79fbd; font-size: 12.5px; }
.bg-scroll { flex: 1; min-height: 160px; overflow-y: auto; padding: 2px; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, 72px); gap: 8px; align-content: start; }
.bg-cell {
    position: relative; width: 72px; height: 80px; box-sizing: border-box; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px; padding: 4px 3px;
    border: 1.5px solid rgba(200, 185, 255, 0.18); border-radius: 12px; background: rgba(70, 58, 120, 0.32); touch-action: manipulation;
}
.bg-cell:not([data-code]) { background: rgba(10, 8, 20, 0.45); }
.bg-cell[data-kind="weapon"] { border-color: rgba(232, 160, 110, 0.55); }
.bg-cell[data-kind="armor"] { border-color: rgba(110, 160, 232, 0.55); }
.bg-cell[data-code] .bg-pic { filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.25)); }
.bg-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; line-height: 1.2; color: #cfc7ef; pointer-events: none; }
.bg-cell[data-code] { cursor: pointer; }
.bg-cell[data-code]:hover { border-color: #c9a8ff; }
.bg-cell.sel { border: 1.4px solid #e8c27a; }
.bg-worn { position: absolute; top: 3px; left: 6px; font-size: 13px; font-weight: 700; color: #7be38a; pointer-events: none; }
.bg-count { position: absolute; right: 6px; bottom: 18px; font-size: 10.5px; color: #f1edf8; pointer-events: none; }
.bg-new {
    position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: #ffd68c;
    box-shadow: 0 0 0 3px rgba(255, 180, 74, 0.35); pointer-events: none;
}
.bg-links { display: flex; flex-wrap: wrap; gap: 14px; }
.bg-link {
    padding: 0 0 1px; border: 0; border-bottom: 1px dotted #a79fbd; background: none; color: #a79fbd; font-size: 12px; cursor: pointer;
}
.bg-link:hover { color: #f1edf8; }
.bg-status { min-height: 16px; font-size: 12px; color: #a79fbd; }
/* Карточка вещи (05.10): панель внизу сумки (компьютер) / внизу экрана (телефон). */
.bg-card {
    position: absolute; z-index: 5; left: 330px; right: 0; bottom: 0; padding: 12px 16px 16px;
    border-top: 2px solid #6b5bc4; border-radius: 18px 18px 18px 0; background: #251e44;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45); font-size: 14px; line-height: 1.5;
}
.bg-card[hidden] { display: none; }
.bg-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.bg-card-head > div { flex: 1; min-width: 0; }
.bg-card-pic { flex: none; border: 2px solid rgba(201, 168, 255, 0.5); border-radius: 14px; background: rgba(70, 58, 120, 0.45); padding: 6px; }
.bg-card-close { flex: none; align-self: flex-start; }
.bg-card-title { font-size: 16px; font-weight: 700; }
.bg-card-dim { color: #a79fbd; font-size: 13px; }
.bg-card-plus { color: #7be38a; }
.bg-card-minus { color: #ff8a96; }
.bg-card-line { padding: 1px 0; }
.bg-card-buttons { display: flex; gap: 10px; margin-top: 10px; }
.bg-card-btn { flex: 1; padding: 10px; border-radius: 12px; font-size: 14px; cursor: pointer; border: 1px solid rgba(200, 185, 255, 0.25); background: none; color: #f1edf8; }
.bg-card-btn.main { background: #4a3c8c; border-color: #7a6bd0; }
.bg-card-btn.main:hover { background: #5a4aa8; }
.bg-card-btn.danger { color: #ff9aa8; border-color: #6b3c4c; }
.bg-card-btn.danger:hover { background: rgba(255, 90, 110, 0.12); }
/* Ячейки куклы (05.10): серый силуэт в пустой, «лев./пр.» у парных. */
.bg-slot-icon { width: 30px; height: 30px; fill: #c9bfee; opacity: 0.3; pointer-events: none; }
.bg-slot-side { position: absolute; bottom: 1px; left: 0; right: 0; text-align: center; font-size: 9px; color: #8f86b3; pointer-events: none; }
.bg-slot.worn .bg-slot-side { color: #e8c27a; }
/* Вкладки — только на узком экране; на широком «Снаряжение» и «Сумка» рядом. */
.bg-tabs, .bg-worn-strip { display: none; }
.bg-pages, .bg-track { display: contents; }
.bg-ghost { position: fixed; z-index: 400; pointer-events: none; opacity: 0.9; }
@media (max-width: 860px) {
    .bg-window { flex-direction: column; min-height: 0; }
    .bg-left { width: auto; border-right: 0; }
    .bg-doll { transform-origin: top center; }
    /* 05.10: одно окно одного размера; страницы лежат рядом и плавно листаются вбок. */
    .bg-window { height: min(92vh, 760px); height: min(92dvh, 760px); max-height: none; overflow: hidden; }
    .bg-tabs { position: relative; flex: none; display: flex; margin: 12px 54px 6px 12px; padding: 4px; border-radius: 14px; background: rgba(10, 8, 20, 0.6); }
    .bg-tabs::before {
        content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px;
        background: #4a3c8c; transition: transform 0.28s ease;
    }
    .bg-window.tab-bag .bg-tabs::before { transform: translateX(100%); }
    .bg-tab { position: relative; flex: 1; padding: 9px 6px; border: 0; border-radius: 10px; background: none; color: #a79fbd; font-size: 15px; cursor: pointer; transition: color 0.28s; }
    .bg-tab.on { color: #fff; }
    .bg-window .bg-title { display: none; }
    .bg-pages { display: block; flex: 1; min-height: 0; overflow: hidden; }
    .bg-track { display: flex; width: 100%; height: 100%; transition: transform 0.3s ease; }
    .bg-window.tab-bag .bg-track { transform: translateX(-100%); }
    .bg-left, .bg-right { flex: none; width: 100%; height: 100%; box-sizing: border-box; }
    .bg-left { overflow-y: auto; }
    .bg-right { overflow: hidden; padding-top: 6px; }
    .bg-grid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); }
    .bg-cell { width: auto; }
    .bg-worn-strip {
        display: flex; flex: none; align-items: center; gap: 6px; width: 100%; padding: 5px 10px; box-sizing: border-box;
        border: 1px solid rgba(232, 194, 122, 0.35); border-radius: 12px; background: rgba(60, 42, 18, 0.35); color: #e8c27a;
        font-size: 12.5px; cursor: pointer; text-align: left;
    }
    .bg-worn-label { margin-right: 2px; }
    .bg-worn-go { margin-left: auto; color: #a79fbd; }
    /* 01.11: плашка компактнее (не больше трети экрана), под ней сумка прокручивается — последние ряды не прячутся */
    .bg-card { position: fixed; left: 0; right: 0; bottom: 0; z-index: 300; border-radius: 22px 22px 0 0; padding: 8px 14px 14px;
        max-height: 34vh; max-height: 34dvh; overflow-y: auto; font-size: 13px; line-height: 1.35; }
    .bg-card-head { margin-bottom: 4px; }
    .bg-card-buttons { margin-top: 6px; }
    .bg-card-btn { padding: 8px; }
    .bag-modal.card-open .bg-scroll { padding-bottom: 34vh; padding-bottom: 34dvh; }
}
@media (max-width: 360px) { .bg-doll { transform: scale(0.88); height: 290px; } }

/* ---------------------------------------------------------------- Послания (board.js, 30.09) */
.letters-body { min-width: 0; flex: 1; }
.letters-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.letters-place {
    color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.letters-text {
    margin: 2px 0 0; color: var(--text); font-size: 13px; line-height: 1.35; transition: opacity 0.25s;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.letters-text.fading { opacity: 0; }
.letters-meta { margin-top: 1px; color: var(--faint, var(--muted)); font-size: 11px; min-height: 13px; }

.board-window { width: min(520px, 100%); }
.board-menu[hidden], .board-list[hidden], .board-form[hidden] { display: none; }
.board-menu { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.board-menu .bag-btn { padding: 12px 14px; font-size: 14px; }
.board-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.board-back { align-self: flex-start; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 0; }
.board-back:hover { color: var(--text); }
.note {
    position: relative; padding: 10px 12px 10px; border: 1px solid var(--line); border-radius: 10px;
    background: rgba(255, 255, 255, 0.04); opacity: var(--glow, 1);
}
.note.mine { border-color: rgba(170, 240, 200, 0.5); }
.note-text { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.note-meta { margin-top: 4px; font-size: 11px; color: var(--muted); }
.note-btn { margin-top: 8px; padding: 5px 12px; font-size: 12px; }
.board-form textarea {
    width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--line); border-radius: 10px;
    background: rgba(255, 255, 255, 0.05); color: var(--text); font: inherit; font-size: 14px; resize: vertical;
}
.board-count { margin-top: 4px; font-size: 11px; color: var(--muted); text-align: right; }
.board-count.over { color: #ff8a8a; }
.board-actions { display: flex; gap: 8px; margin-top: 8px; }
/* 15.11: поручения доски — три дела на день */
.board-errands[hidden] { display: none; }
.board-errand { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.board-errand.ready { border-color: rgba(140, 200, 120, .6); }
.board-errand.done { opacity: .6; }
.board-errand-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.board-errand-title { font-size: 14px; }
.board-errand-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.board-errand-bar > div { height: 100%; border-radius: 2px; background: #8cc878; }
.board-errand-meta, .board-errand-note { font-size: 12px; color: var(--muted); }
.board-errand-done { font-size: 13px; color: #8cc878; white-space: nowrap; }
.board-errand-theme { font-size: 15px; font-weight: 600; margin: 2px 0; }
.board-errand-week { margin-top: 6px; background: rgba(140, 200, 120, .07); }
.board-errand .bag-btn { min-height: 44px; padding: 8px 14px; }


/* Статус над головой пэта (30.09): нажали на игрока на карте — всплывает фраза, которую он задал в сумке. */
.map-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    z-index: 6;
    width: max-content;
    max-width: 200px;
    padding: 6px 11px;
    border: 1px solid rgba(201, 168, 255, 0.6);
    border-radius: 12px;
    background: rgba(20, 14, 34, 0.94);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    color: var(--text);
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
    pointer-events: none;
    animation: bubble-in 0.18s ease-out;
}
.map-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: rgba(201, 168, 255, 0.6);
}
@keyframes bubble-in {
    from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.9); }
    to { opacity: 1; transform: translateX(-50%); }
}

/* «Статус» в сумке (bag.js): под куклой с аватаром. */
.bg-status-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-height: 26px; }
.bg-status-text { flex: 1; min-width: 0; color: #a79fbd; font-size: 12.5px; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ---------------------------------------------------------------- три плашки (02.10, script.js) */
/* 02.10 (слово Архитектора): всё одинаково на всех версиях — и на телефоне, и на компьютере. */
.trio { min-width: 0; }
.tile-body { min-width: 0; flex: 1; }
.tile-text { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }

/* Ряд из трёх. Раскрытая растёт, сжатые — полоски у своих краёв; порядок не меняется. */
    .trio { display: flex; gap: 8px; }
    .trio > .tile {
        flex: 1 1 0px;
        height: 96px;
        min-height: 0;
        padding: 10px;
        gap: 10px;
        overflow: hidden;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: flex-grow 0.35s ease, flex-basis 0.35s ease, padding 0.35s ease, gap 0.35s ease;
    }
    .trio .panel-icon { flex: none; transition: opacity 0.25s, width 0.35s, height 0.35s, font-size 0.35s; }
    .trio:not(.has-open) .panel-icon,
    .trio > .tile.shut .panel-icon { width: 28px; height: 28px; font-size: 14px; }
    .trio .tile-body,
    .trio .letters-body { transition: opacity 0.25s; }

    /* Три равные: значок над названием, остальное прячется. */
    .trio:not(.has-open) > .tile { flex-direction: column; justify-content: center; gap: 4px; text-align: center; }
    .trio:not(.has-open) .tile-body,
    .trio:not(.has-open) .letters-body { flex: none; }
    .trio:not(.has-open) .panel-title { font-size: 13px; line-height: 1.15; }
    .trio:not(.has-open) .letters-place,
    .trio:not(.has-open) .letters-text,
    .trio:not(.has-open) .letters-meta,
    .trio:not(.has-open) .tile-text { display: none; }

    /* Раскрытая — вся ширина, что осталась от полосок. */
    .trio > .tile.open { cursor: default; }

    /* Полоска: узкая, виден только значок. */
    .trio > .tile.shut { flex: 0 0 30px; padding: 10px 0; gap: 0; justify-content: center; }
    .trio > .tile.shut .tile-body,
    .trio > .tile.shut .letters-body { opacity: 0; width: 0; flex: 0 0 0px; overflow: hidden; }
    .trio > .tile.shut .panel-icon { opacity: 0.8; }
@media (max-width: 640px) { .trio > .tile { height: 84px; } }

@media (prefers-reduced-motion: reduce) {
    .trio > .tile { transition: none; }
}


/* ---------------------------------------------------------------- действия на карте (02.10, script.js) */
.acts { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-top: 6px; min-width: 0; }
.acts-scroll { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden;
    padding: 5px 2px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #796b52 transparent; }
.acts-scroll::-webkit-scrollbar { height: 3px; }
.acts-scroll::-webkit-scrollbar-thumb { background: #796b52; border-radius: 4px; }
.acts-scroll > * { flex: 0 0 auto; }
.acts-extra:empty { display: none; }
.act {
    position: relative; flex: none; width: 36px; height: 36px; padding: 0;
    display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 50%;
    background: var(--glass-strong); cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.3s, opacity 0.3s;
}
.act svg { width: 20px; height: 20px; position: relative; }
.act .torch-stick { fill: #8a7a6a; }
.act .torch-flame { fill: #b49a6a; transition: fill 0.3s; }
.act .eye-lid { fill: none; stroke: #b8b0c8; stroke-width: 1.6; }
.act .eye-ball { fill: #b8b0c8; }
.act-eye.on { border-color: var(--violet); }
.act-eye.on .eye-lid { stroke: #d8c8ff; }
.act-eye.on .eye-ball { fill: #d8c8ff; }
/* Искать нечего — бледный. */
.act-torch.pale { opacity: 0.45; }
.act-torch.pale .torch-flame { fill: #6f6a80; }
/* Есть что искать — по контуру бежит лёгкое золотое свечение. */
.act-torch.glow .torch-flame { fill: #e0a850; }
.act-torch.glow::before {
    content: ""; position: absolute; inset: -1px; border-radius: 50%; padding: 2px;
    background: conic-gradient(from 0deg, transparent 0 65%, rgba(255, 210, 122, 0.25) 78%, #ffd27a 92%, transparent 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: act-run 2.4s linear infinite;
    pointer-events: none;
}
@keyframes act-run { to { transform: rotate(1turn); } }
/* Идёт поиск — горит, как на карте. */
.act-torch.lit { border-color: rgba(255, 170, 70, 0.7); box-shadow: 0 0 12px rgba(255, 150, 50, 0.5); }
.act-torch.lit .torch-flame { fill: #ffb24a; transform-origin: 12px 11px; animation: torch-flicker 1.4s ease-in-out infinite; }

.acts-extra { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; }
.acts-extra.scroll { overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.acts-extra.scroll::-webkit-scrollbar { display: none; }
.acts-note {
    color: var(--muted); font-size: 11.5px; line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    animation: acts-in 0.25s ease-out;
}
.act-chip {
    flex: none; height: 28px; padding: 0 9px;
    border: 1px solid var(--line); border-radius: 999px;
    background: rgba(255, 255, 255, 0.06); color: var(--text);
    font: inherit; font-size: 12px; cursor: pointer;
    animation: acts-in 0.25s ease-out;
}
.act-chip:active, .act-chip:hover { border-color: #ffb24a; color: #ffd28a; }
.act-view {
    flex: none; width: 30px; height: 30px; padding: 0;
    display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 50%;
    background: var(--glass-strong) center / 70% no-repeat;
    cursor: pointer; animation: acts-in 0.25s ease-out;
}
.act-view svg { width: 16px; height: 16px; }
.act-view .eye-lid { fill: none; stroke: #d8c8ff; stroke-width: 1.6; }
.act-view .eye-ball { fill: #d8c8ff; }
@keyframes acts-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Карта едет к осмотру; значок пару раз пульсирует. */
.map-layer.gliding { transition: transform 0.6s ease; }
.map-point.pulse-twice { animation: point-pulse 0.7s ease-in-out 2; }
/* «Перейти сюда» (13.10): значок места, куда встал пэт, — две вспышки за ~2 с,
   первая плавно нарастает, вторая плавно гаснет (свой значок, кружок или обычная точка — любая локация). */
.map-point.arrived { z-index: 5; }
.map-point.arrived .map-point-icon,
.map-point.arrived .map-point-mark {
    animation: point-arrived 2s ease-in-out var(--arrive-delay, 0s) 1 both;
}
@keyframes point-arrived {
    0%, 100% { scale: 1; filter: opacity(var(--icon-opacity, 1)) drop-shadow(0 0 0 rgba(255, 200, 90, 0)); }
    25% { scale: 1.35; filter: opacity(1) brightness(1.35) drop-shadow(0 0 12px rgba(255, 200, 90, 0.95)) drop-shadow(0 0 22px rgba(255, 170, 60, 0.7)); }
    50% { scale: 1.08; filter: opacity(1) brightness(1.1) drop-shadow(0 0 5px rgba(255, 200, 90, 0.5)); }
    72% { scale: 1.3; filter: opacity(1) brightness(1.3) drop-shadow(0 0 12px rgba(255, 200, 90, 0.9)) drop-shadow(0 0 20px rgba(255, 170, 60, 0.6)); }
}
@media (prefers-reduced-motion: reduce) {
    .map-point.arrived .map-point-icon, .map-point.arrived .map-point-mark {
        animation: none; filter: drop-shadow(0 0 12px rgba(255, 200, 90, 1));
    }
}
@keyframes point-pulse {
    0%, 100% { filter: none; scale: 1; }
    50% { filter: drop-shadow(0 0 10px rgba(255, 210, 122, 0.95)); scale: 1.35; }
}

/* Факел живёт в плашке, на карте его нет (везде). */
.search-panel { display: none !important; }
.trio:not(.has-open) .acts { display: none; }
/* Раскрытые «Действия»: кружки и есть содержимое — большой значок плашки не нужен. */
#tile-actions.open > .panel-icon { display: none; }
@media (prefers-reduced-motion: reduce) {
    .act-torch.glow::before, .act-torch.lit .torch-flame, .map-point.pulse-twice { animation: none; }
    .map-layer.gliding { transition: none; }
}

/* ---------------------------------------------------------------- оповещения и почта (02.10, mail.js) */
/* Значок плашки: есть новое — золотая точка со счётом. */
.panel-icon.has-news { position: relative; border-color: rgba(255, 190, 90, 0.7); }
.panel-icon.has-news::after {
    content: attr(data-count);
    position: absolute; top: -4px; right: -6px;
    min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
    border-radius: 999px; background: #e0a850; color: #1a1020;
    font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.news { display: flex; align-items: center; gap: 6px; margin-top: 6px; min-width: 0; }
.news-chip {
    flex: 1 1 0; min-width: 0; height: 36px; padding: 0 6px;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    border: 1px solid var(--line); border-radius: 12px;
    background: rgba(255, 255, 255, 0.04); color: var(--muted);
    font: inherit; font-size: 11.5px; cursor: pointer; white-space: nowrap; overflow: hidden;
    animation: acts-in 0.25s ease-out;
}
.news-chip b { color: var(--text); font-size: 14px; }
.news-chip.fresh { border-color: rgba(255, 190, 90, 0.6); color: #ffd28a; }
.news-chip.fresh b { color: #ffd28a; }
.trio:not(.has-open) .news { display: none; }
#tile-mail.open > .panel-icon { display: none; }

.mail-window { width: min(520px, 100%); }
.mail-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.mail-tab {
    flex: 1; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px;
    background: rgba(255, 255, 255, 0.04); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer;
}
.mail-tab.on { border-color: var(--violet); color: var(--text); }
.mail-tab i {
    margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #e0a850; color: #1a1020;
    font-style: normal; font-size: 11px; font-weight: 700;
}
.mail-body { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; }
.mail-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.mail-row-text { flex: 1; min-width: 0; }
.mail-row-title { font-size: 14px; }
.mail-row-meta { font-size: 11px; color: var(--muted); }
.mail-switch { display: flex; gap: 14px; }
.mail-switch-btn { border: 0; background: none; padding: 0 0 2px; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; border-bottom: 1px solid transparent; }
.mail-switch-btn.on { color: var(--text); border-bottom-color: var(--violet); }
.letter { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.03); cursor: pointer; }
.letter.unread { border-color: rgba(255, 190, 90, 0.6); }
.letter.unread .letter-head b::before { content: "● "; color: #e0a850; }
.letter-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.letter-head span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.letter-text {
    margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.letter.open .letter-text { display: block; color: var(--text); }
.mail-left { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 2px; }
.mail-to { font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* Голубь рядом со статусом чужого пэта на карте. */
.map-bubble.with-extra { overflow: visible; }
.map-pigeon {
    position: absolute; left: 100%; top: 50%; margin-left: 8px; transform: translateY(-50%);
    width: 32px; height: 32px; padding: 0; display: grid; place-items: center;
    border: 1px solid rgba(160, 200, 255, 0.6); border-radius: 50%;
    background: rgba(20, 14, 34, 0.94); cursor: pointer; pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.map-pigeon svg { width: 18px; height: 18px; fill: #cfe0ff; }
.map-pigeon:hover { border-color: #cfe0ff; }

/* Картинка вещи в находках (02.10, mail.js). */
.mail-row-pic {
    flex: none; width: 44px; height: 44px; display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
    background: rgba(255, 255, 255, 0.04) center / contain no-repeat;
}

@media (prefers-reduced-motion: reduce) { .bg-track, .bg-tabs::before { transition: none !important; } }

/* Пояс в сумке (12.10.2026): две ячейки над сеткой, когда пояс надет — как в пэте. */
.bg-belt { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-belt[hidden] { display: none; }
.bg-belt-slot { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; padding: 4px; border-radius: 14px; border: 1px solid transparent; }
.bg-belt-slot.fits { border-color: rgba(201, 168, 255, 0.5); }
.bg-belt-slot.hot { border: 2px solid #c9a8ff; box-shadow: 0 0 0 4px rgba(201, 168, 255, 0.3); }
.bg-belt-cell { flex: 0 0 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
                border: 1px solid rgba(200, 185, 255, 0.18); background: #0a0814; cursor: pointer; touch-action: manipulation; }
.bg-belt-slot.full .bg-belt-cell { border: 1.3px solid #e8c27a; background: linear-gradient(#3c2a12cc, #181008cc); }
.bg-belt-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bg-belt-name { font-size: 12.5px; font-weight: 600; color: #f1edf8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bg-belt-slot:not(.full) .bg-belt-name { font-weight: 400; color: #a79fbd; white-space: normal; }
.bg-belt-rule { display: flex; gap: 4px; align-items: center; }
.bg-step { min-width: 30px; padding-left: 0; padding-right: 0; text-align: center; }
.bg-belt-rule .bg-chip { white-space: nowrap; }
.bg-card-note { margin: 6px 0 2px; font-size: 13px; color: #e8c27a; }

/* ---------------------------------------------------------------- разговор (13.10, Д6, talk.js)
 * Окно-новелла: фон места, собеседник в позе реплики, плашка с текстом и ответами внизу.
 * Одно и то же на компьютере и телефоне — различается только раскладка. */

.talk {
    position: fixed;
    inset: 0;
    z-index: 150;
    animation: fade-in 0.35s ease;
    user-select: none;
}
.talk[hidden] { display: none; }

.talk-scene {
    position: absolute;
    inset: 0;
    background: var(--bg) center / cover no-repeat;
}
.talk-scene::after {          /* притемнение, к низу гуще — чтобы читался текст */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(8, 6, 14, 0.35) 0%, rgba(8, 6, 14, 0.45) 55%, rgba(8, 6, 14, 0.85) 100%);
}

.talk-figure {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 1;
    height: min(80vh, 760px);
    max-width: 86vw;
    object-fit: contain;
    object-position: bottom;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.35s ease;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
    pointer-events: none;
}
.talk-figure.shown { opacity: 1; }
.talk-figure[hidden] { display: none; }

/* Д8: пэт слева, собеседник справа; слушающий притушен (рассказчик — оба) */
.talk-figure.npc { left: auto; right: 4%; max-width: 46vw; transform: none; }
.talk-figure.pet { left: 4%; height: min(66vh, 620px); max-width: 40vw; transform: none; }
.talk-figure { transition: opacity 0.35s ease, filter 0.35s ease; }
.talk-figure.shown.listening {
    opacity: 0.7;
    filter: brightness(0.5) saturate(0.6) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
}

.talk-panel {
    position: absolute;
    left: 50%;
    bottom: 20px;
    z-index: 2;
    width: min(780px, calc(100% - 32px));
    max-height: 62vh;
    overflow-y: auto;
    padding: 16px 20px 18px;
    transform: translateX(-50%);
    border: 1px solid rgba(200, 185, 255, 0.24);
    border-radius: 18px;
    background: radial-gradient(ellipse at 50% 0%, rgba(36, 28, 62, 0.94), rgba(18, 13, 32, 0.96));
    box-shadow: 0 0 0 6px rgba(143, 91, 255, 0.1), 0 18px 54px rgba(0, 0, 0, 0.6);
    text-align: left;
}

.talk-leave {
    float: right;
    margin: -4px -6px 4px 12px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.talk-leave:hover { color: var(--text); border-color: var(--violet); }

/* «↑» — история разговора */
.talk-history-button {
    float: right;
    margin: -4px 0 4px 8px;
    padding: 4px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.talk-history-button[hidden] { display: none; }
.talk-history-button:hover, .talk-history-button.on { color: var(--text); border-color: var(--violet); }
.talk-history {
    clear: both;
    max-height: 34vh;
    overflow-y: auto;
    margin: 0 0 12px;
    padding: 8px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    font-size: 14px;
    line-height: 1.5;
    user-select: text;
}
.talk-history[hidden] { display: none; }
.talk-history-line { padding: 3px 0; color: #ddd4ea; white-space: pre-wrap; }
.talk-history-line b { color: var(--accent-hot); font-weight: 600; }
.talk-history-line.pet b { color: var(--violet); }
.talk-history-line.narrator { font-style: italic; color: var(--muted); }
.talk-history-line.choice { color: var(--violet); padding-left: 10px; }

.talk-name {
    margin-bottom: 6px;
    font-family: var(--title);
    font-size: 21px;
    font-weight: 700;
    color: var(--accent-hot);
}
.talk-name[hidden] { display: none; }
.talk.pet-speaks .talk-name { color: var(--violet); }

.talk-text {
    min-height: 2.8em;
    font-size: 16px;
    line-height: 1.55;
    white-space: pre-wrap;
    cursor: default;
}
.talk.narrator .talk-text { font-style: italic; color: #ddd4ea; }
.talk.shopping .talk-text { font-size: 14px; color: var(--muted); min-height: 0; }

.talk-error {
    margin-top: 8px;
    color: #ff9c8a;
    font-size: 13px;
}
.talk-error[hidden] { display: none; }

.talk-answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}
.talk-answers:empty { margin-top: 0; }

.talk-answer {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    animation: fade-in 0.3s ease both;
    transition: border-color 0.15s, background 0.15s;
}
.talk-answer:hover:not(:disabled) { border-color: var(--accent); background: rgba(224, 119, 47, 0.12); }
.talk-answer:disabled { cursor: default; }
.talk-answer.locked { color: var(--faint); border-style: dashed; }
.talk-answer.seen { color: var(--muted); opacity: 0.6; }                 /* «уже спрашивал» */
.talk-answer.seen:hover:not(:disabled) { opacity: 0.9; }
.talk-answer.back, .talk-answer.to-shop { color: var(--muted); font-size: 14px; }
.talk.busy .talk-answer, .talk.busy .talk-buy { opacity: 0.6; }

.talk-need {
    margin: 4px 2px 0;
    color: var(--faint);
    font-size: 12px;
}

.talk-shop-title {
    font-family: var(--title);
    font-size: 17px;
    font-weight: 700;
}
.talk-offer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}
.talk-offer-what { flex: 1; min-width: 0; }
.talk-offer-goods { font-size: 15px; font-weight: 600; }
.talk-offer-price { margin-top: 2px; color: var(--muted); font-size: 13px; }
.talk-offer-left { margin-top: 2px; color: var(--faint); font-size: 12px; }
.talk-offer.locked .talk-offer-goods { color: var(--muted); }
.talk-buy {
    flex: none;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.talk-buy:hover:not(:disabled) { background: var(--accent-hot); box-shadow: 0 0 14px var(--accent-glow); }
.talk-buy:disabled { background: rgba(255, 255, 255, 0.08); color: var(--faint); cursor: default; }

/* всплывашки «получено» — сверху по центру, над всем */
.talk-toasts {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: min(420px, calc(100% - 32px));
    transform: translateX(-50%);
    pointer-events: none;
}
.talk-toast {
    padding: 8px 16px;
    border: 1px solid rgba(240, 138, 63, 0.45);
    border-radius: 999px;
    background: var(--glass-strong);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    color: var(--text);
    font-size: 14px;
    text-align: center;
    animation: talk-toast-in 0.35s ease;
    transition: opacity 0.5s, transform 0.5s;
}
.talk-toast.gone { opacity: 0; transform: translateY(-8px); }
@keyframes talk-toast-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: none; }
}

/* «Летопись» — знания пэта */
.chronicle-modal {
    position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
    background: rgba(6, 4, 12, 0.66); backdrop-filter: blur(3px);
}
.chronicle-modal[hidden] { display: none; }
.chronicle-window {
    position: relative; width: min(560px, 100%); max-height: min(88vh, 720px); overflow-y: auto;
    padding: 18px 20px 20px; border: 1px solid rgba(200, 185, 255, 0.24); border-radius: 18px; text-align: left;
    background: radial-gradient(ellipse at 50% 0%, rgba(36, 28, 62, 0.97), rgba(18, 13, 32, 0.98));
    box-shadow: 0 0 0 6px rgba(143, 91, 255, 0.12), 0 18px 54px rgba(0, 0, 0, 0.65);
}
.chronicle-close {
    position: absolute; top: 12px; right: 14px; border: 0; background: none; color: var(--muted);
    font-size: 20px; line-height: 1; cursor: pointer;
}
.chronicle-close:hover { color: var(--text); }
.chronicle-title { margin: 0; font-family: var(--title); font-size: 22px; font-weight: 700; }
.chronicle-note { margin: 2px 0 12px; color: var(--muted); font-size: 13px; }
.chronicle-list { display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.chronicle-entry {
    padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255, 255, 255, 0.03);
}
.chronicle-entry h3 { margin: 0 0 4px; font-size: 15px; color: var(--text); }
.chronicle-entry p { margin: 0; font-size: 14px; line-height: 1.5; color: #ddd4ea; white-space: pre-wrap; }
.chronicle-when { margin-top: 6px; font-size: 12px; color: var(--faint); }
/* 16.10: схема знания в «Летописи» и показ крупно */
.chronicle-image {
    display: block; max-width: 100%; max-height: 240px; margin: 8px 0 0; border-radius: 8px;
    border: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.25); cursor: zoom-in; object-fit: contain;
}
.image-zoom {
    position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(5, 3, 8, 0.92); cursor: zoom-out;
}
.image-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }

/* собеседник на карте без своего значка — «☺» */
.map-point.npc .map-point-mark::after { content: "☺"; font-size: 15px; }

/* Самостоятельный разговор; свой значок из редактора остаётся без наложения символа. */
.map-point.dialog:not(.own-icon) .map-point-mark {
    border-color: rgba(250, 190, 230, 0.92);
    background: radial-gradient(circle, rgba(230, 130, 200, 0.78) 0 30%, rgba(200, 100, 170, 0.15) 60%, transparent 70%);
}
.map-point.dialog:not(.own-icon) .map-point-mark::after { content: "💬"; font-size: 13px; }

@media (max-width: 640px) {
    .talk-figure { height: 44vh; max-width: 100vw; bottom: 30vh; }     /* над плашкой: оба видны */
    .talk-figure.npc { right: 0; max-width: 52vw; }
    .talk-figure.pet { left: 0; height: 40vh; max-width: 48vw; }
    .talk-panel { bottom: 12px; width: calc(100% - 16px); max-height: 66vh; padding: 14px 14px 16px; }
    .talk-text { font-size: 15px; }
    .talk-answer { padding: 12px 14px; }          /* крупнее под палец */
    .talk-offer { flex-wrap: wrap; }
    .talk-buy { width: 100%; padding: 10px 16px; }
}

/* «Летопись»: вкладки «Задания» / «Знания» (13.10, Д9) */
.chronicle-tabs { display: flex; gap: 6px; margin: 10px 0 4px; }
.chronicle-tab {
    padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.04);
    color: var(--muted); font: inherit; font-size: 14px; cursor: pointer;
}
.chronicle-tab:hover { color: var(--text); }
.chronicle-tab.on { color: var(--text); border-color: var(--violet); background: rgba(143, 91, 255, 0.16); }
.chronicle-section { margin-top: 4px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.chronicle-entry.quest.done { opacity: 0.75; }
.quest-steps { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.quest-steps li { position: relative; padding-left: 22px; font-size: 14px; color: #ddd4ea; }
.quest-steps li::before { position: absolute; left: 0; top: 0; }
.quest-steps li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.25); }
.quest-steps li.done::before { content: "✔"; color: #7fd18b; }
.quest-steps li.now::before { content: "▸"; color: var(--accent-hot); }

/* ответ с броском (13.10, Д10): шанс справа на кнопке */
.talk-answer { display: flex; align-items: center; gap: 10px; }
.talk-chance {
    margin-left: auto; flex: none; padding: 2px 9px; border: 1px solid rgba(240, 138, 63, 0.4); border-radius: 999px;
    color: var(--accent-hot); font-size: 12px; white-space: nowrap;
}
.talk-answer.locked .talk-chance { color: var(--faint); border-color: var(--line); }

/* живой мир (13.10, Д13): фраза над головой собеседника на карте, отношение у имени */
.map-point-bark {
    position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
    max-width: 180px; width: max-content; padding: 4px 10px; border-radius: 12px;
    background: rgba(255, 250, 240, 0.94); color: #2a2238; font-size: 12px; line-height: 1.3; text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35); pointer-events: none; transition: opacity 0.25s ease;
    white-space: normal;
}
.map-point-bark::after {
    content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: rgba(255, 250, 240, 0.94);
}
.map-point-bark.swap { opacity: 0; }
.talk-attitude {
    margin-left: 10px; padding: 1px 8px; border-radius: 999px; vertical-align: middle;
    background: rgba(255, 120, 150, 0.14); color: #ff9db3; font-family: var(--body, inherit); font-size: 12px; font-weight: 600;
}
.talk-attitude.bad { background: rgba(140, 140, 160, 0.16); color: var(--muted); }
@media (max-width: 640px) { .map-point-bark { max-width: 130px; font-size: 11px; } }

/* Имя и кодовое слово — поля ответа внутри того же окна новеллы. */
.talk-identity { display: grid; gap: 10px; width: min(100%, 440px); }
.talk-identity label { display: grid; gap: 5px; }
.talk-identity input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 9px 12px; color: #eee9dd; background: #151618; border: 1px solid #82704a; border-radius: 5px; font: inherit; }
.talk-identity input:focus-visible { outline: 2px solid #d4b66b; outline-offset: 2px; }
.talk-identity-name { opacity: .75; }
.talk-recovery { display: block; padding: 12px; user-select: all; white-space: normal; overflow-wrap: anywhere; color: #f3e3ad; }

/* 16.10 (crowd.js): глубина — по линии ног; всплывшая фраза или статус — поверх всех фигур. */
.map-point:has(.map-bubble) { z-index: 100000 !important; }

/* Охота: общий серверный зверь; своё нажатие выбирает цель, не включает охоту. */
.map-hunt { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hunt-creature { position: absolute; height: auto; padding: 0; border: 0; background: transparent; line-height: 0; image-rendering: pixelated; transform: translate(-50%, -100%); pointer-events: none; user-select: none; }
.hunt-creature.pickable { pointer-events: auto; cursor: crosshair; }
.hunt-creature:focus { outline: none; }
.hunt-creature.selected::before, .hunt-creature:focus-visible::before {
    content: ""; position: absolute; left: -15%; bottom: -8%; width: 130%; height: 27%; pointer-events: none; z-index: -1;
    background: radial-gradient(ellipse, rgba(235, 55, 55, .5), rgba(175, 25, 25, .2) 45%, transparent 75%); filter: blur(3px);
}
.hunt-auto[aria-pressed="true"] { border-color: #b8b0c8; }
.hunt-creature > img { display: block; width: 100%; height: auto; image-rendering: inherit; }
.hunt-creature > img[hidden] { display: none; }
.hunt-creature.no-frames { width: 2.4%; aspect-ratio: 1; border-radius: 50%; background: #4e7034; }
.hunt-pile { position: absolute; height: auto; image-rendering: pixelated; transform: translate(-50%, -85%); pointer-events: none; user-select: none; }
.hunt-pile.no-frames { width: 2.6%; aspect-ratio: 2 / 1; border-radius: 50% 50% 40% 40%; background: #4e7034; }
.hunt-pile.take, .hunt-pile.ask { pointer-events: auto; cursor: pointer; }
.hunt-pile.take { filter: drop-shadow(0 0 6px rgba(255, 210, 122, 0.95)); animation: hunt-pile 1.6s ease-in-out infinite; }
.hunt-pile.ask { filter: drop-shadow(0 0 3px rgba(200, 200, 220, 0.6)); }
@keyframes hunt-pile { 0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 210, 122, 0.6)); } 50% { filter: drop-shadow(0 0 8px rgba(255, 210, 122, 1)); } }
.act-hunt svg, .act-quiet svg { stroke: #c9bfa8; }
.act-hunt.pale, .act-quiet.pale { opacity: 0.6; }
.act-hunt.lit { border-color: rgba(150, 210, 110, 0.75); box-shadow: 0 0 12px rgba(120, 200, 90, 0.5); }
.act-hunt.lit svg { stroke: #b8f08a; }
.act-quiet .bell-off { display: none; }
.act-quiet.lit { border-color: rgba(170, 160, 230, 0.75); box-shadow: 0 0 12px rgba(150, 140, 230, 0.5); }
.act-quiet.lit svg { stroke: #cfc6ff; }
.act-quiet.lit .bell-off { display: inline; }
.hunt-request .fight-btn.quiet { opacity: 0.8; }
.fight-invites.hunt-requests { z-index: 1002; }
/* 26.10 (О2г): охота без боя — дротик летит к комку; попал — комок сжимается; полоска здоровья — только стрелявшему. */
.hunt-dart { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.hunt-creature.hunt-squash { animation: hunt-squash 0.28s ease-out; }
@keyframes hunt-squash {   /* 01.11: только scale — translate занят положением на карте (mapPlace), иначе комок «исчезает» */
    0% { scale: 1 1; }
    30% { scale: 1.15 0.8; }
    65% { scale: 0.96 1.05; }
    100% { scale: 1 1; }
}
.hunt-hp { position: absolute; height: 5px; border-radius: 3px; pointer-events: none; overflow: hidden;
    background: rgba(20, 16, 12, 0.75); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55); }
.hunt-hp > span { display: block; height: 100%; background: linear-gradient(#c7e88a, #6f9e3a); transition: width 0.2s ease-out; }
@media (prefers-reduced-motion: reduce) { .hunt-pile.take { animation: none; } .hunt-creature.hunt-squash { animation: none; } }
.fight-fighter.creature .fight-figure { image-rendering: pixelated; object-fit: contain; }
/* О4: занятость чужого куста ничем не помечается; прозрачность — только личной фигурке хозяина. */
.map-point.bush:not(.own-icon) .map-point-mark { background: #233822; border-color: #779968; }
.map-point.bush:not(.own-icon) .map-point-mark::after { content: "♣"; color: #a9c48a; }
.map-point.member .map-figure { transition: opacity .45s ease; }
.map-point.member.bush-self .map-figure { opacity: .4; }
/* Куст — меню того же вида, что у всех точек (.point-menu ниже); здесь только своё. */
.bush-controls > span { max-width: 100%; text-align: center; opacity: .8; }
.bush-controls .point-menu-btn { white-space: normal; overflow-wrap: anywhere; }

/* 29.10 (М4): жители в бою (npcfight.js). Дерётся — фигура на карте прячется (его видно в бою);
   лежит — фигура на боку и тусклее, лежачего не трогают; встал — мирный: пометка над головой. */
.map-point.npc.npc-fighting { visibility: hidden; pointer-events: none; }
.map-point.npc.npc-down .map-point-icon,
.map-point.npc.npc-down canvas { transform: rotate(-82deg) translateX(-18%); transform-origin: 50% 85%; opacity: 0.8; }
.map-point.npc.npc-down:hover .map-point-icon { transform: rotate(-82deg) translateX(-18%); }
.npc-calm-mark {
    position: absolute; left: 50%; top: -6px; transform: translate(-50%, -100%);
    font-size: 16px; line-height: 1; pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
    animation: npc-calm-bob 2.4s ease-in-out infinite;
}
@keyframes npc-calm-bob { 50% { transform: translate(-50%, calc(-100% - 3px)); } }
.fight-fighter.npc-sprite .fight-figure { object-fit: contain; }

/* 29.10 (слово Архитектора): меню действий над точкой (pointmenu.js) — у всего, на что можно нажать.
   Появляется пружинкой снизу вверх от точки, кнопки — друг за другом; исчезает быстро и мягко. */
.point-menu {
    position: absolute; z-index: 1400; width: max-content; max-width: min(280px, calc(100% - 16px));
    box-sizing: border-box; display: grid; justify-items: center; gap: 5px; padding: 6px 8px 8px;
    border: 1px solid rgba(232, 194, 122, 0.42); border-radius: 14px;
    background: linear-gradient(180deg, rgba(40, 28, 40, 0.93), rgba(20, 14, 22, 0.95));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    color: #efe6d2; font: 12px var(--body);
    transform-origin: var(--tail, 50%) calc(100% + 8px);
    animation: point-menu-in 0.28s cubic-bezier(0.18, 1.25, 0.4, 1) both;
}
.point-menu.leaving { animation: point-menu-out 0.17s cubic-bezier(0.4, 0, 1, 1) both; }
@keyframes point-menu-in {
    from { opacity: 0; transform: translateY(10px) scale(0.78); filter: blur(3px); }
    to { opacity: 1; transform: none; filter: none; }
}
@keyframes point-menu-out { to { opacity: 0; transform: translateY(6px) scale(0.88); filter: blur(2px); } }
.point-menu-tail {
    position: absolute; left: var(--tail, 50%); bottom: -6px; width: 10px; height: 10px;
    transform: translateX(-50%) rotate(45deg); pointer-events: none;
    background: rgba(21, 15, 23, 0.97);
    border-right: 1px solid rgba(232, 194, 122, 0.42); border-bottom: 1px solid rgba(232, 194, 122, 0.42);
}
.point-menu-title {
    max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center;
    color: #f3dca6; font-weight: 600; letter-spacing: 0.02em;
    animation: point-menu-item 0.26s ease-out both; animation-delay: 40ms;
}
.point-menu-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.point-menu-btn {
    min-height: 30px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgba(232, 194, 122, 0.55);
    background: linear-gradient(180deg, rgba(76, 54, 40, 0.96), rgba(42, 28, 24, 0.96));
    color: #f6ecd8; font: 500 12px var(--body); white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 236, 190, 0.12), 0 2px 6px rgba(0, 0, 0, 0.45);
    animation: point-menu-item 0.3s cubic-bezier(0.2, 1.2, 0.4, 1) both;
    animation-delay: calc(70ms + var(--i, 0) * 50ms);
    transition: transform 0.12s ease, border-color 0.15s, box-shadow 0.15s, filter 0.15s;
    -webkit-tap-highlight-color: transparent;
}
@keyframes point-menu-item { from { opacity: 0; transform: translateY(6px) scale(0.88); } to { opacity: 1; transform: none; } }
.point-menu-btn:hover:not(:disabled) { border-color: #f1d08a; box-shadow: 0 0 10px rgba(241, 208, 138, 0.35), 0 2px 6px rgba(0, 0, 0, 0.45); transform: translateY(-1px); }
.point-menu-btn:active:not(:disabled) { transform: scale(0.94); }
.point-menu-btn:focus-visible { outline: 2px solid #f1d08a; outline-offset: 2px; }
.point-menu-btn:disabled { opacity: 0.45 !important; filter: grayscale(0.6); cursor: default; }
.point-menu-btn.tone-danger { border-color: rgba(232, 112, 92, 0.75); background: linear-gradient(180deg, rgba(118, 38, 28, 0.96), rgba(66, 20, 18, 0.96)); }
.point-menu-btn.tone-danger:hover:not(:disabled) { border-color: #ff9a80; box-shadow: 0 0 10px rgba(255, 120, 90, 0.4), 0 2px 6px rgba(0, 0, 0, 0.45); }
.point-menu-btn.tone-go { border-color: rgba(150, 205, 150, 0.6); }
/* точка, над которой открыто меню, — мягко подсвечена */
.map-point.menu-open .map-point-icon, .map-point.menu-open .map-point-mark {
    filter: opacity(var(--icon-opacity, 1)) drop-shadow(0 0 7px rgba(243, 220, 166, 0.85)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}
.hunt-creature.menu-open, .hunt-pile.menu-open { filter: drop-shadow(0 0 7px rgba(243, 220, 166, 0.9)); }
@media (prefers-reduced-motion: reduce) {
    .point-menu, .point-menu.leaving, .point-menu-btn, .point-menu-title { animation-duration: 1ms; animation-delay: 0ms; }
}

/* ===== 29.10: листы классики (sheets.js) ===== */
.map-sheets { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.map-sheet {
    position: absolute; width: 26px; height: 30px; margin: 0; padding: 0; border: 0; background: transparent;
    transform: translate(-50%, -60%) rotate(var(--tilt, 0deg)); pointer-events: auto; cursor: pointer;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}
.map-sheet img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.map-sheet:focus { outline: none; }
.map-sheet:focus-visible { outline: 2px solid rgba(255, 224, 150, 0.8); outline-offset: 2px; border-radius: 6px; }
.map-sheet.kept { filter: drop-shadow(0 0 4px rgba(255, 214, 120, 0.95)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }
.map-sheet.done img { filter: saturate(0.6) brightness(0.9); }

.sheet-reader {
    position: fixed; z-index: 140; top: 84px; right: 24px; width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 120px); display: flex; flex-direction: column; box-sizing: border-box;
    border-radius: 16px; border: 1px solid rgba(160, 120, 70, 0.45);
    background: linear-gradient(170deg, rgba(251, 244, 226, 0.97), rgba(236, 222, 190, 0.97));
    color: #2b2116; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    font: 14px var(--body);
    transform-origin: 70% 0;
    animation: sheet-reader-in 0.38s cubic-bezier(0.18, 1.2, 0.4, 1) both;
}
.sheet-reader.leaving { animation: sheet-reader-out 0.2s cubic-bezier(0.4, 0, 1, 1) both; pointer-events: none; }
.sheet-reader.dragging { animation: none; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
@keyframes sheet-reader-in { from { opacity: 0; transform: translateY(-10px) scale(0.92) rotate(-1deg); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes sheet-reader-out { to { opacity: 0; transform: translateY(-6px) scale(0.95); filter: blur(2px); } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; cursor: grab; user-select: none; border-bottom: 1px solid rgba(120, 90, 50, 0.22); }
.sheet-reader.dragging .sheet-head { cursor: grabbing; }
.sheet-author { font: 700 17px var(--title); letter-spacing: 0.02em; }
.sheet-work { font: italic 15px var(--title); opacity: 0.8; }
.sheet-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(90, 60, 30, 0.1); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.sheet-close:hover { background: rgba(90, 60, 30, 0.2); transform: rotate(90deg); }
.sheet-body { overflow-y: auto; padding: 12px 18px; overscroll-behavior: contain; }
.sheet-text { font: 18px/1.5 var(--title); white-space: normal; text-align: left; hyphens: auto; }
.sheet-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 16px 12px; border-top: 1px solid rgba(120, 90, 50, 0.22); }
.sheet-foot:empty { display: none; }
.sheet-score { margin-right: auto; font-size: 13px; opacity: 0.85; }
.sheet-btn { border: 1px solid rgba(120, 85, 40, 0.5); border-radius: 999px; padding: 8px 14px; background: transparent; color: inherit; font: 600 13px var(--body); cursor: pointer; transition: transform 0.15s, background 0.15s, opacity 0.15s; }
.sheet-btn:hover:not([disabled]) { transform: translateY(-1px); background: rgba(120, 85, 40, 0.1); }
.sheet-btn.primary { background: #6b4320; border-color: #6b4320; color: #fbf3df; }
.sheet-btn.primary:hover:not([disabled]) { background: #7d5229; }
.sheet-btn[disabled] { opacity: 0.45; cursor: default; }
.sheet-wind { padding: 0 16px 10px; font-size: 12px; opacity: 0.65; text-align: right; }
.sheet-quiz { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.sheet-quiz p { margin: 0 0 6px; font-weight: 600; }
.sheet-options { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-option { border: 1px solid rgba(120, 85, 40, 0.4); border-radius: 10px; padding: 7px 11px; background: rgba(255, 255, 255, 0.45); color: inherit; font: 13px var(--body); cursor: pointer; transition: background 0.15s, transform 0.12s, border-color 0.15s; animation: sheet-pop 0.3s ease both; }
.sheet-quiz li:nth-child(2) .sheet-option { animation-delay: 0.05s; }
.sheet-quiz li:nth-child(3) .sheet-option { animation-delay: 0.1s; }
button.sheet-option:hover { transform: translateY(-1px); border-color: #6b4320; }
.sheet-option.picked { background: #6b4320; border-color: #6b4320; color: #fbf3df; }
.sheet-option.right { background: #3f7a3a; border-color: #3f7a3a; color: #fff; }
.sheet-option.wrong { background: #9a3b2e; border-color: #9a3b2e; color: #fff; text-decoration: line-through; }
@keyframes sheet-pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Телефон: как беседа — текст снизу поверх карты, карта и пэт видны под буквами. */
@media (max-width: 700px) {
    .sheet-reader {
        top: auto; right: 8px; left: 8px; bottom: 8px; width: auto; max-height: 58vh;
        background: linear-gradient(180deg, rgba(20, 14, 22, 0.42), rgba(16, 11, 18, 0.7));
        -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
        border-color: rgba(232, 194, 122, 0.4); color: #f3ead6;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
        transform-origin: 50% 100%;
        animation-name: sheet-reader-up;
    }
    @keyframes sheet-reader-up { from { opacity: 0; transform: translateY(24px) scale(0.97); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
    .sheet-head { cursor: default; border-color: rgba(232, 194, 122, 0.2); }
    .sheet-foot { border-color: rgba(232, 194, 122, 0.2); }
    .sheet-close { background: rgba(255, 255, 255, 0.12); }
    .sheet-text { font-size: 18px; }
    .sheet-btn { border-color: rgba(232, 194, 122, 0.5); }
    .sheet-btn.primary { background: #c99a52; border-color: #c99a52; color: #20150c; text-shadow: none; }
    .sheet-option { background: rgba(255, 255, 255, 0.1); border-color: rgba(232, 194, 122, 0.4); }
    .sheet-option.picked { background: #c99a52; border-color: #c99a52; color: #20150c; text-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sheet-reader, .sheet-option { animation: none !important; }
}

/* 30.10 (слово Архитектора): житель, что ходит, разворачивается сразу, как пэт — без анимации разворота */
.map-point.npc.npc-walking .map-point-icon, .map-point.npc.npc-walking canvas,
.map-point.npc.npc-returning .map-point-icon, .map-point.npc.npc-returning canvas { transition: none !important; }
.map-point.npc.npc-walking:hover .map-point-icon { transform: none; }

/* 01.11: меню действий над точкой на осмотре — поверх арта, в рамке осмотра */
.lightbox-frame > .point-menu { z-index: 20; line-height: normal; }

/* 02.11: пометка в паспорте пэта, который охотится без игрока */
.member-card-offline { margin: 4px 0 0; padding: 3px 8px; border-radius: 8px; font-size: 12px; color: #c9bfee; background: rgba(150, 140, 230, 0.14); }
.member-card-offline[hidden] { display: none; }
.map-point.member-offline .map-figure { opacity: 0.92; }

/* 15.11: журнал пэта и «Пока тебя не было» (mail.js) */
.journal-row { align-items: flex-start; }
.journal-row.away { border-color: rgba(255, 190, 90, 0.45); }
.journal-icon { flex: 0 0 22px; text-align: center; font-size: 15px; line-height: 20px; color: var(--violet); }
.journal-text { font-size: 12.5px; line-height: 1.35; color: var(--text); opacity: 0.85; overflow-wrap: anywhere; }
.journal-more { align-self: center; }
.away-window { width: min(440px, 100%); }
.away-window .mail-body { max-height: 52vh; }
.away-window .board-actions { margin-top: 10px; }

/* Касание места — пэт идёт туда (16.11, walkto.js): кольцо цели на карте. */
.walk-target {
    position: absolute; z-index: 2; width: 34px; height: 17px; margin: -8px 0 0 -17px;
    border: 2px solid #f6dfae; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 12px rgba(246, 223, 174, 0.8), inset 0 0 8px rgba(246, 223, 174, 0.5);
    animation: walk-target-in 0.35s ease-out, walk-target-pulse 1.4s ease-in-out 0.35s infinite;
}
.walk-target.leaving { opacity: 0; transition: opacity 0.3s; }
@keyframes walk-target-in { from { transform: scale(1.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes walk-target-pulse { 50% { transform: scale(0.82); } }
@media (prefers-reduced-motion: reduce) { .walk-target { animation: none; } }
/* Подсказка новичку: «Нажми на землю — пэт пойдёт туда» (16.11, walkto.js). */
.walk-hint {
    position: absolute; z-index: 5; left: 50%; top: 18%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); box-sizing: border-box;
    padding: 8px 8px 8px 16px; border: 1px solid rgba(212, 168, 87, 0.6); border-radius: 999px;
    background: rgba(14, 10, 18, 0.92); color: #f6dfae; font-size: 14px; font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); animation: walk-hint-in 0.4s ease-out;
}
.walk-hint button { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #c9bfd6; cursor: pointer; }
.walk-hint.leaving { opacity: 0; transition: opacity 0.3s; }
@keyframes walk-hint-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .walk-hint { animation: none; } }
/* 16.11: меню точки под ней (сверху нет места) — хвостик смотрит вверх. */
.point-menu.below { transform-origin: var(--tail, 50%) -8px; }
.point-menu.below .point-menu-tail { bottom: auto; top: -6px; transform: translateX(-50%) rotate(225deg); }
/* 16.11: цифры в именах — обычные (в Cormorant «1» похожа на «ı»: «тэстер1» читалось «тэстерı»). */
.live-pet-name, .map-point-label, .point-menu-title, h1.place-title, .talk-name, .chronicle-title { font-variant-numeric: lining-nums; }
/* «Летопись»: строка «Путь» и вкладка «Собрание» (16.11) */
.chronicle-path { margin: 2px 0 8px; color: #f3dca6; font-size: 14px; line-height: 1.4; }
.chronicle-path[hidden] { display: none; }
.collection-row { display: flex; flex-direction: column; gap: 5px; padding: 6px 0; }
.collection-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--text); }
.collection-count { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.collection-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.collection-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--gold); }
/* 16.11: Путь в плашке пэта */
.pet-path { margin-top: 2px; color: #e8c27a; font-size: 12px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pet-path[hidden], .pet-panel.cat-side .pet-path { display: none; }
