.live-shell {
  max-width: 1280px;
  margin: auto;
  padding: 24px;
}
.live-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.live-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.live-nav button {
  padding: 12px 20px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--line);
}
.live-nav .active {
  background: var(--blue);
  color: white;
}
.live-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.live-card {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 16px;
}
.live-card h2 {
  margin-bottom: 18px;
}
.live-card .button {
  margin: 4px;
}
.live-card p {
  margin: 12px 0;
}
.live-card input,
.live-card select,
.live-card textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dce2ee;
  border-radius: 10px;
  font: inherit;
  margin: 6px 0 16px;
}
.live-card label {
  display: block;
}
.live-card textarea {
  min-height: 160px;
}
.live-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #eef1f6;
  flex-wrap: wrap;
}
.live-row .avatar {
  width: 44px;
  height: 44px;
  font-size: 18px;
  flex: none;
}
.live-row .grow {
  flex: 1;
}
.live-row select {
  width: auto;
  margin: 0;
}
.live-muted {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}
.live-pitch {
  position: relative;
  aspect-ratio: 3/4;
  background: #eff5f1;
  border: 2px solid #b4ccc0;
  border-radius: 12px;
  max-width: 500px;
  margin: 20px auto;
}
.live-pitch:before {
  content: "";
  position: absolute;
  top: 50%;
  width: 100%;
  border-top: 1px solid #b4ccc0;
}
.live-pitch .token {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--blue);
  color: white;
  border: 3px solid white;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  z-index: 2;
}
.live-pitch svg {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.live-pitch small {
  position: absolute;
  top: 46px;
  left: 50%;
  transform: translateX(-50%);
  color: #17336d;
  white-space: nowrap;
}
.live-pitch .photo-token {
  border-radius: 14px;
  width: 64px;
  height: 60px;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 6px 15px #17336d15;
}
.live-pitch .photo-token strong {
  font-size: 22px;
}
.live-pitch .photo-token small {
  top: 60px;
}
.live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
#feedback {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #17294a;
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  z-index: 99;
  max-width: 90vw;
}
#feedback:empty {
  display: none;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.live-table {
  width: 100%;
  border-collapse: collapse;
}
.live-table td,
.live-table th {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid #eef1f6;
}
.live-top select {
  max-width: 180px;
  padding: 8px;
}
.live-card code {
  overflow-wrap: anywhere;
  user-select: all;
}
.live-card .slot-choice {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.login-stage {
  max-width: 520px;
  margin: 12vh auto;
  padding: 24px;
}
.login-stage img {
  width: 90px;
}
.login-stage h1 {
  margin: 24px 0 16px;
  font-size: 36px;
}
.login-stage p {
  line-height: 1.8;
}
.login-stage #google {
  margin: 24px 0;
}
@media (max-width: 700px) {
  .live-shell {
    padding: 16px;
  }
  .live-grid {
    grid-template-columns: 1fr;
  }
  .live-top {
    flex-wrap: wrap;
  }
  .live-nav {
    flex-wrap: nowrap;
    overflow: auto;
    scrollbar-width: none;
  }
  .live-nav::-webkit-scrollbar {
    display: none;
  }
  .live-nav button {
    white-space: nowrap;
    padding: 12px;
  }
  .live-card {
    padding: 18px;
  }
  .logo {
    font-size: 18px;
  }
  .live-top .button {
    padding: 8px;
  }
  .live-pitch {
    max-width: 100%;
  }
}
/* Team onboarding and membership controls retain the approved compact card language. */
[hidden] {
  display: none !important;
}
.invite-input {
  min-height: 100px !important;
  resize: vertical;
}
.invite-code-box {
  padding: 16px;
  background: #edf3ff;
  border-radius: 12px;
  margin: 16px 0;
}
.invite-code-box input {
  font-family: monospace;
  font-size: 13px;
}
.member-management {
  max-width: 100%;
}
.member-management summary {
  cursor: pointer;
  color: var(--blue);
  padding: 10px;
}
.member-management .live-actions {
  margin: 4px 0;
}
.member-search {
  margin-top: 24px;
}
.live-row small {
  line-height: 1.7;
}
.live-row h2 {
  margin: 0;
}
.live-card h1 {
  margin-bottom: 12px;
}
@media (max-width: 700px) {
  .member-management {
    width: 100%;
  }
  .member-management .live-actions {
    display: grid;
  }
  .live-top > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .live-top select {
    max-width: 100%;
    min-width: 120px;
  }
  .live-top .button {
    min-height: 40px;
  }
  .live-row .button {
    min-height: 44px;
  }
}

.slot-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}
.live-card .slot-lock input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.attendance-edit {
  max-width: 100%;
}
.attendance-edit summary {
  cursor: pointer;
  padding: 12px;
  color: var(--blue);
}

.profile-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}
.profile-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-token .profile-avatar {
  width: 58px;
  height: 54px;
  border-radius: 10px;
  font-size: 22px;
}

.mom-root fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 16px 0;
  padding: 16px;
}
.mom-root fieldset label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
}
.mom-root input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}
.mom-root li {
  padding: 8px 0;
}

/* Match operations use semantic status, compact facts and an actual football-pitch ratio. */
.live-pitch {
  aspect-ratio: 68/105;
}
.eyebrow {
  display: block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.form-pair,
.match-detail-grid,
.squad-config {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.match-card .match-facts {
  font-size: 13px;
  color: #526079;
  line-height: 1.8;
}
.match-detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 20px 0;
}
.match-detail-grid > span {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  padding: 14px;
  background: #f6f8fb;
  border-radius: 12px;
}
.match-detail-grid small {
  color: #64748b;
}
.match-detail-grid b {
  grid-column: 2;
}
.rsvp-choice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.rsvp-choice .button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 54px;
  background: #fff;
  border: 1px solid #dbe2ec;
  color: #1f2d46;
}
.rsvp-choice .button[data-rsvp="yes"] {
  border-color: #93d6af;
}
.rsvp-choice .button[data-rsvp="maybe"] {
  border-color: #f4ce79;
}
.rsvp-choice .button[data-rsvp="no"] {
  border-color: #d7dce5;
}
.rsvp-choice .button[data-selected="true"] {
  box-shadow: inset 0 0 0 2px var(--blue);
  background: #edf3ff;
}
.rsvp-choice b {
  font-size: 10px;
  color: var(--blue);
}
.squad-config {
  grid-template-columns: repeat(3, 1fr);
}
.squad-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: start;
}
.squad-pitch {
  width: 100%;
  margin-top: 0;
}
.substitution-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(150px, 1.5fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f5;
}
.substitution-row > div small {
  display: block;
  color: #64748b;
  margin-top: 4px;
}
.substitution-row select {
  margin: 0;
}
.substitution-row .slot-lock {
  grid-column: 2/-1;
  margin: 0;
}
.my-hero {
  background: #17294a;
  color: white;
}
.my-hero .eyebrow {
  color: #96b7ff;
}
.my-hero p {
  color: #cfdaed;
}
.team-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #2457e6;
  color: white;
  font-weight: 700;
}
.team-mark.pending {
  background: #e8ecf3;
  color: #64748b;
}
.profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: #f6f8fb;
  border-radius: 14px;
  margin: 16px 0;
}
.profile-summary .avatar {
  width: 54px;
  height: 54px;
}
@media (max-width: 800px) {
  .match-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .squad-workspace {
    grid-template-columns: 1fr;
  }
  .substitution-row {
    grid-template-columns: 1fr 1.4fr auto;
  }
  .substitution-row > [data-action="bench-slot"] {
    grid-column: 3;
  }
  .rsvp-choice {
    grid-template-columns: 1fr;
  }
  .form-pair,
  .squad-config {
    grid-template-columns: 1fr;
  }
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  padding: 28px 20px 36px;
  color: #6b778c;
  font-size: 12px;
}
.legal-footer a,
.privacy-settings a {
  color: #526079;
}
.consent-stage {
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(circle at 12% 3%, #dce8ff 0, transparent 28%),
    #f6f8fb;
}
.consent-top {
  max-width: 760px;
  margin: 0 auto 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.consent-card {
  max-width: 620px;
  margin: auto;
  padding: 42px;
  border: 1px solid #e2e7ef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(23, 41, 74, 0.09);
}
.consent-card h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.25;
}
.consent-list {
  display: grid;
  gap: 10px;
  margin: 28px 0 20px;
}
.consent-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 17px;
  border: 1px solid #dfe5ee;
  border-radius: 14px;
  cursor: pointer;
}
.consent-row:has(input:checked) {
  border-color: #8eadff;
  background: #f4f7ff;
}
.consent-row.optional {
  margin-top: 6px;
}
.consent-row input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #2457e6;
  flex: 0 0 auto;
}
.consent-row span,
.marketing-setting div {
  display: grid;
  gap: 5px;
}
.consent-row em {
  margin-right: 7px;
  color: #2457e6;
  font-size: 11px;
  font-style: normal;
}
.consent-row.optional em {
  color: #6b778c;
}
.consent-row small,
.marketing-setting small {
  color: #66748a;
  line-height: 1.55;
}
.consent-submit {
  width: 100%;
  min-height: 52px;
}
.legal-link-list {
  display: grid;
  margin: 18px 0;
  border-top: 1px solid #e5e9f0;
}
.legal-link-list a {
  display: flex;
  justify-content: space-between;
  padding: 15px 2px;
  border-bottom: 1px solid #e5e9f0;
  text-decoration: none;
  font-weight: 700;
}
.marketing-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 10px;
}
.privacy-contact {
  margin-top: 22px;
}
@media (max-width: 620px) {
  .consent-stage { padding: 14px; }
  .consent-top { margin-bottom: 24px; }
  .consent-card { padding: 28px 20px; border-radius: 20px; }
  .marketing-setting { align-items: flex-start; flex-direction: column; }
}

/* v0.19 — production service UI */
:root {
  --live-bg: #f3f6fb;
  --live-panel: #ffffff;
  --live-ink: #14213a;
  --live-muted: #69758a;
  --live-line: #dde4ef;
  --live-blue: #2457e6;
  --live-blue-dark: #173fae;
  --live-navy: #172d50;
  --live-soft: #eaf0ff;
}

body:has(.live-shell) {
  background: var(--live-bg);
  color: var(--live-ink);
}

.live-shell {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 88% 6%, #dce7ff 0, transparent 24rem),
    var(--live-bg);
}

.live-top {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 76px;
  margin: 0;
  padding: 13px clamp(22px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--live-line);
  backdrop-filter: blur(18px);
}

.live-top .logo {
  gap: 12px;
  color: var(--live-ink);
  font-size: 20px;
}

.live-top .logo img {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 5px 10px rgba(23, 45, 80, 0.12));
}

.live-account {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-account select,
.live-account .button {
  min-height: 42px;
  margin: 0;
  border-color: #d8e0ec;
  border-radius: 11px;
  background: #fff;
  color: #24334e;
  font-size: 12px;
}

.live-account select {
  min-width: 150px;
  max-width: 210px;
  padding: 0 36px 0 13px;
}

.live-account .button {
  padding: 9px 14px;
}

.live-workspace {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  max-width: 1480px;
  min-height: calc(100dvh - 76px);
  margin: auto;
}

.live-nav {
  position: sticky;
  top: 76px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: calc(100dvh - 76px);
  margin: 0;
  padding: 30px 18px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid var(--live-line);
}

.live-nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 10px 13px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #657188;
  font-size: 13px;
  text-align: left;
}

.live-nav button:hover {
  background: #fff;
  color: var(--live-ink);
}

.live-nav .active {
  background: var(--live-soft);
  color: var(--live-blue);
  box-shadow: inset 0 0 0 1px rgba(36, 87, 230, 0.08);
}

.nav-dot {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #e8edf5;
  color: #70809a;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.live-nav .active .nav-dot {
  background: var(--live-blue);
  color: #fff;
}

.live-nav [data-tab="home"] .nav-dot::before { content: "H"; }
.live-nav [data-tab="members"] .nav-dot::before { content: "P"; }
.live-nav [data-tab="rules"] .nav-dot::before { content: "R"; }
.live-nav [data-tab="stats"] .nav-dot::before { content: "ST"; font-size: 8px; }
.live-nav [data-tab="my"] .nav-dot::before { content: "MY"; font-size: 8px; }
.live-nav [data-tab="match"] .nav-dot::before { content: "M"; }
.live-nav [data-tab="squad"] .nav-dot::before { content: "S"; }
.live-nav [data-tab="tactics"] .nav-dot::before { content: "T"; }
.live-nav [data-tab="referee"] .nav-dot::before { content: "REF"; font-size: 7px; }

.live-content {
  min-width: 0;
}

.live-content main,
.onboarding-shell > main {
  width: min(100%, 1180px);
  min-height: calc(100dvh - 170px);
  margin: 0 auto;
  padding: 38px clamp(22px, 4vw, 48px) 72px;
  animation: live-enter 260ms ease-out both;
}

.onboarding-shell {
  max-width: 1120px;
  margin: auto;
}

.live-content .legal-footer,
.onboarding-shell .legal-footer {
  padding: 22px 24px 34px;
  color: #8791a2;
  font-size: 10px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.page-heading h1 {
  margin: 5px 0 7px;
  color: var(--live-ink);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.24;
  letter-spacing: -1.6px;
}

.page-heading p {
  color: var(--live-muted);
  font-size: 13px;
}

.page-heading.compact {
  margin-bottom: 22px;
}

.page-heading.compact h1 {
  font-size: clamp(26px, 3vw, 34px);
}

.eyebrow {
  margin: 0;
  color: var(--live-blue);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.live-card {
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid var(--live-line);
  border-radius: 18px;
  background: var(--live-panel);
  box-shadow: 0 12px 34px rgba(24, 48, 89, 0.045);
}

.live-card h1,
.live-card h2,
.live-card h3 {
  color: var(--live-ink);
}

.live-card h1 {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -1.2px;
}

.live-card h2 {
  font-size: 19px;
}

.live-muted {
  color: var(--live-muted);
}

.button {
  min-height: 46px;
  padding: 11px 17px;
  border-color: #d9e1ed;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
}

.button:hover {
  border-color: #afbdd2;
  background: #f5f7fb;
}

.button.primary {
  border-color: var(--live-blue);
  background: var(--live-blue);
  box-shadow: 0 7px 16px rgba(36, 87, 230, 0.16);
}

.button.primary:hover {
  border-color: var(--live-blue-dark);
  background: var(--live-blue-dark);
}

.button.wide { width: 100%; }

.live-card input,
.live-card select,
.live-card textarea,
.rules-editor textarea {
  min-height: 48px;
  margin: 7px 0 16px;
  padding: 12px 14px;
  border: 1px solid #d8e0ec;
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--live-ink);
}

.live-card input:focus,
.live-card select:focus,
.live-card textarea:focus,
.rules-editor textarea:focus {
  border-color: var(--live-blue);
  background: #fff;
  outline: 3px solid rgba(36, 87, 230, 0.12);
}

.home-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.match-feed,
.home-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.match-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--live-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 13px 36px rgba(24, 48, 89, 0.055);
}

.match-card.featured {
  min-height: 330px;
  padding: clamp(26px, 4vw, 38px);
  border-color: transparent;
  background:
    radial-gradient(circle at 92% 8%, rgba(115, 157, 255, 0.36), transparent 17rem),
    linear-gradient(145deg, #17325e, #1d4fc5);
  color: #fff;
  box-shadow: 0 24px 50px rgba(18, 48, 109, 0.2);
}

.match-card.featured::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 270px;
  height: 270px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: inset 0 0 0 34px rgba(255, 255, 255, 0.035);
}

.match-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.match-card .chip {
  background: var(--live-soft);
  color: var(--live-blue);
}

.match-card.featured .chip {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.match-number {
  color: #a7b4c9;
  font: 700 11px/1 Arial, sans-serif;
  letter-spacing: 0.16em;
}

.match-card.featured .match-number { color: rgba(255, 255, 255, 0.55); }

.match-card h2 {
  max-width: 16ch;
  margin: 25px 0 7px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
  letter-spacing: -1.2px;
}

.match-card.featured h2 { color: #fff; }

.match-date {
  font-size: 14px;
  font-weight: 700;
}

.match-place {
  margin-top: 7px !important;
  color: var(--live-muted);
  font-size: 12px;
}

.match-card.featured .match-place { color: #d8e4ff; }

.match-fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 24px 0 18px;
}

.match-fact-row span {
  padding: 7px 9px;
  border-radius: 8px;
  background: #f3f6fa;
  color: #55627a;
  font-size: 10px;
}

.match-card.featured .match-fact-row span {
  background: rgba(255, 255, 255, 0.11);
  color: #e6edff;
}

.match-card.featured .button:not(.primary) {
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
}

.match-card.featured .button.primary {
  border-color: #fff;
  background: #fff;
  color: var(--live-blue-dark);
  box-shadow: none;
}

.match-card.compact h2 {
  margin-top: 16px;
  font-size: 22px;
}

.empty-match-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  min-height: 330px;
  padding: clamp(26px, 4vw, 42px);
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%),
    var(--live-navy);
  color: #fff;
  box-shadow: 0 22px 50px rgba(23, 45, 80, 0.2);
}

.empty-match-card::before {
  content: "";
  position: absolute;
  inset: auto -8% -65% 35%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.empty-match-card > div,
.empty-match-card img { position: relative; z-index: 1; }

.empty-match-card .eyebrow { color: #9cbcff; }

.empty-match-card h2 {
  margin: 10px 0 12px;
  color: #fff;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.25;
  letter-spacing: -1.4px;
}

.empty-match-card p {
  max-width: 42ch;
  margin-bottom: 24px;
  color: #d5dff1;
  font-size: 13px;
  line-height: 1.75;
}

.empty-match-card img {
  width: 100%;
  max-height: 235px;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(4, 19, 43, 0.25));
  animation: manager-float 3.8s ease-in-out infinite;
}

.team-glance,
.home-helper,
.match-create {
  border: 1px solid var(--live-line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(24, 48, 89, 0.045);
}

.team-glance {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px;
}

.team-crest {
  display: grid;
  place-items: center;
  width: 52px;
  height: 57px;
  flex: 0 0 auto;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
  background: var(--live-blue);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.team-glance small,
.match-create summary small {
  display: block;
  color: #8792a4;
  font: 700 9px/1.4 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.team-glance h3 { margin: 3px 0; font-size: 15px; }
.team-glance p { color: var(--live-muted); font-size: 10px; }

.match-create {
  padding: 0;
  overflow: hidden;
}

.match-create summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 18px 19px;
  border: 0;
  cursor: pointer;
  list-style: none;
}

.match-create summary::-webkit-details-marker { display: none; }
.match-create summary b { display: block; margin-top: 3px; font-size: 14px; }
.match-create summary i { color: var(--live-blue); font-size: 24px; font-style: normal; transition: transform 180ms; }
.match-create[open] summary i { transform: rotate(45deg); }
.match-create form { padding: 4px 19px 20px; border-top: 1px solid #e8edf4; }
.match-create label { display: block; min-width: 0; font-size: 14px; font-weight: 500; }
.match-create input, .match-create select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 8px 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--live-line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--live-ink);
  font: inherit;
}
.match-create input:focus-visible, .match-create select:focus-visible {
  border-color: var(--live-blue);
  outline: 3px solid #2457e620;
}
.match-create .form-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.home-dashboard-grid:has(.match-create[open]) { grid-template-columns: minmax(0, 1fr); }
.home-dashboard-grid:has(.match-create[open]) .home-side { grid-template-columns: minmax(0, 1fr); }
.home-dashboard-grid:has(.match-create[open]) .match-create { order: -1; scroll-margin-top: 92px; }
.home-dashboard-grid:has(.match-create[open]) .match-feed { display: none; }
.match-create[open] form { max-width: 760px; margin: auto; padding: 24px; }
.match-create fieldset { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.match-create legend { margin-bottom: 16px; font-size: 17px; font-weight: 700; }
.match-create .live-muted { margin-bottom: 20px; }
.match-create .place-entry { margin: 0 0 24px; }

.home-helper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.home-helper img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.home-helper b { font-size: 11px; }
.home-helper p { margin-top: 3px; color: var(--live-muted); font-size: 9px; line-height: 1.55; }

.rules-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.7fr);
  gap: 18px;
  align-items: stretch;
}

.rules-guide,
.rules-editor,
.stats-table-card {
  border: 1px solid var(--live-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(24, 48, 89, 0.045);
}

.rules-guide {
  padding: 25px;
  background:
    radial-gradient(circle at 100% 0, #dce7ff 0, transparent 11rem),
    #fff;
}

.rules-guide h2 { margin: 22px 0 8px; font-size: 19px; }
.rules-guide p { color: var(--live-muted); font-size: 11px; line-height: 1.7; }
.rules-guide ul { margin: 22px 0 0; padding: 0; list-style: none; }
.rules-guide li { padding: 11px 0; border-top: 1px solid #e8edf4; color: #536079; font-size: 11px; }

.rules-editor { padding: 24px; }
.rules-editor > label { display: block; font-size: 12px; font-weight: 700; }
.rules-editor textarea { width: 100%; min-height: 360px; resize: vertical; line-height: 1.85; }
.editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.editor-foot small { color: #8792a4; font-size: 10px; }

.stat-overview {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--live-line);
  border-radius: 17px;
  background: var(--live-navy);
  color: #fff;
  box-shadow: 0 18px 42px rgba(23, 45, 80, 0.16);
}

.stat-overview > div {
  padding: 21px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-overview > div:last-child { border-right: 0; }
.stat-overview small { display: block; color: #afc0dd; font-size: 10px; }
.stat-overview strong { display: block; margin-top: 5px; font-size: 27px; line-height: 1.2; }

.stats-table-card { padding: 24px; }
.stats-title { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.stats-title h2 { font-size: 18px; }
.stats-title span { color: #8792a4; font-size: 10px; }
.table-scroll { overflow-x: auto; }
.live-table { min-width: 520px; }
.live-table th { color: #8993a5; font-size: 10px; font-weight: 500; }
.live-table td { color: #41506a; font-size: 12px; }
.live-table td:not(:first-child),
.live-table th:not(:first-child) { text-align: center; }
.live-table .rank { display: inline-block; width: 30px; color: #a0aabc; font: 700 9px/1 Arial, sans-serif; }
.empty-inline { padding: 28px 0 8px; color: var(--live-muted); font-size: 12px; text-align: center; }

.my-hero {
  position: relative;
  min-height: 180px;
  padding: 31px;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 92% 12%, rgba(103, 145, 242, 0.38), transparent 18rem),
    var(--live-navy);
  box-shadow: 0 18px 42px rgba(23, 45, 80, 0.15);
}

.my-hero::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.my-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 38px); }

.live-grid {
  gap: 18px;
}

.live-row {
  flex-wrap: nowrap;
  padding: 15px 0;
}

.live-row:last-child { border-bottom: 0; }

.live-content main:has(#profile-photo-editor) {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.live-content main:has(#profile-photo-editor) > .live-card {
  margin: 0;
}

.live-content main:has(#profile-photo-editor) > .live-card:first-child,
.live-content main:has(#profile-photo-editor) > .live-card:last-child {
  grid-column: 1 / -1;
}

#profile-photo-editor {
  min-height: 100%;
}

#profile-photo-editor > div {
  border: 1px solid #e3e9f2;
  box-shadow: inset 0 0 0 7px #f4f7fd;
}

#profile-photo-editor input[type="file"] {
  padding: 8px;
  background: #f8faff;
  color: var(--live-muted);
  font-size: 10px;
}

#profile-photo-editor input[type="file"]::file-selector-button {
  min-height: 36px;
  margin-right: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--live-blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.match-overview {
  padding: clamp(24px, 4vw, 36px);
  border: 0;
  background:
    radial-gradient(circle at 100% 0, #dce7ff 0, transparent 20rem),
    #fff;
}

.match-tools {
  margin: 18px 0;
  padding: 10px;
  border: 1px solid var(--live-line);
  border-radius: 14px;
  background: #fff;
}

.remote-loading {
  display: grid;
  gap: 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.remote-loading span {
  height: 76px;
  border-radius: 15px;
  background: linear-gradient(90deg, #e9edf4 25%, #f5f7fb 45%, #e9edf4 65%);
  background-size: 250% 100%;
  animation: skeleton 1.2s linear infinite;
}

#feedback {
  bottom: 28px;
  padding: 13px 18px;
  border-radius: 12px;
  background: var(--live-navy);
  box-shadow: 0 14px 34px rgba(23, 45, 80, 0.24);
  font-size: 12px;
}

@keyframes live-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@keyframes manager-float {
  50% { transform: translateY(-7px) rotate(1deg); }
}

@keyframes skeleton {
  to { background-position: -250% 0; }
}

@media (max-width: 1040px) {
  .live-workspace { grid-template-columns: 184px minmax(0, 1fr); }
  .live-nav { padding-inline: 13px; }
  .home-dashboard-grid { grid-template-columns: 1fr; }
  .home-side { grid-template-columns: 1fr 1fr; }
  .home-helper { grid-column: 1 / -1; }
  .match-create .form-pair { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (max-width: 820px) {
  body:has(.live-shell) { background: #f5f7fb; }
  .live-top {
    min-height: 68px;
    padding: 10px 16px;
  }
  .live-top .logo { font-size: 17px; }
  .live-top .logo img { width: 37px; height: 37px; }
  .live-account { margin-left: auto; min-width: 0; }
  .live-account select { min-width: 0; max-width: 128px; height: 40px; padding-left: 10px; }
  .live-account .button[data-action="new-team"] { display: none; }
  .live-account .button[data-action="logout"] { min-width: 62px; width: auto; padding: 8px; font-size: 11px; white-space: nowrap; }
  .live-workspace { display: block; min-height: calc(100dvh - 68px); }
  .live-nav {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    height: auto;
    padding: 6px 7px max(8px, env(safe-area-inset-bottom));
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid var(--live-line);
    border-right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    scrollbar-width: none;
  }
  .live-nav::-webkit-scrollbar { display: none; }
  .live-nav button {
    flex: 1 0 62px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 54px;
    padding: 4px;
    border-radius: 10px;
    font-size: 9px;
    text-align: center;
  }
  .nav-dot { width: 24px; height: 23px; border-radius: 7px; }
  .live-content main,
  .onboarding-shell > main {
    min-height: calc(100dvh - 145px);
    padding: 26px 16px 108px;
  }
  .live-content .legal-footer { padding-bottom: 100px; }
  .page-heading { align-items: flex-start; margin-bottom: 21px; }
  .page-heading h1 { font-size: 28px; letter-spacing: -1.2px; }
  .page-heading p { font-size: 11px; }
  .page-heading > .button { display: none; }
  .home-dashboard-grid { gap: 16px; }
  .home-side { grid-template-columns: 1fr; }
  .home-helper { grid-column: auto; }
  .match-card.featured,
  .empty-match-card { min-height: 315px; }
  .empty-match-card { grid-template-columns: minmax(0, 1fr) 112px; padding: 26px 22px; }
  .empty-match-card img { max-height: 180px; }
  .empty-match-card p { font-size: 11px; }
  .match-card { padding: 23px 20px; }
  .match-card h2 { font-size: 27px; }
  .match-card .live-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .match-card .live-actions .button:first-child { grid-column: 1 / -1; }
  .match-create .form-pair { grid-template-columns: 1fr; gap: 0; }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-guide { display: none; }
  .rules-editor { padding: 19px; }
  .rules-editor textarea { min-height: 330px; }
  .editor-foot { align-items: stretch; flex-direction: column; }
  .stat-overview { grid-template-columns: repeat(5, minmax(84px, 1fr)); overflow-x: auto; }
  .stat-overview > div { padding: 16px 14px; }
  .stat-overview strong { font-size: 23px; }
  .stats-table-card { padding: 18px 16px; }
  .stats-title { align-items: flex-start; flex-direction: column; gap: 4px; }
  .live-grid { grid-template-columns: 1fr; }
  .my-hero { min-height: 160px; padding: 25px 22px; }
  .live-content main:has(#profile-photo-editor) { grid-template-columns: 1fr; }
  .live-content main:has(#profile-photo-editor) > .live-card:first-child,
  .live-content main:has(#profile-photo-editor) > .live-card:last-child { grid-column: auto; }
  .live-card { padding: 20px 18px; border-radius: 16px; }
  .live-row { align-items: flex-start; flex-wrap: wrap; }
  .live-row .grow { min-width: calc(100% - 66px); }
  .match-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #feedback { bottom: 85px; }
}

@media (max-width: 440px) {
  .live-top .logo { font-size: 0; gap: 0; }
  .live-top .logo img { width: 38px; height: 38px; }
  .live-account select { max-width: 145px; }
  .page-heading h1 { font-size: 25px; }
  .empty-match-card { display: block; min-height: 360px; }
  .empty-match-card > div { max-width: 78%; }
  .empty-match-card img { position: absolute; right: -8px; bottom: 3px; width: 145px; }
  .match-card .live-actions { grid-template-columns: 1fr; }
  .match-card .live-actions .button:first-child { grid-column: auto; }
  .stat-overview { margin-inline: -16px; border-radius: 0; }
  .marketing-setting { align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .empty-match-card img,
  .remote-loading span,
  .live-content main { animation: none; }
}

.match-create [hidden] { display: none !important; }
.match-step-status { color: var(--live-blue); font-size: 13px; font-weight: 700; margin-bottom: 24px; }
.match-step-actions { display: flex; gap: 12px; }
.match-step-actions .primary { flex: 1; }
.match-create form { scroll-margin-top: 90px; }


.match-create input[type="hidden"] { display:none; }
