/* css/site.css */
:root {
  --ink:#1b2233;
  --muted:#5b6478;
  --blue:#1f4fd8;
  --surface:#f6f7fb;
  --key:#eef2fb;
  --border:#dde2ec;
  --grid:#c9d1e3;
  --green:#1e7f4f;
  --red:#c62828;
  --amber:#8a5a00;
  --radius:12px;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  color: var(--ink);
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #fff;
  font-size: 16px;
  line-height: 1.55;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 16px;
  z-index: 20;
  background: white;
  padding: 12px;
}
.skip-link:focus {
  top: 8px;
}
.wrap {
  max-width: 1088px;
  padding: 0 24px;
  margin: auto;
}
.site-header {
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.6px;
  font-size: 20px;
  min-height: 44px;
}
.brand svg {
  width: 31px;
  height: 34px;
  color: var(--blue);
  flex: none;
}
.site-nav {
  display: flex;
  gap: 24px;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--blue);
}
main {
  padding-top: 32px;
  padding-bottom: 56px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: -1px;
  font-weight: 750;
  margin-bottom: 8px;
}
h2 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -.6px;
  margin-bottom: 16px;
}
h3 {
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 8px;
}
p {
  margin-bottom: 16px;
}
.intro {
  color: var(--muted);
  margin-bottom: 24px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 11px;
  font-weight: 750;
  color: var(--blue);
  margin-bottom: 8px;
}
.tool-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 48px;
}
.tool-top .current-player {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 650;
  min-width: 0;
}
.current-player #current-name {
  max-width: 210px;
  overflow-wrap: anywhere;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 650;
  padding: 8px;
  min-height: 44px;
}
.text-button:disabled {
  color: var(--muted);
  opacity: .6;
}
.edit-button {
  width: 44px;
  height: 44px;
  padding: 12px;
  border: 0;
  background: none;
  color: var(--muted);
}
.edit-button svg {
  width: 16px;
  height: 16px;
}
.bowler-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0 12px;
}
.bowler-tab {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.bowler-tab button {
  border: 0;
  background: none;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.bowler-tab.selected {
  background: var(--key);
  border-color: var(--blue);
}
.bowler-tab.selected button {
  color: var(--blue);
}
.bowler-tab .remove-bowler {
  padding: 8px;
  min-width: 44px;
  border-left: 1px solid var(--border);
}
.rename-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.rename-form label {
  font-size: 13px;
}
.rename-form input {
  width: 170px;
  max-width: 100%;
}
.rotate-row {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  gap: 8px;
  color: var(--muted);
}
.rotate-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.scorecard {
  display: block;
  width: 100%;
  border: 1px solid var(--grid);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border-spacing: 0;
  box-shadow: 0 1px 2px #1b223314;
}
.scorecard tbody {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
}
.scorecard tr {
  display: contents;
}
.frame {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--grid);
  min-height: 109px;
}
.frame:last-child {
  border-right: 0;
}
.frame-number {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  line-height: 24px;
}
.marks {
  display: flex;
  align-self: flex-end;
  min-height: 25px;
}
.mark {
  width: 24px;
  height: 25px;
  border-left: 1px solid var(--grid);
  border-bottom: 1px solid var(--grid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  font-size: 15px;
  line-height: 1;
}
.frame-total {
  text-align: center;
  line-height: 52px;
  font-size: 22px;
  font-weight: 750;
  min-height: 52px;
}
.frame.current {
  background: #eef3ff;
  box-shadow: inset 0 0 0 2px var(--blue);
}
.frame.current .frame-number {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.strike {
  color: var(--red);
}
.spare {
  color: var(--green);
}
.foul {
  color: var(--amber);
}
.play-area {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 32px;
  margin-top: 24px;
}
.entry-area {
  grid-column: 1;
  grid-row: 1;
}
.turn-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
  font-size: 14px;
  font-weight: 700;
}
.turn-line #compact-score {
  display: none;
}
.turn-help {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.key {
  border: 1px solid transparent;
  min-height: 57px;
  border-radius: 10px;
  background: var(--key);
  color: var(--ink);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.15;
  box-shadow: 0 2px 0 #d6deef;
  transition: background .12s, transform .12s;
}
.key:hover:enabled {
  background: #dfe7fc;
}
.key:active:enabled {
  transform: translateY(1px);
  box-shadow: none;
}
.key small {
  display: block;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.2;
  margin-top: 2px;
}
.key-strike {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 0 #153ba8;
}
.key-spare {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 0 #125737;
}
.key-foul {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 2px 0 #694500;
}
.key-strike:hover:enabled {
  background: #173da9;
}
.key-spare:hover:enabled {
  background: #18663f;
}
.key-foul:hover:enabled {
  background: #704900;
}
.key-action {
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 0 #e3e7ee;
  padding: 4px;
}
.key:disabled {
  background: var(--surface);
  color: #737b8c;
  opacity: .6;
  box-shadow: none;
  border-color: transparent;
}
.keyboard-hint {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0 0;
}
.keyboard-hint kbd {
  font: inherit;
  font-weight: 700;
}
.result-panel {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}
.score-summary {
  background: var(--ink);
  color: white;
  padding: 20px 24px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.score-summary::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -100px;
  top: -42px;
  border: 1px solid #fff2;
  border-radius: 50%;
  box-shadow: 0 0 0 24px #ffffff05, 0 0 0 48px #ffffff04;
  pointer-events: none;
}
.score-main {
  display: flex;
  align-items: center;
  gap: 32px;
}
.score-big {
  display: flex;
  flex-direction: column;
}
.score-big small {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #c4cede;
  font-weight: 600;
}
.score-big strong {
  font-size: 60px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -2px;
}
.max-score {
  border-left: 1px solid #fff3;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #c4cede;
}
.max-score strong {
  font-size: 28px;
  color: #fff;
  line-height: 1.2;
}
.result-hint {
  font-size: 12px;
  color: #c4cede;
  margin: 10px 0 0;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: white;
  color: var(--ink);
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.25;
}
.button:hover {
  background: var(--surface);
}
.button.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.button.primary:hover {
  background: #173da9;
}
.button:disabled {
  opacity: .5;
}
.statistics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.statistics strong {
  color: var(--ink);
}
.message {
  font-size: 12px;
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--muted);
}
.message.error {
  color: #a02b20;
}
.finished-guide {
  font-size: 13px;
  margin-top: 8px;
}
.ad:empty {
  display: none;
}
.adsbygoogle {
  display: block;
}
.ad {
  margin: 24px 0;
}
.ad small {
  color: var(--muted);
}
.content-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.section-heading > a {
  font-size: 13px;
}
.rule-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 24px 0;
}
.rule-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.rule-symbol {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 800;
}
.rule-card h3 {
  font-size: 15px;
  margin: 0 0 4px;
}
.rule-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.example-label {
  font-size: 12px;
  color: var(--muted);
  margin: 20px 0 8px;
}
.example-card .frame {
  min-height: 84px;
}
.example-card .frame-total {
  font-size: 18px;
  line-height: 34px;
  min-height: 34px;
}
.faq {
  margin-top: 32px;
}
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.faq summary {
  font-size: 15px;
  min-height: 54px;
  padding: 16px 24px 16px 0;
  cursor: pointer;
  font-weight: 600;
}
.faq details p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
  max-width: 760px;
}
.related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.related a {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.related a span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand p {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  max-width: 640px;
}
.footer-links a {
  color: var(--muted);
  font-size: 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.page-heading {
  margin-bottom: 28px;
}
.page-heading .intro {
  max-width: 680px;
}
.article {
  max-width: 760px;
  margin: auto;
}
.article h1 {
  font-size: 36px;
  margin-bottom: 16px;
}
.article h2 {
  margin-top: 32px;
}
.article h3 {
  margin-top: 24px;
}
.article p,
.article li {
  font-size: 16px;
  line-height: 1.8;
}
.article ul,
.article ol {
  padding-left: 24px;
}
.article .meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 28px;
}
.article .lead {
  font-size: 19px;
  line-height: 1.65;
}
.article .source-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.article .faq p {
  font-size: 15px;
}
.callout {
  border-left: 3px solid var(--blue);
  padding: 16px 20px;
  background: var(--key);
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}
.callout p:last-child {
  margin-bottom: 0;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  background: var(--surface);
  font-weight: 650;
}
.data-table td,
.data-table th {
  padding: 10px 12px;
  border: 1px solid var(--border);
}
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.guide-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
.guide-card .guide-number {
  font-size: 12px;
  color: var(--blue);
  font-weight: 750;
  letter-spacing: 1px;
}
.guide-card h2 {
  font-size: 22px;
  margin: 12px 0;
}
.guide-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.guide-card:hover {
  border-color: var(--blue);
  background: #fafbff;
}
.calculator-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
}
.form-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 16px;
}
.field label {
  display: block;
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 6px;
}
.field small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
input,
textarea,
select {
  max-width: 100%;
  border: 1px solid var(--grid);
  border-radius: 7px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  min-height: 44px;
}
input[type=number],
select {
  width: 100%;
}
input[aria-invalid=true] {
  border-color: var(--red);
}
.quick-picks {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.quick-picks button {
  border: 0;
  background: var(--surface);
  color: var(--blue);
  min-height: 44px;
  min-width: 44px;
  padding: 8px;
  font-size: 12px;
  border-radius: 6px;
}
.handicap-summary {
  padding: 28px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
}
.handicap-summary .eyebrow {
  color: #c4cede;
}
.handicap-number {
  font-size: 76px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -3px;
}
.handicap-summary .unit {
  font-size: 15px;
  color: #c4cede;
}
.handicap-summary #series {
  padding-top: 16px;
  border-top: 1px solid #fff3;
  margin: 20px 0 12px;
  font-weight: 650;
}
.handicap-summary #formula,
.handicap-summary #basis-note {
  font-size: 13px;
  color: #c4cede;
}
.handicap-summary #adjusted {
  font-size: 15px;
  font-weight: 650;
}
.average-box {
  margin-top: 24px;
  background: var(--surface);
  padding: 20px;
  border-radius: 10px;
}
.average-box summary {
  font-weight: 650;
  min-height: 44px;
  cursor: pointer;
}
.average-box textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  margin-top: 12px;
}
.average-box label {
  display: block;
  font-size: 13px;
}
.average-box p {
  font-size: 13px;
  margin: 8px 0;
}
.error-text {
  color: #a02b20;
  font-size: 14px;
  margin: 12px 0;
}
.sheet-controls {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.sheet-controls .field {
  flex: 1;
  min-width: 120px;
}
.sheet-controls .field.wide {
  flex: 2;
}
.blank-sheet {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
  background: #fff;
}
.blank-sheet h2 {
  font-size: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.blank-sheet p {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}
.sheet-scroll {
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 4px;
}
.blank-card {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  table-layout: fixed;
}
.blank-card th,
.blank-card td {
  border: 1px solid #808793;
}
.blank-card thead th {
  font-size: 10px;
  padding: 8px 2px;
  background: var(--surface);
  line-height: 1.2;
}
.blank-card thead th:first-child {
  width: 12%;
}
.blank-card tbody td,
.blank-card tbody th {
  height: 72px;
  vertical-align: top;
}
.blank-card thead th:last-child {
  width: 8%;
}
.blank-marks {
  display: flex;
  justify-content: flex-end;
}
.blank-marks span {
  width: 16px;
  height: 20px;
  border-left: 1px solid #808793;
  border-bottom: 1px solid #808793;
}
.pin-diagram {
  max-width: 360px;
  width: 100%;
  display: block;
  margin: 24px auto;
}
.pin-diagram circle {
  fill: var(--key);
  stroke: var(--blue);
  stroke-width: 2;
}
.pin-diagram text {
  font: 650 18px system-ui;
  fill: var(--ink);
  text-anchor: middle;
  dominant-baseline: middle;
}
.pin-diagram .missing circle {
  fill: #fff;
  stroke: var(--border);
  stroke-dasharray: 3 3;
}
.pin-diagram .missing text {
  fill: #7b8392;
}
.pin-diagram .orientation {
  font-size: 12px;
  fill: var(--muted);
}
.split-diagrams {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  text-align: center;
}
.split-diagrams figure {
  margin: 0;
}
.split-diagrams figcaption {
  font-size: 13px;
  font-weight: 650;
}
.split-diagrams .pin-diagram {
  margin: 12px auto;
}
.glossary {
  margin: 24px 0;
}
.glossary dt {
  font-weight: 750;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.glossary dd {
  margin: 4px 0 14px;
  font-size: 15px;
  line-height: 1.7;
}
.print-only {
  display: none;
}
.no-js {
  padding: 12px;
  background: var(--key);
  border-left: 3px solid var(--blue);
}
@media (max-width: 1023px) {
  .play-area {
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .score-main {
    gap: 20px;
  }
  .score-summary {
    padding: 20px;
  }
  .max-score {
    padding-left: 18px;
  }
  .result-actions .button {
    font-size: 12px;
    padding: 8px;
  }
  .site-nav {
    gap: 16px;
  }
}
@media (max-width: 639px) {
  .wrap {
    padding: 0 16px;
  }
  .site-header {
    height: 56px;
  }
  .brand {
    font-size: 17px;
    gap: 5px;
    letter-spacing: -.5px;
  }
  .brand svg {
    width: 25px;
    height: 29px;
  }
  .site-nav {
    gap: 12px;
  }
  .site-nav a {
    font-size: 11px;
  }
  main {
    padding-top: 20px;
  }
  h1 {
    font-size: 26px;
    letter-spacing: -.8px;
  }
  .intro {
    font-size: 13px;
    margin-bottom: 12px;
  }
  .eyebrow {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .tool-top {
    min-height: 44px;
  }
  .current-player #current-name {
    max-width: 140px;
  }
  .scorecard tbody {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .frame {
    min-height: 88px;
    border-bottom: 1px solid var(--grid);
  }
  .frame:nth-child(5) {
    border-right: 0;
  }
  .frame:nth-child(n+6) {
    border-bottom: 0;
  }
  .frame-number {
    line-height: 20px;
  }
  .mark {
    width: 20px;
    height: 23px;
    font-size: 14px;
  }
  .marks {
    min-height: 23px;
  }
  .frame-total {
    font-size: 20px;
    line-height: 42px;
    min-height: 42px;
  }
  .play-area {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 12px;
  }
  .turn-line {
    font-size: 12px;
    min-height: 22px;
  }
  .turn-line #compact-score {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
  }
  .turn-help {
    font-size: 11px;
    margin-bottom: 10px;
  }
  .key {
    min-height: 50px;
    font-size: 20px;
  }
  .key-action {
    font-size: 11px;
  }
  .key small {
    font-size: 8px;
  }
  .keyboard-hint {
    display: none;
  }
  .score-summary {
    padding: 16px 20px;
  }
  .score-big strong {
    font-size: 48px;
  }
  .max-score strong {
    font-size: 25px;
  }
  .score-big small {
    font-size: 10px;
  }
  .max-score {
    margin-left: auto;
    min-width: 120px;
  }
  .result-hint {
    font-size: 11px;
    margin-top: 6px;
  }
  .result-actions {
    gap: 6px;
    justify-content: space-between;
  }
  .result-actions .button {
    flex: 1;
    font-size: 11px;
    padding: 8px 6px;
  }
  .statistics {
    font-size: 11px;
    justify-content: space-between;
    gap: 6px;
  }
  .message {
    font-size: 11px;
    min-height: 17px;
    margin-top: 6px;
  }
  .content-section {
    margin-top: 28px;
    padding-top: 24px;
  }
  h2 {
    font-size: 23px;
  }
  .rule-cards {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 20px 0;
  }
  .section-heading {
    display: block;
  }
  .section-heading > a {
    display: inline-block;
    margin-bottom: 4px;
  }
  .example-card .frame-total {
    line-height: 32px;
  }
  .related {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .related a {
    padding: 16px;
  }
  .footer-inner {
    display: block;
  }
  .footer-links {
    gap: 0 18px;
  }
  .footer-links a {
    font-size: 11px;
  }
  .article h1 {
    font-size: 29px;
  }
  .article .lead {
    font-size: 17px;
  }
  .article p,
  .article li {
    font-size: 15px;
  }
  .article h2 {
    font-size: 23px;
  }
  .data-table td,
  .data-table th {
    padding: 8px;
    font-size: 12px;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .guide-card {
    padding: 22px;
  }
  .calculator-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .form-panel {
    padding: 18px;
  }
  .field-grid {
    gap: 16px 12px;
  }
  .handicap-summary {
    padding: 24px;
  }
  .sheet-controls {
    gap: 12px;
  }
  .sheet-controls .field {
    min-width: calc(50% - 12px);
  }
  .blank-sheet {
    padding: 16px;
  }
  .blank-sheet h2 {
    font-size: 16px;
  }
  .blank-sheet p {
    font-size: 10px;
  }
  .split-diagrams {
    gap: 4px;
  }
}
@media (max-width: 359px) {
  .wrap {
    padding: 0 12px;
  }
  .site-nav {
    gap: 8px;
  }
  .site-nav a {
    font-size: 10px;
  }
  .brand {
    font-size: 15px;
  }
  .brand svg {
    width: 22px;
  }
  .header-inner {
    gap: 8px;
  }
  .intro {
    font-size: 11px;
  }
  .mark {
    width: 17px;
    height: 22px;
  }
  .turn-line {
    font-size: 11px;
  }
  .turn-line #compact-score {
    font-size: 9px;
  }
  .key {
    min-height: 48px;
  }
  .key-action {
    font-size: 10px;
  }
  .statistics {
    font-size: 10px;
  }
  .max-score {
    min-width: 110px;
  }
  .current-player #current-name {
    max-width: 120px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
@media print {
  @page {
    size: landscape;
    margin: 12mm;
  }
  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }
  .site-header,
  .site-footer,
  .skip-link,
  body > main,
  .ad {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .print-only h1 {
    font-size: 20pt;
  }
  .print-only h2 {
    font-size: 13pt;
  }
  .print-game {
    break-inside: avoid;
    margin-bottom: 16mm;
  }
  .scorecard {
    box-shadow: none;
    border-color: #000;
    border-radius: 0;
  }
  .scorecard tbody {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
  .frame {
    border-color: #000;
    min-height: 80px;
    border-bottom: 0;
  }
  .frame:nth-child(5) {
    border-right: 1px solid #000;
  }
  .frame-number {
    color: #000;
    background: #fff;
    border-color: #000;
  }
  .mark {
    border-color: #000;
    color: #000;
    width: 20px;
    height: 22px;
  }
  .frame-total {
    font-size: 18px;
    line-height: 38px;
  }
  .frame.current {
    box-shadow: none;
    background: #fff;
  }
  .frame.current .frame-number {
    color: #000;
    background: #fff;
  }
  .sheet-page > main {
    display: block !important;
    max-width: none;
    padding: 0;
  }
  .sheet-page main > * {
    display: none !important;
  }
  .sheet-page main > #sheet-preview {
    display: block !important;
  }
  .blank-sheet {
    border: 0;
    padding: 0;
    margin: 0;
    break-after: page;
    break-inside: avoid;
    border-radius: 0;
  }
  .blank-sheet:last-child {
    break-after: auto;
  }
  .sheet-scroll {
    overflow: visible;
    padding: 0;
  }
  .blank-card {
    min-width: 0;
    width: 100%;
  }
  .blank-card th,
  .blank-card td {
    border-color: #000;
  }
  .blank-card thead th {
    background: white;
    font-size: 9pt;
  }
  .blank-card tbody td,
  .blank-card tbody th {
    height: 20mm;
  }
  .blank-marks span {
    border-color: #000;
    width: 5mm;
    height: 6mm;
  }
  .blank-sheet h2 {
    font-size: 16pt;
  }
  .blank-sheet p {
    font-size: 10pt;
  }
}
main.wrap {
  padding-top: 32px;
  padding-bottom: 56px;
}
@media (max-width: 1023px) and (min-width: 640px) {
  .mark {
    width: 18px;
    font-size: 13px;
  }
}
@media (max-width: 639px) {
  main.wrap {
    padding-top: 20px;
  }
}
@media print {
  .sheet-page > main.wrap {
    padding: 0;
  }
}
.calculator-layout {
  grid-template-areas: "inputs result" "helper result";
  align-items: start;
  row-gap: 24px;
}
.calculator-layout > #handicap-form {
  grid-area: inputs;
}
.handicap-output {
  grid-area: result;
  min-width: 0;
}
.calculator-layout > .average-box {
  grid-area: helper;
  margin-top: 0;
}
.quick-picks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.quick-picks button {
  min-width: 0;
  padding: 8px 2px;
}
.article a,
.eyebrow a,
.example-label a,
.section-heading > a {
  display: inline-block;
  min-height: 24px;
}
@media (max-width: 639px) {
  .calculator-layout {
    grid-template-areas: "inputs" "result" "helper";
    gap: 16px;
  }
  .calculator-layout .form-panel {
    padding: 16px;
  }
  .calculator-layout .field-grid {
    gap: 12px;
  }
  .handicap-summary {
    padding: 18px;
  }
  .handicap-number {
    font-size: 56px;
  }
  .handicap-summary #series {
    margin: 12px 0 8px;
    padding-top: 12px;
  }
  .bowler-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding: 4px 3px 8px;
    scroll-padding: 4px;
  }
  .bowler-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
