html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  touch-action: none;
}

.room-qr-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9000;
  display: grid;
  justify-items: center;
  gap: 9px;
  width: min(390px, calc(100vw - 44px));
  padding: 18px;
  border: 2px solid #55dfff;
  border-radius: 16px;
  color: #fff;
  background: rgba(9, 11, 18, 0.97);
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.35);
  font-family: Arial, sans-serif;
  text-align: center;
  touch-action: manipulation;
}

.room-qr-panel img {
  width: min(310px, 72vw);
  height: auto;
  border: 8px solid #fff;
  border-radius: 8px;
}

.room-qr-panel b {
  color: #ffb14a;
  font-size: 24px;
  letter-spacing: 3px;
}

.room-qr-panel small {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #aeb8c8;
}

.room-qr-panel button {
  padding: 9px 15px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #3a4050;
  font-weight: 700;
}

/* ========================================================================== */
/* DECK FORGE                                                                 */
/* ========================================================================== */

:root {
  --forge-bg: #030509;
  --forge-panel: rgba(9, 14, 23, 0.92);
  --forge-panel-solid: #090e17;
  --forge-line: rgba(124, 211, 255, 0.14);
  --forge-cyan: #23d7ff;
  --forge-green: #38f2a0;
  --forge-violet: #a970ff;
  --forge-text: #f3f8fc;
  --forge-muted: #8291a3;
  --forge-danger: #ff5573;
}

body.deck-forge-open {
  background: var(--forge-bg);
}

body.deck-forge-open > canvas {
  opacity: 0;
  pointer-events: none;
}

.deck-forge,
.deck-forge * {
  box-sizing: border-box;
}

.deck-forge {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 8000;
  width: min(100vw, 50vh);
  height: min(100vh, 200vw);
  overflow: hidden;
  color: var(--forge-text);
  background:
    radial-gradient(
      circle at 8% 0%,
      rgba(25, 119, 150, 0.14),
      transparent 30rem
    ),
    radial-gradient(
      circle at 92% 12%,
      rgba(103, 49, 155, 0.13),
      transparent 34rem
    ),
    var(--forge-bg);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  touch-action: pan-y;
  scrollbar-color: #244154 #080d14;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.35s ease;
  container: title / inline-size;
  container: forge / inline-size;
}

.deck-forge.is-ready {
  opacity: 1;
}

.deck-forge button,
.deck-forge input {
  font: inherit;
}

.deck-forge button {
  color: inherit;
  cursor: pointer;
}

.deck-forge button:disabled {
  cursor: not-allowed;
}

.deck-forge button:focus-visible,
.deck-forge input:focus-visible {
  outline: 2px solid var(--forge-cyan);
  outline-offset: 3px;
}

.forge-atmosphere,
.forge-grid,
.forge-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.forge-grid {
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(69, 166, 196, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 166, 196, 0.09) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.forge-scanlines {
  z-index: 3;
  opacity: 0.04;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, #fff 4px);
}

.forge-shell {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 34px 24px 44px;
  overflow: hidden auto;
  overscroll-behavior: contain;
}

.forge-mobile-status,
.forge-mobile-dock {
  display: none;
}

.forge-header {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 22px;
  align-items: center;
  min-height: 112px;
  margin-bottom: 26px;
  padding: 0 8px 24px;
  border-bottom: 1px solid var(--forge-line);
}

.forge-icon-button {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(111, 218, 255, 0.28);
  border-radius: 14px;
  color: #dff8ff;
  background: rgba(12, 22, 34, 0.8);
  font-size: 28px;
  transition: 0.18s ease;
}

.forge-icon-button:hover {
  border-color: var(--forge-cyan);
  background: rgba(24, 74, 91, 0.55);
  box-shadow: 0 0 24px rgba(35, 215, 255, 0.12);
  transform: translateX(-3px);
}

.forge-overline,
.forge-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--forge-cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.forge-title {
  display: flex;
  gap: 9px;
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(38px, 4vw, 58px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.9;
}

.forge-title__accent {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--forge-cyan);
  filter: drop-shadow(0 0 12px rgba(35, 215, 255, 0.3));
}

.forge-subtitle {
  margin: 10px 0 0;
  color: var(--forge-muted);
  font-size: 13px;
}

.forge-save-state {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(56, 242, 160, 0.18);
  border-radius: 999px;
  color: #b7c4ce;
  background: rgba(7, 19, 18, 0.7);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forge-save-state__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forge-green);
  box-shadow: 0 0 10px var(--forge-green);
}

.forge-save-state.is-dirty {
  border-color: rgba(255, 159, 67, 0.3);
  color: #ffc284;
}

.forge-save-state.is-dirty .forge-save-state__dot {
  background: #ff9f43;
  box-shadow: 0 0 10px #ff9f43;
  animation: forge-pulse 1.4s ease-in-out infinite;
}

@keyframes forge-pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

.forge-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 410px);
  gap: 22px;
  align-items: start;
}

.forge-collection,
.forge-deck-panel {
  border: 1px solid var(--forge-line);
  background: linear-gradient(
    145deg,
    rgba(12, 19, 30, 0.94),
    rgba(6, 10, 17, 0.92)
  );
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.forge-collection {
  min-height: calc(100vh - 206px);
  border-radius: 22px;
  overflow: hidden;
}

.forge-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--forge-line);
  background: rgba(7, 12, 20, 0.92);
}

.forge-toolbar__heading,
.forge-deck-summary,
.forge-deck-list-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.forge-section-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.forge-result-count {
  padding: 6px 10px;
  border: 1px solid var(--forge-line);
  border-radius: 999px;
  color: var(--forge-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.forge-search {
  display: flex;
  align-items: center;
  height: 46px;
  margin-top: 20px;
  border: 1px solid rgba(120, 187, 214, 0.16);
  border-radius: 12px;
  background: #060b12;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.forge-search:focus-within {
  border-color: rgba(35, 215, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(35, 215, 255, 0.06);
}

.forge-search__icon {
  padding-left: 15px;
  color: var(--forge-cyan);
  font-size: 23px;
}

.forge-search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  outline: 0;
  color: #eaf7fc;
  background: transparent;
  font-size: 13px;
}

.forge-search__input::placeholder {
  color: #526170;
}

.forge-controls {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.forge-filter-swipe-hint {
  display: none;
}

.forge-filters {
  display: flex;
  flex: 1;
  gap: 6px;
  min-width: 0;
}

.forge-filter,
.forge-order {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #7f91a0;
  background: rgba(25, 37, 50, 0.55);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: 0.18s ease;
}

.forge-filter:hover,
.forge-order:hover {
  color: #d9f7ff;
  background: rgba(34, 57, 72, 0.7);
}

.forge-filter.is-active {
  border-color: rgba(35, 215, 255, 0.38);
  color: var(--forge-cyan);
  background: rgba(21, 118, 145, 0.2);
  box-shadow: inset 0 0 18px rgba(35, 215, 255, 0.05);
}

.forge-order {
  margin-left: auto;
  white-space: nowrap;
}
.forge-order.is-descending {
  color: #d1b3ff;
}
.forge-order.is-faction {
  border-color: rgba(255, 230, 160, 0.34);
  color: #ffe6a0;
  background: rgba(92, 74, 21, 0.26);
}

.forge-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
}

.forge-faction-group {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
}

.forge-faction-group__title {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(140, 162, 178, 0.3);
  border-radius: 10px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.forge-faction-group__title.is-raspcorp {
  border-color: rgba(31, 194, 255, 0.45);
  color: #73ddff;
  background: rgba(11, 75, 104, 0.24);
}

.forge-faction-group__title.is-echossystem {
  border-color: rgba(255, 138, 77, 0.45);
  color: #ffb38a;
  background: rgba(103, 44, 18, 0.24);
}

.forge-faction-group__title.is-neutro {
  border-color: rgba(172, 180, 196, 0.4);
  color: #c8d1e2;
  background: rgba(56, 66, 83, 0.25);
}

.forge-faction-group__title.is-humbanet {
  border-color: rgba(132, 255, 212, 0.45);
  color: #9df8dc;
  background: rgba(24, 88, 74, 0.24);
}

.forge-faction-group__title.is-sindicato {
  border-color: rgba(255, 110, 110, 0.45);
  color: #ffc0c0;
  background: rgba(96, 31, 31, 0.24);
}

.forge-faction-group__title.is-remanescentes {
  border-color: rgba(255, 208, 126, 0.45);
  color: #ffdda3;
  background: rgba(99, 66, 22, 0.24);
}

.forge-faction-group__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.forge-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(132, 180, 201, 0.13);
  border-radius: 16px;
  background: #090f18;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
}

.forge-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 3;
  width: 2px;
  background: var(--card-color);
  box-shadow: 0 0 14px var(--card-color);
  content: "";
  opacity: 0.6;
}

.forge-card.is-faction-sorted::after {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 16px;
  pointer-events: none;
  content: "";
}

.forge-card.is-faction-sorted.faction-raspcorp::after {
  border-color: rgba(23, 201, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(23, 201, 255, 0.28),
    0 0 16px rgba(23, 201, 255, 0.24);
}

.forge-card.is-faction-sorted.faction-echossystem::after {
  border-color: rgba(255, 149, 95, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 149, 95, 0.28),
    0 0 16px rgba(255, 149, 95, 0.24);
}

.forge-card.is-faction-sorted.faction-neutro::after {
  border-color: rgba(195, 206, 223, 0.66);
  box-shadow:
    inset 0 0 0 1px rgba(195, 206, 223, 0.3),
    0 0 16px rgba(195, 206, 223, 0.2);
}

.forge-card.is-faction-sorted.faction-humbanet::after {
  border-color: rgba(132, 255, 212, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(132, 255, 212, 0.28),
    0 0 16px rgba(132, 255, 212, 0.24);
}

.forge-card.is-faction-sorted.faction-sindicato::after {
  border-color: rgba(255, 110, 110, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 110, 110, 0.28),
    0 0 16px rgba(255, 110, 110, 0.24);
}

.forge-card.is-faction-sorted.faction-remanescentes::after {
  border-color: rgba(255, 208, 126, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 208, 126, 0.28),
    0 0 16px rgba(255, 208, 126, 0.24);
}

.forge-card:hover {
  border-color: color-mix(in srgb, var(--card-color) 48%, transparent);
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.38),
    0 0 24px color-mix(in srgb, var(--card-color) 8%, transparent);
  transform: translateY(-3px);
}

.forge-card.is-selected {
  border-color: color-mix(in srgb, var(--card-color) 42%, transparent);
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--card-color) 7%, #090f18),
    #090f18 60%
  );
}

.forge-card__art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.42 / 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #0b131d;
}

.forge-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.3s;
}

.forge-card:hover .forge-card__image {
  transform: scale(1.065);
  filter: saturate(1.1);
}

.forge-card__wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 42%, rgba(4, 8, 13, 0.88));
}

.forge-card__level,
.forge-card__power,
.forge-card__inspect {
  position: absolute;
  z-index: 2;
}

.forge-card__level {
  top: 10px;
  right: 10px;
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--card-color) 55%, transparent);
  border-radius: 5px;
  color: var(--card-color);
  background: rgba(3, 7, 12, 0.82);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.forge-card__power {
  top: 10px;
  left: 10px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--card-color);
  border-radius: 50%;
  background: rgba(2, 6, 10, 0.9);
  box-shadow: 0 0 14px color-mix(in srgb, var(--card-color) 24%, transparent);
  font-size: 13px;
  font-weight: 900;
}

.forge-card__inspect {
  right: 12px;
  bottom: 10px;
  color: white;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(4px);
  transition: 0.2s;
}

.forge-card:hover .forge-card__inspect {
  opacity: 0.9;
  transform: none;
}

.forge-card__body {
  min-height: 114px;
  padding: 14px 14px 10px;
}
.forge-card__type {
  color: var(--card-color);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.forge-card__name {
  display: -webkit-box;
  min-height: 36px;
  margin: 5px 0 7px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.forge-card__description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #6f7e8d;
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.forge-card__controls {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 7px;
  align-items: center;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(128, 176, 196, 0.09);
}

.forge-qty-button {
  display: grid;
  width: 40px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(154, 177, 193, 0.18);
  border-radius: 9px;
  color: #b2bdc6;
  background: rgba(23, 32, 43, 0.8);
  font-size: 21px;
  transition: 0.15s;
}

.forge-qty-button:hover:not(:disabled) {
  border-color: #9fc3d2;
  color: white;
  transform: translateY(-1px);
}
.forge-qty-button--add {
  border-color: rgba(56, 242, 160, 0.28);
  color: var(--forge-green);
  background: rgba(21, 97, 68, 0.2);
}
.forge-qty-button--add:hover:not(:disabled) {
  border-color: var(--forge-green);
  box-shadow: 0 0 18px rgba(56, 242, 160, 0.12);
}
.forge-qty-button:disabled {
  opacity: 0.25;
}

.forge-card__counter {
  text-align: center;
}
.forge-card__counter strong {
  font-size: 18px;
}
.forge-card__counter span {
  color: #536170;
  font-size: 10px;
}

.forge-empty-search {
  grid-column: 1 / -1;
  display: grid;
  min-height: 320px;
  place-content: center;
  text-align: center;
}
.forge-empty-search__icon {
  color: var(--forge-cyan);
  font-size: 54px;
}
.forge-empty-search strong {
  font-size: 18px;
}
.forge-empty-search p {
  color: var(--forge-muted);
  font-size: 12px;
}

.forge-deck-panel {
  position: sticky;
  top: 22px;
  display: flex;
  max-height: calc(100vh - 44px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
}

.forge-deck-summary {
  padding: 24px 24px 14px;
}
.forge-text-button,
.forge-clear {
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--forge-cyan);
  background: transparent;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}
.forge-text-button:hover {
  text-shadow: 0 0 14px var(--forge-cyan);
}

.forge-deck-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.forge-text-button--random {
  color: #d1b3ff;
}

.forge-text-button--random:hover {
  text-shadow: 0 0 14px var(--forge-violet);
}

.forge-telemetry {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  align-items: center;
  padding: 8px 24px 20px;
}

.forge-progress {
  --progress: 0%;
  display: grid;
  width: 118px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    var(--forge-cyan) var(--progress),
    rgba(75, 104, 119, 0.16) 0
  );
  box-shadow: 0 0 28px rgba(35, 215, 255, 0.1);
  transition: background 0.3s;
}

.forge-progress.is-complete {
  background: conic-gradient(var(--forge-green) 100%, var(--forge-green) 0);
  box-shadow: 0 0 34px rgba(56, 242, 160, 0.2);
}
.forge-progress__inner {
  display: grid;
  width: 96px;
  aspect-ratio: 1;
  grid-template-columns: auto auto;
  place-content: center;
  align-items: baseline;
  border: 1px solid rgba(127, 203, 230, 0.11);
  border-radius: 50%;
  background: #080e17;
}
.forge-progress__inner strong {
  font-size: 29px;
  line-height: 1;
}
.forge-progress__inner span {
  color: #60717f;
  font-size: 10px;
}
.forge-progress__inner small {
  grid-column: 1 / -1;
  margin-top: 5px;
  color: #6d8291;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-align: center;
}
.forge-progress.is-complete small {
  color: var(--forge-green);
}

.forge-requirements {
  display: grid;
  gap: 7px;
}
.forge-requirement {
  display: grid;
  grid-template-columns: 9px 1fr auto 25px;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(111, 148, 165, 0.11);
  border-radius: 8px;
  color: #8c9aa6;
  background: rgba(15, 22, 31, 0.6);
  font-size: 10px;
}
.forge-level-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8292a0;
}
.forge-level-dot.level-baixa {
  background: #17c9ff;
  box-shadow: 0 0 8px #17c9ff;
}
.forge-level-dot.level-media {
  background: #a970ff;
  box-shadow: 0 0 8px #a970ff;
}
.forge-level-dot.level-alta {
  background: #ff9f43;
  box-shadow: 0 0 8px #ff9f43;
}
.forge-requirement__label {
  font-weight: 700;
}
.forge-requirement__check {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  color: #697985;
  background: #171f28;
  font-size: 8px;
}
.forge-requirement.is-complete {
  color: #d7e3e8;
}
.forge-requirement.is-complete .forge-requirement__check {
  color: #04130c;
  background: var(--forge-green);
}

.forge-deck-list-header {
  align-items: center;
  margin: 0 24px;
  padding: 13px 0 10px;
  border-top: 1px solid var(--forge-line);
  color: #647685;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
}
.forge-clear {
  color: #a76d78;
  font-size: 8px;
}
.forge-clear:hover {
  color: var(--forge-danger);
}

.forge-deck-list {
  min-height: 130px;
  flex: 1;
  overflow: hidden auto;
  padding: 0 18px 14px;
  scrollbar-width: thin;
}

.forge-deck-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  margin-bottom: 6px;
  padding: 6px 8px 6px 6px;
  border: 1px solid rgba(117, 156, 173, 0.1);
  border-left: 2px solid var(--card-color);
  border-radius: 9px;
  background: rgba(14, 21, 30, 0.8);
  contain: layout paint style;
}
.forge-deck-row__preview {
  width: 40px;
  height: 40px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #111;
}
.forge-deck-row__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.forge-deck-row__preview:hover img {
  transform: scale(1.1);
}
.forge-deck-row__identity {
  min-width: 0;
}
.forge-deck-row__identity strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forge-deck-row__identity span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #61717f;
  font-size: 7px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forge-deck-row__controls {
  display: grid;
  grid-template-columns: 24px 18px 24px;
  align-items: center;
  text-align: center;
}
.forge-deck-row__controls button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(124, 164, 181, 0.13);
  border-radius: 6px;
  color: #9eafb9;
  background: #151e28;
}
.forge-deck-row__controls button:hover:not(:disabled) {
  border-color: var(--card-color);
  color: white;
}
.forge-deck-row__controls button:disabled {
  opacity: 0.2;
}
.forge-deck-row__controls strong {
  font-size: 10px;
}

.forge-empty-deck {
  display: grid;
  min-height: 140px;
  place-content: center;
  justify-items: center;
  padding: 20px;
  text-align: center;
}
.forge-empty-deck__mark {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  place-items: center;
  border: 1px dashed #345064;
  border-radius: 50%;
  color: #4a6c81;
  font-size: 24px;
}
.forge-empty-deck strong {
  color: #a1adb6;
  font-size: 11px;
}
.forge-empty-deck p {
  max-width: 190px;
  margin: 5px 0 0;
  color: #566673;
  font-size: 9px;
  line-height: 1.5;
}

.forge-deck-footer {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--forge-line);
  background: rgba(5, 9, 15, 0.86);
}
.forge-validation {
  min-height: 28px;
  margin: 0 0 10px;
  color: #738491;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}
.forge-save {
  position: relative;
  width: 100%;
  height: 48px;
  overflow: hidden;
  border: 1px solid #283a47;
  border-radius: 10px;
  color: #596975;
  background: #111921;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.forge-save.is-ready {
  border-color: var(--forge-green);
  color: #03140c;
  background: linear-gradient(100deg, #21cf83, #56f5ad);
  box-shadow: 0 0 28px rgba(56, 242, 160, 0.17);
}
.forge-save.is-ready::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(255, 255, 255, 0.3) 45%,
    transparent 70%
  );
  content: "";
  transform: translateX(-120%);
  transition: transform 0.55s;
}
.forge-save.is-ready:hover::after {
  transform: translateX(120%);
}
.forge-save.is-ready:hover {
  box-shadow: 0 0 38px rgba(56, 242, 160, 0.3);
  transform: translateY(-1px);
}

.forge-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  overflow: hidden auto;
  place-items: center;
  padding: 24px;
  background: rgba(0, 3, 7, 0.82);
  opacity: 0;
  transition: opacity 0.18s;
}
.forge-modal.is-visible {
  opacity: 1;
}
.forge-modal > section {
  transform: translateY(16px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.forge-modal.is-visible > section {
  transform: none;
}

.forge-detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(360px, 1fr);
  width: min(900px, 100%);
  max-height: min(700px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--card-color) 65%, transparent);
  border-radius: 22px;
  background: #080d15;
  box-shadow:
    0 30px 100px #000,
    0 0 50px color-mix(in srgb, var(--card-color) 10%, transparent);
}
.forge-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: white;
  background: rgba(3, 6, 10, 0.65);
  font-size: 24px;
}
.forge-modal-close:hover {
  border-color: white;
  transform: rotate(90deg);
  transition: 0.2s;
}
.forge-detail__visual {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #101720;
}
.forge-detail__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.forge-detail__visual-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 60%, #080d15),
    linear-gradient(to top, rgba(5, 9, 15, 0.9), transparent 40%);
}
.forge-detail__power {
  position: absolute;
  bottom: 28px;
  left: 28px;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 2px solid var(--card-color);
  border-radius: 50%;
  background: rgba(3, 7, 12, 0.88);
  box-shadow: 0 0 25px color-mix(in srgb, var(--card-color) 25%, transparent);
  font-size: 28px;
}
.forge-detail__content {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden auto;
  padding: 54px 48px 34px;
}
.forge-detail__content h2 {
  margin: 7px 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.forge-detail__booster {
  align-self: flex-start;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--card-color) 35%, transparent);
  border-radius: 5px;
  color: var(--card-color);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.forge-detail__description {
  flex: 1;
  margin: 24px 0;
  color: #a8b4bd;
  font-size: 13px;
  line-height: 1.7;
}
.forge-detail__description p {
  margin: 0 0 12px;
}
.forge-detail__description .is-efeito {
  padding-left: 13px;
  border-left: 2px solid var(--card-color);
  color: #e7eff3;
  font-weight: 650;
}
.forge-detail__description .is-flavor {
  color: #778692;
  font-style: italic;
}
.forge-detail__quantity {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 12px;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--forge-line);
}
.forge-detail__quantity .forge-qty-button {
  width: 48px;
  height: 44px;
}
.forge-detail__quantity > div {
  text-align: center;
}
.forge-detail__quantity span {
  display: block;
  color: #677886;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
}
.forge-detail__quantity strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.forge-confirm {
  width: min(440px, 100%);
  padding: 36px;
  border: 1px solid rgba(132, 182, 203, 0.2);
  border-radius: 20px;
  background: linear-gradient(145deg, #101925, #070b12);
  box-shadow: 0 30px 90px #000;
  text-align: center;
}
.forge-confirm__icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 22px auto;
  place-items: center;
  border: 1px solid var(--forge-danger);
  border-radius: 50%;
  color: var(--forge-danger);
  background: rgba(255, 85, 115, 0.08);
  box-shadow: 0 0 28px rgba(255, 85, 115, 0.12);
  font-size: 28px;
  font-weight: 300;
}
.forge-confirm h2 {
  margin: 0;
  font-size: 27px;
}
.forge-confirm > p {
  margin: 12px 0 28px;
  color: #8796a2;
  font-size: 12px;
  line-height: 1.6;
}
.forge-confirm__actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}
.forge-confirm__actions button {
  min-height: 44px;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}
.forge-confirm__cancel {
  border: 1px solid #31414e;
  color: #8e9ca7;
  background: #131c25;
}
.forge-confirm__accept {
  border: 1px solid var(--forge-cyan);
  color: #031217;
  background: var(--forge-cyan);
}
.forge-confirm__accept.is-danger {
  border-color: #ff5573;
  color: white;
  background: #a92b43;
}

.forge-toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 150;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: min(420px, calc(100% - 32px));
  padding: 14px 18px;
  border: 1px solid rgba(35, 215, 255, 0.32);
  border-radius: 12px;
  color: #dbe8ed;
  background: rgba(8, 15, 23, 0.96);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.5);
  font-size: 11px;
  transform: translateY(20px);
  opacity: 0;
  transition: 0.22s ease;
}
.forge-toast.is-visible {
  transform: none;
  opacity: 1;
}
.forge-toast__icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #04120c;
  background: var(--forge-green);
  font-weight: 900;
}
.forge-toast.is-error {
  border-color: rgba(255, 85, 115, 0.4);
}
.forge-toast.is-error .forge-toast__icon {
  color: white;
  background: var(--forge-danger);
}
.forge-saved-flash::after {
  position: fixed;
  inset: 0;
  z-index: 90;
  border: 2px solid var(--forge-green);
  box-shadow: inset 0 0 80px rgba(56, 242, 160, 0.12);
  content: "";
  pointer-events: none;
  animation: forge-saved 0.7s ease both;
}
@keyframes forge-saved {
  to {
    opacity: 0;
  }
}

@container forge (max-width: 1200px) {
  .forge-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .forge-filter {
    padding: 0 9px;
  }

  .forge-shell {
    padding: max(14px, env(safe-area-inset-top)) 10px
      calc(94px + env(safe-area-inset-bottom));
  }

  .forge-header {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 64px;
    margin: 0 2px 10px;
    padding: 0 0 10px;
  }

  .forge-icon-button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 22px;
  }

  .forge-overline,
  .forge-subtitle {
    display: none;
  }

  .forge-title {
    gap: 6px;
    font-size: clamp(27px, 8.5cqw, 40px);
  }

  .forge-save-state {
    max-width: 86px;
    padding: 7px 9px;
    overflow: hidden;
    font-size: 7px;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  .forge-save-state__text {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .forge-mobile-status {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(94, 190, 220, 0.18);
    border-radius: 13px;
    background: linear-gradient(
      110deg,
      rgba(13, 38, 50, 0.92),
      rgba(9, 14, 23, 0.94)
    );
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  }

  .forge-mobile-status__count {
    display: grid;
    padding: 0 10px 0 0;
    border: 0;
    border-right: 1px solid var(--forge-line);
    color: var(--forge-text);
    background: transparent;
    text-align: left;
  }

  .forge-mobile-status__count span {
    color: var(--forge-cyan);
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 0.16em;
  }

  .forge-mobile-status__count strong {
    margin-top: 2px;
    font-size: 19px;
    letter-spacing: -0.05em;
  }

  .forge-mobile-status__telemetry {
    min-width: 0;
  }

  .forge-mobile-status__progress {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(97, 126, 141, 0.2);
  }

  .forge-mobile-status__progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--forge-cyan), var(--forge-green));
    box-shadow: 0 0 10px var(--forge-cyan);
    transition: width 0.25s ease;
  }

  .forge-mobile-status__requirements {
    display: flex;
    justify-content: space-between;
    margin-top: 7px;
    color: #6d7d89;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 0.04em;
  }

  .forge-mobile-status__requirements .is-complete {
    color: var(--forge-green);
  }

  .forge-workspace {
    display: block;
  }

  .forge-collection,
  .forge-deck-panel {
    width: 100%;
    min-height: calc(100% - 130px);
    border-radius: 15px;
  }

  .deck-forge[data-mobile-view="collection"] .forge-deck-panel,
  .deck-forge[data-mobile-view="deck"] .forge-collection {
    display: none;
  }

  .forge-deck-panel {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .forge-mobile-dock {
    position: absolute;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 80;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 7px;
    border: 1px solid rgba(111, 209, 239, 0.24);
    border-radius: 17px;
    background: rgba(6, 12, 20, 0.96);
    box-shadow:
      0 18px 55px rgba(0, 0, 0, 0.62),
      0 0 28px rgba(35, 215, 255, 0.08);
  }

  .forge-mobile-dock__button {
    display: grid;
    min-height: 54px;
    grid-template-columns: auto auto;
    gap: 9px;
    place-content: center;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #667988;
    background: transparent;
  }

  .forge-mobile-dock__button strong {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .forge-mobile-dock__button.is-active {
    border-color: rgba(35, 215, 255, 0.35);
    color: #e9fbff;
    background: rgba(24, 116, 143, 0.22);
  }

  .forge-mobile-dock__icon {
    color: var(--forge-cyan);
    font-size: 19px;
  }

  .forge-mobile-dock__count {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border: 1px solid #496271;
    border-radius: 50%;
    color: white;
    background: #101a23;
    font-size: 11px;
    font-weight: 900;
  }

  .forge-mobile-dock__button.is-ready .forge-mobile-dock__count {
    border-color: var(--forge-green);
    color: #04140c;
    background: var(--forge-green);
    box-shadow: 0 0 16px rgba(56, 242, 160, 0.35);
  }

  .forge-toolbar {
    position: sticky;
    top: 0;
    padding: 15px 12px 12px;
    border-radius: 15px 15px 0 0;
  }

  .forge-section-title {
    font-size: 22px;
  }

  .forge-result-count {
    padding: 5px 8px;
    font-size: 7px;
  }

  .forge-search {
    height: 44px;
    margin-top: 14px;
  }

  .forge-search__input {
    font-size: 12px;
  }

  .forge-controls {
    gap: 7px;
    margin-top: 9px;
  }

  .forge-filters {
    display: flex;
    gap: 6px;
    overflow: auto hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-padding-inline: 4px;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    cursor: grab;
    mask-image: linear-gradient(
      90deg,
      transparent 0,
      black 8px,
      black calc(100% - 14px),
      transparent 100%
    );
  }

  .forge-filters::-webkit-scrollbar {
    display: none;
  }

  .forge-filter {
    min-height: 36px;
    flex: 0 0 auto;
    padding: 0 11px;
    font-size: 8px;
    scroll-snap-align: start;
  }

  .forge-filters.is-dragging {
    scroll-behavior: auto;
    scroll-snap-type: none;
    cursor: grabbing;
    user-select: none;
  }

  .forge-filter-swipe-hint {
    display: block;
    margin: 5px 3px 0;
    color: #526b79;
    font-size: 6px;
    font-weight: 900;
    letter-spacing: 0.12em;
  }

  .forge-order {
    width: 58px;
    min-height: 36px;
    flex: 0 0 58px;
    padding: 0 5px;
    font-size: 8px;
    white-space: normal;
  }

  .forge-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 10px;
  }

  .forge-card {
    border-radius: 12px;
  }

  .forge-card__art {
    aspect-ratio: 0.82 / 1;
  }

  .forge-card__image {
    object-position: center 22%;
  }

  .forge-card__body {
    min-height: 82px;
    padding: 10px 9px 7px;
  }

  .forge-card__name {
    min-height: 30px;
    margin-top: 4px;
    font-size: 11px;
  }

  .forge-card__description {
    display: none;
  }

  .forge-card__level {
    top: 7px;
    right: 7px;
    max-width: calc(100% - 47px);
    overflow: hidden;
    font-size: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .forge-card__power {
    top: 7px;
    left: 7px;
    width: 29px;
    height: 29px;
    font-size: 11px;
  }

  .forge-card__controls {
    grid-template-columns: 42px 1fr 42px;
    gap: 4px;
    padding: 7px;
  }

  .forge-qty-button {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .forge-deck-summary {
    align-items: center;
    padding: 18px 16px 10px;
  }

  .forge-deck-actions {
    gap: 7px;
  }

  .forge-text-button {
    padding: 7px 5px;
    font-size: 7px;
  }

  .forge-telemetry {
    grid-template-columns: 106px 1fr;
    gap: 12px;
    padding: 7px 16px 16px;
  }

  .forge-progress {
    width: 98px;
  }

  .forge-progress__inner {
    width: 80px;
  }

  .forge-progress__inner strong {
    font-size: 23px;
  }

  .forge-deck-list {
    max-height: none;
    overflow: visible;
    padding: 0 12px 14px;
  }

  .forge-deck-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    min-height: 64px;
    padding: 6px 9px 6px 6px;
  }

  .forge-deck-row__preview {
    width: 52px;
    height: 52px;
  }

  .forge-deck-row__identity strong {
    font-size: 11px;
  }

  .forge-deck-row__controls {
    grid-template-columns: 32px 22px 32px;
  }

  .forge-deck-row__controls button {
    width: 32px;
    height: 38px;
  }

  .forge-deck-footer {
    padding-bottom: 20px;
  }

  .forge-modal {
    position: absolute;
    align-items: end;
    padding: 0;
  }

  .forge-detail {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: 96%;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .forge-detail__visual {
    min-height: 0;
    height: 43cqh;
    max-height: 430px;
  }

  .forge-detail__visual-wash {
    background: linear-gradient(to top, #080d15 1%, transparent 54%);
  }

  .forge-detail__content {
    max-height: 52cqh;
    padding: 27px 22px calc(20px + env(safe-area-inset-bottom));
  }

  .forge-detail__content h2 {
    font-size: 30px;
  }

  .forge-detail__description {
    margin: 17px 0;
    font-size: 12px;
  }

  .forge-confirm {
    align-self: end;
    width: 100%;
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .forge-toast {
    position: absolute;
    right: 14px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    left: 14px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deck-forge *,
  .deck-forge *::before,
  .deck-forge *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================== */
/* TELA INICIAL // NEOFLORIPA TERMINAL                                        */
/* ========================================================================== */

body.title-terminal-open {
  background: #000;
}

body.title-terminal-open > canvas {
  opacity: 0;
  pointer-events: none;
}

.title-terminal,
.title-terminal * {
  box-sizing: border-box;
}

.title-terminal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 8000;
  width: min(100vw, 50vh);
  height: min(100vh, 200vw);
  overflow: hidden;
  color: var(--forge-text);
  background:
    radial-gradient(circle at 8% 0%, rgba(25, 152, 185, 0.16), transparent 46%),
    radial-gradient(
      circle at 100% 65%,
      rgba(112, 60, 170, 0.12),
      transparent 44%
    ),
    #030509;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  touch-action: manipulation;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.35s ease;
}

.title-terminal.is-ready {
  opacity: 1;
}

.title-terminal button,
.title-terminal input {
  font: inherit;
}

.title-terminal button {
  color: inherit;
  cursor: pointer;
}

.title-terminal button:focus-visible,
.title-terminal input:focus-visible {
  outline: 2px solid var(--forge-cyan);
  outline-offset: 3px;
}

.title-atmosphere,
.title-grid,
.title-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.title-grid {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(69, 166, 196, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 166, 196, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.title-scanlines {
  z-index: 2;
  opacity: 0.035;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, #fff 4px);
}

.title-shell {
  position: relative;
  z-index: 4;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  padding: max(15px, env(safe-area-inset-top)) 14px
    max(15px, env(safe-area-inset-bottom));
}

.title-topbar {
  display: flex;
  min-height: 38px;
  flex: 0 0 auto;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(124, 211, 255, 0.14);
}

.title-system-id,
.title-online {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #6f8593;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.title-system-id__mark {
  display: grid;
  width: 28px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(35, 215, 255, 0.45);
  border-radius: 5px;
  color: var(--forge-cyan);
  background: rgba(17, 101, 126, 0.14);
  font-size: 9px;
}

.title-online {
  padding: 6px 8px;
  border: 1px solid rgba(56, 242, 160, 0.18);
  border-radius: 999px;
  color: #8fa49c;
  background: rgba(7, 24, 18, 0.55);
  font-size: 6px;
}

.title-online__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--forge-green);
  box-shadow: 0 0 9px var(--forge-green);
  animation: forge-pulse 1.5s ease-in-out infinite;
}

.title-account {
  border: 1px solid rgba(56, 242, 160, 0.48);
  background: rgba(4, 17, 22, 0.82);
  color: #8fffc3;
  padding: 7px 9px;
  font: 700 7px/1 var(--font-mono, monospace);
  letter-spacing: 0.08em;
  cursor: pointer;
}

.title-settings-button {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(35, 215, 255, 0.42);
  border-radius: 8px;
  color: var(--forge-cyan);
  background: rgba(4, 17, 22, 0.82);
  font-size: 14px;
  cursor: pointer;
}

.title-settings-button:hover,
.title-settings-button:focus-visible {
  border-color: var(--forge-cyan);
  box-shadow: 0 0 18px rgba(35, 215, 255, 0.2);
}

.title-account:hover,
.title-account:focus-visible {
  border-color: #38f2a0;
  box-shadow: 0 0 18px rgba(56, 242, 160, 0.2);
}

.title-balance {
  color: #ffd166;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .title-topbar {
    gap: 6px;
    justify-content: flex-start;
  }

  .title-system-id > span:last-child,
  .title-online {
    display: none;
  }

  .title-balance {
    margin-left: auto;
  }

  .title-account {
    max-width: 122px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.title-action--booster {
  min-height: 66px;
  border-color: rgba(255, 209, 102, 0.3);
}

.title-action--booster::before {
  background: #ffd166;
  box-shadow: 0 0 12px #ffd166;
}

.title-faction-dialog,
.title-booster-dialog {
  max-height: 94%;
  overflow-y: auto;
}

.title-faction-choices,
.title-booster-shop {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.title-faction {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 16px;
  border: 1px solid rgba(35, 215, 255, 0.35);
  border-radius: 12px;
  color: #fff;
  background: rgba(7, 15, 24, 0.94);
  text-align: left;
  cursor: pointer;
}

.title-faction--raspcorp {
  border-color: rgba(35, 215, 255, 0.58);
}
.title-faction--echossystem {
  border-color: rgba(255, 85, 115, 0.58);
}
.title-faction--humbanet {
  border-color: rgba(56, 242, 160, 0.58);
}
.title-faction--remanescentes {
  border-color: rgba(255, 210, 105, 0.58);
}
.title-faction--sindicato {
  border-color: rgba(188, 130, 255, 0.58);
}
.title-faction strong {
  font-size: 13px;
}
.title-faction span {
  color: #92a4b1;
  font-size: 9px;
  line-height: 1.45;
}
.title-faction small {
  align-self: end;
  color: #38f2a0;
  font-size: 7px;
}
.title-faction:disabled {
  opacity: 0.42;
  cursor: wait;
}

.title-booster-balance {
  display: block;
  margin: -8px 0 14px;
  color: #ffd166;
  font-size: 12px;
}

.title-booster-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.title-booster-card {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(255, 209, 102, 0.42);
  border-radius: 9px;
  background: rgba(4, 9, 16, 0.9);
}

.title-booster-card img {
  width: 100%;
  aspect-ratio: 0.72;
  border-radius: 5px;
  object-fit: cover;
}

.title-booster-card small {
  color: #ffd166;
  font-size: 6px;
}
.title-booster-card strong {
  overflow: hidden;
  font-size: 8px;
  line-height: 1.25;
}

.forge-card__owned {
  color: #ffd166;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.title-auth-dialog {
  width: min(440px, calc(100vw - 32px));
}

.title-auth-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(35, 215, 255, 0.42);
  background: rgba(0, 5, 10, 0.88);
  color: #f5fbff;
  font: 700 14px/1.2 var(--font-mono, monospace);
  outline: none;
}

.title-auth-input:focus {
  border-color: #38f2a0;
  box-shadow: 0 0 0 2px rgba(56, 242, 160, 0.12);
}

.title-hero {
  display: grid;
  min-height: 174px;
  flex: 0 0 auto;
  place-content: center;
  justify-items: center;
  padding-top: 7px;
  text-align: center;
}

.title-kicker {
  color: var(--forge-cyan);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.25em;
}

.title-logo {
  display: grid;
  margin: 8px 0 4px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(59px, 17.5cqw, 82px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.72;
  filter: drop-shadow(0 0 24px rgba(35, 215, 255, 0.16));
}

.title-logo span {
  display: block;
}

.title-logo__cyber {
  color: white;
}

.title-logo__duel {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--forge-cyan);
}

.title-manifesto {
  margin: 12px 0 6px;
  color: #8596a2;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.32em;
}

.title-signal {
  width: 92px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--forge-cyan),
    transparent
  );
  box-shadow: 0 0 12px var(--forge-cyan);
}

.title-loadout {
  display: grid;
  min-height: 66px;
  flex: 0 0 auto;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(120, 176, 198, 0.16);
  border-radius: 13px;
  background: linear-gradient(
    110deg,
    rgba(13, 27, 38, 0.92),
    rgba(8, 13, 21, 0.94)
  );
}

.title-loadout.is-ready {
  border-color: rgba(56, 242, 160, 0.28);
  box-shadow: inset 0 0 24px rgba(56, 242, 160, 0.03);
}

.title-loadout.is-locked {
  border-color: rgba(255, 159, 67, 0.3);
}

.title-loadout__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--forge-green);
  background: rgba(56, 242, 160, 0.08);
  font-size: 15px;
  font-weight: 900;
}

.is-locked .title-loadout__icon {
  color: #ff9f43;
  background: rgba(255, 159, 67, 0.08);
}

.title-loadout__identity {
  min-width: 0;
}

.title-loadout__identity span {
  display: block;
  margin-bottom: 4px;
  color: var(--forge-green);
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.is-locked .title-loadout__identity span {
  color: #ffb06a;
}

.title-loadout__identity strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-loadout__levels {
  display: flex;
  gap: 5px;
}

.title-loadout__levels > span:not(.title-loadout__lock) {
  display: grid;
  width: 28px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(109, 160, 181, 0.15);
  border-radius: 7px;
  background: rgba(16, 26, 35, 0.7);
}

.title-loadout__levels small {
  color: #627583;
  font-size: 6px;
  font-weight: 900;
}

.title-loadout__levels strong {
  font-size: 11px;
}

.title-loadout__lock {
  color: #66594f;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.title-actions {
  display: grid;
  min-height: 0;
  flex: 1;
  gap: 8px;
  align-content: center;
}

.title-action {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 76px;
  overflow: hidden;
  grid-template-columns: 46px minmax(0, 1fr) 22px;
  gap: 10px;
  align-items: center;
  padding: 10px 13px;
  border: 1px solid rgba(110, 180, 207, 0.2);
  border-radius: 13px;
  background: linear-gradient(
    110deg,
    rgba(14, 25, 36, 0.96),
    rgba(8, 13, 21, 0.96)
  );
  text-align: left;
  transition:
    border-color 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
}

.title-action::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--forge-cyan);
  box-shadow: 0 0 12px var(--forge-cyan);
  content: "";
}

.title-action:hover:not(:disabled),
.title-action:active:not(:disabled) {
  border-color: rgba(35, 215, 255, 0.62);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 25px rgba(35, 215, 255, 0.04);
  transform: translateY(-2px);
}

.title-action:disabled {
  filter: saturate(0.35);
  cursor: not-allowed;
  opacity: 0.38;
}

.title-action--solo {
  min-height: 88px;
  border-color: rgba(35, 215, 255, 0.38);
  background: linear-gradient(
    115deg,
    rgba(13, 65, 82, 0.8),
    rgba(8, 17, 27, 0.96) 65%
  );
  box-shadow: 0 12px 36px rgba(35, 215, 255, 0.07);
}

.title-action--deck::before {
  background: var(--forge-violet);
  box-shadow: 0 0 12px var(--forge-violet);
}

.title-action--deck {
  border-color: rgba(169, 112, 255, 0.24);
}

.title-action__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(35, 215, 255, 0.35);
  border-radius: 11px;
  color: var(--forge-cyan);
  background: rgba(35, 215, 255, 0.08);
  font-size: 17px;
  font-weight: 900;
}

.title-action--deck .title-action__icon {
  border-color: rgba(169, 112, 255, 0.38);
  color: #caa6ff;
  background: rgba(169, 112, 255, 0.08);
}

.title-action__copy {
  display: block;
  min-width: 0;
}

.title-action__copy small,
.title-action__copy strong,
.title-action__copy > span {
  display: block;
}

.title-action__copy small {
  margin-bottom: 3px;
  color: var(--forge-cyan);
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.title-action--deck .title-action__copy small {
  color: #caa6ff;
}

.title-action__copy strong {
  overflow: hidden;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-action--solo .title-action__copy strong {
  font-size: 18px;
}

.title-action__copy > span {
  margin-top: 3px;
  overflow: hidden;
  color: #6e7e8a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-action__arrow {
  color: #67808f;
  font-size: 24px;
  text-align: right;
}

.title-multiplayer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.title-action--compact {
  min-height: 84px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  padding: 9px;
}

.title-action--compact .title-action__icon {
  width: 32px;
  height: 38px;
  border-radius: 9px;
  font-size: 15px;
}

.title-action--compact .title-action__copy strong {
  font-size: 11px;
}

.title-action--compact .title-action__copy > span {
  font-size: 7px;
}

.title-action--compact .title-action__arrow {
  display: none;
}

.title-status {
  display: grid;
  min-height: 44px;
  flex: 0 0 auto;
  grid-template-columns: 7px auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(104, 158, 180, 0.12);
  border-radius: 10px;
  color: #627482;
  background: rgba(7, 12, 19, 0.86);
  font-size: 7px;
}

.title-status__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--forge-cyan);
  box-shadow: 0 0 8px var(--forge-cyan);
}

.title-status__label {
  color: #89a0ad;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.title-status__text {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-status[data-tone="warning"] .title-status__pulse {
  background: #ff9f43;
  box-shadow: 0 0 8px #ff9f43;
}
.title-status[data-tone="warning"] .title-status__text {
  color: #dca775;
}
.title-status[data-tone="error"] .title-status__pulse {
  background: var(--forge-danger);
  box-shadow: 0 0 8px var(--forge-danger);
}
.title-status[data-tone="error"] .title-status__text {
  color: #ff8da1;
}
.title-status[data-tone="success"] .title-status__pulse {
  background: var(--forge-green);
  box-shadow: 0 0 8px var(--forge-green);
}
.title-status[data-tone="success"] .title-status__text {
  color: #83f5bd;
}

.title-modal {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: end;
  background: rgba(0, 3, 7, 0.84);
  opacity: 0;
  transition: opacity 0.18s;
}

.title-modal.is-visible {
  opacity: 1;
}

.title-dialog {
  width: 100%;
  padding: 28px 22px calc(24px + env(safe-area-inset-bottom));
  border: 1px solid rgba(35, 215, 255, 0.38);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(150deg, #101b27, #070b12 62%);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.58);
  transform: translateY(28px);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.title-modal.is-visible .title-dialog {
  transform: none;
}

.title-dialog h2 {
  margin: 8px 0 8px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.title-dialog > p {
  margin: 0 0 20px;
  color: #7e8f9b;
  font-size: 11px;
  line-height: 1.55;
}

.title-room-input {
  width: 100%;
  height: 70px;
  padding: 0 12px;
  border: 1px solid rgba(35, 215, 255, 0.36);
  border-radius: 12px;
  outline: 0;
  color: white;
  background: rgba(3, 8, 13, 0.86);
  font-size: 31px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-align: center;
}

.title-room-input::placeholder {
  color: #273744;
}

.title-room-input:focus {
  border-color: var(--forge-cyan);
  box-shadow: 0 0 24px rgba(35, 215, 255, 0.12);
}

.title-dialog__error {
  display: block;
  min-height: 22px;
  padding-top: 7px;
  color: #ff8197;
  font-size: 9px;
  text-align: center;
}

.title-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 9px;
  margin-top: 7px;
}

.title-dialog__actions--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.title-dialog__actions button {
  min-height: 48px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.title-dialog__cancel {
  border: 1px solid #344651;
  color: #91a1ac;
  background: #121c25;
}

.title-dialog__confirm {
  border: 1px solid var(--forge-cyan);
  color: #021116;
  background: linear-gradient(100deg, #19bbde, #40e4ff);
  box-shadow: 0 0 24px rgba(35, 215, 255, 0.15);
}

.title-settings-dialog {
  max-height: 94%;
  overflow-y: auto;
}

.title-admin-dialog {
  max-height: 94%;
  overflow-y: auto;
}

.title-admin-grid {
  display: grid;
  gap: 10px;
  margin: 8px 0 10px;
}

.title-admin-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(109, 160, 181, 0.24);
  border-radius: 10px;
  background: rgba(8, 14, 22, 0.75);
}

.title-admin-section h3 {
  margin: 0;
  color: #d8f0ff;
  font-size: 12px;
}

.title-admin-note {
  margin: 0;
  color: #83939f;
  font-size: 9px;
  line-height: 1.45;
}

.title-admin-result {
  min-height: 16px;
  margin: 4px 0;
  color: #83f5bd;
  font-size: 9px;
  text-align: center;
}

.title-settings-controls {
  display: grid;
  gap: 16px;
  margin: 20px 0 18px;
}

.title-setting {
  display: grid;
  gap: 9px;
  color: #a8bbc7;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.title-setting__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-setting__value {
  color: var(--forge-cyan);
  font-size: 11px;
}

.title-setting__range {
  width: 100%;
  height: 6px;
  accent-color: var(--forge-cyan);
  cursor: pointer;
}

.title-room-dialog {
  text-align: center;
}

.title-room-dialog__qr {
  display: block;
  width: min(230px, 62cqw);
  margin: 14px auto;
  padding: 7px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 0 32px rgba(35, 215, 255, 0.18);
}

.title-room-dialog__code {
  margin: 12px 0;
  color: var(--forge-cyan);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-shadow: 0 0 16px rgba(35, 215, 255, 0.3);
}

@media (max-height: 720px) {
  .title-hero {
    min-height: 140px;
  }
  .title-logo {
    font-size: 56px;
  }
  .title-loadout {
    min-height: 58px;
  }
  .title-action {
    min-height: 66px;
  }
  .title-action--solo {
    min-height: 74px;
  }
  .title-action--compact {
    min-height: 70px;
  }
  .title-status {
    min-height: 38px;
    margin-top: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .title-terminal *,
  .title-terminal *::before,
  .title-terminal *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
