:root {
  --ink: #17142f;
  --muted: #68677a;
  --paper: #eef3ff;
  --line: #d9dcf1;
  --blue: #5a35e8;
  --blue2: #3d20b6;
  --lime: #daf34f;
  --orange: #ff7847;
  --shadow: 0 24px 70px rgba(52, 38, 128, .14);
}

body {
  background:
    radial-gradient(circle at 8% 5%, rgba(218, 243, 79, .34), transparent 23rem),
    radial-gradient(circle at 92% 15%, rgba(255, 120, 71, .18), transparent 25rem),
    var(--paper);
}

.topbar nav { display: flex; gap: 22px; }
.brand > span:first-child { position: relative; overflow: hidden; background: linear-gradient(145deg, #252830, #777c85); color: #fff; border: 1px solid #9ca0a8; box-shadow: inset 0 0 0 2px rgba(255,255,255,.13), 0 8px 18px rgba(20,20,28,.16); }
.brand > span:first-child::after { content: "23"; position: absolute; right: 3px; bottom: 1px; color: #d9dce2; font-size: 8px; letter-spacing: 0; }
.brand .brand-copy { display: flex; align-items: baseline; gap: 6px; width: auto; height: auto; background: none; color: var(--ink); border-radius: 0; font-size: 16px; letter-spacing: -.02em; }
.brand .brand-copy small { color: #747984; font-size: 11px; letter-spacing: .04em; }
.intro { align-items: center; }
.intro-copy { max-width: 720px; }
.intro h1 em { color: var(--blue); font-style: normal; }
.intro-copy > p:not(.kicker) { max-width: 520px; }
.quick-trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.quick-trust span { background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 13px; font-weight: 800; padding: 7px 12px; }

.sports-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 260px; transform: rotate(3deg); }
.sports-mark span { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 28px; background: #fff; border: 1px solid var(--line); box-shadow: 0 14px 35px rgba(52, 38, 128, .12); font-size: 57px; }
.sports-mark span:nth-child(2) { background: #fff0e8; transform: translateY(14px); }
.sports-mark span:nth-child(3) { background: #f0eaff; }
.sports-mark span:nth-child(4) { background: #f4ffd2; transform: translateY(14px); }

.workspace { box-shadow: var(--shadow); }
.play-modes { display: grid; gap: 18px; margin-bottom: 24px; padding: 18px; border-radius: 16px; background: #f5f3ff; border: 1px solid var(--line); }
.play-modes fieldset { padding: 0; border: 0; margin: 0; }
.play-modes legend { margin-bottom: 8px; font-size: 14px; font-weight: 850; }
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-row.three { grid-template-columns: repeat(3, 1fr); }
.mode { min-height: 45px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.mode span { margin-right: 4px; }
.mode:hover { border-color: var(--blue); }
.mode.selected { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 7px 15px rgba(90, 53, 232, .18); }
.results { background: linear-gradient(145deg, #f4f1ff, #eef6ff); }
.lead-result { background: linear-gradient(135deg, var(--ink), #302178); }
.comparison div { display: grid; grid-template-columns: 1fr auto; }
.comparison i { grid-column: 1 / -1; display: block; height: 6px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #dfe3ed; }
.comparison i b { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width .25s ease; }
.comparison i b.loss { background: #da5662; }
.primary { box-shadow: 0 10px 24px rgba(90, 53, 232, .24); }

.explain { display: grid; grid-template-columns: 280px 1fr; align-items: center; gap: 60px; }
.ball-stack { position: relative; height: 280px; }
.ball-stack span { position: absolute; display: grid; place-items: center; width: 150px; height: 150px; border-radius: 38px; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(52, 38, 128, .13); font-size: 78px; }
.ball-stack span:nth-child(1) { left: 0; top: 0; background: #fff0e8; transform: rotate(-8deg); }
.ball-stack span:nth-child(2) { right: 0; top: 54px; background: #f4ffd2; transform: rotate(7deg); }
.ball-stack span:nth-child(3) { left: 28px; bottom: 0; background: #eeeaff; transform: rotate(4deg); }
.rules-wrap h2 { font-size: clamp(36px, 5vw, 60px); }
.rules { margin-top: 28px; }
.rules article { display: flex; align-items: flex-start; gap: 15px; }
.rules article b { background: var(--lime); color: var(--ink); border-radius: 8px; padding: 5px 7px; }
.rules h3 { margin: 0 0 4px; }
.book-shop { padding: 72px 0 30px; }
.shop-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.shop-heading h2 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1; letter-spacing: -.045em; }
.shop-heading > p { max-width: 340px; margin: 0; color: var(--muted); }
.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.book-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 38px rgba(36, 31, 76, .08); }
.book-cover { position: relative; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1.45; margin: 14px; padding: 18px; overflow: hidden; border-radius: 13px; color: #fff; background: #383c44; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.book-cover::after { content: ""; position: absolute; width: 170px; height: 170px; right: -60px; bottom: -90px; border: 24px solid rgba(255,255,255,.14); border-radius: 50%; }
.book-cover span { align-self: flex-start; padding: 4px 7px; border: 1px solid rgba(255,255,255,.55); border-radius: 6px; font-size: 11px; font-weight: 900; }
.book-cover b { position: relative; z-index: 1; font-size: 24px; line-height: 1; letter-spacing: -.035em; }
.book-cover small { position: relative; z-index: 1; font-weight: 800; letter-spacing: .12em; }
.cover-multi { background: linear-gradient(145deg, #252830, #777d87); }
.cover-psa { background: linear-gradient(145deg, #34363c, #121318); }
.cover-inventory { background: linear-gradient(145deg, #666b74, #25272c); }
.book-info { padding: 8px 20px 22px; }
.book-type { color: #777c86; font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.book-info h3 { min-height: 52px; margin: 8px 0; font-size: 20px; line-height: 1.25; }
.book-info p { min-height: 48px; margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.book-info a,.link-hub > a { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; color: #fff; background: #262a31; border-radius: 10px; padding: 11px 13px; text-decoration: none; font-weight: 850; }
.book-info a:hover,.link-hub > a:hover { background: var(--blue); }
.free-tool { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; margin-top: 38px; padding: 26px 28px; border-radius: 20px; background: #262a31; color: #fff; box-shadow: 0 22px 55px rgba(24, 25, 31, .18); }
.sheet-icon { display: grid; place-items: center; width: 58px; height: 68px; border-radius: 8px 8px 14px 8px; background: #fff; color: #333842; font-size: 28px; font-weight: 900; box-shadow: inset -7px 0 #d8dbe1; }
.free-tool .step { color: #d5d8de; margin-bottom: 3px; }
.free-tool h2 { margin: 0; font-size: 26px; }
.free-tool p:not(.step) { margin: 4px 0 0; color: #c9ccd2; }
.download-tool { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 12px; background: #fff; color: #24272d; text-decoration: none; font-weight: 850; white-space: nowrap; }
.download-tool:hover { background: var(--lime); }
.link-hub { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; margin-top: 18px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.link-balls { display: flex; }
.link-balls span { display: grid; place-items: center; width: 52px; height: 52px; margin-left: -8px; border-radius: 50%; background: #f1f2f6; box-shadow: 0 5px 14px rgba(30,31,40,.1); font-size: 28px; }
.link-balls span:first-child { margin-left: 0; }
.link-hub h2 { margin: 0; font-size: 27px; }
.link-hub p:not(.step) { margin: 4px 0 0; color: var(--muted); }
.guide-strip { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 36px; padding: 24px 28px; border-radius: 20px; color: #fff; background: linear-gradient(115deg, var(--blue), #8a35cf 60%, var(--orange)); }
.guide-strip > div { display: flex; align-items: center; gap: 16px; }
.guide-strip > div > span { font-size: 42px; }
.guide-strip .step { color: var(--lime); margin-bottom: 3px; }
.guide-strip h2 { margin: 0; font-size: 24px; }
.guide-strip > p { max-width: 360px; margin: 0; color: #f3efff; }
body[data-category="tcg"] .lead-result { background: linear-gradient(135deg, #24123f, #7b258f); }
body[data-category="tcg"] .sports-mark span:nth-child(2) { box-shadow: 0 0 35px rgba(255, 120, 71, .35); }

@media (max-width: 850px) {
  .sports-mark { margin: 34px auto 8px; min-width: 0; width: min(100%, 260px); }
  .explain { grid-template-columns: 1fr; gap: 34px; }
  .ball-stack { width: 280px; margin: auto; }
  .guide-strip { display: block; }
  .guide-strip > p { margin-top: 16px; }
  .free-tool { grid-template-columns: auto 1fr; }
  .download-tool { grid-column: 1 / -1; }
  .book-grid { grid-template-columns: 1fr; }
  .book-card { display: grid; grid-template-columns: minmax(180px, .8fr) 1fr; }
  .book-cover { aspect-ratio: .78; }
  .book-info { padding-top: 24px; }
  .link-hub { grid-template-columns: auto 1fr; }
  .link-hub > a { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .sports-mark { grid-template-columns: repeat(4, 1fr); gap: 7px; transform: none; }
  .sports-mark span { width: auto; height: 68px; border-radius: 18px; font-size: 34px; }
  .sports-mark span:nth-child(2), .sports-mark span:nth-child(4) { transform: none; }
  .ball-stack { transform: scale(.86); transform-origin: center; margin-block: -20px; }
  .mode-row.three { grid-template-columns: 1fr; }
  .guide-strip { padding: 22px 18px; }
  .topbar nav .quiet-link:first-child { display: none; }
  .topbar nav .quiet-link:last-child { display: none; }
  .free-tool { padding: 22px 18px; }
  .shop-heading { display: block; }
  .shop-heading > p { margin-top: 14px; }
  .book-card { display: block; }
  .book-cover { aspect-ratio: 1.35; }
  .book-info h3,.book-info p { min-height: 0; }
  .link-hub { grid-template-columns: 1fr; text-align: center; }
  .link-balls { justify-content: center; }
  .link-hub > a { grid-column: auto; }
}
