/* ================= Шапка меню: ширина как у блока плиток, логотип и сезон по центру ================= */
#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); }
.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.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; }
  .char-stage.arcana { height: 220px !important; }
  .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; gap: 6px; }
.cur-pill {
  display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 4px 0 5px; border-radius: 8px; /* как у плашки профиля */
  background: rgba(0,0,0,.4); border: 1px solid var(--line); color: #fff;
  font-family: var(--font-display); font-size: 15px; letter-spacing: .5px; font-variant-numeric: tabular-nums;
  transition: border-color .15s;
}
.cur-main { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 4px 0 0; background: none; border: none; color: inherit; font: inherit; cursor: pointer; }
.cur-main:hover .cur-ico { transform: scale(1.1) rotate(-6deg); }
.cur-ico { transition: transform .15s; }
/* «+» — пополнить: маленькая квадратная кнопка внутри плашки */
.cur-plus {
  width: 24px; height: 24px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; border: 1px solid rgba(255,255,255,.18); cursor: pointer;
  background: linear-gradient(180deg, #4a4f5e, #2d313c); color: #e8ecf4;
  font-family: var(--font-display); font-size: 18px; line-height: 1; padding: 0 0 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .12s, background .15s;
}
/* при наведении — золотая, как плашка «Скоро открытие» у магазина */
.cur-plus:hover { transform: scale(1.1); background: linear-gradient(180deg, #ffd864, #e8a21c); color: #3a2008; border-color: #ffd864; box-shadow: 0 0 12px rgba(255,200,80,.55); }
/* место под 99 999 сразу — чтобы шапка не ехала при росте баланса */
.cur-pill b { display: inline-block; min-width: 5.6ch; text-align: right; white-space: nowrap; }
.cur-pill.coins:hover { border-color: #ffc83a; }
.cur-pill.tickets:hover { border-color: #f7c9a2; }
.cur-ico { display: inline-flex; width: 26px; height: 26px; }
.cur-ico svg { width: 100%; height: 100%; }
.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; } .cur-pill { height: 30px; font-size: 13px; } }
@media (max-height: 520px) and (orientation: landscape) { .cur-pill { height: 30px; padding: 0 8px 0 3px; font-size: 13px; } .cur-ico { width: 22px; height: 22px; } }

/* ================= Меню профиля и настройки ================= */
.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; }
.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; }
.season-hero .sh-text { 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; }