/* FickleBall. Grouped layout, system font, no framework. */

:root,
[data-theme="light"]
{
  color-scheme: light;
  --bg: #f2f2f7;
  --card: #ffffff;
  --ink: #1c1c1e;
  --secondary: #6e6e73;
  --tertiary: #8e8e93;
  --separator: rgba(60, 60, 67, 0.12);
  --blue: #007aff;
  --green: #248a3d;
  --amber: #e6a100;
  --red: #d70015;
  --orange: #c93400;
  --chip: #e5e5ea;
  --hover: #e5e5ea;
  --on-result: #ffffff;
  --radius: 12px;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 3px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"]
{
  color-scheme: dark;
  --bg: #000000;
  --card: #1c1c1e;
  --ink: #f5f5f7;
  --secondary: #98989d;
  --tertiary: #636366;
  --separator: rgba(255, 255, 255, 0.12);
  --blue: #0a84ff;
  --green: #30d158;
  --amber: #ffb340;
  --red: #ff453a;
  --orange: #ff9f0a;
  --chip: #2c2c2e;
  --hover: #2c2c2e;
  --on-result: #ffffff;
  --card-shadow: 0 0 0 0 transparent;
}

*
{
  box-sizing: border-box;
}

body
{
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.site-bar
{
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  box-shadow: 0 0.5px 0 var(--separator);
}

.site-bar__inner
{
  max-width: 880px;
  margin: 0 auto;
  padding: 1rem 1.25rem 0.75rem;
}

.site-header
{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.site-header__top
{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__actions
{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: none;
}

.account
{
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  color: var(--secondary);
  font-size: 0.95rem;
}

.account .link-button
{
  margin-top: 0;
}

.icon
{
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.icon-button
{
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 0 0 0.5px var(--separator);
}

.icon-button:hover
{
  background: var(--hover);
}

.site-header h1
{
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 2.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.site-title__ball
{
  font-size: 0.85em;
  line-height: 1;
}

.header-club
{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  min-width: 0;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.header-club__name
{
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.header-club__label
{
  color: var(--secondary);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
}

.header-record
{
  overflow-x: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.header-record table
{
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
}

.header-record td
{
  padding: 0.45rem 0.55rem;
  text-align: center;
  border-right: 0.5px solid var(--separator);
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.header-record td:last-child
{
  border-right: none;
}

.header-record__label
{
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.3rem;
}

.tabs
{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.2rem;
  margin-top: 0.85rem;
  padding: 0.22rem;
  background: var(--chip);
  border-radius: 12px;
}

.tabs__button
{
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--secondary);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.4rem;
}

.tabs__button[aria-selected="true"]
{
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.league-season
{
  display: block;
  margin: 0 0 0.75rem;
}

.league-season > span
{
  display: block;
  margin: 0 0 0.4rem 0.2rem;
  color: var(--secondary);
  font-size: 0.8rem;
}

.league-table-wrap
{
  overflow-x: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.league-table
{
  display: block;
  width: 100%;
  min-width: 46rem;
}

.league-table thead,
.league-table tbody
{
  display: block;
}

.league-table tr
{
  display: grid;
  grid-template-columns: 4.6rem minmax(7.5rem, 1.5fr) repeat(8, minmax(3.1rem, 1fr));
  align-items: center;
  position: relative;
}

.league-table th,
.league-table td
{
  padding: 0.55rem 0.45rem;
  text-align: center;
  border-bottom: 0.5px solid var(--separator);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.league-table th
{
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 600;
}

.league-table td
{
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--card);
}

.league-table tr:last-child td
{
  border-bottom: none;
}

.league-table tr.is-me td
{
  background: var(--chip);
}

.league-table td.league-table__player
{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  text-align: left;
  font-weight: 600;
}

.league-table tbody tr.is-moving
{
  z-index: 3;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.35));
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.league-table tbody tr.is-switching .club-badge
{
  animation: league-badge-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.league-table tbody tr.is-arriving
{
  animation: league-row-in 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes league-badge-pop
{
  0% { transform: scale(0.2) rotate(-14deg); opacity: 0; }
  55% { transform: scale(1.16) rotate(6deg); opacity: 1; }
  100% { transform: none; }
}

@keyframes league-row-in
{
  from { opacity: 0; transform: translateY(-0.65rem); }
  to { opacity: 1; transform: none; }
}

.league-empty
{
  margin: 0.75rem 0 0;
  color: var(--secondary);
}

.header-season
{
  position: relative;
}

.header-season select
{
  width: auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.8rem;
  box-shadow: none;
}

.field-note
{
  margin: 0.45rem 0 0;
  color: var(--secondary);
  font-size: 0.85rem;
}

.visually-hidden
{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tab-panel[hidden]
{
  display: none;
}

.tagline
{
  margin: 0.35rem 0 0;
  color: var(--secondary);
  font-size: 1.05rem;
}

#app
{
  max-width: 880px;
  margin: 0 auto;
  padding: 1.15rem 1.25rem 4rem;
}

.screen h2,
.choice-panel__title
{
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.field
{
  display: block;
  margin: 1.25rem 0 0.5rem;
}

.field > span
{
  display: block;
  margin: 0 0 0.4rem 0.2rem;
  color: var(--secondary);
  font-size: 0.8rem;
}

select,
input[type="search"],
input[type="text"],
input[type="password"]
{
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: none;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  box-shadow: 0 0 0 0.5px var(--separator);
}

input[type="search"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus
{
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.login-card
{
  width: min(100%, 22rem);
  margin: 1.5rem auto 0;
  padding: 1.35rem 1.35rem 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow), 0 0 0 0.5px var(--separator);
}

.google-button
{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  margin-top: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  color: #1f1f1f;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0 0 0.5px var(--separator);
}

.google-button:hover
{
  background: #f5f5f5;
}

.google-button svg
{
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

.login-error
{
  margin: 0.85rem 0 0;
  color: var(--red);
  font-size: 0.95rem;
}

.primary
{
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.7rem 0.85rem;
  border: none;
  border-radius: 999px;
  background: var(--blue);
  color: var(--on-result);
  font-weight: 600;
  font-size: 1rem;
}

.primary:hover
{
  filter: brightness(1.08);
}

.team-results
{
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.team-results:empty
{
  display: none;
}

.team-results li
{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 0.5px solid var(--separator);
}

.team-results li:last-child
{
  border-bottom: none;
}

.team-results li.hint
{
  display: block;
  background: transparent;
  color: var(--secondary);
  border-bottom: none;
  padding: 0.4rem 0.2rem;
}

.team-results:has(li.hint)
{
  background: transparent;
}

.team-results .team-league
{
  display: block;
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 400;
}

button
{
  cursor: pointer;
  font: inherit;
}

.team-results button,
.secondary,
.choice-button
{
  background: var(--bg);
  color: var(--blue);
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}

.team-results button:hover,
.secondary:hover,
.choice-button:hover
{
  background: var(--hover);
}

.secondary
{
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.link-button
{
  background: none;
  border: none;
  color: var(--blue);
  margin-top: 1.75rem;
  padding: 0;
  font-size: 0.95rem;
}

.support-path
{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.55rem 0.35rem;
  margin: 0 0 1.25rem;
}

.support-path__club
{
  display: flex;
  flex: 0 0 6.75rem;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  width: 6.75rem;
  height: 7.15rem;
  box-sizing: border-box;
  padding: 0.55rem 0.45rem 0.45rem;
  background: var(--card);
  border-radius: var(--radius);
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--secondary);
  text-align: center;
  cursor: pointer;
  box-shadow: var(--card-shadow);
}

.support-path__club:hover
{
  box-shadow: var(--card-shadow), 0 0 0 0.5px var(--separator);
}

.support-path__club:focus-visible
{
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.support-path__club.is-focused
{
  color: var(--ink);
  box-shadow: var(--card-shadow), 0 0 0 2px var(--blue);
}

.support-path__country
{
  margin-top: auto;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tertiary);
}

.support-path__club.is-current .support-path__country
{
  color: var(--tertiary);
  font-weight: 600;
}

.support-path__club.is-current
{
  color: var(--ink);
  font-weight: 600;
}

.support-path__name
{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  max-width: 100%;
}

.support-path__text
{
  min-width: 0;
}

.support-path__arrow
{
  flex: none;
  align-self: center;
  position: relative;
  color: var(--tertiary);
}

.support-path__order
{
  position: absolute;
  top: calc(100% + 0.2rem);
  left: 50%;
  transform: translateX(-50%);
  color: var(--secondary);
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.club-badge
{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--chip);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}

.club-badge--sm
{
  width: 20px;
  height: 20px;
}

.club-badge--sm img
{
  width: 70%;
  height: 70%;
}

.club-badge--sm .club-badge__initial
{
  font-size: 0.7rem;
}

.team-name
{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.team-name.is-supported
{
  font-weight: 800;
}

.team-flag
{
  width: 1.15rem;
  height: 0.78rem;
  object-fit: cover;
  border-radius: 2px;
  flex: none;
  opacity: 0.5;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.28);
  transition: opacity 0.15s ease;
}

.team-flag:hover
{
  opacity: 1;
}

.timeline__flag
{
  align-self: center;
}

.timeline__flag--home
{
  margin-left: 0.45rem;
}

.timeline__flag--away
{
  margin-right: 0.45rem;
}

.team-title
{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.team-pick
{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.club-badge img
{
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.club-badge__initial
{
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary);
}

.badge
{
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--chip);
  color: var(--secondary);
}

.stats
{
  margin-bottom: 0;
}

.stats__grid
{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 0.75rem;
  box-shadow: var(--card-shadow);
}

.stat
{
  padding: 0.9rem 0.5rem;
  text-align: center;
  border-right: 0.5px solid var(--separator);
}

.stat:last-child
{
  border-right: none;
}

.stats__grid--record
{
  grid-template-columns: repeat(4, 1fr);
}

.stats__grid--record .stat:nth-child(4n)
{
  border-right: none;
}

.stats__grid--record .stat:nth-child(-n+4)
{
  border-bottom: 0.5px solid var(--separator);
}

.stat__value
{
  display: block;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stat__label
{
  color: var(--secondary);
  font-size: 0.75rem;
}

.per-club
{
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.per-club:empty
{
  display: none;
}

.per-club .per-club__row
{
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 0.5px solid var(--separator);
  font-size: 0.95rem;
}

.per-club .per-club__row:last-child
{
  border-bottom: none;
}

.per-club .per-club__row span:last-child
{
  color: var(--secondary);
}

.per-club .per-club__row.is-current
{
  color: var(--blue);
}

.timeline-section
{
  margin-top: 0;
}

.timeline
{
  --timeline-gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--timeline-gap);
  background: transparent;
}

.timeline:empty
{
  display: none;
}

.timeline__item
{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: transparent;
  overflow: visible;
}

.timeline__body
{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.timeline__item.has-tab
{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  margin-top: 0.65rem;
}

.timeline__item.is-arriving
{
  min-height: 0;
  max-height: 0;
  margin-top: 0;
  margin-bottom: calc(-1 * var(--timeline-gap));
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    max-height 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    margin-bottom 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease;
}

.timeline__item.has-tab.is-arriving
{
  margin-top: 0;
}

.timeline__item.is-arriving.is-settling
{
  margin-bottom: 0;
  opacity: 1;
}

.timeline__item.has-tab.is-arriving.is-settling
{
  margin-top: 0.65rem;
}

.timeline__item.is-arriving > *
{
  transform: translateY(-12px);
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline__item.is-arriving.is-settling > *
{
  transform: none;
}

@media (prefers-reduced-motion: reduce)
{
  .timeline__item.is-arriving,
  .timeline__item.is-arriving > *
  {
    transition: none;
  }

  .league-table tbody tr.is-moving,
  .league-table tbody tr.is-switching .club-badge,
  .league-table tbody tr.is-arriving
  {
    transition: none;
    animation: none;
    filter: none;
  }
}

.timeline__item.has-tab .timeline__body
{
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: subgrid;
}

.timeline__side
{
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.timeline__side--home
{
  justify-content: flex-end;
  padding: 0.7rem 0.15rem 0.7rem 0.7rem;
}

.timeline__side--away
{
  align-items: stretch;
  padding-left: 0.15rem;
}

.timeline__side .team-title
{
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.timeline__side--home .team-title
{
  justify-content: flex-end;
}

.timeline__side--away .team-title
{
  justify-content: flex-start;
}

.timeline__side .team-name
{
  flex: 0 1 auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.15;
}

.timeline__side--home .team-name
{
  text-align: right;
}

.timeline__side--away .club-badge,
.timeline__side--away .team-name
{
  align-self: center;
}

.timeline__side--home .cal
{
  margin: 0;
}

.cal
{
  flex: none;
  align-self: center;
  width: 3.2rem;
  margin: 0.65rem 0 0.65rem 0.7rem;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  color: #1c1c1e;
  background: linear-gradient(180deg, #ffffff 0%, #f2f2f4 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), inset 0 0 0 0.5px rgba(0, 0, 0, 0.14);
}

.cal::before
{
  content: "";
  display: block;
  height: 0.38rem;
  background: linear-gradient(#d64545, #a62e2e);
}

.cal__day
{
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  padding: 0.18rem 0 0;
  font-variant-numeric: tabular-nums;
}

.cal__month
{
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a3a3a;
  padding: 0.02rem 0 0.32rem;
}

.timeline__mark
{
  display: flex;
  align-items: stretch;
  flex: none;
  align-self: stretch;
}

.timeline__emblem
{
  width: 3.4rem;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ececf1;
}

[data-theme="dark"] .timeline__emblem-fallback
{
  color: #1c1c1e;
}

.timeline__emblem img
{
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.timeline__emblem-fallback
{
  font-weight: 700;
  color: var(--secondary);
}

.timeline__result
{
  width: 1rem;
  flex: none;
}

.timeline__result.is-win
{
  background: var(--green);
}

.timeline__result.is-loss
{
  background: var(--red);
}

.timeline__result.is-draw
{
  background: var(--amber);
}

.timeline__result.is-live
{
  background: var(--tertiary);
}

.timeline__tab
{
  grid-row: 1;
  align-self: end;
  max-width: 100%;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}

.timeline__tab--home
{
  grid-column: 1;
  justify-self: end;
  margin-right: -0.55rem;
}

.timeline__tab--away
{
  grid-column: 3;
  justify-self: start;
  max-width: calc(100% - 1rem);
  margin-left: -0.55rem;
}

.timeline__tab-label
{
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.22rem 0.7rem 0.18rem 0.75rem;
  background: var(--card);
  color: var(--secondary);
  font-size: 0.82rem;
  line-height: 1.2;
  border-radius: 10px 10px 0 0;
  position: relative;
}

.timeline__tab-label strong
{
  font-weight: 700;
}

.timeline__tab-label::after
{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 4px;
  background: var(--card);
}

.timeline__tab-club
{
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline__score
{
  align-self: center;
  padding: 0 0.55rem;
  color: var(--secondary);
  font-family: "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 1.8rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.choice-panel
{
  margin: 0.85rem 0 0;
}

.choice-panel__context:empty
{
  display: none;
}

.choice-buttons
{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.choice-button
{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow), 0 0 0 0.5px var(--separator);
}

.distractor
{
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow), 0 0 0 0.5px var(--separator);
}

.distractor[hidden]
{
  display: none;
}

.distractor__pitch
{
  position: relative;
  flex: none;
  width: 4.6rem;
  height: 1.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--chip);
}

.distractor__ball
{
  position: absolute;
  top: 0.28rem;
  left: 0;
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 32%, #fff 0 16%, transparent 17%),
    repeating-conic-gradient(#f7f7f8 0 18deg, #8e8e96 0 36deg);
  box-shadow: inset 0 0 0 1.5px #5c5c63;
  animation: distractor-roll 1.05s ease-in-out infinite alternate;
}

.distractor__title
{
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.distractor__detail
{
  margin: 0.1rem 0 0;
  color: var(--secondary);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

@keyframes distractor-roll
{
  from { transform: translateX(0.2rem) rotate(0deg); }
  to { transform: translateX(3.15rem) rotate(220deg); }
}

@media (prefers-reduced-motion: reduce)
{
  .distractor__ball
  {
    animation: none;
    transform: translateX(1.7rem);
  }
}

.journey-map
{
  height: min(62vh, 560px);
  min-height: 380px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--chip);
  box-shadow: var(--card-shadow), 0 0 0 0.5px var(--separator);
}

.journey-map.maplibregl-map
{
  font-family: inherit;
}

.journey-map .maplibregl-ctrl-attrib
{
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.8);
}

.map-note
{
  margin: 0.75rem 0 0;
  color: var(--secondary);
  font-size: 0.9rem;
}

.map-pin
{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ececf1;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.map-pin img
{
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.map-pin__letter
{
  font-size: 0.95rem;
  font-weight: 700;
  color: #1c1c1e;
}

.map-pin--current
{
  box-shadow: 0 0 0 3px var(--blue), 0 2px 6px rgba(0, 0, 0, 0.28);
}

.map-leg
{
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #f4f4f6;
  color: #1c1c1e;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  pointer-events: auto;
}

.map-leg::before
{
  content: "";
  position: absolute;
  inset: -8px;
}

.hop-popup .maplibregl-popup-content
{
  padding: 0.5rem 0.7rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

.hop-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.hop-popup.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.hop-popup.maplibregl-popup-anchor-top-right .maplibregl-popup-tip
{
  border-bottom-color: #fff;
}

.hop-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.hop-popup.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.hop-popup.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip
{
  border-top-color: #fff;
}

.hop-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip
{
  border-right-color: #fff;
}

.hop-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip
{
  border-left-color: #fff;
}

.hop-tip__club
{
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #1c1c1e;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.hop-tip__name
{
  min-width: 0;
}

.hop-tip__miles
{
  margin: 0.2rem 0;
  color: #6e6e73;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.map-popup
{
  font-size: 0.9rem;
  line-height: 1.35;
}

.map-popup strong
{
  display: block;
}

.intro-modal
{
  padding: 0;
  border: none;
  background: transparent;
}

.intro-modal:not([open])
{
  display: none;
}

.intro-modal[open]
{
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 40;
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(100% - 2rem, 34rem);
  height: fit-content;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: 0;
  transform: translate(-50%, -50%);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-size: 0.64rem;
  box-shadow: var(--card-shadow), 0 16px 50px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.intro-modal::backdrop
{
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.intro-modal__body
{
  min-height: 0;
  overflow: auto;
  padding: 1.35rem 1.4rem 0.4rem;
}

.intro-modal h2
{
  margin: 0 0 0.85rem;
  font-size: 1.45em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.intro-modal p
{
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.intro-modal__lead
{
  margin-bottom: 0.35rem;
}

.intro-modal__leagues
{
  list-style: none;
  margin: 0;
  padding: 0 0 0.35rem;
}

.intro-modal__leagues li
{
  display: flex;
  gap: 0.75rem;
  padding: 0.38rem 0;
  border-bottom: 0.5px solid var(--separator);
  font-weight: 600;
}

.intro-modal__leagues li:last-child
{
  border-bottom: none;
}

.intro-modal__leagues span
{
  flex: none;
  width: 6.8rem;
  color: var(--secondary);
  font-weight: 500;
}

.intro-modal__actions
{
  position: relative;
  z-index: 1;
  flex: none;
  padding: 0.35rem 1.4rem 1.15rem;
}

.intro-modal .primary
{
  margin-top: 0;
  font-size: 1em;
}

.toast
{
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  max-width: min(90vw, 28rem);
}

::view-transition-group(root)
{
  animation-duration: 600ms;
}

::view-transition-old(root),
::view-transition-new(root)
{
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root)
{
  z-index: 1;
}

::view-transition-new(root)
{
  z-index: 2;
}

@media (max-width: 520px)
{
  .stats__grid
  {
    grid-template-columns: 1fr;
  }

  .stat
  {
    border-right: none;
    border-bottom: 0.5px solid var(--separator);
    text-align: left;
    padding: 0.75rem 1rem;
  }

  .stat:last-child
  {
    border-bottom: none;
  }

  .choice-buttons
  {
    grid-template-columns: 1fr;
  }
}
