/* ============================================
   MASTERSHOT — CLUBE (identidade do design "Menu principal refinado")
   Moldura das telas logadas (TopBar: topo no computador, trilho lateral no celular deitado)
   e a tela Início. Medidas do design: Mastershot.dc.html (PC) e
   "Mastershot Mobile Horizontal.dc.html" (844×390).
   ============================================ */

:root {
    --ms-rail-w: 0px;
    --ms-line: rgba(201,165,92,.12);
    --ms-card: rgba(255,255,255,.025);
    --ms-card-line: rgba(255,255,255,.07);
    --ms-cream: #f1e4c3;
    --ms-title: #f3e6c6;
    --ms-strong: #e9d9b4;
    --ms-muted: #8f8a78;
    --ms-eyebrow: #a8894a;
}

/* ---------- topo (computador) ---------- */
.ms-top {
    position: sticky; top: 0; z-index: 40;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
    padding: 18px clamp(20px, 3.5vw, 48px);
    border-bottom: 1px solid var(--ms-line);
    background: linear-gradient(180deg, rgba(8,20,14,.94), rgba(8,20,14,.82));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    font-family: var(--font-body); color: var(--ink-100);
}
.ms-brand { display: flex; align-items: center; gap: 14px; cursor: pointer; flex: none; }
.ms-brand-mark { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--gold-600); display: flex; align-items: center; justify-content: center; flex: none; }
.ms-brand-mark i { width: 17px; height: 2px; background: var(--gold-600); transform: rotate(-40deg); border-radius: 2px; }
.ms-brand-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.ms-brand-text b { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: .22em; color: var(--ms-cream); }
.ms-brand-text small { font-size: 9px; letter-spacing: .42em; color: var(--ms-eyebrow); }
.ms-nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; }
.ms-nav-i {
    height: 40px; padding: 0 clamp(8px, 1.1vw, 16px); display: flex; align-items: center;
    font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--ms-muted);
    border-bottom: 1.5px solid transparent; transition: color .15s, border-color .15s;
}
.ms-nav-i:hover { color: var(--ms-cream); }
.ms-nav-i.on { color: var(--gold-400); border-bottom-color: var(--gold-500); }
.ms-top-right { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.ms-top-title { display: none; }

/* moedas e gemas */
.ms-cur {
    display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px; border-radius: 999px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(201,165,92,.22); color: var(--ink-100);
}
.ms-cur.gem { border-color: rgba(214,110,190,.25); }
.ms-cur > i { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 800; background: var(--gold-500); color: #3a2a08; }
.ms-cur.gem > i { background: #d46fc0; color: #fff; font-size: 10px; }
.ms-cur > b { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.ms-cur > span { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; background: rgba(201,165,92,.16); color: var(--gold-400); transition: background .15s; }
.ms-cur.gem > span { background: rgba(214,110,190,.16); color: #eaa3dc; }
.ms-cur:hover > span { background: rgba(201,165,92,.3); }
.ms-cur.gem:hover > span { background: rgba(214,110,190,.3); }

/* botões redondos (social, configurações) e avatar */
.ms-ib {
    position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center; color: #bfb49a; flex: none;
    transition: border-color .15s, color .15s;
}
.ms-ib:hover, .ms-ib.on { border-color: rgba(201,165,92,.5); color: var(--gold-400); }
.ms-ib.social { margin-left: 6px; }
.ms-ib .ms-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e2574c; color: #fff; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #0a1a12; }
.ms-av {
    position: relative; width: 40px; height: 40px; border-radius: 50%; background: #1d3a28 center/cover no-repeat; border: 1.5px solid var(--gold-600);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--ms-cream); flex: none;
}
.ms-av .lv { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--gold-500); color: #3a2a08; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #0a1a12; }

/* ---------- trilho (celular deitado) ---------- */
.ms-rail { display: none; }

/* ---------- telas da moldura ---------- */
.ms-screen {
    /* z-index: contexto próprio, como o .mh-root da Início antiga — as janelas da tela (subida de
       nível etc.) ficam abaixo do painel social, que vive fora das telas */
    position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden; background: var(--g-club); color: var(--ink-100); font-family: var(--font-body);
    scrollbar-width: thin;
}

/* telas pequenas ou de toque: o documento rola (como o .screen em components.css) */
@media (max-width: 1100px), (max-height: 720px), (hover: none) and (pointer: coarse) {
    .ms-screen { position: relative; inset: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
}

/* ---------- Início ---------- */
.ms-home {
    flex: 1; display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); gap: 56px;
    padding: 32px 48px 40px; align-items: stretch;
}
.ms-home-left { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-width: 0; }
.ms-home-top { display: flex; flex-direction: column; gap: 28px; padding-top: 24px; }
.ms-hello { display: flex; flex-direction: column; gap: 10px; }
.ms-eyebrow { font-size: 11px; letter-spacing: .4em; color: var(--ms-eyebrow); font-weight: 600; }
.ms-hello h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(44px, 5.4vw, 80px); line-height: .95; color: var(--ms-title); overflow-wrap: anywhere; }
.ms-xp { display: flex; flex-direction: column; gap: 10px; max-width: 420px; cursor: pointer; }
.ms-xp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.ms-xp-row b { font-weight: 700; color: var(--ms-strong); }
.ms-xp-row span { color: var(--ms-muted); font-variant-numeric: tabular-nums; }
.ms-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.ms-bar > i { display: block; height: 100%; background: var(--gold-600); border-radius: inherit; transition: width .6s var(--ease-out); }
.ms-stats { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.ms-stat { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.ms-stat b { font-family: var(--font-display); font-weight: 400; font-size: 26px; color: var(--ms-cream); }
.ms-stat small, .ms-form small { font-size: 10px; letter-spacing: .24em; color: var(--ms-muted); }
button.ms-stat:hover b { color: var(--gold-400); }
.ms-sep { width: 1px; height: 36px; background: rgba(255,255,255,.1); }
.ms-form { display: flex; flex-direction: column; gap: 8px; }
.ms-dots { display: flex; gap: 5px; min-height: 10px; }
.ms-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--win); }
.ms-dots i.l { background: var(--loss); }
.ms-dots i.d { background: var(--ms-muted); }

.ms-missions { border-top: 1px solid rgba(201,165,92,.18); padding-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.ms-missions-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; text-align: left; width: 100%; }
.ms-missions-head .l { display: flex; align-items: center; gap: 12px; }
.ms-missions-head .t { font-family: var(--font-display); font-size: 14px; letter-spacing: .18em; color: var(--ms-strong); }
.ms-missions-head .s { font-size: 12px; color: var(--ms-muted); }
.ms-missions-head .r { display: flex; align-items: center; gap: 12px; color: var(--ms-eyebrow); font-size: 12px; }
.ms-missions-head .r code { font-family: ui-monospace, var(--font-mono), monospace; font-size: 12px; }
.ms-mlist { display: flex; flex-direction: column; gap: 14px; }
.ms-m { display: flex; flex-direction: column; gap: 8px; }
.ms-m-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ms-m-row > span:first-child { color: #e6dcc4; }
.ms-m-row .p { display: flex; gap: 10px; align-items: baseline; }
.ms-m-row .p small { color: var(--ms-muted); font-size: 12px; }
.ms-m-row .p b { color: var(--gold-400); font-weight: 700; }
.ms-m.done .ms-m-row > span:first-child { color: var(--ms-muted); text-decoration: line-through; }
.ms-m .ms-bar { height: 3px; background: rgba(255,255,255,.07); }

.ms-home-right { display: grid; grid-template-rows: minmax(0,1.55fr) minmax(0,1fr); gap: 16px; min-width: 0; min-height: 520px; }
.ms-play {
    position: relative; overflow: hidden; border-radius: 20px; padding: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
    text-align: left; color: inherit; border: 1px solid rgba(215,174,79,.45); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7);
    background: linear-gradient(160deg, #1a3a4a 0%, #0e2230 60%, #0a1822 100%); transition: border-color .2s, transform .2s;
}
.ms-play:hover { border-color: rgba(215,174,79,.8); }
.ms-play:active { transform: scale(.995); }
.ms-play-ring { position: absolute; right: -120px; bottom: -160px; width: 460px; height: 460px; border-radius: 50%; border: 1px solid rgba(255,255,255,.05); box-shadow: 0 0 0 40px rgba(255,255,255,.015), 0 0 0 80px rgba(255,255,255,.01); pointer-events: none; }
.ms-play-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; position: relative; }
.ms-live { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px; border-radius: 999px; background: rgba(0,0,0,.25); font-size: 11px; font-weight: 700; letter-spacing: .12em; color: #b9c6c9; }
.ms-live i { width: 6px; height: 6px; border-radius: 50%; background: #e2574c; }
.ms-play-tag { font-size: 11px; letter-spacing: .3em; color: var(--gold-500); font-weight: 700; }
.ms-play-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; position: relative; }
.ms-play-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ms-play h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 3.8vw, 56px); line-height: 1; color: #f6ecd2; letter-spacing: .04em; }
.ms-play p { margin: 0; font-size: 15px; line-height: 1.5; color: #a9b8bb; max-width: 380px; text-wrap: pretty; }
.ms-go { flex: none; width: 84px; height: 84px; border-radius: 50%; background: var(--gold-500); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px -6px rgba(215,174,79,.55); transition: background .15s; }
.ms-go i { width: 0; height: 0; border-left: 24px solid #2a1e06; border-top: 15px solid transparent; border-bottom: 15px solid transparent; margin-left: 6px; }
.ms-play:hover .ms-go { background: #e6c066; }
.ms-train {
    position: relative; overflow: hidden; border-radius: 20px; padding: 28px 36px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
    text-align: left; color: inherit; background: linear-gradient(160deg, #1d4630 0%, #12301f 70%); border: 1px solid rgba(255,255,255,.08); transition: border-color .2s;
}
.ms-train:hover { border-color: rgba(201,165,92,.45); }
.ms-train-copy { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ms-train-copy .k { font-size: 11px; letter-spacing: .3em; color: var(--ms-eyebrow); font-weight: 700; }
.ms-train h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 2.6vw, 36px); line-height: 1; color: #efe3c4; letter-spacing: .04em; }
.ms-train p { margin: 0; font-size: 14px; color: #9fb3a4; }
.ms-go2 { flex: none; width: 60px; height: 60px; border-radius: 50%; border: 1.5px solid rgba(201,165,92,.6); display: flex; align-items: center; justify-content: center; }
.ms-go2 i { width: 0; height: 0; border-left: 16px solid var(--gold-500); border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }

/* telas menores de computador: Início em uma coluna */
@media (max-width: 980px) and (min-height: 521px) {
    .ms-home { grid-template-columns: minmax(0,1fr); gap: 32px; padding: 24px 24px 32px; }
    .ms-home-right { min-height: 420px; }
}

/* ============================================
   CELULAR DEITADO (≤ 520 px de altura): trilho de ícones à esquerda
   ============================================ */
@media (max-height: 520px) {
    :root { --ms-rail-w: calc(64px + max(8px, env(safe-area-inset-left))); }
    /* aqui o #app já é estático e o documento rola (components.css): o body cede o espaço do trilho */
    body.ms-shell { padding-left: var(--ms-rail-w); }

    .ms-rail {
        position: fixed; left: 0; top: 0; bottom: 0; width: var(--ms-rail-w); z-index: 60;
        display: flex; flex-direction: column; align-items: center; gap: 2px;
        padding: max(12px, env(safe-area-inset-top)) 6px max(12px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        border-right: 1px solid var(--ms-line); background: rgba(6,13,9,.92);
        font-family: var(--font-body); overflow-y: auto; scrollbar-width: none;
    }
    .ms-rail::-webkit-scrollbar { display: none; }
    .ms-rail .ms-brand-mark { width: 32px; height: 32px; margin-bottom: 8px; }
    .ms-rail .ms-brand-mark i { width: 14px; }
    .ms-rail-i { width: 52px; min-height: 52px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #7d786a; flex: none; }
    .ms-rail-i span { font-size: 8px; font-weight: 700; letter-spacing: .1em; }
    .ms-rail-i svg { display: block; }
    .ms-rail-i.on { color: var(--gold-400); background: rgba(201,165,92,.08); }

    .ms-top { height: 56px; flex-wrap: nowrap; padding: 0 max(16px, env(safe-area-inset-right)) 0 20px; border-bottom: none; background: rgba(8,20,14,.9); }
    .ms-top .ms-brand, .ms-top .ms-nav, .ms-top .ms-ib.cfg, .ms-top .ms-av { display: none; }
    .ms-top-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .2em; color: var(--ms-cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ms-top-right { gap: 8px; }
    .ms-cur { height: 32px; padding: 0 4px; gap: 6px; }
    .ms-cur > i, .ms-cur > span { width: 22px; height: 22px; }
    .ms-cur > i { font-size: 11px; }
    .ms-cur.gem > i { font-size: 9px; }
    .ms-cur > b { font-size: 13px; }
    .ms-cur > span { font-size: 14px; }
    .ms-ib { width: 32px; height: 32px; }
    .ms-ib.social { margin-left: 0; }

    .ms-home { height: calc(100vh - 56px); height: calc(100dvh - 56px); min-height: 300px; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); gap: 16px; padding: 0 max(16px, env(safe-area-inset-right)) 18px 20px; }
    .ms-home-left { gap: 12px; justify-content: space-between; }
    .ms-home-top { gap: 12px; padding-top: 0; }
    .ms-hello { gap: 4px; }
    .ms-eyebrow { font-size: 9px; letter-spacing: .34em; }
    .ms-hello h1 { font-size: 32px; line-height: 1; }
    .ms-xp { gap: 6px; }
    .ms-xp-row { font-size: 11px; }
    .ms-bar { height: 3px; }
    .ms-stats { gap: 16px; flex-wrap: nowrap; }
    .ms-stat { gap: 2px; }
    .ms-stat b { font-size: 20px; }
    .ms-stat small, .ms-form small { font-size: 8px; letter-spacing: .2em; }
    .ms-sep { height: 26px; }
    .ms-form { gap: 6px; }
    .ms-dots { gap: 4px; min-height: 8px; }
    .ms-dots i { width: 8px; height: 8px; }
    .ms-missions { border-top: none; padding: 10px 14px; gap: 10px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--ms-card-line); }
    .ms-missions-head { gap: 10px; min-height: 24px; }
    .ms-missions-head .l { gap: 8px; align-items: baseline; }
    .ms-missions-head .t { font-size: 11px; letter-spacing: .14em; }
    .ms-missions-head .s { font-size: 10px; }
    .ms-missions-head .r, .ms-missions-head .r code { font-size: 11px; gap: 8px; }
    .ms-mlist { gap: 6px; }
    .ms-m { gap: 0; }
    .ms-m .ms-bar, .ms-m-row .p small { display: none; }
    .ms-m-row { font-size: 11px; gap: 8px; }
    .ms-home-right { min-height: 0; grid-template-rows: minmax(0,1.6fr) minmax(0,1fr); gap: 10px; }
    .ms-play { padding: 16px 18px; gap: 8px; }
    .ms-play-ring { right: -80px; bottom: -110px; width: 260px; height: 260px; box-shadow: 0 0 0 28px rgba(255,255,255,.015); }
    .ms-play-top { align-items: center; gap: 8px; }
    .ms-live { height: 22px; padding: 0 9px; font-size: 9px; letter-spacing: .1em; gap: 6px; }
    .ms-live i { width: 5px; height: 5px; }
    .ms-play-tag { font-size: 9px; letter-spacing: .22em; }
    .ms-play-bottom { gap: 12px; }
    .ms-play-copy { gap: 6px; }
    .ms-play h2 { font-size: 26px; letter-spacing: 0; }
    .ms-play p { font-size: 11px; }
    .ms-go { width: 56px; height: 56px; box-shadow: 0 8px 20px -6px rgba(215,174,79,.55); }
    .ms-go i { border-left-width: 16px; border-top-width: 10px; border-bottom-width: 10px; margin-left: 4px; }
    .ms-train { padding: 12px 18px; gap: 12px; align-items: center; }
    .ms-train-copy { gap: 4px; }
    .ms-train-copy .k { font-size: 9px; letter-spacing: .26em; }
    .ms-train h2 { font-size: 19px; letter-spacing: 0; }
    .ms-train p { font-size: 11px; }
    .ms-go2 { width: 44px; height: 44px; }
    .ms-go2 i { border-left-width: 12px; border-top-width: 7px; border-bottom-width: 7px; margin-left: 3px; }
}

/* o botão Social da moldura substitui o flutuante */
body.ms-shell .soc-fab { display: none !important; }

/* textos com versão curta para o celular deitado */
.ms-m-only { display: none !important; }
.ms-play, .ms-train { cursor: pointer; }
.ms-play:focus-visible, .ms-train:focus-visible, .ms-top button:focus-visible, .ms-rail button:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; }
@media (max-height: 520px) {
    .ms-d-only { display: none !important; }
    .ms-m-only { display: revert !important; }
}

/* ============================================
   PEÇAS COMUNS DAS TELAS (Loja, Inventário, Perfil, Configurações…)
   ============================================ */
.ms-page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 40px 48px 64px; display: flex; flex-direction: column; gap: 32px; }
.ms-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.ms-page-head > div { display: flex; flex-direction: column; gap: 8px; }
.ms-h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 40px; line-height: 1; color: var(--ms-title); }
.ms-page-aside { font-size: 13px; color: var(--ms-muted); }
.ms-page-aside strong { color: var(--ms-strong); }
.ms-kicker { font-size: 11px; letter-spacing: .3em; color: var(--gold-500); font-weight: 700; text-transform: uppercase; }

/* abas sublinhadas e pílulas */
.ms-tabs-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid rgba(201,165,92,.14); }
.ms-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ms-tab { height: 44px; padding: 0 18px; display: flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .22em; color: var(--ms-muted); border-bottom: 1.5px solid transparent; margin-bottom: -1px; text-transform: uppercase; transition: color .15s; }
.ms-tab:hover { color: var(--ms-cream); }
.ms-tab.on { color: var(--gold-400); border-bottom-color: var(--gold-500); }
.ms-pills { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.3); }
.ms-tabs-row .ms-pills { margin-bottom: 8px; }
.ms-pill { height: 30px; padding: 0 14px; border-radius: 999px; display: flex; align-items: center; font-size: 12px; font-weight: 700; color: #bfb49a; white-space: nowrap; }
.ms-pill.on { background: var(--gold-500); color: var(--gold-900); }
.ms-pill:not(.on):hover { color: var(--ms-cream); }
.ms-sync { font-size: 11px; color: var(--ink-400); white-space: nowrap; }

/* grade e cartão de item */
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ms-card { border-radius: 16px; background: var(--ms-card); border: 1px solid var(--ms-card-line); }
.ms-item { border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 18px; background: var(--ms-card); border: 1px solid var(--ms-card-line); transition: border-color .15s, opacity .15s; min-width: 0; }
.ms-item:hover { border-color: rgba(201,165,92,.35); }
.ms-item.eq { border-color: rgba(215,174,79,.8); }
.ms-item.dim { opacity: .55; }
.ms-item-prev { height: 110px; border-radius: 10px; background: rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; padding: 0 20px; overflow: hidden; position: relative; }
.ms-item-prev img { max-width: 100%; max-height: 100%; display: block; }
.ms-item-prev.cover { padding: 0; background-size: cover; background-position: center; }
.ms-item-prev .cue { width: 100%; max-height: 60px; object-fit: contain; }
.ms-mini-table { width: 130px; height: 68px; border-radius: 8px; padding: 7px; }
.ms-mini-table i { display: block; width: 100%; height: 100%; border-radius: 3px; box-shadow: inset 0 0 14px rgba(0,0,0,.5); }
.ms-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; min-width: 0; }
.ms-item-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ms-item-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: #efe3c4; overflow-wrap: anywhere; }
.ms-item-rar { font-size: 10px; letter-spacing: .24em; color: var(--ms-eyebrow); font-weight: 700; text-transform: uppercase; }
.ms-item-stat { font-size: 12px; color: var(--ms-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-item-desc { font-size: 12.5px; line-height: 1.5; color: #a9a08a; flex: 1; }
.ms-act {
    min-height: 40px; padding: 0 12px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
    font-size: 13px; font-weight: 700; background: transparent; color: #efe6d2; border: 1px solid rgba(255,255,255,.12); transition: background .15s, border-color .15s;
}
.ms-act.own { color: var(--win); border-color: rgba(111,194,142,.35); }
.ms-act.buy { background: rgba(201,165,92,.12); color: var(--gold-400); border-color: rgba(201,165,92,.3); }
.ms-act.buy:hover:not(:disabled) { background: rgba(201,165,92,.22); }
.ms-act.eq { background: rgba(215,174,79,.14); color: var(--gold-400); border-color: rgba(215,174,79,.4); }
.ms-act.lock { color: var(--ms-muted); }
.ms-act:disabled { cursor: default; }
.ms-act:not(:disabled):not(.own):not(.lock):not(.eq):hover { border-color: rgba(201,165,92,.45); }
.ms-statrow { display: grid; grid-template-columns: 72px minmax(0,1fr) 24px; align-items: center; gap: 10px; font-size: 12px; }
.ms-statrow > span:first-child { color: var(--ms-muted); }
.ms-statrow > span:last-child { color: #d9cdb0; text-align: right; font-variant-numeric: tabular-nums; }
.ms-statrow .ms-bar { height: 3px; background: rgba(255,255,255,.07); }
.ms-stats-col { display: flex; flex-direction: column; gap: 8px; }
.ms-empty { margin: 0; padding: 48px 0; text-align: center; font-size: 14px; color: var(--ms-muted); }

/* botões */
.ms-btn-gold { height: 44px; padding: 0 22px; border-radius: 999px; background: var(--gold-500); color: var(--gold-900); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 13px; letter-spacing: .04em; transition: background .15s, opacity .15s; }
.ms-btn-gold:hover:not(:disabled) { background: #e6c066; }
.ms-btn-line { height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(201,165,92,.35); color: var(--gold-400); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 13px; transition: background .15s; }
.ms-btn-line:hover:not(:disabled) { background: rgba(201,165,92,.1); }
.ms-btn-gold:disabled, .ms-btn-line:disabled { opacity: .5; cursor: default; }

/* aviso flutuante (compra, remodelação…) */
.ms-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 80; padding: 10px 18px; border-radius: 999px; background: rgba(8,18,12,.95);
    border: 1px solid var(--gold-700); color: var(--gold-300); font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.5); max-width: min(92vw, 480px); text-align: center; }
.ms-toast.err { border-color: rgba(212,87,76,.55); color: var(--loss-bright); }
.ms-note { font-size: 12px; line-height: 1.5; }
.ms-note.ok { color: var(--win-bright); }
.ms-note.err { color: var(--loss-bright); }

@media (max-width: 980px) and (min-height: 521px) {
    .ms-page { padding: 28px 24px 48px; gap: 24px; }
}
@media (max-height: 520px) {
    .ms-page { padding: 0 max(16px, env(safe-area-inset-right)) 20px 20px; gap: 14px; }
    .ms-page-head { display: none; }
    .ms-tabs-row { gap: 8px; flex-wrap: nowrap; }
    .ms-tabs { gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .ms-tab { height: 40px; padding: 0 12px; font-size: 11px; letter-spacing: .16em; white-space: nowrap; }
    .ms-tabs-row .ms-pills { margin-bottom: 6px; }
    .ms-pills { gap: 2px; }
    .ms-pill { height: 28px; padding: 0 11px; font-size: 11px; }
    .ms-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
    .ms-item { border-radius: 14px; padding: 10px; gap: 10px; }
    .ms-item-prev { height: 64px; border-radius: 8px; padding: 0 10px; }
    .ms-item-prev .cue { max-height: 34px; }
    .ms-mini-table { width: 80px; height: 42px; border-radius: 5px; padding: 4px; }
    .ms-item-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ms-item-rar { font-size: 8px; letter-spacing: .2em; }
    .ms-item-head > div { gap: 2px; }
    .ms-item-stat, .ms-item-desc { display: none; }
    .ms-act { min-height: 32px; padding: 0 6px; font-size: 11px; }
    .ms-statrow { grid-template-columns: 56px minmax(0,1fr) 20px; font-size: 10px; gap: 6px; }
    .ms-empty { padding: 24px 0; font-size: 12px; }
    .ms-btn-gold { height: 40px; padding: 0 16px; font-size: 12px; }
    .ms-btn-line { height: 34px; padding: 0 14px; font-size: 12px; }
    .ms-toast { bottom: 14px; font-size: 12px; }
}

/* ---------- Loja ---------- */
.ms-feat { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); border-radius: 20px; overflow: hidden; border: 1px solid rgba(215,174,79,.4); background: linear-gradient(120deg, #2a1f0e 0%, #16120a 70%); }
.ms-feat-copy { padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 16px; min-width: 0; }
.ms-feat-copy h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; color: #f6e7bf; }
.ms-feat-copy p { margin: 0; font-size: 15px; color: #b8a888; line-height: 1.5; }
.ms-feat-buy { height: 46px; padding: 0 26px; font-size: 15px; margin-top: 8px; }
.ms-feat-art { padding: 36px; display: flex; align-items: center; justify-content: center; background: radial-gradient(60% 70% at 50% 40%, rgba(215,174,79,.18), transparent 70%); }
.ms-feat-table { width: 100%; max-width: 340px; aspect-ratio: 2 / 1; border-radius: 14px; padding: 14px; box-shadow: 0 24px 50px -20px rgba(0,0,0,.8); }
.ms-feat-table i { display: block; width: 100%; height: 100%; border-radius: 6px; box-shadow: inset 0 0 26px rgba(0,0,0,.55); }
.ms-mc { position: relative; gap: 12px; }
.ms-mc-badge { position: absolute; top: -10px; right: 16px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; color: var(--gold-900); background: var(--gold-500); }
.ms-mc-total { display: flex; align-items: baseline; gap: 9px; }
.ms-mc-total b { font-family: var(--font-display); font-weight: 700; font-size: 34px; color: var(--ms-cream); line-height: 1; }
.ms-mc-total span { font-size: 13px; color: var(--ms-muted); }
.ms-mc-extra { min-height: 24px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--gold-300); }
.ms-mc-bonus { font-weight: 700; color: var(--win); background: rgba(111,194,142,.12); border: 1px solid rgba(111,194,142,.35); padding: 2px 9px; border-radius: 999px; }

@media (max-width: 980px) and (min-height: 521px) {
    .ms-feat { grid-template-columns: minmax(0,1fr); }
    .ms-feat-art { order: -1; padding: 24px; }
}
@media (max-height: 520px) {
    .ms-feat { display: flex; align-items: center; gap: 20px; border-radius: 18px; padding: 14px 18px; }
    .ms-feat-art { order: -1; padding: 0; background: none; flex: none; width: 150px; }
    .ms-feat-table { border-radius: 10px; padding: 7px; }
    .ms-feat-table i { border-radius: 4px; }
    .ms-feat-copy { padding: 0; gap: 4px; flex: 1; }
    .ms-feat-copy .ms-kicker { font-size: 9px; letter-spacing: .24em; }
    .ms-feat-copy h2 { font-size: 24px; }
    .ms-feat-copy p { font-size: 11px; }
    .ms-feat-copy > div { position: absolute; }
    .ms-feat { position: relative; padding-right: 150px; }
    .ms-feat-copy > div { right: 18px; top: 50%; transform: translateY(-50%); }
    .ms-feat-buy { margin: 0; height: 44px; padding: 0 20px; font-size: 14px; }
    .ms-mc-total b { font-size: 24px; }
    .ms-mc-extra { min-height: 0; font-size: 10px; }
}

/* ---------- Inventário ---------- */
.ms-equip { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); border-radius: 20px; overflow: hidden; border: 1px solid rgba(201,165,92,.25); background: var(--ms-card); }
.ms-equip.solo { grid-template-columns: minmax(0,1fr); }
.ms-equip-main { padding: 32px; display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.ms-equip-title { display: flex; flex-direction: column; gap: 8px; }
.ms-equip-title > div { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.ms-equip-title h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1; color: var(--ms-title); }
.ms-equip-title .ms-item-rar { font-size: 12px; letter-spacing: .2em; }
.ms-equip-cue { height: 72px; border-radius: 10px; background: rgba(0,0,0,.25); display: flex; align-items: center; padding: 0 24px; }
.ms-equip-cue img { width: 100%; max-height: 46px; object-fit: contain; display: block; }
.ms-equip-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.ms-equip-stats > div { display: flex; flex-direction: column; gap: 4px; }
.ms-equip-stats b { font-family: var(--font-display); font-weight: 400; font-size: 28px; color: var(--ms-cream); }
.ms-equip-stats small { font-size: 10px; letter-spacing: .24em; color: var(--ms-muted); text-transform: uppercase; }
.ms-equip-side { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 14px; border-left: 1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.15); min-width: 0; }
.ms-jewels { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.ms-jewels .ms-kicker { font-size: 10px; }
.ms-jewel-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-jewel { position: relative; width: 44px; height: 44px; padding: 0; border-radius: 8px; border: 1px solid rgba(201,165,92,.35); background: rgba(0,0,0,.35); overflow: hidden; }
.ms-jewel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-jewel span { position: absolute; right: 2px; bottom: 1px; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.ms-cue-prev { height: 64px; padding: 0 18px; }
.ms-cue-prev .cue { max-height: 40px; }

.ms-closet { display: flex; gap: 22px; min-height: 0; }
.ms-closet-side { flex: 0 0 320px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ms-closet-prev { height: 380px; border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, rgba(215,174,79,.08), rgba(0,0,0,.45) 70%); border: 1px solid var(--ms-card-line); }
.ms-closet-prev iframe { width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.ms-closet-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ms-closet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ms-wear { padding: 12px; gap: 8px; align-items: center; cursor: pointer; text-align: center; }
.ms-wear img { width: 96px; height: 96px; border-radius: 10px; display: block; }
.ms-wear-name { font-size: 13px; font-weight: 600; color: var(--ink-100); line-height: 1.2; min-height: 32px; display: flex; align-items: center; }
.ms-wear .ms-act { width: 100%; min-height: 32px; font-size: 11px; }

@media (max-width: 980px) and (min-height: 521px) {
    .ms-equip { grid-template-columns: minmax(0,1fr); }
    .ms-equip-side { border-left: none; border-top: 1px solid rgba(255,255,255,.06); }
    .ms-closet { flex-direction: column; }
    .ms-closet-side { flex: none; }
}
@media (max-height: 520px) {
    .ms-equip { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 18px; border-radius: 18px; padding: 14px 18px; }
    .ms-equip-main { padding: 0; gap: 10px; }
    .ms-equip-title { flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; }
    .ms-equip-title .ms-kicker { font-size: 9px; letter-spacing: .26em; }
    .ms-equip-title > div { gap: 10px; }
    .ms-equip-title h2 { font-size: 20px; }
    .ms-equip-title .ms-item-rar { font-size: 9px; letter-spacing: .18em; }
    .ms-equip-cue { height: 30px; border-radius: 8px; padding: 0 12px; }
    .ms-equip-cue img { max-height: 20px; }
    .ms-equip-stats { gap: 26px; flex-wrap: nowrap; }
    .ms-equip-stats > div { flex-direction: row; align-items: baseline; gap: 6px; }
    .ms-equip-stats b { font-size: 18px; }
    .ms-equip-stats small { font-size: 8px; letter-spacing: .2em; }
    .ms-equip-side { padding: 0 0 0 18px; gap: 6px; background: none; }
    .ms-equip-side > .ms-kicker { display: none; }
    .ms-equip-side > .ms-note { order: 2; font-size: 10px; text-align: center; }
    .ms-equip-side .ms-btn-line { height: 30px; font-size: 11px; order: 3; }
    .ms-jewels { order: 4; margin-top: 2px; padding-top: 6px; }
    .ms-jewel { width: 30px; height: 30px; }
    .ms-inv-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .ms-cue-prev { height: 30px; padding: 0 8px; }
    .ms-cue-prev .cue { max-height: 18px; }
    .ms-closet { gap: 12px; }
    .ms-closet-side { flex: 0 0 210px; padding: 10px; gap: 8px; }
    .ms-closet-prev { height: 170px; }
    .ms-closet-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
    .ms-wear { padding: 8px; gap: 6px; }
    .ms-wear img { width: 60px; height: 60px; }
    .ms-wear-name { font-size: 11px; min-height: 26px; }
}

/* ---------- Perfil ---------- */
.ms-prof-head { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.ms-prof-id { display: flex; align-items: center; gap: 28px; min-width: 0; }
.ms-prof-av { position: relative; flex: none; width: 112px; height: 112px; border-radius: 50%; border: 2px solid var(--gold-600);
    background: radial-gradient(circle at 40% 35%, #24503a, #0e2318) center/cover no-repeat; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 34px; color: var(--ms-cream); }
.ms-prof-edit { position: absolute; right: 0; bottom: 4px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-500); color: var(--gold-900);
    display: flex; align-items: center; justify-content: center; border: 3px solid #0d1f15; }
.ms-prof-edit:disabled { opacity: .55; cursor: wait; }
.ms-prof-meta { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ms-prof-tag { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .36em; color: var(--ms-eyebrow); font-weight: 700; }
.ms-prof-meta h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 52px; line-height: .95; color: var(--ms-title); overflow-wrap: anywhere; }
.ms-prof-sub { font-size: 13px; color: var(--ms-muted); }
.ms-prof-xp { display: flex; flex-direction: column; gap: 10px; width: 320px; max-width: 100%; text-align: left; }
.ms-prof-link { font-size: 12px; font-weight: 700; color: var(--gold-400); }
.ms-prof-xp:hover .ms-prof-link { color: var(--gold-300); }

.ms-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-radius: 16px; border: 1px solid var(--ms-card-line); background: var(--ms-card); }
.ms-kpi { padding: 24px 28px; display: flex; flex-direction: column; gap: 8px; border-left: 1px solid rgba(255,255,255,.06); min-width: 0; }
.ms-kpi:first-child { border-left: none; }
.ms-kpi small { font-size: 10px; letter-spacing: .26em; color: var(--ms-muted); font-weight: 700; }
.ms-kpi > div { display: flex; align-items: baseline; gap: 10px; }
.ms-kpi b { font-family: var(--font-display); font-weight: 400; font-size: 34px; color: var(--ms-cream); white-space: nowrap; }
.ms-kpi span { font-size: 13px; color: var(--win); font-weight: 700; }
.ms-prof-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 16px; }
.ms-chart { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ms-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ms-periods { display: flex; gap: 2px; }
.ms-periods button { height: 30px; padding: 0 12px; font-size: 12px; font-weight: 700; color: #7d786a; }
.ms-periods button.on { color: var(--gold-400); }
.ms-periods button:not(.on):hover { color: var(--ms-cream); }
.ms-chart-val { display: flex; align-items: baseline; gap: 10px; }
.ms-chart-val b { font-family: var(--font-display); font-weight: 400; font-size: 30px; color: var(--ms-cream); }
.ms-chart-val span { font-size: 12px; color: var(--ms-muted); }
.ms-line { width: 100%; height: 160px; display: block; }
.ms-bars { height: 160px; display: flex; align-items: flex-end; gap: 4px; }
.ms-bars i { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--gold-600); }
.ms-bars i.neg { background: var(--loss); }
.ms-modes { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.ms-modes-title { font-family: var(--font-display); font-size: 14px; letter-spacing: .18em; color: var(--ms-strong); }
.ms-mode { display: flex; flex-direction: column; gap: 8px; }
.ms-mode > div { display: flex; justify-content: space-between; font-size: 13px; }
.ms-mode > div span { color: #e6dcc4; }
.ms-mode > div small { color: var(--ms-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.ms-mode .ms-bar { height: 3px; background: rgba(255,255,255,.07); }
.ms-mode .ms-bar i { background: var(--win); }
.ms-prof-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.ms-prof-foot > div { display: flex; justify-content: space-between; }
.ms-prof-foot span { color: var(--ms-muted); }
.ms-prof-foot b { color: #e6dcc4; font-weight: 500; }

.ms-hist { overflow: hidden; }
.ms-hist-row { display: grid; grid-template-columns: 36px minmax(0,1fr) minmax(0,1fr) 110px; align-items: center; gap: 16px; padding: 16px 24px; border-top: 1px solid rgba(255,255,255,.06); font-size: 14px; }
.ms-hist-row.tx { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) 140px; }
.ms-hist-row:first-child { border-top: none; }
.ms-res { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; background: var(--win); color: #0b1510; }
.ms-res.l { background: var(--loss); }
.ms-res.d { background: var(--ms-muted); }
.ms-hist-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-hist-who b { color: #e6dcc4; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-hist-who small, .ms-hist-delta small { font-size: 11px; color: #7d786a; }
.ms-hist-mode { color: var(--ms-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-hist-delta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.ms-hist-delta b { font-weight: 700; color: #7d786a; }
.ms-hist-delta b.up { color: var(--gold-400); }
.ms-hist-delta b.down { color: var(--loss-bright); }

.ms-ach-sum { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ms-muted); flex-wrap: wrap; }
.ms-ach-sum strong { color: var(--gold-400); }
.ms-ach-sum .ms-bar { flex: 1; max-width: 300px; }
.ms-ach { gap: 12px; }
.ms-ach-row { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.ms-ach-row > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ms-ach-ico { flex: none; width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: rgba(255,255,255,.05); filter: grayscale(1); opacity: .7; }
.ms-ach-ico.on { background: var(--gold-500); color: var(--gold-900); filter: none; opacity: 1; }
.ms-ach-done { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--win); }
.ms-ach-prog { display: flex; flex-direction: column; gap: 6px; }
.ms-ach-prog small { font-size: 11px; color: var(--gold-400); }
.ms-col-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ms-muted); }
.ms-col-head strong { color: var(--gold-400); }

@media (max-width: 980px) and (min-height: 521px) {
    .ms-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .ms-kpi:nth-child(3) { border-left: none; }
    .ms-prof-grid { grid-template-columns: minmax(0,1fr); }
    .ms-prof-meta h1 { font-size: 40px; }
}
@media (max-height: 520px) {
    .ms-prof-head { flex-wrap: nowrap; gap: 16px; }
    .ms-prof-id { gap: 16px; }
    .ms-prof-av { width: 60px; height: 60px; font-size: 20px; }
    .ms-prof-edit { width: 22px; height: 22px; right: -3px; bottom: -2px; border-width: 2px; }
    .ms-prof-meta { gap: 4px; }
    .ms-prof-tag { font-size: 9px; letter-spacing: .26em; gap: 6px; }
    .ms-prof-meta h1 { font-size: 24px; line-height: 1; }
    .ms-prof-xp { width: auto; flex: 1; max-width: 220px; gap: 6px; }
    .ms-prof-xp .ms-xp-row { font-size: 10px; }
    .ms-kpis { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; border: none; background: none; }
    .ms-kpi { padding: 10px 14px; gap: 4px; border: 1px solid var(--ms-card-line); border-radius: 12px; background: var(--ms-card); }
    .ms-kpi:first-child { border-left: 1px solid var(--ms-card-line); }
    .ms-kpi small { font-size: 8px; letter-spacing: .2em; }
    .ms-kpi b { font-size: 20px; }
    .ms-kpi span { font-size: 10px; }
    .ms-prof-grid { grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 10px; }
    .ms-chart, .ms-modes { padding: 12px 14px; gap: 10px; border-radius: 14px; }
    .ms-chart-head { gap: 8px; flex-wrap: nowrap; }
    .ms-chart .ms-pill { height: 26px; padding: 0 10px; font-size: 10px; }
    .ms-periods button { height: 26px; padding: 0 6px; font-size: 10px; }
    .ms-line, .ms-bars { height: 90px; }
    .ms-bars { gap: 3px; }
    .ms-modes-title { font-size: 11px; letter-spacing: .14em; }
    .ms-mode { gap: 5px; }
    .ms-mode > div, .ms-mode > div small { font-size: 11px; }
    .ms-hist { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; border: none; background: none; }
    .ms-hist-row { grid-template-columns: 26px minmax(0,1fr) auto; gap: 10px; padding: 10px 12px; border: 1px solid var(--ms-card-line); border-radius: 12px; background: var(--ms-card); font-size: 12px; }
    .ms-hist-row.tx { grid-template-columns: minmax(0,1fr) auto; }
    .ms-hist-row:first-child { border-top: 1px solid var(--ms-card-line); }
    .ms-hist-mode { display: none; }
    .ms-res { width: 26px; height: 26px; font-size: 10px; }
    .ms-ach-ico { width: 36px; height: 36px; font-size: 16px; }
    .ms-col-head { font-size: 11px; }
}

/* ---------- Configurações ---------- */
.ms-cfg-page { max-width: 1100px; }
.ms-cfg { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 40px; align-items: start; }
.ms-cfg-tabs { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 100px; }
.ms-cfg-tabs button { height: 42px; padding: 0 14px; border-radius: 10px; display: flex; align-items: center; font-size: 14px; font-weight: 600; color: #9a9280; text-align: left; transition: color .15s, background .15s; }
.ms-cfg-tabs button:hover { color: var(--ms-cream); }
.ms-cfg-tabs button.on { background: rgba(201,165,92,.12); color: var(--ms-cream); }
.ms-cfg-rows { display: flex; flex-direction: column; min-width: 0; }
.ms-cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.06); width: 100%; text-align: left; color: inherit; }
.ms-cfg-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ms-cfg-txt span { font-size: 15px; font-weight: 600; color: var(--ink-100); }
.ms-cfg-txt small { font-size: 13px; color: var(--ms-muted); text-wrap: pretty; }
.ms-cfg-ctl { flex: none; display: flex; align-items: center; max-width: 60%; }
.ms-cfg-seg { flex-wrap: wrap; justify-content: flex-end; border: 1px solid rgba(255,255,255,.06); border-radius: 18px; }
.ms-cfg-seg .ms-pill { height: 32px; }
.ms-toggle { position: relative; width: 46px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.12); transition: background .15s; flex: none; }
.ms-toggle i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #0d1a12; transition: left .15s; }
.ms-toggle.on { background: var(--gold-500); }
.ms-toggle.on i { left: 23px; }
.ms-cfg-range { display: flex; align-items: center; gap: 12px; }
.ms-cfg-range input { width: 180px; accent-color: var(--gold-500); }
.ms-cfg-range span { width: 48px; text-align: right; font-size: 13px; color: #d9cdb0; font-variant-numeric: tabular-nums; }
.ms-cfg-link:hover .ms-cfg-txt span { color: var(--gold-400); }
.ms-cfg-go { flex: none; color: var(--ms-eyebrow); font-size: 18px; }
.ms-cfg-val { font-size: 14px; color: #d9cdb0; display: inline-flex; align-items: center; gap: 8px; }
.ms-cfg-danger { height: 36px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(226,87,76,.5); color: #ef8a80; display: flex; align-items: center; font-size: 13px; font-weight: 700; transition: background .15s; }
.ms-cfg-danger:hover { background: rgba(226,87,76,.1); }

@media (max-width: 980px) and (min-height: 521px) {
    .ms-cfg { grid-template-columns: minmax(0,1fr); gap: 20px; }
    .ms-cfg-tabs { position: static; flex-direction: row; flex-wrap: wrap; }
    .ms-cfg-row { flex-wrap: wrap; gap: 12px; }
    .ms-cfg-ctl { max-width: 100%; }
}
@media (max-height: 520px) {
    .ms-cfg { grid-template-columns: 130px minmax(0,1fr); gap: 20px; }
    .ms-cfg-tabs { top: 60px; }
    .ms-cfg-tabs button { height: 38px; padding: 0 12px; font-size: 12px; font-weight: 700; }
    .ms-cfg-row { gap: 16px; padding: 12px 0; min-height: 56px; }
    .ms-cfg-txt { gap: 2px; }
    .ms-cfg-txt span { font-size: 13px; }
    .ms-cfg-txt small { font-size: 11px; }
    .ms-cfg-seg .ms-pill { height: 30px; padding: 0 11px; font-size: 11px; }
    .ms-toggle { width: 48px; height: 28px; }
    .ms-toggle i { width: 22px; height: 22px; }
    .ms-toggle.on i { left: 23px; }
    .ms-cfg-range input { width: 160px; }
    .ms-cfg-range span { width: 40px; font-size: 12px; }
    .ms-cfg-danger { height: 34px; padding: 0 16px; font-size: 12px; }
}

/* ---------- peças comuns da etapa 4 ---------- */
.ms-eyebrow { text-transform: uppercase; }
.ms-eyebrow-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ms-live.on { background: rgba(212,87,76,.16); color: #f0a49c; }
/* ações do cabeçalho (ficam visíveis no celular deitado, sem o título) */
.ms-page-head > .ms-head-acts { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.ms-head-acts .ms-btn-line, .ms-head-acts .ms-btn-gold { height: 42px; }
.ms-tag { flex: none; font-size: 10.5px; font-weight: 700; color: #cdbd86; background: rgba(201,165,92,.1); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.ms-pills-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.ms-pills-scroll::-webkit-scrollbar { display: none; }
.ms-search { position: relative; display: flex; align-items: center; height: 38px; width: 240px; max-width: 100%; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08); color: var(--ms-eyebrow); padding-left: 14px; gap: 8px; }
.ms-search:focus-within { border-color: rgba(201,165,92,.5); }
.ms-search > span { display: inline-flex; flex: none; }
.ms-search input { flex: 1; min-width: 0; height: 100%; background: none; border: none; outline: none; color: var(--ink-100); font: inherit; font-size: 12.5px; padding-right: 14px; }
.ms-search input::placeholder { color: #6f6b5d; }
.ms-coin { width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; background: var(--gold-500); color: var(--gold-900); }
.ms-coin.chip { background: var(--gem, #d46fc0); color: #fff; font-size: 10px; }

/* ---------- Salas online ---------- */
.ms-lobby { max-width: 1480px; }
.ms-lobby-bar { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: -8px; }
.ms-lobby-bar > .ms-pills { flex: 0 1 auto; }
.ms-lobby-tools { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ms-sort { font-size: 12px; color: var(--ms-muted); white-space: nowrap; }
.ms-sort b { color: var(--gold-400); font-weight: 700; }
.ms-count { font-size: 12px; color: var(--ms-muted); white-space: nowrap; }
.ms-count b { color: var(--gold-400); }
.ms-view .ms-pill { width: 34px; padding: 0; justify-content: center; }
.ms-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ms-room { border-radius: 16px; padding: 12px; background: var(--ms-card); border: 1px solid var(--ms-card-line); display: flex; flex-direction: column; animation: ms-rise .4s ease-out both; transition: border-color .15s, transform .15s; min-width: 0; }
.ms-room:hover { border-color: rgba(201,165,92,.35); transform: translateY(-2px); }
.ms-room.live { border-color: rgba(212,87,76,.3); }
@keyframes ms-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rb-frame { position: relative; border-radius: 12px; padding: 9px; background: linear-gradient(150deg,#6e4724,#3a2412); box-shadow: inset 0 2px 3px rgba(255,255,255,.14), 0 6px 14px rgba(0,0,0,.4); }
.rb-felt { position: relative; height: 112px; border-radius: 7px; background: radial-gradient(ellipse at 50% 42%,#1c7349,#0c3e27 82%); box-shadow: inset 0 0 38px rgba(0,0,0,.6); }
.rb-pocket { position: absolute; border-radius: 50%; background: radial-gradient(circle at 40% 35%,#333,#000 70%); box-shadow: inset 0 1px 2px #000; }
.rb-ball { position: absolute; width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.rb-cue { position: absolute; left: 18%; top: 48%; width: 96px; height: 5px; border-radius: 3px; transform: rotate(-15deg); transform-origin: left center; background: linear-gradient(90deg,#7a5a2a,#c79a4e 55%,#ecdcb2); }
.ms-room-st { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(6,13,9,.75); font-size: 9.5px; font-weight: 800; letter-spacing: .12em; color: var(--gold-300); }
.ms-room-st i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }
.ms-room-st.live { color: #f0a49c; }
.ms-room-st.live i { background: #e2574c; animation: ms-pulse 1.4s infinite; }
@keyframes ms-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.ms-room-meta { padding: 14px 4px 2px; display: flex; flex-direction: column; gap: 12px; }
.ms-room-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ms-room-name { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 600; font-size: 16px; color: #efe3c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-room-lock { margin-left: 6px; display: inline-flex; vertical-align: middle; color: var(--ms-muted); }
.ms-room-who { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #a9a08a; min-width: 0; }
.ms-room-host { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.ms-room-host i { width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 8px; font-weight: 800; color: var(--gold-300); background: #13301f; border: 1px solid rgba(201,165,92,.4); }
.ms-room-host span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-room-streak { flex: none; color: #f0b35c; }
.ms-ping { margin-left: auto; flex: none; font-family: var(--font-mono); font-size: 11px; }
.ms-ping.good { color: var(--win); } .ms-ping.mid { color: var(--gold-400); } .ms-ping.bad { color: var(--loss); }
.ms-room-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ms-room-bet { display: flex; align-items: center; gap: 8px; }
.ms-room-bet > div { display: flex; flex-direction: column; gap: 2px; }
.ms-room-bet b { font-size: 15px; font-weight: 800; color: var(--ms-cream); line-height: 1; font-variant-numeric: tabular-nums; }
.ms-room-bet small { font-size: 9px; letter-spacing: .2em; color: var(--ms-muted); }
.ms-room-go { height: 36px; padding: 0 18px; border-radius: 999px; background: var(--gold-500); color: var(--gold-900); font-size: 12.5px; font-weight: 800; white-space: nowrap; transition: background .15s; }
.ms-room-go:hover:not(:disabled) { background: #e6c066; }
.ms-room-go.watch { background: rgba(212,87,76,.14); color: #f0a49c; border: 1px solid rgba(212,87,76,.45); }
.ms-room-go.watch:hover { background: rgba(212,87,76,.22); }
.ms-room-go.off { background: rgba(255,255,255,.04); color: var(--ms-muted); border: 1px solid rgba(255,255,255,.1); cursor: not-allowed; }
/* visão em lista */
.ms-room-list { display: flex; flex-direction: column; gap: 6px; }
.room-row { display: grid; grid-template-columns: 2.2fr 1.2fr 1.4fr 1.3fr 90px 140px 80px 80px 120px; gap: 14px; align-items: center; padding: 12px 18px; background: var(--ms-card); border: 1px solid var(--ms-card-line); border-radius: 12px; font-size: 13px; animation: ms-rise .4s ease-out both; transition: border-color .15s; }
.room-row:hover:not(.room-head) { border-color: rgba(201,165,92,.35); }
.room-head { padding: 4px 18px; background: transparent; border: none; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ms-eyebrow); animation: none; }

@media (max-width: 980px) and (min-height: 521px) {
    .ms-lobby-tools { margin-left: 0; }
}
@media (max-height: 520px) {
    .ms-page-head.ms-head-keep { display: flex; flex-wrap: nowrap; align-items: center; }
    .ms-page-head.ms-head-keep > div:first-child { display: none; }
    .ms-head-acts { gap: 8px; }
    .ms-head-acts .ms-btn-line, .ms-head-acts .ms-btn-gold { height: 34px; padding: 0 14px; font-size: 12px; }
    .ms-lobby-bar { margin-top: 0; gap: 8px 12px; }
    .ms-lobby-tools { gap: 10px; margin-left: 0; }
    .ms-search { height: 32px; width: 200px; }
    .ms-sort, .ms-count { display: none; }
    .ms-rooms { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
    .ms-room { padding: 8px; border-radius: 14px; }
    .rb-frame { padding: 6px; border-radius: 9px; }
    .rb-felt { height: 70px; }
    .rb-ball { width: 9px; height: 9px; }
    .rb-cue { width: 60px; height: 4px; }
    .ms-room-st { top: 5px; right: 5px; height: 18px; font-size: 8px; padding: 0 7px; }
    .ms-room-meta { padding: 8px 2px 0; gap: 8px; }
    .ms-room-name { font-size: 13px; }
    .ms-room-title .ms-tag { font-size: 9px; padding: 2px 7px; }
    .ms-room-who { font-size: 11px; gap: 8px; }
    .ms-room-host i { width: 18px; height: 18px; }
    .ms-room-bet b { font-size: 13px; }
    .ms-room-go { height: 30px; padding: 0 12px; font-size: 11px; }
}

/* volta para a tela de cima (Criar sala → Salões, Torneios → Salões…) */
.ms-crumb { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 28px; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--gold-400); }
.ms-crumb:hover { color: var(--gold-300); }
.ms-crumb + .ms-page-head { margin-top: -20px; }
.tn-shell > .ms-crumb + .ms-page-head { margin-top: -8px; }

/* ---------- Criar sala ---------- */
.ms-create { max-width: 1240px; }
.ms-create-grid { display: grid; grid-template-columns: minmax(0,1fr) 400px; gap: 24px; align-items: start; }
.ms-create-side { position: sticky; top: 100px; }
/* o resumo cabe na tela: só o meio rola, o botão Criar fica sempre à vista */
/* cabe na tela já na posição inicial (abaixo do título), não só depois de grudar no topo */
.ms-create-side .panel { display: flex; flex-direction: column; max-height: max(440px, calc(100vh - 290px)); max-height: max(440px, calc(100dvh - 290px)); }
.ms-create-side .panel > div:nth-child(2) { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.ms-create-prev > div { padding: 18px 30px 0 !important; }
.mini-tile { padding: 12px 6px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; color: var(--ink-200); cursor: pointer; transition: border-color .15s, background .15s; text-align: center; }
.mini-tile:hover { border-color: rgba(201,165,92,.4); }
.mini-tile.sel { border-color: var(--gold-500); background: rgba(215,174,79,.1); }
.mini-tile-icon { font-family: var(--font-display); font-size: 20px; color: var(--gold-400); margin-bottom: 4px; line-height: 1; }
.mini-tile-name { font-size: 11.5px; font-weight: 700; color: var(--ink-100); }
.table-card { background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 10px; cursor: pointer; transition: border-color .15s; text-align: left; min-width: 0; }
.table-card:hover:not(:disabled) { border-color: rgba(201,165,92,.4); }
.table-card.sel { border-color: var(--gold-500); background: rgba(215,174,79,.08); }
.table-card.locked { opacity: .6; }
.table-card.locked:hover { opacity: .85; }

@media (max-width: 980px) and (min-height: 521px) {
    .ms-create-grid { grid-template-columns: 1fr; }
    .ms-create-side { position: static; }
    .ms-create-side .panel { max-height: none; }
}
@media (max-height: 520px) {
    .ms-crumb { height: 24px; font-size: 11px; }
    .ms-create-grid { grid-template-columns: minmax(0,1fr) 260px; gap: 12px; }
    .ms-create-side { top: 64px; }
    .ms-create-side .panel { max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); }
    .ms-create-side .panel-header { display: none; }
    .ms-create-prev { display: none; }
    .ms-create .panel-body { padding: 14px 16px; gap: 16px !important; }
    .ms-create .panel-header { padding: 12px 16px; }
    .ms-create-side .panel > div > div { padding: 12px 16px !important; gap: 6px !important; }
    .ms-create .cr-modes-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .ms-create .cr-tables-grid, .ms-create .cr-envs-grid { grid-template-columns: repeat(3, minmax(0,1fr)) !important; gap: 8px !important; }
    .ms-create .table-card { padding: 6px; }
    .ms-create .btn-cta { min-height: 44px; font-size: 13px; padding: 0 16px; }
}

/* ---------- Treino ---------- */
.ms-arcade { max-width: 1460px; }
.ms-arc-grid { display: grid; grid-template-columns: minmax(0,1fr) 430px; gap: 28px; align-items: start; }
.ms-arc-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ms-arc-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.ms-arc-mode { position: relative; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 20px 18px 16px; border-radius: 16px; background: var(--ms-card); border: 1px solid var(--ms-card-line); color: #a9a08a; animation: ms-rise .4s ease-out both; transition: border-color .15s, transform .15s, background .15s; min-width: 0; }
.ms-arc-mode:hover:not(.locked) { border-color: rgba(201,165,92,.35); transform: translateY(-2px); }
.ms-arc-mode.on { border-color: rgba(215,174,79,.8); background: rgba(215,174,79,.07); }
.ms-arc-mode.locked { opacity: .45; cursor: not-allowed; }
.ms-arc-mode > i { font-style: normal; font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--gold-500); margin-bottom: 10px; }
.ms-arc-mode.on > i { color: var(--gold-300); }
.ms-arc-mode > b { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: #efe3c4; }
.ms-arc-mode > small { font-size: 10px; letter-spacing: .24em; font-weight: 700; text-transform: uppercase; color: var(--ms-eyebrow); }
.ms-arc-mode > span { margin-top: 6px; font-size: 11.5px; color: var(--ms-muted); }
.ms-arc-soon { position: absolute; top: 10px; right: 10px; margin: 0 !important; font-size: 8.5px !important; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ms-muted) !important; background: rgba(0,0,0,.35); border-radius: 999px; padding: 3px 8px; }
.ms-arc-opts { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.ms-arc-opt { display: flex; align-items: center; gap: 12px; }
.ms-arc-opt > span { font-size: 10px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--ms-eyebrow); }
.ms-arc-side { position: sticky; top: 100px; display: flex; flex-direction: column; max-height: max(440px, calc(100vh - 250px)); max-height: max(440px, calc(100dvh - 250px)); overflow: hidden; }
.ms-arc-side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid rgba(255,255,255,.06); }
.ms-arc-side-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-400); }
.ms-arc-side-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.ms-arc-prev > div { padding: 22px 26px 0 !important; }
.ms-arc-about { padding: 16px 22px 4px; }
.ms-arc-about h2 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--ms-title); }
.ms-arc-about p { margin: 0; font-size: 13px; line-height: 1.55; color: #a9a08a; }
.ms-arc-field { padding: 14px 22px 4px; display: flex; flex-direction: column; gap: 10px; }
.ms-arc-sync { color: var(--ms-muted); letter-spacing: .02em; text-transform: none; font-weight: 500; }
.ms-arc-hint { font-size: 11.5px; line-height: 1.5; color: var(--ms-muted); }
.ms-envs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
.ms-env { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 5px; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08); color: #bfb49a; font-size: 12px; font-weight: 600; transition: border-color .15s; }
.ms-env:hover { border-color: rgba(201,165,92,.4); }
.ms-env.on { border-color: var(--gold-500); color: var(--gold-300); background: rgba(215,174,79,.1); }
.ms-env.locked { opacity: .5; }
.ms-env > i { width: 24px; height: 22px; border-radius: 999px; flex: none; border: 1px solid rgba(0,0,0,.4); }
.ms-env-lock { display: inline-flex; }
.ms-arc-go { padding: 16px 22px 20px; border-top: 1px solid rgba(255,255,255,.06); }
.ms-arc-go .btn-cta { width: 100%; }

@media (max-width: 1100px) and (min-height: 521px) {
    .ms-arc-grid { grid-template-columns: 1fr; }
    .ms-arc-side { position: static; max-height: none; }
}
@media (max-height: 520px) {
    .ms-arc-grid { grid-template-columns: minmax(0,1fr) 290px; gap: 12px; }
    .ms-arc-main { gap: 12px; }
    .ms-arc-modes { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
    .ms-arc-mode { padding: 10px 12px; border-radius: 12px; gap: 2px; }
    .ms-arc-mode > i { font-size: 20px; margin-bottom: 4px; }
    .ms-arc-mode > b { font-size: 12.5px; }
    .ms-arc-mode > small { font-size: 8px; letter-spacing: .16em; }
    .ms-arc-mode > span { display: none; }
    .ms-arc-soon { top: 6px; right: 6px; font-size: 7px !important; padding: 2px 6px; }
    .ms-arc-opts { gap: 8px 16px; }
    .ms-arc-opt { gap: 8px; }
    .ms-arc-opt > span { font-size: 8.5px; letter-spacing: .18em; }
    .ms-arc-side { top: 64px; max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); }
    .ms-arc-side-head, .ms-arc-prev, .ms-arc-about p { display: none; }
    .ms-arc-about { padding: 12px 16px 0; }
    .ms-arc-about h2 { font-size: 18px; margin: 0; }
    .ms-arc-field { padding: 10px 16px 2px; gap: 8px; }
    .ms-env { height: 28px; font-size: 11px; }
    .ms-env > i { width: 20px; height: 18px; }
    .ms-arc-go { padding: 10px 16px 12px; }
    .ms-arc-go .btn-cta { min-height: 42px; font-size: 13px; }
}

/* ---------- Torneios ---------- */
.tn-shell { max-width: 1150px; gap: 20px; }
.tn-shell .tn-head + * { margin-top: 4px; }
.tn-detail { display: flex; flex-direction: column; gap: 18px; }
.tn-detail .tn-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.tn-detail .ms-crumb + .tn-head { margin-top: -6px; }
.tn-kicker { font-size: 10px; font-weight: 700; color: var(--ms-eyebrow); letter-spacing: .26em; text-transform: uppercase; }
.tn-title { font-family: var(--font-display); font-weight: 600; font-size: 36px; line-height: 1.05; color: var(--ms-title); margin: 6px 0 4px; }
.tn-sub { font-size: 12.5px; line-height: 1.5; color: var(--ms-muted); margin-top: 3px; }
.tn-head .tn-sub { max-width: 640px; }
.tn-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tn-empty { padding: 48px 0; text-align: center; font-size: 14px; color: var(--ms-muted); }
.tn-msg { color: var(--loss-bright); font-size: 13px; }
.tn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tn-card { text-align: left; padding: 20px; border-radius: 16px; background: var(--ms-card); border: 1px solid var(--ms-card-line); color: inherit; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s; }
.tn-card:hover { border-color: rgba(201,165,92,.35); }
.tn-card.st-running { border-color: rgba(111,194,142,.45); }
.tn-card-name { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: #efe3c4; margin: 6px 0 4px; }
.tn-count { font-family: var(--font-mono); color: var(--gold-300); }
.tn-podium { display: flex; gap: 12px; flex-wrap: wrap; }
.tn-podium div { background: rgba(201,165,92,.08); border: 1px solid rgba(201,165,92,.3); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-100); }
.tn-podium span { color: var(--gold-300); font-size: 12px; }
.tn-table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--ink-100); }
.tn-table th { text-align: left; font-size: 10px; font-weight: 700; color: var(--ms-eyebrow); text-transform: uppercase; letter-spacing: .2em; padding: 8px 6px; }
.tn-table td { padding: 9px 6px; border-top: 1px solid rgba(255,255,255,.06); }
.tn-table tr.me td { color: var(--gold-300); }
.tn-bracket { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 8px; }
.tn-round { display: flex; flex-direction: column; gap: 10px; min-width: 220px; justify-content: space-around; }
.tn-round-h { font-size: 10px; font-weight: 700; color: var(--ms-eyebrow); letter-spacing: .24em; text-transform: uppercase; }
.tn-match { background: var(--ms-card); border: 1px solid var(--ms-card-line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.tn-match.mine { border-color: rgba(215,174,79,.6); }
.tn-match.row { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.tn-p { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-200); cursor: pointer; }
.tn-p.win { color: var(--win); font-weight: 700; }
.tn-p.tn-empty { color: var(--ms-muted); cursor: default; padding: 0; }
.tn-on { width: 6px; height: 6px; border-radius: 50%; background: var(--win); display: inline-block; }
.tn-mstatus { font-size: 11px; color: var(--ms-muted); }
.tn-vs { color: var(--ms-muted); }
.tn-lmatches { display: flex; flex-direction: column; gap: 6px; }
.tn-form { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.tn-h3 { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--ms-title); }
.tn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tn-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ms-eyebrow); }
@media (max-height: 520px) {
    .tn-shell { gap: 12px; }
    .tn-list { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
    .tn-card { padding: 12px 14px; border-radius: 14px; }
    .tn-card-name { font-size: 15px; margin: 4px 0 2px; }
    .tn-sub { font-size: 11px; }
    .tn-title { font-size: 24px; }
    .tn-empty { padding: 24px 0; font-size: 12px; }
}

/* ---------- Sala de espera (rei da mesa) ---------- */
@keyframes wr-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes wr-shine { 0% { transform: translateX(-120%); } 100% { transform: translateX(220%); } }
.wr-shell { width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px 48px 40px; }
.wr-error { padding: 12px; border-radius: 12px; background: rgba(212,87,76,.12); border: 1px solid rgba(212,87,76,.4); color: var(--loss-bright); font-size: 13px; text-align: center; margin-bottom: 14px; }
.wr-header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--ms-line); }
.wr-back { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(201,165,92,.3); color: var(--gold-400); font-size: 12.5px; font-weight: 700; transition: background .15s; }
.wr-back:hover { background: rgba(201,165,92,.1); }
.wr-name { font-family: var(--font-display); font-weight: 600; font-size: 26px; color: var(--ms-title); }
.wr-tag { font-size: 11px; font-weight: 700; color: #cdbd86; background: rgba(201,165,92,.1); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.wr-statusbadge { display: flex; align-items: center; gap: 6px; height: 24px; border-radius: 999px; padding: 0 10px; font-weight: 800; font-size: 9.5px; letter-spacing: .12em; }
.wr-statusbadge i { width: 6px; height: 6px; border-radius: 50%; }
.wr-statusbadge.live { background: rgba(212,87,76,.16); color: #f0a49c; } .wr-statusbadge.live i { background: #e2574c; }
.wr-statusbadge.wait { background: rgba(201,165,92,.12); color: var(--gold-300); } .wr-statusbadge.wait i { background: var(--gold-500); }
.wr-watch { font-size: 12px; color: var(--ms-muted); white-space: nowrap; }
.wr-buyin { display: flex; align-items: center; gap: 7px; height: 36px; background: rgba(0,0,0,.3); border: 1px solid; border-radius: 999px; padding: 0 13px 0 5px; }
.wr-buyin-glyph { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.wr-buyin b { font-weight: 800; font-size: 13px; color: var(--ms-cream); font-variant-numeric: tabular-nums; }
.wr-buyin-lbl { font-size: 9px; letter-spacing: .2em; color: var(--ms-muted); }
.wr-body { display: grid; grid-template-columns: minmax(0,1fr) 340px; border: 1px solid var(--ms-card-line); border-radius: 16px; overflow: hidden; background: var(--ms-card); }
.wr-arena { padding: 22px 24px; border-right: 1px solid rgba(255,255,255,.06); min-width: 0; }
.wr-players { display: flex; align-items: center; justify-content: center; gap: 24px; margin-bottom: 18px; }
.wr-pside { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.wr-pside.left { justify-content: flex-end; }
.wr-pside.left .wr-pside-txt { text-align: right; }
.wr-pside.right { justify-content: flex-start; }
.wr-pside-txt { min-width: 0; }
.wr-pside-name { font-weight: 700; font-size: 14px; color: var(--ms-cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-pside-sub { font-size: 11px; color: var(--ms-muted); margin-top: 2px; }
.wr-ring { border-radius: 50%; background: radial-gradient(circle at 35% 30%,#1d3a28,#0a1a12); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ms-cream); flex-shrink: 0; background-size: cover; }
.wr-score { text-align: center; flex-shrink: 0; }
.wr-vs { font-family: var(--font-display); font-weight: 600; font-size: 30px; color: var(--gold-400); line-height: 1; }
.wr-frames { font-size: 9px; font-weight: 700; letter-spacing: .24em; color: var(--ms-eyebrow); margin-top: 6px; }
.wr-felt-frame { position: relative; border-radius: 14px; padding: 14px; background: linear-gradient(150deg,#6e4724,#3a2412); box-shadow: inset 0 2px 4px rgba(255,255,255,.14), 0 8px 20px rgba(0,0,0,.45); }
.wr-felt { position: relative; height: 210px; border-radius: 9px; overflow: hidden; background: radial-gradient(ellipse at 50% 42%,#1f7d50,#0c3e27 84%); box-shadow: inset 0 0 60px rgba(0,0,0,.6); }
.wr-felt-shine { position: absolute; top: 0; left: 0; width: 60%; height: 100%; background: linear-gradient(90deg,transparent,rgba(255,255,255,.07),transparent); animation: wr-shine 5s ease-in-out infinite; }
.wr-felt .pk { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 40% 35%,#333,#000 70%); box-shadow: inset 0 2px 3px #000; }
.wr-felt .bl { position: absolute; width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 2px 3px rgba(0,0,0,.6); }
.wr-felt .cue { position: absolute; left: 20%; top: 50%; width: 140px; height: 7px; border-radius: 4px; transform: rotate(-14deg); transform-origin: left center; background: linear-gradient(90deg,#7a5a2a,#c79a4e 55%,#ecdcb2); }
.wr-queue-head { display: flex; align-items: center; gap: 10px; margin: 20px 0 13px; flex-wrap: wrap; }
.wr-queue-head > span:first-child { font-size: 10px; font-weight: 700; letter-spacing: .26em; color: var(--ms-eyebrow); }
.wr-queue-count { font-size: 11px; color: var(--gold-900); background: var(--gold-500); border-radius: 999px; padding: 2px 9px; font-weight: 800; }
.wr-queue-note { font-size: 11px; color: var(--ms-muted); }
.wr-queue-empty { font-size: 13px; color: var(--ms-muted); text-align: center; padding: 18px; border: 1px dashed rgba(255,255,255,.1); border-radius: 12px; }
.wr-queue { display: grid; grid-template-columns: repeat(auto-fill,minmax(118px,1fr)); gap: 12px; }
.wr-qcard { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 13px 8px; border-radius: 12px; background: rgba(0,0,0,.18); border: 1px solid var(--ms-card-line); }
.wr-qavatar-wrap { position: relative; }
.wr-qpos { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); font-weight: 800; font-size: 9px; letter-spacing: .06em; color: var(--ms-cream); background: rgba(255,255,255,.1); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.wr-qname { font-size: 12px; font-weight: 600; color: var(--ms-cream); margin-top: 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wr-chat { display: flex; flex-direction: column; background: rgba(0,0,0,.14); min-height: 540px; }
.wr-chat-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.wr-chat-head > span:first-child { font-size: 10px; font-weight: 700; letter-spacing: .26em; color: var(--ms-eyebrow); }
.wr-chat-online { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--win); }
.wr-chat-online i { width: 6px; height: 6px; border-radius: 50%; background: var(--win); }
.wr-chat-body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; }
.wr-chat-empty { font-size: 12px; color: var(--ms-muted); text-align: center; margin: auto; }
.wr-msg { display: flex; align-items: flex-start; gap: 9px; max-width: 90%; }
.wr-msg.mine { flex-direction: row-reverse; align-self: flex-end; }
.wr-msg-col { min-width: 0; }
.wr-msg.mine .wr-msg-col { text-align: right; }
.wr-msg-name { font-size: 10.5px; font-weight: 700; margin-bottom: 3px; }
.wr-bubble { font-size: 12.5px; line-height: 1.45; color: var(--ink-100); background: rgba(255,255,255,.05); border-radius: 12px; padding: 8px 11px; word-break: break-word; display: inline-block; text-align: left; }
.wr-msg.mine .wr-bubble { background: rgba(215,174,79,.16); }
.wr-chat-input { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-top: 1px solid rgba(255,255,255,.06); }
.wr-chat-input input { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; color: var(--ink-100); background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 10px 15px; outline: none; }
.wr-chat-input input:focus { border-color: rgba(201,165,92,.5); }
.wr-chat-input input::placeholder { color: #6f6b5d; }
.wr-chat-input button { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--gold-500); color: var(--gold-900); font-size: 14px; }
.wr-chat-input button:hover { background: #e6c066; }
.wr-cta { display: flex; align-items: center; gap: 12px; padding-top: 18px; flex-wrap: wrap; }
.wr-cta-text { flex: 1; min-width: 200px; font-size: 13px; color: var(--ms-muted); }
.wr-cta-text b { color: var(--gold-400); }
.wr-cta-go { height: 46px; padding: 0 26px; border-radius: 999px; background: var(--gold-500); color: var(--gold-900); font-weight: 800; font-size: 14px; box-shadow: 0 10px 24px -10px rgba(215,174,79,.6); transition: background .15s; }
.wr-cta-go:hover { background: #e6c066; }
.wr-cta-go.ready { background: rgba(111,194,142,.14); color: var(--win); border: 1px solid rgba(111,194,142,.45); box-shadow: none; }
.wr-cta-leave { height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 13px; color: #f0a49c; background: rgba(212,87,76,.1); border: 1px solid rgba(212,87,76,.45); }
.wr-cta-leave:hover { background: rgba(212,87,76,.18); }
.wr-ready-st { display: block; margin-top: 5px; font-size: 11px; color: var(--ms-muted); }
@media (max-width: 900px) and (min-height: 521px) {
    .wr-body { grid-template-columns: 1fr; }
    .wr-arena { border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
    .wr-chat { min-height: 360px; }
    .wr-shell { padding-left: 16px; padding-right: 16px; }
}
@media (max-height: 520px) {
    .wr-shell { padding: 0 max(16px, env(safe-area-inset-right)) 16px 20px; }
    .wr-header { gap: 8px; padding-bottom: 10px; margin-bottom: 10px; }
    .wr-name { font-size: 18px; }
    .wr-back, .wr-buyin { height: 30px; font-size: 11.5px; }
    .wr-watch { display: none; }
    .wr-body { grid-template-columns: minmax(0,1fr) 260px; }
    .wr-arena { padding: 12px 14px; }
    .wr-players { gap: 12px; margin-bottom: 10px; }
    .wr-vs { font-size: 22px; }
    .wr-felt { height: 120px; }
    .wr-felt-frame { padding: 8px; }
    .wr-queue-head { margin: 12px 0 8px; }
    .wr-chat { min-height: 300px; }
    .wr-chat-head { padding: 10px 14px; }
    .wr-chat-body { padding: 10px; gap: 8px; }
    .wr-chat-input { padding: 8px 10px; }
    .wr-cta { padding-top: 10px; gap: 8px; }
    .wr-cta-text { font-size: 11.5px; }
    .wr-cta-go, .wr-cta-leave { height: 38px; font-size: 12px; padding: 0 16px; }
}

/* ---------- Ranking ---------- */
.ms-lb { max-width: 1100px; }
.ms-lb-sub { font-size: 13px; color: var(--ms-muted); }
.ms-lb-me { font-size: 13px; font-weight: 700; color: var(--gold-400); }
.ms-lb-filters { display: flex; gap: 8px; margin-bottom: 8px; }
.ms-lb-filters .select { height: 36px; padding-top: 0; padding-bottom: 0; width: auto; }
.ms-lb-none { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 64px 16px; }
.ms-lb-none i { font-style: normal; font-family: var(--font-display); font-size: 40px; color: var(--gold-500); opacity: .6; }
.ms-lb-none b { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--ms-title); }
.ms-lb-none span { font-size: 13px; color: var(--ms-muted); }
.lb-spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.12); border-top-color: var(--gold-400); border-radius: 50%; display: inline-block; vertical-align: -2px; animation: lb-spin-rot .8s linear infinite; }
@keyframes lb-spin-rot { to { transform: rotate(360deg); } }
.lb-podium { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; align-items: end; }
.lb-pod { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.lb-podium-nick { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--ms-title); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-podium-title { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-400); }
.lb-podium-block { width: 100%; margin-top: 4px; height: 120px; border-radius: 14px 14px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 14px;
    font-family: var(--font-display); font-weight: 600; font-size: 44px; color: var(--medal);
    background: linear-gradient(180deg, color-mix(in srgb, var(--medal) 22%, transparent), rgba(255,255,255,.015)); border-top: 2px solid var(--medal); }
.lb-pod-1 .lb-podium-block { height: 156px; font-size: 56px; }
.lb-pod-3 .lb-podium-block { height: 100px; }
.lb-gtag { width: 34px; height: 34px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 11px; color: #1b1406; }
.lb-gtag.big { width: 64px; height: 64px; border-radius: 18px; font-size: 18px; }
.lb-list { display: flex; flex-direction: column; gap: 6px; }
.lb-row { display: grid; grid-template-columns: 56px minmax(0,1fr) 170px 150px; gap: 14px; align-items: center; padding: 12px 18px; border-radius: 12px; background: var(--ms-card); border: 1px solid var(--ms-card-line); }
.lb-rank { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--gold-400); }
.lb-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-name { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-100); min-width: 0; }
.lb-name b { font-size: 11px; font-weight: 800; }
.lb-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-rowsub { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ms-eyebrow); margin-top: 2px; }
.lb-wins { font-size: 13px; color: #a9a08a; }
.lb-val { font-family: var(--font-mono); font-size: 13px; color: var(--gold-300); text-align: right; }
@media (max-width: 980px) and (min-height: 521px) {
    .lb-row { grid-template-columns: 44px minmax(0,1fr) auto; }
    .lb-wins { display: none; }
}
@media (max-height: 520px) {
    .ms-lb-filters { margin-bottom: 4px; }
    .ms-lb-filters .select { height: 30px; font-size: 12px; }
    .ms-lb-me { font-size: 12px; }
    .ms-lb-none { padding: 24px 8px; gap: 6px; }
    .ms-lb-none b { font-size: 17px; }
    .lb-podium { gap: 10px; }
    .lb-pod .avatar-lg { width: 48px !important; height: 48px !important; font-size: 16px !important; }
    .lb-podium-nick { font-size: 14px; }
    .lb-podium-title { font-size: 9px; }
    .lb-podium-block { height: 60px; font-size: 28px; padding-top: 8px; }
    .lb-pod-1 .lb-podium-block { height: 78px; font-size: 34px; }
    .lb-pod-3 .lb-podium-block { height: 50px; }
    .lb-row { grid-template-columns: 40px minmax(0,1fr) 150px 120px; padding: 8px 12px; gap: 10px; }
    .lb-rank { font-size: 15px; }
}
