:root {
  color-scheme: light;
  --ink: #132c26;
  --muted: #4a6056;
  --dark: #122b27;
  --green: #24594a;
  --green-hover: #184336;
  --lime: #d9eea4;
  --paper: #f0f3eb;
  --white: #fbfcf8;
  --edge: #cbd6c8;
  --warning: #f9e5a8;
  --bad: #84272b;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); line-height: 1.04; letter-spacing: -.065em; text-wrap: balance; }
h2 { font-size: 1.4rem; letter-spacing: -.035em; line-height: 1.18; }
h3 { font-size: 1.12rem; letter-spacing: -.02em; }
p, label, a, input, textarea, select, button, summary { line-height: 1.48; }
a { color: var(--green); text-underline-offset: .19em; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #77992c; outline-offset: 4px; }
.skip { position: fixed; z-index: 4; inset: .75rem auto auto 1rem; transform: translateY(-160%); padding: .6rem 1rem; color: var(--ink); background: var(--lime); }
.skip:focus { transform: none; }
.masthead { background: var(--dark); color: var(--white); }
.mast-inner { width: min(100% - 2.25rem, 75rem); min-height: 4.25rem; margin: auto; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; gap: .6rem; align-items: center; font-weight: 750; font-size: 1.24rem; letter-spacing: -.045em; }
.brand-mark { display: grid; gap: 3px; transform: rotate(-31deg); margin-inline: .2rem; }
.brand-mark i { width: 22px; height: 3px; border-radius: 3px; background: var(--lime); }
.brand-mark i:nth-child(2) { width: 16px; }
.brand-mark i:nth-child(3) { width: 10px; }
.mast-context { color: #c0d1c6; border-left: 1px solid #59746a; padding-inline-start: 1rem; font-size: .875rem; }
#account { margin-left: auto; }
#content { width: min(100% - 2rem, 75rem); margin: 0 auto; padding-block: clamp(1.3rem, 5vw, 3.5rem); }
.guide { width: min(100%, 45rem); margin: auto; }
.guide-intro { display: grid; gap: .6rem; margin: 0 0 1.45rem; }
.eyebrow { font-weight: 750; font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.muted, .sync, .field-note { color: var(--muted); }
.small, .sync, .field-note { font-size: .875rem; }
.sync { text-align: center; margin-top: 1rem; }
.card, .panel, .empty { border: 1px solid var(--edge); background: var(--white); border-radius: 1rem; }
.empty { width: min(100%, 31rem); margin: auto; display: grid; padding: clamp(1.25rem, 5vw, 2.5rem); gap: .9rem; }
.empty h1 { font-size: clamp(1.8rem, 6vw, 2.7rem); }
.card, .panel { padding: clamp(1rem, 4vw, 1.65rem); }
.destination { background: var(--dark); border-color: var(--dark); color: var(--white); }
.destination .eyebrow { color: var(--lime); }
.destination .muted { color: #c0d1c6; }
.destination h2, .alarm h2 { font-size: clamp(1.75rem, 5vw, 2.55rem); overflow-wrap: anywhere; }
.alarm { background: var(--warning); border-color: #b18e37; }
.alarm .eyebrow { color: #574413; }
.guide-focus { display: grid; gap: .8rem; }
.guide-focus .card { display: grid; gap: .55rem; }
.next-inline { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center; }
.next-inline h2 { grid-column: 1; }
.next-inline .eyebrow { grid-column: 1; }
.next-inline time { font-weight: 750; grid-column: 2; grid-row: 1 / 3; font-variant-numeric: tabular-nums; }
.next-inline p:last-child { grid-column: 1 / -1; }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; }
.game-rules { padding-top: .45rem; border-top: 1px solid var(--edge); }
.game-rules h3 { margin-bottom: .35rem; }
.route { margin-top: 1.8rem; }
.route h2 { margin-bottom: .7rem; }
.route ol { list-style: none; padding: 0; margin: 0; }
.route li + li { margin-top: .5rem; }
.stop { overflow: hidden; }
.stop summary { display: grid; grid-template-columns: 4rem minmax(0, 1fr) 1rem; align-items: center; gap: .7rem; padding: .8rem 1rem; list-style: none; }
.stop summary::-webkit-details-marker { display: none; }
.stop summary::after { content: '+'; font-weight: 650; font-size: 1.25rem; grid-column: 3; grid-row: 1; text-align: center; color: var(--green); }
.stop[open] summary::after { content: '−'; }
.stop[data-current] { border-color: var(--green); }
.stop-time { font-weight: 750; font-variant-numeric: tabular-nums; }
.stop-name { display: grid; gap: .15rem; }
.stop-name strong { overflow-wrap: anywhere; }
.stop-body { display: grid; gap: .65rem; border-top: 1px solid var(--edge); padding: 1rem; }
.button { display: inline-flex; justify-content: center; align-items: center; text-decoration: none; border: 1px solid var(--green); background: var(--green); color: white; border-radius: .55rem; padding: .57rem .9rem; font-weight: 700; font-size: .94rem; min-height: 44px; text-align: center; }
.button:hover:not(:disabled) { background: var(--green-hover); color: white; }
.button.secondary { background: var(--white); border-color: var(--edge); color: var(--ink); }
.button.secondary:hover:not(:disabled) { background: #e8efe3; color: var(--ink); }
.button.dark { background: var(--dark); color: var(--white); border-color: #65877a; }
.button.danger { color: var(--bad); }
.button.small { padding: .36rem .65rem; min-height: 40px; font-size: .875rem; }
.buttons { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.admin { display: grid; gap: 1rem; }
.admin-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; }
.admin-heading h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.admin-heading .eyebrow { margin-bottom: .4rem; }
.admin-heading .published { margin-top: .55rem; }
.live-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; background: #e4eddd; }
.live-panel h2 { margin-bottom: .35rem; }
.section-tabs { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 0 .55rem; border-bottom: 1px solid var(--edge); }
.section-tabs button { border: 0; padding: .55rem .9rem; background: transparent; color: var(--ink); font-weight: 700; border-radius: .55rem; min-height: 44px; }
.section-tabs button:hover, .section-tabs [aria-current=true] { background: var(--dark); color: var(--white); }
.editor-panel { display: grid; gap: 1rem; }
.heading-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: space-between; }
.field { display: grid; gap: .25rem; align-content: start; min-width: 0; }
.field label { font-weight: 660; }
input, textarea, select { display: block; min-height: 44px; width: 100%; padding: .5rem .6rem; border: 1px solid #9bac9e; border-radius: .4rem; color: var(--ink); background: #fff; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 1.8rem; background: white right .55rem center / .7rem no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1 6 6 11 1' fill='none' stroke='%2324594a' stroke-width='2'/%3E%3C/svg%3E"); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .8rem; }
.editor-list { display: grid; gap: .65rem; }
.editor-card { padding: 0; }
.editor-card summary { min-height: 48px; padding: .75rem 1rem; font-weight: 720; }
.editor-card-content { border-top: 1px solid var(--edge); padding: 1rem; display: grid; gap: .85rem; }
.match { border: 1px solid var(--edge); border-radius: .65rem; padding: .65rem; display: grid; gap: .6rem; grid-template-columns: 1.1fr 1fr 1fr auto; align-items: end; }
.match .field { min-width: 0; }
.action-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .55rem; }
.feedback { white-space: pre-line; color: var(--green); }
.feedback[data-error=true] { color: var(--bad); }
.feedback:empty { display: none; }
#preview-dialog { width: min(100% - 1.2rem, 53rem); max-height: calc(100% - 1rem); border: 1px solid var(--edge); border-radius: 1rem; background: var(--paper); color: var(--ink); padding: clamp(.75rem, 4vw, 1.5rem); }
#preview-dialog::backdrop { background: #10251fd1; }
.dialog-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .65rem; align-items: center; margin-bottom: 1rem; }
.preview-fields { margin-bottom: 1rem; }
@media (max-width: 44rem) {
  .match { grid-template-columns: 1fr 1fr; }
  .match .field:first-child { grid-column: 1 / -1; }
  .match button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 27rem) {
  .mast-context { display: none; }
  .section-tabs button { padding-inline: .6rem; }
}


.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.mast-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.mast-actions select { min-height: 40px; max-width: 9.75rem; font-size: .875rem; }
#account:empty { display: none; }
.guide-nav { margin-bottom: 1.1rem; }
.stop-link { display: grid; grid-template-columns: 4rem minmax(0, 1fr) 1rem; gap: .7rem; align-items: center; padding: .8rem 1rem; color: var(--ink); text-decoration: none; width: 100%; text-align: left; }
.stop-link:hover, .stop-link[aria-current=step] { border-color: var(--green); background: #edf3e7; }
.stop-arrow { text-align: center; font-size: 1.5rem; line-height: 1; color: var(--green); }
.game-metadata { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .7rem; margin: .4rem 0; }
.game-metadata dt { color: var(--muted); font-size: .875rem; }
.game-metadata dd { margin: .1rem 0 0; font-weight: 650; overflow-wrap: anywhere; }
.standings { width: 100%; border-collapse: collapse; margin-top: .4rem; text-align: left; }
.standings th, .standings td { padding: .6rem .45rem; border-bottom: 1px solid var(--edge); }
.standings thead th { color: var(--muted); font-size: .875rem; }
.standings tr > :last-child { text-align: right; font-variant-numeric: tabular-nums; }
.standings .your-score { background: #e4eddd; }
.game-scores { margin: 0; padding: 0; list-style: none; }
.game-scores li { display: flex; gap: .8rem; align-items: baseline; justify-content: space-between; padding: .55rem 0; }
.game-scores li + li { border-top: 1px solid var(--edge); }
.score-match { display: grid; gap: .55rem; border: 1px solid var(--edge); border-radius: .65rem; padding: .65rem; }
.compact-field { width: min(100%, 16rem); }
@media (max-width: 34rem) {
  .mast-context { display: none; }
  .mast-inner { width: calc(100% - 1.25rem); }
  .mast-actions select { width: auto; max-width: 7.5rem; }
  .guide-nav { gap: .4rem; }
  .guide-nav .button { padding-inline: .57rem; font-size: .875rem; }
}
