/* Shared components. Each block names the Dart widget it mirrors in
   lib/core/components/ (or a feature widgets/ folder). */

/* ---------- gradient-border helper (SquircleBorderPainter, 1px) ---------- */
.gb { position: relative; }
.gb::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  padding: 1px; border-radius: inherit; corner-shape: inherit;
  background: var(--gb, linear-gradient(to bottom right,
    var(--white-24a) 0%, var(--scroll-bg) 20%, var(--scroll-bg) 60%, var(--white-24a) 80%, var(--scroll-bg) 100%));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------- AppCard ---------- */
.app-card {
  position: relative;
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: inset 0 0 10px 0 rgba(255, 255, 255, 0.15);   /* InnerGlowPainter */
  padding: var(--pad);
  --gb: linear-gradient(to bottom right, var(--white-24a) 0%, var(--scroll-bg) 20%, var(--scroll-bg) 60%, var(--white-24a) 80%, var(--scroll-bg) 100%);
}
.app-card.primary {
  background: var(--card-featured-bg);
  box-shadow: inset 0 0 10px 0 rgba(220, 248, 0, 0.25);
  --gb: linear-gradient(to bottom right, rgba(220,248,0,.16) 0%, rgba(220,248,0,.18) 20%, rgba(220,248,0,.18) 60%, rgba(220,248,0,.16) 80%, rgba(220,248,0,.18) 100%);
}
.app-card.danger {
  background: var(--card-danger-bg);
  box-shadow: inset 0 0 10px 0 rgba(234, 91, 91, 0.25);
  --gb: linear-gradient(to bottom right, rgba(234,91,91,.16) 0%, rgba(234,91,91,.18) 20%, rgba(234,91,91,.18) 60%, rgba(234,91,91,.16) 80%, rgba(234,91,91,.18) 100%);
}
.app-card.flashy {
  background: var(--primary); color: var(--bg);
  box-shadow: inset 0 0 10px 0 #fff;
  --gb: linear-gradient(to bottom right, #fff 0%, rgba(255,255,255,.5) 20%, rgba(255,255,255,.5) 60%, #fff 80%, rgba(255,255,255,.5) 100%);
}
.app-card.p0 { padding: 0; }
.app-card.p-dense { padding: 8px 16px; }

/* ---------- GlassCircleButton ---------- */
.glass-btn {
  --s: 44px;
  position: relative;
  width: var(--s); height: var(--s); flex: none;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--white);
}
.glass-btn.lg { --s: 56px; }
.glass-btn.sm { --s: 36px; }
.glass-btn.xs { --s: 28px; }
.glass-btn.active { background: var(--card-featured-bg); color: var(--primary); }
.glass-btn.labelled { width: auto; padding: 0 12px; gap: 6px; border-radius: 22px; color: var(--primary); font-size: 13px; }

/* Material Badge (lime count) */
.badge-host { position: relative; display: inline-flex; }
.badge {
  position: absolute; top: -3px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--primary);
  color: var(--card-bg-opaque); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.badge.dark { color: var(--bg); }

/* ---------- app bar (sub-screens) ---------- */
.appbar {
  height: 56px; flex: none;
  display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, max-content) minmax(max-content, 1fr); align-items: center;
}
.appbar .countdown-chip { white-space: nowrap; }
.appbar > :first-child { padding-left: var(--pad); }
.appbar > :last-child { padding-right: var(--pad); display: flex; justify-content: flex-end; }
.appbar .appbar-title { text-align: center; font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: .15px; }
.appbar.left-title { grid-template-columns: 60px 1fr auto; }
.appbar.left-title .appbar-title { text-align: left; }
.home-appbar { height: 56px; display: flex; align-items: center; padding: 0 0 0 16px; gap: 8px; }
.home-appbar .logo { height: 36px; }
.home-appbar .actions { margin-left: auto; display: flex; gap: 8px; padding-right: 16px; }

/* ---------- buttons (button_theme.dart) ---------- */
.btn {
  width: 100%; min-height: var(--btn-h); padding: 16px;
  border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 500;
  background: var(--primary); color: var(--bg);
}
.btn.outlined { background: var(--pill-bg); color: var(--white); border: 1.5px solid var(--primary); }
.btn.outlined.white { border-color: var(--white-24a); }
.btn.danger { background: var(--error); color: var(--white); }
.btn.compact { min-height: 0; padding: 14px; }
.btn.auto { width: auto; }
.btn[disabled], .btn.disabled { background: rgba(255,255,255,.12); color: rgba(255,255,255,.38); }
.text-btn { color: var(--primary); font-size: 14px; font-weight: 600; padding: 8px 12px; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- FilterChipButton / OutlinedActive pill ---------- */
.chip {
  height: 32px; padding: 0 16px; flex: none;
  border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--pill-bg); border: 1px solid var(--primary);
  font-size: 12px; font-weight: 700; color: var(--white); white-space: nowrap;
}
.chip.active { background: var(--primary); border-color: transparent; color: var(--bg); }
.chip.disabled { opacity: .5; }
.chip .i { width: 16px; height: 16px; }

/* _HomeTabSwitcher & similar segmented containers */
.segmented { display: inline-flex; gap: 8px; padding: 8px; border-radius: 64px; background: var(--scroll-bg); }

/* white level chip on cards (Material Chip, compact) */
.level-chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 32px; background: #fff; color: var(--bg);
  font-size: 11px; font-weight: 700; letter-spacing: .5px; white-space: nowrap;
}
/* lime sport pill in the home greeting */
.sport-pill {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 4px;
  padding: 4px 8px; border-radius: 20px; background: var(--primary); color: var(--bg);
  font-size: 11px; font-weight: 700; line-height: 16px; letter-spacing: .5px;
}

/* ---------- CountdownChip ---------- */
.countdown-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px;
  border-radius: var(--radius); background: var(--pill-bg); border: 1px solid var(--primary);
  font-size: 12px; font-weight: 700;
}
.countdown-chip .i { width: 14px; height: 14px; color: var(--primary); }

/* ---------- DateChip ---------- */
.date-chip {
  width: 52px; height: 84px; flex: none; border-radius: 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 4px;
  background: var(--card-bg-opaque);
  backdrop-filter: blur(10px);
  --gb: linear-gradient(to bottom, var(--scroll-bg), rgba(255,255,255,.3));
}
.date-chip .dow { font-size: 12px; font-weight: 600; color: var(--white-60); margin-bottom: 8px; }
.date-chip .day {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); font-size: 16px; font-weight: 700;
}
.date-chip.active { background: rgba(220,248,0,.1); --gb: linear-gradient(to bottom, var(--scroll-bg), var(--primary)); }
.date-chip.active .dow { color: #fff; }
.date-chip.active .day { background: var(--primary); color: var(--black); }

/* ---------- UserAvatar ---------- */
.avatar {
  --r: 20px;
  width: calc(var(--r) * 2 + 4px); height: calc(var(--r) * 2 + 4px); flex: none;
  border-radius: 50%; border: 2px solid var(--white-80);
  background: var(--pill-bg) center / cover no-repeat;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; overflow: hidden;
}
.avatar.premium { border-color: var(--primary); }
.avatar.no-border { border: 0; width: calc(var(--r) * 2); height: calc(var(--r) * 2); }
.avatar.empty { border-color: var(--card-bg-opaque); }
.avatar.guest { background-color: var(--primary-700); }
.avatar .i { width: 55%; height: 55%; }

/* rank chip under avatars on GameCard (scaled 0.6 Material Chip) */
.rank-chip {
  position: absolute; left: 50%; bottom: 0px; transform: translateX(-50%);
  height: 18px; padding: 0 6px; border-radius: 12px;
  display: inline-flex; align-items: center;
  background: #fff; color: var(--bg); font-size: 9px; font-weight: 700; white-space: nowrap;
}
.rank-chip.premium { background: var(--primary); }

/* ChatActiveDot */
.active-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--success); border: 3px solid var(--bg); box-sizing: content-box; }

/* CheckMark */
.check-mark { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- inputs (input_decoration_theme.dart) ---------- */
.input {
  width: 100%; min-height: 56px; padding: 16px 20px;
  border-radius: var(--radius); background: var(--card-bg);
  border: 1px solid var(--white-12a);
  display: flex; align-items: center; gap: 12px;
  font-size: 16px; font-weight: 400; color: #fff;
}
.input.focus { border-color: var(--primary); }
.input.error { border-color: var(--error); }
.input .ph { color: var(--white-60); }
.input .caret { display: inline-block; width: 2px; height: 20px; background: var(--primary); vertical-align: middle; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.field-label { font-size: 14px; font-weight: 700; margin: 16px 0 8px; }

/* ---------- SectionTitle ---------- */
.section-title { padding: 16px 0 8px; font-size: 14px; font-weight: 700; }

/* ---------- SelectableOptionCard ---------- */
.option-card {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 58px; padding: 16px;
  border-radius: var(--radius); background: var(--card-bg); border: 1px solid var(--card-bg);
  font-size: 14px; line-height: 20px;
}
.option-card.selected { background: var(--primary-900); border-color: var(--primary); }
.option-card .tick {
  width: 24px; height: 24px; border-radius: 12px; background: var(--primary); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- LocationRow ---------- */
.location-row {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  border-radius: 64px; background: var(--card-bg);
}
.location-row .sub { color: rgba(255,255,255,.7); font-size: 13px; font-weight: 400; }

/* ---------- list tiles / settings ---------- */
.settings-section > .title { font-size: 14px; font-weight: 600; margin: 0 8px 8px; }
.settings-section > .app-card { margin: 0 8px; padding: 0; }
.tile { display: flex; align-items: center; gap: 16px; padding: 14px 16px; min-height: 56px; font-size: 14px; }
.tile + .tile { border-top: 1px solid rgba(255,255,255,.12); }
.tile .sub { font-size: 12px; line-height: 1.3; color: rgba(255,255,255,.7); font-weight: 600; margin-top: 4px; }
.tile .chev { margin-left: auto; color: rgba(255,255,255,.4); width: 16px; height: 16px; }
/* CupertinoSwitch */
.switch { margin-left: auto; width: 51px; height: 31px; border-radius: 16px; background: rgba(120,120,128,.32); position: relative; flex: none; transition: background var(--normal); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: var(--white-80); transition: transform var(--normal) var(--enter), background var(--normal); box-shadow: 0 3px 8px rgba(0,0,0,.15); }
.switch.on { background: var(--primary-700); }
.switch.on::after { transform: translateX(20px); background: var(--primary); }

/* ---------- DotIndicators ---------- */
.dots { display: flex; gap: 6px; align-items: center; }
.dots i { width: 4px; height: 4px; border-radius: 16px; background: var(--primary-100); transition: height var(--normal); }
.dots i.on { height: 12px; background: var(--primary); }

/* ---------- bottom sheet (customModalBottomSheet) ---------- */
.sheet-scrim {
  position: absolute; inset: 0; z-index: 60; background: rgba(0,0,0,.54);
  opacity: 0; pointer-events: none; transition: opacity var(--normal) var(--enter);
}
.sheet {
  position: absolute; z-index: 61; left: 0; right: 0; bottom: 0;
  max-height: calc(100% - 60px); overflow: hidden;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  padding-bottom: var(--safe-bottom);
  transform: translateY(105%); transition: transform var(--slow) var(--enter);
}
.sheet.open { transform: none; }
.sheet-scrim.open { opacity: 1; pointer-events: auto; }
.sheet .handle { width: 36px; height: 4px; border-radius: 2px; background: var(--white-24a); margin: 0 auto 16px; }
.sheet-body { padding: 16px 24px; }
.sheet-title { font-size: 18px; font-weight: 700; }
.sheet-desc { font-size: 14px; font-weight: 400; color: var(--white-60); margin-top: 8px; }

/* AppAlertDialog */
.dialog-scrim { position: absolute; inset: 0; z-index: 70; background: rgba(0,0,0,.54); display: flex; align-items: center; justify-content: center; padding: 40px; }
.dialog { background: var(--border); border: 1px solid var(--white-24a); border-radius: var(--radius); padding: 24px; width: 100%; }
.dialog h3 { font-size: 24px; line-height: 32px; margin-bottom: 16px; }
.dialog p { font-size: 14px; font-weight: 400; color: var(--white-80); }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }

/* snackbar */
.snackbar {
  position: absolute; z-index: 80; left: 16px; right: 16px; bottom: 110px;
  background: #e6e1e5; color: #313033; border-radius: var(--radius); padding: 14px 20px;
  font-size: 14px; font-weight: 500;
  transform: translateY(20px); opacity: 0; transition: all var(--normal) var(--enter);
}
.snackbar.show { transform: none; opacity: 1; }

/* ---------- BottomNavigation (glass pill) ---------- */
.bottom-nav-wrap { position: absolute; z-index: 40; left: 0; right: 0; bottom: 32px; display: flex; justify-content: center; pointer-events: none; }
.bottom-nav {
  pointer-events: auto;
  width: 250px; height: 78px; border-radius: 60px;
  display: flex; align-items: center; justify-content: space-around;
  background: var(--card-bg);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  --gb: linear-gradient(to bottom right, var(--white-38a) 0%, var(--scroll-bg) 20%, var(--scroll-bg) 60%, var(--white-38a) 80%, var(--scroll-bg) 100%);
}
.bottom-nav.four { width: 290px; }
.bottom-nav.five { width: 350px; }
.bottom-nav .nav-item { padding: 6px; display: flex; }
.bottom-nav .nav-create {
  margin: 6px; width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: var(--bg); display: flex; align-items: center; justify-content: center;
}

/* ---------- coach mark tooltip ---------- */
.coach-overlay { position: absolute; inset: 0; z-index: 90; pointer-events: none; }
.coach-hole { position: absolute; border-radius: var(--radius); box-shadow: 0 0 0 2000px rgba(31,31,31,.8); transition: all var(--slow) var(--enter); }
.coach-tip {
  position: absolute; left: 16px; right: 16px; padding: 16px;
  background: var(--card-bg-opaque); border-radius: var(--radius);
  transition: top var(--slow) var(--enter);
}
.coach-tip h4 { font-size: 14px; line-height: 20px; font-weight: 700; }
.coach-tip p { font-size: 12px; line-height: 16px; color: var(--white-80); margin-top: 4px; }
.coach-tip .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 12px; color: var(--white-60); }

/* ---------- RacketSportsLoader (simplified: 4 bouncing balls) ---------- */
.racket-loader { display: flex; gap: 8px; justify-content: center; padding: 32px 0; }
.racket-loader i { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); animation: bounce 900ms var(--enter) infinite; }
.racket-loader i:nth-child(2) { animation-delay: 120ms; } .racket-loader i:nth-child(3) { animation-delay: 240ms; } .racket-loader i:nth-child(4) { animation-delay: 360ms; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } }

/* ---------- entrance (lib/core/components/entrance.dart) ---------- */
.ent { opacity: 0; transform: translateY(var(--ent-y, 6%)); }
.ent.x { transform: translateX(10%); }
.ent.in { opacity: 1; transform: none; transition: opacity var(--fast) var(--enter), transform var(--fast) var(--enter); transition-delay: var(--d, 0ms); }
.no-anim .ent { opacity: 1; transform: none; }

/* PressableScale */
.press { transition: transform var(--fast) var(--enter); }
.press.down { transform: scale(0.97); }
.coach-tip .skip { font-size: 12px; font-weight: 600; color: var(--white-60); padding: 4px 0 4px 8px; }
.coach-tip .foot .count { font-weight: 600; font-size: 12px; color: var(--white-60); }

/* ---------- GameCard ---------- */
.game-card { display: flex; flex-direction: column; }
.game-card .gc-chips { gap: 8px; min-height: 40px; }
.game-card .gc-body { align-items: flex-start; margin-top: 8px; gap: 8px; }
.game-card .gc-meta { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; }
.game-card .gc-meta .row { gap: 8px; align-items: flex-end; }
.game-card .gc-meta .km { font-size: 10px; margin-left: -4px; }
.game-card.featured { height: 100%; min-height: 170px; }
.game-card.featured .gc-dense-loc { align-items: flex-end; }
.game-card .gc-spacer { flex: 1; min-height: 16px; }
.player-stack { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.player-stack .ps-avatars { position: relative; width: 166px; height: 62px; }
.player-stack .ps-slot { position: absolute; top: 0; }
.player-stack .ps-count { padding-right: 8px; }
.player-stack.dense { flex-direction: row; align-items: flex-start; gap: 8px; }
.player-stack.dense .ps-avatars { width: 170px; }
.player-stack.dense .ps-count { padding: 16px 0 0; }

/* ---------- home _ActionButton ---------- */
.action-tile {
  height: 160px; padding: 16px; border-radius: var(--radius);
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
}
.action-tile .at-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.action-tile .badge { top: -3px; right: -2px; }

/* PlayerAvatarStack / InvitedPlayersTile */
.avatar-stack { display: flex; flex: none; }
.avatar-stack > * + * { margin-left: -16px; }
.avatar-stack .more { background: var(--pill-bg); font-size: 14px; font-weight: 600; }
.invited-tile .it-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--pill-bg); color: var(--white-80); display: flex; align-items: center; justify-content: center; flex: none; }
.invited-tile .it-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.i.thin path, .i.thin circle, .i.thin rect { stroke-width: 1; }
/* white info chips (Material Chip compact, radius 32) */
.info-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 32px; background: #fff; color: var(--bg); font-size: 11px; font-weight: 700; letter-spacing: .5px; }
/* bottom action area (Scaffold.bottomNavigationBar + SafeArea + 16 padding) */
.bottom-bar { flex: none; padding: 16px 16px calc(16px + var(--safe-bottom)); }

/* ChipRowScroll / _FilterChipsBar */
.chip-row { border-radius: 64px; background: var(--scroll-bg); overflow: hidden; }
.chip-row-inner { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10.67px 16px 10.67px 16px; }
.chip-row-inner::-webkit-scrollbar { display: none; }
.sheet-section { font-weight: 700; font-size: 14px; padding-bottom: 8px; }
/* Material Slider (primary) */
.m-slider { position: relative; height: 4px; border-radius: 2px; background: rgba(220,248,0,.24); margin: 18px 10px; }
.m-slider .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--primary); }
.m-slider .thumb { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--primary); }
.m-slider .thumb + .thumb { }
/* empty states (NoMatchesFoundView etc.) */
.empty-view { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 48px 16px; color: var(--white-80); font-size: 14px; }
.empty-view .i { width: 60px; height: 60px; color: var(--white-60); }

/* CupertinoDatePicker (time) */
.time-wheel { position: relative; height: 180px; display: flex; justify-content: center; gap: 0; overflow: hidden;
  -webkit-mask: linear-gradient(transparent, #000 35%, #000 65%, transparent); mask: linear-gradient(transparent, #000 35%, #000 65%, transparent); }
.wheel-band { position: absolute; left: 16px; right: 16px; top: 72px; height: 36px; border-radius: 8px; background: rgba(118,118,128,.24); }
.wheel-col { position: relative; width: 70px; height: 180px; }
.wheel-track { position: absolute; left: 0; right: 0; top: 72px; transform: translateY(calc(var(--i) * -36px)); transition: transform 700ms cubic-bezier(.2,.8,.2,1); }
.wheel-track span { display: block; height: 36px; line-height: 36px; text-align: center; font-size: 20px; font-weight: 400; color: #fff; }

/* ---------- chat ---------- */
.sender-stack { position: relative; width: 52px; height: 52px; flex: none; display: inline-block; }
.sender-stack.pair .s2 { position: absolute; top: 0; right: 0; }
.sender-stack.pair .s1 { position: absolute; bottom: 0; left: 0; }
.chat-tile { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10.67px; border-radius: var(--radius); }
.chat-tile .ct-preview { color: var(--white-80); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.chat-tile.unread .ct-preview { color: #fff; }
.chat-tile .ct-time { align-self: center; padding-top: 22px; color: var(--grey-500); flex: none; }
.chat-tile .ct-unread { position: absolute; top: 6px; right: 10.67px; min-width: 18px; height: 18px; padding: 0 5.3px; border-radius: 9px; background: var(--primary); color: #000; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.fav-row { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; height: 84px; }
.fav { width: 60px; display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.fav .av-wrap { position: relative; }
.fav .active-dot { position: absolute; right: -2px; bottom: -2px; }
.fav .label-s { max-width: 60px; }
.msgs { padding: 8px; display: flex; flex-direction: column; }
.msg-row { display: flex; flex-direction: column; }
.msg-row.mine { align-items: flex-end; }
.msg-row.theirs { align-items: flex-start; }
.msg-name { padding: 0 0 4px 36px; }
.msg-av { width: 36px; flex: none; padding-bottom: 1px; }
.bubble { position: relative; max-width: calc(390px * .75 - 36px); padding: 8px 16px; font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .25px; color: #fff; }
.bubble.mine { max-width: calc(390px * .75); background: var(--primary-800); border-radius: 21.33px 8px 8px 21.33px; }
.bubble.mine.first { border-top-right-radius: 21.33px; }
.bubble.mine.last { border-bottom-right-radius: 21.33px; }
.bubble.theirs { background: #424242; border-radius: 8px 21.33px 21.33px 8px; }
.bubble.theirs.first { border-top-left-radius: 21.33px; }
.bubble.theirs.last { border-bottom-left-radius: 21.33px; }
.bubble.card-bubble { padding: 0; background: none; }
.reaction-pill { position: absolute; bottom: -14px; left: 8px; padding: 2px 6px; border-radius: 16px; background: var(--card-bg-opaque); border: 1px solid #616161; font-size: 12px; white-space: nowrap; }
.mine .reaction-pill { left: auto; right: 8px; }
.day-divider { align-self: center; margin: 8px 0 16px; padding: 4px 12px; border-radius: 16px; background: #424242; color: #bdbdbd; font-size: 11px; line-height: 16px; font-weight: 600; }
.typing { height: 20px; padding-left: 16px; font-size: 12px; color: var(--grey-500); font-weight: 500; }
.input-bar { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px calc(8px + var(--safe-bottom)); }
.input-bar .input { backdrop-filter: blur(10px); font-size: 16px; min-height: 56px; }
.shared-game { width: 260px; }
.shared-game .sg-status { padding: 2px 8px; border-radius: 20px; background: rgba(220,248,0,.15); color: var(--primary); font-size: 11px; font-weight: 700; }
.shared-game .sg-join { min-height: 44px; padding: 12px 16px; font-size: 14px; }
.group-avatar { border-radius: 50%; background: var(--pill-bg) center/cover; display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* Buttons, badges, pills, chips and capsule containers are fully rounded
   (stadium) — never squircle-cornered, whatever their height. */
.btn, .chip, .level-chip, .info-chip, .info-pill, .sport-pill, .countdown-chip, .rank-chip,
.badge, .segmented, .chip-row, .pill-o, .disc, .lvl, .rank-pill, .glass-btn, .text-btn,
.social, .sg-status, .reaction-pill, .day-divider, .bottom-nav, .navpill, .date-chip,
.ct-unread, .kit-play, .rank, .end-card .cta, .snackbar {
  border-radius: 999px !important;
  corner-shape: round !important;
}
.input.b14 { font-size: 14px; font-weight: 600; letter-spacing: .25px; }
.player-row { display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-radius: 64px; }
.player-row .you-pill { padding: 4px 10px; border-radius: 12px; background: #fff; color: var(--bg); font-size: 12px; font-weight: 700; }
.player-row .sel-circle { width: 30px; height: 30px; border-radius: 15px; border: 1px solid var(--white-60); display: flex; align-items: center; justify-content: center; color: var(--bg); flex: none; }
.player-row .sel-circle.on { background: var(--primary); border-color: var(--primary); }
.status-pill { align-self: flex-start; margin-top: 4px; padding: 4px 8px; border-radius: 999px; background: var(--pill-bg); font-size: 12px; font-weight: 700; }
.you-pill, .sel-circle { border-radius: 999px !important; }
/* Material checkbox (CheckboxListTile) */
.cbx { width: 18px; height: 18px; border: 2px solid #fff; border-radius: 4px; flex: none; position: relative; }
.cbx.on { background: var(--primary); border-color: var(--primary); }
.cbx.on::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid var(--bg); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
/* onboarding select rows (select_sports / language_select): primary800 fill + lime border when selected */
.sel-card { display: flex; align-items: center; gap: 16px; padding: 16px; margin: 8px 0; border-radius: var(--radius); background: var(--card-bg); border: 1px solid var(--card-bg); font-size: 16px; font-weight: 400; transition: background var(--fast), border-color var(--fast); }
.sel-card.on { background: var(--primary-800); border-color: var(--primary); }
.sel-card .tick { width: 24px; height: 24px; border-radius: 12px; background: var(--primary); color: var(--bg); display: none; align-items: center; justify-content: center; flex: none; }
.sel-card.on .tick { display: flex; }
.onb { padding: 16px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.onb .headline-s { margin-top: 32px; }
.onb .lead { margin-top: 8px; font-size: 14px; line-height: 20px; }
@keyframes row-flash { 0% { box-shadow: 0 0 0 2px rgba(220,248,0,.6); } 100% { box-shadow: 0 0 0 0 rgba(220,248,0,0); } }
.chip-row.flash { animation: row-flash 700ms var(--enter); }


/* =====================================================================
   REDESIGN LAYER (feature/new-design). Overrides the rules above so the kit
   matches the app: palette of 8, DM Sans, flat, no borders, no gradients,
   no glass (except the bottom nav and the chat input bar).
   ===================================================================== */
.gb::after { display: none !important; }
.app-card { background: var(--card-bg); box-shadow: none; border: 0; color: var(--white); }
.app-card.primary { background: var(--card-featured-bg); box-shadow: none; }
.app-card.danger { background: var(--card-danger-bg); box-shadow: none; }
.app-card.flashy { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.app-card.hero, .app-card.forest { background: var(--hero); color: var(--on-hero); }
.app-card.hero .c-grey, .app-card.hero .c-w60, .app-card.forest .c-grey { color: var(--on-hero-muted); }

.glass-btn { background: var(--icon-btn); color: var(--forest); backdrop-filter: none; -webkit-backdrop-filter: none; }
.glass-btn.active { background: var(--primary); color: var(--on-primary); }
.glass-btn.labelled { color: var(--forest); }
.glass-btn.filter, .filter-btn { background: var(--filter-btn); color: var(--on-filter-btn); }
.badge { background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 12px; }
.badge.dark { color: var(--on-primary); }

.appbar .appbar-title { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.home-appbar .logo { height: 36px; }

.btn { background: var(--primary); color: var(--on-primary); font-size: 16px; font-weight: 600; border: 0; }
.btn.outlined, .btn.outlined.white { background: var(--pill-bg); color: var(--white); border: 0; }
.btn.danger { background: var(--error); color: #fff; }
.btn[disabled], .btn.disabled { background: #d0d6cb; color: #8f948c; }
.text-btn { color: var(--white); font-size: 15px; font-weight: 600; }

/* chips: loose = lime-grey, selected = forest (selectedPillColor); inside a tab
   container (segmented / chip-row) = neon in a white stadium */
.chip { background: var(--pill-bg); border: 0; color: var(--white); font-size: 13px; font-weight: 600; }
.chip.active { background: var(--selected-pill); color: var(--on-selected-pill); }
.segmented, .chip-row { background: #fff; }
.segmented .chip, .chip-row .chip { background: var(--pill-bg); border: 0; color: var(--white); }
.chip-row .chip.active { background: var(--selected-pill); color: var(--on-selected-pill); }
.segmented .chip.active, .chip-row.tabs .chip.active { background: var(--primary); color: var(--on-primary); }
.chip-row.on-grey { background: var(--scroll-bg); }
.segmented { padding: 6px; }
.level-chip { background: var(--forest); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.sport-pill { background: var(--primary); color: var(--on-primary); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.countdown-chip { background: var(--pill-bg); border: 0; color: var(--white); font-size: 13px; font-weight: 600; }
.countdown-chip .i { color: var(--white); }
.info-chip { background: var(--pill-bg); color: var(--white); font-size: 12px; font-weight: 600; letter-spacing: 0; }
.rank-chip { background: #fff; color: var(--forest); font-size: 12px; font-weight: 600; height: 20px; }
.rank-chip.premium { background: var(--primary); }
/* PlayerSlot level chip in the GameCard (game_card.dart): a Chip scaled to 0.6 → 19 px high, 7.2 px bold text (labelMedium 12 × 0.6),
   pill surface (premium: neon), overlapping the lower edge of the avatar */
.ps-slot .rank-chip { background: var(--pill-bg); color: var(--forest); font-size: 7.2px; font-weight: 700; height: 19px; padding: 0 5.4px; bottom: -5px; border-radius: 12px; }
.ps-slot .rank-chip.premium { background: var(--primary); }

/* DateChip: lime-grey pill, MONTH caps / weekday / day circle; selected = forest pill, neon day circle */
.date-chip { width: 52px; height: 100px; background: var(--pill-bg); backdrop-filter: none; justify-content: flex-end; align-items: center; padding: 0 0 4px; gap: 0; color: var(--white); }
.date-chip .mon { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--white-60); }
.date-chip .dow { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--white-60); margin: 2px 0 8px; }
.date-chip .day { width: 44px; height: 44px; background: rgba(20,68,37,.1); color: var(--white); font-size: 16px; font-weight: 700; }
.date-chip.active { background: var(--forest); }
.date-chip.active .mon { color: var(--stone); }
.date-chip.active .dow { color: #fff; }
.date-chip.active .day { background: var(--primary); color: var(--on-primary); }

/* UserAvatar: no ring unless premium (neon ring) */
.avatar { border: 0; background-color: var(--pill-bg); color: var(--white-60); width: calc(var(--r) * 2); height: calc(var(--r) * 2); }
.avatar.premium { box-shadow: 0 0 0 2px var(--primary); }
.avatar.empty { background-color: var(--stone); border: 0; }
.avatar.guest { background-color: var(--sage); color: #fff; }
.avatar-stack .more { background: var(--pill-bg); color: var(--white); font-weight: 600; }
.active-dot { background: var(--success); border-color: var(--page); }
.check-mark { background: var(--primary); color: var(--on-primary); }

/* inputs: lime-grey, no border */
.input { background: var(--input-fill); border: 0; color: var(--white); font-size: 15px; font-weight: 500; }
.input.focus { background: var(--stone); }
.input.error { background: var(--card-danger-bg); }
.input .ph { color: var(--white-60); }
.input .caret { background: var(--white); }
.field-label, .section-title, .sheet-section { font-size: 15px; font-weight: 600; }

.option-card { background: var(--card-bg); border: 0; font-size: 15px; font-weight: 500; }
.option-card.selected { background: var(--forest); color: var(--on-selected-choice); }
.option-card .tick { background: var(--primary); color: var(--on-primary); }
.sel-card { background: var(--card-bg); border: 0; font-size: 16px; font-weight: 500; }
.sel-card.on { background: var(--forest); color: var(--primary); }
.sel-card .tick { background: var(--primary); color: var(--on-primary); }
.location-row { background: var(--card-bg); }
.location-row .sub { color: var(--white-60); font-size: 13px; font-weight: 500; }

.settings-section > .title { font-size: 15px; font-weight: 600; }
.tile { font-size: 15px; font-weight: 500; }
.tile + .tile { border-top: 1px solid var(--white-12a); }
.tile .sub { font-size: 13px; font-weight: 500; color: var(--white-60); }
.tile .chev { color: var(--white-60); }
.switch { background: var(--stone); }
.switch::after { background: #fff; box-shadow: 0 1px 3px rgba(20,68,37,.2); }
.switch.on { background: var(--switch-track); }
.switch.on::after { background: var(--switch-thumb); }
.dots i { background: var(--stone); }
.dots i.on { background: var(--forest); }

.sheet { background: var(--sheet); color: var(--white); }
.sheet.dark, .sheet.confirm { background: var(--forest); --white: #fff; --white-60: #d2dbd0; --white-80: #edf2e9; color: #fff; }
.sheet .handle { background: var(--stone); }
.sheet-desc { color: var(--white-60); font-size: 15px; font-weight: 500; }
.sheet-scrim { background: rgba(0,0,0,.4); }
.dialog { background: #fff; border: 0; color: var(--white); }
.dialog p { color: var(--white-60); font-weight: 500; }
.snackbar { background: var(--lime); color: var(--forest); font-weight: 600; }

/* BottomNavigation: translucent white, blurred (the one allowed blur) */
.bottom-nav { background: rgba(255,255,255,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bottom-nav .glass-btn { background: transparent; color: var(--white-60); }
.bottom-nav .glass-btn.active { background: var(--primary); color: var(--on-primary); }
.bottom-nav .nav-create { background: var(--primary); color: var(--on-primary); }
.bottom-nav.four { width: 284px; } .bottom-nav.five { width: 340px; } .bottom-nav { width: 216px; }

.coach-hole { box-shadow: 0 0 0 2000px rgba(20,68,37,.7); }
.coach-tip { background: var(--forest); color: #fff; }
.coach-tip p, .coach-tip .foot, .coach-tip .skip, .coach-tip .foot .count { color: var(--stone); }

.action-tile { color: var(--on-primary); }
.game-card .km, .game-card .gc-meta .km { font-size: 12px; }
.invited-tile .it-icon { background: var(--icon-btn); color: var(--white); }
.empty-view { color: var(--white-60); font-size: 15px; }
.empty-view .i { color: var(--white-40); }
.wheel-track span { color: var(--white); }
.wheel-band { background: var(--pill-bg); }
.m-slider, .slider { background: var(--stone); }
.m-slider .fill, .slider .fill { background: var(--forest); }
.m-slider .thumb, .slider .thumb { background: var(--forest); }

/* chat: own = forest bubble white text; received = white bubble; forest round send */
.bubble { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--forest); }
.bubble.mine { background: var(--forest); color: #fff; }
.bubble.theirs { background: #fff; color: var(--forest); }
.bubble.card-bubble { background: none; }
.reaction-pill { background: #fff; border: 0; box-shadow: 0 1px 3px rgba(20,68,37,.15); }
.day-divider { background: var(--pill-bg); color: var(--white-60); font-size: 12px; }
.typing { color: var(--white-60); }
.input-bar .input { backdrop-filter: none; font-size: 15px; background: #fff; }
.chat-tile .ct-preview { color: var(--white-60); }
.chat-tile.unread .ct-preview { color: var(--white); }
.chat-tile .ct-time { color: var(--white-60); }
.chat-tile .ct-unread { background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 12px; }
.shared-game .sg-status { background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 600; }
.group-avatar { background-color: var(--pill-bg); }
.status-pill { background: var(--pill-bg); color: var(--white); font-size: 12px; font-weight: 600; }
.player-row .you-pill { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.player-row .sel-circle { border: 2px solid var(--stone); background: transparent; color: var(--on-primary); }
.player-row .sel-circle.on { background: var(--primary); border-color: var(--primary); }
.player-row.hero, .app-card.primary.player-row.sel { background: var(--forest); color: #fff; }
.cbx { border-color: var(--forest); }
.cbx.on { background: var(--forest); border-color: var(--forest); }
.cbx.on::after { border-color: #fff; }
.touch { background: rgba(20,68,37,.25); border-color: rgba(255,255,255,.9); }

/* login / onboarding on forest: sage pill fields, neon selection, white social */
.screen.dark .input { background: var(--auth-field); color: var(--auth-text); }
.screen.dark .input .ph { color: var(--auth-hint); }
.screen.dark .input .caret { background: var(--primary); }
.screen.dark .sel-card { background: var(--auth-field); color: var(--auth-text); }
.screen.dark .sel-card.on { background: var(--primary); color: var(--on-primary); }
.screen.dark .sel-card .tick { background: var(--forest); color: var(--primary); }
.screen.dark .chip { background: var(--auth-field); color: var(--auth-text); }
.screen.dark .chip.active { background: var(--primary); color: var(--on-primary); }
.screen.dark .btn.outlined { background: var(--sage); color: #fff; }
.screen.dark .text-btn { color: var(--primary); }
.screen.dark .glass-btn { background: var(--icon-btn); color: var(--forest); }

.chip .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.chip.active .cnt { background: var(--forest); color: var(--primary); }
.segmented .chip.active .cnt { background: var(--forest); color: var(--primary); }
.glass-btn.filter { background: var(--filter-btn); color: var(--on-filter-btn); }

/* sheets: mist, radius 16, no handle (customModalBottomSheet) */
.sheet .handle { display: none; }
.sheet { border-radius: 16px 16px 0 0; }
.fs-header { display: flex; align-items: center; padding: 16px 16px 8px; }
.fs-header .fs-side { width: 96px; display: flex; align-items: center; }
.fs-header .fs-side.right { justify-content: flex-end; }
.fs-header .glass-btn { --s: 40px; }
.fs-header .fs-title { flex: 1; text-align: center; font-size: 22px; line-height: 28px; font-weight: 600; }
.fs-header .fs-reset { font-size: 13px; font-weight: 500; color: var(--white-60); padding: 0 4px; }
.fs-section { padding: 0 16px 24px; }
.fs-section-title { font-size: 18px; line-height: 24px; font-weight: 600; padding-bottom: 8px; }
.fs-apply { padding: 8px 16px 16px; }
.fs-slider { position: relative; height: 3px; border-radius: 2px; background: var(--white-12a); margin: 14px 8px; }
.fs-slider .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--selected-pill); }
.fs-slider .thumb { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--selected-pill); }
.fs-section .chip-row, .fs-sheet .chip-row { background: #fff; }

/* chat: input bar is a blurred strip (the 2nd allowed blur) with a white field */
.input-bar { background: rgba(237,242,233,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chat-tile .ct-unread, .badge { font-weight: 600; }
.sec-title { font-size: 18px; font-weight: 600; }

/* PhotoHero (lib/features/premium/presentation/widgets/photo_hero.dart): graded photo,
   one flat forest scrim, copy bottom-left, page sheet with round top (28) over the photo */
.photo-hero { position: relative; overflow: hidden; }
.photo-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; filter: url(#grade); }
.photo-hero .scrim { position: absolute; inset: 0; background: rgba(20,68,37,.4); }
.photo-hero .copy-in { position: absolute; left: 16px; right: 16px; bottom: 44px; color: #fff; }
.photo-hero .page-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 28px; background: var(--page); border-radius: 28px 28px 0 0; }
.photo-hero .hl { color: var(--primary); }
/* onboarding leftovers */
.screen.dark .glass, .screen.dark .navpill { backdrop-filter: none; background: rgba(20,68,37,.72); }
.screen.dark .navpill { background: rgba(101,125,110,.35); }

/* settings rows: icon in a 40px lime-grey circle (ProfileMenuListTile) */
.ic-c { width: 40px; height: 40px; border-radius: 50%; background: var(--icon-btn); color: var(--forest); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tile { gap: 12px; }
.settings-section > .title { margin: 0 8px 8px; }
.settings-section > .app-card, .settings-section > .app-card.danger { margin: 0; }
/* ArrowCircleButton: 44px, on neon = forest circle + neon arrow; on forest = neon circle + forest arrow */
.arrow-c { width: 44px; height: 44px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--forest); color: var(--primary); }
.arrow-c.neon { background: var(--primary); color: var(--forest); }
.lv-em-c { width: 48px; height: 48px; border-radius: 50%; background: var(--icon-btn); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.lv-em-c .lv-emblem.ring .core { background: var(--icon-btn); color: var(--forest); }
.lv-em-c .lv-emblem .core .n { color: var(--forest); }
.lv-em-c .lv-emblem .lv-ring .arc { stroke: var(--forest); }
.lv-em-c .lv-emblem .core { color: var(--forest); }
.lv-settings { margin: 0; gap: 12px; }
.app-card.hero .hcard-ic, .hcard.hero .ic { background: var(--primary); color: var(--forest); }

/* loose tab rows (add players, club kiezen): white stadium container with neon pills */
#tabs.tabs, #tabs.row { }
.tabs-white { background: #fff; border-radius: 999px; padding: 6px; display: inline-flex; gap: 8px; }
.tabs-white .chip { background: var(--pill-bg); color: var(--white); }
.tabs-white .chip.active { background: var(--primary); color: var(--on-primary); }
