/* Tool-Lifes — /sports app layer.
 * Loaded only on /sports/* pages, on top of the shared design system in style.css.
 * Locale-tuned type, depth and motion — readable without any of it. */

/* Fonts: self-hosted optional woff2 under /fonts/ (no render-blocking @import). */
@font-face {
  font-family: "TL Sora"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: local("Sora"), url("/fonts/sora-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "TL Source Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: local("Source Sans 3"), local("Source Sans Pro"), url("/fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.sports {
  --ink3: #475569;
  --lift: 0 1px 2px rgba(15, 23, 42, .05), 0 14px 34px -18px rgba(15, 23, 42, .28);
  --lift-hi: 0 22px 56px -22px rgba(15, 23, 42, .45), 0 2px 8px rgba(15, 23, 42, .08);
  --disp: "TL Sora", "Sora", "Segoe UI", "Helvetica Neue", sans-serif;
  --body: "TL Source Sans", "Source Sans 3", "Segoe UI", "Helvetica Neue",
    "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Sans", "Yu Gothic",
    "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --measure: 48em;
  --lh: 1.72;
  --tracking: -.011em;
  font-family: var(--body);
  line-height: var(--lh);
  letter-spacing: var(--tracking);
  background:
    radial-gradient(1200px 600px at 12% -8%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 55%),
    var(--bg);
}
.sports h1, .sports h2, .sports h3, .sports .brand, .sports .sh-stats b,
.sports .goat .rank, .sports .record .mark, .sports .sec-teaser .sc-n {
  font-family: var(--disp);
}
.sports .hint { color: var(--muted); font-size: .93rem; margin: -.2rem 0 1rem; max-width: 56em; }
.sports .section-intro, .sports main .wrap > section > p { max-width: var(--measure); }

/* ========== locale / script tuning ========== */
.sports.script-cjk {
  --lh: 1.82;
  --tracking: -.005em;
  --measure: 42em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.sports.script-cjk h1, .sports.script-cjk h2 { letter-spacing: -.02em; font-weight: 800; }
.sports.script-cjk .pill, .sports.script-cjk .s-chip { letter-spacing: 0; font-weight: 700; }
.sports.script-cjk .fact .k { letter-spacing: .04em; }

.sports.locale-ko { --body: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Source Sans 3", sans-serif; }
.sports.locale-ja {
  --lh: 1.88;
  --body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Noto Sans JP", "Source Sans 3", sans-serif;
}
.sports.locale-zh {
  --lh: 1.85;
  --body: "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", "Source Sans 3", sans-serif;
}
.sports.script-cyrl {
  --lh: 1.7;
  --measure: 46em;
  --body: "Source Sans 3", "Segoe UI", "PT Sans", "Roboto", sans-serif;
}
.sports.locale-de, .sports.locale-fr {
  --measure: 44em; /* long compounds / accents breathe better slightly narrower */
  hyphens: auto;
  -webkit-hyphens: auto;
}
.sports.locale-de { --tracking: -.008em; }
.sports.locale-es, .sports.locale-pt { --lh: 1.74; }
.sports.locale-ru { --lh: 1.68; }

/* ========== home hero counters ========== */
.shome-hero { position: relative; isolation: isolate; overflow: hidden; }
.shome-hero .sh-stats { display: flex; flex-wrap: wrap; gap: 10px 30px; margin-top: 26px; }
.sh-stats span { display: flex; align-items: baseline; gap: 8px; color: #c3d0e2; font-size: .86rem;
  letter-spacing: .04em; text-transform: uppercase; }
.sh-stats b { font-size: 1.75rem; font-weight: 900; color: #fff; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; }

/* floating accent orbs behind hero copy — CSS-only depth */
.sports .hero::after {
  content: ""; position: absolute; width: 42vmin; height: 42vmin; border-radius: 50%;
  right: -8%; top: 10%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at 35% 35%,
    color-mix(in srgb, var(--accent) 55%, #fff),
    color-mix(in srgb, var(--accent2) 40%, transparent) 55%,
    transparent 70%);
  filter: blur(2px); opacity: .45;
  animation: s-orb 14s ease-in-out infinite alternate;
}
.sports .hero > * { position: relative; z-index: 1; }
@keyframes s-orb {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6%, 8%, 0) scale(1.12); }
}

/* pointer-driven spotlight on heroes */
.sports .hero[data-spot] {
  --sx: 72%; --sy: 28%;
}
.sports .hero[data-spot]::before {
  background:
    radial-gradient(55% 50% at var(--sx) var(--sy),
      color-mix(in srgb, var(--accent) 42%, transparent), transparent 70%),
    radial-gradient(60% 60% at 78% 8%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%);
}

/* ========== featured strip ========== */
.s-featured { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin: 8px 0 4px; perspective: 1200px; }
.s-feat {
  position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 14px; box-shadow: var(--shadow); overflow: hidden;
  border-top: 4px solid var(--card-accent, var(--accent)); color: var(--ink);
  transform-style: preserve-3d; will-change: transform;
  transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .18s ease, box-shadow .35s ease;
}
a.s-feat:hover { text-decoration: none; border-color: var(--card-accent, var(--accent));
  box-shadow: var(--lift-hi); }
.s-feat .icon { font-size: 1.7rem; line-height: 1; transform: translateZ(28px);
  transition: transform .35s cubic-bezier(.22,1,.36,1); }
.s-feat:hover .icon { transform: translateZ(40px) scale(1.08); }
.s-feat h3 { margin: 0; font-size: 1.05rem; transform: translateZ(18px); }
.s-feat .go { color: var(--accent); font-weight: 700; font-size: .82rem; margin: 2px 0 0;
  transform: translateZ(12px); }

/* ========== browse toolbar ========== */
.s-browse { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--lift); margin: 0 0 22px;
  backdrop-filter: blur(8px); }
.s-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.s-search { flex: 1 1 220px; min-width: 0; }
.s-search input {
  font: inherit; font-size: .92rem; width: 100%; max-width: 360px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  padding: 9px 16px; color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.s-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.s-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.s-filters .s-chip {
  font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .2s cubic-bezier(.22,1,.36,1);
}
.s-filters .s-chip .n { font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--line); color: var(--ink2); border-radius: 999px; padding: 1px 7px; }
.s-filters .s-chip.on { background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  color: var(--ink); border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  transform: translateY(-1px) scale(1.02); }
.s-filters .s-chip.on .n { background: var(--accent); color: #fff; }
.s-filters .s-chip:hover { transform: translateY(-2px); }
.s-filters .s-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.s-empty { color: var(--muted); font-size: .95rem; padding: 28px 8px; text-align: center; display: none; }
.s-browse.is-empty .s-empty { display: block; }
.s-browse.is-empty .s-groups { display: none; }

/* ========== category groups ========== */
.s-group { margin: 0 0 8px; }
.s-group[hidden], .sport-card[hidden], .s-feat[hidden] { display: none !important; }
.sg-head { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 1.8rem 0 .85rem;
  padding-bottom: 8px; border-bottom: 2px solid var(--card-accent, var(--accent)); }
.sg-head .sg-emoji { font-size: 1.3rem; line-height: 1; }
.sg-head h3 { margin: 0; font-size: 1.05rem; letter-spacing: -.01em; }
.sg-head .sg-n { margin-left: auto; font-size: .78rem; font-weight: 800; color: var(--muted);
  font-variant-numeric: tabular-nums; letter-spacing: .04em; text-transform: uppercase; }

/* ========== sport cards — 3D stage ========== */
.sports .sport-card {
  position: relative; overflow: hidden; box-shadow: var(--lift);
  transform-style: preserve-3d; will-change: transform;
}
.sports .sport-card .icon {
  display: inline-block; transform: translateZ(24px);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.sports .sport-card:hover .icon { transform: translateZ(36px) scale(1.06); }
.sports .sport-card .sub { flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; transform: translateZ(10px); }
.sports .sport-card .go { margin-top: auto; transform: translateZ(14px); }
.sports .sport-card h3 { transform: translateZ(16px); }

/* ========== sticky section pills ========== */
.spills {
  position: sticky; top: 58px; z-index: 40;
  background: color-mix(in srgb, #0b1220 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  padding: 10px 0;
  box-shadow: 0 10px 28px -18px rgba(0, 0, 0, .45);
}
.spills .pills { margin-top: 0; max-width: var(--maxw); margin-left: auto; margin-right: auto; padding: 0 20px; }
.spills .pill { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); color: #e8eef6;
  transition: transform .18s ease, background .18s ease; }
.spills .pill:hover { background: rgba(255,255,255,.18); text-decoration: none; transform: translateY(-1px); }
.spills .pill.active { background: var(--accent); border-color: transparent; color: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, #fff 25%, transparent), 0 8px 20px -12px rgba(0,0,0,.55); }
@media (max-width: 640px) {
  .spills { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .spills .pills { flex-wrap: nowrap; width: max-content; padding-right: 28px; }
}

/* ========== section teasers ========== */
.sec-teaser { position: relative; padding-top: 28px; overflow: hidden; transform-style: preserve-3d; }
.sec-teaser .sc-n {
  position: absolute; top: 12px; right: 16px; font-size: 1.45rem; font-weight: 900;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--accent) 34%, var(--line));
  font-variant-numeric: tabular-nums; letter-spacing: -.04em;
  transform: translateZ(8px);
}
.sec-teaser .sub { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ========== overview facts ========== */
.sports .fact { box-shadow: var(--shadow); transition: transform .2s cubic-bezier(.22,1,.36,1), border-color .15s ease;
  transform-style: preserve-3d; }
.sports .fact:hover { transform: translateY(-3px) rotateX(2deg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--lift); }
.sports .fact .v { font-size: 1.02rem; line-height: 1.35; letter-spacing: -.01em; }
.sports .fact.compact .v { font-size: 1.28rem; line-height: 1.2; font-family: var(--disp); }
.sports .fact .k { font-weight: 700; letter-spacing: .03em; text-transform: uppercase; font-size: .72rem; }
.sports.script-cjk .fact .k { text-transform: none; letter-spacing: .02em; }

/* ========== overview jump rail ========== */
.s-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.s-jump a {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; color: var(--ink2); font-size: .86rem; font-weight: 700;
  box-shadow: var(--shadow); transition: transform .2s cubic-bezier(.22,1,.36,1), border-color .15s ease, color .15s ease;
}
.s-jump a:hover { text-decoration: none; transform: translateY(-2px) scale(1.02); border-color: var(--accent); color: var(--ink); }
.s-jump .sj-ico { font-size: 1rem; line-height: 1; }

/* ========== goat / records / podium depth ========== */
.sports .goat { transition: transform .2s ease, box-shadow .25s ease; transform-style: preserve-3d; align-items: flex-start; }
.sports .goat:hover { box-shadow: var(--lift); transform: translateY(-2px); }
.sports .goat.top1 { border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface)); }
.sports .goat .who h3 a { color: inherit; }
.sports .goat .who h3 a:hover { color: var(--accent); text-decoration: none; }
.sports .goat .rank { transform: translateZ(12px); }
.sports .goat-pic {
  width: 72px; height: 72px; object-fit: cover; border-radius: 14px; flex: 0 0 auto;
  box-shadow: var(--shadow); transform: translateZ(16px);
  background: var(--line);
}
.sports .athlete-hero { margin: 0 0 1.5rem; max-width: 28rem; }
.sports .athlete-hero img {
  width: 100%; height: auto; border-radius: 18px; display: block;
  box-shadow: var(--lift-hi); aspect-ratio: 1; object-fit: cover;
}
.sports .athlete-hero figcaption { color: var(--muted); font-size: .78rem; margin-top: .45rem; }

.sports .pod-pic {
  width: 96px; height: 96px; object-fit: cover; border-radius: 50%;
  display: block; margin: .35rem auto .5rem; box-shadow: var(--shadow);
  background: var(--line);
}
.sports .duel-pic {
  width: 140px; height: 140px; object-fit: cover; border-radius: 18px;
  display: block; margin: 0 auto .75rem; box-shadow: var(--lift);
  background: var(--line);
}
.sports .team-pic {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px;
  display: block; margin: 0 0 .85rem; background: var(--line);
}
.sports .team-hero, .sports .history-hero, .sports .sport-hero {
  margin: 0 0 1.5rem; max-width: 52rem;
}
.sports .team-hero img, .sports .history-hero img, .sports .sport-hero img {
  width: 100%; height: auto; max-height: 22rem; object-fit: cover;
  border-radius: 18px; display: block; box-shadow: var(--lift-hi);
  background: var(--line);
}
.sports .team-hero figcaption, .sports .history-hero figcaption, .sports .sport-hero figcaption {
  color: var(--muted); font-size: .78rem; margin-top: .45rem;
}

.sports .s-quiz-cta, .sports .s-quiz-hub-cta, .sports .s-quiz-card {
  border-top: 3px solid var(--card-accent, var(--accent));
}
.sports .s-quiz-hub-cta { display: block; padding: 1.1rem 1.25rem; text-decoration: none; color: inherit; }
.sports .quiz.sport-quiz {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.25rem 1.35rem; margin: .5rem 0 1.5rem;
}
.sports .quiz .qz-bar {
  height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 1rem;
}
.sports .quiz .qz-bar i {
  display: block; height: 100%; width: 0; background: var(--accent);
  transition: width .35s ease;
}
.sports .quiz .qz-count { color: var(--muted); font-size: .85rem; margin-bottom: .4rem; }
.sports .quiz .qz-q { font-size: 1.15rem; font-weight: 650; margin: 0 0 1rem; }
.sports .quiz .qz-opts { display: grid; gap: .55rem; }
.sports .quiz .qz-opts button {
  text-align: left; padding: .75rem 1rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg, var(--surface));
  cursor: pointer; font: inherit; color: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.sports .quiz .qz-opts button:hover:not(:disabled) { border-color: var(--accent); }
.sports .quiz .qz-opts button.ok { border-color: #2f9e44; background: color-mix(in srgb, #2f9e44 12%, transparent); }
.sports .quiz .qz-opts button.bad { border-color: #c92a2a; background: color-mix(in srgb, #c92a2a 10%, transparent); }
.sports .quiz .qz-score { font-size: 1.6rem; margin: .5rem 0 1rem; }
.sports .quiz .qz-nav { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }

.sports .podium { perspective: 1100px; }
.sports .pod {
  transform-style: preserve-3d;
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
}
.sports .pod:hover { transform: translateY(-6px) rotateX(4deg) scale(1.02); box-shadow: var(--lift-hi); }
.sports .pod .pmedal { display: inline-block; animation: s-bob 3.6s ease-in-out infinite; }
.sports .pod.p2 .pmedal { animation-delay: .4s; }
.sports .pod.p3 .pmedal { animation-delay: .8s; }
@keyframes s-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.sports .record { transition: transform .2s ease, box-shadow .25s ease; }
.sports .record:hover { box-shadow: var(--lift); transform: translateY(-2px); }

.sports .comp { border-left: 4px solid transparent; transition: border-color .15s ease, box-shadow .2s ease, transform .2s ease; }
.sports .comp:hover { border-left-color: var(--accent); box-shadow: var(--lift); transform: translateY(-1px); }

/* ========== comparison lab ========== */
.sports .lab {
  background:
    radial-gradient(520px 220px at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    var(--surface);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  transform-style: preserve-3d;
}
.sports .lab-chips .chip.on {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
.sports .lab-rank li:first-child {
  outline: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

/* ========== duel 3D stage ========== */
.sports .duel-head { perspective: 1000px; }
.sports .duelist {
  position: relative; overflow: hidden; transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .3s ease;
}
.sports .duelist:hover { transform: translateY(-4px) rotateY(var(--ry, 0deg)); box-shadow: var(--lift-hi); }
.sports .duelist.a { --ry: -2deg; }
.sports .duelist.b { --ry: 2deg; }
.sports .duelist::before {
  content: ""; position: absolute; inset: auto -20% -40% -20%; height: 70%;
  background: radial-gradient(50% 60% at 50% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  pointer-events: none;
}
.sports .duelist.b::before {
  background: radial-gradient(50% 60% at 50% 0%, color-mix(in srgb, var(--accent2) 18%, transparent), transparent 70%);
}
.sports .dvs {
  transform: translateZ(20px);
  text-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* cursor gleam on tilted surfaces (--gx/--gy from app.js tilt) */
.sports [data-tilt] { position: relative; overflow: hidden; }
.sports [data-tilt]::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px 220px at var(--gx, 50%) var(--gy, 40%),
    rgba(255, 255, 255, .16), transparent 60%);
  transition: opacity .25s ease; z-index: 2;
}
.sports [data-tilt].is-hot::after { opacity: 1; }

/* entrance for featured strip */
.sports .s-feat[data-reveal] { transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }

/* ========== reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  .sports .sport-card, .sports .fact, .sports .goat, .sports .record, .sports .comp,
  .s-feat, .s-jump a, .s-filters .s-chip, .sports .pod, .sports .duelist, .spills .pill {
    transition: none !important; animation: none !important; transform: none !important;
  }
  .sports .hero::after, .sports .pod .pmedal { animation: none !important; }
  .spills { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
