/* Drinks League. Fonts are served from /fonts (both are under the SIL Open Font License). */
@font-face {
  font-family: "League Gothic";
  src: url("../fonts/league-gothic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  /* One phone-width column: a chalk-white league ladder with club-coloured tabs, on a bottle-green pitch. */
  --pitch: #0b3b2c;   /* bottle green: page and chrome */
  --mown: #0e4533;    /* the lighter mowing stripe */
  --chalk: #f2f5ef;   /* the ladder card, sheets, text on green */
  --ink: #0f211a;     /* text on chalk */
  --lager: #f5b700;   /* the one loud colour: main actions and the title place */
  --europe: #2d6be0;  /* Champions League places */
  --drop: #d3302f;    /* relegation */
  --up: #1e7a4c;

  --chalk-dim: rgba(242, 245, 239, 0.76);
  --ink-dim: rgba(15, 33, 26, 0.68);
  --rule: rgba(15, 33, 26, 0.16);
  --rule-pitch: rgba(242, 245, 239, 0.2);
  --dugout: #072a1f;

  --display: "League Gothic", "Arial Narrow", "Liberation Sans Narrow", Impact, sans-serif;
  --body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; /* footer small print, as on maxfr.co.uk */

  --gutter: 16px;
  --dock: 68px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--pitch);
}
body {
  margin: 0;
  color: var(--chalk);
  font: 400 17px/1.45 var(--body);
  background: repeating-linear-gradient(180deg, var(--pitch) 0 96px, var(--mown) 96px 192px);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
html.locked,
html.locked body {
  overflow: hidden;
}
img,
svg,
canvas {
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--lager);
  outline-offset: 2px;
}
.sheet :focus-visible,
.ladder :focus-visible,
.card :focus-visible {
  outline-color: var(--europe);
}
[hidden] {
  display: none !important;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- frame ---------- */

.app {
  max-width: 480px;
  min-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.view {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: calc(18px + env(safe-area-inset-top)) var(--gutter) 40px;
}
.has-dock .view {
  padding-bottom: calc(var(--dock) + 64px + env(safe-area-inset-bottom));
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.012em;
  text-wrap: balance;
}
h1 {
  font-size: 46px;
  line-height: 0.96;
}
h2 {
  font-size: 30px;
  line-height: 1;
}
h3 {
  font-size: 23px;
  line-height: 1.05;
}
p {
  margin: 0;
  max-width: 60ch;
}
.dim {
  color: var(--chalk-dim);
}
.card .dim,
.sheet .dim,
.ladder .dim {
  color: var(--ink-dim);
}
.small {
  font-size: 15px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row.wrap {
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.grow {
  flex: 1;
  min-width: 0;
}
.ico {
  width: 24px;
  height: 24px;
  flex: none;
}
.emoji {
  font-family: var(--emoji);
}

/* ---------- top of a screen ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 400 26px/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--chalk);
  text-decoration: none;
}
.brand .ico {
  color: var(--lager);
  stroke-width: 3;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  margin-left: -8px;
  padding: 0 10px 0 4px;
  border: 0;
  background: none;
  color: var(--chalk);
  font-size: 16px;
  text-decoration: none;
}
.textlink {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.textlink.tap {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ---------- buttons: the main ones are cut like ladder tabs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: 4px 26px 26px 4px;
  background: var(--lager);
  color: var(--ink);
  font: 400 26px/1 var(--display);
  letter-spacing: 0.03em;
  text-decoration: none;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.16);
  transition: transform 0.08s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}
.btn.wide {
  width: 100%;
}
.btn.quiet {
  background: transparent;
  color: var(--chalk);
  border-color: var(--rule-pitch);
  box-shadow: none;
  font: 600 16px/1.2 var(--body);
  letter-spacing: 0;
  min-height: 46px;
  padding: 8px 16px;
  border-radius: 4px;
}
.card .btn.quiet,
.sheet .btn.quiet,
.ladder .btn.quiet {
  color: var(--ink);
  border-color: var(--rule);
}
.btn.danger {
  background: var(--drop);
  color: #fff;
}
.btn.quiet.danger {
  background: transparent;
  color: var(--drop);
}
.btn.small {
  min-height: 40px;
  padding: 6px 12px;
  font-size: 15px;
}

/* ---------- forms ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label,
.label {
  font-size: 15px;
  font-weight: 600;
}
.field .hint {
  font-size: 14px;
  color: var(--chalk-dim);
}
.sheet .field .hint,
.card .field .hint {
  color: var(--ink-dim);
}
.input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid transparent;
  border-radius: 4px;
  background: var(--chalk);
  color: var(--ink);
  font-size: 17px;
}
.sheet .input,
.card .input {
  background: #fff;
  border-color: var(--rule);
}
.input:focus-visible {
  outline: 3px solid var(--lager);
  outline-offset: 1px;
}
.input::placeholder {
  color: rgba(15, 33, 26, 0.45);
}
.at {
  position: relative;
}
.at::before {
  content: "@";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-dim);
}
.at .input {
  padding-left: 32px;
}
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 16px;
}
.check input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--lager);
  flex: none;
}
.form-error {
  padding: 10px 12px;
  border-radius: 4px;
  border-left: 5px solid var(--drop);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}
.form-error:empty {
  display: none;
}

/* ---------- the tab: one player, in their colours ---------- */

.tab {
  --kit: var(--ink);
  --kit-ink: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 42px;
  padding: 0 16px 0 10px;
  border-radius: 3px 21px 21px 3px;
  background: var(--kit);
  color: var(--kit-ink);
  font: 400 25px/1 var(--display);
  letter-spacing: 0.02em;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), inset 3px 0 0 rgba(0, 0, 0, 0.14);
}
.tab-emoji {
  flex: none;
  font: 22px/1 var(--emoji);
}
.tab-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-top: 2px;
}
/* Recent form: newest on the right. It takes whatever room the name leaves; older drinks drop off first. */
.tab-form {
  flex: 1 1 0;
  min-width: 0;
  height: 15px;
  overflow: hidden;
  display: flex;
  flex-flow: row-reverse wrap;
  gap: 4px 1px;
  opacity: 0.9;
}
.tab-form .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}
/* Angels (players who don't drink alcohol) wear a halo over their emoji. */
.tab.angel .tab-emoji {
  position: relative;
}
.tab.angel .tab-emoji::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.4em;
  width: 0.9em;
  height: 0.36em;
  border: 0.1em solid #ffe98a;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(15, 33, 26, 0.62);
  transform: translateX(-50%) rotate(-8deg);
}
.tab.sm {
  height: 34px;
  font-size: 21px;
  padding: 0 13px 0 8px;
  border-radius: 3px 17px 17px 3px;
}
.tab.sm .tab-emoji {
  font-size: 18px;
}
.tab.lg {
  height: 68px;
  font-size: 44px;
  gap: 12px;
  padding: 0 24px 0 14px;
  border-radius: 4px 34px 34px 4px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18), inset 4px 0 0 rgba(0, 0, 0, 0.14);
}
.tab.lg .tab-emoji {
  font-size: 38px;
}

/* ---------- the league ladder ---------- */

.ladder,
.card {
  background: var(--chalk);
  color: var(--ink);
  border-radius: 6px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}
.card {
  padding: 16px;
}
.ladder {
  padding: 6px 0 4px;
  overflow: hidden;
}
.lhead,
.lrow {
  display: grid;
  grid-template-columns: 42px 14px minmax(0, 1fr) 30px 44px;
  align-items: center;
  column-gap: 6px;
  padding-right: 14px;
}
.lhead {
  padding-top: 6px;
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
}
.lhead > :nth-child(1) {
  text-align: center;
}
.lhead > :nth-child(4),
.lhead > :nth-child(5) {
  text-align: right;
}
.lrow {
  position: relative;
  width: 100%;
  min-height: 52px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  text-decoration: none;
}
.lrow.cut {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 2px dashed rgba(15, 33, 26, 0.34);
}
.pos {
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 0 4px 4px 0;
  font: 400 27px/1 var(--display);
  padding-top: 2px;
}
.lrow[data-zone="title"] .pos {
  background: var(--lager);
}
.lrow[data-zone="europe"] .pos {
  background: var(--europe);
  color: #fff;
}
.lrow[data-zone="drop"] .pos {
  background: var(--drop);
  color: #fff;
}
.move {
  width: 0;
  height: 0;
  justify-self: center;
  border: 6px solid transparent;
}
.move.up {
  border-bottom: 9px solid var(--up);
  border-top-width: 0;
}
.move.down {
  border-top: 9px solid var(--drop);
  border-bottom-width: 0;
}
.num {
  text-align: right;
  font: 400 24px/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--ink-dim);
  padding-top: 2px;
}
.num.pts {
  font-size: 31px;
  color: var(--ink);
}
.lrow.me .tab {
  outline: 2.5px solid var(--ink);
  outline-offset: 2px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 14px 10px;
  margin-top: 6px;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
  color: var(--ink-dim);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
.legend .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}
.swatch-title {
  background: var(--lager);
}
.swatch-europe {
  background: var(--europe);
}
.swatch-drop {
  background: var(--drop);
}

.league-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.league-badge {
  flex: none;
  font-size: 40px;
  line-height: 1;
}
.invite-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.invite-card h2 {
  font-size: 38px;
  overflow-wrap: anywhere;
}
.season-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--chalk-dim);
  font-size: 16px;
}
.select {
  min-height: 40px;
  padding: 6px 30px 6px 12px;
  border: 1.5px solid var(--rule-pitch);
  border-radius: 4px;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23f2f5ef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  color: var(--chalk);
  font-size: 16px;
  font-weight: 600;
  appearance: none;
}
.select option {
  color: var(--ink);
}
.story {
  font-size: 19px;
  line-height: 1.3;
}

/* the moment after logging */
.flash {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 4px 30px 30px 4px;
  background: var(--lager);
  color: var(--ink);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.16);
}
.flash-pts {
  font: 400 50px/0.9 var(--display);
  padding-top: 4px;
}
.flash-text {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  line-height: 1.3;
}
.flash .btn.quiet {
  color: var(--ink);
  border-color: rgba(15, 33, 26, 0.4);
  min-height: 40px;
  border-radius: 20px;
}

/* ---------- latest: photos as stickers ---------- */

.day {
  font: 400 26px/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--chalk);
  margin-top: 4px;
}
.entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sticker {
  display: block;
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}
.entry:nth-of-type(odd) .sticker {
  transform: rotate(-0.5deg);
}
.entry:nth-of-type(even) .sticker {
  transform: rotate(0.4deg);
}
.entry .photo {
  aspect-ratio: 1;
}
.photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #1b2a24;
  border-radius: 1px;
}
.plate {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
}
.plate .tab {
  flex: 0 1 auto;
}
.plate-drink {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font: 400 24px/1 var(--display);
  white-space: nowrap;
  padding-top: 2px;
}
.plate-drink .ico {
  width: 20px;
  height: 20px;
}
.plate-pts {
  font-size: 30px;
}
.struck .plate-pts {
  text-decoration: line-through;
  color: var(--ink-dim);
}
.var-note {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--drop);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
}
.entry-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
}
.entry-meta .caption {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.cheers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  min-width: 58px;
  justify-content: center;
  padding: 4px 12px;
  border: 1.5px solid var(--rule-pitch);
  border-radius: 20px;
  background: transparent;
  color: var(--chalk);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cheers[aria-pressed="true"] {
  background: var(--chalk);
  color: var(--ink);
  border-color: var(--chalk);
}
.sheet .cheers {
  color: var(--ink);
  border-color: var(--rule);
}
.sheet .cheers[aria-pressed="true"] {
  background: var(--ink);
  color: var(--chalk);
  border-color: var(--ink);
}

/* ---------- bottom dock ---------- */

.dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(480px, 100%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 1fr 84px 1fr 1fr;
  align-items: end;
  padding: 0 6px env(safe-area-inset-bottom);
  background: var(--dugout);
  border-top: 1px solid var(--rule-pitch);
}
.dock a,
.dock button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  height: var(--dock);
  padding: 0 0 9px;
  border: 0;
  background: none;
  color: var(--chalk-dim);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.dock [aria-current="page"] {
  color: var(--chalk);
}
.dock [aria-current="page"]::before {
  content: "";
  position: absolute;
  top: -1px;
  width: 34px;
  height: 3px;
  background: var(--lager);
}
.dock a {
  position: relative;
}
.dock .log {
  color: var(--chalk);
}
.dock .log-disc {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-top: -26px;
  border-radius: 50%;
  background: var(--lager);
  color: var(--ink);
  box-shadow: 0 0 0 5px var(--dugout), inset 0 -4px 0 rgba(0, 0, 0, 0.16);
}
.dock .log-disc .ico {
  width: 32px;
  height: 32px;
}

/* ---------- sheets and toasts ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(4, 20, 14, 0.66);
}
.sheet {
  width: min(480px, 100%);
  max-height: 94%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px var(--gutter) calc(22px + env(safe-area-inset-bottom));
  border-radius: 14px 14px 0 0;
  background: var(--chalk);
  color: var(--ink);
  animation: rise 0.22s ease-out;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.x {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
}
@keyframes rise {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock) + 44px + env(safe-area-inset-bottom));
  z-index: 60;
  width: min(440px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--chalk);
  color: var(--ink);
  font-size: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  border-left: 6px solid var(--lager);
  animation: rise 0.2s ease-out;
}
.toast.bad {
  border-left-color: var(--drop);
}

/* ---------- logging a drink ---------- */

.shot-preview {
  position: relative;
  width: 132px;
  flex: none;
}
.shot-preview .photo {
  border: 5px solid #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  transform: rotate(-2deg);
}
.drink-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dchip {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 6px 12px 6px 10px;
  border: 2px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.15;
}
.dchip .ico {
  width: 28px;
  height: 28px;
}
.dchip b {
  font: 400 28px/1 var(--display);
  padding-top: 3px;
}
.dchip[aria-checked="true"] {
  border-color: var(--ink);
  background: var(--lager);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  min-height: 40px;
  padding: 6px 14px;
  border: 2px solid var(--rule);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--chalk);
}

/* ---------- picking your emoji and colours ---------- */

.emoji-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 48px);
  grid-auto-columns: 48px;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  scrollbar-width: none;
}
.emoji-grid::-webkit-scrollbar {
  display: none;
}
.emoji-grid button {
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(242, 245, 239, 0.1);
  font: 26px/1 var(--emoji);
  padding: 0;
}
.sheet .emoji-grid button {
  background: rgba(15, 33, 26, 0.06);
}
.emoji-grid button[aria-pressed="true"] {
  border-color: var(--lager);
  background: rgba(245, 183, 0, 0.22);
}
.sheet .emoji-grid button[aria-pressed="true"] {
  border-color: var(--ink);
}
.kits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kits button {
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-radius: 3px 20px 20px 3px;
  background: var(--kit);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}
.kits button[aria-pressed="true"] {
  outline: 3px solid var(--chalk);
  outline-offset: 2px;
}
.sheet .kits button[aria-pressed="true"] {
  outline-color: var(--ink);
}
.preview-slot {
  padding: 12px 12px 12px 0;
  border-radius: 6px;
  background: var(--chalk);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}
.preview-slot .lrow {
  padding-right: 4px;
}

/* ---------- player page ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat {
  padding: 12px 10px 10px;
  border-radius: 4px;
  background: rgba(242, 245, 239, 0.1);
}
.stat b {
  display: block;
  font: 400 44px/0.95 var(--display);
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 14px;
  color: var(--chalk-dim);
}
.bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bar {
  display: grid;
  grid-template-columns: 24px minmax(0, 8.6em) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
}
.bar-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar .ico {
  width: 24px;
  height: 24px;
}
.bar-track {
  height: 18px;
  border-radius: 2px 9px 9px 2px;
  background: rgba(15, 33, 26, 0.08);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 2px 9px 9px 2px;
  background: var(--ink);
}
.honours {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.honour {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  border-radius: 3px 16px 16px 3px;
  background: var(--chalk);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.honour .ico {
  width: 20px;
  height: 20px;
}
.angel-chip {
  background: #fff6c9;
}
.honour[data-zone="title"] {
  background: var(--lager);
}
.honour[data-zone="europe"] {
  background: var(--europe);
  color: #fff;
}
.honour[data-zone="drop"] {
  background: var(--drop);
  color: #fff;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.thumbs button {
  position: relative;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 2px;
  background: #1b2a24;
}
.thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.thumbs .badge {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 3px 6px 0;
  background: #fff;
  color: var(--ink);
  font: 400 18px/1.1 var(--display);
}

/* ---------- league page and settings ---------- */

.rules {
  display: flex;
  flex-direction: column;
}
.rule {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
}
.rule:last-child {
  border-bottom: 0;
}
.rule b {
  font: 400 28px/1 var(--display);
  padding-top: 3px;
  min-width: 22px;
  text-align: right;
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stepper button {
  width: 40px;
  height: 40px;
  border: 2px solid var(--rule);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.stepper button[disabled] {
  opacity: 0.35;
}
.stepper output {
  min-width: 34px;
  text-align: center;
  font: 400 30px/1 var(--display);
  padding-top: 3px;
}
.linkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 2px dashed var(--rule);
  border-radius: 4px;
  background: #fff;
  font-size: 15px;
  overflow-wrap: anywhere;
  user-select: all;
}
.list {
  display: flex;
  flex-direction: column;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
}
.list-item:last-child {
  border-bottom: 0;
}
.pill {
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--chalk);
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- landing ---------- */

.hero h1 {
  font-size: clamp(56px, 17vw, 82px);
  line-height: 0.9;
}
.hero-lede {
  font-size: 19px;
  line-height: 1.35;
}
.footnote {
  margin-top: auto;
  padding-top: 20px;
  font-size: 14px;
  color: var(--chalk-dim);
}
/* ---------- site footer (laid out after the one on maxfr.co.uk) ---------- */

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: auto calc(var(--gutter) * -1) -40px;
  padding: 30px var(--gutter) calc(30px + env(safe-area-inset-bottom));
  background: var(--dugout);
  border-top: 1px solid var(--rule-pitch);
  color: var(--chalk-dim);
}
.view > .site-footer:not(.compact) {
  margin-top: auto;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15.5px;
}
.footer-links,
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.footer-links a,
.footer-contact a,
.footer-contact span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--chalk-dim);
  font-size: 18px;
  text-decoration: none;
}
.footer-links a:hover,
.footer-contact a:hover {
  color: var(--chalk);
}
.site-footer .footer-label {
  margin-bottom: 6px;
  font: 600 12.5px/1.2 var(--mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--lager);
}
.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-pitch);
  font: 11.5px/1.7 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242, 245, 239, 0.56);
}
.footer-legal p {
  max-width: none;
}
.footer-legal .footer-trust {
  color: var(--lager);
}
.site-footer.compact {
  gap: 16px;
  margin: 8px 0 0;
  padding: 0;
  background: none;
  border-top: 0;
}
.site-footer.compact .footer-links,
.site-footer.compact .footer-contact {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0 20px;
}
.site-footer.compact .footer-links a,
.site-footer.compact .footer-contact a,
.site-footer.compact .footer-contact span {
  font-size: 16px;
}
.site-footer.compact .footer-label {
  flex-basis: 100%;
}

.empty {
  padding: 22px 16px;
  border: 2px dashed var(--rule-pitch);
  border-radius: 6px;
  text-align: left;
}
.skeleton {
  height: 52px;
  border-radius: 4px;
  background: rgba(242, 245, 239, 0.1);
}

@media (max-width: 359px) {
  .tab-form {
    display: none;
  }
  h1 {
    font-size: 40px;
  }
  .lhead,
  .lrow {
    grid-template-columns: 34px 10px minmax(0, 1fr) 22px 36px;
    column-gap: 4px;
    padding-right: 10px;
  }
  .tab {
    font-size: 23px;
    padding: 0 12px 0 8px;
    gap: 6px;
  }
  .num.pts {
    font-size: 28px;
  }
}
@media (min-width: 520px) {
  body {
    background: var(--dugout);
  }
  .app {
    background: repeating-linear-gradient(180deg, var(--pitch) 0 96px, var(--mown) 96px 192px);
    box-shadow: 0 0 0 1px var(--rule-pitch);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
