    :root { --paper: #F3EBD8; --ink: #2F4A40; --wood: #6E4F3A; --muted: #5A6A5E; --cream: #FBF6EA; --dark: rgba(30, 51, 43, 0.82); --accent: #C8553D; --gold: #F2D98B; }
    html, body { margin: 0; height: 100%; overflow: hidden; background: #365849; overscroll-behavior: none; }
    canvas { display: block; cursor: none; touch-action: none; -webkit-user-select: none; user-select: none; }
    button:focus-visible { outline: 3px solid #fff4c9; outline-offset: 3px; }
    /* ---------- Tela inicial (#join) e modais: página opaca, fonte Baloo 2, títulos/botões em Lilita One ---------- */
    :root { --bg: #3e4e48; --panel: #26342e; --row: #2a3933; --line: #3b4b44; --deep: #1e2824; --note: #2f3f38; --text: #f3ead3; --soft: #d6d0bd; --mute: #b9c2b4; --title: #f3dc8f; --btn: #e2bf7a; --btnline: #6b5442; --btntext: #2f4a3f; --link: #f0a58f; --live: #9fd36b; }
    #join { position: fixed; inset: 0; overflow-y: auto; background: var(--bg); }
    #join, dialog { color: var(--text); font: 600 16px/1.35 'Baloo 2', system-ui, sans-serif; }
    :is(#join, dialog) * { box-sizing: border-box; }
    :is(#join, dialog) [hidden] { display: none !important; }
    :is(#join, dialog) :focus-visible { outline: 3px solid #8fb3ff; outline-offset: 2px; }
    :is(#join, dialog) :is(h1, h2, h3, p) { margin: 0; }
    :is(#join, dialog) svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
    :is(#join, dialog) input, #lang { min-width: 0; height: 52px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--btnline); background: var(--text); color: var(--btntext); font: 700 19px 'Baloo 2', system-ui, sans-serif; }
    :is(#join, dialog) input::placeholder { color: #8a8473; }
    #name:disabled { background: var(--note); border-color: var(--line); color: var(--text); opacity: 1; } /* conta: nick fixo */
    .title { font: 400 32px/1.1 'Lilita One', system-ui, sans-serif; letter-spacing: .4px; color: var(--title); }
    .cap { font-size: 15px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .8px; }
    .sub { font-size: 15px; color: var(--mute); }
    .sub strong, .note strong { color: var(--text); }
    .row { display: flex; gap: 8px; align-items: center; }
    .row input { flex: 1; }
    .field { display: flex; flex-direction: column; gap: 8px; }
    .link { padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
    .link:hover { color: #ffc7b6; }
    .btn { min-height: 52px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 14px; border: 2px solid transparent; background: none; color: var(--text); font: 400 21px 'Lilita One', system-ui, sans-serif; letter-spacing: .3px; cursor: pointer; transition: transform .08s ease, filter .12s ease; }
    .btn:hover { filter: brightness(1.07); }
    .btn:active { transform: translateY(1px); }
    .btn.primary { border-color: var(--btnline); background: var(--btn); color: var(--btntext); }
    .btn.primary:disabled { background: #7d7660; cursor: not-allowed; filter: none; }
    .btn.outline { border-color: #8a948c; }
    .btn.gold { border-color: #e8d48a; background: var(--panel); color: var(--title); font-size: 19px; }
    .btn.plain { font: 700 17px 'Baloo 2', system-ui, sans-serif; color: var(--soft); }
    .btn.join { text-transform: capitalize; } /* texto "entrar"/"join": a chave "Entrar" já é "Log in" */
    .dice, .x { width: 52px; height: 52px; flex: none; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 2px solid var(--btnline); background: var(--line); color: var(--title); cursor: pointer; }
    :is(#join, dialog) .dice svg { width: 24px; height: 24px; stroke-width: 2; }
    .x { width: 44px; height: 44px; border: 0; background: none; color: var(--soft); }
    .x:hover { background: var(--line); }

    .page { max-width: 1200px; margin: 0 auto; padding: 20px 24px 48px; display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "logo lang nav" "main main main"; align-items: center; gap: 8px 12px; }
    .logo { grid-area: logo; line-height: 0; }
    .logo img { height: 104px; width: auto; margin-left: -12px; }
    #langbox { grid-area: lang; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--soft); }
    #lang { height: 44px; padding: 0 12px; border-radius: 10px; font-size: 16px; }
    #authnav { grid-area: nav; display: flex; align-items: center; gap: 12px; }
    #authnav .btn { height: 48px; min-height: 0; }
    #authopen { color: var(--text); }
    #account { color: var(--soft); }
    #account b { color: var(--title); }
    #join main { grid-area: main; padding-top: 4px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
    .maincol { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
    #join aside { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
    .panel { background: var(--panel); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
    #joinmsg { padding: 12px 16px; border-radius: 14px; border: 2px solid var(--link); background: #4a3b2c; font-weight: 700; }
    #joinmsg:empty { display: none; }

    #lobby .head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
    .pill { min-width: 32px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--line); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
    .pill:empty { display: none; }
    .live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--mute); }
    .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
    #rooms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: min(600px, 64vh); overflow-y: auto; }
    .room { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 12px; border-radius: 14px; background: var(--row); border: 1px solid var(--line); }
    .room:hover { background: #2e3e37; }
    .tile { width: 64px; height: 64px; flex: none; border-radius: 12px; display: flex; align-items: flex-end; overflow: hidden; }
    #join .tile svg { width: 64px; height: 40px; stroke: none; }
    .room .info { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
    .room .info b { font-size: 21px; font-weight: 700; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; color: var(--mute); }
    .meta > span { display: inline-flex; align-items: center; gap: 4px; }
    #join .meta svg { width: 15px; height: 15px; }
    .chip { padding: 2px 10px; border-radius: 999px; background: #4a3b2c; color: #f3cf9a; font-weight: 700; font-size: 14px; }
    .meta .bots:empty, .meta .cnt { display: none; }
    .t { font-variant-numeric: tabular-nums; }
    .seats { width: 120px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
    .seats > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 17px; }
    #join .seats svg { width: 16px; height: 16px; }
    .pips { display: flex; gap: 3px; }
    .pips i { width: 11px; height: 6px; border-radius: 3px; background: #46564e; }
    .pips .on { background: var(--btn); }
    .room .btn { height: 52px; min-width: 132px; }
    .room .btn:disabled { border: 2px dashed #5b6a62; background: none; color: #a9b3a8; font-size: 19px; cursor: not-allowed; filter: none; }
    #empty { padding: 44px 24px 40px; border-radius: 16px; border: 2px dashed #46564e; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
    #join #empty > svg { width: 168px; height: 112px; stroke: none; }
    #empty h3 { font-size: 30px; }
    #empty > p:not(.sub) { max-width: 440px; font-size: 17px; line-height: 1.45; color: var(--soft); }
    #empty .row { flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
    #empty .btn { height: 56px; padding: 0 26px; font-size: 21px; }

    #quick { height: 72px; flex-direction: column; gap: 0; border-radius: 16px; }
    #quick > span { display: inline-flex; align-items: center; gap: 10px; font-size: 28px; letter-spacing: .4px; }
    #join #quick svg { width: 24px; height: 24px; }
    #quick small { font: 700 14px 'Baloo 2', system-ui, sans-serif; color: #4a5a40; }
    #play > .btn.outline { height: 56px; }
    #codeform { padding-top: 20px; gap: 10px; }
    input#code { font-size: 20px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase; }
    #code::placeholder { letter-spacing: 1px; text-transform: none; }

    /* fim de partida, amigos e histórico */
    #final .title { text-align: center; }
    #final .sub { text-align: center; }
    #social summary { cursor: pointer; }
    #social:not([open]) { gap: 0; }
    .list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 14em; overflow-y: auto; }
    .list:empty { display: none; }
    .list li { display: flex; gap: 10px; align-items: baseline; padding: 6px 12px; border-radius: 10px; background: var(--row); }
    .list b { min-width: 1.4em; color: var(--title); }
    .list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .list i { font-style: normal; font-variant-numeric: tabular-nums; color: var(--mute); }
    .list .me { box-shadow: inset 0 0 0 2px var(--btn); }
    .list .empty { color: var(--mute); justify-content: center; }
    #invite .btn { min-height: 52px; }

    /* modais */
    dialog { width: min(500px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: 0 30px 80px #0007; }
    dialog::backdrop { background: rgba(14, 20, 17, .7); }
    dialog > form { display: flex; flex-direction: column; gap: 20px; padding: 28px 32px; }
    .grab { display: none; align-self: center; width: 44px; height: 5px; border-radius: 3px; background: #5b6a62; }
    .dhead { display: flex; align-items: center; justify-content: space-between; margin-right: -10px; }
    .radios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .radios button { padding: 14px; border-radius: 14px; border: 2px solid #46564e; background: none; color: var(--text); text-align: left; display: flex; flex-direction: column; gap: 4px; font: inherit; cursor: pointer; }
    .radios [aria-checked="true"] { border-color: var(--btn); background: #34463c; }
    .radios b { display: inline-flex; align-items: center; gap: 8px; font: 400 20px 'Lilita One', system-ui, sans-serif; }
    .radios span { font-size: 14px; line-height: 1.35; color: var(--mute); }
    .botsrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
    .botsrow > div:first-child { display: flex; flex-direction: column; gap: 2px; }
    .botsrow .sub { font-size: 14px; }
    .stepper { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 14px; background: var(--deep); }
    .stepper button { width: 44px; height: 44px; padding: 0; border-radius: 10px; border: 0; background: var(--line); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
    .stepper button:disabled { opacity: .4; cursor: not-allowed; }
    #join .stepper svg, dialog .stepper svg { width: 18px; height: 18px; stroke-width: 3; }
    .stepper output { min-width: 36px; text-align: center; font: 400 24px 'Lilita One', system-ui, sans-serif; color: var(--title); }
    .note { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--note); font-size: 15px; line-height: 1.4; color: var(--soft); }
    #privhint { justify-content: flex-start; align-items: flex-start; }
    #privhint svg { color: var(--btn); stroke-width: 2.2; margin-top: 1px; }
    .actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 4px; }
    .actions .btn { height: 56px; font-size: 22px; }
    .actions .btn.plain { font-size: 17px; }
    input#sheetcode { height: 72px; border-radius: 16px; font: 400 38px 'Lilita One', system-ui, sans-serif; letter-spacing: 12px; text-align: center; text-transform: uppercase; }
    #sheetcode::placeholder { color: #b8b09a; }
    #sheetgo { height: 60px; font-size: 24px; border-radius: 16px; }
    #rename { padding: 6px 4px; }
    #authbox { width: min(460px, calc(100vw - 32px)); }
    #authbox > form { gap: 16px; position: relative; }
    #authback { position: absolute; top: 14px; right: 14px; }
    .authtop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
    .authtop img { height: 64px; width: auto; }
    .authtop .title { margin-top: 4px; font-size: 30px; }
    .authtop .sub { font-size: 16px; }
    .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--deep); }
    .tabs button { height: 44px; border: 0; border-radius: 10px; background: none; color: var(--soft); font: 400 18px 'Lilita One', system-ui, sans-serif; cursor: pointer; }
    .tabs [aria-selected="true"] { background: var(--btn); color: var(--btntext); }
    #authbox .field { gap: 6px; font-size: 15px; font-weight: 700; color: var(--soft); }
    #authbox input { height: 50px; font-size: 17px; }
    #autherr { color: #ffb39a; font-weight: 700; }
    #autherr:empty { display: none; }
    #authgo { margin-top: 6px; height: 56px; font-size: 22px; }
    #authskip { align-self: center; padding: 8px 12px; color: var(--soft); text-decoration: none; font-size: 16px; }
    #authskip:hover { text-decoration: underline; }
    #fstip { width: min(420px, calc(100vw - 32px)); }
    #fstip > form { text-align: center; }
    #fstext { line-height: 1.45; color: var(--soft); }
    #fstip .actions { justify-content: center; }

    @media (min-width: 641px) { .mob { display: none !important; } }
    /* tablet / janela estreita: as duas colunas empilham; o card de jogar vem antes da lista */
    @media (max-width: 940px) { #join aside { order: -1; } }
    /* celular em pé: cabeçalho compacto, Jogo rápido em cima, lista corrida e barra fixa embaixo; modais viram folhas de baixo */
    @media (max-width: 640px) {
      .dsk { display: none !important; }
      .page { grid-template-columns: 1fr auto; grid-template-areas: "logo nav" "main main" "lang lang"; padding: 12px 16px calc(100px + env(safe-area-inset-bottom)); }
      .logo img { height: 60px; margin-left: -8px; }
      #langbox { justify-content: center; padding-top: 8px; font-size: 15px; }
      #authnav .btn { height: 44px; }
      #authopen { padding: 0 14px 0 10px; gap: 6px; border-radius: 999px; border-color: #e8d48a; background: var(--panel); color: var(--title); font: 800 15px 'Baloo 2', system-ui, sans-serif; }
      #join main { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; padding-top: 0; }
      .maincol, #join aside { display: contents; }
      #joinmsg, #final { order: -2; }
      #play { order: -1; padding: 0; background: none; gap: 12px; }
      #play .field { padding: 12px; border-radius: 16px; background: var(--panel); gap: 6px; }
      #play .cap { font-size: 13px; }
      #play input, #play .dice { height: 48px; font-size: 18px; }
      #play .dice { width: 48px; }
      #quick { height: 64px; }
      #quick > span { font-size: 26px; }
      #quick small { display: none; }
      #lobby { padding: 0; background: none; gap: 12px; }
      #lobby .head { flex-wrap: nowrap; gap: 0; padding: 4px 2px 0; }
      #lobby .title { font-size: 22px; }
      #lobby .pill { min-width: 0; height: auto; padding: 0; background: none; font: 400 22px 'Lilita One', system-ui, sans-serif; color: var(--title); }
      #lobby .pill::before { content: '\a0·\a0'; }
      .live { gap: 6px; font-size: 13px; }
      .live i { width: 7px; height: 7px; }
      #rooms { max-height: none; overflow: visible; }
      .room { flex-wrap: nowrap; gap: 12px; padding: 10px; background: var(--panel); }
      .room.full { opacity: .72; }
      .tile { width: 48px; height: 48px; border-radius: 10px; }
      #join .tile svg { width: 48px; height: 30px; }
      .tile circle { display: none; }
      .room .info { gap: 2px; }
      .room .info b { font-size: 18px; }
      .meta { flex-wrap: nowrap; font-size: 14px; white-space: nowrap; overflow: hidden; }
      .meta .cnt { display: inline-flex; color: var(--text); font-weight: 700; }
      #join .meta svg { width: 14px; height: 14px; }
      .chip { padding: 0; background: none; color: inherit; font: inherit; text-transform: lowercase; }
      .meta :is(.chip, .clock)::before { content: '·\a0'; }
      #join .clock svg, .meta .left, .meta .bots, .seats { display: none; }
      .room .btn { height: 48px; min-width: 96px; padding: 0 14px; font-size: 18px; border-radius: 12px; }
      .room .btn:disabled { font-size: 17px; }
      #empty { padding: 20px 18px; gap: 10px; }
      #join #empty > svg { width: 128px; height: 86px; }
      #empty h3 { font-size: 23px; }
      #empty > p:not(.sub) { font-size: 15px; }
      #empty .btn { height: 52px; font-size: 20px; }
      #mnav { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--panel); border-top: 1px solid var(--line); }
      #mnav .btn { height: 52px; padding: 0 8px; gap: 8px; font-size: 18px; }
      #join #mnav svg { width: 18px; height: 18px; }
      dialog.sheet { width: 100%; max-width: none; margin: auto 0 0; border: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -20px 50px #0006; }
      dialog.sheet > form { gap: 16px; padding: 10px 20px calc(28px + env(safe-area-inset-bottom)); }
      .grab { display: block; }
      .dhead .title { font-size: 26px; }
      .radios { gap: 8px; }
      .radios button { padding: 12px; }
      .radios b { font-size: 18px; }
      .radios span, .botsrow .sub { font-size: 13px; }
      .actions .btn { flex: 1; height: 60px; font-size: 24px; border-radius: 16px; }
      #authbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; }
      #authbox > form { min-height: 100%; padding: 8px 20px 24px; gap: 14px; }
      #authback { top: 8px; right: 12px; }
      .authtop { align-items: flex-start; text-align: left; gap: 2px; }
      .authtop img { height: 44px; margin: 0 0 8px -4px; }
      .authtop .sub { font-size: 15px; }
      #authskip { margin-top: auto; }
    }
    /* celular deitado: pouca altura, cabeçalho menor e duas colunas lado a lado, sem rolar até o Jogo rápido */
    @media (max-height: 500px) and (orientation: landscape) {
      .page { padding: 8px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); }
      .logo img { height: 52px; }
      #join main { flex-wrap: nowrap; gap: 16px; }
      .maincol { flex: 1 1 0; }
      #join aside { flex: 0 0 300px; order: 0; }
      .panel { padding: 16px; gap: 12px; }
      #quick { height: 60px; }
      #quick > span { font-size: 24px; }
      .seats, .meta .bots { display: none; }
      .meta .cnt { display: inline-flex; }
      .room { flex-wrap: nowrap; gap: 12px; }
      .room .btn { min-width: 96px; }
    }

    /* ---------- HUD (desktop) ---------- */
    #hud { position: fixed; inset: 0; pointer-events: none; font: 700 13px Nunito, system-ui, sans-serif; color: var(--ink); -webkit-user-select: none; user-select: none; }
    #hud button { pointer-events: auto; font: inherit; color: inherit; cursor: pointer; touch-action: none; }
    #hud svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
    .display { font-family: 'Lilita One', Nunito, system-ui, sans-serif; font-weight: 400; letter-spacing: 0.02em; line-height: 1; }
    .card { box-sizing: border-box; background: var(--paper); border: 2px solid var(--wood); border-bottom-width: 4px; border-radius: 16px; }
    .dark { background: var(--dark); color: var(--cream); }
    .label { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
    .ic { display: inline-flex; align-items: center; gap: 5px; }
    kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; box-sizing: border-box; border: 1.5px solid currentColor; border-bottom-width: 3px; border-radius: 5px; font: 900 12px Nunito, system-ui, sans-serif; }
    .touch .d-only, body:not(.touch) .m-only, #hud:not(.online) .online-only, #hud.nohelp #help { display: none !important; }

    #me { position: absolute; left: 24px; top: 24px; width: 292px; padding: 14px 16px 14px 14px; display: flex; gap: 12px; align-items: center; }
    #me .avatar { flex: none; width: 48px; height: 48px; box-sizing: border-box; border-radius: 14px; background: #F6D3DA; border: 2px solid var(--wood); display: flex; align-items: center; justify-content: center; }
    #me .avatar svg { width: 30px; height: 30px; }
    #me .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
    #myname { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #me .stats { display: flex; gap: 14px; font-size: 13px; font-weight: 800; color: #4A5A4F; }
    #me .stats svg { width: 14px; height: 14px; stroke-width: 2.5; }

    #top { position: absolute; left: 50%; top: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
    #clock { display: flex; align-items: stretch; border-radius: 999px; overflow: hidden; white-space: nowrap; }
    #clock > div { display: flex; align-items: center; gap: 8px; padding: 8px 18px 8px 16px; }
    #clock .sep { width: 2px; padding: 0; background: #D3C4A4; }
    #clock [hidden] { display: none; }
    #roomtitle { max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
    .touch #roomtitle { max-width: 8em; }
    #clock b { font-size: 22px; font-variant-numeric: tabular-nums; }
    #timer.low { color: var(--accent); }
    #progress { width: 180px; height: 5px; border-radius: 3px; background: rgba(30, 51, 43, 0.35); overflow: hidden; }
    #progress div { height: 100%; background: var(--paper); }

    #right { position: absolute; right: 24px; top: 24px; width: 268px; display: flex; flex-direction: column; gap: 10px; }
    #board { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 6px; }
    #board header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 6px; border-bottom: 2px solid #C9A98A; }
    #board header .display { font-size: 18px; }
    .hint { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--muted); }
    .hint kbd { min-width: 28px; height: 20px; background: var(--cream); color: var(--ink); border-color: var(--wood); font-size: 11px; }
    #rows div { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; font-size: 14px; font-weight: 800; }
    #rows div:nth-child(n+6) { display: none; } /* top 5; segurar Tab mostra todo mundo */
    .tab #rows div { display: flex; }
    #rows .me { background: #F6D3DA; color: #7A2E3C; }
    #rows b { width: 18px; font-weight: 900; color: var(--wood); }
    #rows span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #rows i { font-style: normal; font-weight: 900; font-variant-numeric: tabular-nums; }
    #feed { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
    #feed div { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: rgba(30, 51, 43, 0.6); color: var(--cream); font-size: 13px; font-weight: 800; }
    #feed div:first-child { background: var(--dark); }
    #feed .me { color: #F6C9D2; }
    #feed svg { width: 16px; height: 16px; stroke-width: 2.2; }

    #arsenal { position: absolute; left: 24px; bottom: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; } /* canto esquerdo: no centro atrapalhava a mira pra baixo */
    #current { display: flex; align-items: baseline; gap: 10px; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
    #wname { font-size: 18px; text-transform: capitalize; }
    #wammo { font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--gold); }
    #weapons { display: flex; gap: 10px; padding: 10px; border-radius: 20px; }
    .slot { position: relative; width: 76px; height: 76px; box-sizing: border-box; padding: 14px 0 6px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; border-radius: 14px; background: #E6DBC2; border: 2px solid #B49A7C; transition: transform .12s; }
    .slot.on { background: #FFF8E6; border: 3px solid var(--accent); box-shadow: 0 4px 0 var(--accent); transform: translateY(-4px); }
    #hud .slot svg { width: 34px; height: 34px; stroke-width: 1.9; }
    .slot kbd { position: absolute; left: 5px; top: 4px; min-width: 0; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 5px; background: var(--ink); color: var(--cream); font-size: 11px; }
    /* pente/recarga: fatia escura que some girando, tipo recarga de habilidade (--fill vem do game.js) */
    .slot::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: conic-gradient(transparent calc(var(--fill, 1) * 360deg), rgba(30, 51, 43, 0.5) 0); }
    .slot.hooked:not(.on) { border-color: var(--accent); } /* corda presa enquanto usa outra arma */
    .slot small { font-size: 11px; font-weight: 900; color: #4A5A4F; font-variant-numeric: tabular-nums; }

    #help { display: flex; flex-direction: column; gap: 5px; padding: 7px 10px; border-radius: 10px; background: rgba(30, 51, 43, 0.78); font-size: 11px; }
    #help div { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
    #help kbd { min-width: 18px; height: 18px; padding: 0 4px; border-bottom-width: 2px; font-size: 10px; }
    #help span { margin-right: 6px; }
    #help .dim { margin: 0; opacity: 0.75; }
    #pad { position: absolute; right: 24px; bottom: 24px; max-width: 320px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(30, 51, 43, 0.78); font-size: 12px; }
    #hud #pad svg { width: 20px; height: 20px; stroke-width: 2; }
    #padinfo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* ---------- HUD (toque / celular deitado) ---------- */
    #actions { position: absolute; right: 44px; top: 12px; display: flex; gap: 8px; }
    body:not(.touch) #actions { top: auto; right: 24px; bottom: 72px; } /* desktop: só o botão de tela cheia, acima do status do controle */
    #fs .off, #hud.fs #fs .on { display: none; }
    #hud.fs #fs .off { display: block; }
    #actions button { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 12px; border-bottom-width: 3px; }
    #newmap { margin-top: 4px; height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--ink); color: var(--cream) !important; border: 0; border-radius: 10px; font-size: 14px !important; font-weight: 800; }
    #hud #newmap svg { width: 16px; height: 16px; }

    .touch #me { left: 44px; top: 12px; width: 196px; padding: 7px 10px 7px 7px; gap: 8px; border-bottom-width: 3px; border-radius: 14px; }
    .touch #me .avatar { width: 34px; height: 34px; border-width: 1.5px; border-radius: 10px; }
    .touch #me .avatar svg { width: 22px; height: 22px; }
    .touch #me .info { flex-direction: row; align-items: baseline; justify-content: space-between; }
    .touch #myname { font-size: 15px; }
    .touch #me .stats { font-size: 11px; font-weight: 900; color: #7A2E3C; }
    .touch #top { top: 12px; gap: 6px; }
    .touch #clock { border-bottom-width: 3px; }
    .touch #clock > div { padding: 6px 12px; gap: 5px; }
    .touch #clock .sep { padding: 0; margin: 8px 0; }
    .touch #clock b { font-size: 16px; }
    .touch #clock .label { font-size: 12px; letter-spacing: 0; text-transform: none; color: inherit; }
    .touch #hud svg { width: 14px; height: 14px; }
    .touch #actions svg { width: 20px; height: 20px; }
    .touch #right, .touch #arsenal { display: contents; }
    .touch #board { position: absolute; right: 44px; top: 66px; width: 220px; padding: 12px; border-radius: 14px; display: none; z-index: 1; }
    .touch .menu #board { display: flex; }
    .touch #board header .display { font-size: 16px; }
    .touch #rows div { padding: 3px 8px; font-size: 13px; }
    .touch #feed { position: absolute; left: 50%; top: 54px; transform: translateX(-50%); }
    .touch #feed div { padding: 3px 10px; border-radius: 8px; font-size: 11px; background: rgba(30, 51, 43, 0.78); }
    .touch #feed div:not(:first-child) { display: none; }
    .touch #feed svg { width: 13px; height: 13px; }
    .touch #current { position: absolute; right: 168px; bottom: 226px; transform: translateX(50%); gap: 6px; padding: 3px 10px; }
    .touch #wname { font-size: 13px; }
    .touch #wammo { font-size: 12px; }
    /* armas em arco em volta do joystick de mira (centro a 114px da direita e 82px de baixo, raio 104) */
    .touch #weapons { position: absolute; right: 114px; bottom: 82px; width: 0; height: 0; padding: 0; border: 0; background: none; }
    .touch .slot, .touch .slot.on { position: absolute; width: 54px; height: 54px; padding: 6px 0 5px; border-radius: 50%; border: 2px solid var(--wood); box-shadow: 0 3px 0 var(--wood); transform: translate(-50%, -50%); }
    .touch .slot.on { width: 60px; height: 60px; border: 3px solid var(--accent); box-shadow: 0 3px 0 var(--accent); }
    .touch #weapons .slot { left: var(--x); top: var(--y); } /* --x/--y calculados no game.js, de 180° a 45° */
    .touch #hud .slot svg { width: 26px; height: 26px; stroke-width: 2; }
    .touch .slot kbd { display: none; }
    .touch .slot small { font-size: 10px; line-height: 1; }
