html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(120% 120% at 20% 20%, rgba(255, 221, 128, 0.08), transparent 55%),
    radial-gradient(80% 80% at 80% 0%, rgba(255, 153, 51, 0.08), transparent 45%),
    linear-gradient(160deg, #061336 0%, #0b1f54 45%, #071333 100%);
  color: #e9edf7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  z-index: 0;
}

.login-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(140% 140% at 10% 10%, rgba(255, 213, 90, 0.14), transparent 60%),
    radial-gradient(120% 120% at 90% 0%, rgba(95, 160, 255, 0.14), transparent 55%),
    linear-gradient(160deg, rgba(6, 19, 54, 0.98) 0%, rgba(7, 18, 46, 0.98) 100%);
  z-index: 20;
}

.login-card {
  max-width: 520px;
  width: 100%;
  padding: 2.5rem 2.25rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(12, 26, 68, 0.95) 0%, rgba(9, 16, 44, 0.98) 100%);
  border: 1px solid rgba(255, 193, 59, 0.5);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 193, 59, 0.25);
  text-align: left;
}

.login-card h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  color: #f8fbff;
}

.login-card p {
  margin: 0 0 1.5rem;
  color: #cbd4e6;
  line-height: 1.5;
}

.login-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 600;
  color: #f0c63b;
  margin-bottom: 0.75rem;
}

.login-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

#app-shell.hidden {
  display: none;
}

main {
  max-width: 960px;
  margin: 2.5rem auto 3rem;
  padding: 0 1.25rem 3rem;
  position: relative;
  z-index: 1;
}

body:has(#games-app-shell) main {
  max-width: min(2320px, calc(100vw - 1rem));
  padding: 0 0.75rem 3rem;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
  color: #f8fbff;
}

.page-header {
  position: relative;
  padding-top: 0.5rem;
}

.auth-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-left: auto;
}

.helper-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 198, 59, 0.32);
  background: rgba(10, 26, 68, 0.72);
  color: #e9edf7;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: filter 140ms ease, transform 140ms ease;
}

.helper-status-chip::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.helper-status-chip-ready {
  border-color: rgba(98, 220, 139, 0.42);
  background: rgba(17, 69, 31, 0.35);
  color: #8bff9c;
}

.helper-status-chip-idle {
  border-color: rgba(240, 198, 59, 0.32);
  background: rgba(10, 26, 68, 0.72);
  color: #f0c63b;
}

.helper-status-chip-fallback {
  border-color: rgba(255, 176, 94, 0.38);
  background: rgba(92, 42, 8, 0.32);
  color: #ffb45e;
}

.helper-status-chip:hover,
.helper-status-chip:focus-visible {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.version-badge {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffcf43, #f99a00);
  color: #0b1533;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.panel {
  background: linear-gradient(180deg, #0c1a44 0%, #0a1234 100%);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(255, 191, 64, 0.6), 0 0 25px rgba(255, 191, 64, 0.35);
  border: 1px solid rgba(255, 193, 59, 0.55);
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.panel > p {
  color: #cbd4e6;
  margin-top: 0;
}

textarea,
input {
  width: 100%;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #22335a;
  margin-top: 0.35rem;
  box-sizing: border-box;
  background: #0f214f;
  color: #e5edff;
}

textarea:focus,
input:focus {
  outline: 2px solid #f7c948;
  border-color: #f7c948;
  background: #12295f;
}

label {
  font-weight: 600;
  display: block;
  color: #e5edff;
}

button {
  padding: 0.65rem 1.15rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary {
  background: linear-gradient(135deg, #ffdf61, #f7a800);
  color: #0b1636;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 191, 64, 0.6);
}

.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffd844, #f79b00);
}

.primary.ghost {
  background: rgba(255, 193, 59, 0.15);
  color: #ff8500;
  box-shadow: none;
}

.secondary {
  background: #10224a;
  color: #f0c63b;
  border: 1px solid #f0c63b;
}

.secondary:hover:not(:disabled) {
  background: #132a58;
}

.artifact-list button,
.artifact-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  background: linear-gradient(180deg, #0f214f 0%, #0c183d 100%);
  color: #e9edf7;
  padding: 0.75rem 0.9rem;
  border: 1px solid #2b3f6f;
}

.artifact-list button[data-kind="prefix"] {
  background: linear-gradient(180deg, #132a58 0%, #0f1f45 100%);
  color: #f0c63b;
  border-color: #f0c63b;
  margin-bottom: 0.6rem;
}

.artifact-list button:hover:not(:disabled),
.artifact-btn:hover:not(:disabled) {
  background: #152f62;
  border-color: #f7c948;
}

.artifact-list button:disabled,
.artifact-btn:disabled {
  opacity: 0.6;
}

.artifact-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  margin-bottom: 0.6rem;
}

.artifact-btn {
  flex: 1;
  position: relative;
}

.artifact-size {
  margin-left: auto;
  color: #b7c3db;
  font-size: 0.85rem;
  font-weight: 600;
}

.artifact-badge {
  margin-left: 0.6rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 193, 59, 0.2);
  color: #f0c63b;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.artifact-badge.secondary {
  background: rgba(120, 170, 255, 0.2);
  color: #7fb2ff;
  white-space: nowrap;
}

.copy-link {
  align-self: center;
  white-space: nowrap;
  padding: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  line-height: 0;
  overflow: hidden;
}

.copy-link.copied {
  background: #11451f;
  color: #8bff9c;
  border-color: #8bff9c;
}

.folder-download-btn {
  width: auto !important;
  min-width: 52px;
  max-width: 92px;
  flex: 0 0 auto;
  align-self: center;
  justify-content: center;
  text-align: center;
  padding: 0.35rem 0.65rem;
  height: 44px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.artifact-download-tile {
  margin: 0.75rem 0 0.95rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(240, 198, 59, 0.24);
  background: linear-gradient(180deg, rgba(16, 34, 83, 0.94), rgba(9, 22, 56, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.artifact-download-tile-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0c63b;
}

.artifact-download-tile-title {
  margin-top: 0.2rem;
  font-size: 1rem;
  font-weight: 800;
  color: #f8fbff;
  overflow-wrap: anywhere;
}

.artifact-download-tile-stats {
  margin-top: 0.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #e9edf7;
}

.artifact-download-tile-meta {
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: #b7c3db;
}

.copy-icon {
  width: 44px;
  height: 44px;
  fill: currentColor;
  display: block;
  transform: scale(1.6);
  transform-origin: center;
}

.copy-link svg {
  width: 44px !important;
  height: 44px !important;
}

@media (max-width: 900px) {
  .artifact-row {
    flex-direction: column;
  }
  .copy-link {
    width: 100%;
  }
}


.error {
  color: #b91c1c;
  margin-top: 1rem;
  background: #fef2f2;
  border: 1px solid #fecdd3;
  padding: 0.85rem 1rem;
  border-radius: 10px;
}

.result pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 10px;
  overflow-x: auto;
}

.hidden {
  display: none;
}

.hidden-soft {
  opacity: 0;
  pointer-events: none;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0.75rem;
}

.control-buttons {
  display: flex;
  gap: 0.5rem;
}

.search-row {
  margin: 0.5rem 0 0.75rem;
}

.search-row input {
  width: 100%;
}

.breadcrumb {
  font-size: 0.95rem;
  color: #e9edf7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb button {
  background: transparent;
  border: none;
  padding: 0.15rem 0.4rem;
  color: #f0c63b;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumb button:hover:not(:disabled) {
  background: #132a58;
}

.chip {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #1f2937;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.chip.muted {
  background: rgba(255, 193, 59, 0.15);
  color: #b36200;
}

.chip.success {
  background: #11451f;
  color: #8bff9c;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(139, 255, 156, 0.3);
  font-weight: 700;
}

.small-text {
  font-size: 0.9rem;
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #ede7ff;
  color: #4a00c5;
  font-weight: 700;
}

.artifact-list .icon.file {
  background: rgba(255, 193, 59, 0.18);
  color: #b36200;
}

.gh-runs {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.gh-runs li {
  background: #0f214f;
  border: 1px solid #2b3f6f;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.25);
}

.gh-title {
  font-weight: 700;
  color: #f0c63b;
  margin-bottom: 0.25rem;
}

.gh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  color: #e9edf7;
  font-size: 0.92rem;
}

.gh-meta a {
  color: #ffd844;
  text-decoration: underline;
}

.pill {
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  background: #132a58;
  color: #f0c63b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-success,
.status-completed {
  background: #11451f;
  color: #8bff9c;
}

.status-failure {
  background: #4a1111;
  color: #ffb4b4;
}

.status-queued,
.status-in_progress {
  background: #332a0f;
  color: #ffd844;
}

.lobby-nav {
  display: flex;
  gap: 1rem;
  padding: 0.65rem 1.5rem 0.4rem;
  background: linear-gradient(180deg, #0c1f50, #07153a);
  border-bottom: 3px solid #f0c63b;
  box-shadow: inset 0 -4px 12px rgba(0, 0, 0, 0.45), 0 6px 12px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 5;
}

.lobby-nav .nav-item {
  text-decoration: none;
  padding: 0.55rem 1.25rem;
  background: linear-gradient(135deg, #132a58, #0c1f46);
  color: #f0c63b;
  border: 1px solid #f0c63b;
  border-radius: 10px 10px 0 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35), inset 0 -2px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.lobby-nav .nav-item.active {
  background: linear-gradient(135deg, #f7c948, #f79b00);
  color: #0b1636;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.45);
}

.games-header-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.builds-grid {
  grid-template-columns: repeat(2, minmax(420px, 1fr));
  margin-top: 0.1rem;
}

.builds-filter-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(240, 198, 59, 0.22);
  background: rgba(7, 21, 58, 0.58);
}

.builds-filter-summary.hidden {
  display: none;
}

.builds-filter-copy {
  color: #d8deff;
  font-size: 0.9rem;
}

.builds-filter-reset {
  color: #f0c63b;
  font-weight: 700;
  text-decoration: none;
}

.helper-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 1.25rem;
}

.helper-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.helper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.helper-note {
  box-sizing: border-box;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(240, 198, 59, 0.24);
  background: rgba(7, 21, 58, 0.52);
  color: #d8deff;
}

.helper-inline-note {
  margin-top: 0.2rem;
  max-width: none;
  width: 100%;
}

.helper-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.15rem;
  border-color: rgba(240, 198, 59, 0.42);
  background: linear-gradient(135deg, rgba(18, 34, 83, 0.98), rgba(13, 28, 69, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.helper-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.helper-banner-eyebrow {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f0c63b;
}

.helper-banner-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fbff;
}

.helper-banner-text {
  color: #c8d2f1;
  font-size: 0.9rem;
}

.helper-banner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 3rem;
  padding: 0.75rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(240, 198, 59, 0.85);
  background: linear-gradient(135deg, #f7c948, #f79b00);
  color: #0b1636;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28), inset 0 -2px 0 rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.helper-banner-cta:hover,
.helper-banner-cta:focus-visible {
  filter: brightness(1.04);
}

.helper-steps {
  margin: 0;
  padding-left: 1.2rem;
  color: #e9edf7;
  line-height: 1.65;
}

.helper-steps li + li {
  margin-top: 0.7rem;
}

.helper-code {
  margin-top: 0.45rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(4, 12, 34, 0.75);
  border: 1px solid rgba(240, 198, 59, 0.18);
  color: #f8fbff;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.helper-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #d8deff;
  line-height: 1.6;
}

.games-panel {
  position: relative;
}

.games-panel-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.games-total-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 198, 59, 0.45);
  background: rgba(7, 21, 58, 0.75);
  color: #f4f6ff;
  font-size: 0.92rem;
  font-weight: 700;
}

.game-card {
  border: 1px solid rgba(240, 198, 59, 0.45);
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(16, 34, 83, 0.94), rgba(9, 22, 56, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.latest-build-line-card {
  padding: 0;
  overflow: hidden;
}

.latest-build-line-summary {
  padding: 1rem;
}

.latest-build-line-body {
  padding: 0 1rem 1rem;
}

.latest-build-download-button {
  flex: 0 0 auto;
  min-width: 8.25rem;
  justify-content: center;
}

.latest-build-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.latest-build-actions .secondary,
.latest-build-actions .primary {
  min-width: 7rem;
}

.game-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.game-card-header h3 {
  margin: 0;
}

.game-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0b1636;
  background: linear-gradient(135deg, #f7c948, #f79b00);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.65rem;
  color: #d8deff;
  font-size: 0.85rem;
}

.game-contract-meta {
  margin-top: 0.5rem;
  color: #aebce8;
  font-size: 0.82rem;
  line-height: 1.5;
}

.latest-build-helper-copy {
  margin-top: 0.35rem;
  color: #c8d2f1;
  font-size: 0.76rem;
}

.latest-build-download-status {
  margin-top: 0.7rem;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 193, 59, 0.08);
  border: 1px solid rgba(255, 193, 59, 0.22);
  color: #d8deff;
  font-size: 0.78rem;
  line-height: 1.45;
}

.latest-build-download-status.is-active {
  background: rgba(255, 193, 59, 0.14);
  border-color: rgba(255, 193, 59, 0.38);
  color: #f8fbff;
}

.latest-build-games-container {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(6, 17, 46, 0.68);
  border: 1px solid rgba(240, 198, 59, 0.18);
}

.latest-build-games-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  list-style: none;
  cursor: pointer;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(240, 198, 59, 0.12);
}

.latest-build-games-header::-webkit-details-marker {
  display: none;
}

.latest-build-games-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0c63b;
}

.latest-build-games-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-left: 0.35rem;
  border-left: 2px solid rgba(240, 198, 59, 0.14);
}

.game-primary-download {
  width: 100%;
  margin-top: 0.9rem;
}

.game-components {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.game-components-nested {
  margin-top: 0.6rem;
}

.game-release-section + .game-release-section {
  margin-top: 1rem;
}

.game-release-details {
  border: 1px solid rgba(240, 198, 59, 0.24);
  border-radius: 16px;
  padding: 0.9rem;
  background: rgba(7, 21, 58, 0.42);
}

.latest-build-game-section + .latest-build-game-section {
  margin-top: 0;
}

.latest-build-game-details {
  padding: 1rem;
  background: linear-gradient(180deg, rgba(12, 28, 70, 0.9), rgba(8, 20, 52, 0.96));
  border-color: rgba(240, 198, 59, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  margin-left: 0.75rem;
}

.latest-build-game-summary {
  padding-bottom: 0.15rem;
}

.game-release-details summary {
  list-style: none;
  cursor: pointer;
}

.game-release-details summary::-webkit-details-marker {
  display: none;
}

.game-release-details > summary {
  margin: -0.1rem;
  padding: 0.1rem;
}

.game-release-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.game-release-title {
  font-weight: 700;
  color: #f4f6ff;
}

.game-component-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(7, 21, 58, 0.75);
  border: 1px solid rgba(240, 198, 59, 0.18);
}

.game-component-row.has-selector {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.game-component-row.is-missing {
  background: rgba(42, 13, 13, 0.45);
  border-color: rgba(255, 120, 120, 0.18);
}

.game-component-copy {
  min-width: 0;
}

.game-component-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f0c63b;
}

.game-component-title {
  font-weight: 600;
  color: #f4f6ff;
  overflow-wrap: anywhere;
  word-break: normal;
}

.artifact-badge.missing {
  background: rgba(255, 120, 120, 0.18);
  color: #ffb4b4;
}

.game-extra-note {
  padding: 0.15rem 0.1rem 0;
}

.game-contract-groups {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.game-contract-group {
  padding: 0.85rem;
  border-radius: 14px;
  background: rgba(10, 26, 68, 0.72);
  border: 1px solid rgba(240, 198, 59, 0.14);
}

.game-contract-group-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-right: 1.4rem;
}

.builds-family-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}

.builds-family-selector input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: #f0c63b;
  outline: 1px solid rgba(240, 198, 59, 0.55);
  outline-offset: 2px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.builds-family-checkbox {
  box-shadow: 0 0 0 1px rgba(7, 21, 58, 0.55);
}

.builds-family-selector-hint {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #aebce8;
}

.builds-item-selector {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}

.builds-item-selector input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: #f0c63b;
  outline: 1px solid rgba(240, 198, 59, 0.45);
  outline-offset: 2px;
  border-radius: 3px;
  cursor: pointer;
}

.builds-item-checkbox {
  box-shadow: 0 0 0 1px rgba(7, 21, 58, 0.55);
}

.game-contract-group-head::-webkit-details-marker {
  display: none;
}

.game-contract-group-head::after {
  content: "";
  position: absolute;
  right: 0.1rem;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid rgba(240, 198, 59, 0.9);
  border-bottom: 2px solid rgba(240, 198, 59, 0.9);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease;
  pointer-events: none;
}

.game-contract-group[open] > .game-contract-group-head::after {
  transform: translateY(-35%) rotate(225deg);
}

.game-contract-group-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f0c63b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 1800px) {
  .games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .builds-grid {
    grid-template-columns: repeat(2, minmax(380px, 1fr));
  }
}

@media (max-width: 1320px) {
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builds-grid {
    grid-template-columns: 1fr;
  }

  .helper-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  main {
    padding: 0 1rem 2rem;
  }
  body:has(#games-app-shell) main {
    max-width: 100%;
    padding: 0 0.85rem 2rem;
  }
  .panel {
    padding: 1.35rem;
  }
  .page-header {
    padding-top: 2.75rem;
  }
  .login-card {
    padding: 2rem 1.5rem;
  }
  .auth-actions {
    position: static;
    justify-content: center;
    margin-top: 0.75rem;
  }
  .control-buttons {
    width: 100%;
    justify-content: flex-start;
  }
  .controls-row {
    align-items: flex-start;
  }
  .games-header-row,
  .game-card-header,
  .game-component-row,
  .game-contract-group-head {
    flex-direction: column;
    align-items: stretch;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }

  .builds-grid {
    grid-template-columns: 1fr;
  }

  .helper-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .helper-banner-cta {
    width: 100%;
  }
}
