/* ================= Шапка меню: ширина как у блока плиток, логотип и сезон по центру ================= */
#menu .menu-top {
  width: var(--menu-w, min(1180px, 100%)); margin: 0 auto;
  /* боковые колонки строго равные — логотип всегда по центру, что бы ни появилось справа */
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px;
}
/* «Установить» в шапке меню — только значок (текст в подсказке), чтобы шапка не разъезжалась */
#menu #installBtn span { display: none; }
#menu .menu-top .topnav { justify-self: start; }
.top-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.top-right .top-tools { margin-left: 0; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.brand .topbar-logo { display: flex; }
/* логотип в одну строку: «ASTRO B●OM» */
.brand .topbar-logo svg { height: 60px; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); }
#menu .tiles { margin-top: 14px; }
/* высокий экран ПК: плитки с кнопками сообщества — по центру свободного места под шапкой (auto-отступы) */
@media (min-width: 901px) and (min-height: 801px) {
  #menu .tiles { margin-top: auto; }
  #menu .menu-top { margin-bottom: 14px; }
  #menu .menu-footer { margin-bottom: auto; }
}


.menu-footer { flex-direction: row; justify-content: center; gap: 14px; padding-top: 12px; }
.feedback-btn {
  background: rgba(0,0,0,.4); color: #ffe2b0; border: 1px solid rgba(255,173,66,.4); border-radius: 999px;
  padding: 7px 16px; font-weight: 700; font-size: 13px;
}
.feedback-btn:hover { background: rgba(255,154,46,.2); }

.gm-badge { background: linear-gradient(90deg, #ffd23f, #ff9a2e) !important; color: #2a1800 !important; font-weight: 800; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.msg .gm-tag { display: inline-block; margin-right: 5px; padding: 0 4px; border-radius: 3px; background: #ffd23f; color: #2a1800; font-size: 10px; font-weight: 800; }

/* ================= Страницы ================= */
#page { display: flex; flex-direction: column; padding: 18px 34px 0; }
.page-top { width: min(1180px, 100%); margin: 0 auto; gap: 14px; flex-wrap: wrap; }
.page-title { margin: 0; font-family: var(--font-display); font-size: 28px; letter-spacing: 1px; text-transform: uppercase; color: #fff; flex: 1; }
.page-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.page-tools .chip-btn.on { background: var(--accent); border-color: transparent; color: #fff; }
.page-body { flex: 1; min-height: 0; overflow-y: auto; width: min(1180px, 100%); margin: 14px auto 0; padding-bottom: 30px; }
.page-loading { color: var(--muted); padding: 40px 0; text-align: center; }

/* «Как играть» на странице */
.page-wiki .wiki { grid-template-columns: 210px 1fr; min-height: 100%; }
.page-wiki .wiki-nav { position: sticky; top: 0; align-self: start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.page-wiki .wiki-body { overflow: visible; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.page-wiki .wiki-title { color: #fff !important; }
.page-wiki .wiki-body p { color: #d5d8e0; }

/* «Обновления» на странице */
.patch-page { display: flex; flex-direction: column; gap: 14px; max-width: 860px; margin: 0 auto; }
.patch-page .patch-item { background: var(--panel); border: 1px solid var(--line); padding: 18px 22px; border-radius: 14px; }
.patch-page .patch-version { font-size: 22px; }
.patch-page .patch-item li { font-size: 14px; }

/* ================= Комнаты ================= */
.rooms-empty b, .hist-empty b { color: #fff; font-size: 17px; }
/* оформление как в лобби: HUD-панели (.hud-card в lobby.css), скошенные строки, линейные иконки */
.rooms-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.ri { display: inline-flex; flex-shrink: 0; }
.rm-filter { display: inline-flex; align-items: center; gap: 6px; }
.rm-panel { min-height: 320px; }
.rm-count { font-size: 12px; color: #9fdcf0; letter-spacing: .5px; }
.rm-list { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.rm-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 10px 12px;
  background: linear-gradient(90deg, rgba(94,224,255,.08), rgba(255,255,255,.02));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  border-left: 3px solid rgba(94,224,255,.5); transition: background .15s;
}
.rm-row:hover { background: linear-gradient(90deg, rgba(94,224,255,.16), rgba(255,255,255,.04)); }
.rm-row.live { border-left-color: #ff9a2e; }
.rm-mode {
  width: 48px; height: 48px; display: grid; place-items: center; color: #5ee0ff;
  background: rgba(94,224,255,.1); border: 1px solid rgba(94,224,255,.35);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.rm-row.tour .rm-mode { color: #ffd23f; background: rgba(255,210,63,.1); border-color: rgba(255,210,63,.4); }
.rm-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 16px; color: #fff; }
.rm-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; }
.rm-tag.lock { background: rgba(255,255,255,.1); color: #d8dbe5; }
.rm-tag.gm { background: rgba(255,210,63,.2); color: #ffd23f; }
.rm-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.rm-sub > span { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.rm-seats { display: flex; align-items: center; gap: 3px; }
.rm-seats i { width: 9px; height: 16px; border-radius: 2px; background: rgba(255,255,255,.1); transform: skewX(-12deg); }
.rm-seats i.p { background: #c6ff3d; box-shadow: 0 0 6px rgba(198,255,61,.5); }
.rm-seats i.b { background: #5ee0ff; }
.rm-seats b { margin-left: 6px; font-family: var(--font-display); font-size: 15px; color: #dfe4f0; font-variant-numeric: tabular-nums; }
.rm-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.rm-state i { width: 8px; height: 8px; border-radius: 50%; }
.rm-state.lobby { color: #7dffb0; } .rm-state.lobby i { background: #2ecc71; box-shadow: 0 0 8px #2ecc71; }
.rm-state.live { color: #ffbf73; } .rm-state.live i { background: #ff9a2e; box-shadow: 0 0 8px #ff9a2e; animation: tsPulse 1s ease-in-out infinite; }
.rm-actions { display: flex; gap: 6px; }
.rm-actions .btn-ghost { padding: 9px 14px; }
/* «Войти» — маленькая копия кнопки «Играть» из лобби */
.rm-join {
  border: none; cursor: pointer; padding: 10px 22px 10px 24px; font-family: var(--font-display); font-size: 16px; letter-spacing: 1.5px; text-transform: uppercase;
  background: linear-gradient(90deg, #c6ff3d, #7ed321); color: #0e1a08; box-shadow: 0 0 16px rgba(198,255,61,.25);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: filter .15s, transform .1s;
}
.rm-join:hover { filter: brightness(1.1); transform: translateY(-1px); }
.rm-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 50px 20px; color: var(--muted); }
.rm-empty-ico { color: #5ee0ff; opacity: .8; filter: drop-shadow(0 0 12px rgba(94,224,255,.5)); }
.rm-empty b { color: #fff; font-size: 17px; }
.rm-create-card { position: sticky; top: 0; }
.rm-form { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 16px; }
.rm-form .set-group-title { margin: 6px 2px 0; }
.rm-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rm-kind {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; cursor: pointer; color: #aab3c6;
  background: rgba(94,224,255,.05); border: 1px solid rgba(94,224,255,.2); font: 700 13px var(--font-ui, Inter, sans-serif);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); transition: background .15s, color .15s;
}
.rm-kind-art { display: inline-flex; width: 40px; height: 40px; filter: grayscale(.8) brightness(.7); transition: filter .15s, transform .15s; }
.rm-kind-art svg { width: 100%; height: 100%; }
.rm-kind:hover { color: #fff; background: rgba(94,224,255,.1); }
.rm-kind.on { color: #fff; background: rgba(94,224,255,.16); border-color: #5ee0ff; box-shadow: inset 0 0 18px rgba(94,224,255,.2); }
.rm-kind.on .rm-kind-art, .rm-kind:hover .rm-kind-art { filter: drop-shadow(0 0 8px rgba(94,224,255,.5)); transform: scale(1.06); }
.rm-mode svg { width: 34px; height: 34px; display: block; }
.rm-hint { font-size: 12px; color: #aab0c0; line-height: 1.4; }
.rm-form input { padding: 10px 12px; font-size: 15px; }
.rm-form .set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; margin-top: 4px; background: rgba(94,224,255,.05); border-radius: 2px; }
.rm-lock { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.rm-create { width: 100%; min-width: 0 !important; margin-top: 8px; padding: 13px !important; font-size: 21px !important; }

/* ================= Сезон ================= */
.page-season, .page-rating { display: flex; flex-direction: column; gap: 14px; }
.page-season > *, .page-rating > * { flex-shrink: 0; }
.season-hero {
  position: relative; overflow: hidden; display: flex; gap: 24px; align-items: center;
  padding: 26px 28px; border-radius: 18px;
  background: radial-gradient(ellipse at 15% 30%, color-mix(in srgb, var(--sc) 45%, transparent), transparent 60%), linear-gradient(135deg, #2b1a3e, #171a28);
  border: 1px solid color-mix(in srgb, var(--sc) 50%, transparent);
}
.sh-emblem {
  flex-shrink: 0; width: 110px; height: 110px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ffe8a8, var(--sc) 55%, #6a2a00); box-shadow: 0 0 40px color-mix(in srgb, var(--sc) 70%, transparent);
  font-family: var(--font-display); font-size: 54px; color: #2a1200; animation: emblemPulse 3s ease-in-out infinite;
}
@keyframes emblemPulse { 50% { box-shadow: 0 0 64px color-mix(in srgb, var(--sc) 90%, transparent); } }
.sh-kicker { font-family: var(--font-display); letter-spacing: 3px; text-transform: uppercase; color: var(--sc); }
.sh-text h1 { margin: 0; font-family: var(--font-display); font-size: 46px; letter-spacing: 1px; text-transform: uppercase; line-height: 1.05; }
.sh-tag { color: #ffd9a8; font-weight: 700; margin-top: 2px; }
.sh-text p { margin: 8px 0; color: #d5d8e0; max-width: 70ch; line-height: 1.5; }
.sh-time { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.sh-time b { color: #fff; }
.sh-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); margin-top: 8px; max-width: 520px; overflow: hidden; }
.sh-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sc), #ffd23f); }
.sh-trailer { margin-top: 12px; }
.season-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.season-card h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 21px; letter-spacing: 1px; text-transform: uppercase; }
.season-card .muted { margin: 0 0 10px; }
.sp-stats { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sp-stats .st { background: rgba(255,255,255,.05); border-radius: 10px; padding: 10px 18px; text-align: center; }
.sp-stats .st b { display: block; font-size: 22px; }
.sp-stats .st span { font-size: 12px; color: var(--muted); }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.reward-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px;
  padding: 14px 12px; border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 25%, #141826), #121522);
  border: 2px solid color-mix(in srgb, var(--rc) 70%, transparent);
}
.reward-card.done { box-shadow: 0 0 22px color-mix(in srgb, var(--rc) 55%, transparent); }
.rw-name { font-family: var(--font-display); font-size: 19px; }
.rw-rarity { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--rc); }
.rw-cond { font-size: 13px; color: #d5d8e0; margin-top: 4px; }
.rw-state { font-size: 12px; font-weight: 700; color: #7dff9b; margin-top: 4px; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.mode-card { display: flex; gap: 12px; background: rgba(255,255,255,.04); border-radius: 12px; padding: 12px; }
.mc-ico { font-size: 30px; }
.mc-name { font-weight: 800; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mc-status { font-size: 10.5px; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: rgba(255,173,66,.2); color: #ffbf73; }
.mc-text { font-size: 13px; color: #c8ccd8; margin-top: 3px; line-height: 1.45; }
.level-ladder { display: flex; flex-wrap: wrap; gap: 8px; }
.ll-step { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); min-width: 58px; }
.ll-step small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.ll-step b { font-size: 12.5px; white-space: nowrap; }
.ll-step { min-width: 86px; }
.ll-step.me { background: rgba(232,135,30,.2); box-shadow: 0 0 0 2px rgba(232,135,30,.6); }
.top-table { display: flex; flex-direction: column; gap: 4px; }
.tt-row { display: grid; grid-template-columns: 34px 30px 1fr auto auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.03); }
.tt-row.me { background: rgba(232,135,30,.18); }
.tt-place { font-family: var(--font-display); font-size: 18px; text-align: center; color: var(--muted); }
.tt-row:nth-child(1) .tt-place { color: #ffd23f; }
.tt-row:nth-child(2) .tt-place { color: #d8dee8; }
.tt-row:nth-child(3) .tt-place { color: #e08a4a; }
.tt-name { font-weight: 700; }
.tt-num { font-variant-numeric: tabular-nums; font-size: 13px; }

/* ================= Отзыв ================= */
.feedback-box { max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
.fb-head { display: flex; justify-content: space-between; align-items: center; }
.fb-head h3 { margin: 0 !important; }
.fb-lead { margin: 0 !important; }
.fb-topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fb-topics button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  background: rgba(255,255,255,.04); border: 2px solid var(--line); border-radius: 12px; padding: 10px 6px; color: var(--text);
}
.fb-topics button span { font-size: 24px; }
.fb-topics button b { font-size: 13.5px; }
.fb-topics button small { font-size: 11px; color: var(--muted); }
.fb-topics button.on { border-color: var(--accent); background: rgba(232,135,30,.15); }
.feedback-box textarea {
  width: 100%; background: #0f1220; color: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; font: inherit; font-size: 15px; resize: vertical; outline: none;
}
.feedback-box textarea:focus { border-color: var(--accent); }
.feedback-box .btn-primary.wide { margin-top: 2px; }
#promptForm input { margin-top: 6px; }

/* ================= Чат лобби ================= */
.players-card { display: flex; flex-direction: column; }
#playerList { flex: 1 1 auto; }
.lobby-chat { border-top: 1px solid var(--line); display: flex; flex-direction: column; flex: 0 0 auto; min-height: 0; }
.lc-log { height: 132px; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 3px; }
.lc-log:empty::before { content: 'Чат комнаты: договоритесь о правилах или поздоровайтесь'; color: var(--muted); font-size: 12.5px; }
.lc-log .msg { font-size: 13px; line-height: 1.35; word-wrap: break-word; }
.lc-log .msg b { margin-right: 2px; }
.lc-form { display: flex; gap: 6px; padding: 6px 10px 10px; }
.lc-form input { padding: 8px 10px; font-size: 14px; }
.lc-form button { flex-shrink: 0; }

/* ================= Персонаж: вкладки и история матчей ================= */
.char-history { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.re-ico { display: inline-flex; color: #5ee0ff; opacity: .85; filter: drop-shadow(0 0 10px rgba(94,224,255,.45)); }
.hist-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 40px 20px; color: var(--muted); }
.hist-summary { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.hist-summary b { color: #fff; }
.hist-list { display: flex; flex-direction: column; gap: 5px; }
.hist-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 70px 64px 70px 34px; gap: 10px; align-items: center; text-align: left;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-left: 4px solid #e74c3c; border-radius: 9px; padding: 7px 10px; color: var(--text);
}
.hist-row.win { border-left-color: #2ecc71; }
.hist-row:hover { background: rgba(255,255,255,.08); }
.hist-row b { display: block; font-size: 14px; }
.hist-row small { display: block; font-size: 11px; color: var(--muted); }
.hr-result { font-family: var(--font-display); font-size: 16px; letter-spacing: .5px; text-transform: uppercase; color: #ff8a7a; }
.hist-row.win .hr-result { color: #7dff9b; }
.hr-drop i { display: inline-flex; width: 26px; height: 26px; border-radius: 6px; align-items: center; justify-content: center; font-style: normal; font-size: 14px; }
.md-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: linear-gradient(90deg, rgba(231,76,60,.25), transparent); border: 1px solid var(--line); }
.md-head.win { background: linear-gradient(90deg, rgba(46,204,113,.28), transparent); }
.md-title b { display: block; font-family: var(--font-display); font-size: 26px; letter-spacing: 1px; }
.md-title small { color: var(--muted); font-size: 12px; }
.md-facts { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.md-facts b { color: #fff; }
.md-sub { font-size: 12.5px; color: var(--muted); }
.score { display: flex; flex-direction: column; gap: 3px; overflow-x: auto; }
.sc-row { display: grid; grid-template-columns: 30px minmax(150px, 1.6fr) repeat(5, minmax(52px, .55fr)) minmax(90px, .9fr) minmax(90px, 1fr); gap: 8px; align-items: center; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.035); font-size: 13.5px; font-variant-numeric: tabular-nums; min-width: 760px; }
.sc-head { background: transparent; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.sc-row.win { background: rgba(46,204,113,.1); }
.sc-row.me { box-shadow: inset 0 0 0 1px rgba(255,173,66,.6); }
.sc-place { font-family: var(--font-display); font-size: 17px; text-align: center; }
.sc-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-drop i { font-style: normal; font-weight: 700; font-size: 12px; }

/* ================= Адаптив ================= */
@media (max-width: 1000px) {
  #menu .menu-top { grid-template-columns: auto 1fr auto; }
  .brand .topbar-logo svg { height: 44px; }
  .rooms-layout { grid-template-columns: 1fr; }
  .rm-create-card { position: static; order: -1; }
}
@media (max-height: 520px) and (orientation: landscape) {
  /* телефон горизонтально: логотип слева, сезон рядом, всё в одну строку */
  #menu .menu-top { display: flex; }
  .brand { flex-direction: row; gap: 8px; order: -1; }
  .brand .topbar-logo svg { height: 30px; }
  .top-right { margin-left: auto; gap: 6px; }
  #menu .tiles { margin-top: 8px; }
  /* шапка в одну строку: у разделов только значки */
  #menu .nl-txt { display: none; }
  #menu .nl-ico { display: inline; font-size: 18px; }
  #menu .tool-btn span { display: none; }
  #menu .profile-name { max-width: 90px; }
  .menu-footer { position: fixed; left: calc(14px + env(safe-area-inset-left)); bottom: 2px; padding: 0; z-index: 3; gap: 10px; }
  .feedback-btn { padding: 2px 10px; font-size: 11px; }
  #page { padding: calc(6px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left)); }
  .page-title { font-size: 20px; }
  .page-body { margin-top: 8px; }
  .page-wiki .wiki { grid-template-columns: 150px 1fr; }
  .season-hero { padding: 14px 16px; gap: 14px; }
  .sh-emblem { width: 70px; height: 70px; font-size: 34px; }
  .sh-text h1 { font-size: 30px; }
  .lc-log { height: 70px; }
  .hist-row { grid-template-columns: 80px minmax(0, 1fr) 56px 54px 56px 30px; gap: 6px; }
}
@media (max-width: 700px) and (orientation: portrait) {
  #menu .menu-top { display: flex; flex-wrap: wrap; }
  .brand { order: 0; flex-direction: row; gap: 8px; width: 100%; justify-content: space-between; }
  .brand .topbar-logo svg { height: 36px; }
  #menu .menu-top .topnav { order: 1; width: 100%; }
  .top-right { order: 2; width: 100%; }
  .top-right .profile { flex: 1; width: auto; order: -1; }
  .menu-footer { flex-direction: column; gap: 6px; }
  #page { padding: calc(10px + env(safe-area-inset-top)) 14px 0; }
  .page-title { font-size: 22px; }
  .page-wiki .wiki { grid-template-columns: 1fr; }
  .page-wiki .wiki-nav { position: static; flex-direction: row; overflow-x: auto; }
  .rm-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .rm-mode { width: 40px; height: 40px; }
  .rm-seats { grid-column: 2; }
  .rm-actions { grid-column: 1 / -1; }
  .rm-actions button { flex: 1; }
  .season-hero { flex-direction: column; text-align: center; }
  .sh-text h1 { font-size: 34px; }
  .sh-time { justify-content: center; }
  .fb-topics { grid-template-columns: 1fr; }
  .fb-topics button { flex-direction: row; gap: 10px; text-align: left; }
  .tt-row { grid-template-columns: 28px 26px 1fr auto; }
  .tt-row > :last-child { display: none; }
  .hist-row { grid-template-columns: 76px minmax(0, 1fr) 54px 30px; }
  .hist-row .hr-dur, .hist-row .hr-rating { display: none; }
  /* «Персонаж» на весь экран и компактная шапка */
  .char-tab { padding: 6px 9px; font-size: 12px; }
  .page-character .char-body { height: auto; min-height: 0; }
  .char-stage { height: 140px !important; }
  /* низкая сцена: кнопки эффектов меньше, чтобы все помещались (у арканы их четыре) */
  .arc-fx { top: 6px; right: 6px; gap: 4px; }
  .arc-fx-btn { width: 24px; height: 24px; }
  .char-slots { display: flex !important; flex-direction: row !important; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
  .char-stats .season-row { display: none; } /* всё о сезоне — на странице сезона */
  .char-slot { flex: 0 0 auto; padding: 3px 10px 3px 4px; }
  .cs-slot { font-size: 10px; }
  .cs-item { font-size: 12.5px; }
  .char-stats .stat-grid b { font-size: 15px; }
  .char-stats .season-row, .char-stats .ranked-progress { padding: 6px 8px; }
}

/* ================= Валюты в шапке: монетки, билеты, астрокредиты ================= */
/* Каждая валюта — круглая плашка, значок выступает за левый край. «+» (пополнить) у всех одного цвета */
.wallet { display: flex; align-items: center; gap: 10px; }
.cur-pill {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 5px 0 28px; margin-left: 12px;
  border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.1); color: #fff;
  font-family: var(--font-display); font-size: 16px; letter-spacing: .3px; font-variant-numeric: tabular-nums;
  transition: border-color .15s;
}
.cur-main { display: inline-flex; align-items: center; height: 100%; padding: 0; background: none; border: none; color: inherit; font: inherit; cursor: pointer; }
.cur-ico { display: inline-flex; }
.cur-pill .cur-ico { position: absolute; left: -12px; top: 50%; display: inline-flex; width: 36px; height: 36px; transform: translateY(-50%); filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); transition: transform .15s; }
.cur-ico svg { width: 100%; height: 100%; }
.cur-main:hover .cur-ico { transform: translateY(-50%) scale(1.1) rotate(-6deg); }
/* место под 5 символов («9 999», «999K») — плашки одной ширины и при нуле, и при большом балансе */
.cur-pill b { display: inline-block; min-width: 5ch; text-align: right; white-space: nowrap; }
.cur-plus {
  width: 24px; height: 24px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: none; cursor: pointer; padding: 0 0 1px;
  background: linear-gradient(180deg, #ffd864, #f0aa22); color: #2a1800;
  font-family: var(--font-display); font-size: 18px; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .12s, box-shadow .15s;
}
.cur-plus:hover { transform: scale(1.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 12px rgba(255,200,80,.6); }
.cur-pill.coins:hover { border-color: #ffc83a; }
.cur-pill.tickets:hover { border-color: #f7c9a2; }
.cur-pill.astro:hover { border-color: #9a7bff; }

/* ---------- Кошелёк в шапке ПК: монетки + стрелка, список валют (currency.js buildWallet) ---------- */
.wd { position: relative; display: flex; align-items: center; gap: 8px; }
.wd-pill {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 5px 0 30px; margin-left: 12px;
  border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.1); color: #fff;
  font-family: var(--font-display); font-size: 16px; letter-spacing: .3px; font-variant-numeric: tabular-nums; transition: border-color .15s;
}
.wd-pill:hover, .wd.open .wd-pill { border-color: #ffc83a; }
.wd-ico { position: absolute; left: -12px; top: 50%; width: 36px; height: 36px; transform: translateY(-50%); filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); transition: transform .15s; }
.wd-ico svg, .wd-i svg { position: relative; width: 100%; height: 100%; display: block; }
.wd-pill:hover .wd-ico { transform: translateY(-50%) scale(1.1) rotate(-6deg); }
/* место под шестизначное «999 999» — плашка одной ширины и при нуле, и при большом балансе; миллионы её раздвигают */
.wd-num { font-weight: 400; white-space: nowrap; min-width: 6.4ch; }
.wd-caret { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); transition: transform .18s, background .15s; }
.wd-caret svg { width: 12px; height: 12px; }
.wd-pill:hover .wd-caret { background: rgba(255,255,255,.16); }
.wd.open .wd-caret { transform: rotate(180deg); }
/* наведение на валюту в списке — загорается и её «+» */
.wd-row:hover .cur-plus { transform: scale(1.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 12px rgba(255,200,80,.6); }

.wd-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; min-width: 340px; padding: 6px; border-radius: 12px;
  background: #1a1d28; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 16px 40px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 2px; animation: pmIn .15s ease-out;
}
.wd-row {
  display: grid; grid-template-columns: 34px 1fr auto 24px; gap: 12px; align-items: center; padding: 8px 10px;
  border: none; border-radius: 8px; background: transparent; color: #e9e3d7; text-align: left; cursor: pointer;
}
.wd-row:hover { background: rgba(255,255,255,.07); }
.wd-row .cur-plus { pointer-events: none; }
.wd-i { position: relative; width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.wd-txt { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.wd-name { font-size: 14px; font-weight: 700; color: #fff; }
.wd-hint { font-size: 11.5px; color: #8d93a5; white-space: nowrap; }
.wd-hint.full { color: #ffcf6b; }
.wd-big { font-family: var(--font-display); font-weight: 400; font-size: 18px; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* лимит монеток за матчи: полоска, деления, кольцо */
.wd-lim { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #8d93a5; }
.wd-lim small { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wd-lim.full small { color: #ffcf6b; }
.wd-lbar { flex: 1; min-width: 90px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.wd-lbar i, .wd-pbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #5ee0ff, #3a8bff); }
.wd-lim.full .wd-lbar i, .wd-pbar.full i { background: linear-gradient(90deg, #ffd864, #e8a21c); }
.wd-steps { display: flex; gap: 3px; }
.wd-steps i { width: 16px; height: 5px; border-radius: 2px; background: rgba(255,255,255,.12); }
.wd-steps i.on { background: linear-gradient(90deg, #5ee0ff, #3a8bff); }
.wd-lim.full .wd-steps i { background: linear-gradient(90deg, #ffd864, #e8a21c); }
.wd-pbar { position: absolute; left: 22px; right: 34px; bottom: 3px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.wd-ring {
  position: absolute; inset: -3px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(#5ee0ff calc(var(--p) * 1%), rgba(255,255,255,.14) 0);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%); mask: radial-gradient(circle, transparent 62%, #000 64%);
}
.wd-ring.full { background: conic-gradient(#ffd23f 100%, transparent 0); }
.wd-ico .wd-ring { z-index: -1; }

/* ---------- Задания дня: кнопка в шапке и список (quests.js) ---------- */
.quests { position: relative; display: flex; }
.qb {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px; border-radius: 8px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); color: #fff; font-family: var(--font-display); font-size: 15px; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.qb:hover, .quests.open .qb { background: rgba(255,255,255,.08); border-color: rgba(94,224,255,.4); }
.qb-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: rgba(94,224,255,.14); color: #5ee0ff; }
.qb-ico svg { width: 20px; height: 20px; }
.qb b { color: #ffe08a; font-weight: 400; font-variant-numeric: tabular-nums; }
.qb-dot { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: #ff4d4d; color: #fff; font: 800 11px/18px Inter, sans-serif; text-align: center; font-style: normal; box-shadow: 0 0 0 2px #12141c; }
#menu.m-mobile .qb-label, #menu.m-smalllogo .qb-label { display: none; }

.qp {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 390px; max-width: calc(100vw - 24px); padding: 12px 14px; border-radius: 12px;
  background: #1a1d28; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 16px 40px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 8px; animation: pmIn .15s ease-out;
}
.qp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qp-head b { font-family: var(--font-display); font-weight: 400; font-size: 18px; text-transform: uppercase; letter-spacing: .5px; color: #fff; }
.qp-head small { display: block; font-size: 11.5px; color: #8d93a5; white-space: nowrap; }
.qp-items { display: flex; flex-direction: column; gap: 6px; }
.qp-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px 7px 8px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.qp-ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: rgba(94,224,255,.12); color: #5ee0ff; }
.qp-ico svg { width: 20px; height: 20px; }
.qp-name { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; color: #eef1f8; } /* длинные названия — в две строки */
.qp-line { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qp-line small { font-size: 11px; color: #8d93a5; font-variant-numeric: tabular-nums; }
.qp-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.qp-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #5ee0ff, #3a8bff); }
.qp-rew { display: flex; align-items: center; gap: 4px; font-family: var(--font-display); font-size: 15px; color: #ffe08a; }
.qp-rew svg { width: 22px; height: 22px; display: block; }
.qp-rew b { font-weight: 400; }
.qp-item.done { border-color: rgba(255,210,63,.55); background: rgba(255,210,63,.08); }
.qp-item.done .qp-ico { background: rgba(255,210,63,.16); color: #ffd23f; }
.qp-item.done .qp-bar i { background: linear-gradient(90deg, #ffd864, #e8a21c); }
.qp-claim { border: none; border-radius: 6px; padding: 5px 10px; background: linear-gradient(180deg, #ffd864, #e8a21c); color: #3a2008; font-family: var(--font-display); font-size: 13px; text-transform: uppercase; box-shadow: 0 2px 0 #8a5a08; animation: qpPulse 1.6s ease-in-out infinite; }
@keyframes qpPulse { 50% { box-shadow: 0 2px 0 #8a5a08, 0 0 14px rgba(255,210,63,.7); } }
.qp-soon { font-size: 11px; color: #6f7690; text-align: center; border-top: 1px solid rgba(255,255,255,.06); padding-top: 6px; }
.qp-end { display: flex; align-items: center; gap: 6px; }
.qp-rew.astro { color: #d4b8ff; }
.qp-swap { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border-radius: 6px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #8d93a5; transition: color .15s, border-color .15s, background .15s; }
.qp-swap:hover { color: #5ee0ff; border-color: rgba(94,224,255,.45); background: rgba(94,224,255,.08); }
.qp-swap svg { width: 16px; height: 16px; }
.qp-got { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(123,224,138,.14); color: #7be08a; }
.qp-item.claimed { opacity: .55; border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.03); }
/* кольцо до билета в шапке списка: деления вокруг билета */
.qp-ring { position: relative; width: 54px; height: 54px; flex: none; }
.qp-ring > svg { position: absolute; inset: 0; }
.qp-ring-tk { position: absolute; inset: 11px; }
.qp-ring-tk svg { width: 32px; height: 32px; display: block; }
.qp-ring em { position: absolute; right: -6px; bottom: -4px; font: 800 10.5px Inter, sans-serif; font-style: normal; background: #1a1d28; border: 1px solid rgba(255,180,134,.5); color: #ffd2a8; border-radius: 99px; padding: 0 5px; }
/* золотое задание — изредка вместо сложного: больше монет или туманность */
.qp-item.gold { position: relative; overflow: hidden; border-color: rgba(255,210,63,.55); background: linear-gradient(100deg, rgba(255,210,63,.16), rgba(255,170,40,.05) 60%, rgba(255,210,63,.1)); }
.qp-item.gold::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,240,180,.22) 45%, transparent 60%); transform: translateX(-100%); animation: qpShine 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes qpShine { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.qp-item.gold .qp-ico { background: linear-gradient(180deg, #ffe48a, #d99a1c); color: #3a2008; }
.qp-item.gold .qp-name { color: #ffe08a; }
.qp-item.gold .qp-bar i { background: linear-gradient(90deg, #ffe48a, #e8a21c); }
.qp-item.gold.claimed::after { display: none; }
.qp-gl { font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #ffd23f; margin-right: 6px; }
.qb.gold .qb-ico { background: linear-gradient(180deg, #ffe48a, #d99a1c); color: #3a2008; }
.cur-modal .cur-box {
  position: relative; width: min(380px, 92vw); padding: 22px 22px 18px; border-radius: 16px; text-align: center;
  background: radial-gradient(circle at 50% 0%, #3a1e64, #14101f 70%); color: #e9e3d7;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(196,123,255,.3);
}
.cur-big { width: 96px; height: 96px; margin: -60px auto 6px; filter: drop-shadow(0 8px 18px rgba(0,0,0,.5)); animation: curFloat 2.4s ease-in-out infinite; }
.cur-big svg { width: 100%; height: 100%; }
@keyframes curFloat { 50% { transform: translateY(-6px) rotate(-4deg); } }
.cur-box h3 { margin: 0; font-family: var(--font-display); font-size: 28px; letter-spacing: 1px; text-transform: uppercase; color: #fff; }
.cur-soon { display: inline-block; margin: 6px 0 10px; padding: 2px 10px; border-radius: 999px; background: #c6ff3d; color: #1a0f2a; font-family: var(--font-display); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.cur-box p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.cur-how { text-align: left; font-size: 13px; line-height: 1.7; background: rgba(255,255,255,.05); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.cur-bal { font-family: var(--font-display); font-size: 16px; color: #ffcf6b; margin-bottom: 12px; }
.cur-box .btn-primary { width: 100%; }
@media (max-width: 700px) and (orientation: portrait) { .wallet { order: 3; gap: 6px; } .cur-pill { height: 30px; font-size: 14px; padding-left: 24px; margin-left: 10px; } .cur-pill .cur-ico { width: 30px; height: 30px; left: -10px; } }
@media (max-height: 520px) and (orientation: landscape) { .wallet { gap: 6px; } .cur-pill { height: 30px; padding: 0 4px 0 22px; margin-left: 10px; font-size: 14px; } .cur-pill .cur-ico { width: 28px; height: 28px; left: -10px; } .cur-plus { width: 22px; height: 22px; }
  .wd-pill { height: 30px; padding: 0 4px 0 24px; margin-left: 10px; font-size: 14px; } .wd-ico { width: 28px; height: 28px; left: -10px; } }

/* ================= Меню профиля и настройки ================= */
.profile { cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.profile:hover { border-color: rgba(255,255,255,.35); background: rgba(0,0,0,.5); }
.profile-rating { white-space: nowrap; }
.pm-caret { font-size: 12px; opacity: .7; padding: 0 6px 0 2px; }
.pm-anchor { position: relative; }
.pm-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 230px; padding: 6px; border-radius: 12px;
  background: #1a1d28; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 16px 40px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 2px; animation: pmIn .15s ease-out;
}
@keyframes pmIn { from { transform: translateY(-6px); opacity: 0; } }
.pm-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: none; border-radius: 8px;
  background: transparent; color: #e9e3d7; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
}
.pm-item:hover { background: rgba(255,255,255,.08); }
.pm-ico { width: 22px; text-align: center; font-size: 16px; }
.pm-item.pm-danger { color: #ff8a8a; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0 0 8px 8px; margin-top: 2px; }
.pm-item.pm-accent { color: #ffcf6b; }
/* «Установить игру»: золотая карточка над «Выйти» */
.pm-item.pm-install {
  margin: 4px 0 2px; padding: 9px 12px; border: 1px solid rgba(255,207,107,.35);
  background: linear-gradient(135deg, rgba(255,190,70,.16), rgba(255,140,40,.06));
}
.pm-item.pm-install:hover { background: linear-gradient(135deg, rgba(255,190,70,.26), rgba(255,140,40,.12)); border-color: rgba(255,207,107,.6); }
.pmi-ico {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #ffd56b, #f5a623); color: #3a2400; box-shadow: 0 2px 0 #b8741a, 0 4px 10px rgba(245,166,35,.35);
}
.pmi-txt { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.pmi-txt b { color: #ffd98a; font-size: 14px; }
.pmi-txt small { color: rgba(233,227,215,.6); font-size: 11.5px; font-weight: 500; }
.set-modal .set-box { width: min(440px, 92vw); padding: 26px 30px 26px; border-radius: 14px; background: #1a1d28; color: #e9e3d7; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.set-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.set-head h3 { margin: 0; font-family: var(--font-display); font-size: 22px; letter-spacing: 1px; color: #ffcf6b; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 2px; border-bottom: 1px solid rgba(255,255,255,.07); }
.set-row b { display: block; font-size: 15px; }
.set-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.set-switch { position: relative; flex-shrink: 0; width: 48px; height: 26px; border-radius: 999px; border: none; background: #3a3f50; cursor: pointer; transition: background .15s; }
.set-switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.set-switch.on { background: var(--accent); }
.set-switch.on::after { transform: translateX(22px); }
.set-box .btn-primary { width: 100%; margin-top: 24px; }

/* «Помоги сделать игру лучше»: причина письма — выпадающий список */
.fb-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 4px 0 6px; }
.fb-select {
  width: 100%; margin-bottom: 12px; padding: 11px 38px 11px 14px; border-radius: 10px; font-size: 14px; color: #e9e3d7; cursor: pointer;
  background: #0f111a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffcf6b' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid rgba(255,255,255,.12); appearance: none; -webkit-appearance: none;
}
.fb-select:focus { outline: none; border-color: var(--accent); }
.fb-select option { background: #1a1d28; color: #e9e3d7; }

/* шапка страницы сезона: пейзаж «Дом, милый дом» на фоне */
.season-hero .sh-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.season-hero > :not(.sh-bg) { position: relative; z-index: 1; }
/* .sh-text есть и у витрины магазина (shop.css: absolute, 60%, без нажатий) — здесь сбрасываем */
.season-hero .sh-text { display: block; left: 0; top: 0; max-width: none; pointer-events: auto; text-shadow: 0 2px 8px rgba(20,8,40,.7); }

/* настройки: выбор оформления арены */
.set-row-col { flex-direction: column; align-items: stretch; gap: 10px; }
.set-seg { display: flex; gap: 6px; }
.set-seg button { flex: 1; padding: 9px 6px; border-radius: 9px; border: 1px solid rgba(255,255,255,.12); background: #0f111a; color: #c9cede; font-weight: 700; font-size: 13px; cursor: pointer; }
.set-seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* ================= Профиль в шапке меню: аватар в рамке ранга, ник ================= */
#profileChip:hover { border-color: rgba(255,255,255,.35); }
#profileChip { height: 44px; gap: 10px; padding: 0 8px 0 4px; margin-left: 6px; border-radius: 999px; background: rgba(0,0,0,.45); border-color: rgba(255,255,255,.1); }
#profileChip .profile-name { border-bottom: none; padding-bottom: 0; max-width: 170px; }
#profileChip .pm-caret { padding: 0 2px 0 0; }
.pf-av { position: relative; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: #2a2f44; box-shadow: 0 0 0 2px var(--ring, rgba(255,255,255,.25)); }
.pf-av canvas { width: 100%; height: 100%; border-radius: 50%; display: block; }
/* «A» — администратор, «GM» — гейм-мастер */
.pf-badge {
  position: absolute; right: -5px; bottom: -4px; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 800 10px/1 Inter, sans-serif; color: #2a1800; background: linear-gradient(180deg, #ffd23f, #ff9a2e); box-shadow: 0 0 0 2px #14161f;
}
@media (max-width: 1000px) { #profileChip .profile-name { max-width: 110px; } }
@media (max-height: 520px) and (orientation: landscape) { #profileChip { height: 36px; } .pf-av { width: 28px; height: 28px; } }
@media (max-width: 700px) and (orientation: portrait) {
  .top-right { flex-wrap: wrap; row-gap: 10px; }
  #profileChip { flex: 1 1 100%; margin-left: 0; }
  #menu #profileChip .profile-name { max-width: 60vw; }
  .wallet { flex: 1; justify-content: flex-end; }
}
