/* The Swindle web pages — the live card's look, shared by /live and /play */
:root {
  --fairway: #29782F;
  --fairway-deep: #0D421A;
  --flag-yellow: #F0DE1A;
  --win: #7CE38B;
  --lose: #FF8A80;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  min-height: 100vh;
  padding: 28px 16px 40px;
  background: linear-gradient(170deg, var(--fairway) 0%, var(--fairway-deep) 70%) fixed;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 520px; margin: 0 auto; }
h1 {
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  color: var(--flag-yellow);
  text-shadow: 0 3px 12px rgba(0,0,0,.4);
}
.sub {
  text-align: center;
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255,255,255,.92);
}
.card {
  margin-top: 20px;
  background: rgba(0,0,0,.28);
  border-radius: 18px;
  padding: 16px;
}
.label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,.7);
  margin-bottom: 10px;
}
form { display: flex; gap: 10px; }
input {
  flex: 1;
  min-width: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  border: 2px dashed rgba(240,222,26,.7);
  background: rgba(0,0,0,.3);
  color: var(--flag-yellow);
}
input::placeholder { color: rgba(240,222,26,.4); letter-spacing: 2px; font-size: 18px; }
button.go {
  background: var(--flag-yellow);
  color: var(--fairway-deep);
  font-size: 18px;
  font-weight: 800;
  border: none;
  padding: 0 22px;
  border-radius: 999px;
  cursor: pointer;
}
.hint { margin-top: 10px; font-size: 14px; line-height: 1.45; color: rgba(255,255,255,.8); }
.error { margin-top: 10px; font-size: 15px; color: var(--flag-yellow); font-weight: 600; }
.course { font-size: 22px; font-weight: 800; }
.status {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--flag-yellow);
  color: var(--fairway-deep);
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: 16px;
}
.row:last-child { border-bottom: none; }
.row .name { font-weight: 700; }
.row .meta { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 2px; }
.row .big { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.row .small { font-size: 13px; color: rgba(255,255,255,.75); text-align: right; }
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  margin-bottom: 14px;
}
table:last-child { margin-bottom: 0; }
th, td { text-align: center; padding: 5px 0; }
th:first-child, td:first-child {
  text-align: left;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 4px;
}
thead th { color: var(--flag-yellow); font-weight: 800; }
tr.par td { color: rgba(255,255,255,.65); font-size: 12px; }
td.under { color: var(--win); font-weight: 800; }
td.over { color: rgba(255,255,255,.85); }
td.tot { font-weight: 800; }
.win { color: var(--win); }
.lose { color: var(--lose); }
.link {
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  text-decoration: underline;
  font-size: 14px;
  cursor: pointer;
}
footer {
  margin-top: 28px;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,.6);
}
footer a { color: rgba(255,255,255,.85); }

/* Net · Points · Gross picker */
.seg { display: flex; gap: 6px; margin-bottom: 6px; }
.seg button {
  flex: 1;
  font-size: 14px;
  font-weight: 800;
  padding: 7px 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: none;
  color: #fff;
  cursor: pointer;
}
.seg button.on { background: var(--flag-yellow); border-color: var(--flag-yellow); color: var(--fairway-deep); }
.row .leader { color: var(--flag-yellow); }
.row .big.red { color: #FF6B6B; }

/* THE MASTERS BOARD — wide screens only */
#masters { display: none; }
@media (min-width: 720px), (orientation: landscape) and (min-width: 560px) {
  main { max-width: 1100px; }
  #masters {
    display: block;
    margin-top: 20px;
    background: #FBFBF7;
    color: #1A1A1A;
    border-radius: 14px;
    padding: 14px 14px 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
    overflow-x: auto;
  }
}
.m-title {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #0D421A;
  margin-bottom: 8px;
}
.m-board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 0; }
.m-board th, .m-board td {
  border: 1px solid #C9CFC9;
  text-align: center;
  padding: 3px 0;
  min-width: 26px;
  font-weight: 800;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.m-board thead th { color: #0D421A; background: #EEF1EC; font-size: 14px; }
.m-board .m-par th { font-size: 13px; }
.m-board td { font-size: 17px; height: 30px; }
.m-board .m-name {
  text-align: left;
  padding: 0 8px;
  min-width: 150px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0D421A;
  font-size: 15px;
}
.m-pos { display: inline-block; width: 22px; color: #C8102E; }
.m-under { color: #C8102E; }
.m-level { color: #1E7B34; }
.m-over { color: #1A1A1A; }
.m-pts { color: #0D421A; }
.m-empty { background: #fff; }
.m-thru { color: #0D421A; font-size: 15px; min-width: 40px; }
.m-turn { border-left: 3px solid #0D421A !important; }
.m-key { margin-top: 6px; font-size: 12px; color: #5B635B; text-align: right; }

/* How the games stand */
.row .big.st { font-size: 16px; color: var(--flag-yellow); text-align: right; max-width: 60%; }
.row .big.st.decided { color: var(--win); }
