* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --vh: 100vh; --st: 0px; --sb: 0px; --sl: 0px; --sr: 0px;
  --top: max(var(--st), env(safe-area-inset-top, 0px)); --bot: max(var(--sb), env(safe-area-inset-bottom, 0px));
  --glass1: rgba(64, 120, 186, .88); --glass2: rgba(30, 64, 118, .92); --rim: rgba(170, 215, 255, .55);
  --ink: #fff; --ink2: #d6e8ff; --ink3: #9fc6f0; --accent: #7dff9b; --gold: #ffd36b;
  --bg: radial-gradient(120% 70% at 50% 45%, #3a5f86 0%, #1d3350 55%, #0f1b2d 100%);
  --sheet: linear-gradient(180deg, #284f8c, #142c55);
  --cardbg: linear-gradient(180deg, #f6f1e6, #e3d8c4); --cardink: #2a2116;
}
body.light {
  --glass1: rgba(255, 255, 255, .92); --glass2: rgba(226, 238, 252, .94); --rim: rgba(90, 140, 210, .45);
  --ink: #15243a; --ink2: #3b5576; --ink3: #5b7699; --accent: #1f9e44; --gold: #b07a00;
  --bg: radial-gradient(120% 70% at 50% 45%, #cfe6ff 0%, #9cc3ea 55%, #6c97c4 100%);
  --sheet: linear-gradient(180deg, #fafcff, #e4eefa);
}
html, body { width: 100%; height: var(--vh); overflow: hidden; font-family: -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans", sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; overscroll-behavior: none; touch-action: none; }
body { background: var(--bg); position: relative; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
#tags { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.glass { background: linear-gradient(180deg, var(--glass1), var(--glass2)); border: 1.5px solid var(--rim); box-shadow: 0 6px 18px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .35); border-radius: 18px; }

.hud { position: absolute; top: calc(var(--top) + 10px); left: calc(var(--sl) + 10px); right: calc(var(--sr) + 10px); display: flex; gap: 10px; align-items: center; padding: 7px 10px 7px 7px; z-index: 6; }
.ava.pf { padding: 0; background: #dfe8f3; position: relative; overflow: visible; }
.ava.pf .pfp { width: 100%; height: 100%; }
.ava.pf i { position: absolute; right: -6px; bottom: -5px; font-style: normal; font-size: 13px; width: 21px; height: 21px; border-radius: 50%; background: #ffe58a; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.ava { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #ffd9b8, #c98d6a); border: 2.5px solid #7dff9b; box-shadow: 0 0 0 3px rgba(60, 220, 110, .3); flex: none; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #5a3320; }
.who { flex: 1; min-width: 0; }
.who h1 { font-size: 16.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who p { font-size: 12px; color: var(--ink2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.money { background: rgba(10, 30, 60, .35); border-radius: 12px; padding: 5px 9px; font-weight: 800; font-size: 14px; border: 1px solid var(--rim); white-space: nowrap; }
body.light .money { background: rgba(255, 255, 255, .7); }

.chips { position: absolute; top: calc(var(--top) + 70px); left: 0; right: 0; display: flex; gap: 5px; padding: 0 10px; z-index: 5; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 10px; border-radius: 14px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: rgba(16, 34, 62, .8); color: #fff; border: 1px solid rgba(170, 215, 255, .4); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
body.light .chip { background: rgba(255, 255, 255, .88); color: #1d3350; }
.chip.on { background: linear-gradient(180deg, #8dff9f, #26b545); color: #0b3316; border-color: #c9ffd5; }
.chip.lk { opacity: .8; }

.tag { position: absolute; transform: translate(-50%, -50%); background: rgba(255, 255, 255, .85); color: #1d3350; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 9px; white-space: nowrap; }
.tag.lock { background: rgba(10, 18, 32, .9); color: #fff; border: 1.5px solid #ffd36b; font-size: 13px; padding: 6px 11px; text-align: center; line-height: 1.3; pointer-events: auto; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.tag.lock b { display: block; font-size: 13.5px; }
.tag.ghost { background: rgba(255, 255, 255, .55); color: #1d3350; border: 1.5px dashed rgba(29, 51, 80, .55); padding: 4px 9px; text-align: center; line-height: 1.15; pointer-events: auto; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.tag.ghost b { display: block; font-size: 13px; }
.tag.ghost em { display: block; font-style: normal; font-weight: 600; font-size: 9.5px; opacity: .8; }
.tag.lock em { display: block; font-style: normal; font-weight: 800; color: #ffd36b; font-size: 12.5px; }

.camctl { position: absolute; right: calc(var(--sr) + 10px); top: calc(var(--top) + 116px); display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.camctl button { width: 36px; height: 36px; border-radius: 50%; font-size: 17px; display: grid; place-items: center; background: rgba(16, 34, 62, .7); color: #fff; border: 1px solid rgba(170, 215, 255, .4); }
body.light .camctl button { background: rgba(255, 255, 255, .85); color: #1d3350; }

.dock { position: absolute; left: 8px; right: 8px; bottom: calc(8px + var(--bot)); height: 64px; display: flex; gap: 5px; padding: 6px; z-index: 8; border-radius: 20px; }
.dock button { flex: 1; border-radius: 14px; background: rgba(255, 255, 255, .1); font-size: 11.5px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.dock button .i { font-size: 21px; line-height: 1; }
.dock button.on { background: linear-gradient(180deg, #8dff9f, #26b545); color: #0b3316; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }

.panel { position: absolute; left: 10px; right: 10px; bottom: calc(80px + var(--bot)); padding: 9px 12px 10px; z-index: 5; }
.panel h2 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--ink2); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; }
.panel h2 b { color: var(--accent); letter-spacing: 0; text-transform: none; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.bar { font-size: 12px; }
.bar i { display: block; height: 8px; border-radius: 5px; background: rgba(0, 0, 0, .3); margin-top: 3px; overflow: hidden; }
.bar i s { display: block; height: 100%; border-radius: 5px; background: linear-gradient(180deg, #9dff8a, #2fbf3f); }
.feed { font-size: 12px; margin-top: 7px; line-height: 1.4; color: var(--ink2); }
.feed b { color: var(--gold); }
.row { display: flex; gap: 8px; margin-top: 8px; }
.btn { flex: 1; border-radius: 12px; padding: 9px 10px; font-weight: 800; font-size: 13.5px; color: #0b3316; background: linear-gradient(180deg, #8dff9f, #26b545); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 5px rgba(0, 0, 0, .25); white-space: nowrap; }
.btn.sec { background: rgba(255, 255, 255, .16); color: var(--ink); box-shadow: none; border: 1px solid var(--rim); }
.btn.warn { background: linear-gradient(180deg, #ffe58a, #e3a82b); color: #3b2600; }
.btn.red { background: linear-gradient(180deg, #ff9a8a, #d8452f); color: #fff; }
.btn:disabled { opacity: .45; }

.buildbar { position: absolute; top: calc(var(--top) + 10px); left: calc(var(--sl) + 10px); right: calc(var(--sr) + 10px); padding: 8px 12px; z-index: 6; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.buildbar h1 { font-size: 15.5px; font-weight: 800; }
.buildbar p { font-size: 11.5px; color: var(--ink2); }
.tools { position: absolute; display: flex; gap: 6px; transform: translate(-50%, -100%); z-index: 7; }
.tools button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: linear-gradient(180deg, #5a9ae0, #2a5ea8); border: 1.5px solid #bfe0ff; box-shadow: 0 3px 8px rgba(0, 0, 0, .4); color: #fff; }
.tools button.del { background: linear-gradient(180deg, #ff8a7a, #c8382a); border-color: #ffd0c8; }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; border-radius: 22px 22px 0 0; padding: 8px 10px calc(84px + var(--bot)); background: var(--sheet); border-top: 1.5px solid var(--rim); box-shadow: 0 -6px 20px rgba(0, 0, 0, .3); display: flex; flex-direction: column; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .4); margin: 0 auto 7px; }
body.light .sheet .grab { background: rgba(0, 0, 0, .2); }
.sheet.mini .body { display: none; }
.tabs { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 8px; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .13); font-size: 12.5px; font-weight: 700; white-space: nowrap; flex: none; }
body.light .tabs button { background: rgba(30, 60, 110, .08); }
.tabs button.on { background: #fff; color: #1d3f72; }
body.light .tabs button.on { background: #2a5ea8; color: #fff; }
.body { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; flex: 1; min-height: 0; }
.sheet.full { top: 0; border-radius: 0; padding-top: calc(var(--top) + 12px); }
.sheet.auto { max-height: 58%; padding-bottom: calc(80px + var(--bot)); }
.sheet.auto .body { flex: initial; }
.sheet.half { height: 42%; }
.sheet .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex: none; }
.sheet .head h1 { font-size: 18px; font-weight: 800; }
.sheet .head .bal { font-size: 13px; font-weight: 800; color: var(--ink2); }
.empty { text-align: center; color: var(--ink2); font-size: 13.5px; padding: 26px 12px; line-height: 1.5; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; padding-bottom: 6px; }
.card { background: var(--cardbg); border-radius: 14px; color: var(--cardink); padding: 5px 6px 6px; position: relative; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); border: 2.5px solid #cfd6de; text-align: left; }
.card img { width: 100%; height: 62px; object-fit: contain; display: block; }
.card .n { font-size: 11.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.card .p { font-size: 12px; font-weight: 800; color: #6b4a12; display: flex; align-items: center; gap: 4px; }
.card .sw { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); flex: none; background-size: cover; }
.card .st { position: absolute; top: 4px; right: 5px; font-size: 13px; }
.card .cnt { position: absolute; top: 4px; left: 5px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .6); color: #fff; padding: 1px 6px; border-radius: 8px; }
.r-common { border-color: #cfd6de; }
.r-good { border-color: #4f9dff; box-shadow: 0 0 0 1px #4f9dff55, 0 2px 6px rgba(0, 0, 0, .25); }
.r-rare { border-color: #b36bff; box-shadow: 0 0 8px #b36bff88; }
.r-unique { border-color: #ffc93c; box-shadow: 0 0 10px #ffc93caa; background: linear-gradient(180deg, #fff7dc, #f1dca0); }
.r-legendary { border-color: #ff7a3c; box-shadow: 0 0 10px #ff7a3caa; }
.prog { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .18); overflow: hidden; margin-top: 3px; }
.prog s { display: block; height: 100%; background: linear-gradient(90deg, #ffe58a, #2fbf3f); }

.list .li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .08); margin-bottom: 6px; }
body.light .list .li { background: rgba(30, 60, 110, .06); }
.li .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 800; flex: none; background: radial-gradient(circle at 50% 35%, #ffd9b8, #c98d6a); color: #5a3320; }
.li .tx { flex: 1; min-width: 0; }
.li .tx b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .tx span { font-size: 12px; color: var(--ink2); }
.li .btn { flex: none; padding: 7px 11px; font-size: 12.5px; }

.detail { display: flex; flex-direction: column; gap: 8px; }
.detail .pv { display: flex; gap: 10px; align-items: center; }
.detail canvas { width: 150px; height: 150px; flex: none; border-radius: 14px; background: radial-gradient(circle, rgba(255, 255, 255, .25), rgba(255, 255, 255, .05)); }
.detail h2 { font-size: 17px; font-weight: 800; }
.detail .meta { font-size: 12.5px; color: var(--ink2); line-height: 1.45; }
.detail .lore { font-style: italic; font-size: 12.5px; color: var(--ink2); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.acts .btn { white-space: normal; line-height: 1.15; font-size: 13px; }
.paints { display: flex; gap: 7px; flex-wrap: wrap; }
.can { width: 46px; height: 54px; border-radius: 8px 8px 10px 10px; border: 2px solid rgba(255, 255, 255, .6); position: relative; box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .18), 0 2px 5px rgba(0, 0, 0, .3); background-size: cover; flex: none; }
.can.on { outline: 3px solid #4dff88; }
.can i { position: absolute; bottom: -2px; right: -4px; font-style: normal; font-size: 10.5px; font-weight: 800; background: rgba(0, 0, 0, .7); color: #fff; border-radius: 7px; padding: 0 5px; }
.can.rare::after { content: "✨"; position: absolute; top: -6px; left: -5px; font-size: 12px; }
.lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink3); margin: 6px 0 4px; }
input.price { width: 100%; padding: 9px 11px; border-radius: 11px; border: 1.5px solid var(--rim); background: rgba(255, 255, 255, .9); color: #1d3350; font: inherit; font-size: 15px; font-weight: 700; }
.seg { display: flex; gap: 5px; }
.seg button { flex: 1; padding: 7px 4px; border-radius: 10px; background: rgba(255, 255, 255, .13); font-size: 12.5px; font-weight: 700; }
.seg button.on { background: #fff; color: #1d3f72; }
body.light .seg button { background: rgba(30, 60, 110, .08); }
body.light .seg button.on { background: #2a5ea8; color: #fff; }

#toast { position: absolute; left: 50%; top: calc(var(--top) + 118px); transform: translateX(-50%); z-index: 60; padding: 9px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 700; max-width: 92%; text-align: center; background: rgba(10, 20, 36, .92); color: #fff; border: 1px solid rgba(170, 215, 255, .4); opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }
#toast.err { border-color: #ff9a8a; }

#modal { position: absolute; inset: 0; z-index: 40; background: rgba(5, 10, 20, .78); display: none; align-items: center; justify-content: center; padding: calc(var(--top) + 12px) 18px calc(var(--bot) + 18px); }
#modal.show { display: flex; }
#modal .box { width: 100%; max-width: 420px; padding: 12px; border-radius: 20px; text-align: center; }
#modal img, #modal video { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; background: #000; }
#modal audio { width: 100%; margin: 14px 0; }
#modal h2 { font-size: 17px; margin: 9px 0 2px; }
#modal p { font-size: 12.5px; color: var(--ink2); }
#modal .frame { padding: 8px; border-radius: 10px; }
#modal .frame.simple { background: #f2efe8; }
#modal .frame.carved { background: linear-gradient(135deg, #6b4428, #3a2412); }
#modal .frame.gold, #modal .frame.gold-lit { background: linear-gradient(135deg, #f6dc7a, #b8862c, #f6dc7a); }
#modal .frame.gold-lit { box-shadow: 0 0 26px #ffd36b; }
#modal .noise { position: relative; }
#modal .noise::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 3px); mix-blend-mode: screen; animation: rb .25s steps(3) infinite; border-radius: 12px; }
@keyframes rb { 0% { background-position: 0 0 } 100% { background-position: 0 6px } }

#loading { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--bg); font-weight: 700; font-size: 15px; text-align: center; padding: 30px; line-height: 1.45; }
#loading .pb { font-size: 46px; animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotateY(360deg) } }
.hide { display: none !important; }

/* лист выбранной картины */
.arthead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.arthead .x { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .16); font-size: 15px; flex: none; }
.detail .seg button { padding: 8px 4px; }
.seg.rooms { flex-wrap: wrap; }

.paints.frames { flex-wrap: nowrap; overflow-x: auto; padding: 3px 2px 6px; scrollbar-width: none; }
.paints.frames::-webkit-scrollbar { display: none; }
.paints.frames .can { width: 30px; height: 30px; border-radius: 50%; }
.artsheet { gap: 7px; }
.artsheet h2 { font-size: 16px; }
.artsheet .meta { font-size: 12px; }
.artsheet .row { margin-top: 0; }
.seg.rooms button { flex: 1 1 22%; white-space: nowrap; }
.sheet.build { max-height: 42%; min-height: 30%; }
/* «Вся хата» всегда видна, даже когда лента чипсов прокручена к ванной */
.chips { padding-left: 0; }
.chips .chip[data-room=""] { position: sticky; left: 0; margin-left: 10px; z-index: 1; box-shadow: 4px 0 8px rgba(0, 0, 0, .35); }
.chips .chip[data-room=""]:not(.on) { background: rgb(16, 34, 62); }
body.light .chips .chip[data-room=""]:not(.on) { background: #fff; }
/* «Коллекция»: силуэты невыпавшего, сундук за 💩 (22.11.2026 — вещи только выпадают) */
.chest { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(255, 201, 60, .28), rgba(255, 140, 40, .16)); border: 1.5px solid rgba(255, 201, 60, .6); }
.chest .ico { font-size: 30px; line-height: 1; }
.chest .tx { flex: 1; min-width: 0; }
.chest .tx b { display: block; font-size: 15px; }
.chest .tx span { font-size: 12px; color: var(--ink2); }
.chest .btn { flex: none; padding: 8px 12px; font-size: 13.5px; }
.chest .btn:disabled { opacity: .45; }
.card.ghost { background: #c9ced6; }
.card.ghost img { filter: brightness(0) opacity(.28); }
.card.ghost .n { color: #5b6470; }
.card.half img { filter: grayscale(1) opacity(.6); }
.card .p.small { font-size: 10.5px; font-weight: 700; line-height: 1.2; white-space: normal; }
.card.ghost .p.small { color: #4b5563; }
.chest-open img.big { width: 128px; height: 128px; object-fit: contain; border-radius: 16px; border: 3px solid #cfd6de; background: var(--cardbg); flex: none; }
.chest-open img.big.r-good { border-color: #4f8ff7; } .chest-open img.big.r-rare { border-color: #a259ff; }
.chest-open img.big.r-unique { border-color: #ffc93c; box-shadow: 0 0 16px #ffc93c; }
.chest-open .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; border: 1px solid rgba(0,0,0,.25); }

/* ── Город (вкладка «🏙 Город», city/cityui.js) ── */
#cc { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; background: #9cc7e6; }
#ctags { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.ctag { position: absolute; left: 0; top: 0; background: rgba(255, 255, 255, .92); color: #1d3350; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 10px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); line-height: 1.2; text-align: center; pointer-events: auto; will-change: transform; }
.ctag small { display: block; font-size: 9.5px; font-weight: 700; color: #4a6283; }
.ctag.me { background: linear-gradient(180deg, #8dff9f, #26b545); color: #0b3316; }
.ctag.me small { color: #0b3316; opacity: .8; }
.ctag.place { background: rgba(16, 34, 62, .9); color: #fff; border: 1.5px solid var(--gold, #ffd36b); font-size: 12px; padding: 4px 9px; }
.ctag.near { outline: 2.5px solid #7dff9b; }
.camctl.city { top: calc(var(--top) + 76px); }
.chint { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--bot)); z-index: 5; background: rgba(10, 20, 36, .8); color: #fff; font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 14px; text-align: center; line-height: 1.3; border: 1px solid rgba(170, 215, 255, .35); pointer-events: none; white-space: nowrap; }
.chint small { font-weight: 600; opacity: .75; font-size: 11px; }
.cpanel h3 { font-size: 16.5px; font-weight: 800; padding-right: 34px; }
.cpanel h3 small { font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.cpanel .sub { font-size: 12.5px; color: var(--ink2); margin-top: 3px; line-height: 1.3; }
.cpanel .row { display: flex; gap: 7px; margin-top: 9px; }
.cpanel .x { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .14); font-size: 14px; }
.cpanel .roofs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.cpanel .roofs .sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); box-shadow: 0 2px 5px rgba(0, 0, 0, .3); font-size: 14px; line-height: 1; }
.cpanel .roofs .sw.on { border: 3px solid #7dff9b; transform: scale(1.08); }
.cpanel .btn { white-space: normal; line-height: 1.15; }
.dock button { min-width: 0; padding: 0 2px; }
.joybtn { position: absolute; left: 12px; bottom: calc(92px + var(--bot)); z-index: 6; width: 44px; height: 44px; border-radius: 50%; background: rgba(16, 34, 62, .82); border: 1.5px solid rgba(170, 215, 255, .35); font-size: 20px; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); }
.joybtn.on { background: linear-gradient(180deg, #8dff9f, #26b545); border-color: #c9ffd5; }
#cjoy { position: fixed; left: 64px; bottom: calc(150px + var(--bot)); z-index: 6; width: 112px; height: 112px; border-radius: 50%; background: rgba(16, 34, 62, .38); border: 2px solid rgba(255, 255, 255, .35); touch-action: none; display: flex; align-items: center; justify-content: center; }
#cjoy .knob { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); pointer-events: none; transition: transform .06s linear; }

/* ── город, этап 4: лист локации (city/locui.js) ── */
.lsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; max-height: 74%; display: flex; flex-direction: column; border-radius: 22px 22px 0 0; padding: 10px 12px calc(10px + var(--bot)); background: var(--sheet); border-top: 1.5px solid var(--rim); box-shadow: 0 -8px 24px rgba(0, 0, 0, .4); color: var(--ink); }
.lsheet .lhead { display: flex; align-items: center; gap: 8px; flex: none; }
.lsheet .lhead h3 { flex: 1; font-size: 17px; font-weight: 800; }
.lsheet .lhead h3 small { font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.lsheet .x { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .14); font-size: 14px; flex: none; }
.lsheet .lstat { display: flex; gap: 6px; margin: 7px 0 2px; flex: none; }
.lsheet .lstat span { background: rgba(10, 30, 60, .35); border: 1px solid var(--rim); border-radius: 10px; padding: 3px 8px; font-size: 12.5px; }
body.light .lsheet .lstat span { background: rgba(255, 255, 255, .7); }
.lsheet .lbody { flex: 1 1 auto; min-height: 60px; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; white-space: pre-line; font-size: 13.5px; line-height: 1.38; margin: 8px 0; padding-right: 2px; user-select: text; -webkit-user-select: text; transition: opacity .2s; }
.lsheet .lbody.dim { opacity: .25; }
.lsheet .lbody.lwait { opacity: .7; font-weight: 700; }
.lsheet .lbody blockquote { border-left: 3px solid var(--accent); padding: 3px 0 3px 9px; margin: 4px 0; background: rgba(255, 255, 255, .06); border-radius: 0 8px 8px 0; }
.lsheet .lbody i { color: var(--ink2); }
.lsheet .lbody mark { background: rgba(0, 0, 0, .55); color: transparent; border-radius: 4px; }
.lsheet .lbody mark:active { color: var(--ink); }
.lsheet .lbtns { flex: none; display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow-y: auto; touch-action: pan-y; }
.lsheet .lbtns .r { display: flex; gap: 6px; }
.lsheet .lbtns button { flex: 1; min-width: 0; border-radius: 12px; padding: 10px 6px; font-weight: 800; font-size: 13.5px; line-height: 1.15; color: #0b3316; background: linear-gradient(180deg, #8dff9f, #26b545); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 5px rgba(0, 0, 0, .25); }
.lsheet .lbtns button.go { background: linear-gradient(180deg, #9fd3ff, #3f8fe0); color: #06223f; }
.lsheet .lbtns button.ex { background: rgba(255, 255, 255, .16); color: var(--ink); box-shadow: none; border: 1px solid var(--rim); }
.lsheet .lbtns .r6 { gap: 4px; }
.lsheet .lbtns .r6 button { padding: 8px 0; font-size: 12px; border-radius: 9px; }
.lsheet .lbtns button:disabled { opacity: .45; }
.lsheet.busy .lbtns { pointer-events: none; }
.lsheet .lfoot { flex: none; display: flex; justify-content: center; margin-top: 7px; }
.lsheet .lfoot button { font-size: 12px; font-weight: 700; color: var(--ink2); padding: 4px 10px; border-radius: 10px; }
.lsheet .lanim { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 8px; }
.lsheet .slots { display: flex; gap: 8px; padding: 8px 10px; border-radius: 16px; background: linear-gradient(180deg, #3a0d0d, #1b0606); border: 2px solid #ffd36b; box-shadow: 0 0 14px rgba(255, 190, 60, .45), inset 0 0 12px rgba(0, 0, 0, .6); }
.lsheet .reel { width: 62px; height: 62px; border-radius: 12px; background: linear-gradient(180deg, #fff, #e8e1d2 45%, #fff); display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 3px 6px rgba(0, 0, 0, .35); }
.lsheet .reel i { font-style: normal; font-size: 38px; line-height: 1; }
.lsheet .reel.spin i { filter: blur(1.4px); transform: translateY(3px); }
.lsheet .reel.stop i { animation: lpop .28s ease-out; }
@keyframes lpop { 0% { transform: translateY(-14px) scale(1.15); } 70% { transform: translateY(2px); } 100% { transform: none; } }
.lsheet .won { font-weight: 900; font-size: 16px; min-height: 20px; }
.lsheet .won.win { color: #7dff9b; text-shadow: 0 0 10px rgba(125, 255, 155, .6); animation: lpop .35s; }
.lsheet .won.lose { color: #ff9a8a; }
.lsheet .wheel { position: relative; width: 100%; max-width: 360px; height: 46px; overflow: hidden; border-radius: 12px; background: #0e3b22; border: 2px solid #ffd36b; }
.lsheet .wheel .strip { position: absolute; left: 0; top: 4px; display: flex; will-change: transform; }
.lsheet .wheel b { width: 38px; height: 34px; flex: none; display: grid; place-items: center; font-weight: 900; font-size: 15px; color: #fff; border-right: 1px solid rgba(255, 255, 255, .25); }
.lsheet .wheel b.r, .lsheet .rball.r { background: #c62828; }
.lsheet .wheel b.b, .lsheet .rball.b { background: #161616; }
.lsheet .wheel b.g, .lsheet .rball.g { background: #1e8e3e; }
.lsheet .wheel b.hit { outline: 3px solid #ffd36b; outline-offset: -3px; }
.lsheet .wheel .needle { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; border-left: 2px solid #ffd36b; box-shadow: 0 0 6px #ffd36b; }
.lsheet .rball { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 900; color: #fff; border: 3px solid #ffd36b; box-shadow: 0 0 12px rgba(255, 211, 107, .55); animation: lpop .35s; }
.lsheet .rev { font-size: 50px; line-height: 1; }
.lsheet .rev.spin { animation: lspin .35s linear infinite; }
.lsheet .rev.bang { animation: lpop .3s; filter: drop-shadow(0 0 12px #ff5a3c); }
@keyframes lspin { to { transform: rotate(360deg); } }
.lsheet .drum { position: relative; width: 96px; height: 96px; }
.lsheet .drum .cyl { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #9aa3ad 0 18%, #5d656e 19% 60%, #3c4249 61% 100%); box-shadow: inset 0 0 0 3px #2a2e33, 0 4px 10px rgba(0, 0, 0, .45); }
.lsheet .drum .cyl i { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: radial-gradient(circle, #111 0 55%, #2b2f34 60%); transform: rotate(var(--a)) translateY(-29px); box-shadow: inset 0 0 0 2px #23272b; }
.lsheet .drum .cyl i.live { background: radial-gradient(circle, #d9a640 0 45%, #6b4a10 50%, #111 60%); }
.lsheet .drum .cyl b { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #c9d0d6; }
.lsheet .drum .pin { position: absolute; left: 50%; top: -10px; margin-left: -5px; width: 10px; height: 14px; border-radius: 3px; background: #ffd36b; box-shadow: 0 0 6px rgba(255, 210, 100, .8); }
.lsheet .drum.click .pin { animation: lpin .25s; }
.lsheet .drum.bang { animation: lpop .3s; filter: drop-shadow(0 0 16px #ff5a3c); }
@keyframes lpin { 50% { transform: translateY(6px); } }
.lsheet.shake { animation: lshake .35s; }
@keyframes lshake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
/* ── город: мини-карта и быстрый переход (этап 5) ── */
.mapbtn { flex: none; width: 42px; height: 42px; border-radius: 50%; background: rgba(16, 34, 62, .86); color: #fff; font-size: 20px; border: 1.5px solid var(--gold, #ffd36b); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
#cmap { position: fixed; inset: 0; z-index: 20; background: #22382a; display: flex; flex-direction: column; animation: cmapIn .18s ease-out; }
#cmap.out { opacity: 0; transition: opacity .18s; }
@keyframes cmapIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
#cmap .mhead { margin: calc(var(--top) + 8px) 10px 8px; padding: 8px 10px 8px 14px; display: flex; align-items: center; justify-content: space-between; flex: none; }
#cmap .mhead h2 { font-size: 17px; font-weight: 800; }
#cmap .mhead p { font-size: 12px; color: var(--ink2); margin-top: 1px; }
#cmap .x { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .16); font-size: 15px; flex: none; }
#cmap .mscroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 0 10px; }
#cmap .mbox { position: relative; margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); width: 100%; }
#cmap canvas { display: block; }
#cmap .mpins { position: absolute; inset: 0; }
.mpin { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-weight: 800; border-radius: 10px; line-height: 1.15; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.mpin.place { background: rgba(16, 34, 62, .94); color: #fff; border: 1.5px solid var(--gold, #ffd36b); font-size: 11.5px; padding: 5px 8px; }
.mpin.house { background: rgba(255, 255, 255, .93); color: #1d3350; font-size: 10.5px; padding: 3px 6px; max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
.mpin.house.me { background: linear-gradient(180deg, #8dff9f, #26b545); color: #0b3316; font-size: 11.5px; }
.mpin.free { background: rgba(255, 247, 214, .9); color: #7a4b00; font-size: 10px; padding: 2px 6px; box-shadow: none; pointer-events: none; }
.mpin.hero { background: none; box-shadow: none; pointer-events: none; display: flex; flex-direction: column-reverse; align-items: center; transform: translate(-50%, calc(-100% + 7px)); z-index: 2; }
.mpin.hero i { width: 14px; height: 14px; border-radius: 50%; background: #3be05a; border: 2.5px solid #fff; box-shadow: 0 0 0 0 rgba(59, 224, 90, .7); animation: heroPulse 1.4s infinite; }
.mpin.hero b { font-size: 10px; color: #fff; background: rgba(11, 51, 22, .85); border-radius: 8px; padding: 1px 5px; margin-bottom: 3px; }
@keyframes heroPulse { 70% { box-shadow: 0 0 0 12px rgba(59, 224, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 224, 90, 0); } }
#cmap .mfoot { margin: 8px 10px calc(8px + var(--bot)); padding: 8px; flex: none; }
#cmap .mhint { font-size: 12px; color: var(--ink2); padding: 0 4px 7px; line-height: 1.3; }
#cmap .mchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
#cmap .mchips::-webkit-scrollbar { display: none; }
#cmap .mchips .chip { position: static; padding: 9px 11px; font-size: 13px; }
#cflash { position: fixed; inset: 0; z-index: 19; background: #fff; opacity: 0; pointer-events: none; }
#cflash.go { animation: cflash .45s ease-out; }
@keyframes cflash { 0% { opacity: .55; } 100% { opacity: 0; } }
/* город: сундук среди деревьев */
.chesthint { position: absolute; top: calc(var(--top) + 72px); left: calc(var(--sl) + 10px); z-index: 5; background: rgba(22, 52, 28, .84); color: #fff; font-size: 12.5px; font-weight: 800; padding: 6px 11px; border-radius: 13px; border: 1px solid rgba(160, 235, 150, .45); pointer-events: none; max-width: calc(100% - 80px); line-height: 1.25; animation: chestglow 2.4s ease-in-out infinite; }
.chesthint small { display: block; font-weight: 600; opacity: .8; font-size: 11px; }
@keyframes chestglow { 0%, 100% { box-shadow: 0 0 0 rgba(255, 210, 90, 0); } 50% { box-shadow: 0 0 12px rgba(255, 210, 90, .55); } }
.cpanel.chestwin .pv { display: flex; gap: 12px; align-items: center; margin-top: 4px; }
.cpanel.chestwin img.big { width: 84px; height: 84px; object-fit: contain; border-radius: 14px; border: 3px solid #cfd6de; background: var(--cardbg); flex: none; }
.cpanel.chestwin img.big.r-good { border-color: #4f8ff7; } .cpanel.chestwin img.big.r-rare { border-color: #a259ff; }
.cpanel.chestwin img.big.r-unique { border-color: #ffc93c; box-shadow: 0 0 16px #ffc93c; }
.cpanel.chestwin .big.can { width: 60px; height: 72px; flex: none; border-radius: 10px; }
.cpanel.chestwin .meta { font-size: 12.5px; color: var(--ink2); line-height: 1.35; }
.cpanel.chestwin .poo { font-size: 46px; flex: none; }

/* ── Локации города (city/locui.js): подложка, карточки, разговор ── */
.locbg { position: fixed; inset: 0; z-index: 29; opacity: 0; transition: opacity .22s ease; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .8); pointer-events: auto; }
.locbg.on { opacity: 1; }
.locbg.off { opacity: 0; pointer-events: none; }
.bg-casino { background: radial-gradient(120% 80% at 50% 0%, #4a0f2a 0%, #22061a 55%, #0d0210 100%); }
.bg-gym { background: radial-gradient(120% 80% at 50% 0%, #4a2a12 0%, #24120a 55%, #100703 100%); }
.bg-kiosk { background: radial-gradient(120% 80% at 50% 0%, #17306a 0%, #0c1838 55%, #060b1c 100%); }
.bg-cafe { background: radial-gradient(120% 80% at 50% 0%, #4d3320 0%, #2a1a0f 55%, #140b05 100%); }
.bg-yama { background: radial-gradient(120% 80% at 50% 0%, #2f4a3a 0%, #172a20 55%, #0a140f 100%); }
.bg-dorm { background: radial-gradient(120% 80% at 50% 0%, #3b3f58 0%, #1d2033 55%, #0d0f1a 100%); }
.bg-room { background: radial-gradient(120% 80% at 50% 0%, #4a3a5c 0%, #241c33 55%, #110c19 100%); }
.bg-base { background: radial-gradient(120% 80% at 50% 0%, #2c3234 0%, #151a1b 55%, #070909 100%); }
.lbwait { display: flex; flex-direction: column; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; text-align: center; padding: 0 30px; }
.lbwait i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #ffd36e; animation: lspin .8s linear infinite; }
.czfull, .rlt { animation: lfin .24s ease both; }
.lfade { animation: lfin .24s ease both; }
@keyframes lfin { from { opacity: 0; } to { opacity: 1; } }
.lchat { display: block; margin: 8px auto 0; background: none; border: 0; color: rgba(255, 255, 255, .55); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 4px 10px; cursor: pointer; font-family: inherit; }
.lcard .lcbody { position: absolute; inset: calc(48px + var(--top, 0px)) 0 0; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 6px 14px calc(16px + var(--bot, 0px)); display: flex; flex-direction: column; gap: 10px; }
.lchero { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.lcemo { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; font-size: 38px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.lchero h2 { font-size: 21px; font-weight: 900; margin: 0; }
.lchero small { font-size: 12.5px; color: rgba(255, 255, 255, .6); font-weight: 600; }
.lcabout { margin: 0; font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, .78); }
.lcreply { display: flex; flex-direction: column; gap: 7px; }
.lctitle { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: #ffd36e; background: rgba(0, 0, 0, .3); border-radius: 8px; padding: 3px 8px; }
.lcsay { position: relative; background: #fff8e6; color: #2a1d10; border-radius: 16px 16px 16px 4px; padding: 10px 12px; font-size: 14px; line-height: 1.38; font-weight: 600; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); user-select: text; -webkit-user-select: text; }
.lcinfo { font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .7); display: flex; flex-direction: column; gap: 2px; }
.lccode { margin: 0; font-size: 12px; line-height: 1.15; background: rgba(0, 0, 0, .45); border-radius: 12px; padding: 8px; overflow-x: auto; color: #d8ffe0; text-align: center; }
.lcmore { font-size: 12.5px; color: rgba(255, 255, 255, .65); }
.lcmore summary { cursor: pointer; color: rgba(255, 255, 255, .5); font-weight: 700; list-style: none; }
.lcmore summary::before { content: '▸ '; }
.lcmore[open] summary::before { content: '▾ '; }
.lcmore div { margin-top: 2px; }
.lctiles { display: flex; flex-direction: column; gap: 8px; }
.lcrow { display: flex; gap: 8px; }
.lctile { flex: 1; min-height: 50px; border-radius: 15px; padding: 8px 10px; font-family: inherit; font-size: 14px; font-weight: 800; color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .07)); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 3px 10px rgba(0, 0, 0, .25); display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; line-height: 1.2; cursor: pointer; }
.lctile:active { transform: scale(.97); }
.lctile em { font-style: normal; font-size: 11.5px; font-weight: 800; color: #b9f3ff; background: rgba(0, 0, 0, .35); border-radius: 8px; padding: 2px 5px; }
.lcrow.tight .lctile { font-size: 13px; padding: 6px; }
.lcrow.back .lctile, .lctile.ghost { min-height: 40px; background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .14); font-weight: 700; font-size: 13px; color: rgba(255, 255, 255, .8); box-shadow: none; }
.lctile:disabled { opacity: .5; }
.lcempty { font-size: 13px; color: rgba(255, 255, 255, .5); text-align: center; padding: 10px; }
.lcard.busy .lctiles, .ltalk.busy .lctiles { opacity: .6; pointer-events: none; }
/* «🔒 Ты в подвале до HH:MM» — карточка подвала, куда бы ни входил пойманный вор */
.ljail { border-radius: 16px; padding: 12px 14px; background: linear-gradient(180deg, rgba(120, 30, 30, .55), rgba(60, 12, 12, .55)); border: 1px solid rgba(255, 120, 110, .45); display: flex; flex-direction: column; gap: 6px; }
.ljail .ljt { font-size: 16px; font-weight: 800; color: #fff; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ljail .ljleft { font-size: 14px; font-weight: 700; color: #ffd6a0; font-variant-numeric: tabular-nums; }
.ljail .ljwhy, .ljail .ljno { font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, .85); }
.ljail .ljno { color: rgba(255, 255, 255, .7); }
.ljail.mini { padding: 8px 12px; }
.ljail.mini .ljt { font-size: 14px; }
/* заглушка вместо пустого экрана локации: своя, не зависит от css залов */
.locerr { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; padding: calc(20px + var(--top, 0px)) 20px calc(20px + var(--bot, 0px)); background: #141821; color: #fff; }
.locerr .lebox { max-width: 360px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.locerr .leemo { font-size: 48px; }
.locerr h2 { margin: 0; font-size: 19px; }
.locerr p { margin: 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .78); word-break: break-word; }
.locerr .lerow { display: flex; gap: 10px; margin-top: 6px; }
.locerr .btn { padding: 12px 10px; font-size: 15px; }
.ltalk { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: flex-end; opacity: 0; transition: opacity .2s ease; color: #fff; }
.ltalk.on { opacity: 1; }
.ltalk .ltdim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.ltalk .ltbox { position: relative; max-height: 78%; display: flex; flex-direction: column; border-radius: 22px 22px 0 0; background: linear-gradient(180deg, #2a1d2e, #160f19); border-top: 1.5px solid rgba(255, 215, 120, .45); box-shadow: 0 -10px 30px rgba(0, 0, 0, .5); padding: 10px 14px calc(14px + var(--bot, 0px)); transform: translateY(24px); transition: transform .22s cubic-bezier(.2, .9, .3, 1); }
.ltalk.on .ltbox { transform: none; }
.ltalk .lthead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ltalk .lthead b { flex: 1; font-size: 16px; font-weight: 900; }
.ltalk .x { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff; font-size: 14px; }
.ltalk .ltbody { overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 10px; }
.lcgo { margin-top: 4px; }
.lcgoh { font-size: 12px; font-weight: 800; letter-spacing: .4px; color: rgba(255, 255, 255, .55); margin-bottom: 6px; }
.lcgos { display: flex; flex-wrap: wrap; gap: 6px; }
.lcgob { font-family: inherit; font-size: 13px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.lcgob:disabled { opacity: .5; }

/* ── сейф в хате (safeSheet в app.js) ── */
.sheet.safe { max-height: 74%; }
.sheet.safe .body { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 0; }
.sfown, .sfguest { display: flex; flex-direction: column; gap: 9px; }
.sfbig { font-size: 38px; font-weight: 900; text-align: center; color: #ffe39a; text-shadow: 0 0 12px rgba(255, 210, 80, .45); }
.sfbig small { font-size: 22px; }
.sfline { font-size: 14px; padding: 8px 11px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.sfline.ok { background: rgba(90, 210, 130, .15); border-color: rgba(110, 220, 150, .45); }
.sfline.warn { background: rgba(255, 140, 90, .14); border-color: rgba(255, 150, 110, .45); }
.sfhint { font-size: 12.5px; line-height: 1.38; opacity: .8; margin: 0; }
.sfguest p { margin: 0; font-size: 14px; line-height: 1.38; }
.sfpic { font-size: 54px; text-align: center; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.sfspin { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0; }
.sfspin .dial { width: 86px; height: 86px; border-radius: 50%; background: radial-gradient(circle, #f2d27a 0 12%, #b8902c 13% 16%, #3d4a45 17% 100%);
  border: 6px solid #d4a640; box-shadow: 0 6px 14px rgba(0, 0, 0, .45); position: relative; animation: sfdial 1.4s cubic-bezier(.5, 0, .5, 1) infinite; }
.sfspin .dial::after { content: ''; position: absolute; left: 50%; top: 4px; width: 4px; height: 16px; margin-left: -2px; background: #f2d27a; border-radius: 2px; }
@keyframes sfdial { 0% { transform: rotate(0); } 35% { transform: rotate(140deg); } 60% { transform: rotate(60deg); } 100% { transform: rotate(300deg); } }
.sfres { text-align: center; border-radius: 16px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.sfres .big { font-size: 42px; line-height: 1.1; animation: sfpop .6s cubic-bezier(.2, 1.6, .4, 1); }
.sfres h2 { margin: 0; font-size: 22px; font-weight: 900; }
.sfres p { margin: 0; font-size: 14px; line-height: 1.38; }
.sfres .amt { font-size: 28px; font-weight: 900; color: #ffe39a; }
.sfres .say { font-size: 13.5px; font-style: italic; opacity: .9; }
.sfres.ok { background: radial-gradient(120% 120% at 50% 0%, rgba(47, 138, 82, .85), rgba(15, 42, 25, .6)); }
.sfres.locked { background: radial-gradient(120% 120% at 50% 0%, rgba(74, 90, 120, .85), rgba(26, 32, 50, .6)); }
.sfres.empty { background: radial-gradient(120% 120% at 50% 0%, rgba(90, 90, 90, .8), rgba(30, 30, 30, .6)); }
.sfres.caught { background: radial-gradient(120% 120% at 50% 0%, rgba(166, 42, 42, .9), rgba(42, 8, 8, .7)); animation: sfalarm .45s 3; }
@keyframes sfpop { from { transform: scale(.2); } }
@keyframes sfalarm { 50% { box-shadow: 0 0 0 4px rgba(255, 60, 60, .8), 0 0 30px rgba(255, 40, 40, .8); } }
.tag.safe { pointer-events: auto; font-size: 13px; padding: 4px 9px; background: rgba(30, 38, 36, .88); color: #ffe39a; border: 1.5px solid #d4a640; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); cursor: pointer; }
.tag.safe::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -5px; border: 5px solid transparent; border-top-color: #d4a640; border-bottom: 0; }
.tag.safe.locked { border-color: #8fd6a8; color: #dcffe6; }
/* «Шмот»: портрет хозяина в панели у двери дома */
.cpanel h3.hpf { display: flex; align-items: center; gap: 8px; }
.cpanel h3.hpf > span { display: inline-flex; flex: none; }
/* портрет вместо буквы в «В гости» */
.li .ic.pf { padding: 0; overflow: hidden; background: #dfe8f3; }
.li .ic.pf .pfp { width: 100%; height: 100%; }

/* ── живые игроки (presence.js, city/others.js) ── */
.ctag.who { background: rgba(18, 24, 44, .8); color: #fff; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 9px; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: opacity .2s; }
.ctag.who.near { outline: 2px solid #7dff9b; }
.ctag.place small.inside { color: #8dff9f; font-size: 10px; }
.hud .online { color: #3bd16a; font-weight: 800; }
.hud .pres { display: block; font-size: 11.5px; font-weight: 700; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud .pres.home { color: #3bd16a; }
.hud .pres.away { color: var(--ink2); }
.cpanel .tgl { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; margin-top: 9px; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .08); }
.cpanel .tgl b { display: block; font-size: 14px; }
.cpanel .tgl small { display: block; font-size: 11.5px; color: var(--ink2); margin-top: 2px; line-height: 1.3; font-weight: 600; }
.tgl .sw { flex: none; width: 40px; height: 24px; border-radius: 12px; background: rgba(140, 150, 170, .5); position: relative; margin-top: 1px; transition: background .2s; }
.tgl .sw i { position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; }
.tgl.on .sw { background: #6b5cff; }
.tgl.on .sw i { left: 19px; }
.tag.who { background: rgba(18, 24, 44, .8); color: #fff; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 9px; pointer-events: none; }
.sheet .invis { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); margin: 2px 2px 8px; }
.sheet .invis button { font-weight: 800; }
