:root {
  color-scheme: light dark;
  --bg: #edf2ee;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --surface-soft: rgba(234, 241, 236, 0.9);
  --text: #0e1c15;
  --muted: #5a6b62;
  --line: rgba(30, 50, 38, 0.11);
  --primary: #14784f;
  --primary-strong: #0d6040;
  --primary-faint: rgba(20, 120, 79, 0.10);
  --danger: #a43d35;
  --amber: #c07c28;
  --tentative: #ffd400;
  --tentative-text: #5f4a00;
  --blue: #2f5d93;
  --confirmed: #0d6040;
  --shadow: 0 24px 70px rgba(10, 20, 14, 0.14), 0 4px 14px rgba(10, 20, 14, 0.08);
  --shadow-sm: 0 2px 8px rgba(10, 20, 14, 0.07), 0 6px 20px rgba(10, 20, 14, 0.06);
  --shadow-card: 0 1px 3px rgba(10, 20, 14, 0.06), 0 4px 16px rgba(10, 20, 14, 0.07);
  --blur: saturate(1.4) blur(20px);
  --radius: 10px;
  --radius-sm: 7px;
  --sport-basketball: #e06820;
  --sport-soccer: #228b22;
  --sport-tennis: #c8a800;
  --sport-baseball: #8b2252;
  --sport-volleyball: #1a6fa8;
  --sport-frisbee: #1a9966;
  --sport-pickleball: #6a3ec4;
  --sport-yoga: #c45882;
  --sport-chess: #3a3a3a;
  --sport-cards: #b84040;
  --sport-custom: #4a6ab8;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1410;
    --surface: rgba(20, 30, 24, 0.80);
    --surface-strong: #162019;
    --surface-soft: rgba(30, 44, 36, 0.88);
    --text: #edf7f1;
    --muted: #a2b5aa;
    --line: rgba(230, 247, 236, 0.11);
    --primary: #4ecf88;
    --primary-strong: #2aba6e;
    --primary-faint: rgba(78, 207, 136, 0.12);
    --danger: #ff8077;
    --amber: #f0a855;
    --tentative: #ffd400;
    --tentative-text: #fff2a8;
    --blue: #7eb0ee;
    --confirmed: #2aba6e;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 4px 14px rgba(0, 0, 0, 0.22);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(0, 0, 0, 0.14);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.20), 0 4px 16px rgba(0, 0, 0, 0.18);
    --sport-basketball: #f08040;
    --sport-soccer: #4aad4a;
    --sport-tennis: #f0c830;
    --sport-baseball: #c46090;
    --sport-volleyball: #4a9fd8;
    --sport-frisbee: #3abf82;
    --sport-pickleball: #9a6ef0;
    --sport-yoga: #e880b0;
    --sport-chess: #b0b0b0;
    --sport-cards: #e87070;
    --sport-custom: #7a90e0;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 42%, transparent);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(ellipse at 20% 12%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 34%),
    radial-gradient(ellipse at 82% 80%, color-mix(in srgb, var(--blue) 10%, transparent), transparent 30%),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 4%, transparent) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--text) 4%, transparent) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 38px 38px, 38px 38px, auto;
}

.phone-frame {
  width: min(100%, 430px);
  height: min(920px, calc(100vh - 36px));
  min-height: 720px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
}

.toast {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 90px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px 11px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: 0 8px 32px rgba(10, 20, 14, 0.18), 0 2px 8px rgba(10, 20, 14, 0.10);
  font-size: 0.875rem;
  font-weight: 720;
  line-height: 1.4;
  text-align: left;
  touch-action: pan-y;
  animation: toast-in 180ms ease-out;
}

.top-alert-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 14;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--blur);
  cursor: pointer;
}

.alert-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 0.65rem;
  font-weight: 900;
}

.alerts-panel {
  position: absolute;
  top: 70px;
  left: 14px;
  right: 14px;
  z-index: 24;
  max-height: calc(100% - 104px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.alert-backdrop {
  z-index: 23;
}

.alerts-section {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.alerts-section h4 {
  margin: 0;
  font-size: 0.82rem;
}

.alert-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.alert-row.unread {
  padding-left: 22px;
  border-color: color-mix(in srgb, var(--danger) 22%, var(--line));
  background: color-mix(in srgb, var(--danger) 4%, var(--surface-soft));
}

.alert-unread-dot {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 12%, transparent);
  transform: translateY(-50%);
}

.alert-row-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-faint);
}

.alert-row strong {
  display: block;
  font-size: 0.85rem;
}

.alert-row p {
  margin: 2px 0 3px;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.35;
}

.alert-row small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
}

.toast-message {
  flex: 1 1 auto;
  min-width: 0;
}

.toast-action {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-faint);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 140ms ease, transform 120ms ease;
}

.toast-action:hover {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface-strong));
}

.toast-action:active {
  transform: scale(0.96);
}

.toast-dismiss {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 120ms ease;
}

.toast-dismiss:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.toast-dismiss:active {
  transform: scale(0.92);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 24;
  background: rgba(17, 24, 39, 0.28);
}

.share-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 10px 14px 20px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: var(--surface-strong);
  box-shadow: 0 -20px 54px rgba(17, 24, 39, 0.22);
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 2px;
  border-radius: 999px;
  background: var(--line);
}

.share-sheet p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.share-subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.share-link-card {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface-soft));
  transition: border-color 140ms ease, background 140ms ease;
}

.share-link-card:hover,
.share-link-card:focus-within {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  background: color-mix(in srgb, var(--primary) 9%, var(--surface-soft));
}

.share-link-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--primary-strong);
  background: var(--primary-faint);
}

.share-link-text {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.005em;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

.share-link-copy {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(140deg, var(--primary-strong), color-mix(in srgb, var(--primary-strong) 78%, var(--blue)));
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.01em;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--primary) 28%, transparent);
  transition: transform 120ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.share-link-copy:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 5px 14px color-mix(in srgb, var(--primary) 34%, transparent);
}

.share-link-copy:active:not(:disabled) {
  transform: scale(0.96);
}

.share-tiles {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin-top: 2px;
}

.share-tile {
  min-width: 0;
  overflow: hidden;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  padding: 8px 2px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-strong);
  font-size: 0.64rem;
  font-weight: 780;
  transition: transform 140ms ease, box-shadow 160ms ease, border-color 140ms ease;
}

.share-tile:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  box-shadow: 0 6px 18px rgba(10, 20, 14, 0.08);
  transform: translateY(-1px);
}

.share-tile:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(10, 20, 14, 0.06);
}

.share-tile:disabled .share-tile-icon {
  filter: grayscale(70%);
}

.share-tile-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--text);
  box-shadow: 0 4px 10px rgba(10, 20, 14, 0.16);
}

.share-tile-icon svg {
  width: 16px;
  height: 16px;
}

.share-tile-icon .social-icon-svg {
  width: 20px;
  height: 20px;
}

.share-tile-label {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-tile-text .share-tile-icon {
  background: linear-gradient(140deg, #6b7686, #3f4a5c);
}

.share-tile-email .share-tile-icon {
  background: linear-gradient(140deg, #4a90e2, #2462b8);
}

.share-tile-facebook .share-tile-icon {
  background: #1877f2;
}

.share-tile-instagram .share-tile-icon {
  background:
    radial-gradient(circle at 28% 110%, #feda75 0 18%, transparent 36%),
    radial-gradient(circle at 12% 92%, #fa7e1e 0 22%, transparent 42%),
    radial-gradient(circle at 86% 8%, #4f5bd5 0 24%, transparent 44%),
    linear-gradient(135deg, #833ab4, #e1306c 50%, #fd1d1d);
}

.share-tile-x .share-tile-icon {
  background: #050505;
}

.share-tile-more .share-tile-icon {
  background: linear-gradient(140deg, var(--primary-strong), color-mix(in srgb, var(--primary-strong) 60%, var(--blue)));
}

.social-icon-svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.social-icon-svg circle,
.social-icon-svg rect {
  fill: transparent;
}

.social-icon-svg path,
.social-icon-svg circle:not(:first-child) {
  fill: currentColor;
}

.screen {
  position: relative;
  z-index: 0;
  height: 100%;
  overflow: auto;
  padding: 22px 18px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 56%, transparent),
      color-mix(in srgb, var(--surface) 34%, transparent)
    ),
    url("../assets/brand/gameon-screen-bg.png") center / cover no-repeat;
  scroll-behavior: smooth;
}

.screen > * {
  position: relative;
  z-index: 1;
}

.with-nav {
  padding-bottom: 126px;
  scroll-padding-bottom: 126px;
}

.topbar,
.detail-header,
.section-header,
.toggle-row,
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  margin-bottom: 16px;
}

.feed-topbar {
  position: relative;
  min-height: 62px;
  justify-content: flex-start;
}

.feed-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.screen-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 270px;
  z-index: 0;
  pointer-events: none;
  object-fit: cover;
  object-position: center top;
  opacity: 1;
}

.screen > .screen-banner {
  position: absolute;
  z-index: 0;
}

.feed-screen::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 270px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.42) 62%, var(--surface));
}

@media (prefers-color-scheme: dark) {
  .feed-screen::after {
    background: linear-gradient(180deg, rgba(20, 30, 24, 0.06), rgba(20, 30, 24, 0.52) 62%, var(--surface));
  }
}

.eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 680;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-family: 'Barlow Condensed', ui-sans-serif, system-ui, sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.01em;
}

h2 {
  margin-bottom: 0;
  font-family: 'Barlow Condensed', ui-sans-serif, system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.feed-topbar h2,
.section-header h3,
.game-card h3,
.detail-screen h2,
.stats-row strong {
  font-family: 'Barlow Condensed', ui-sans-serif, system-ui, sans-serif;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.brand-logo,
.brand-icon {
  display: block;
  object-fit: contain;
  user-select: none;
}

.auth-brand {
  width: 100%;
  margin-bottom: 20px;
}

.auth-banner-wrap {
  width: calc(100% + 48px);
  margin: -32px -24px 22px;
  flex: 0 0 auto;
}

.auth-banner {
  display: block;
  width: 100%;
  aspect-ratio: 760 / 399;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.18);
}

.auth-logo {
  width: min(100%, 320px);
  max-height: 82px;
  object-position: left center;
  filter: drop-shadow(0 12px 22px rgba(17, 24, 39, 0.1));
}

.brand-icon {
  width: 28px;
  height: 28px;
}

.app-brandline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
}

.app-brandline .brand-icon {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 5px 10px rgba(0, 102, 255, 0.2));
}

.feed-topbar .app-brandline {
  position: absolute;
  left: 0;
  top: 4px;
  margin-bottom: 0;
}

.feed-topbar .brand-icon,
.feed-brand-lockup .brand-icon {
  width: 49px;
  height: 59px;
  object-fit: contain;
}

.feed-title-group {
  width: 100%;
  min-width: 0;
}

.feed-topbar .app-brandline + .feed-title-group {
  padding-left: 92px;
}

.auth-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 32px 24px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 62%, transparent),
      color-mix(in srgb, var(--surface) 40%, transparent)
    ),
    url("../assets/brand/gameon-screen-bg.png") center / cover no-repeat;
}

.auth-form {
  flex: 1;
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 2px;
}

.auth-copy {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-copy.shared-note {
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.segmented.compact {
  margin-bottom: 10px;
}

.segmented button,
.chip,
.text-button,
.secondary,
.primary,
.checkin,
.tool-grid button {
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 700;
}

.segmented button {
  color: var(--muted);
  background: transparent;
}

.segmented .active {
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 720;
  letter-spacing: 0.01em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 13px;
  color: var(--text);
  background: var(--surface-strong);
  outline: none;
  font-size: 0.95rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

input:disabled,
select:disabled,
textarea:disabled {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface-strong));
  border-style: dashed;
  cursor: not-allowed;
  opacity: 0.72;
}

.disabled-label {
  color: color-mix(in srgb, var(--muted) 66%, transparent);
}

.schedule-lock {
  margin: -4px 0 13px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

.primary,
.secondary,
.checkin,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 120ms ease, background 160ms ease, color 160ms ease;
}

.primary:active,
.secondary:active,
.checkin:active,
.text-button:active,
.game-card:active,
.bottom-nav button:active {
  transform: scale(0.985);
}

.primary {
  color: #ffffff;
  background: linear-gradient(140deg, var(--primary-strong), color-mix(in srgb, var(--primary-strong) 78%, var(--blue)));
  box-shadow: 0 3px 12px color-mix(in srgb, var(--primary) 30%, transparent);
}

.primary.active {
  background: var(--danger);
}

.secondary {
  color: var(--text);
  background: var(--surface-soft);
}

.signout-button {
  margin-top: 10px;
}

.secondary.active {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, var(--surface-strong));
}

.checkin {
  grid-column: 1 / -1;
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 13%, var(--surface-strong));
}

.checkin.active {
  color: #ffffff;
  background: var(--text);
}

.wide {
  width: 100%;
}

.map-strip {
  position: relative;
  display: block;
  width: 100%;
  height: 142px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent 0 46%, color-mix(in srgb, var(--primary) 20%, transparent) 46% 50%, transparent 50%),
    linear-gradient(0deg, transparent 0 38%, color-mix(in srgb, var(--primary) 16%, transparent) 38% 42%, transparent 42%),
    color-mix(in srgb, var(--primary) 9%, var(--surface-strong));
}

.map-strip:hover {
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
}

.leaflet-map {
  isolation: isolate;
}

.mini-leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.map-strip .leaflet-container,
.expanded-map.leaflet-container {
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--primary) 9%, var(--surface-strong));
  font-family: inherit;
}

.map-strip-open {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  background: transparent;
  text-align: left;
}

.map-fallback-visible .map-grid-lines,
.map-fallback-visible .map-water,
.map-fallback-visible .map-road,
.map-fallback-visible .you-are-here {
  display: block;
}

.route {
  position: absolute;
  left: 42px;
  top: 74px;
  width: 280px;
  height: 4px;
  background: var(--amber);
  transform: rotate(-12deg);
}

.map-pin {
  position: absolute;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--primary-strong);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.22);
}

.sport-icon {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.sport-icon svg {
  width: 17px;
  height: 17px;
}

.sport-icon.custom {
  font-size: 0.72rem;
}

.sport-icon.sport-art {
  min-width: 22px;
  width: 22px;
  height: 22px;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
}

.sport-icon.sport-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sport-pill .sport-icon.sport-basketball img,
.sport-pill .sport-icon.sport-soccer img,
.sport-pill .sport-icon.sport-custom img {
  transform: translateY(-2px);
}

.map-pin.mini {
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.map-pin.mini .sport-icon {
  min-width: 22px;
  height: 22px;
  background: transparent;
  font-size: 0.72rem;
}

.map-pin.mini .sport-icon svg {
  width: 20px;
  height: 20px;
}

.map-pin.expanded {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.76);
  font-size: 0.73rem;
  font-weight: 850;
  white-space: nowrap;
}

.map-pin.expanded > span:not(.sport-icon) {
  color: #111827;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.82);
}

.map-pin.image-marker {
  width: auto;
  height: auto;
  overflow: visible;
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.pin-image {
  display: block;
  width: 26px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.3));
}

.map-pin.mini.image-marker {
  width: 30px;
  height: 38px;
  flex-direction: column;
  gap: 1px;
  transform: translate(-50%, -88%);
}

.map-pin.mini .pin-image {
  width: 22px;
  height: 28px;
}

.map-pin.mini.image-marker .pin-label {
  max-width: 58px;
  color: #111827;
  padding: 1px 4px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1.1;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(17, 24, 39, 0.12);
}

.map-pin.mini.image-marker.status-confirmed .pin-label {
  box-shadow: inset 0 0 0 3px #38b423, 0 3px 8px rgba(17, 24, 39, 0.12);
}

.map-pin.mini.image-marker.status-maybe-confirmed .pin-label {
  box-shadow: inset 0 0 0 3px #ffd400, 0 3px 8px rgba(17, 24, 39, 0.12);
}

.map-pin.mini.image-marker.status-short .pin-label {
  box-shadow: inset 0 0 0 3px #e01f26, 0 3px 8px rgba(17, 24, 39, 0.12);
}

.map-pin.expanded.image-marker {
  min-width: 48px;
  min-height: 58px;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  border: 0;
  transform: translate(-50%, -92%);
  font-size: 0.72rem;
  font-weight: 850;
}

.map-pin.expanded.image-marker .pin-image {
  width: 32px;
  height: 42px;
}

.map-pin.expanded.image-marker .pin-label {
  max-width: 86px;
  color: #111827;
  padding: 2px 7px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.12);
}

.map-pin.expanded.image-marker.status-confirmed .pin-label {
  box-shadow: inset 0 0 0 4px #38b423, 0 4px 12px rgba(17, 24, 39, 0.12);
}

.map-pin.expanded.image-marker.status-maybe-confirmed .pin-label {
  box-shadow: inset 0 0 0 4px #ffd400, 0 4px 12px rgba(17, 24, 39, 0.12);
}

.map-pin.expanded.image-marker.status-short .pin-label {
  box-shadow: inset 0 0 0 4px #e01f26, 0 4px 12px rgba(17, 24, 39, 0.12);
}

.map-pin.status-confirmed {
  background: var(--primary-strong);
}

.map-pin.status-maybe-confirmed {
  color: #112019;
  background: #ffd05a;
}

.map-pin.status-maybe-confirmed .sport-icon {
  background: rgba(17, 32, 25, 0.12);
}

.map-pin.status-short {
  background: var(--danger);
}

.map-pin.image-marker.status-confirmed,
.map-pin.image-marker.status-maybe-confirmed,
.map-pin.image-marker.status-short {
  color: var(--text);
  background: transparent;
}

.map-pin.one {
  left: 38px;
  top: 36px;
}

.map-pin.two {
  right: 70px;
  top: 30px;
  background: var(--danger);
}

.map-pin.three {
  left: 174px;
  bottom: 28px;
  background: var(--blue);
}

.map-copy {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  font-size: 0.81rem;
  font-weight: 760;
  backdrop-filter: var(--blur);
}

.map-expand {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  font-size: 0.78rem;
  font-weight: 820;
  backdrop-filter: var(--blur);
}

.map-screen {
  padding-bottom: 28px;
}

.map-header {
  align-items: flex-start;
}

.expanded-map {
  position: relative;
  height: 340px;
  margin: 2px 0 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent 0 48%, color-mix(in srgb, var(--primary) 16%, transparent) 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 0 36%, color-mix(in srgb, var(--primary) 14%, transparent) 36% 40%, transparent 40%),
    color-mix(in srgb, var(--primary) 8%, var(--surface-strong));
}

.map-grid-lines {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
}

.map-water {
  position: absolute;
  right: -46px;
  top: 36px;
  width: 150px;
  height: 230px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 24%, transparent);
  transform: rotate(18deg);
}

.map-road {
  position: absolute;
  border-radius: 999px;
  background: color-mix(in srgb, var(--amber) 72%, var(--surface-strong));
}

.map-road.main {
  left: -22px;
  top: 182px;
  width: 470px;
  height: 9px;
  transform: rotate(-14deg);
}

.map-road.cross {
  left: 162px;
  top: -28px;
  width: 8px;
  height: 410px;
  transform: rotate(24deg);
}

.you-are-here {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
  font-size: 0.75rem;
  font-weight: 820;
  transform: translate(-50%, -50%);
  backdrop-filter: var(--blur);
}

.you-are-here span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-strong);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 20%, transparent);
}

.map-radius {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 780;
}

.search-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.search-row input {
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.search-row input:focus-visible {
  outline: 0;
}

.search-row:focus-within {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

.search-clear {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin-left: 4px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: color-mix(in srgb, var(--text) 8%, transparent);
  transition: background 140ms ease, color 140ms ease, transform 120ms ease;
}

.search-clear:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 14%, transparent);
}

.search-clear:active {
  transform: scale(0.92);
}

.map-suggestions {
  min-height: 0;
  display: flex;
  gap: 6px;
  margin: -4px 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.map-suggestions::-webkit-scrollbar {
  display: none;
}

.map-suggestions button,
.empty-suggestion {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  font-size: 0.76rem;
  font-weight: 800;
}

.map-suggestions button span {
  color: var(--muted);
  font-weight: 700;
}

.empty-suggestion {
  color: var(--muted);
}

.search-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.search-filter-row .search-row {
  margin-bottom: 0;
}

.location-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.compact-button {
  min-height: 48px;
  padding: 0 13px;
  white-space: nowrap;
}

.location-results {
  display: grid;
  gap: 7px;
  margin: 8px 0 12px;
}

.location-results button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  text-align: left;
}

.location-results button:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-strong));
}

.location-results strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.location-results span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.location-picker-map {
  height: 190px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-strong));
}

.location-pick-fallback {
  pointer-events: none;
}

.location-coordinate-help {
  margin-top: 8px;
}

.filter-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-strong);
  font-size: 0.82rem;
  font-weight: 820;
}

.filter-button.active {
  color: var(--primary-strong);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface-strong));
}

.filter-button span {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary-strong);
  font-size: 0.7rem;
}

.detail-filter-panel,
.form-detail-fields,
.game-detail-tags {
  display: grid;
  gap: 10px;
  margin: 10px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
}

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

.compact-filter-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 780;
  line-height: 1.15;
  text-align: right;
}

.compact-filter-toggle .toggle {
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  padding: 2px;
}

.compact-filter-toggle .toggle span {
  width: 16px;
  height: 16px;
}

.compact-filter-toggle .toggle.on span {
  transform: translateX(14px);
}

.filter-section,
.detail-select-group {
  display: grid;
  gap: 7px;
}

.filter-section > span,
.detail-select-group > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.01em;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-chip {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.8rem;
  font-weight: 680;
  transition: color 130ms ease, background 130ms ease, border-color 130ms ease, transform 120ms ease;
}

.single-choice-row .tag-chip {
  border-radius: 12px;
}

.single-choice-row .tag-chip.active::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-radius: 999px;
  background: currentColor;
}

.tag-chip.active {
  color: #ffffff;
  border-color: color-mix(in srgb, var(--primary) 65%, var(--line));
  background: var(--primary-strong);
}

.tag-chip:active {
  transform: scale(0.97);
}

.clear-filters {
  justify-self: start;
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 8px -18px 18px;
  padding: 0 18px 4px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 0 13px;
  color: var(--muted);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 700;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.chip.active,
.sport-pill {
  color: #ffffff;
  background: var(--text);
  border-color: transparent;
}

@media (prefers-color-scheme: dark) {
  .chip.active,
  .sport-pill {
    color: #0e1c15;
    background: #ffffff;
  }
}

.section-header {
  margin-bottom: 10px;
}

.section-header.compact {
  margin-bottom: 8px;
}

.text-button {
  padding: 0 11px;
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-strong));
}

.game-list {
  display: grid;
  gap: 10px;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-card-wrap {
  position: relative;
  animation: card-in 220ms ease-out both;
}

.game-card-wrap:nth-child(1) { animation-delay: 0ms; }
.game-card-wrap:nth-child(2) { animation-delay: 40ms; }
.game-card-wrap:nth-child(3) { animation-delay: 80ms; }
.game-card-wrap:nth-child(4) { animation-delay: 120ms; }
.game-card-wrap:nth-child(n+5) { animation-delay: 155ms; }

/* Search/filter keystroke updates set this class so we don't re-run the
   entry animation on every remaining card on every keystroke. */
.game-list.no-card-animation .game-card-wrap {
  animation: none;
}

.game-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 15px 15px 13px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: var(--shadow-card);
  transition: transform 130ms ease, box-shadow 160ms ease;
  overflow: hidden;
}

.game-card-skeleton {
  display: grid;
  gap: 10px;
  min-height: 154px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow-card);
  animation: skeleton-fade 900ms ease-in-out var(--delay, 0ms) infinite alternate;
}

.game-card-skeleton span,
.game-card-skeleton strong,
.game-card-skeleton em,
.game-card-skeleton small {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--surface-soft), color-mix(in srgb, var(--primary) 8%, var(--surface-soft)), var(--surface-soft));
  background-size: 220% 100%;
  animation: skeleton-shimmer 1100ms linear infinite;
}

.game-card-skeleton span {
  width: 42%;
  height: 25px;
}

.game-card-skeleton strong {
  width: 78%;
  height: 21px;
}

.game-card-skeleton em {
  width: 100%;
  height: 38px;
}

.game-card-skeleton small {
  width: 64%;
  height: 13px;
}

.game-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--sport-accent, var(--primary));
  opacity: 0.88;
}

.game-card.status-confirmed {
  --game-status-accent: #38b423;
}

.game-card.status-maybe-confirmed {
  --game-status-accent: var(--tentative);
}

.game-card.status-short {
  --game-status-accent: #e01f26;
}

.game-card.status-confirmed::before,
.game-card.status-maybe-confirmed::before,
.game-card.status-short::before {
  background: var(--game-status-accent);
}

.game-card.status-maybe-confirmed {
  border-color: var(--line);
  box-shadow: var(--shadow-card);
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(10, 20, 14, 0.12), 0 12px 36px rgba(10, 20, 14, 0.09);
}

.card-share {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--primary-strong);
  background: var(--primary-faint);
  transition: background 150ms ease, transform 120ms ease;
}

.card-share:hover {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface-strong));
}

.card-top,
.card-footer {
  padding-right: 52px;
}

.card-top,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sport-pill,
.spots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.01em;
}

.sport-pill {
  color: #ffffff;
  background: #0e1c15;
}

.sport-basketball { --sport-accent: var(--sport-basketball); }
.sport-soccer { --sport-accent: var(--sport-soccer); }
.sport-tennis { --sport-accent: var(--sport-tennis); }
.sport-baseball { --sport-accent: var(--sport-baseball); }
.sport-volleyball { --sport-accent: var(--sport-volleyball); }
.sport-frisbee { --sport-accent: var(--sport-frisbee); }
.sport-pickleball { --sport-accent: var(--sport-pickleball); }
.sport-yoga { --sport-accent: var(--sport-yoga); }
.sport-chess { --sport-accent: var(--sport-chess); }
.sport-cards { --sport-accent: var(--sport-cards); }
.sport-custom { --sport-accent: var(--sport-custom); }

@media (prefers-color-scheme: dark) {
  .sport-pill {
    color: #0e1c15;
    background: #ffffff;
  }
}

.spots {
  color: var(--primary-strong);
  background: var(--primary-faint);
}

.spots.full {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 13%, var(--surface-strong));
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.01em;
}

.status-badge.confirmed {
  color: #064e32;
  background: color-mix(in srgb, #16a34a 15%, var(--surface-strong));
  border-color: color-mix(in srgb, #16a34a 34%, transparent);
}

.status-badge.maybe-confirmed {
  color: var(--tentative-text);
  background: color-mix(in srgb, var(--tentative) 24%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--tentative) 58%, transparent);
}

.status-badge.short {
  color: #7f1d1d;
  background: color-mix(in srgb, #dc2626 13%, var(--surface-strong));
  border-color: color-mix(in srgb, #dc2626 30%, transparent);
}

@media (prefers-color-scheme: dark) {
  .status-badge.confirmed {
    color: #c9fbe0;
    background: color-mix(in srgb, #22c55e 18%, var(--surface-strong));
    border-color: color-mix(in srgb, #22c55e 42%, transparent);
  }

  .status-badge.short {
    color: #ffd7d4;
    background: color-mix(in srgb, #ff8077 18%, var(--surface-strong));
    border-color: color-mix(in srgb, #ff8077 40%, transparent);
  }

  .status-badge.maybe-confirmed {
    color: var(--tentative-text);
    background: color-mix(in srgb, var(--tentative) 18%, var(--surface-strong));
    border-color: color-mix(in srgb, var(--tentative) 48%, transparent);
  }
}

.game-card h3 {
  margin: 10px 0 8px;
  font-size: 1.1rem;
  font-weight: 740;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.meta-grid span:nth-child(5) {
  grid-column: 1 / -1;
}

.meta-grid span,
.card-footer span,
.info-panel div,
.toggle-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-grid span,
.card-footer,
.detail-address,
.notes,
.profile-hero p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.progress {
  height: 5px;
  margin: 12px 58px 9px 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 70%, var(--blue)));
  transition: width 400ms ease;
}

.card-footer span:last-child {
  color: var(--blue);
  font-weight: 760;
}

.card-footer span:last-child:first-child {
  color: var(--muted);
  font-weight: 600;
}

.create-fab {
  position: absolute;
  right: 18px;
  bottom: 92px;
  z-index: 19;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 36%, var(--line));
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  box-shadow: 0 12px 28px rgba(10, 116, 70, 0.26);
  font-size: 0.9rem;
  font-weight: 740;
  transition: transform 130ms ease, box-shadow 160ms ease;
}

.create-fab:active {
  transform: scale(0.97);
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 8px 10px 16px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  backdrop-filter: var(--blur);
}

.bottom-nav button {
  position: relative;
  min-height: 56px;
  display: grid;
  place-items: center;
  gap: 3px;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 640;
  transition: color 140ms ease, background 140ms ease;
}

.nav-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-badge,
.mini-badge {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--danger);
  font-size: 0.66rem;
  font-weight: 760;
  line-height: 1;
}

.mini-badge {
  min-width: 18px;
  height: 18px;
}

.mini-badge.floating {
  position: absolute;
  top: -5px;
  right: -5px;
}

.bottom-nav .active {
  color: var(--primary-strong);
  background: var(--primary-faint);
}

.detail-screen {
  padding-bottom: 22px;
}

.detail-header {
  margin-bottom: 18px;
}

.detail-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.detail-screen h2 {
  margin: 10px 0 6px;
  font-size: 1.95rem;
  font-weight: 820;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -18px 16px;
  padding: 16px 18px 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, var(--surface-strong)), color-mix(in srgb, var(--blue) 10%, var(--surface-strong)));
  border-bottom: 1px solid var(--line);
}

.stats-row,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.stats-row div,
.profile-grid div,
.rating-card,
.settings-panel,
.info-panel,
.admin-tools {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.stats-row div,
.profile-grid div {
  min-height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  box-shadow: var(--shadow-sm);
}

.stats-row strong,
.profile-grid strong,
.rating-card strong {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stats-row span,
.profile-grid span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 720;
}

.info-panel,
.settings-panel,
.admin-tools,
.reminder-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.form-section {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
}

.field-help {
  margin: -7px 0 10px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.maybe-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.mine-section {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.mine-section h3 {
  margin: 0;
}

.settings-subgroup {
  display: grid;
  gap: 4px;
  padding-top: 4px;
}

.settings-subgroup + .settings-subgroup {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.settings-subgroup h4 {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-panel .toggle-row + .toggle-row,
.settings-subgroup .toggle-row + .toggle-row {
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.info-panel div {
  color: var(--text);
  font-size: 0.91rem;
  line-height: 1.4;
}

.reminder-panel h3 {
  margin-bottom: 4px;
}

.reminder-panel .setting-note {
  margin: 0;
}

.reminder-row {
  margin: 0;
}

.notes {
  padding: 13px 14px;
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: color-mix(in srgb, var(--amber) 9%, var(--surface-strong));
  font-size: 0.88rem;
  line-height: 1.5;
}

.confirm-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
}

.confirm-hint svg {
  flex: 0 0 auto;
}

.confirm-hint.confirmed {
  color: #064e32;
  background: color-mix(in srgb, #16a34a 12%, var(--surface-strong));
  border-color: color-mix(in srgb, #16a34a 30%, transparent);
}

.confirm-hint.tentative {
  color: var(--tentative-text);
  background: color-mix(in srgb, var(--tentative) 20%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--tentative) 52%, transparent);
}

.confirm-hint.short {
  color: #7f1d1d;
  background: color-mix(in srgb, #dc2626 11%, var(--surface-strong));
  border-color: color-mix(in srgb, #dc2626 28%, transparent);
}

@media (prefers-color-scheme: dark) {
  .confirm-hint.confirmed {
    color: #c9fbe0;
    background: color-mix(in srgb, #22c55e 16%, var(--surface-strong));
    border-color: color-mix(in srgb, #22c55e 38%, transparent);
  }

  .confirm-hint.short {
    color: #ffd7d4;
    background: color-mix(in srgb, #ff8077 16%, var(--surface-strong));
    border-color: color-mix(in srgb, #ff8077 36%, transparent);
  }

  .confirm-hint.tentative {
    color: var(--tentative-text);
    background: color-mix(in srgb, var(--tentative) 14%, var(--surface-strong));
    border-color: color-mix(in srgb, var(--tentative) 40%, transparent);
  }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 14px;
  border-left-color: var(--primary);
  background: var(--primary-faint);
}

.empty-state-text {
  display: grid;
  gap: 4px;
}

.empty-state-text strong {
  font-size: 0.98rem;
  font-weight: 700;
}

.empty-state-text span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.empty-state-cta {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.avatar-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.avatar-list span,
.avatar-list-item,
.profile-avatar {
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
}

.avatar-list span,
.avatar-list-item {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.avatar-list-item {
  position: relative;
  padding: 0;
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 140ms ease;
}

.avatar-list-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(10, 20, 14, 0.18);
}

.avatar-list-item:active {
  transform: scale(0.96);
}

.avatar-initials {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: inherit;
  background: transparent;
}

.avatar-score {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: auto;
  min-width: 24px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 3px;
  border: 1px solid color-mix(in srgb, var(--surface-strong) 80%, transparent);
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary-strong);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(10, 20, 14, 0.28);
}

.avatar-score.new {
  min-width: 27px;
  color: var(--primary-strong);
  background: var(--surface-strong);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  font-size: 0.5rem;
}

.avatar-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--danger);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(10, 20, 14, 0.25);
}

.participant-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.participant-card {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  text-align: left;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.participant-card.is-you {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  background: color-mix(in srgb, var(--primary) 6%, var(--surface-strong));
}

.participant-card.removable {
  cursor: pointer;
  transition: transform 120ms ease, border-color 140ms ease, background 140ms ease;
}

.participant-card.removable:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line));
  background: color-mix(in srgb, var(--danger) 7%, var(--surface-strong));
}

.participant-card.removable:active {
  transform: scale(0.985);
}

.participant-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--primary-strong));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.participant-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.participant-copy strong,
.participant-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 740;
}

.participant-copy small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 620;
}

.you-badge {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-faint);
  font-size: 0.64rem;
  font-weight: 760;
}

.participant-remove {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--danger);
}

.maybe-list .participant-avatar {
  color: #2f2400;
  background: linear-gradient(135deg, #ffdf52, #ffb800);
}

.waitlist-list .participant-avatar {
  background: linear-gradient(135deg, #64748b, #334155);
}

.waitlist-chips,
.maybe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.waitlist-chip,
.maybe-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.waitlist-chip.removable,
.maybe-chip.removable {
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 120ms ease;
}

.waitlist-chip.removable:hover,
.maybe-chip.removable:hover {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  background: color-mix(in srgb, var(--danger) 9%, var(--surface-strong));
}

.waitlist-chip.removable:active,
.maybe-chip.removable:active {
  transform: scale(0.97);
}

.waitlist-chip span[aria-hidden="true"],
.maybe-chip span[aria-hidden="true"] {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--danger);
  font-size: 0.8rem;
  line-height: 1;
}

.player-manager-header {
  display: grid;
  gap: 2px;
  padding-top: 2px;
}

.player-manager-header strong {
  font-size: 0.9rem;
  font-weight: 820;
}

.player-manager-header span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.player-manager {
  display: grid;
  gap: 7px;
}

.player-manager-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface-soft);
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, transform 120ms ease;
}

.player-manager-row span {
  display: grid;
  gap: 2px;
}

.player-manager-row strong {
  font-size: 0.86rem;
  font-weight: 790;
}

.player-manager-row small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.player-manager-row svg {
  color: var(--danger);
  flex: 0 0 auto;
}

.player-manager-row:hover {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface-strong));
}

.player-manager-row:active {
  transform: scale(0.98);
}

.message-tools {
  margin: 12px 0;
}

.message-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.message-recipient-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 740;
}

.message-thread {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.empty-thread {
  max-height: none;
}

.thread-bubble {
  width: min(82%, 280px);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
}

.thread-bubble.outgoing {
  justify-self: end;
  color: var(--primary-strong);
  background: var(--primary-faint);
}

.thread-bubble strong,
.thread-bubble small {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted);
}

.thread-bubble p {
  margin: 3px 0;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.35;
}

.message-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.message-actions button {
  min-height: 42px;
}

.inbox-panel {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.full-inbox-panel {
  margin-top: 0;
}

.inbox-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inbox-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 720;
  letter-spacing: 0.01em;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.inbox-action:active:not(:disabled) {
  transform: scale(0.96);
}

.inbox-action-primary {
  padding: 0 8px 0 12px;
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 11%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--primary) 22%, transparent);
  font-size: 0.78rem;
}

.inbox-action-primary > svg {
  margin-left: 2px;
  opacity: 0.75;
}

.inbox-action-primary:hover:not(:disabled) {
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 17%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--primary) 36%, transparent);
}

.inbox-action-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary-strong);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--primary) 32%, transparent);
}

.inbox-action-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.inbox-action-icon:hover:not(:disabled) {
  color: var(--primary-strong);
  background: var(--primary-faint);
  border-color: color-mix(in srgb, var(--primary) 28%, transparent);
}

.inbox-action-icon:active:not(:disabled) > svg {
  animation: refresh-spin 360ms ease-out;
}

@keyframes refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.inbox-message {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-strong);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 120ms ease;
}

.inbox-message.unread {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-soft));
}

.unread-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

.inbox-message:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  background: color-mix(in srgb, var(--primary) 7%, var(--surface-soft));
}

.inbox-message:active {
  transform: scale(0.99);
}

.inbox-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
}

.inbox-message.unread .inbox-icon {
  color: var(--primary-strong);
  background: var(--primary-faint);
}

.inbox-message-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.inbox-message strong {
  font-size: 0.86rem;
  font-weight: 720;
}

.inbox-preview {
  display: block;
  margin: 3px 0 4px;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.38;
}

.inbox-message small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 620;
}

.skeleton-row {
  height: 58px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-soft), color-mix(in srgb, var(--primary) 8%, var(--surface-soft)), var(--surface-soft));
  background-size: 220% 100%;
  animation: skeleton-shimmer 1100ms linear infinite;
}

.skeleton-row.short {
  height: 46px;
  width: 72%;
}

@keyframes skeleton-shimmer {
  to { background-position: -220% 0; }
}

@keyframes skeleton-fade {
  from { opacity: 0.72; }
  to { opacity: 1; }
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tool-grid button {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-strong);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
  transition: border-color 140ms ease, background 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.tool-grid button > svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  padding: 8px;
  box-sizing: content-box;
  border-radius: 50%;
  color: var(--primary-strong);
  background: var(--primary-faint);
  transition: color 160ms ease, background 160ms ease;
}

.tool-grid button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
  background: color-mix(in srgb, var(--primary) 4%, var(--surface-strong));
  box-shadow: 0 4px 12px rgba(10, 20, 14, 0.06);
  transform: translateY(-1px);
}

.tool-grid button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 4px rgba(10, 20, 14, 0.04);
}

.tool-grid button[data-action="delete-game"] > svg {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, var(--surface-strong));
}

.tool-grid button[data-action="delete-game"] {
  color: var(--danger);
}

.tool-grid button[data-action="delete-game"]:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
  background: color-mix(in srgb, var(--danger) 5%, var(--surface-strong));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--danger) 14%, transparent);
}

.detail-actions {
  position: sticky;
  left: auto;
  right: auto;
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 20px -18px -22px;
  padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
  backdrop-filter: var(--blur);
}

.detail-actions > button {
  min-width: 0;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  color: inherit;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 130ms ease, box-shadow 200ms ease, background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.detail-actions > button > svg {
  flex: 0 0 auto;
}

.detail-actions > button:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

.detail-actions > button:disabled {
  color: var(--muted);
  background: var(--surface-soft);
  border-color: var(--line);
  box-shadow: none;
  cursor: not-allowed;
}

.detail-actions .secondary {
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 9%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--amber) 28%, transparent);
  box-shadow: none;
}

.detail-actions .secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--amber) 14%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--amber) 42%, transparent);
}

.detail-actions .secondary.active {
  color: #fff;
  background: linear-gradient(140deg, var(--amber), color-mix(in srgb, var(--amber) 80%, var(--danger)));
  border-color: transparent;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--amber) 38%, transparent);
}

.detail-actions .primary {
  color: #fff;
  background: linear-gradient(140deg, var(--primary-strong), color-mix(in srgb, var(--primary-strong) 76%, var(--blue)));
  border-color: transparent;
  box-shadow: 0 5px 16px color-mix(in srgb, var(--primary) 34%, transparent);
}

.detail-actions .primary:hover:not(:disabled) {
  filter: brightness(1.04);
  box-shadow: 0 7px 20px color-mix(in srgb, var(--primary) 42%, transparent);
}

.detail-actions .primary.active {
  color: #fff;
  background: linear-gradient(140deg, var(--danger), color-mix(in srgb, var(--danger) 78%, #000));
  border-color: transparent;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--danger) 36%, transparent);
}

.detail-actions .primary.active:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--danger) 44%, transparent);
}

.detail-actions .checkin {
  grid-column: auto;
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--primary) 24%, transparent);
}

.detail-actions .checkin:hover:not(:disabled) {
  background: color-mix(in srgb, var(--primary) 16%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--primary) 38%, transparent);
}

.detail-actions .checkin.active {
  color: #fff;
  background: linear-gradient(140deg, var(--primary-strong), color-mix(in srgb, var(--primary-strong) 70%, #000));
  border-color: transparent;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--primary) 34%, transparent);
}

.form-screen {
  padding-bottom: 30px;
}

.form-screen > .primary.wide {
  position: sticky;
  bottom: 0;
  margin-top: 6px;
  box-shadow: 0 -10px 22px color-mix(in srgb, var(--surface-strong) 82%, transparent);
}

.split {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
}

.player-limits {
  grid-template-columns: 1fr 1fr;
}

.time-range {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
}

.optional-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
}

.toggle-row {
  min-height: 52px;
  color: var(--text);
  font-weight: 760;
}

.disabled-toggle-row {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.toggle:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.notification-row {
  align-items: flex-start;
}

.notification-row span {
  display: grid;
  gap: 4px;
}

.notification-row small,
.setting-note,
.notification-game-list small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.3;
}

.notification-scope {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface-strong));
}

.setting-note {
  margin-bottom: 0;
}

.notification-game-list {
  display: grid;
  gap: 6px;
}

.notification-sport-list {
  display: grid;
  gap: 7px;
}

.notification-sport-list > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notification-game-list button {
  min-height: 52px;
  padding: 10px 14px;
  display: grid;
  gap: 2px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-strong);
  font-weight: 600;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 200ms ease, transform 120ms ease;
}

.notification-game-list button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
  background: color-mix(in srgb, var(--primary) 4%, var(--surface-strong));
}

.notification-game-list button:active:not(:disabled) {
  transform: scale(0.99);
}

.notification-game-list button.active {
  border-color: color-mix(in srgb, var(--primary) 60%, var(--line));
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-strong));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 14%, transparent);
}

.subform-panel {
  display: grid;
  gap: 0;
  margin: 8px 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  transition: background 160ms ease, border-color 160ms ease;
}

.subform-panel.open {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-strong));
}

.subform-content {
  padding: 0 0 10px 12px;
  border-left: 2px solid color-mix(in srgb, var(--primary) 38%, var(--line));
}

.subform-content[hidden] {
  display: none;
}

.form-detail-fields {
  margin: 12px 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.form-detail-fields.open {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-strong));
}

.form-detail-toggle {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.form-detail-toggle span {
  display: grid;
  gap: 3px;
}

.form-detail-toggle strong {
  font-size: 0.96rem;
}

.form-detail-content {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.form-detail-content[hidden] {
  display: none;
}

.game-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.game-detail-tags span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 0.76rem;
  font-weight: 780;
}

.recurring-panel {
  display: grid;
  gap: 12px;
  margin: 8px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 9%, var(--surface-strong));
}

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

.recurring-panel h3 {
  margin-bottom: 4px;
}

.recurring-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.weekday-grid button {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 0.76rem;
  font-weight: 820;
}

.weekday-grid button.active {
  color: #ffffff;
  background: var(--primary-strong);
}

.toggle {
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  box-shadow: inset 0 1px 2px rgba(10, 20, 14, 0.06);
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.toggle span {
  width: 22px;
  height: 22px;
  display: block;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(10, 20, 14, 0.18), 0 1px 1px rgba(10, 20, 14, 0.08);
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle.on {
  background: linear-gradient(140deg, var(--primary-strong), color-mix(in srgb, var(--primary-strong) 78%, var(--blue)));
  border-color: transparent;
  box-shadow: inset 0 1px 2px rgba(10, 20, 14, 0.16);
}

.toggle.on span {
  transform: translateX(20px);
}

.toggle:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
}

.toggle.on:hover:not(:disabled) {
  border-color: transparent;
  filter: brightness(1.05);
}

.profile-hero {
  min-height: 200px;
  display: grid;
  place-items: center;
  align-content: center;
  margin: -22px -18px 18px;
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(13, 96, 64, 0.96) 0%, rgba(24, 60, 110, 0.95) 100%),
    url("data:image/svg+xml,%3Csvg width='220' height='220' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 58h220M0 116h220M0 174h220M58 0v220M116 0v220M174 0v220' stroke='%23ffffff' stroke-opacity='.10' stroke-width='6'/%3E%3C/svg%3E");
}

.profile-avatar {
  width: 76px;
  height: 76px;
  margin-bottom: 10px;
  border: 2.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 1.4rem;
  font-weight: 800;
}

.profile-hero h2 {
  margin-bottom: 4px;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.rating-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-strong) 0%, color-mix(in srgb, var(--blue) 60%, var(--primary-strong)) 100%);
  box-shadow: var(--shadow-sm);
}

.rating-card div {
  display: grid;
  gap: 3px;
}

.rating-card p {
  max-width: 260px;
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  line-height: 1.35;
}

.rating-card .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.rating-card .new-player-score {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.profile-grid {
  grid-template-columns: 1fr 1fr;
}

.settings-panel h3 {
  margin-bottom: 0;
}

.settings-panel input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 4px 0 6px;
  padding: 0;
  background: transparent;
  accent-color: var(--primary-strong);
  cursor: pointer;
}

.settings-panel input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.settings-panel input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.settings-panel input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-strong), color-mix(in srgb, var(--primary-strong) 70%, var(--blue)));
}

.settings-panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(10, 20, 14, 0.22), inset 0 0 0 2px var(--primary-strong);
  cursor: grab;
  transition: transform 140ms ease, box-shadow 160ms ease;
}

.settings-panel input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.08);
  cursor: grabbing;
}

.settings-panel input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--primary-strong);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(10, 20, 14, 0.22);
  cursor: grab;
  transition: transform 140ms ease;
}

.settings-panel input[type="range"]:active::-moz-range-thumb {
  transform: scale(1.08);
  cursor: grabbing;
}

.settings-panel label[for="radius"] {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.settings-panel label[for="radius"] #radius-label {
  color: var(--primary-strong);
  font-weight: 800;
}

.admin-row {
  min-height: 42px;
  color: var(--muted);
}

.admin-row strong {
  color: var(--text);
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 0;
    background: var(--surface);
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}
