:root {
  color-scheme: light;
  --ink: #172f29;
  --green: #194937;
  --paper: #f6f5ed;
  --white: #fffef8;
  --line: #d4d7c9;
  --muted: #53685e;
  --gold: #dfa14a;
  font: 18px/1.5 "Avenir Next",Avenir,"Segoe UI",sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,input,select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

button,select,summary,input[type=file]::file-selector-button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .6;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex="0"]:focus-visible {
  outline: 3px solid #bf780c;
  outline-offset: 3px;
}

.skip {
  position: fixed;
  left: 1rem;
  top: -5rem;
  background: white;
  padding: .5rem;
  z-index: 5;
}

.skip:focus {
  top: 1rem;
}

.shell {
  width: min(1180px,calc(100% - 64px));
  margin-inline: auto;
}

.masthead {
  background: var(--ink);
  color: var(--white);
  border-bottom: 3px solid #84a07e;
}

.header-row,.brand,.account,.board-title,.eyebrow,.tabs,.panel-heading {
  display: flex;
  align-items: center;
}

.header-row {
  min-height: 75px;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  gap: .7rem;
  font-family: Georgia,serif;
  font-size: 1.5rem;
  letter-spacing: -.04em;
}

.brand svg {
  width: 34px;
  height: 34px;
  color: #edbc73;
}

.account {
  gap: 1rem;
  font-size: .9rem;
}

.signout {
  background: none;
  color: inherit;
  border: 1px solid #607b69;
  border-radius: 4px;
  padding: .3rem .7rem;
}

main {
  padding-block: clamp(28px,5vw,68px) 70px;
  min-height: 70vh;
}

h1,h2,h3 {
  font-family: Georgia,"Times New Roman",serif;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.04em;
  margin: 0;
}

h1 {
  font-size: clamp(2.75rem,5vw,4.6rem);
}

h2 {
  font-size: clamp(1.6rem,3vw,2.2rem);
}

h3 {
  font-size: 1.5rem;
  margin: 1.6rem 0 .8rem;
}

.eyebrow {
  gap: .7rem;
  color: var(--muted);
  font-size: .8rem;
  letter-spacing: .13em;
  font-weight: 750;
  text-transform: uppercase;
  margin: 0 0 1.35rem;
}

.rule {
  width: 31px;
  height: 2px;
  background: var(--gold);
}

.entrance {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  min-height: clamp(410px,44vw,555px);
}

.entry-card {
  padding: clamp(32px,5vw,74px);
  align-self: center;
}

.entrance h1 {
  font-size: clamp(3.7rem,6.8vw,6.1rem);
  line-height: .99;
}

.entrance h1 em {
  font-weight: 400;
  color: var(--green);
}

.lead {
  max-width: 33ch;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 1.5rem 0 2rem;
}

.art-panel {
  background: var(--green);
  position: relative;
  min-height: 280px;
}

.course-art {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.entry-card form {
  max-width: 360px;
}

.primary,.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  border-radius: 4px;
  border: 1px solid transparent;
  padding: .75rem 1.15rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}

.primary {
  background: var(--green);
  color: white;
}

.primary:hover {
  background: #103b2c;
}

.secondary {
  background: var(--white);
  border-color: var(--line);
}

.secondary:hover,.signout:hover {
  border-color: var(--gold);
}

.board-title {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.season-label {
  flex-shrink: 0;
  font-size: .9rem;
  color: var(--muted);
  font-weight: 650;
}

.season-label select {
  min-width: 7rem;
}

.tabs {
  gap: 1.65rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow: auto;
}

.tabs button {
  font-weight: 600;
  white-space: nowrap;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  padding: 13px 1px;
  color: var(--muted);
}

.tabs button[aria-current=page] {
  border-bottom-color: var(--green);
  color: var(--green);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  margin-bottom: 20px;
  min-width: 0;
}

.pad,.panel-heading {
  padding: clamp(18px,3vw,32px);
}

.panel-heading {
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.empty {
  padding: 25px clamp(18px,3vw,32px);
  margin: 0;
  color: var(--muted);
}

.empty.compact {
  padding: 14px 0 0;
}

.table-wrap {
  overflow: auto;
  max-height: 34rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: .95rem;
}

th {
  font-size: .85rem;
  letter-spacing: .05em;
  color: var(--muted);
  text-transform: uppercase;
  background: #f2f3e9;
  position: sticky;
  top: 0;
}

th,td {
  padding: .7rem 1rem;
  border-bottom: 1px solid #e5e5d9;
}

td:last-child,th:last-child {
  text-align: right;
}

.position,.number {
  font-variant-numeric: tabular-nums;
}

.position {
  color: var(--muted);
  width: 5rem;
}

.number {
  white-space: nowrap;
}

.cutoff td {
  background: #f8f0d9;
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(0,1.7fr) minmax(245px,.8fr);
  gap: 20px;
  align-items: start;
}

form label {
  display: block;
  font-weight: 650;
  font-size: .91rem;
  margin-top: 1rem;
}

input:not([type=checkbox]),select {
  display: block;
  width: 100%;
  background: white;
  border: 1px solid #b5c1b6;
  border-radius: 4px;
  min-height: 43px;
  padding: .55rem .7rem;
  margin: 5px 0 0;
}

form button.primary,form button.secondary,#publish {
  margin-top: 1rem;
}

input[type=file] {
  font-size: .92rem;
}

input[type=file]::file-selector-button {
  background: #edf0e6;
  border: 0;
  border-radius: 2px;
  padding: 5px 10px;
  color: var(--green);
  margin-right: .65rem;
}

.tip,.history small,td small {
  color: var(--muted);
  font-size: .88rem;
}

.history {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.history li+li {
  border-top: 1px solid var(--line);
}

.history li {
  padding: .55rem 0;
}

.history small,td small {
  display: block;
}

.alert {
  padding: .75rem 1rem;
  border-left: 3px solid #6c8967;
  background: #ecf1e8;
  margin: 0 0 1rem;
}

.alert.error {
  background: #faeee4;
  border-color: #ae543a;
  color: #783321;
}

.alert ul {
  padding-left: 1.25rem;
}

.loading {
  color: var(--muted);
}

details summary {
  font-weight: 650;
}

.group-heading {
  display: flex;
  align-items: baseline;
  gap: .65rem;
}

.group-heading .tip {
  font-family: system-ui, sans-serif;
  letter-spacing: normal;
  white-space: nowrap;
}

.roster-owner {
  margin-top: .85rem;
}

@media (max-width:760px) {
  .shell {
    width: calc(100% - 32px);
  }
  .header-row {
    min-height: 63px;
  }
  .brand {
    font-size: 1.2rem;
  }
  .brand svg {
    width: 28px;
  }
  .account {
    font-size: .9rem;
    gap: .4rem;
  }
  .account span {
    max-width: 12ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .entrance {
    grid-template-columns: 1fr;
  }
  .art-panel {
    min-height: 230px;
  }
  .entry-card {
    padding: 32px;
  }
  .upload-grid {
    grid-template-columns: 1fr;
  }
  .tabs {
    gap: 1.15rem;
  }
  .board-title {
    align-items: end;
  }
  .eyebrow {
    margin-bottom: 10px;
  }
  .board-title h1 {
    font-size: 2.7rem;
  }
  th,td {
    padding: .6rem .7rem;
  }
  .header-row {
    gap: .4rem;
  }
}

@media (max-width:420px) {
  .account span {
    display: none;
  }
  .entry-card {
    padding: 24px;
  }
  .tabs {
    gap: .85rem;
  }
  .tabs button {
    font-size: .9rem;
  }
  .board-title h1 {
    font-size: 2.2rem;
  }
  .panel-heading,.pad {
    padding: 16px;
  }
}

.standings-filter {
  display: block;
  width: min(100%,340px);
  font-size: .95rem;
  font-weight: 650;
  color: var(--muted);
  margin: 0 0 1.15rem;
}

.draft-refresh {
  display: block;
  margin: 0 0 1rem auto;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}

td .avatar, summary .avatar { margin-right: .65rem; }
.profile-form { max-width: 800px; }
.profile-form > label:first-child { margin-top: 0; }
.profile-form > input { max-width: 460px; }
.profile-form > label { margin-bottom: .5rem; }

.photo-editor {
  display: grid;
  grid-template-columns: minmax(0, 256px) minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
}
.photo-drop {
  overflow: hidden;
  aspect-ratio: 1;
  max-width: 256px;
  border-radius: 5px;
  background: #e8ede2;
}
.photo-drop:focus-within { outline: 3px solid #bf780c; outline-offset: 3px; }
.current-photo {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--green);
  font: 4rem Georgia, serif;
}
.current-photo img, .photo-drop canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.photo-drop canvas { touch-action: none; cursor: grab; }
.photo-drop canvas:active { cursor: grabbing; }
.photo-drop [hidden], .photo-tools [hidden] { display: none; }
.photo-tools input[type=file] { margin-top: 0; }
.zoom-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.zoom-controls input[type=range] {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}
.zoom-controls .secondary {
  margin: 0;
  padding: .4rem .75rem;
  font-size: 1.2rem;
}
.discard-photo {
  margin-top: 1rem;
  background: transparent;
  border: none;
  padding: 0;
  text-decoration: underline;
  color: var(--muted);
}
.profile-message:not(:empty) { margin-top: .85rem; }
@media (max-width: 580px) {
  .photo-editor { grid-template-columns: 1fr; gap: 1rem; }
  .photo-drop { width: 100%; }
}


.owner-label { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; }
.owner-label:hover, .owner-label:focus-visible { text-decoration: underline dotted; text-underline-offset: .2em; }
#owner-card {
  position: fixed; z-index: 20; width: min(16rem, calc(100vw - 16px));
  max-height: calc(100dvh - 16px); overflow: auto; overflow-wrap: anywhere;
  padding: 1rem; border: 1px solid var(--line); border-radius: 1rem;
  background: var(--white); box-shadow: 0 8px 28px #172f2933;
}
#owner-card strong, #owner-card small { display: block; text-align: center; }
.owner-photo {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: 6rem; height: 6rem; margin: 0 auto .45rem; border-radius: 50%;
  background: var(--green); color: var(--white); font-size: 2rem;
}
.owner-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#owner-card dl { display: grid; grid-template-columns: 1fr auto; gap: .15rem .45rem; margin: .65rem 0 0; font-size: .88rem; }
#owner-card dd { margin: 0; text-align: right; font-weight: bold; }

.board-title { flex-wrap: wrap; }
.board-filters { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem; max-width: 100%; }
.board-filters .season-label { min-width: 0; max-width: 100%; }
.board-filters select { max-width: min(17rem, 100%); }
