/* Forja Shinobi v4 — layout mobile-first no visual do arquivo shinobi.
   Carregado depois de crafting-v2/v3.css para substituir a grade antiga. */

.nrmt-smith-overlay {
  position: fixed;
  z-index: 990200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  font-family: "Segoe UI", Arial, sans-serif;
}

.nrmt-smith-overlay[hidden] { display: none; }

.nrmt-smith-window {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(1262px, calc(100vw - 14px));
  height: min(780px, calc(100dvh - var(--nrmt-fixed-header-height, 62px) - 18px));
  /* A faixa da moldura PNG ocupa a borda; o padding mantém cabeçalho, lista e
     rodapé fora dela — mesma área segura usada na Coleção de Ninjas. */
  padding: 20px 19px 18px;
  overflow: hidden;
  border: 1px solid rgba(199, 149, 69, .4);
  border-radius: 3px;
  background:
    radial-gradient(circle at 78% 0, rgba(121, 191, 216, .055), transparent 28%),
    linear-gradient(145deg, #0f1518, #070a0c 64%);
  box-shadow: 0 28px 84px rgba(0, 0, 0, .78), inset 0 0 36px rgba(0, 0, 0, .42);
}

/* Moldura modular da janela (window-frame.png). */
.nrmt-smith-frame {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: block;
  box-sizing: border-box;
  border: 28px solid transparent;
  border-image-source: var(--nrmt-archive-window-frame);
  border-image-slice: 126 118;
  border-image-width: 28px;
  border-image-repeat: stretch;
  pointer-events: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .85));
}

.nrmt-smith-window > :not(.nrmt-smith-frame) { position: relative; z-index: 2; }

/* ------------------------------------------------------------------ header */
.nrmt-smith-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px clamp(10px, 2vw, 16px);
  border-bottom: 1px solid #6b5326;
  background: linear-gradient(#2b3134, #1a1f22);
}

.nrmt-smith-title small { display: block; color: #8e9896; font-size: 10px; font-weight: 900; letter-spacing: .22em; }
.nrmt-smith-title h2 { margin: 3px 0 0; color: #e7b63e; font: clamp(16px, 3.4vw, 23px) NinjaTitle, Georgia, serif; letter-spacing: .06em; }

.nrmt-smith-wallet { display: grid; justify-items: end; gap: 3px; }
.nrmt-smith-wallet span { color: #94a09d; font-size:12px; font-weight: 900; letter-spacing: .1em; }
.nrmt-smith-wallet b { display: flex; align-items: center; gap: 5px; color: #f0c75b; font-size: clamp(11px, 2.6vw, 14px); font-variant-numeric: tabular-nums; }
.nrmt-smith-wallet i { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #7d5f22; background: #2a2110; color: #e9c26b; font-size: 10px; font-style: normal; }

.nrmt-smith-close {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent no-repeat center / contain;
  background-image: var(--nrmt-archive-close);
  cursor: pointer;
}
.nrmt-smith-close:hover { filter: brightness(1.15); }

/* ----------------------------------------------------------------- filtros */
.nrmt-smith-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 9px clamp(10px, 2vw, 16px);
  border-bottom: 1px solid #3a3f42;
  background: #12181a;
}

.nrmt-smith-search {
  display: flex;
  flex: 1 1 190px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid #46504f;
  background: #0b1012;
}
.nrmt-smith-search span { color: #7d8a88; font-size: 13px; }
.nrmt-smith-search input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e2ddd0;
  font-size: 12px; /* 16px-safe: iOS só faz zoom abaixo de 16px em focus, mas o
                      shell trava o viewport, então 12px continua legível */
}

.nrmt-smith-only { display: flex; align-items: center; gap: 6px; min-height: 38px; color: #9fa9a7; font-size: 10px; cursor: pointer; }
.nrmt-smith-only input { width: 22px; height: 22px; accent-color: #c08a2c; }

/* Chips SEMPRE quebram linha: era daqui que vinha o estouro de 418px. */
.nrmt-smith-chips { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.nrmt-smith-chips button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-image-source: var(--nrmt-archive-button-frame);
  border-image-slice: 56 188;
  border-image-width: 7px 14px;
  border-image-repeat: stretch;
  border-radius: 2px;
  background: linear-gradient(180deg, #11181b, #080c0e);
  color: #939d9b;
  font: 900 10px/1 NinjaUI, Arial, sans-serif;
  letter-spacing: .06em;
  cursor: pointer;
}
.nrmt-smith-chips button.is-active { background: linear-gradient(180deg, #4a3410, #241905); color: #ffd98a; box-shadow: 0 0 9px rgba(199, 149, 69, .3); }
.nrmt-smith-chips--slots button { font-size: 10px; padding: 0 9px; }

/* -------------------------------------------------------------------- corpo */
.nrmt-smith-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 356px);
  flex: 1;
  min-height: 0;
}

.nrmt-smith-listwrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid #333a3c; }
.nrmt-smith-listhead { padding: 7px clamp(10px, 2vw, 14px); border-bottom: 1px solid #2b3133; background: #0f1416; }
.nrmt-smith-listhead b { color: #8d9795; font-size:12px; font-weight: 900; letter-spacing: .16em; }

.nrmt-smith-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 208px), 1fr));
  align-content: start;
  gap: 7px;
  flex: 1;
  min-height: 0;
  padding: clamp(8px, 2vw, 12px);
  overflow: auto;
  overscroll-behavior: contain;
}

.nrmt-smith-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  /* Sem min-height: como item de grid o card era travado nessa altura e o
     selo de situação vazava para fora. Quem manda no tamanho é o conteúdo. */
  padding: 9px;
  border: 1px solid transparent;
  border-image-source: var(--nrmt-archive-panel-frame);
  border-image-slice: 104 122;
  border-image-width: 12px;
  border-image-repeat: stretch;
  border-radius: 2px;
  background:
    radial-gradient(circle at 14% 42%, rgba(121, 191, 216, .08), transparent 36%),
    linear-gradient(145deg, #11181b, #090d0f 72%);
  box-shadow: 0 6px 17px rgba(0, 0, 0, .42);
  text-align: left;
  cursor: pointer;
  transition: filter .15s ease, box-shadow .15s ease;
}
.nrmt-smith-card:hover { filter: brightness(1.08); }
.nrmt-smith-card.is-ready { box-shadow: inset 3px 0 #66b987, 0 0 0 1px rgba(102, 185, 135, .3), 0 6px 17px rgba(0, 0, 0, .42); }
.nrmt-smith-card.is-locked { opacity: .5; }
.nrmt-smith-card.is-selected {
  background:
    radial-gradient(circle at 14% 42%, rgba(199, 149, 69, .2), transparent 40%),
    linear-gradient(145deg, #1d1a10, #090d0f 74%);
  box-shadow: inset 3px 0 #c79545, 0 0 0 1px rgba(199, 149, 69, .38), 0 8px 20px rgba(0, 0, 0, .5);
}

.nrmt-smith-card__art {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 56px;
  height: 62px;
  padding: 9px 7px 6px;
  overflow: hidden;
  border: 1px solid transparent;
  border-image-source: var(--nrmt-archive-portrait-frame);
  border-image-slice: 112 106;
  border-image-width: 11px;
  border-image-repeat: stretch;
  border-radius: 2px;
  background: radial-gradient(circle at 50% 47%, rgba(121, 191, 216, .16), transparent 63%), #070b0d;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .52);
}
.nrmt-smith-card__art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.nrmt-smith-card__body { display: grid; gap: 2px; min-width: 0; }
.nrmt-smith-card__body strong { overflow: hidden; color: #ece6d6; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.nrmt-smith-card__body small { color: #c79f3d; font-size:12px; font-weight: 800; letter-spacing: .05em; }
.nrmt-smith-card__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.nrmt-smith-card__flag { padding: 2px 6px; border: 1px solid #3d4749; color: #8b9694; font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: .08em; white-space: nowrap; }
.nrmt-smith-card.is-ready .nrmt-smith-card__flag { border-color: #4d7d55; color: #8ce49b; }
.nrmt-smith-card.is-locked .nrmt-smith-card__flag { border-color: #6d4a48; color: #e08d86; }

.nrmt-smith-role { padding: 2px 6px; border: 1px solid #4a5457; color: #9aa5a3; font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: .08em; justify-self: start; white-space: nowrap; }
.nrmt-smith-role--tank { border-color: #3f6f9e; color: #7fbcf0; }
.nrmt-smith-role--damage { border-color: #9d4740; color: #ef8e86; }
.nrmt-smith-role--support { border-color: #3f8a72; color: #7ddcbb; }
.nrmt-smith-role--all { border-color: #9a7a2c; color: #e9c76a; }

/* ------------------------------------------------------------------ detalhe */
.nrmt-smith-side { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; background: #0d1214; }
.nrmt-smith-detail { display: grid; gap: 11px; padding: clamp(11px, 2.4vw, 16px); }

.nrmt-smith-detail > header { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; }
.nrmt-smith-detail__art {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 76px;
  height: 92px;
  padding: 14px 11px 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-image-source: var(--nrmt-archive-portrait-frame);
  border-image-slice: 112 106;
  border-image-width: 15px;
  border-image-repeat: stretch;
  border-radius: 2px;
  background: radial-gradient(circle at 50% 40%, rgba(199, 149, 69, .16), transparent 58%), #080c0e;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .55);
}
.nrmt-smith-detail__art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.nrmt-smith-detail > header small { display: block; color: #8b9593; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.nrmt-smith-detail > header h3 { margin: 3px 0 5px; color: #f1e7d2; font: 16px NinjaTitle, Georgia, serif; letter-spacing: .03em; }

.nrmt-smith-desc { margin: 0; color: #8f9997; font-size: 10px; line-height: 1.55; }

.nrmt-smith-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.nrmt-smith-stats li { display: flex; justify-content: space-between; gap: 5px; padding: 5px 7px; border: 1px solid #2f3a33; background: #101613; }
.nrmt-smith-stats span { color: #7f8c86; font-size: 10px; font-weight: 900; letter-spacing: .07em; }
.nrmt-smith-stats b { color: #96d78d; font-size: 10px; }

.nrmt-smith-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.nrmt-smith-meta span { display: grid; gap: 3px; padding: 7px 5px; border: 1px solid #343e41; background: #0c1214; text-align: center; }
.nrmt-smith-meta small { color: #737e81; font-size:12px; font-weight: 900; letter-spacing: .11em; }
.nrmt-smith-meta b { color: #dfb03b; font-size: 11px; font-variant-numeric: tabular-nums; }
.nrmt-smith-meta b.is-bad { color: #ed6659; }

.nrmt-smith-refine { display: grid; gap: 6px; }
.nrmt-smith-refine > small { color: #8b9593; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.nrmt-smith-refine > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.nrmt-smith-refine button {
  display: grid; gap: 3px;
  min-height: 46px;
  padding: 6px 4px;
  border: 1px solid #343e41;
  background: #0c1214;
  color: #8d9799;
  cursor: pointer;
}
.nrmt-smith-refine button b { font-size: 10px; letter-spacing: .04em; }
.nrmt-smith-refine button span { font-size:12px; font-weight: 800; letter-spacing: .06em; }
.nrmt-smith-refine button.is-active { border-color: #c08a2c; background: #251c0c; color: #f2c251; }
.nrmt-smith-refine p { margin: 0; color: #7e898d; font-size:12px; line-height: 1.45; }

/* --------------------------------------------------------- chances de qualidade */
.nrmt-smith-odds { display: grid; gap: 6px; }
.nrmt-smith-odds > small { color: #8b9593; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.nrmt-smith-odds table { width: 100%; border-collapse: collapse; font-size: 10px; }
.nrmt-smith-odds th, .nrmt-smith-odds td { padding: 5px 4px; border: 1px solid #2f3a33; text-align: center; font-variant-numeric: tabular-nums; }
.nrmt-smith-odds thead th { color: #8d9799; font-weight: 900; letter-spacing: .04em; background: #0c1214; }
.nrmt-smith-odds thead th.is-active { color: #f2c251; background: #251c0c; }
.nrmt-smith-odds tbody th { color: #c2cdc4; font-weight: 700; text-align: left; background: #0c1214; white-space: nowrap; }
.nrmt-smith-odds tbody td { color: #9fa9a7; background: #101512; }
.nrmt-smith-odds tbody td.is-active { color: #f1e7d2; background: #1a1510; font-weight: 700; }
.nrmt-smith-odds tr.rarity-common th { color: #b9c2c0; }
.nrmt-smith-odds tr.rarity-uncommon th { color: #7fd08a; }
.nrmt-smith-odds tr.rarity-rare th { color: #6cb6f0; }
.nrmt-smith-odds tr.rarity-epic th { color: #c184ee; }
.nrmt-smith-odds tr.rarity-legendary th { color: #f0b93f; }
.nrmt-smith-odds tr.rarity-mythic th { color: #ff7a5c; }

.nrmt-smith-odds--single ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.nrmt-smith-odds--single li { display: grid; gap: 2px; padding: 6px 5px; border: 1px solid #2f3a33; background: #101512; text-align: center; }
.nrmt-smith-odds--single li b { font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.nrmt-smith-odds--single li span { font-size: 10px; font-variant-numeric: tabular-nums; }
.nrmt-smith-odds--single li.rarity-common b, .nrmt-smith-odds--single li.rarity-common span { color: #b9c2c0; }
.nrmt-smith-odds--single li.rarity-uncommon b, .nrmt-smith-odds--single li.rarity-uncommon span { color: #7fd08a; }
.nrmt-smith-odds--single li.rarity-rare b, .nrmt-smith-odds--single li.rarity-rare span { color: #6cb6f0; }
.nrmt-smith-odds--single li.rarity-epic b, .nrmt-smith-odds--single li.rarity-epic span { color: #c184ee; }
.nrmt-smith-odds--single li.rarity-legendary b, .nrmt-smith-odds--single li.rarity-legendary span { color: #f0b93f; }
.nrmt-smith-odds--single li.rarity-mythic b, .nrmt-smith-odds--single li.rarity-mythic span { color: #ff7a5c; }

.nrmt-smith-materials { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.nrmt-smith-materials li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px; border: 1px solid #3d4840; background: #101512; }
.nrmt-smith-materials li.is-missing { border-color: #573536; background: #1a1112; }
.nrmt-smith-materials img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.nrmt-smith-materials b { display: block; overflow: hidden; color: #c2cdc4; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.nrmt-smith-materials small { color: #6fc963; font-size:12px; font-variant-numeric: tabular-nums; }
.nrmt-smith-materials li.is-missing small { color: #e8807f; }
.nrmt-smith-materials i { color: #6fc963; font-size: 11px; font-style: normal; font-weight: 900; }
.nrmt-smith-materials li.is-missing i { color: #e8807f; }
.nrmt-smith-source { display: block; margin-top: 2px; color: #7fa8c9; font-size:12px; font-style: normal; }

.nrmt-smith-source-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7fa8c9;
  font-size:12px;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
}
.nrmt-smith-source-toggle:hover { color: #a8cbe8; }
.nrmt-smith-source-list { grid-column: 1 / -1; display: grid; gap: 3px; margin: 2px 0 0; padding: 0; list-style: none; }
.nrmt-smith-source-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 5px 7px; border: 1px solid #2c3638; background: #0c1112; font-size:12px; }
.nrmt-smith-source-list b { color: #c2cdc4; font-weight: 700; }
.nrmt-smith-source-list small { display: block; color: #74807d; font-size:12px; }
.nrmt-smith-source-list i { align-self: center; color: #7fa8c9; font-style: normal; font-weight: 900; font-variant-numeric: tabular-nums; }
.nrmt-smith-source-list li.is-empty { grid-template-columns: 1fr; color: #74807d; font-style: italic; }

.nrmt-smith-cost-note { padding: 9px 11px; border-left: 2px solid #d39735; background: rgba(190, 127, 35, .08); color: #cbbfa9; font-size: 10px; line-height: 1.5; }

.nrmt-smith-craft {
  min-height: 48px;
  border: 1px solid transparent;
  border-image-source: var(--nrmt-archive-button-frame);
  border-image-slice: 56 188;
  border-image-width: 9px 18px;
  border-image-repeat: stretch;
  border-radius: 2px;
  background: linear-gradient(180deg, #6d4c14, #35240a);
  color: #ffe6a8;
  text-shadow: 0 1px 1px #000;
  font: 900 12px NinjaUI, Arial, sans-serif;
  letter-spacing: .09em;
  cursor: pointer;
}
.nrmt-smith-craft:disabled { filter: grayscale(.7) brightness(.6); color: #9aa2a4; cursor: not-allowed; }

.nrmt-smith-empty { display: grid; place-items: center; gap: 7px; padding: 40px 20px; text-align: center; }
.nrmt-smith-empty i { color: rgba(226, 179, 64, .2); font: 900 46px Georgia, serif; font-style: normal; }
.nrmt-smith-empty b { color: #c9b78c; font-size: 11px; letter-spacing: .12em; }
.nrmt-smith-empty span { max-width: 260px; color: #7e898d; font-size: 10px; line-height: 1.55; }

/* ------------------------------------------------------------------- reveal */
.nrmt-smith-reveal {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  background: rgba(5, 8, 9, .95);
  opacity: 0;
  transition: opacity .3s ease;
}
.nrmt-smith-window { position: relative; }
.nrmt-smith-reveal.is-visible { opacity: 1; }
.nrmt-smith-reveal__sigil { color: rgba(226, 179, 64, .18); font: 900 76px Georgia, serif; }
.nrmt-smith-reveal small { color: #a5895a; font-size:12px; font-weight: 900; letter-spacing: .2em; }
.nrmt-smith-reveal img { width: 96px; height: 96px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 14px rgba(240, 190, 80, .5)); }
.nrmt-smith-reveal h2 { margin: 0; color: #f6ecd5; font: clamp(17px, 4vw, 26px) NinjaTitle, Georgia, serif; }
.nrmt-smith-reveal b { font-size: 13px; letter-spacing: .16em; }
.nrmt-smith-reveal span { color: #8b9593; font-size: 10px; }
.nrmt-smith-reveal.rarity-common b { color: #b9c2c0; }
.nrmt-smith-reveal.rarity-uncommon b { color: #7fd08a; }
.nrmt-smith-reveal.rarity-rare b { color: #6cb6f0; }
.nrmt-smith-reveal.rarity-epic b { color: #c184ee; }
.nrmt-smith-reveal.rarity-legendary b { color: #f0b93f; }
.nrmt-smith-reveal.rarity-mythic b { color: #ff7a5c; }

/* --------------------------------------------------------------- responsivo */
@media (max-width: 900px) {
  .nrmt-smith-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .nrmt-smith-listwrap { border-right: 0; border-bottom: 1px solid #333a3c; }
  .nrmt-smith-side { max-height: 46vh; }
}

@media (max-width: 900px) {
  /* Moldura mais estreita: em 28px ela come área útil demais no tablet. */
  .nrmt-smith-frame { border-width: 22px; border-image-width: 22px; }
  .nrmt-smith-window { padding: 27px 25px 23px; }
}

@media (max-width: 620px) {
  .nrmt-smith-overlay { padding: 0; }
  .nrmt-smith-window { width: 100%; height: 100%; border-radius: 0; padding: 21px 19px 17px; }
  .nrmt-smith-frame { border-width: 16px; border-image-width: 16px; }
  .nrmt-smith-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title close" "wallet wallet"; }
  .nrmt-smith-title { grid-area: title; }
  .nrmt-smith-close { grid-area: close; }
  .nrmt-smith-wallet { grid-area: wallet; justify-items: start; }
  .nrmt-smith-list { grid-template-columns: minmax(0, 1fr); }
  .nrmt-smith-meta { grid-template-columns: repeat(3, 1fr); }

  /* Quatro linhas de chips empilhadas comiam ~200px e a lista virava uma
     faixa fina embaixo do detalhe. Cada grupo vira uma tira que rola na
     horizontal dentro de si — o bloco de filtros cai para 3 linhas. */
  .nrmt-smith-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .nrmt-smith-chips::-webkit-scrollbar { display: none; }

  /* Busca e filtro dividem a mesma linha: separados eram mais 40px de altura
     roubados da lista. */
  .nrmt-smith-filters { gap: 5px; padding: 7px 10px; }
  .nrmt-smith-search { flex: 1 1 120px; }
  .nrmt-smith-only { flex: 0 0 auto; gap: 5px; font-size: 10px; }
  .nrmt-smith-only span { max-width: 84px; line-height: 1.2; }
  .nrmt-smith-chips button { min-height: 30px; }

  /* A lista precisa continuar sendo o foco: ela fica com o espaço elástico e
     o detalhe é quem cede. */
  .nrmt-smith-body { grid-template-rows: minmax(34vh, 1fr) auto; }
  .nrmt-smith-listwrap { min-height: 34vh; }
  .nrmt-smith-side { max-height: 42vh; }
}

@media (prefers-reduced-motion: reduce) {
  .nrmt-smith-card, .nrmt-smith-reveal { transition: none; }
}

/* ========================================================================
   OFICINA DE FORJA v5 — linguagem visual do Centro de Comando/Admin.
   O bloco fica por último para vencer os estilos legados sem !important.
   ======================================================================== */
.nrmt-smith-overlay {
  --smith-cyan: #65e1ef;
  --smith-gold: #e7b94e;
  --smith-ink: #081012;
  --smith-panel: #0c1619;
  background: rgba(2, 7, 9, .14);
  font-family: NinjaUI, "Segoe UI", Arial, sans-serif;
}

.nrmt-smith-window {
  width: min(1500px, calc(100vw - 18px));
  height: min(900px, calc(100dvh - var(--nrmt-fixed-header-height, 62px) - 14px));
  padding: 20px 19px 18px;
  background:
    linear-gradient(90deg, rgba(101,225,239,.025) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(circle at 80% -10%, rgba(64,143,151,.14), transparent 34%),
    linear-gradient(150deg, #111a1d, #060a0c 72%);
}

.nrmt-smith-head {
  grid-template-columns: 52px minmax(0, 1fr) auto auto 42px;
  min-height: 76px;
  gap: 13px;
  padding: 10px 15px 10px 13px;
  border-bottom-color: rgba(213,166,67,.66);
  background:
    linear-gradient(90deg, rgba(25,69,73,.34), transparent 36%),
    linear-gradient(180deg, #172326, #0b1214);
}

.nrmt-smith-emblem {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #8b671f;
  border-radius: 50%;
  background: radial-gradient(circle, #3a2709 0 45%, #0b1517 47%);
  box-shadow: 0 0 0 4px rgba(231,185,78,.06), inset 0 0 14px #000;
  color: #f0c75b;
  font: 900 24px Georgia, serif;
}

.nrmt-smith-title small { color: #b29a68; font-size: 11px; letter-spacing: .2em; }
.nrmt-smith-title h2 { margin-top: 2px; color: #f5d47e; font-size: clamp(20px, 2vw, 28px); }
.nrmt-smith-title p { margin: 3px 0 0; color: #91a3a3; font: 600 11px/1.25 "Segoe UI", Arial, sans-serif; letter-spacing: .02em; }

.nrmt-smith-server {
  display: grid;
  grid-template-columns: 8px auto;
  column-gap: 7px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #28484a;
  background: #091315;
}
.nrmt-smith-server i { grid-row: 1 / 3; width: 7px; height: 7px; border-radius: 50%; background: #65e59d; box-shadow: 0 0 9px #65e59d; }
.nrmt-smith-server span { color: #7e9292; font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.nrmt-smith-server b { color: #8de7c0; font-size: 10px; letter-spacing: .08em; }

.nrmt-smith-wallet {
  min-width: 106px;
  padding: 7px 10px;
  border: 1px solid #3c4b4b;
  background: #081012;
}
.nrmt-smith-wallet > span { font-size: 10px; }
.nrmt-smith-wallet b { font-size: 14px; }
.nrmt-smith-close { width: 42px; height: 42px; }

.nrmt-smith-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 46px;
  border-bottom: 1px solid #263638;
  background: #080e10;
}
.nrmt-smith-steps span {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  border-right: 1px solid #263638;
  color: #708082;
}
.nrmt-smith-steps span:last-child { border-right: 0; }
.nrmt-smith-steps span::after {
  content: "";
  position: absolute;
  right: -6px;
  z-index: 2;
  width: 11px;
  height: 11px;
  border-top: 1px solid #263638;
  border-right: 1px solid #263638;
  background: #080e10;
  transform: rotate(45deg);
}
.nrmt-smith-steps span:last-child::after { display: none; }
.nrmt-smith-steps b { color: #55777a; font-size: 11px; }
.nrmt-smith-steps i { font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: .1em; }
.nrmt-smith-steps .is-active { background: linear-gradient(90deg, rgba(25,109,117,.31), transparent); color: #9be8ef; }
.nrmt-smith-steps .is-active b { color: var(--smith-gold); }

.nrmt-smith-filters { padding: 10px 14px; background: #0b1315; }
.nrmt-smith-search { border-color: #315155; background: #071012; }
.nrmt-smith-search input { color: #e9f0ec; font-size: 13px; }
.nrmt-smith-only { color: #b3c0bd; font-size: 11px; }
.nrmt-smith-chips button { min-height: 34px; color: #aeb9b7; font-size: 10px; }
.nrmt-smith-chips button.is-active { color: #ffe19a; }

.nrmt-smith-body { grid-template-columns: minmax(0, 1fr) minmax(350px, 410px); }
.nrmt-smith-body { overflow: hidden; }
.nrmt-smith-listwrap { overflow: hidden; }
.nrmt-smith-listhead { padding: 9px 14px; background: #091113; }
.nrmt-smith-listhead b { color: #8fd9df; font-size: 11px; }
.nrmt-smith-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr));
  gap: 9px;
  height: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #c79635 #071012;
}
.nrmt-smith-list::-webkit-scrollbar,
.nrmt-smith-side::-webkit-scrollbar { width: 12px; }
.nrmt-smith-list::-webkit-scrollbar-track,
.nrmt-smith-side::-webkit-scrollbar-track { border-left: 1px solid #223033; background: #071012; }
.nrmt-smith-list::-webkit-scrollbar-thumb,
.nrmt-smith-side::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 3px solid #071012;
  background: linear-gradient(180deg, #e1b850, #8f6821);
}
.nrmt-smith-list::-webkit-scrollbar-thumb:hover,
.nrmt-smith-side::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #f3d274, #b98628); }
.nrmt-smith-card { grid-template-columns: 66px minmax(0, 1fr); min-height: 84px; padding: 10px; }
.nrmt-smith-card__art { width: 66px; height: 70px; }
.nrmt-smith-card__body strong { font: 15px NinjaTitle, Georgia, serif; letter-spacing: .02em; }
.nrmt-smith-card__body small { font-size: 10px; }
.nrmt-smith-card__flag, .nrmt-smith-role { font-size: 9px; }

.nrmt-smith-side { overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; scrollbar-width: auto; scrollbar-color: #c79635 #071012; background: linear-gradient(180deg, #0d1719, #070c0e); }
.nrmt-smith-detail { gap: 12px; padding: 15px; }
.nrmt-smith-detail > header h3 { font-size: 20px; }
.nrmt-smith-detail > header small, .nrmt-smith-refine > small, .nrmt-smith-odds > small { font-size: 10px; color: #80d5dc; }
.nrmt-smith-desc, .nrmt-smith-refine p, .nrmt-smith-cost-note { font-size: 11px; }
.nrmt-smith-stats span, .nrmt-smith-stats b, .nrmt-smith-odds table { font-size: 10px; }
.nrmt-smith-meta small { font-size: 9px; }
.nrmt-smith-meta b { font-size: 12px; }
.nrmt-smith-materials b { font-size: 11px; }
.nrmt-smith-materials small, .nrmt-smith-source, .nrmt-smith-source-toggle { font-size: 10px; }

.nrmt-smith-source-list li {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  padding: 7px;
  font-size: 10px;
}
.nrmt-smith-source-list small { font-size: 9px; }
.nrmt-smith-go-hunt {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #397078;
  background: linear-gradient(180deg, #133237, #081719);
  color: #8ee8ef;
  font: 900 9px NinjaUI, Arial, sans-serif;
  letter-spacing: .07em;
  cursor: pointer;
}
.nrmt-smith-go-hunt:hover { border-color: #d6a63c; color: #ffe09a; box-shadow: 0 0 12px rgba(85,212,225,.14); }
.nrmt-smith-go-hunt b { display: inline; margin-left: 4px; color: inherit; font-size: 14px; }

.nrmt-smith-guide {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #294145;
  background: rgba(4, 13, 15, .74);
}
.nrmt-smith-guide > small { color: #76d6df; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.nrmt-smith-guide ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 0; padding: 0; list-style: none; }
.nrmt-smith-guide li { display: grid; grid-template-columns: 25px 1fr; gap: 6px; align-items: start; min-width: 0; padding: 7px 5px; border: 1px solid #213235; background: #091214; }
.nrmt-smith-guide li > b { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #7c5c1d; color: #edc465; font-size: 9px; }
.nrmt-smith-guide li span { color: #7f9090; font: 9px/1.35 "Segoe UI", Arial, sans-serif; }
.nrmt-smith-guide li strong { display: block; margin-bottom: 2px; color: #d9e0db; font: 900 9px NinjaUI, Arial, sans-serif; }
.nrmt-smith-guide p { margin: 0; color: #80cfa8; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.nrmt-smith-guide p i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #63df9a; box-shadow: 0 0 7px #63df9a; }

.nrmt-smith-craft { min-height: 54px; font-size: 13px; }
.nrmt-smith-overlay.is-forging .nrmt-smith-craft { animation: nrmt-smith-button-pulse .8s ease-in-out infinite alternate; }
@keyframes nrmt-smith-button-pulse { to { filter: brightness(1.32); box-shadow: 0 0 24px rgba(226,179,64,.26); } }

/* Resultado cinematográfico: usa só transforms/opacity para não pesar na GPU. */
.nrmt-smith-reveal {
  z-index: 120;
  gap: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(99,202,216,.18), transparent 28%),
    radial-gradient(circle at 50% 48%, rgba(234,182,67,.12), transparent 50%),
    rgba(3, 8, 10, .975);
}
.nrmt-smith-reveal::before, .nrmt-smith-reveal::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 390px; height: 390px;
  border: 1px solid rgba(99,222,235,.2);
  border-radius: 50%;
  transform: translate(-50%,-50%) scale(.35);
  opacity: 0;
}
.nrmt-smith-reveal.is-visible::before { animation: nrmt-smith-ring 1.6s ease-out .25s both; }
.nrmt-smith-reveal.is-visible::after { animation: nrmt-smith-ring 1.6s ease-out .55s both; }
@keyframes nrmt-smith-ring { 0% { opacity:.8; transform:translate(-50%,-50%) scale(.3); } 100% { opacity:0; transform:translate(-50%,-50%) scale(1.35); } }
.nrmt-smith-reveal__hammer { color: rgba(226,179,64,.14); font: 900 78px Georgia, serif; transform: translateY(-24px) scale(1.4); opacity: 0; }
.nrmt-smith-reveal.is-visible .nrmt-smith-reveal__hammer { animation: nrmt-smith-strike .55s cubic-bezier(.2,.8,.2,1) .08s both; }
@keyframes nrmt-smith-strike { 70% { opacity:1; transform:translateY(5px) scale(.94); } 100% { opacity:.2; transform:translateY(0) scale(1); } }
.nrmt-smith-reveal__item { position: relative; display:grid; place-items:center; width: 150px; height: 150px; }
.nrmt-smith-reveal__item span { position:absolute; inset:8px; border:1px solid rgba(234,186,78,.45); transform:rotate(45deg); background:rgba(12,29,32,.7); }
.nrmt-smith-reveal__item i { position:absolute; inset:25px; border:1px solid rgba(93,220,234,.3); border-radius:50%; animation:nrmt-smith-spin 6s linear infinite; }
.nrmt-smith-reveal__item img { position:relative; z-index:2; width:112px; height:112px; transform:scale(.4); opacity:0; }
.nrmt-smith-reveal.is-visible .nrmt-smith-reveal__item img { animation:nrmt-smith-item-in .55s cubic-bezier(.2,1.4,.3,1) .55s both; }
@keyframes nrmt-smith-item-in { to { opacity:1; transform:scale(1); } }
@keyframes nrmt-smith-spin { to { transform:rotate(360deg); } }
.nrmt-smith-reveal__flare { position:absolute; left:50%; top:50%; width:1px; height:1px; }
.nrmt-smith-reveal__flare i { position:absolute; width:3px; height:84px; transform-origin:50% 100%; background:linear-gradient(transparent,rgba(239,194,87,.7)); opacity:0; }
.nrmt-smith-reveal__flare i:nth-child(1){transform:rotate(0deg) translateY(-155px)}
.nrmt-smith-reveal__flare i:nth-child(2){transform:rotate(60deg) translateY(-155px)}
.nrmt-smith-reveal__flare i:nth-child(3){transform:rotate(120deg) translateY(-155px)}
.nrmt-smith-reveal__flare i:nth-child(4){transform:rotate(180deg) translateY(-155px)}
.nrmt-smith-reveal__flare i:nth-child(5){transform:rotate(240deg) translateY(-155px)}
.nrmt-smith-reveal__flare i:nth-child(6){transform:rotate(300deg) translateY(-155px)}
.nrmt-smith-reveal.is-visible .nrmt-smith-reveal__flare i { animation:nrmt-smith-flare .9s ease-out .35s both; }
@keyframes nrmt-smith-flare { 35% { opacity:.9; } 100% { opacity:0; height:145px; } }
.nrmt-smith-reveal h2 { font-size: clamp(22px, 3vw, 34px); }
.nrmt-smith-reveal > b { font-size: 15px; }
.nrmt-smith-reveal__saved { display:flex; align-items:center; gap:7px; padding:7px 12px; border:1px solid #377158; color:#91e5b7; font-size:10px; font-weight:900; letter-spacing:.11em; }
.nrmt-smith-reveal__saved i { width:7px; height:7px; border-radius:50%; background:#63df9a; box-shadow:0 0 8px #63df9a; }
.nrmt-smith-reveal p { margin:0; color:#91a09e; font-size:11px; }

@media (max-width: 980px) {
  .nrmt-smith-head { grid-template-columns: 42px minmax(0,1fr) auto 38px; }
  .nrmt-smith-emblem { width: 38px; height: 38px; font-size: 19px; }
  .nrmt-smith-server { display: none; }
  .nrmt-smith-body { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 620px) {
  .nrmt-smith-head { grid-template-areas: "emblem title close" "wallet wallet wallet"; grid-template-columns: 38px 1fr 38px; min-height: auto; }
  .nrmt-smith-emblem { grid-area: emblem; }
  .nrmt-smith-title { grid-area: title; }
  .nrmt-smith-wallet { grid-area: wallet; justify-items: start; }
  .nrmt-smith-title p { display: none; }
  .nrmt-smith-steps { grid-template-columns: repeat(4, minmax(52px,1fr)); }
  .nrmt-smith-steps span { justify-content:center; padding:6px 3px; }
  .nrmt-smith-steps i { display:none; }
  .nrmt-smith-guide ol { grid-template-columns: 1fr; }
  .nrmt-smith-source-list li { grid-template-columns: 1fr auto; }
  .nrmt-smith-go-hunt { grid-column: 1 / -1; width:100%; }
}

@media (prefers-reduced-motion: reduce) {
  .nrmt-smith-reveal *, .nrmt-smith-reveal::before, .nrmt-smith-reveal::after, .nrmt-smith-overlay.is-forging .nrmt-smith-craft { animation: none !important; }
  .nrmt-smith-reveal.is-visible .nrmt-smith-reveal__item img { opacity:1; transform:none; }
}
