:root {
  --ink: #14202b;
  --ink-soft: #4a5a66;
  --paper: #eef2f1;
  --paper-2: #ffffff;
  --line: #c9d2d0;
  --badge: #f5b400;
  --badge-ink: #3a2c00;
  --online: #2fa36b;
  --private: #6c5ce7;
  --danger: #c93b3b;
  --radius: 10px;
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #1d2a33;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--badge); outline-offset: 2px; }

.screen { position: fixed; inset: 0; }

/* ===== Экран входа ===== */
.auth {
  display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background:
    radial-gradient(60vw 60vh at 20% 10%, #2c3f4b, transparent 70%),
    radial-gradient(50vw 50vh at 90% 90%, #3a2f1f, transparent 70%),
    #1d2a33;
}
.badge {
  position: relative; display: grid; grid-template-columns: 200px 1fr; width: min(720px, 100%);
  background: var(--paper); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.45);
}
.badge::before { /* прорезь для клипсы бейджа */
  content: ""; position: absolute; width: 80px; height: 10px; border-radius: 6px;
  background: var(--ink); opacity: .18; top: 14px; left: 60px;
}
.badge-avatar {
  background: var(--badge); color: var(--badge-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px 16px;
}
.badge-avatar canvas { width: 140px; height: 180px; image-rendering: auto; }
.badge-hint { margin: 0; font-size: 13px; opacity: .8; text-align: center; }
.badge-form { padding: 22px 26px 20px; }
.badge-title { margin: 0 0 4px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.badge-sub { margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; line-height: 1.4; }

.tabs { display: flex; gap: 4px; background: #dfe5e3; padding: 4px; border-radius: 8px; margin-bottom: 12px; }
.tab { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 6px; font-weight: 500; color: var(--ink-soft); }
.tab.active { background: var(--paper-2); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.fields { display: grid; gap: 8px; }
.fields label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-soft); }
.fields input {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); font-size: 15px; color: var(--ink);
}
.fields input:focus { border-color: var(--ink); outline: none; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.register-only { display: grid; gap: 10px; }
.auth[data-mode="login"] .register-only { display: none; }

.look-editor { display: grid; gap: 7px; padding-top: 4px; }
.look-row { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.look-k { width: 84px; flex: none; font-size: 12px; color: var(--ink-soft); }
.seg { display: flex; gap: 4px; background: #dfe5e3; padding: 3px; border-radius: 7px; }
.seg button { border: 0; background: transparent; padding: 4px 12px; border-radius: 5px; font-size: 13px; color: var(--ink-soft); }
.seg button.active { background: var(--paper-2); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 7px; }
.stepper button { border: 0; background: transparent; width: 28px; height: 26px; font-size: 18px; line-height: 1; color: var(--ink-soft); border-radius: 6px; }
.stepper button:hover { background: #dfe5e3; color: var(--ink); }
.stepper span { min-width: 92px; text-align: center; font-size: 13px; }
.swatches { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.swatch.active { border-color: var(--ink); }

.error { color: var(--danger); font-size: 14px; margin: 10px 0 0; }
.btn {
  border: 0; border-radius: 8px; padding: 11px 16px; font-weight: 500; background: #dfe5e3; color: var(--ink);
}
.btn.primary { background: var(--ink); color: #fff; width: 100%; margin-top: 14px; padding: 12px; font-size: 15px; }
.btn.primary:disabled { opacity: .6; cursor: default; }
.btn.small { padding: 8px 12px; font-size: 14px; }
.btn.warn { background: var(--badge); color: var(--badge-ink); }
.btn.ghost { background: transparent; color: var(--ink-soft); }

/* ===== Игра ===== */
.game { background: #1d2a33; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.topbar {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; gap: 8px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar-side { display: flex; gap: 6px; align-items: center; min-width: 0; }
.topbar-side.right { justify-content: flex-end; }
.status-wrap { position: relative; }
.status-btn { gap: 8px; padding-right: 10px; }
.status-btn { padding: 3px 10px 3px 3px; }
.status-btn .st { width: 24px; height: 24px; font-size: 14px; }
.status-btn b { font-weight: 400; opacity: .6; font-size: 11px; }
.status-menu { top: 40px; left: 0; width: 260px; padding: 6px; }
.status-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 8px; }
.status-menu button:hover { background: #dfe5e3; }
.status-menu button.active { background: #dfe5e3; }
.status-menu button .st { width: 26px; height: 26px; font-size: 15px; }
.status-menu button span { display: grid; font-size: 14px; }
.status-menu button small { color: var(--ink-soft); font-size: 12px; }
.chat-reach { background: #fff3cd; color: #6b4d00; font-size: 12px; padding: 6px 10px; border-top: 1px solid #f0dc9a; }
.pong { position: absolute; inset: 0; background: rgba(12,18,24,.94); display: grid; place-items: center; align-content: center; gap: 10px; z-index: 5; padding: 12px; }
.pong-top { display: flex; align-items: center; justify-content: space-between; width: min(800px, 100%); color: #fff; font-weight: 500; font-size: 18px; }
.pong canvas { width: min(800px, 100%); aspect-ratio: 8 / 5; height: auto; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.pong-msg { color: var(--badge); font-size: 16px; min-height: 22px; }
.pong-help { color: rgba(255,255,255,.55); font-size: 13px; }
.chip.office { background: var(--badge); color: var(--badge-ink); font-weight: 500; }
.chip.letters { background: var(--paper); color: var(--ink); font-weight: 700; }
.chip.letters.unread { background: var(--badge); color: var(--badge-ink); }
.seo-h { font-size: 14px; margin: 14px 0 6px; }
.seo-list { margin: 0; padding-left: 18px; }
.seo-list li { margin-bottom: 8px; }
.pr { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 3px; margin-right: 6px; background: #eee; }
.pr.high { background: #f6d3d3; } .pr.mid { background: #f6ecc9; } .pr.low { background: #dfeadd; }
.seo-tabs { margin-bottom: 12px; }
.seo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.seo-table th { text-align: left; color: var(--ink-soft); font-weight: 500; padding: 4px 6px; position: sticky; top: 0; background: var(--paper); }
.seo-table td { padding: 4px 6px; border-top: 1px solid var(--line); }
.seo-scroll { max-height: 46vh; overflow: auto; margin-top: 8px; }
.seo-bar { height: 8px; background: var(--paper-2); border-radius: 4px; overflow: hidden; margin: 10px 0; }
.seo-bar i { display: block; height: 100%; background: var(--badge); transition: width .3s; }
.letters { display: grid; gap: 10px; max-height: 55vh; overflow: auto; }
.letter { background: var(--paper-2); border-radius: 8px; padding: 10px 12px; border-left: 4px solid var(--line); }
.letter.new { border-left-color: var(--badge); background: #fff8e6; }
.letter-head { display: flex; gap: 6px; align-items: baseline; }
.letter-when { margin-left: auto; color: var(--ink-soft); font-size: 12px; }
.letter p { margin: 6px 0; white-space: pre-wrap; }
.chip.coins { background: #3a2c00; color: var(--badge); font-weight: 700; gap: 6px; padding-left: 8px; }
.coin { flex: none; filter: drop-shadow(0 1px 0 rgba(0,0,0,.4)); }
.coins-line { display: flex; align-items: center; gap: 6px; }
.wallet-log { display: grid; gap: 4px; max-height: 40vh; overflow: auto; font-size: 13px; }
.wallet-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; background: var(--paper-2); border-radius: 6px; }
.wallet-row b { color: var(--danger); } .wallet-row b.plus { color: var(--online); }
.prices { display: grid; gap: 4px; font-size: 13px; color: var(--ink-soft); margin-top: 10px; }
.chip.office:disabled { background: rgba(20,32,43,.85); color: #fff; font-weight: 400; cursor: default; }
.st { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; flex: none; font-size: 12px; font-style: normal; line-height: 1; box-shadow: 0 0 0 1.5px rgba(255,255,255,.9); }
.status-line { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.status-line i, .choice-status i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.choice-status { display: flex; align-items: center; gap: 6px; padding: 0 10px 8px; font-size: 12px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-size: 13px; }
.edit-bar {
  position: absolute; left: 50%; top: 56px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center;
  background: var(--paper); border-radius: var(--radius); padding: 8px 8px 8px 14px; font-size: 13px; box-shadow: 0 12px 30px rgba(0,0,0,.35);
  max-width: calc(100% - 24px); white-space: nowrap;
}
.edit-bar span { white-space: normal; }
.chip.off { opacity: .55; text-decoration: line-through; }
.chip.pulse { background: var(--badge); color: var(--badge-ink); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.logo-row { display: flex; gap: 12px; align-items: center; }
.logo-preview { width: 72px; height: 72px; border-radius: 10px; background: var(--paper-2); border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--ink-soft); font-size: 12px; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview.big { width: 84px; height: 84px; border-style: solid; font-size: 24px; font-weight: 700; color: var(--ink); }
.file-label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.company-head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.dj-genres { display: flex; flex-wrap: wrap; gap: 4px; background: #dfe5e3; padding: 4px; border-radius: 8px; margin-bottom: 10px; }
.dj-genres .tab { flex: none; padding: 6px 10px; font-size: 13px; }
.dj-lock { background: #fff3cd; color: #6b4d00; padding: 8px 10px; border-radius: 6px; font-size: 13px; margin: 0 0 10px; }
.dj-track:disabled { opacity: .5; }
.dj-tracks { display: grid; gap: 2px; max-height: 50vh; overflow: auto; }
.dj-track { display: flex; align-items: center; gap: 10px; border: 0; background: var(--paper-2); text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 14px; }
.dj-track:hover { background: #dfe5e3; }
.dj-track span { width: 22px; color: var(--ink-soft); font-size: 12px; }
.dj-track.playing { background: var(--badge); color: var(--badge-ink); }
.dj-track.playing span { color: var(--badge-ink); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 7px 12px;
  background: rgba(20,32,43,.85); color: #fff; font-size: 13px; backdrop-filter: blur(6px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--online); }
.room-title {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: var(--paper); color: var(--ink); padding: 6px 16px; border-radius: 6px; font-weight: 500; font-size: 13px;
  border-top: 3px solid var(--badge); box-shadow: 0 6px 16px rgba(0,0,0,.3); pointer-events: none; white-space: nowrap;
}

.panel {
  position: absolute; background: var(--paper); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.35);
  padding: 8px; font-size: 14px;
}
.online-panel { top: 50px; left: 12px; width: 240px; max-height: 60vh; overflow: auto; }
.online-room { padding: 6px 8px 2px; font-size: 12px; color: var(--ink-soft); }
.online-room b { color: var(--ink); font-weight: 500; }
.online-user {
  display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: transparent; text-align: left;
  padding: 6px 8px; border-radius: 6px;
}
.online-user:hover { background: #dfe5e3; }
.online-user small { color: var(--ink-soft); margin-left: auto; font-size: 12px; }

.hint {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%);
  background: var(--badge); color: var(--badge-ink); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 20px rgba(0,0,0,.35); cursor: pointer; white-space: nowrap;
}
.hint kbd {
  display: inline-block; background: var(--badge-ink); color: var(--badge); border-radius: 4px; padding: 1px 7px; margin-right: 6px;
  font-family: var(--font); font-weight: 700;
}

.choice {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%);
  background: var(--paper); border-radius: var(--radius); padding: 8px; display: grid; gap: 4px; width: 320px;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.choice-name { padding: 6px 10px 8px; font-weight: 500; }
.choice button { border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.choice button:hover { background: #dfe5e3; }
.choice button[data-act="private"] { color: var(--private); }

/* чат */
.chat {
  position: absolute; left: 12px; bottom: 12px; width: 360px; max-width: calc(100% - 24px); height: 300px;
  display: flex; flex-direction: column; background: rgba(238,242,241,.96); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0,0,0,.35); overflow: hidden;
}
.chat-tabs { display: flex; gap: 2px; padding: 6px 6px 0; overflow-x: auto; }
.chat-toggle { margin-left: auto; border: 0; background: transparent; color: var(--ink-soft); padding: 4px 8px; font-size: 14px; }
.chat-tab {
  border: 0; background: transparent; padding: 6px 10px; border-radius: 6px 6px 0 0; font-size: 13px; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chat-tab.active { background: var(--paper-2); color: var(--ink); font-weight: 500; }
.chat-tab.private { color: var(--private); }
.chat-tab .unread { width: 8px; height: 8px; border-radius: 50%; background: var(--badge); }
.chat-tab .close { opacity: .5; margin-left: 2px; }
.chat-tab .close:hover { opacity: 1; }
.chat-log { flex: 1; overflow-y: auto; background: var(--paper-2); padding: 8px 10px; font-size: 14px; line-height: 1.35; }
.msg { margin: 0 0 6px; word-break: break-word; }
.msg b { font-weight: 500; }
.msg time { color: var(--ink-soft); font-size: 11px; margin-left: 6px; }
.msg.me b { color: #1f6f4f; }
.msg.system { color: var(--ink-soft); font-size: 13px; }
.chat-empty { color: var(--ink-soft); font-size: 13px; padding: 12px 4px; }
.chat-typing { height: 18px; font-size: 12px; color: var(--ink-soft); padding: 0 10px; background: var(--paper-2); }
.chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); min-width: 0; }
.chat.collapsed { height: auto; }
.chat.collapsed .chat-log, .chat.collapsed .chat-typing, .chat.collapsed .chat-form { display: none; }

/* мобильное управление */
.joystick { position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.25); pointer-events: none; }
.joystick .knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.55); }
.action-btn {
  position: absolute; right: 20px; bottom: 90px; width: 64px; height: 64px; border-radius: 50%; border: 0;
  background: var(--badge); color: var(--badge-ink); font-weight: 700; font-size: 22px; box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

.toast {
  position: absolute; top: 108px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 8px 14px; border-radius: 8px; font-size: 13px; box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

/* ===== Биржа лидов ===== */
.leads { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px; background: rgba(10,16,22,.55); }
.leads-box { position: relative; width: min(920px, 100%); height: min(72vh, 640px); display: flex; flex-direction: column; overflow: hidden; }
.leads-close { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; }
.leads-list { flex: 1; overflow: auto; }
.leads-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; }
.leads-hint { font-size: 12px; opacity: .6; }
/* терминал */
.leads-terminal .leads-box { background: #061009; color: #39ff8a; font-family: "Courier New", Courier, monospace; border: 3px solid #1f5a34; border-radius: 6px; padding: 18px 22px; box-shadow: 0 0 0 6px #0b1f12, 0 30px 80px rgba(0,0,0,.6), inset 0 0 60px rgba(57,255,138,.08); }
.leads-terminal .leads-box::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 2px, transparent 2px 4px); }
.leads-terminal .leads-close { color: #39ff8a; }
.t-head { font-weight: 700; margin-bottom: 12px; border-bottom: 1px dashed #1f5a34; padding-bottom: 8px; }
.t-lead { margin: 0 0 12px; }
.t-line { font-weight: 700; }
.t-pct { color: #f5d76e; margin-left: 8px; }
.t-about { opacity: .85; margin: 2px 0 2px 34px; white-space: pre-wrap; }
.t-who { opacity: .6; font-size: 13px; margin-left: 34px; }
.t-who button, .t-btn { border: 0; background: transparent; color: #39ff8a; font-family: inherit; font-weight: 700; cursor: pointer; padding: 6px 4px; }
.t-btn:hover, .t-who button:hover { background: #39ff8a; color: #061009; }
.t-form { display: grid; gap: 8px; border-top: 1px dashed #1f5a34; padding-top: 10px; }
.t-form label { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; }
.t-form input, .t-form textarea { background: #0b1f12; color: #39ff8a; border: 1px solid #1f5a34; font-family: inherit; padding: 6px 8px; border-radius: 3px; }
.t-form input[type=number] { width: 90px; }
.leads-terminal .error { color: #ff6b6b; }
/* доска */
.leads-board .leads-box { background: #c99b6a; border: 14px solid #6b4a2b; border-radius: 8px; padding: 16px 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 40px rgba(0,0,0,.18); color: var(--ink); }
.leads-board .leads-box::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(0,0,0,.08) 1px, transparent 1px); background-size: 8px 8px; }
.b-head { display: flex; align-items: baseline; gap: 12px; background: #f7f7f4; padding: 6px 12px; border-radius: 4px; width: max-content; max-width: 100%; margin-bottom: 12px; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.b-head span { font-weight: 700; font-size: 18px; }
.b-head small { color: var(--ink-soft); font-size: 12px; }
.leads-board .leads-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; align-content: start; padding: 8px 4px; }
.b-lead { position: relative; background: #fff8dc; padding: 22px 14px 12px; box-shadow: 0 6px 14px rgba(0,0,0,.28); transform: rotate(var(--rot)); font-size: 14px; }
.b-lead:nth-child(2n) { background: #e0f2ff; } .b-lead:nth-child(3n) { background: #fde2e4; } .b-lead:nth-child(5n) { background: #e8f5e9; }
.b-pin { position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: #c0392b; box-shadow: inset -2px -2px 0 rgba(0,0,0,.25); transform: translateX(-50%); }
.b-lead b { display: block; font-size: 16px; }
.b-pct { position: absolute; top: 10px; right: 12px; font-weight: 700; color: #b8336a; }
.b-lead p { margin: 6px 0; white-space: pre-wrap; }
.b-lead small { display: block; color: var(--ink-soft); font-size: 12px; line-height: 1.35; margin-top: 6px; }
.b-lead .btn { margin-top: 6px; }
.b-empty { grid-column: 1 / -1; color: #3a2c00; opacity: .7; padding: 20px; }
.b-form { display: grid; gap: 8px; background: #f7f7f4; padding: 12px; border-radius: 4px; box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.b-form label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-soft); }
.b-form input, .b-form textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 14px; color: var(--ink); }
.b-form input[type=number] { width: 90px; }

/* ===== Настольные игры ===== */
.board { position: absolute; right: 14px; top: 56px; width: 360px; max-width: calc(100% - 28px); background: var(--paper); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.4); padding: 10px 12px 12px; z-index: 4; }
.board-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.board-head b { font-size: 15px; }
.board-score { color: var(--ink-soft); font-size: 13px; margin-left: auto; }
.board-close { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--ink-soft); }
.board-note { margin-top: 8px; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-hint { color: var(--ink-soft); font-size: 12px; margin-top: 4px; }
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ttt button { aspect-ratio: 1; font-size: 40px; border: 0; border-radius: 8px; background: var(--paper-2); color: var(--ink); }
.ttt button:disabled { color: var(--ink); }
.ttt button.win { background: var(--badge); }
.chess { display: grid; grid-template-columns: repeat(8, 1fr); border: 3px solid #5b4636; border-radius: 4px; }
.chess button { aspect-ratio: 1; border: 0; font-size: 24px; line-height: 1; padding: 0; }
.chess .light { background: #e9d5b3; } .chess .dark { background: #a8784f; }
.chess .white { color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; } .chess .black { color: #111; }
.chess .sel { outline: 3px solid var(--badge); outline-offset: -3px; } .chess .last { box-shadow: inset 0 0 0 30px rgba(245,180,0,.25); }
#darts-cv { width: 100%; height: auto; display: block; background: #2b2f36; border-radius: 8px; cursor: crosshair; }
.darts-totals { display: flex; gap: 14px; font-size: 14px; margin-top: 6px; }
.darts-totals .now { color: #b8336a; font-weight: 500; }
/* ===== Квиз ===== */
.quiz { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); width: min(560px, calc(100% - 28px)); background: var(--paper); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.4); padding: 10px 14px 12px; z-index: 4; }
.quiz-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); }
.quiz-head b { color: var(--ink); }
.quiz-q { font-size: 16px; font-weight: 500; margin: 6px 0 10px; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quiz-opt { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; border-radius: 8px; background: var(--paper-2); padding: 8px 10px; font-size: 14px; }
.quiz-opt span { width: 22px; height: 22px; border-radius: 50%; background: #dfe5e3; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.quiz-opt:not(:disabled):hover { background: #dfe5e3; }
.quiz-opt.mine { outline: 2px solid var(--ink); }
.quiz-opt.right { background: #d5f2e1; } .quiz-opt.right span { background: var(--online); color: #fff; }
.quiz-opt.wrong { background: #fde2e4; }
.quiz-note { margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.quiz-top { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; display: grid; gap: 2px; font-size: 13px; }
.quiz-top-row { display: flex; justify-content: space-between; }
/* ===== Тендеры и витрина ===== */
.tender-list { display: grid; gap: 10px; max-height: 50vh; overflow: auto; }
.tender { background: var(--paper-2); border-radius: 8px; padding: 10px 12px; border-left: 4px solid var(--badge); }
.tender-head { display: flex; justify-content: space-between; gap: 10px; }
.tender-days { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.tender p { margin: 6px 0; white-space: pre-wrap; font-size: 14px; }
.tender-meta { color: var(--ink-soft); font-size: 12px; }
.svc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.svc-card { position: relative; background: var(--c); padding: 12px 12px 10px; border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,.15); font-size: 13px; }
.svc-card b { display: block; font-size: 14px; margin-bottom: 2px; }
.svc-card p { margin: 4px 0 0; color: var(--ink-soft); }
.svc-price { display: block; font-weight: 700; color: #b8336a; margin-bottom: 4px; }
.svc-edit { display: grid; gap: 6px; }
.svc-row { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 6px; }
.svc-row input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-2); font-size: 13px; min-width: 0; }

/* ===== Модальное окно ===== */
.modal { position: fixed; inset: 0; background: rgba(10,16,22,.6); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal-box { position: relative; width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--paper); border-radius: 14px; padding: 24px; }
.modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--ink-soft); }
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.pixel-photo { width: 144px; height: 144px; border-radius: 10px; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; image-rendering: pixelated; flex: none; object-fit: cover; box-shadow: 0 6px 16px rgba(0,0,0,.25); background: #dfe5e3; }
.pixel-photo.empty { display: grid; place-items: center; color: var(--ink-soft); font-size: 12px; border: 1px dashed var(--line); box-shadow: none; }
.pixel-photo.small { width: 44px; height: 44px; border-radius: 6px; box-shadow: none; }
.owner-line { display: flex; align-items: center; gap: 10px; }
.photo-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.photo-ctl { display: grid; gap: 10px; align-content: start; }
.photo-size button { padding: 5px 10px; font-size: 12px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-tabs { margin: -4px 0 16px; }
.sec { padding: 14px 0; border-top: 1px solid var(--line); }
.sec h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 500; }
.look-wrap { display: flex; gap: 16px; align-items: flex-start; }
.look-wrap canvas { width: 70px; height: 90px; flex: none; }
.profile-actions.sticky { position: sticky; bottom: -24px; background: var(--paper); padding: 12px 0 4px; margin-top: 6px; border-top: 1px solid var(--line); }
.modal-box { padding-bottom: 20px; }
.profile-head canvas { width: 70px; height: 90px; }
.profile-head h2 { margin: 0; font-size: 22px; }
.profile-head p { margin: 2px 0 0; color: var(--ink-soft); }
.profile-row { margin: 10px 0; }
.profile-row .k { font-size: 12px; color: var(--ink-soft); }
.profile-row .v { white-space: pre-wrap; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.modal-box .fields textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); font-size: 14px; min-height: 80px; resize: vertical; }
.file-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.file-row input[type=file] { font-size: 13px; }

/* ===== Мобильные ===== */
@media (max-width: 720px) {
  .auth { align-items: start; }
  .badge { grid-template-columns: 1fr; }
  .badge-avatar { flex-direction: row; padding: 12px; }
  .badge-avatar canvas { width: 70px; height: 90px; }
  .badge-form { padding: 20px 18px; }
  .row { grid-template-columns: 1fr; }
  .room-title { bottom: auto; top: 50px; }
  #status-label { display: none; }
  .look-k { width: 70px; }
  .stepper span { min-width: 76px; }
  .chat { width: calc(100% - 24px); height: 220px; }
  .action-btn { bottom: 70px; }
  .game:has(.chat:not(.collapsed)) .action-btn { bottom: 250px; }
  .chat.collapsed { width: auto; }
  .online-panel { width: calc(100% - 24px); }
  .hint { bottom: 240px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Кабинет специалистов: карточки услуг */
.svc-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.svc-head h2 { margin: 0; font-size: 20px; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.svc-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  background: var(--paper-2); border: 2px solid transparent; border-radius: 12px; padding: 12px 12px 10px; cursor: pointer; transition: .15s; }
.svc-card:hover { background: #e6e6e0; }
.svc-card.active { background: #fff8e6; border-color: var(--badge); box-shadow: 0 4px 12px rgba(245,180,0,.25); }
.svc-ico { font-size: 22px; line-height: 1; }
.svc-name { font-weight: 600; font-size: 14px; }
.svc-price { color: var(--ink-soft); font-size: 12px; }
.svc-card.active .svc-price { color: #8a6a00; font-weight: 600; }
.svc-about { color: var(--ink-soft); font-size: 13px; margin: 0 0 12px; }

.howto { background: var(--paper-2); border-radius: 8px; padding: 8px 12px; margin: 10px 0; font-size: 13px; }
.howto summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.howto p { margin: 8px 0 2px; color: var(--ink-soft); line-height: 1.5; }

/* Коммерческое предложение в фирменных цветах */
.palette { display: flex; gap: 8px; align-items: center; margin: 6px 0 10px; }
.palette img { height: 34px; border-radius: 6px; background: #fff; padding: 2px; }
.palette i { width: 24px; height: 24px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.kp { border-radius: 10px; overflow: hidden; background: #fff; }
.kp-cover { background: var(--c1); color: #fff; padding: 22px; }
.kp-logo { max-height: 40px; margin-bottom: 10px; display: block; }
.kp h1 { font-size: 22px; margin: 0 0 4px; }
.kp-tag { margin: 0; opacity: .9; }
.kp h2 { font-size: 15px; margin: 18px 14px 6px; color: var(--c1); border-bottom: 2px solid var(--c3); padding-bottom: 4px; }
.kp p, .kp ul, .kp table, .kp .kp-cards { margin: 8px 14px; }
.kp table { width: calc(100% - 28px); border-collapse: collapse; font-size: 13px; }
.kp th { background: var(--c1); color: #fff; text-align: left; padding: 6px; }
.kp td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kp-cards { display: flex; gap: 10px; }
.kp-card { flex: 1; border: 2px solid var(--c2); border-radius: 10px; padding: 10px; }
.kp-card h3 { margin: 0 0 4px; color: var(--c1); font-size: 14px; }
.kp-price { font-size: 16px; font-weight: 700; color: var(--c2); margin: 0 0 4px; }
.kp-for, .kp-term { color: var(--ink-soft); font-size: 12px; }
.kp-next { background: var(--c3); color: #2a2000; padding: 12px 16px; margin: 16px 14px 14px; border-radius: 10px; font-weight: 600; }

.banner-row { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; flex-wrap: wrap; }
.banner-row canvas { box-shadow: 0 4px 14px rgba(0,0,0,.18); background: #fff; }

/* Формы услуг: заметные поля и предупреждения */
.note-dark { background: #14202b; color: #e8e8e3; border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; font-size: 13px; }
.note-accent { background: #14202b; color: #f5b400; border: 1px solid #f5b400; border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.fields label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--ink-soft); }
.fields input, .fields select, .fields textarea {
  width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 10px; box-sizing: border-box;
}
.fields select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px; background-size: 6px 6px; background-repeat: no-repeat; }
.fields input:focus, .fields select:focus, .fields textarea:focus { outline: none; border-color: var(--badge); box-shadow: 0 0 0 3px rgba(245,180,0,.18); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.doclist { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; font-size: 12px; }
.doclist .doc { background: var(--paper-2); border-radius: 6px; padding: 3px 8px; }
.doclist .doc b { cursor: pointer; color: #c0392b; margin-left: 4px; }

.fields .check { display: flex; align-items: center; gap: 8px; background: var(--paper-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; color: var(--ink); font-size: 13px; }
.fields .check input { width: auto; margin: 0; }

.case { background: var(--paper-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.case h3 { margin: 0 0 2px; font-size: 14px; }
.case p { margin: 2px 0 0; font-size: 13px; }

.radio-now { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.chip.on { background: #f5b400; color: #2a2000; }

/* ——— Общий чат в стиле игры: светлая панель, микроаватары, жёлтые акценты ——— */
.chat { width: 380px; height: 340px; background: #f7f4ec; border: 3px solid #14202b; border-radius: 16px; box-shadow: 6px 6px 0 rgba(20,32,43,.3); }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 6px; border-bottom: 2px dashed #d6d0c2; }
.chat-room { font-size: 14px; color: #14202b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.chat-online { display: flex; margin-left: auto; padding-left: 5px; }
.chat-online img { width: 22px; height: 22px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 2px #f7f4ec; margin-left: -5px; image-rendering: pixelated; }
.chat-count { font-size: 12px; color: #5b6570; white-space: nowrap; }
.chat-count b { color: #b77900; }
.chat-head .chat-toggle { margin-left: 0; padding: 2px 6px; }
.chat-tabs { padding: 6px 8px 2px; gap: 5px; }
.chat-tab { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 8px; border: 2px solid #14202b; background: #fff; color: #14202b; }
.chat-tab.active { background: #f5b400; color: #2a2000; }
.chat-tab.private { color: #14202b; }
.chat-tab.private.active { background: #f7ead0; }
.chat-log { background: transparent; padding: 4px 8px; }
.cm { display: flex; gap: 8px; align-items: flex-start; padding: 4px 6px; border-radius: 10px; margin-bottom: 3px; }
.cm.hl { background: #fff1c4; }
.cm-av { width: 28px; height: 28px; object-fit: cover; border-radius: 7px; box-shadow: 0 0 0 2px #14202b; flex: none; image-rendering: pixelated; margin-top: 2px; }
.cm-b { flex: 1; min-width: 0; }
.cm-top { display: flex; align-items: baseline; gap: 6px; }
.cm-top b { font-size: 13px; color: #14202b; white-space: nowrap; }
.cm.me .cm-top b { color: #1f6b73; }
.cm-co { font-size: 11px; color: #7a838c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-top time { margin-left: auto; font-size: 10.5px; color: #9aa1a8; flex: none; }
.cm-tx { font-size: 13.5px; color: #22303c; line-height: 1.35; word-break: break-word; }
.cm-sys { text-align: center; color: #7a838c; font-size: 12px; margin: 4px 0 8px; }
.chat-typing { background: transparent; }
.chat-emotes { display: flex; gap: 5px; padding: 0 8px 4px; }
.chat-emotes button { background: #fff; border: 2px solid #14202b; border-radius: 8px; padding: 1px 7px; font-size: 14px; line-height: 1.3; cursor: pointer; }
.chat-emotes button:hover { background: #fff1c4; }
.chat-form { border-top: 0; padding: 4px 8px 8px; }
.chat-form input { border: 2px solid #14202b; border-radius: 10px; background: #fff; }
.chat-form .btn { background: #f5b400; border: 2px solid #14202b; color: #2a2000; font-weight: 700; border-radius: 10px; }
.chat.collapsed .chat-emotes, .chat.collapsed .chat-reach { display: none; }
body.face-open .chat { top: 58px; bottom: auto; }
body.face-open #hint { display: none !important; }

/* ——— Личная переписка «лицом к лицу»: пергамент и пиксельная рамка ——— */
.pxf { box-shadow: -4px 0 0 0 var(--bd), 4px 0 0 0 var(--bd), 0 -4px 0 0 var(--bd), 0 4px 0 0 var(--bd), 6px 10px 0 0 rgba(0,0,0,.3); }
.parch { --bd: #6b4a2b; background: linear-gradient(#f7ead0, #ead2a2); color: #3a2716; }
.face { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.face[hidden] { display: none; }
.face > * { pointer-events: auto; }
.face-col { position: absolute; left: 220px; right: 220px; bottom: 26px; display: flex; flex-direction: column; gap: 16px; pointer-events: none; }
.face-col > * { pointer-events: auto; }
.face-box { position: relative; padding: 34px 22px 14px; }
.face-rib { position: absolute; left: 18px; top: -18px; background: #6b4a2b; color: #fbeed2; font-weight: 700; padding: 5px 14px; font-size: 15px; box-shadow: 4px 4px 0 rgba(0,0,0,.3); }
.face-btns { position: absolute; right: 14px; top: -16px; display: flex; gap: 6px; }
.face-btns button { background: #6b4a2b; color: #fbeed2; border: 0; font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 10px; cursor: pointer; box-shadow: 3px 3px 0 rgba(0,0,0,.3); }
.face-btns button:hover { background: #845c37; }
.face-text { font-size: 19px; line-height: 1.45; max-height: 110px; overflow-y: auto; word-break: break-word; }
.face-reach { margin-top: 8px; background: #fff3cd; color: #6b4d00; font-size: 12.5px; padding: 5px 9px; }
.face-form { display: flex; gap: 8px; margin-top: 12px; }
.face-form input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 9px 11px; border: 2px solid #6b4a2b; background: #fffaf0; color: #3a2716; outline: none; }
.face-form input:focus { box-shadow: 0 0 0 3px rgba(245,180,0,.35); }
.face-form input:disabled { opacity: .55; }
.face-form button { background: #6b4a2b; color: #fbeed2; border: 0; font: inherit; font-weight: 700; font-size: 13.5px; padding: 0 14px; cursor: pointer; }
.face-p { position: absolute; bottom: 30px; width: 176px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.face-l { left: 26px; }
.face-r { right: 26px; }
.face-frame { width: 168px; height: 168px; padding: 4px; }
.face-frame img { width: 160px; height: 160px; object-fit: cover; image-rendering: pixelated; display: block; transition: filter .2s; }
.face-p span { background: #6b4a2b; color: #fbeed2; font-size: 12.5px; font-weight: 700; padding: 3px 10px; max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.face-p.off img { filter: grayscale(.6) brightness(.72); }
.face-slips { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.face-slip { max-width: 78%; padding: 8px 14px; font-size: 14.5px; line-height: 1.35; word-break: break-word; }
.face-slip b { color: #6b4a2b; margin-right: 6px; }
.face-slip.me { align-self: flex-end; }
.face-slip.me b { color: #1f6b73; }
.face-more { align-self: center; background: rgba(58,39,22,.88); color: #fbeed2; font-size: 12.5px; font-weight: 700; padding: 4px 12px; cursor: pointer; }
.face-slips.full { display: block; max-height: 42vh; overflow-y: auto; padding: 12px 16px; }
.face-line { font-size: 14px; line-height: 1.4; margin-bottom: 8px; word-break: break-word; }
.face-line b { color: #6b4a2b; margin-right: 4px; }
.face-line.me b { color: #1f6b73; }
.face-line time { font-size: 11px; color: #8a6f52; }
@media (max-width: 900px) {
  .face-col { left: 12px; right: 12px; bottom: 150px; }
  .face-p { bottom: 12px; width: 104px; }
  .face-frame { width: 96px; height: 96px; }
  .face-frame img { width: 88px; height: 88px; }
  .face-p span { font-size: 11px; max-width: 130px; }
  .chat { width: calc(100% - 24px); }
}
.face-emo { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.face-emo button { background: #fffaf0; border: 2px solid #6b4a2b; font-size: 17px; line-height: 1; padding: 4px 7px; cursor: pointer; }
.face-emo button:hover { background: #fbeed2; }
.face-emo button:disabled { opacity: .5; cursor: default; }

/* Слои: чат ниже окна переписки, верхняя панель со статусами выше обоих, модалки выше всего */
.chat { z-index: 6; }
.face { z-index: 7; }
.topbar { z-index: 8; }
.modal { z-index: 20; }
#modal-body > :first-child { margin-right: 34px; }      /* крестик не наезжает на вкладки и заголовки */

/* ——— Окно выбора у игрока — в стиле игры: бумага, чернильная рамка, хвостик к персонажу ——— */
.choice { background: #f7f4ec; border: 3px solid #14202b; border-radius: 16px; box-shadow: 6px 6px 0 rgba(20,32,43,.3); padding: 12px; gap: 8px; width: 300px; transform: translate(-50%, calc(-100% - 16px)); }
.choice::after { content: ''; position: absolute; left: 50%; bottom: -11px; width: 18px; height: 18px; background: #f7f4ec; border-right: 3px solid #14202b; border-bottom: 3px solid #14202b; transform: translateX(-50%) rotate(45deg); }
.choice-head { display: flex; align-items: center; gap: 10px; padding: 0 2px 10px; border-bottom: 2px dashed #d6d0c2; }
.choice-av { width: 48px; height: 48px; border-radius: 10px; box-shadow: 0 0 0 2px #14202b; image-rendering: pixelated; object-fit: cover; flex: none; }
.choice-who { min-width: 0; }
.choice-name { padding: 0; font-weight: 700; font-size: 16px; color: #14202b; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.choice-name small { display: block; font-weight: 500; font-size: 12px; color: #5b6570; margin-top: 1px; }
.choice-status { padding: 5px 0 0; font-size: 12px; color: #5b6570; }
.choice button { display: flex; align-items: center; gap: 10px; width: 100%; background: #fff; border: 2px solid #14202b; border-radius: 11px; padding: 7px 10px; text-align: left; cursor: pointer; font: inherit; color: #14202b; transition: background .12s, transform .12s; }
.choice button:hover, .choice button:focus-visible { background: #fff1c4; transform: translateY(-1px); outline: none; }
.choice button[data-act="private"] { color: #3a2716; background: #f7ead0; border-color: #6b4a2b; }
.choice button[data-act="private"]:hover { background: #f1dcb3; }
.choice .cb-ic { width: 30px; height: 30px; border-radius: 8px; background: #f5b400; border: 2px solid #14202b; display: grid; place-items: center; font-size: 15px; flex: none; }
.choice button[data-act="private"] .cb-ic { background: #fbeed2; border-color: #6b4a2b; }
.choice .cb-tx { display: flex; flex-direction: column; min-width: 0; }
.choice .cb-tx b { font-size: 14px; }
.choice .cb-tx small { font-size: 12px; color: #5b6570; }
.choice button[data-act="private"] .cb-tx small { color: #7a5a3a; }
.choice kbd { margin-left: auto; font: 700 11px system-ui, sans-serif; border: 2px solid #14202b; border-radius: 6px; padding: 1px 6px; background: #f7f4ec; color: #14202b; }

/* ═══ Единый стиль окон игры: бумага, чернильная рамка, жёсткая тень, жёлтые акценты ═══ */
:root { --gp: #f7f4ec; --gink: #14202b; --gline: #d6d0c2; --gy: #f5b400; --gy-soft: #fff1c4; }

/* окно подтверждения, сообщения и выбора — по центру экрана */
.gd { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(10,16,22,.55); }
.gd[hidden] { display: none; }
.gd-card { width: min(420px, 100%); background: var(--gp); border: 3px solid var(--gink); border-radius: 18px; box-shadow: 8px 8px 0 rgba(20,32,43,.35); padding: 22px 22px 18px; text-align: center; animation: gd-in .16s ease-out; }
@keyframes gd-in { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.gd-icon { width: 54px; height: 54px; margin: -50px auto 10px; border: 3px solid var(--gink); border-radius: 16px; background: var(--gy); display: grid; place-items: center; font-size: 26px; box-shadow: 3px 3px 0 rgba(20,32,43,.3); }
.gd-title { font-weight: 800; font-size: 18px; color: var(--gink); margin-bottom: 6px; }
.gd-text { font-size: 15px; line-height: 1.45; color: #22303c; }
.gd-list { display: grid; gap: 8px; margin-top: 14px; text-align: left; }
.gd-list button { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--gink); border-radius: 11px; padding: 9px 12px; font: inherit; font-weight: 600; color: var(--gink); cursor: pointer; }
.gd-list button:hover, .gd-list button:focus-visible { background: var(--gy-soft); outline: none; }
.gd-list kbd { font: 700 11px system-ui, sans-serif; border: 2px solid var(--gink); border-radius: 6px; padding: 1px 6px; background: var(--gp); }
.gd-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.gd-btns button { min-width: 120px; border: 2px solid var(--gink); border-radius: 12px; padding: 10px 16px; font: inherit; font-weight: 700; font-size: 15px; background: #fff; color: var(--gink); cursor: pointer; box-shadow: 3px 3px 0 rgba(20,32,43,.25); }
.gd-btns button.primary { background: var(--gy); color: #2a2000; }
.gd-btns button:hover { transform: translateY(-1px); }
.gd-btns button:focus-visible { outline: 3px solid rgba(245,180,0,.55); outline-offset: 2px; }
.gd-btns button.ghost { box-shadow: none; }

/* модальные окна: профиль, кабинеты специалистов, задания, офисы */
.modal { background: rgba(10,16,22,.55); }
.modal-box { background: var(--gp); border: 3px solid var(--gink); border-radius: 18px; box-shadow: 8px 8px 0 rgba(20,32,43,.35); }
.modal-close { top: 12px; right: 12px; width: 32px; height: 32px; border: 2px solid var(--gink); border-radius: 9px; background: #fff; color: var(--gink); font-size: 16px; font-weight: 800; display: grid; place-items: center; line-height: 1; box-shadow: 2px 2px 0 rgba(20,32,43,.25); cursor: pointer; }
.modal-close:hover { background: var(--gy-soft); }
#modal-body > :first-child { margin-right: 42px; }
.profile-actions.sticky { background: var(--gp); border-top: 2px dashed var(--gline); }
.profile-row .k, .profile-head p { color: #5b6570; }

/* вкладки */
.seg { background: #efe9dc; border: 2px solid var(--gink); border-radius: 12px; padding: 3px; }
.seg button { border-radius: 8px; color: var(--gink); font-weight: 600; }
.seg button.active { background: var(--gy); color: #2a2000; box-shadow: none; font-weight: 700; }

/* кнопки */
.btn { border: 2px solid var(--gink); border-radius: 11px; background: #fff; color: var(--gink); font-weight: 700; box-shadow: 2px 2px 0 rgba(20,32,43,.2); cursor: pointer; }
.btn:hover:not(:disabled) { background: var(--gy-soft); }
.btn.primary, .btn.warn { background: var(--gy); color: #2a2000; }
.btn.primary:hover:not(:disabled), .btn.warn:hover:not(:disabled) { background: #ffc629; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover:not(:disabled) { background: #efe9dc; }

/* поля ввода в окнах */
.modal-box input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),
.modal-box select, .modal-box textarea { border: 2px solid var(--gink); border-radius: 10px; background: #fff; }
.modal-box input:focus, .modal-box select:focus, .modal-box textarea:focus { outline: none; box-shadow: 0 0 0 3px rgba(245,180,0,.3); }

/* карточки услуг и примеры работ у специалистов */
.svc-card { background: #fff; border: 2px solid var(--gink); box-shadow: 2px 2px 0 rgba(20,32,43,.15); }
.svc-card:hover { background: #fffaf0; }
.svc-card.active { background: var(--gy-soft); border-color: var(--gink); box-shadow: 3px 3px 0 var(--gy); }
.howto { background: #fff; border: 2px dashed var(--gline); }
.case { background: #fff; border: 2px solid var(--gink); box-shadow: 2px 2px 0 rgba(20,32,43,.12); }
.seo-table th { background: #efe9dc; }

/* выпадающие панели и всплывающие подсказки */
.panel { background: var(--gp); border: 3px solid var(--gink); border-radius: 14px; box-shadow: 6px 6px 0 rgba(20,32,43,.3); }
.toast { background: var(--gink); border: 2px solid var(--gy); border-radius: 12px; box-shadow: 4px 4px 0 rgba(0,0,0,.25); }

/* вкладки профиля и экрана входа */
.tabs { background: #efe9dc; border: 2px solid var(--gink); border-radius: 12px; padding: 3px; }
.tab { border-radius: 8px; color: var(--gink); font-weight: 600; cursor: pointer; }
.tab.active { background: var(--gy); color: #2a2000; box-shadow: none; font-weight: 700; }
/* пока открыто окно — подсказка действия не светится поверх */
body:has(#modal:not([hidden])) #hint, body:has(.gd:not([hidden])) #hint { display: none !important; }

/* ═══ Воздух в окнах: единая сетка отступов 4 / 8 / 12 / 16 / 24 / 32 ═══
   Всё ниже — про пространство внутри .modal-box. Из оформления только пунктир между блоками
   и тёмная рамка у многострочных полей, как у обычных.
   Правило: внутри блока (подсказка + её кнопка) — 12–14px, между блоками — 24–28px. */
.modal-box { width: min(600px, 100%); padding: 30px 30px 26px; }
#modal-body { font-size: 15px; line-height: 1.5; }
#modal-body > h2 { padding-right: 44px; line-height: 1.25; }   /* заголовок не заезжает под крестик */
.modal-box .badge-sub { margin: 6px 0 22px; line-height: 1.45; }
.modal-box .profile-actions.sticky { bottom: -26px; padding: 16px 0 6px; margin-top: 16px; }

/* вкладки и шапка кабинета */
.modal-box .seo-tabs, .modal-box .modal-tabs { margin: 2px 0 26px; }
.modal-box .svc-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 24px; }   /* имя сверху, вкладки под ним — у всех одинаково */
.modal-box .svc-head .seo-tabs { margin: 0; }                    /* отступ под шапкой даёт сама шапка */
.modal-box .svc-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.modal-box .svc-card { gap: 6px; padding: 16px 16px 14px; }
.modal-box .svc-about { margin: 0 0 22px; font-size: 14px; line-height: 1.5; }

/* плашки-подсказки: отделены от предыдущего блока, прижаты к своей кнопке или полю */
.modal-box .note-dark, .modal-box .note-accent { margin: 26px 0 14px; padding: 14px 18px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.modal-box .fields > .note-dark, .modal-box .fields > .note-accent { margin: 0 0 18px; }
.modal-box .note-dark + .note-dark, .modal-box .note-dark + .note-accent,
.modal-box .note-accent + .note-dark, .modal-box .note-accent + .note-accent { margin-top: 12px; }

/* поля */
.modal-box .fields { gap: 0; margin-top: 18px; }
.modal-box .fields label { margin-bottom: 20px; font-size: 13.5px; line-height: 1.4; }
.modal-box .fields input:not([type=checkbox]):not([type=radio]), .modal-box .fields select, .modal-box .fields textarea { margin-top: 8px; padding: 12px 14px; line-height: 1.45; }
.modal-box .fields select { background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; }
.modal-box .fields textarea { border: 2px solid var(--gink); border-radius: 10px; background: #fff; }   /* как у остальных полей */
.modal-box .fields .check { gap: 10px; padding: 13px 16px; margin-bottom: 12px; line-height: 1.4; }
.modal-box .fields .check + label:not(.check) { margin-top: 10px; }
.modal-box .fields > p { margin: 0 0 20px; }
.modal-box .fields > :last-child { margin-bottom: 0; }
.modal-box .two-col { gap: 0 16px; }
.modal-box .doclist { gap: 8px; margin: -8px 0 20px; }

/* кнопки: больше места внутри и между ними */
.modal-box .btn { padding: 12px 20px; }
.modal-box .btn.small { padding: 8px 14px; }
.modal-box .profile-actions { gap: 12px; margin-top: 26px; }
.modal-box .note-dark + .profile-actions, .modal-box .note-accent + .profile-actions { margin-top: 14px; }
.modal-box .profile-actions + .profile-actions { margin-top: 14px; }
.modal-box .row-btns { gap: 10px; margin-top: 4px; }

/* нижняя строка отчёта («Скачать PDF», «Назад») — отделена пунктиром */
.modal-box .profile-actions:has(#seo-back), .modal-box .win-foot { margin-top: 30px; padding-top: 22px; border-top: 2px dashed var(--gline); }

/* смысловые блоки внутри окна (например, «Правки» и «SEO» у готового сайта) */
.modal-box .win-sec { margin-top: 28px; padding-top: 24px; border-top: 2px dashed var(--gline); }
.modal-box .win-sec > :first-child { margin-top: 0; }
.modal-box .win-sec > .profile-actions:last-child { margin-bottom: 0; }

/* таблицы и отчёты */
.modal-box .seo-scroll { margin: 18px 0 8px; }
.modal-box .seo-scroll > :first-child { margin-top: 0; }
.modal-box .seo-table { font-size: 14px; }
.modal-box .seo-table th { padding: 10px 12px; font-size: 13px; }
.modal-box .seo-table td { padding: 11px 12px; line-height: 1.45; vertical-align: top; }
.modal-box .seo-h { margin: 30px 0 12px; font-size: 15px; }
.modal-box .seo-list { padding-left: 20px; }
.modal-box .seo-list li { margin-bottom: 10px; line-height: 1.5; }
.modal-box .muted { font-size: 13.5px; line-height: 1.5; }
.modal-box .howto { margin: 18px 0 24px; padding: 12px 16px; }
.modal-box .howto p { margin: 10px 0 4px; }
.modal-box .error { margin: 18px 0 0; line-height: 1.45; }
.modal-box .seo-bar { margin: 16px 0; }
.modal-box .palette { margin: 12px 0 18px; }
.modal-box .banner-row { gap: 14px; margin: 14px 0 22px; }

/* карточки: примеры работ, мои отчёты, тендеры, письма */
.modal-box .case { padding: 16px 18px; margin-bottom: 14px; }
.modal-box .case p { margin-top: 6px; line-height: 1.5; }
.modal-box .letters, .modal-box .tender-list { gap: 14px; }
.modal-box .letter, .modal-box .tender { padding: 14px 18px; }
.modal-box .letter-head { gap: 8px; flex-wrap: wrap; }
.modal-box .letter p, .modal-box .tender p { margin: 8px 0 12px; line-height: 1.5; }

/* профиль, офис, кошелёк, витрина, диджей */
.modal-box .profile-head, .modal-box .company-head { gap: 20px; margin-bottom: 22px; }
.modal-box .profile-row { margin: 16px 0; }
.modal-box .profile-row .k { margin-bottom: 3px; }
.modal-box .profile-row .v .btn { margin-left: 12px; }          /* кнопка в строке («Продлить») не липнет к тексту */
.modal-box .sec { padding: 22px 0; }
.modal-box .sec h3 { margin-bottom: 14px; }
.modal-box .wallet-log { gap: 6px; }
.modal-box .wallet-row { padding: 10px 12px; }
.modal-box .prices { gap: 6px; margin-top: 16px; }
.modal-box .svc-cards { gap: 14px; }
.modal-box .svc-edit { gap: 10px; }
.modal-box .svc-row { gap: 8px; }
.modal-box .svc-row input { padding: 10px 12px; }
.modal-box .logo-row { gap: 16px; }
.modal-box .file-label { gap: 8px; }
.modal-box .dj-genres { margin-bottom: 16px; }
.modal-box .dj-lock { padding: 10px 14px; margin: 0 0 16px; }
.modal-box .dj-tracks { gap: 4px; }
.modal-box .dj-track { padding: 10px 12px; }

@media (max-width: 720px) {
  .modal-box { padding: 24px 18px 20px; }
  .modal-box .profile-actions.sticky { bottom: -20px; }
  .modal-box .two-col { grid-template-columns: 1fr; }
}

/* Визитка: плитки «чашек кофе» и «дней в квартале» */
.pstats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 20px; }
.pstat { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--gink); border-radius: 12px; padding: 12px 14px; box-shadow: 2px 2px 0 rgba(20,32,43,.12); }
.pstat > span { font-size: 26px; line-height: 1; flex: none; }
.pstat b { display: block; font-size: 20px; line-height: 1.15; color: var(--gink); }
.pstat small { display: block; margin-top: 2px; font-size: 12.5px; color: #5b6570; }

/* ═══ Главный экран: картинка на весь экран, название сверху, вход по центру ═══
   Верхняя полоса (--brand-h) — под название: текстом или нарисованное на картинке hero.jpg.
   Карточка входа — по центру оставшегося места, внизу — подсказка по управлению. */
.auth { --brand-h: clamp(120px, 24vh, 260px); display: grid; grid-template-rows: var(--brand-h) 1fr auto; justify-items: center; align-items: center; padding: 0 16px 16px; }
/* размер и сдвиг картинки считает auth.js (loadHero): название целиком, карточка сразу под подписью */
.auth.hero { background:
  linear-gradient(180deg, rgba(10,16,22,0) 45%, rgba(10,16,22,.22) 75%, rgba(10,16,22,.55) 100%),
  var(--hero) var(--hero-pos) / var(--hero-size) no-repeat, #1d2a33; }
.auth.hero.hero-short { background:           /* картинка ниже экрана (телефон) — низ плавно уходит в фон */
  linear-gradient(180deg, rgba(29,42,51,0) 55%, #1d2a33 100%) var(--hero-pos) / var(--hero-size) no-repeat,
  var(--hero) var(--hero-pos) / var(--hero-size) no-repeat, #1d2a33; }
.auth-brand { align-self: end; text-align: center; padding: 0 12px 10px; }
.auth-name { margin: 0; font-size: clamp(38px, 6.4vw, 76px); font-weight: 700; line-height: 1.02; letter-spacing: -.02em; color: var(--gy); text-shadow: 0 3px 0 var(--gink), 0 5px 0 var(--gink), 0 14px 32px rgba(0,0,0,.5); }
.auth-tag { margin: 10px 0 0; font-size: clamp(14px, 1.5vw, 18px); color: rgba(255,255,255,.88); text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.auth.name-on-image .auth-brand { visibility: hidden; }          /* название уже на картинке */
.auth-main { align-self: center; width: 100%; display: grid; justify-items: center; padding: 16px 0 24px; }
.auth-foot { max-width: 760px; padding: 10px 20px; border-radius: 999px; background: rgba(10,16,22,.62); color: #f7f4ec; font-size: clamp(14px, 1.25vw, 17px); font-weight: 500; line-height: 1.35; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.auth-foot b { color: var(--gy); font-weight: 700; }
.auth .for-touch { display: none; }
@media (pointer: coarse) { .auth .for-desk { display: none; } .auth .for-touch { display: inline; } }

/* карточка входа — в стиле игровых окон: бумага, чернильная рамка, жёсткая тень */
.auth .badge { grid-template-columns: 1fr; width: min(520px, 100%); background: var(--gp); border: 3px solid var(--gink); box-shadow: 8px 8px 0 rgba(10,16,22,.45); }
.auth .badge::before { left: 50%; top: 12px; transform: translateX(-50%); }   /* прорезь для клипсы — по центру бейджа */
.auth .badge-form { padding: 36px 32px 24px; }
.auth .btn.primary { width: 100%; }
.auth-help { margin: 12px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); text-align: center; }
/* регистрация: внешность слева, живой человечек справа */
.reg-look-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.reg-preview { margin: 4px 0 0; width: 118px; display: grid; justify-items: center; gap: 2px; padding: 8px 6px 8px; border: 2px solid var(--gink); border-radius: 12px; background: #efe8d8; }
.reg-preview canvas { width: 100px; height: 129px; }
.reg-preview figcaption { font-size: 11.5px; line-height: 1.25; color: var(--ink-soft); text-align: center; }
.auth .badge-title { font-size: 24px; }
.auth .fields input { border: 2px solid var(--gink); border-radius: 10px; padding: 10px 12px; }
.auth .fields input:focus { border-color: var(--gink); box-shadow: 0 0 0 3px rgba(245,180,0,.35); }

@media (max-width: 720px) {
  .auth { --brand-h: clamp(96px, 18vh, 170px); align-items: center; padding: 0 12px 12px; }
  .auth .badge-form { padding: 32px 18px 20px; }
  .auth-foot { border-radius: 12px; padding: 8px 14px; }
  .auth .badge-title { font-size: 22px; }
  /* телефон: человечек строкой над выбором внешности */
  .reg-look-wrap { grid-template-columns: 1fr; gap: 10px; }
  .reg-preview { order: -1; width: auto; margin: 0; grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; padding: 6px 14px 6px 8px; }
  .reg-preview canvas { width: 64px; height: 82px; }
  .reg-preview figcaption { font-size: 13px; text-align: left; }
  .auth .tab { white-space: nowrap; font-size: 14px; padding: 8px 6px; }
}

/* ═══ Телефон и планшет: крестовина слева, действие / чат / жест справа ═══ */
.ico-m { display: none; }
.dpad { position: absolute; left: calc(16px + env(safe-area-inset-left)); bottom: calc(18px + env(safe-area-inset-bottom)); width: 156px; height: 156px; z-index: 5; touch-action: none; user-select: none; -webkit-user-select: none; }
.dp { position: absolute; width: 54px; height: 54px; display: grid; place-items: center; font-size: 17px; color: var(--gink); background: rgba(247,244,236,.9); border: 2px solid var(--gink); border-radius: 13px; box-shadow: 2px 3px 0 rgba(20,32,43,.35); pointer-events: none; transition: background .08s, transform .08s; }
.dp.up { left: 51px; top: 0; } .dp.down { left: 51px; bottom: 0; }
.dp.left { left: 0; top: 51px; } .dp.right { right: 0; top: 51px; }
.dp.on { background: var(--gy); transform: scale(.94); }
.dp-core { position: absolute; left: 60px; top: 60px; width: 36px; height: 36px; border-radius: 50%; background: rgba(20,32,43,.35); border: 2px solid rgba(247,244,236,.6); pointer-events: none; }
.action-btn { right: calc(18px + env(safe-area-inset-right)); bottom: calc(26px + env(safe-area-inset-bottom)); width: 72px; height: 72px; border: 3px solid var(--gink); box-shadow: 3px 4px 0 rgba(20,32,43,.4); font-size: 26px; z-index: 5; }
.touch-btns { position: absolute; right: calc(24px + env(safe-area-inset-right)); bottom: calc(112px + env(safe-area-inset-bottom)); display: grid; gap: 10px; z-index: 5; }
.touch-btns button { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--gink); background: rgba(247,244,236,.92); font-size: 24px; line-height: 1; box-shadow: 2px 3px 0 rgba(20,32,43,.35); }
.touch-btns button:active { background: var(--gy); }
#t-chat.unread::after { content: ''; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #d64545; border: 2px solid #fff; }

@media (pointer: coarse) {
  .chat.collapsed { display: none; }                                   /* свёрнутый чат — за кнопкой 💬 */
  .chat:not(.collapsed) { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-width: none; height: min(52vh, 380px); z-index: 9; }
  .game:has(.chat:not(.collapsed)) .dpad, .game:has(.chat:not(.collapsed)) .touch-btns, .game:has(.chat:not(.collapsed)) .action-btn { display: none; }
  .game .action-btn, .game:has(.chat:not(.collapsed)) .action-btn { bottom: calc(26px + env(safe-area-inset-bottom)); }
  .hint { bottom: calc(190px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px); white-space: normal; text-align: center; }
}

/* узкий экран: в верхней панели только значки */
@media (max-width: 720px) {
  .topbar { padding: 8px; gap: 6px; }
  .topbar-side { gap: 5px; }
  .topbar .chip { padding: 7px 10px; }
  .topbar .lbl { display: none; }
  .topbar .ico-m { display: inline; }
  .room-title { top: 58px; }
}
@media (max-height: 460px) and (pointer: coarse) {                   /* телефон боком */
  .dpad { transform: scale(.85); transform-origin: left bottom; }
  .touch-btns { grid-auto-flow: column; bottom: calc(26px + env(safe-area-inset-bottom)); right: calc(104px + env(safe-area-inset-right)); }
  .hint { bottom: calc(24px + env(safe-area-inset-bottom)); }
  .room-title { display: none; }
}

/* ═══ Гардероб в офисе ═══ */
.wr-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-bottom: 6px; }
.wr-me { width: 96px; height: 124px; border: 2px solid var(--gink); border-radius: 12px; background: radial-gradient(circle at 50% 35%, #fff7e0, #efe8d8 70%); }
.wr-title { margin: 0 0 10px; font-size: 15px; }
.wr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.wr-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 12px; border: 2px solid #e2dccd; border-radius: 12px; background: #fbf8f1; text-align: center; }
.wr-card > .btn, .wr-card > .wr-on { margin-top: auto; }
.wr-card { position: relative; }
.wr-zoom { position: absolute; top: 20px; right: 6px; width: 46px; height: 46px; pointer-events: none; }
.wr-card.has-zoom .wr-fig { margin-right: 40px; }             /* фигура левее, крупный план справа — не закрывает голову */
.wr-card b { font-size: 13px; line-height: 1.25; font-weight: 600; }
.wr-card small { font-size: 12px; line-height: 1.35; color: var(--ink-soft); text-align: left; }
.wr-card .btn { width: 100%; margin: 2px 0 0; padding: 7px 10px; font-size: 13px; }
.wr-card.on { border-color: var(--gy); background: #fff8dc; }
.wr-card.special { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; justify-items: start; align-items: start; text-align: left; column-gap: 14px; row-gap: 6px; }
.wr-card.special .wr-fig { grid-row: span 3; }
.wr-card.special > .btn { width: auto; margin-top: 0; }
.wr-fig { width: 84px; height: 104px; }
.wr-on { font-size: 12.5px; font-weight: 700; color: #7a5a00; padding: 7px 0 0; }
.outfit-note { margin: 10px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.outfit-note .btn { width: auto; margin: 0; padding: 6px 12px; }

/* ═══ Визитки: контакты ссылками, визитница ═══ */
.cc-list { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.cc { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1.5px solid #e2dccd; border-radius: 999px; background: #fffdf8; color: var(--ink); font-size: 13px; text-decoration: none; word-break: break-all; }
a.cc:hover { border-color: var(--gy); background: #fff8dc; }
.cc-text { word-break: normal; }
.card-ok { font-size: 13px; font-weight: 600; color: #2f7a5b; padding: 8px 4px; }
.card-hint { margin: 12px 0 0; font-size: 12.5px; }
.cards-head { display: grid; gap: 10px; margin-bottom: 14px; }
.cards-search { padding: 9px 12px; border: 2px solid #e2dccd; border-radius: 10px; font-size: 14px; background: #fffdf8; }
.cards-search:focus { outline: none; border-color: var(--gy); }
.cards-list { display: grid; gap: 12px; }
.bcard { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 14px 16px; border: 2px solid var(--gink); border-radius: 14px; background: #fffdf6; box-shadow: 4px 4px 0 rgba(20,32,43,.12); }
.bcard-ava { display: grid; place-items: center; align-self: start; width: 64px; height: 76px; border-radius: 10px; background: #f3ecdc; overflow: hidden; }
.bcard-ava .pixel-photo { width: 64px; height: 76px; object-fit: cover; }
.bcard-name { font-size: 16px; }
.bcard-role { font-size: 13px; color: var(--ink-soft); margin: 2px 0 6px; }
.bcard-about { margin: 0 0 8px; font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e2dccd; }
.bcard-btns { display: flex; gap: 6px; }
.bcard-btns .btn { width: auto; margin: 0; }
.cards-empty { margin-top: 6px; padding: 14px 16px; border: 2px dashed #e2dccd; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.cards-empty p { margin: 0 0 6px; }
@media (max-width: 520px) { .bcard { grid-template-columns: 1fr; } .bcard-ava { width: 56px; height: 66px; } }

/* ═══ О Деловарне: история, польза, как начать, правила ═══ */
.about-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.about-hero h2 { margin: 0 0 4px; font-size: 22px; }
.about-logo { flex: none; width: 54px; height: 54px; display: grid; place-items: center; font-size: 28px; border-radius: 16px; background: var(--gy); border: 3px solid var(--gink); box-shadow: 3px 3px 0 rgba(20,32,43,.18); }
.about-story p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.55; }
.about-story p:last-child { margin-bottom: 0; }
.about-h { margin: 0 0 12px; font-size: 16px; }
.about-values { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.about-value { display: flex; gap: 10px; padding: 10px 12px; border: 2px solid #e2dccd; border-radius: 12px; background: #fffdf8; }
.about-value > span { font-size: 22px; line-height: 1.2; }
.about-value b { display: block; font-size: 14px; margin-bottom: 2px; }
.about-value p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.about-steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 10px; }
.about-steps li { counter-increment: st; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; }
.about-steps li::before { content: counter(st); grid-row: span 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--gy); border: 2px solid var(--gink); font-weight: 700; font-size: 14px; }
.about-steps.rules li::before { background: #fde2e4; }
.about-steps b { font-size: 14.5px; padding-top: 5px; }
.about-steps p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.about-note p { margin: 0; font-size: 13.5px; line-height: 1.5; }

/* Окно выбора у персонажа: позицию считает placeChoice (main.js) — над персонажем, под ним или где влезает */
.choice { transform: translateX(-50%); }
.choice::after { left: var(--arrow-x, 50%); }
.choice.below::after { bottom: auto; top: -11px; transform: translateX(-50%) rotate(225deg); }
.choice.side-r::after { left: -11px; top: var(--arrow-y, 50%); bottom: auto; transform: translateY(-50%) rotate(135deg); }
.choice.side-l::after { left: auto; right: -11px; top: var(--arrow-y, 50%); bottom: auto; transform: translateY(-50%) rotate(-45deg); }
.choice.free::after { display: none; }
.choice.free { max-height: calc(100vh - 72px); overflow: auto; }

/* ═══ Пополнение монет (ui/topup.js), кошелёк, согласия и реквизиты на экране входа ═══ */
/* «+» прилипает к счётчику монет: вместе — одна пилюля */
.chip.coins:has(+ .chip.topup) { border-radius: 999px 0 0 999px; padding-right: 9px; }
.chip.topup { margin-left: -6px; border-radius: 0 999px 999px 0; padding: 0 12px 0 9px; height: 32px; background: var(--gy); color: var(--gink); font-size: 20px; font-weight: 700; line-height: 1; box-shadow: inset 2px 0 0 #3a2c00; }
.chip.topup:hover { background: #ffc933; }
.topbar .chip.coins, .topbar .chip.topup { height: 32px; }

.btn.tu-go { background: var(--gy); color: var(--gink); border-color: var(--gink); }
.btn.tu-go:hover:not(:disabled) { background: #ffc933; }
.btn.tu-go:disabled { opacity: .55; cursor: default; }

/* кошелёк и баланс в визитке */
.wal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 10px; }
.wal-bal { display: inline-flex; align-items: center; gap: 8px; }
.wal-bal .coin { width: 28px; height: 28px; }
.wal-bal b { font-size: 30px; line-height: 1; letter-spacing: -.01em; }
.wal-bal span { color: var(--ink-soft); font-size: 15px; }
.wal-top .btn.tu-go { width: auto; margin: 0; }
.modal-box .wal-note { margin: 0; }
.bal-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }
.bal-row .wal-bal b { font-size: 24px; }
.bal-row .wal-bal .coin { width: 22px; height: 22px; }
.bal-row .wal-bal { margin-right: auto; }
.tu-docs { margin: 18px 0 0; font-size: 13px; color: var(--ink-soft); }
.tu-docs a, .tu-agree a, .tu-safe a, .agree a { color: #8a5d00; text-underline-offset: 2px; }

/* пакеты */
.modal-box .tu-mode, .modal-box .tu-need { margin: 0 0 16px; }
.tu-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 18px; }
.tu-pack { position: relative; display: grid; justify-items: start; gap: 2px; padding: 12px 12px 10px; border: 2px solid var(--gink); border-radius: 14px; background: #fff; text-align: left; box-shadow: 2px 2px 0 rgba(20,32,43,.15); transition: transform .08s, box-shadow .08s, background .12s; }
.tu-pack:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(20,32,43,.2); }
.tu-pack.on { background: var(--gy-soft); box-shadow: 0 0 0 3px var(--gy), 3px 3px 0 rgba(20,32,43,.25); }
.tu-pack.on::after { content: '✓'; position: absolute; top: 8px; right: 10px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--gink); color: var(--gy); font-size: 13px; font-weight: 700; }
.tu-pack-c { display: inline-flex; align-items: center; gap: 6px; }
.tu-pack-c b { font-size: 21px; line-height: 1.1; }
.tu-pack-r { font-weight: 700; font-size: 15px; color: var(--gink); }
.tu-pack-h { font-size: 12px; line-height: 1.3; color: var(--ink-soft); min-height: 16px; }

/* своя сумма: − [сумма] + и «накликать» +100 / +500 … */
.tu-custom { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 14px; padding: 14px; border: 2px dashed var(--gline); border-radius: 14px; }
.tu-custom-l { font-size: 14px; font-weight: 500; }
.tu-step { display: flex; align-items: stretch; justify-self: start; border: 2px solid var(--gink); border-radius: 12px; background: #fff; overflow: hidden; }
.tu-step button { width: 44px; border: 0; background: #efe8d8; font-size: 22px; font-weight: 700; color: var(--gink); }
.tu-step button:hover { background: var(--gy-soft); }
.modal-box .tu-step input { width: 120px; border: 0 !important; border-radius: 0 !important; border-left: 2px solid var(--gink) !important; border-right: 2px solid var(--gink) !important; padding: 9px 8px; text-align: center; font-size: 20px; font-weight: 700; box-shadow: none !important; }
.tu-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.tu-chip { border: 2px solid var(--gink); border-radius: 999px; background: #fff; padding: 6px 12px; font-size: 13.5px; font-weight: 700; color: var(--gink); }
.tu-chip:hover { background: var(--gy-soft); }
.tu-chip:active { transform: translateY(1px); }
.tu-chip.ghost { border-color: var(--gline); color: var(--ink-soft); font-weight: 500; }

/* итог */
.tu-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 6px; padding: 14px 18px; border-radius: 14px; background: var(--gink); color: #fff; }
.tu-sum small { display: block; font-size: 12.5px; color: #c9d2d0; }
.tu-sum b { font-size: 22px; line-height: 1.2; }
.tu-sum div:last-child { text-align: right; }
.tu-sum div:last-child b { color: var(--gy); }
.tu-warn { margin: 6px 0 0; color: var(--danger); font-size: 13.5px; }
.modal-box .tu-fields { margin-top: 16px; }
.modal-box .tu-fields label:not(.check) { margin-bottom: 14px; }
.modal-box .fields .check.tu-agree, .tu-agree { align-items: flex-start; }
.tu-agree input { margin-top: 3px !important; flex: none; width: 18px !important; height: 18px; accent-color: var(--gink); }
.tu-agree span { font-size: 13.5px; line-height: 1.45; }
.btn.tu-go#tu-go { width: 100%; margin-top: 14px; padding: 14px 20px; font-size: 16px; }
.tu-safe { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); text-align: center; }

/* история пополнений */
.tu-hist { display: grid; gap: 6px; }
.tu-hrow { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: #fff; border: 1px solid var(--gline); border-radius: 10px; font-size: 13.5px; }
.tu-hrow > span:first-child { color: var(--ink-soft); }
.tu-st { font-style: normal; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: #eee; }
.tu-st.ok { background: #d9f2e4; color: #1d6b43; } .tu-st.wait { background: var(--gy-soft); color: #6b4d00; } .tu-st.off { background: #f1e3e3; color: #8a2f2f; }

/* итог оплаты после возврата из ЮKassa */
.tu-result { text-align: center; padding: 8px 0 0; }
.tu-result h2 { padding: 0 !important; margin: 10px 0 8px; }
.tu-result p { max-width: 420px; margin: 0 auto; }
.tu-result .profile-actions { justify-content: center; }
.tu-big { font-size: 54px; line-height: 1; }
.tu-spin { display: inline-block; animation: tu-spin 1.1s linear infinite; }
.tu-spin .coin { width: 54px; height: 54px; }
@keyframes tu-spin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }

/* «Не хватает монет» под верхней панелью */
.need-coins { position: absolute; top: 58px; left: 12px; z-index: 9; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; background: var(--gink); color: #fff; border: 2px solid var(--gy); border-radius: 12px; box-shadow: 4px 4px 0 rgba(0,0,0,.25); font-size: 14px; animation: nc-in .2s ease-out; }
.need-coins b { color: var(--gy); }
.need-coins .btn.small { width: auto; margin: 0; padding: 6px 12px; font-size: 13px; }
.nc-x { border: 0; background: transparent; color: #c9d2d0; font-size: 20px; line-height: 1; padding: 0 4px; }
@keyframes nc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* регистрация: согласия (галочки не стоят заранее — так требует 152-ФЗ) */
.reg-agree { display: grid; gap: 8px; margin-top: 2px; }
.agree { display: flex !important; align-items: flex-start; gap: 10px !important; padding: 9px 12px; border-radius: 10px; background: #efe8d8; color: var(--ink) !important; font-size: 13px !important; line-height: 1.4; cursor: pointer; }
.agree input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--gink); }

/* низ экрана входа: ценность + реквизиты и документы */
.auth-bottom { display: grid; justify-items: center; gap: 8px; width: 100%; }
.auth-bottom .auth-foot { margin: 0; }
.auth-legal { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; max-width: min(1120px, 100%); padding: 6px 14px; border-radius: 10px; background: rgba(10,16,22,.55); color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.4; }
.auth-legal a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 2px; }
.auth-legal a:hover { color: var(--gy); }
.auth-legal .age { display: inline-grid; place-items: center; height: 20px; padding: 0 5px; border: 1.5px solid rgba(255,255,255,.8); border-radius: 5px; font-weight: 700; font-size: 11px; color: #fff; }

@media (max-width: 560px) {
  .tu-packs { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tu-custom { grid-template-columns: 1fr; }
  .modal-box .tu-step input { width: 100px; }
  .tu-sum b { font-size: 19px; }
  .need-coins { top: 52px; left: 8px; right: 8px; }
  .auth-legal { gap: 2px 10px; font-size: 11.5px; }
}

/* Уведомление о cookie на экране входа (auth.js → cookieNotice) */
.cookie-note { position: fixed; left: 16px; bottom: 16px; z-index: 30; display: flex; align-items: center; gap: 12px; max-width: min(520px, calc(100vw - 32px)); padding: 10px 10px 10px 16px; background: var(--gp); color: var(--gink); border: 2px solid var(--gink); border-radius: 12px; box-shadow: 4px 4px 0 rgba(0,0,0,.3); font-size: 13px; line-height: 1.4; }
.cookie-note a { color: #8a5d00; }
.cookie-note .btn { flex: none; width: auto; margin: 0; padding: 7px 14px; background: var(--gy); }
@media (max-width: 560px) { .cookie-note { left: 8px; right: 8px; bottom: 8px; max-width: none; } }
