body.mobile-page {
  min-width: 320px;
  margin: 0;
  color: #1f2522;
  background: #edf2ee;
  font-family: "Segoe UI", Arial, sans-serif;
}

.mobile-shell {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 76, 51, 0.08);
}

.mobile-app-brand {
  width: 100%;
  min-height: 26px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #155ea8;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.mobile-app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  gap: 10px;
  padding: 14px 14px 12px;
  color: white;
  background: #17633f;
}

.mobile-title-row {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
}

.mobile-icon-button,
.mobile-pill-button,
.mobile-nav a,
.mobile-nav button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.mobile-icon-button {
  width: 42px;
  color: white;
  background: rgba(255, 255, 255, 0.14);
}

.mobile-title-copy {
  min-width: 0;
}

.mobile-title-copy strong,
.mobile-title-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-title-copy strong {
  font-size: 0.98rem;
}

.mobile-title-copy span {
  margin-top: 2px;
  opacity: 0.86;
  font-size: 0.78rem;
}

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mobile-nav a,
.mobile-nav button {
  min-width: 0;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
  padding: 0 8px;
  font-size: 0.78rem;
  line-height: 1.05;
  text-align: center;
}

.mobile-nav a.active,
.mobile-nav button.active {
  color: #0b3425;
  background: #fffaf1;
}

.mobile-content {
  display: grid;
  gap: 14px;
  padding: 14px 12px 92px;
}

.mobile-card {
  background: #fffaf1;
  border: 1px solid rgba(31, 37, 34, 0.12);
  border-radius: 6px;
  padding: 14px;
}

.mobile-card.white {
  background: #ffffff;
}

.mobile-kicker {
  margin: 0 0 6px;
  color: #b7955b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 950;
}

.mobile-card h1,
.mobile-card h2,
.mobile-card h3,
.mobile-section-title {
  margin: 0;
  color: #0b3425;
  letter-spacing: 0;
}

.mobile-card p,
.mobile-muted {
  margin: 8px 0 0;
  color: #617067;
  line-height: 1.45;
  font-size: 0.9rem;
}

.mobile-grid-tabs,
.mobile-format-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
}

.mobile-grid-tabs button,
.mobile-format-tabs button,
.admin-action,
.pool-action {
  min-height: 42px;
  border: 1px solid #d9e3dc;
  border-radius: 999px;
  color: #34443b;
  background: #f7faf8;
  padding: 0 14px;
  font: inherit;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-grid-tabs button.active,
.mobile-format-tabs button.active {
  color: white;
  background: #17633f;
  border-color: #17633f;
}

.leader-mini {
  display: grid;
  gap: 8px;
}

.leader-mini-head,
.leader-mini-row {
  display: grid;
  grid-template-columns: 1fr 48px 52px;
  align-items: center;
  gap: 8px;
}

.leader-mini-head {
  margin-top: 10px;
  color: #617067;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  font-weight: 950;
}

.leader-mini-head span:nth-child(2),
.leader-mini-head span:nth-child(3),
.leader-mini-row strong:nth-child(2),
.leader-mini-row strong:nth-child(3) {
  width: 100%;
  display: block;
  text-align: center;
}

.leader-mini-row {
  color: #26342c;
  font-size: 0.9rem;
}

.leader-player {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leader-player span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.initial-badge {
  --badge: #17633f;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  background: var(--badge);
  border-radius: 50%;
  font-weight: 950;
  font-size: 0.72rem;
}

.score-table-wrap {
  overflow-x: auto;
  background: white;
  border: 1px solid #dfe7e1;
  border-radius: 6px;
}

.score-table {
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
}

.score-table th,
.score-table td {
  border-bottom: 1px solid #edf1ee;
  padding: 7px 5px;
  text-align: center;
  font-size: 0.82rem;
}

.score-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #34443b;
  background: #eef4f0;
}

.score-table td:first-child,
.score-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
}

.score-table tr:nth-child(even) td {
  background: #f8faf8;
}

.score-cell-controls {
  display: inline-grid;
  grid-template-columns: 25px 34px 25px;
  align-items: center;
  gap: 2px;
}

.score-cell-controls button {
  width: 25px;
  height: 30px;
  border: 0;
  color: #17633f;
  background: #edf5f0;
  border-radius: 3px;
  font-weight: 950;
}

.score-value {
  display: inline-grid;
  min-width: 30px;
  min-height: 30px;
  place-items: center;
  color: #203128;
  font-weight: 950;
}

.score-value.birdie,
.score-value.eagle {
  color: #0f5c3c;
  border: 2px solid #4fbe79;
  border-radius: 50%;
}

.score-value.eagle {
  background: #d9f5e4;
}

.score-value.bogey,
.score-value.double {
  color: #8a3f12;
  border: 2px solid #e8a45c;
  border-radius: 6px;
}

.score-value.double {
  color: #9f231d;
  background: #f8dfdb;
  border-color: #c3463e;
}

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

.admin-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f7faf8;
  border: 1px solid #dfe7e1;
  border-radius: 5px;
}

.admin-row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #203128;
  font-weight: 900;
}

.admin-row small {
  color: #68766e;
  line-height: 1.35;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-action,
.pool-action {
  border-radius: 4px;
  color: white;
  background: #17633f;
  border-color: #17633f;
  text-decoration: none;
}

.admin-action.secondary,
.pool-action.secondary {
  color: #17633f;
  background: white;
  border-color: #b9d7c6;
}

.data-note {
  color: #4d5d54;
  background: #edf6f1;
  border: 1px dashed #94c3a9;
  border-radius: 5px;
  padding: 10px;
  line-height: 1.4;
  font-size: 0.84rem;
}

.pool-frame {
  width: 100%;
  height: 76vh;
  min-height: 620px;
  border: 1px solid #d9e3dc;
  border-radius: 6px;
  background: white;
}

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

.pool-list a {
  display: grid;
  gap: 4px;
  color: inherit;
  background: #fffaf1;
  border: 1px solid rgba(31, 37, 34, 0.12);
  border-radius: 6px;
  padding: 12px;
  text-decoration: none;
}

.pool-list strong {
  color: #0b3425;
}

.pool-list span {
  color: #617067;
  font-size: 0.88rem;
}

@media (min-width: 760px) {
  body.mobile-page {
    background: #dfe8e2;
  }

  .mobile-shell {
    margin-top: 18px;
    margin-bottom: 18px;
    border-radius: 14px;
    overflow: hidden;
  }
}
