body { margin: 0; font-family: 'Segoe UI', Arial, sans-serif; background: transparent; }
.hidden { display: none !important; }

/* ---------- Карточка прораба (справа, как у грузчика) ---------- */
#dialog .card {
    position: fixed; right: 4%; top: 50%; transform: translateY(-50%);
    width: 440px; box-sizing: border-box; padding: 16px;
    background: rgba(16, 18, 24, 0.96); border: 1px solid #3a3d44; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); color: #fff;
}
.head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid #2c2f36; }
.avatar {
    width: 48px; height: 48px; flex: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ffb347, #ff7a18); color: #fff; font-size: 22px; font-weight: 700;
    box-shadow: 0 0 12px rgba(255, 122, 24, 0.5);
}
.npc-name { font-size: 17px; font-weight: 700; }
.npc-role { font-size: 13px; color: #8d939e; margin-top: 2px; }

.bubble { background: #1c1f26; border: 1px solid #2c2f36; border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; color: #d5dae5; line-height: 1.45; }
.bubble b, .text b { color: #ffb347; }
.text { font-size: 13px; color: #d5dae5; line-height: 1.5; margin-bottom: 12px; }

.stack { display: flex; flex-direction: column; gap: 10px; }
.btn {
    width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #2c2f36; border-radius: 6px;
    font-family: inherit; font-size: 14px; font-weight: 600; color: #fff; background: #23262d; cursor: pointer;
}
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: #ff7a18; border-color: #ff7a18; }
.btn.danger { background: #c8323c; border-color: #c8323c; }
.btn.ghost { background: transparent; }

.section-title { font-size: 15px; font-weight: 700; color: #ffb347; margin: 2px 0 10px; }
.lvl-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.ok { color: #4fff7a; }
.dim { font-size: 12px; color: #8d939e; font-weight: 400; margin: 6px 0 12px; }
.lvl-row .dim { margin: 0; }
.bar { height: 6px; background: #2c2f36; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: #ff7a18; }
.loading { font-size: 13px; color: #8d939e; padding: 12px 0; }

table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px; }
th { text-align: left; font-weight: 400; color: #8d939e; padding: 8px 6px; border-bottom: 1px solid #2c2f36; }
td { padding: 8px 6px; border-bottom: 1px solid #22252c; }
tr.cur td { background: rgba(255, 122, 24, 0.15); color: #ffb347; font-weight: 700; }

/* ---------- Мини-игра с кубиком ---------- */
#build { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); width: 360px; color: #fff; text-align: center; }
.b-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; text-shadow: 0 1px 3px #000; }
.b-area { position: relative; height: 300px; background: rgba(12, 14, 18, 0.82); border: 1px solid #3a3d44; border-radius: 8px; overflow: hidden; }
.b-hole { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: 80px; height: 80px; border: 2px dashed #ffb347; box-sizing: border-box; background: rgba(0, 0, 0, 0.55); }
.b-block { position: absolute; left: 50%; bottom: 170px; transform: translateX(-50%); width: 40px; height: 40px; background: linear-gradient(135deg, #ffb347, #ff7a18); border-radius: 3px; }
.b-block.ok { transition: bottom 0.8s ease-in, opacity 0.8s; bottom: 10px; opacity: 0; }
.b-block.bad { transition: bottom 0.8s ease-in, opacity 0.8s; bottom: 300px; opacity: 0; }
.b-hint { font-size: 12px; color: #d5dae5; margin-top: 8px; text-shadow: 0 1px 3px #000; }
.b-hint b { color: #ffb347; }

/* ---------- Оплата ---------- */
#payToast { position: fixed; left: 50%; bottom: 14%; transform: translateX(-50%); min-width: 230px; padding: 10px 18px 0; background: rgba(12, 14, 18, 0.88); border-radius: 6px; color: #fff; text-align: center; overflow: hidden; pointer-events: none; }
.pay-text { font-size: 16px; padding-bottom: 8px; }
.pay-text b { color: #4fff7a; font-weight: 700; }
.pay-timer { height: 2px; margin: 0 -18px; background: rgba(255, 255, 255, 0.12); }
.pay-fill { height: 100%; width: 100%; background: #4fff7a; }
@keyframes payDrain { from { width: 100%; } to { width: 0%; } }
