/* ==========================================================================
   calc.css — simulador de build (/calc/). Só tokens do design system
   (--rt-*); prefixo rt-calc. Funciona de 360 px a 1440 px.
   ========================================================================== */

.rt-calc { margin: 0 0 40px; }
.rt-calc__oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rt-calc__pixel { image-rendering: pixelated; }
.rt-calc .rt-largura { max-width: 1320px; }
.rt-calc .rt-quadro--fluxo + .rt-quadro--fluxo { margin-top: 34px; }
.rt-calc .rt-quadro__papel { padding: 54px 26px 24px; }
.rt-calc__nota { margin: 0 0 12px; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--rt-texto-suave); }

/* ---------- barra: link e personagem ------------------------------------- */
.rt-calc__barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 26px;
  padding: 14px 18px; border-radius: 18px; background: rgba(255, 250, 238, .96); box-shadow: inset 0 0 0 2px var(--rt-papel-borda), 0 6px 14px rgba(80, 45, 15, .12); }
.rt-calc__compartilhar, .rt-calc__carregar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 340px; min-width: 0; }
.rt-calc__compartilhar .rt-entrada { flex: 1 1 220px; min-width: 0; font-size: 14px; font-weight: 700; }
.rt-calc__carregar { justify-content: flex-end; }
.rt-calc__carregar select { flex: 1 1 200px; min-width: 0; max-width: 340px; }
.rt-calc__carregar .rt-calc__nota { margin: 0; }
.rt-calc__estado { flex: 1 0 100%; margin: 0; min-height: 1.2em; font-size: 13.5px; font-weight: 800; color: var(--rt-texto-suave); text-align: center; }
.rt-calc__estado:empty { display: none; }

/* ---------- grade principal ---------------------------------------------- */
.rt-calc__grade { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 30px; align-items: start; }
.rt-calc__saida { position: sticky; top: calc(var(--rt-topo-altura) + 16px); max-height: calc(100vh - var(--rt-topo-altura) - 32px); overflow: auto; overscroll-behavior: contain; padding: 4px 4px 12px; scrollbar-width: thin; }
.rt-calc__saida .rt-quadro--fluxo { margin-top: 30px; }

/* ---------- personagem ---------------------------------------------------- */
.rt-calc__campo-classe { flex: 2 1 240px; }
.rt-calc__campo-curto { flex: 1 1 120px !important; }
.rt-calc__pontos { flex: 2 1 260px; margin: 0 0 6px; padding: 10px 14px; border-radius: 12px; background: #fff3c2; box-shadow: inset 0 0 0 2px #f2d88a; font-weight: 800; color: #7a4a10; }
.rt-calc__pontos b { display: inline-block; min-width: 2.2ch; padding: 0 8px; border-radius: 99px; background: var(--rt-vermelho); color: #fff; font-family: var(--rt-fonte-titulo); font-weight: 400; font-size: 20px; text-align: center; }
.rt-calc__pontos small { font-weight: 700; color: var(--rt-texto-suave); }
.rt-calc__pontos--estourou { background: #fde3dc; box-shadow: inset 0 0 0 2px #f2b3a6; color: #a8261f; }
.rt-calc__atributos { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rt-calc__atributo { display: grid; grid-template-columns: minmax(64px, 1fr) 40px 64px 40px; grid-template-areas: "sigla menos num mais" "total total custo custo"; align-items: center; gap: 4px 8px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 2px #ead8b8; }
.rt-calc__sigla { grid-area: sigla; display: flex; flex-direction: column; line-height: 1.05; }
.rt-calc__sigla abbr { font-family: var(--rt-fonte-titulo); font-size: 24px; color: var(--rt-vermelho); text-decoration: none; }
.rt-calc__sigla small { font-size: 12px; font-weight: 700; color: var(--rt-texto-suave); }
.rt-calc__menos, .rt-calc__mais { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; font-family: var(--rt-fonte-titulo); font-size: 24px; line-height: 1; color: #fff; cursor: pointer; touch-action: manipulation; box-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.rt-calc__menos { grid-area: menos; background: radial-gradient(circle at 40% 35%, #c98a5a, var(--rt-madeira)); }
.rt-calc__mais { grid-area: mais; background: radial-gradient(circle at 40% 35%, #f07a5c, var(--rt-vermelho)); }
.rt-calc__menos:active, .rt-calc__mais:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.rt-calc__numero { grid-area: num; width: 64px; padding: 4px; border: 2px solid #e2cfa6; border-radius: 10px; background: #fffdf6; font: inherit; font-family: var(--rt-fonte-titulo); font-size: 22px; text-align: center; color: var(--rt-texto); -moz-appearance: textfield; }
.rt-calc__numero::-webkit-inner-spin-button, .rt-calc__numero::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.rt-calc__numero:focus { outline: none; border-color: var(--rt-ouro-escuro); box-shadow: 0 0 0 3px rgba(245, 196, 81, .45); }
.rt-calc__total { grid-area: total; font-weight: 900; font-variant-numeric: tabular-nums; }
.rt-calc__total b { font-size: 17px; }
.rt-calc__bonus { color: #3a8a3f; font-weight: 900; }
.rt-calc__custo { grid-area: custo; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--rt-texto-suave); }

/* ---------- habilidades --------------------------------------------------- */
.rt-calc__habs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.rt-calc__hab { display: grid; grid-template-columns: minmax(0, 1fr) 72px; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 2px #ead8b8; }
.rt-calc__hab--ativa { background: #fffbea; box-shadow: 0 0 0 2px var(--rt-ouro-escuro); }
.rt-calc__hab label { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.rt-calc__hab img, .rt-calc__sem-icone { flex: none; width: 24px; height: 24px; border-radius: 6px; }
.rt-calc__sem-icone { display: inline-block; background: #f3e7d1; }
.rt-calc__hab-nome { min-width: 0; font-size: 14px; font-weight: 800; line-height: 1.25; }
.rt-calc__hab-nome a { color: inherit; text-decoration: none; }
.rt-calc__hab-nome a:hover { color: var(--rt-vermelho); text-decoration: underline; }
.rt-calc__hab select, .rt-calc__refino select, .rt-calc__buff select { width: 100%; min-height: 38px; padding: 4px 26px 4px 10px; border: 2px solid #d9c39a; border-radius: 10px; font: inherit; font-weight: 800; font-size: 15px; color: var(--rt-texto); appearance: none; -webkit-appearance: none; cursor: pointer;
  background: #fffcf4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a5a3b' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") right 8px center / 10px no-repeat; }
.rt-calc__selo { display: inline-block; padding: 0 7px; border-radius: 99px; background: #fde3dc; color: #a8261f; font-size: 11px; font-weight: 900; letter-spacing: .3px; text-transform: uppercase; vertical-align: 1px; }
.rt-calc__selo--mvp { background: #ece3ff; color: var(--rt-roxo); }

/* ---------- equipamento --------------------------------------------------- */
.rt-calc__slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rt-calc__slot { display: grid; gap: 6px; align-content: start; padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 2px #ead8b8; }
.rt-calc__slot--cheio { background: #fffbea; box-shadow: 0 0 0 2px #e9c770; }
.rt-calc__escolha { display: grid; gap: 2px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rt-calc__escolha:hover:not(:disabled) { background: rgba(245, 196, 81, .18); }
.rt-calc__escolha:focus-visible, .rt-calc__carta:focus-visible, .rt-calc__opcao:focus-visible { outline: 3px solid #ffb02e; outline-offset: 2px; }
.rt-calc__escolha:disabled { cursor: default; opacity: .7; }
.rt-calc__escolha-rotulo { font-size: 11.5px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: #b0632f; }
.rt-calc__escolha-nome { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; line-height: 1.25; }
.rt-calc__escolha-nome i { font-style: normal; font-weight: 700; color: var(--rt-texto-suave); }
.rt-calc__slot-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 2px 2px; }
.rt-calc__refino { flex: 0 0 76px; }
.rt-calc__carta { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 38px; padding: 4px 10px; border: 2px dashed #d9c39a; border-radius: 10px; background: #fffdf6; font: inherit; font-size: 13px; font-weight: 800; color: var(--rt-texto-suave); cursor: pointer; }
.rt-calc__carta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-calc__carta--cheia { border-style: solid; border-color: #c9a7e8; background: #f6f0ff; color: var(--rt-roxo); }

/* ---------- buffs --------------------------------------------------------- */
.rt-calc__grupo { margin: 6px 0 8px; font-family: var(--rt-fonte-titulo); font-weight: 400; font-size: 20px; color: var(--rt-madeira-escura); display: flex; align-items: center; gap: 10px; }
.rt-calc__grupo::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--rt-papel-borda), transparent); }
.rt-calc__buffs-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; margin-bottom: 8px; }
/* subgrade: rótulo, seletor e nota em linhas comuns, então os seletores
   lado a lado ficam na mesma altura mesmo quando um rótulo quebra */
.rt-calc__buffs-grade { row-gap: 6px; }
@supports (grid-template-rows: subgrid) {
  .rt-calc__buff { grid-row: span 3; grid-template-rows: subgrid; align-content: start; gap: 6px; margin-bottom: 8px; }
  .rt-calc__buff label { align-self: end; }
}
.rt-calc__buff label { font-size: 14px !important; }
.rt-calc__buff small { font-size: 12px !important; }

/* ---------- alvo ---------------------------------------------------------- */
.rt-calc__busca-mob { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.rt-calc__busca-mob .rt-calc__escolha { flex: 1 1 240px; background: #fff; box-shadow: 0 0 0 2px #ead8b8; }
.rt-calc__mundo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.rt-calc__jogador-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }

/* ---------- resultado ----------------------------------------------------- */
.rt-calc__finais { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px; }
.rt-calc__finais > div { padding: 6px 4px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 2px #ead8b8; text-align: center; }
.rt-calc__finais dt { font-family: var(--rt-fonte-titulo); font-size: 16px; color: var(--rt-vermelho); }
.rt-calc__finais dd { margin: 0; font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; }
.rt-calc__derivados { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin: 0; }
.rt-calc__derivados > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .75); box-shadow: inset 0 0 0 1px #ecdcbc; }
.rt-calc__derivados dt { font-weight: 900; font-size: 12.5px; letter-spacing: .3px; color: var(--rt-texto-suave); white-space: nowrap; }
.rt-calc__derivados dd { margin: 0; font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; font-size: 14.5px; }
.rt-calc__derivados > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rt-calc__sub { margin: 22px 0 10px; font-family: var(--rt-fonte-titulo); font-weight: 400; font-size: 24px; color: var(--rt-madeira-escura); }
.rt-calc__alvo { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(#fffaf0, #f6ead0); box-shadow: inset 0 0 0 2px var(--rt-papel-borda); }
.rt-calc__alvo-img { flex: none; max-width: 72px; max-height: 72px; object-fit: contain; }
.rt-calc__alvo p { margin: 0; }
.rt-calc__alvo-nome { font-family: var(--rt-fonte-titulo); font-size: 22px; line-height: 1.1; }
.rt-calc__alvo-nome a { color: var(--rt-texto); text-decoration: none; }
.rt-calc__alvo-nome a:hover { color: var(--rt-vermelho); }
.rt-calc__alvo-fatos { font-size: 13.5px; font-weight: 700; color: var(--rt-texto-suave); }
.rt-calc__danos { display: grid; gap: 12px; margin-top: 12px; }
.rt-calc__dano { padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 2px #ead8b8, 0 4px 10px rgba(80, 45, 15, .08); }
.rt-calc__dano header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rt-calc__dano h4 { margin: 0; font-size: 16.5px; font-weight: 900; }
.rt-calc__dano h4 small { font-weight: 700; color: var(--rt-texto-suave); }
.rt-calc__elemento { margin-left: auto; padding: 1px 10px; border-radius: 99px; background: #f3e7d8; color: #8a5a3b; font-size: 12px; font-weight: 900; }
.rt-calc__numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 6px; margin: 10px 0 8px; }
.rt-calc__numeros > div { padding: 6px 8px; border-radius: 10px; background: #fbf4e4; text-align: center; }
.rt-calc__numeros dt { font-size: 11.5px; font-weight: 900; letter-spacing: .4px; text-transform: uppercase; color: #b0632f; }
.rt-calc__numeros dd { margin: 0; font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; }
.rt-calc__numeros .rt-calc__destaque { background: linear-gradient(#fff3c2, #fde59a); }
.rt-calc__linha { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.6; color: var(--rt-texto-suave); }
.rt-calc__linha b { color: var(--rt-texto); font-variant-numeric: tabular-nums; }
.rt-calc__fonte { margin: 6px 0 0; font-size: 11.5px; font-weight: 600; color: #a28c74; overflow-wrap: anywhere; }
.rt-calc__aviso { margin: 6px 0 0; padding: 4px 10px; border-radius: 8px; background: #fff3c2; color: #7a4a10; font-size: 13px; font-weight: 800; }
.rt-calc__avisos { margin: 14px 0 0; padding: 10px 14px 10px 30px; border-radius: 12px; background: #fde3dc; color: #a8261f; font-size: 13.5px; font-weight: 700; }
.rt-calc__naolidos { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: #f6f0ff; box-shadow: inset 0 0 0 2px #dccdf2; font-size: 13.5px; }
.rt-calc__naolidos summary { cursor: pointer; font-weight: 900; color: var(--rt-roxo); }
.rt-calc__naolidos ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; }
.rt-calc__naolidos code { font-size: 12.5px; }

/* ---------- rodapé -------------------------------------------------------- */
.rt-calc__rodape { margin-top: 40px; }
.rt-calc__rodape p, .rt-calc__rodape li { font-size: 15px !important; }
.rt-calc__rodape code { font-size: 13px; overflow-wrap: anywhere; }

/* ---------- escolher (dialog) -------------------------------------------- */
.rt-calc__modal-caixa { width: min(560px, 100%); padding: 30px 22px 22px; }
.rt-calc__modal-caixa h2 { font-size: 30px !important; margin-bottom: 12px !important; }
.rt-calc__opcoes { list-style: none; margin: 12px 0 14px; padding: 4px; max-height: min(52vh, 460px); overflow: auto; display: grid; gap: 4px; }
.rt-calc__opcao { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px 10px; border: 0; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px #ecdcbc; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rt-calc__opcao:hover, .rt-calc__opcao:focus { background: #fff3c2; }
.rt-calc__opcao img { flex: none; max-width: 40px; max-height: 40px; }
.rt-calc__opcao span { display: grid; min-width: 0; }
.rt-calc__opcao b { font-weight: 800; font-size: 15px; }
.rt-calc__opcao small { font-size: 12.5px; font-weight: 600; color: var(--rt-texto-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-calc__vazio { padding: 16px; text-align: center; font-weight: 700; color: var(--rt-texto-suave); }

/* ---------- resumo fixo (celular e tablet) --------------------------------- */
.rt-calc__resumo { display: none; }
#calc-resultado { scroll-margin-top: calc(var(--rt-topo-altura) + 8px); }
.rt-calc__resumo > * { pointer-events: auto; }
.rt-calc__resumo-barra { display: flex; align-items: stretch; gap: 8px; padding: 8px; border-radius: 18px; background: linear-gradient(#fffaf0, #f4e7cc); box-shadow: 0 0 0 3px #b8613a, 0 0 0 5px #e6b68f, 0 10px 24px rgba(40, 15, 0, .4); }
.rt-calc__resumo-abrir { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 8px 4px 10px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 2px #ead8b8; font: inherit; color: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.rt-calc__resumo-abrir:focus-visible, .rt-calc__resumo-ir:focus-visible { outline: 3px solid #ffb02e; outline-offset: 2px; }
.rt-calc__resumo-linha { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.rt-calc__resumo-linha > span { display: grid; min-width: 0; line-height: 1.15; }
.rt-calc__resumo-linha small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 800; color: var(--rt-texto-suave); }
.rt-calc__resumo-linha b { font-family: var(--rt-fonte-titulo); font-weight: 400; font-size: 21px; color: var(--rt-vermelho); font-variant-numeric: tabular-nums; }
.rt-calc__resumo-dano { flex: 1 1 auto; }
.rt-calc__resumo-dano > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-calc__resumo-dano > span small { overflow: visible; }
.rt-calc__resumo-aspd { flex: none; padding-left: 10px; border-left: 2px solid #ecdcbc; text-align: center; }
.rt-calc__resumo-aspd b { color: var(--rt-madeira-escura); }
.rt-calc__resumo-seta { flex: none; width: 10px; height: 10px; border-right: 3px solid #b0632f; border-bottom: 3px solid #b0632f; transform: rotate(-135deg) translate(-3px, -3px); transition: transform .2s; }
.rt-calc__resumo--aberto .rt-calc__resumo-seta { transform: rotate(45deg); }
.rt-calc__resumo-ir { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 56px; padding: 0 10px; border-radius: 12px; background: radial-gradient(circle at 40% 30%, #f07a5c, var(--rt-vermelho)); color: #fff; font-family: var(--rt-fonte-titulo); font-size: 17px; text-decoration: none; box-shadow: 0 3px 0 #a3471b; }
.rt-calc__resumo-mais { max-height: min(55vh, 420px); overflow: auto; overscroll-behavior: contain; margin-bottom: 10px; padding: 12px 14px; border-radius: 16px; background: #fffaf0; box-shadow: 0 0 0 3px #b8613a, 0 10px 24px rgba(40, 15, 0, .35); }
.rt-calc__resumo-alvo { margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: var(--rt-texto-suave); }
.rt-calc__resumo-lista, .rt-calc__resumo-derivados { display: grid; gap: 4px; margin: 0; }
.rt-calc__resumo-lista > div, .rt-calc__resumo-derivados > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; padding: 6px 10px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px #ecdcbc; }
.rt-calc__resumo-lista dt { font-weight: 900; font-size: 14px; }
.rt-calc__resumo-lista dt small, .rt-calc__resumo-lista dd small { font-weight: 700; color: var(--rt-texto-suave); }
.rt-calc__resumo-lista dd, .rt-calc__resumo-derivados dd { margin: 0; font-weight: 900; font-variant-numeric: tabular-nums; }
.rt-calc__resumo-derivados { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
.rt-calc__resumo-derivados dt { font-size: 12.5px; font-weight: 900; color: var(--rt-texto-suave); }

/* ---------- telas menores ------------------------------------------------- */
@media (max-width: 1100px) {
  .rt-calc-js .rt-calc { padding-bottom: 90px; }
  .rt-calc-js .rt-calc__resumo { display: block; position: fixed; z-index: 300; left: 0; right: 0; bottom: 0; max-width: 680px; margin: 0 auto; padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); pointer-events: none; }
  .rt-calc-js .rt-calc__resumo[hidden] { display: none; }
  .rt-calc__grade { grid-template-columns: minmax(0, 1fr); }
  .rt-calc__saida { position: static; max-height: none; overflow: visible; padding: 0; }
}
@media (max-width: 720px) {
  .rt-calc .rt-quadro__papel { padding: 50px 14px 18px; }
  .rt-calc .rt-quadro--fluxo + .rt-quadro--fluxo { margin-top: 28px; }
  .rt-calc__finais { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rt-calc__derivados { grid-template-columns: minmax(0, 1fr); }
  .rt-calc__barra { padding: 12px; }
  .rt-calc__carregar { justify-content: stretch; }
  .rt-calc__carregar select { max-width: none; }
  .rt-calc__carregar .rt-botao, .rt-calc__compartilhar .rt-botao { flex: 1 1 auto; }
  .rt-calc__elemento { margin-left: 0; }
  /* 16 px: o iOS não dá zoom ao tocar no campo */
  .rt-calc__compartilhar .rt-entrada, .rt-calc__hab select, .rt-calc__refino select, .rt-calc__buff select, .rt-calc__modal input[type="search"] { font-size: 16px; }

  /* atributos: uma linha por atributo (sigla, −, número, +, total) */
  .rt-calc__atributos { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rt-calc__atributo { grid-template-columns: minmax(0, 1fr) 40px 52px 40px minmax(40px, auto); grid-template-areas: "sigla menos num mais total" "custo menos num mais total"; gap: 0 6px; padding: 8px 10px; }
  .rt-calc__sigla { flex-direction: row; align-items: baseline; gap: 6px; min-width: 0; }
  .rt-calc__sigla abbr { font-size: 22px; }
  .rt-calc__sigla small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rt-calc__numero { width: 52px; }
  .rt-calc__total { display: grid; justify-items: end; line-height: 1.1; }
  .rt-calc__total b { font-size: 19px; }
  .rt-calc__custo { text-align: left; font-size: 11.5px; white-space: nowrap; }

  /* equipamento: os slots vazios em duas colunas, os cheios na largura toda */
  .rt-calc__slots { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); grid-auto-flow: dense; gap: 8px; }
  .rt-calc__slot--cheio { grid-column: 1 / -1; }
  .rt-calc__slot { padding: 4px; }

  /* buffs e alvo jogador: duas colunas a partir de 2 × 140 px, uma abaixo disso */
  .rt-calc__buffs-grade { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); column-gap: 10px; }
  .rt-calc__jogador-grade { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }

  /* escolher item, carta ou monstro: tela cheia */
  .rt-calc__modal { padding: 0; place-items: stretch; }
  .rt-calc__modal-caixa { width: 100%; height: 100%; height: 100dvh; max-height: none; display: flex; flex-direction: column; border-radius: 0; box-shadow: none; padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(12px + env(safe-area-inset-bottom, 0px)); animation: none; }
  .rt-calc__modal-caixa h2 { font-size: 26px !important; margin: 4px 50px 10px !important; }
  .rt-calc__modal .rt-modal__fechar { top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; width: 44px; height: 44px; }
  .rt-calc__opcoes { flex: 1 1 auto; min-height: 0; max-height: none; margin: 10px 0; }
  .rt-calc__opcao { min-height: 52px; }
  .rt-calc__modal .rt-modal__botoes .rt-botao { flex: 1 1 auto; }
}
