/* The Shop (U-1121-recruit-pack-shop): the Recruit Classes page. From the U-1118 pack gallery v2 mockup on the real
   tokens and the colour law (Styleguide.md): neutrals only. The buy buttons are the neutral plate (they go to the
   products page; nothing here saves or advances), the letter grades keep their tier colours (data), and every
   headshot sits on the recruit portrait neutral (--portrait-recruit-glow / --portrait-recruit-base). */

.shop-page {
  background: var(--bg);
  color: var(--text-87);
  font-family: var(--font-body);
}

.sp {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-24) 48px;
  line-height: 1.5;
}
.sp h1, .sp h2, .sp h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-2);
  text-transform: uppercase;
  color: var(--text-100);
  margin: 0;
}
:where(.sp) p { margin: 0; }

/* hero: the approved title copy */
.sp-hero { text-align: center; padding: 48px 0 var(--space-8); }
.sp-hero h1 { font-size: 64px; line-height: 1; }
.sp-sub { margin: var(--space-14) auto 0; max-width: 64ch; font-size: 17px; color: var(--text-87); }
.sp-bonus { margin: var(--space-10) auto 0; max-width: 80ch; font-size: 17px; font-weight: var(--fw-bold); color: var(--text-100); }

/* one section per pack */
.sp-pack { margin-top: 40px; padding-top: var(--space-24); border-top: 1px solid var(--line); }
.sp-pack-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-24); margin-bottom: var(--space-14); }
.sp-pack-head h2 { font-size: 30px; line-height: 1; }
.sp-pack-sub { margin-top: var(--space-6); font-size: 13px; color: var(--text-60); }
.sp-pack-tag { display: block; margin-top: var(--space-6); font-size: 10.5px; font-weight: var(--fw-bold); letter-spacing: var(--tracking-12); text-transform: uppercase; color: var(--text-87); }
/* U-1123-recruit-classes-page-polish: the class description under the header (one line: bold title, first sentence,
   See full summary), then the bar (the hint left, the count and arrows right), then one row of 6 cards */
.sp-class { max-width: 110ch; margin: 0 0 var(--space-12); }
.sp-class-t { font-weight: var(--fw-bold); color: var(--text-100); }
.sp-class-d { font-size: 15px; line-height: 1.55; color: var(--text-87); }
.sp-more { padding: 0; border: 0; background: none; font: inherit; font-weight: var(--fw-semibold); letter-spacing: normal; text-transform: none;
  color: var(--text-100); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sp-more:hover { color: var(--white); }
/* button-font.css (injected by authGuard) sets every button's type with !important; an id beats its :not() chain */
#sp-packs .sp-more { font-family: var(--font-body) !important; font-size: 15px !important; font-weight: var(--fw-semibold) !important; letter-spacing: normal !important; }
.sp-more:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; border-radius: 2px; }
.sp-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-14); margin: 0 0 var(--space-10); min-height: 32px; }
.sp-hint { margin: 0; font-size: 13px; color: var(--text-60); }
.sp-nav { display: flex; align-items: center; gap: var(--space-8); flex: none; }
.sp-count { margin-right: var(--space-4); font-size: 13px; color: var(--text-60); font-variant-numeric: tabular-nums; }
/* neutral round buttons (they move the row; nothing saves) */
#sp-packs .sp-arrow { width: 32px; height: 32px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); background: var(--white-5); color: var(--text-100); cursor: pointer; }
#sp-packs .sp-arrow:hover:not(:disabled) { background: var(--white-10); border-color: var(--white-28); }
#sp-packs .sp-arrow:disabled { opacity: .35; cursor: default; }
#sp-packs .sp-arrow:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.sp-buy { flex: none; min-width: 150px; text-decoration: none; }
/* U-1122 item 8 (Jamie 18:24): an owner sees a plain neutral label in the button's place, never a link or a button. */
.sp-owned { flex: none; min-width: 150px; padding-bottom: var(--space-6); text-align: right; font-size: var(--fs-13); font-weight: var(--fw-semibold); color: var(--text-60); }

/* the cards: one row, six showing at both widths, paged by the arrows or a swipe (U-1123 item 6) */
.sp-grid { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * var(--space-14)) / 6); gap: var(--space-14);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; }
.sp-grid::-webkit-scrollbar { display: none; }
.sp-grid > .sp-card { scroll-snap-align: start; }
.sp-card {
  display: flex; flex-direction: column; align-items: stretch;
  margin: 0; padding: 0; border: 0; text-align: left; cursor: pointer;
  border-radius: 12px; overflow: hidden;
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line);
  color: inherit; font: inherit;
  transition: box-shadow var(--dur-hover, .15s) ease;
}
.sp-card:hover { box-shadow: inset 0 0 0 1px var(--white-28); }
.sp-card:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.sp-face { aspect-ratio: 1 / 1; }
.sp-face img, .sp-dlg-face img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
/* a <button>: the site's button type (display caps) is reset to the body type for the caption */
.sp-cap { display: flex; flex-direction: column; gap: 3px; padding: var(--space-10) var(--space-12) var(--space-12); min-width: 0;
  font-family: var(--font-body); letter-spacing: normal; text-transform: none; }
.sp-name { font-size: 14px; color: var(--text-100); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-meta { font-size: 12px; color: var(--text-60); }
.sp-grade {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-6);
  margin-top: var(--space-4); padding-top: 7px; border-top: 1px solid var(--line);
}
.sp-yr { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-60); }
.sp-grade .rtl { font: var(--fw-bold) 17px/1 var(--font-display); letter-spacing: .02em; }

/* the recruit portrait neutral: a slate a step above the card, with a soft light behind the head */
.sp-pbg {
  position: relative;
  background: radial-gradient(ellipse 78% 66% at 50% 36%, var(--portrait-recruit-glow) 0%, var(--portrait-recruit-base) 76%);
}

/* the scouting report */
.sp-dlg {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  box-sizing: border-box;
  padding: 0;
  background: var(--surface-2);
  color: var(--text-87);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 18px 44px var(--scrim);
}
.sp-dlg::backdrop { background: var(--scrim); }
.sp-dlg-in { padding: var(--space-24); }
.sp-dlg-top { display: flex; gap: var(--space-18); align-items: flex-end; }
.sp-dlg-face { flex: none; width: 160px; height: 160px; border-radius: 12px; overflow: hidden; }
.sp-dlg-id { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; flex: 1; }
.sp-dlg-eb { font-size: 12px; font-weight: var(--fw-bold); letter-spacing: var(--tracking-12); text-transform: uppercase; color: var(--text-60); }
.sp-dlg h2 { font-family: var(--font-display); font-size: 32px; line-height: 1; letter-spacing: var(--tracking-2); text-transform: uppercase; color: var(--text-100); margin: 0 32px 0 0; }
.sp-dlg .sp-grade { max-width: 220px; }
.sp-rep { margin-top: var(--space-18); padding-top: var(--space-14); border-top: 1px solid var(--line); }
.sp-rep h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: var(--tracking-2); text-transform: uppercase; color: var(--text-100); margin: 0 0 var(--space-6); }
.sp-rep p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-87); }
.sp-soon { margin-top: var(--space-18); padding-top: var(--space-14); border-top: 1px solid var(--line); font-size: 15px; color: var(--text-60); }
.sp-tags { display: flex; flex-wrap: wrap; gap: var(--space-6); margin: var(--space-12) 0 0; padding: 0; list-style: none; }
.sp-tags li { padding: 3px var(--space-10); border-radius: 999px; background: var(--white-5); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 12px; color: var(--text-87); }
.sp-dlg-x {
  position: absolute; top: var(--space-12); right: var(--space-12);
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0;
  background: transparent; color: var(--text-60); cursor: pointer;
}
.sp-dlg-x:hover { color: var(--text-100); background: var(--white-5); }
.sp-dlg-x:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

@media (min-width: 1600px) {
  .sp { max-width: 1560px; }
}

/* U-1124-recruit-classes-29-and-end-tile (Jamie 2026-11-24, option B): the closing tile where player 30 would be.
   Card-sized and snapped like a card; three faded recruit silhouettes on the recruit neutral, the display "+N", a
   small-caps label, one line, and the class's buy button (or the owned label / Upgrade, as the header). Neutrals only. */
.sp-grid > .sp-end { scroll-snap-align: start; }
.sp-end {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6);
  padding: var(--space-18) var(--space-14); border-radius: 12px; text-align: center;
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line);
}
.sp-end-faces { display: flex; justify-content: center; margin-bottom: var(--space-6); opacity: .55; }
.sp-end-face {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none;
  box-shadow: 0 0 0 2px var(--surface-1); color: var(--white-10);
}
.sp-end-face + .sp-end-face { margin-left: -16px; }
.sp-end-face svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.sp-end-n { font: var(--fw-bold) 52px/1 var(--font-display); letter-spacing: var(--tracking-2); color: var(--text-100); font-variant-numeric: tabular-nums; }
.sp-end-l { font-size: 12px; font-weight: var(--fw-semibold); letter-spacing: .08em; text-transform: uppercase; color: var(--text-60); }
.sp-end-b { max-width: 24ch; margin-top: var(--space-4); font-size: 13px; line-height: 1.45; color: var(--text-87); }
.sp-end .sp-buy { box-sizing: border-box; min-width: 0; width: 100%; max-width: 180px; margin-top: var(--space-12); }
/* the tile clips nothing out of its card: its row must end where the last slot does */
.sp-end { box-sizing: border-box; min-width: 0; overflow: hidden; }
.sp-end .sp-owned { min-width: 0; margin-top: var(--space-12); padding: 0; text-align: center; }
