:root {
  font:
    16px/1.5 "DM Sans",
    "Segoe UI",
    Arial,
    sans-serif;
  color: #12392d;
  background: #f5f6ef;
  --ink: #103e31;
  --lime: #dcff77;
  --line: #d3dbce;
  --paper: #fffef9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.bar,
main,
footer {
  width: min(1060px, 94%);
  margin: auto;
}
.bar {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 75px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 1.9rem;
  letter-spacing: -0.08em;
  font-weight: 850;
  text-decoration: none;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
nav {
  display: flex;
  gap: 6px;
  flex: 1;
}
nav a,
footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}
nav a {
  padding: 10px 14px;
  border-radius: 20px;
}
nav a.on {
  background: #e7eddf;
}
main {
  min-height: 70vh;
  padding: 40px 0;
}
h1,
h2,
h3,
p {
  margin: 0 0 0.7em;
}
h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.045em;
}
h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin-bottom: 0.5em;
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.date,
.muted,
small {
  color: #50665b;
}
.date {
  font-weight: 650;
  margin-bottom: 8px;
}
.hero {
  background: #103e31;
  color: white;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 30px;
}
.hero .intro {
  padding: clamp(25px, 5vw, 56px);
}
.hero h2 {
  font-size: clamp(2.1rem, 4.5vw, 3.7rem);
  max-width: 13ch;
}
.hero p {
  color: #e1e9d8;
  max-width: 35ch;
}
.hero img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}
.hero button {
  margin-top: 8px;
}
.primary,
.bar button,
.act,
button {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  min-height: 46px;
  padding: 9px 16px;
}
.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.hero .primary,
.accent {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}
button:hover,
.act:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
.cards,
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.card,
.panel,
details {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 16px;
}
.card {
  display: block;
  color: inherit;
  text-decoration: none;
}
.card h3 {
  font-size: 1.45rem;
}
.card p {
  color: #52665b;
  margin: 0;
}
.actions,
.row,
.head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.head {
  justify-content: space-between;
  margin-bottom: 15px;
}
.head h2,
.head h3 {
  margin: 0;
}
.section {
  margin: 28px 0;
}
.row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
}
.score {
  border-radius: 20px;
  background: var(--ink);
  color: white;
  padding: 25px;
}
.score .big {
  font:
    bold clamp(3rem, 8vw, 5rem) / 1.05 ui-monospace,
    monospace;
  letter-spacing: -0.08em;
}
.score .overs {
  color: var(--lime);
  margin-left: 14px;
}
.score h2 {
  margin-bottom: 0.35em;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.chip {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  padding: 0 5px;
  border-radius: 50%;
  background: #e9f1e3;
  place-items: center;
  font-weight: bold;
  color: #173e2c;
}
.pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pad button {
  min-height: 58px;
  font-size: 1.25rem;
}
.pad .wicket {
  background: #ffcfad;
}
.wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.panel + .panel,
details + details {
  margin-top: 12px;
}
summary {
  font-weight: bold;
  cursor: pointer;
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 24px;
  width: min(450px, 94vw);
  background: var(--paper);
  color: var(--ink);
  max-height: 90vh;
}
dialog::backdrop {
  background: #061c17a8;
}
.dialogtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dialogtop h2 {
  margin: 0;
}
.dialogtop button {
  font-size: 1.5rem;
}
label {
  display: grid;
  gap: 4px;
  font-weight: 620;
  margin: 12px 0;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid #aab9a9;
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: white;
}
textarea {
  min-height: 75px;
}
#error {
  color: #962e0a;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a362c;
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  z-index: 3;
  width: max-content;
  max-width: 92vw;
}
footer {
  margin-top: 20px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: #52665b;
}
footer a {
  margin-left: auto;
}
:focus-visible {
  outline: 3px solid #c47615;
  outline-offset: 3px;
}
.score p {
  margin: 0.5em 0;
}
.empty {
  padding: 16px 0;
}
.label {
  font-size: 0.88rem;
  font-weight: bold;
}
.link {
  display: inline-block;
  color: var(--ink);
  font-weight: 650;
}
.group {
  margin-bottom: 22px;
}
@media (max-width: 710px) {
  .bar {
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .bar nav {
    order: 3;
    flex-basis: 100%;
    gap: 0;
  }
  .bar button {
    margin-left: auto;
  }
  nav a {
    padding: 7px 13px;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero img {
    height: 135px;
    min-height: 0;
    object-position: center 57%;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  main {
    padding: 22px 0;
  }
  .card,
  .panel {
    padding: 16px;
  }
  .actions button {
    flex-grow: 1;
  }
  .cards {
    gap: 8px;
  }
  .score {
    padding: 18px;
  }
}
@media (max-width: 390px) {
  .cards {
    grid-template-columns: 1fr;
  }
  nav a {
    padding: 7px 8px;
  }
}
@media print {
  header,
  footer,
  button,
  nav,
  .pad,
  .actions {
    display: none;
  }
  main {
    width: 100%;
  }
  .score {
    color: black;
    background: white;
  }
}

[hidden] { display: none !important; }
