.platform-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--fm-line);
  background: var(--fm-surface);
}

.chip-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chip-label { grid-column: 1 / -1; color: var(--fm-muted); font-size: var(--fm-size-small); }

.chip {
  min-height: 44px;
  padding: 6px 4px;
  border: 1px solid var(--fm-line);
  border-radius: var(--fm-radius);
  background: var(--fm-surface);
  color: var(--fm-ink);
  font-size: var(--fm-size-small);
  cursor: pointer;
}

.platform-tab {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: 4px 6px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 4px 10px;
  border: 0;
  background: transparent;
  color: var(--fm-muted);
  font-size: var(--fm-size-small);
  line-height: 1.3;
  cursor: pointer;
}

.platform-tab img {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: grayscale(1);
}

.platform-tab:hover:not(:disabled) { background: var(--fm-tint); }

.platform-tab.is-selected { color: var(--fm-ink); font-weight: 750; }
.platform-tab.is-selected img { filter: grayscale(1) contrast(1.25); }

.platform-tab.is-selected::after {
  position: absolute;
  inset: auto 10px -1px;
  height: 3px;
  border-bottom: 1px solid var(--fm-accent);
  background: var(--fm-brand);
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
  content: "";
}

.chip:hover:not(:disabled), .chip.is-selected {
  border-color: var(--fm-accent);
  background: var(--fm-tint);
  color: var(--fm-accent);
}

.chip.is-selected { font-weight: 750; }

.download-btn img { flex: 0 0 auto; width: 20px; height: 20px; object-fit: contain; filter: brightness(0); }

.platform-tab:disabled, .chip:disabled, .download-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.download-btn.is-probing { cursor: progress; }
