.alpha-tms-page {
  background: var(--pc-bg, #f8fafc);
}

.alpha-tms-page section {
  padding: 0;
}

.atm-page {
  padding: 8.5rem 1rem 4rem;
  min-height: 75vh;
}

.atm-shell {
  max-width: 980px;
  margin: 0 auto;
}

.atm-hero {
  text-align: center;
  margin-bottom: 1.35rem;
}

.alpha-tms-page:has(.atm-detail--pokemon) .atm-hero {
  margin-bottom: 0.75rem;
}

.alpha-tms-page:has(.atm-detail--pokemon) .atm-hero h1 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin-bottom: 0;
}

.atm-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.atm-kicker a {
  color: var(--pc-brand, #4aa3df);
  text-decoration: none;
}

.atm-kicker a:hover {
  text-decoration: underline;
}

.atm-hero h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--pc-text, #111827);
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.atm-subtitle {
  color: var(--pc-text-secondary, #4b5563);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.55;
}

.atm-subtitle strong {
  color: var(--pc-text, #111827);
  font-weight: 600;
}

.atm-card {
  background: var(--pc-surface, #fff);
  border: 1px solid var(--pc-border, #e5e7eb);
  border-radius: 16px;
  box-shadow: var(--pc-shadow, 0 8px 24px rgba(15, 23, 42, 0.05));
  overflow: hidden;
}

.atm-search {
  padding: 1.1rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--pc-border, #f1f5f9);
}

.atm-search-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.atm-input-wrap {
  position: relative;
  flex: 1;
}

.atm-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pc-muted, #94a3b8);
  pointer-events: none;
}

.atm-input {
  width: 100%;
  border: 1px solid var(--pc-input-border, #d1d5db);
  background: var(--pc-input-bg, #fff);
  color: var(--pc-text, #0f172a);
  border-radius: 10px;
  padding: 0.7rem 0.9rem 0.7rem 2.35rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.atm-input:focus {
  border-color: var(--pc-brand, #4aa3df);
  box-shadow: 0 0 0 3px rgba(74, 163, 223, 0.2);
}

.atm-btn-primary,
a.atm-btn-primary,
a.atm-btn-action.atm-btn-primary {
  border: none;
  background: var(--pc-brand, #4aa3df);
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease;
}

.atm-btn-primary:hover,
a.atm-btn-primary:hover,
a.atm-btn-action.atm-btn-primary:hover {
  background: var(--pc-brand-hover, #357abd);
  color: #ffffff !important;
}

.atm-btn-primary i,
a.atm-btn-primary i {
  color: #ffffff !important;
}

.atm-suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  background: var(--pc-surface, #fff);
  border: 1px solid var(--pc-border, #e5e7eb);
  border-radius: 12px;
  box-shadow: var(--pc-shadow, 0 12px 28px rgba(15, 23, 42, 0.12));
  max-height: 320px;
  overflow: auto;
}

.atm-suggestion {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--pc-text, #0f172a);
  text-align: left;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}

.atm-suggestion:hover,
.atm-suggestion.is-active {
  background: var(--pc-bg-soft, #f1f5f9);
}

.atm-suggestion-kind {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pc-muted, #64748b);
  min-width: 3.2rem;
}

.atm-suggestion-title {
  font-weight: 600;
}

.atm-suggestion-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--pc-muted, #64748b);
}

.atm-mode-tabs {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.atm-tab {
  border: 1px solid var(--pc-border, #e5e7eb);
  background: var(--pc-bg-soft, #f8fafc);
  color: var(--pc-text-secondary, #475569);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.atm-tab.is-active {
  background: rgba(74, 163, 223, 0.15);
  border-color: rgba(74, 163, 223, 0.45);
  color: var(--pc-brand, #4aa3df);
}

.atm-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--pc-border, #f1f5f9);
  color: var(--pc-muted, #64748b);
  font-size: 0.88rem;
}

.atm-stats strong {
  color: var(--pc-text, #0f172a);
  font-weight: 700;
}

.atm-stats-sep {
  opacity: 0.5;
}

.atm-empty-banner,
.atm-empty {
  margin: 1rem 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--pc-bg-soft, #f8fafc);
  border: 1px solid var(--pc-border, #e5e7eb);
  color: var(--pc-text-secondary, #475569);
}

.atm-detail {
  padding: 1.15rem 1.2rem 1.4rem;
}

.atm-detail-header {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}

.atm-detail-sprite {
  image-rendering: pixelated;
  flex-shrink: 0;
}

.atm-detail-tm,
.atm-tm-icon {
  image-rendering: pixelated;
  object-fit: contain;
  flex-shrink: 0;
}

.atm-detail-tm {
  width: 56px;
  height: 56px;
}

.atm-tm-icon {
  width: 36px;
  height: 36px;
}

.atm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.atm-btn-secondary,
a.atm-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--pc-border-strong, #cbd5e1);
  background: var(--pc-surface, #fff);
  color: var(--pc-text, #0f172a);
  font-weight: 600;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.atm-btn-secondary:hover,
a.atm-btn-secondary:hover {
  border-color: var(--pc-brand, #4aa3df);
  background: var(--pc-bg-soft, #f8fafc);
  color: var(--pc-text, #0f172a);
  text-decoration: none;
}

a.atm-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.9rem;
  color: #ffffff !important;
}

a.atm-btn-action:hover {
  color: #ffffff !important;
  text-decoration: none;
}

.atm-card--compact .atm-search {
  padding-bottom: 0.65rem;
}

.atm-card--compact .atm-mode-tabs {
  margin-top: 0.55rem;
}

.atm-detail--pokemon {
  padding-top: 0.85rem;
  padding-bottom: 1rem;
}

.atm-detail-header--pokemon {
  margin-bottom: 0.75rem;
  align-items: center;
}

.atm-detail-header--pokemon .atm-detail-sprite {
  width: 56px;
  height: 56px;
}

.atm-detail-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin-bottom: 0.25rem;
}

.atm-detail-topline .atm-detail-name {
  margin: 0;
}

.atm-detail-topline .atm-chip-meta--row {
  margin-top: 0;
}

.atm-detail--pokemon .atm-detail-desc {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
}

.atm-detail--pokemon .atm-actions {
  margin-top: 0;
}

.atm-seo-heading--tight {
  margin: 0 0 0.55rem;
}

.atm-related--tight {
  margin-top: 0.85rem;
}

.atm-detail-name {
  font-family: "Montserrat", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--pc-text, #0f172a);
}

.atm-detail-desc {
  margin: 0;
  color: var(--pc-text-secondary, #4b5563);
  line-height: 1.55;
}

.atm-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--atm-type) 22%, transparent);
  color: var(--pc-text, #0f172a);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.atm-section-title,
.atm-seo-heading {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.55rem;
  color: var(--pc-text, #0f172a);
}

.atm-recipe {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--pc-bg-soft, #f8fafc);
  border: 1px solid var(--pc-border, #e5e7eb);
}

.atm-recipe-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.atm-recipe-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--pc-surface, #fff);
  border: 1px solid var(--pc-border, #e5e7eb);
  font-size: 0.9rem;
  color: var(--pc-text, #0f172a);
}

.atm-recipe-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.atm-recipe-count {
  font-weight: 700;
  color: var(--pc-muted, #64748b);
}

.atm-recipe-note {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--pc-muted, #64748b);
}

.atm-seo-intro {
  margin-bottom: 0.85rem;
}

.atm-seo-intro p,
.atm-explain p {
  color: var(--pc-text-secondary, #4b5563);
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

.atm-browse {
  padding: 0.85rem 1.15rem 1.25rem;
}

.atm-browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.atm-filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pc-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.atm-select {
  border: 1px solid var(--pc-input-border, #d1d5db);
  background: var(--pc-input-bg, #fff);
  color: var(--pc-text, #0f172a);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font-size: 0.9rem;
}

.atm-browse-hint {
  margin: 0;
  flex: 1 1 220px;
  font-size: 0.86rem;
  color: var(--pc-muted, #64748b);
}

.atm-grid {
  display: grid;
  gap: 0.55rem;
}

.atm-grid--tms {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.atm-grid--pokemon {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.atm-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--pc-border, #e5e7eb);
  background: var(--pc-surface, #fff);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.atm-chip:hover {
  border-color: rgba(74, 163, 223, 0.55);
  box-shadow: var(--pc-shadow-soft, 0 4px 14px rgba(15, 23, 42, 0.05));
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.atm-chip.is-hidden {
  display: none;
}

.atm-chip-img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.atm-type-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--atm-type);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--atm-type) 25%, transparent);
}

.atm-chip-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.atm-chip-title {
  font-weight: 650;
  color: var(--pc-text, #0f172a);
  line-height: 1.25;
}

.atm-chip-meta {
  font-size: 0.78rem;
  color: var(--pc-muted, #64748b);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  text-transform: capitalize;
}

.atm-chip-meta--row {
  margin-top: 0.45rem;
}

.atm-mini-type {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--atm-type) 22%, transparent);
  color: var(--pc-text, #0f172a);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.atm-dex {
  font-size: 0.78rem;
  color: var(--pc-muted, #64748b);
  font-weight: 600;
}

.atm-related {
  margin: 1.1rem 0 0;
  font-size: 0.92rem;
  color: var(--pc-text-secondary, #4b5563);
}

.atm-related a {
  color: var(--pc-brand, #4aa3df);
  font-weight: 600;
  text-decoration: none;
}

.atm-related a:hover {
  text-decoration: underline;
}

.atm-explain {
  padding: 0 1.2rem 1.35rem;
  border-top: 1px solid var(--pc-border, #f1f5f9);
  padding-top: 1.15rem;
}

.atm-faq {
  margin-top: 1.5rem;
}

.atm-faq h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--pc-text, #0f172a);
}

.atm-faq-item {
  background: var(--pc-surface, #fff);
  border: 1px solid var(--pc-border, #e5e7eb);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
}

.atm-faq-item summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--pc-text, #0f172a);
}

.atm-faq-item p {
  margin: 0.65rem 0 0;
  color: var(--pc-text-secondary, #4b5563);
  line-height: 1.55;
}

@media (max-width: 640px) {
  .atm-page {
    padding-top: 7.25rem;
  }

  .atm-search-row {
    flex-direction: column;
  }

  .atm-btn-primary {
    width: 100%;
  }

  .atm-detail-header {
    flex-direction: column;
  }

  .atm-actions {
    flex-direction: column;
  }

  .atm-actions .atm-btn-primary,
  .atm-actions .atm-btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
