/* Ragdoll Soccer — turf, jersey orange, chalk lines and things that don't quite stand straight. */
:root {
  --turf: #2f7d32;
  --turf-2: #2a7230;
  --turf-dark: #1d5221;
  --chalk: #fbf8ee;
  --chalk-2: #f1ecdc;
  --ink: #15241a;
  --ink-soft: #3b4a3f;
  --jersey: #ff6a13;
  --jersey-dark: #c94d05;
  --sky: #d3e6e2;
  --sky-2: #b4d3cd;
  --line: 3px solid var(--ink);
  --r-lg: 28px;
  --r-md: 18px;
  --drop: 0 6px 0 var(--ink);
  --head: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-width: 0;
  overflow-x: clip;
  font: 400 1.0625rem/1.65 var(--body);
  color: var(--ink);
  background-color: var(--turf);
  background-image: repeating-linear-gradient(90deg, var(--turf) 0 96px, var(--turf-2) 96px 192px);
}
img { max-width: 100%; height: auto; }
a { color: var(--jersey-dark); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--jersey); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--chalk); padding: 8px 14px; border: var(--line); border-radius: 12px; }
.skip:focus { left: 16px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--turf-dark); border-bottom: 4px solid var(--ink); }
.topbar__in { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--chalk); text-decoration: none; font: 900 1.25rem/1 var(--head); letter-spacing: .02em; transform: rotate(-2deg); }
.brand:hover { color: var(--chalk); }
.brand__ball {
  flex: none; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--ink);
  background:
    radial-gradient(circle at 50% 50%, var(--ink) 0 22%, transparent 23%),
    radial-gradient(circle at 12% 30%, var(--ink) 0 14%, transparent 15%),
    radial-gradient(circle at 88% 30%, var(--ink) 0 14%, transparent 15%),
    radial-gradient(circle at 28% 92%, var(--ink) 0 14%, transparent 15%),
    radial-gradient(circle at 72% 92%, var(--ink) 0 14%, transparent 15%),
    #fff;
}
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav__link {
  color: var(--ink); background: var(--chalk); text-decoration: none; font: 800 .875rem/1 var(--head);
  text-transform: uppercase; letter-spacing: .06em; padding: 9px 12px; border: var(--line); border-radius: 12px;
  box-shadow: 0 3px 0 var(--ink); transition: transform .15s;
}
.nav__link:nth-child(odd) { transform: rotate(-1.5deg); }
.nav__link:nth-child(even) { transform: rotate(1.2deg); }
.nav__link:hover { color: var(--ink); background: #fff; transform: rotate(0) translateY(-2px); }

/* ---------- signboards (headings) ---------- */
.signboard {
  display: inline-block; margin: 0; padding: 8px 18px 10px; background: var(--chalk); color: var(--ink);
  border: 4px solid var(--ink); border-radius: var(--r-md); box-shadow: var(--drop);
  font: 900 clamp(1.6rem, 4.6vw, 2.6rem)/1.05 var(--head); letter-spacing: .01em; transform: rotate(-2deg);
}

/* ---------- game area ---------- */
.pitch { max-width: 1040px; margin: 0 auto; padding: 18px 16px 8px; text-align: center; }
.pitch .signboard { margin: 4px 0 18px; }
.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; text-align: left;
  background: var(--ink); border: 5px solid var(--ink); border-radius: var(--r-lg);
  box-shadow: 0 10px 0 rgba(0, 0, 0, .28);
}
.stage:fullscreen { aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.stage__cover {
  cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.stage__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage__cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(21, 36, 26, 0) 35%, rgba(21, 36, 26, .45) 100%); pointer-events: none; }

.kickoff {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 28px 16px 18px; font: 900 clamp(1.05rem, 3.2vw, 1.6rem)/1 var(--head); letter-spacing: .02em; text-transform: uppercase;
  color: #fff; background: var(--jersey); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 7px 0 var(--ink);
  cursor: pointer; transform: rotate(-3deg); animation: sway 2.8s ease-in-out infinite;
}
.kickoff:hover, .stage__cover:hover .kickoff { background: var(--jersey-dark); animation-play-state: paused; }
.stage__cover:hover .kickoff__ball { animation-play-state: paused; }
.kickoff:active { transform: rotate(-3deg) translateY(4px); box-shadow: 0 3px 0 var(--ink); }
.kickoff__ball { width: 38px; height: 38px; border-width: 3px; }
.kickoff__ball, .rig__ball {
  flex: none; border-radius: 50%; border: 3px solid var(--ink);
  background:
    radial-gradient(circle at 50% 50%, var(--ink) 0 20%, transparent 21%),
    radial-gradient(circle at 12% 30%, var(--ink) 0 13%, transparent 14%),
    radial-gradient(circle at 88% 30%, var(--ink) 0 13%, transparent 14%),
    radial-gradient(circle at 28% 92%, var(--ink) 0 13%, transparent 14%),
    radial-gradient(circle at 72% 92%, var(--ink) 0 13%, transparent 14%),
    #fff;
}
.kickoff__ball { animation: roll 2.8s linear infinite; }

@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(2deg) translateY(-3px); } }
@keyframes roll { to { transform: rotate(360deg); } }

/* loading: a ragdoll hauled up by its rope, wobbling on the turf */
.stage__loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(var(--sky), var(--sky-2) 78%, var(--turf) 78%, var(--turf) 100%);
  color: var(--ink); text-align: center; padding: 12px;
}
.rig { position: relative; width: 180px; height: 200px; flex: none; transform: scale(1.25); margin: 20px 0 26px; }
.rig__rope, .rig__doll { position: absolute; inset: 0; transform-origin: 50% 3px; animation: haul 2.4s ease-in-out infinite; }
.rig__rope::before { content: ""; position: absolute; left: 50%; top: 3px; width: 3px; height: 64px; margin-left: -1.5px; background: var(--ink); }
.rig__rope::after { content: ""; position: absolute; left: 50%; top: -4px; width: 14px; height: 14px; margin-left: -7px; border: 3px solid #1aa59a; border-radius: 50%; }
.rig__head { position: absolute; z-index: 2; left: 77px; top: 76px; width: 26px; height: 26px; border-radius: 50%; background: #f6d7a7; border: 3px solid var(--ink); }
.rig__body { position: absolute; z-index: 1; left: 75px; top: 100px; width: 30px; height: 46px; border-radius: 9px; background: var(--jersey); border: 3px solid var(--ink); }
.rig__arm { position: absolute; top: 64px; width: 8px; height: 44px; border-radius: 5px; background: #f6d7a7; border: 2px solid var(--ink); transform-origin: 50% 100%; }
.rig__arm--l { left: 70px; transform: rotate(22deg); }
.rig__arm--r { left: 102px; transform: rotate(-22deg); }
.rig__leg { position: absolute; top: 142px; width: 11px; height: 46px; border-radius: 6px; background: #f2e24a; border: 2px solid var(--ink); transform-origin: 50% 0; }
.rig__leg--l { left: 77px; animation: kick-l 1.2s ease-in-out infinite; }
.rig__leg--r { left: 92px; animation: kick-r 1.2s ease-in-out infinite; }
.rig__ball { position: absolute; left: 132px; top: 168px; width: 24px; height: 24px; animation: nudge 2.4s ease-in-out infinite; }
.rig__turf { position: absolute; left: -10px; right: -10px; bottom: 0; height: 10px; border-radius: 6px; background: var(--turf-dark); border: 2px solid var(--ink); }
.stage__msg { margin: 0; padding: 8px 16px; background: var(--chalk); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); transform: rotate(-1.5deg); font: 900 clamp(1rem, 2.6vw, 1.35rem)/1.25 var(--head); }
.stage__msg span { font: 600 .9rem/1.4 var(--body); color: var(--ink-soft); }

@keyframes haul {
  0% { transform: rotate(-16deg) translateY(10px); }
  35% { transform: rotate(9deg) translateY(-6px); }
  55% { transform: rotate(-4deg) translateY(0); }
  75% { transform: rotate(3deg) translateY(2px); }
  100% { transform: rotate(-16deg) translateY(10px); }
}
@keyframes kick-l { 0%, 100% { transform: rotate(18deg); } 50% { transform: rotate(-6deg); } }
@keyframes kick-r { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(-22deg); } }
@keyframes nudge { 0%, 60%, 100% { transform: translateX(0) rotate(0); } 40% { transform: translateX(8px) rotate(90deg); } }

/* ---------- touchline boards (buttons) ---------- */
.bench { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 14px; margin: 22px 0 6px; }
.board {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  font: 900 .95rem/1 var(--head); text-transform: uppercase; letter-spacing: .07em; text-decoration: none;
  color: var(--ink); background: var(--chalk); border: var(--line); border-radius: 14px; box-shadow: 0 5px 0 var(--ink);
  cursor: pointer; transition: transform .15s, background-color .15s;
}
.board:nth-child(odd) { transform: rotate(-1.6deg); }
.board:nth-child(even) { transform: rotate(1.4deg); }
.board:hover { background: #fff; color: var(--ink); transform: rotate(0) translateY(-2px); }
.board:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.board--full { background: var(--jersey); color: #fff; }
.board--full:hover { background: var(--jersey-dark); color: #fff; }
.board__icon { width: 18px; height: 16px; background: currentColor; clip-path: path("M9 16 1.3 8.3A4.6 4.6 0 0 1 9 2.4a4.6 4.6 0 0 1 7.7 5.9Z"); opacity: .35; }
.board__count { min-width: 2ch; padding: 3px 7px; border-radius: 8px; background: var(--ink); color: var(--chalk); font-size: .8rem; letter-spacing: 0; }
.board__label--on { display: none; }
.board--like[data-gf-liked], .board--like[data-gf-liked]:hover { background: var(--ink); color: var(--chalk); box-shadow: 0 2px 0 var(--jersey); transform: translateY(3px) rotate(-1.6deg); }
.board--like[data-gf-liked] .board__icon { opacity: 1; color: var(--jersey); }
.board--like[data-gf-liked] .board__label--on { display: inline; }
.board--like[data-gf-liked] .board__label--off { display: none; }
.board--like[data-gf-liked] .board__count { background: var(--jersey); color: #fff; }
.bench__msg { flex-basis: 100%; font-weight: 700; color: var(--chalk); }
.bench__msg:empty { display: none; }
.lede { max-width: 640px; margin: 16px auto 0; color: var(--chalk); font-weight: 600; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }

/* ---------- reading sheet ---------- */
.sheet {
  max-width: 780px; margin: 30px auto; padding: clamp(22px, 5vw, 48px);
  background: var(--chalk); border: 4px solid var(--ink); border-radius: var(--r-lg); box-shadow: 0 10px 0 rgba(0, 0, 0, .28);
}
.sheet h2 {
  position: relative; margin: 2.2em 0 .6em; font: 900 clamp(1.4rem, 3.6vw, 1.85rem)/1.2 var(--head); letter-spacing: .005em;
}
.sheet h2::after { content: ""; display: block; width: 86px; height: 8px; margin-top: 8px; background: var(--jersey); border: 2px solid var(--ink); border-radius: 6px; transform: rotate(-2deg); }
.sheet > h2:first-child, .sheet > :first-child { margin-top: 0; }
.sheet h3 { margin: 1.6em 0 .35em; font: 800 1.15rem/1.3 var(--head); }
.sheet p, .sheet li { max-width: 68ch; }
.sheet ul, .sheet ol { padding-left: 1.3em; }
.sheet li { margin: .35em 0; }
.sheet li::marker { color: var(--jersey-dark); font-weight: 900; }
.sheet blockquote { margin: 1.2em 0; padding: 12px 18px; background: #fff; border: var(--line); border-radius: var(--r-md); transform: rotate(-.6deg); font-weight: 600; }
.sheet blockquote p { margin: 0; }
.sheet img { display: block; width: 100%; margin: 1.4em 0 .4em; border: 4px solid var(--ink); border-radius: var(--r-md); transform: rotate(1deg); box-shadow: 0 6px 0 rgba(0, 0, 0, .2); }
.sheet img + em, .sheet .caption { display: block; font-size: .9rem; color: var(--ink-soft); }
.sheet kbd {
  display: inline-block; min-width: 1.9em; padding: 3px 8px; margin: 2px 1px; text-align: center;
  font: 800 .9rem/1.2 var(--head); color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 0 var(--ink);
}
.sheet code { font-size: .95em; }

/* controls table */
.keys { width: 100%; margin: 1em 0 1.2em; border-collapse: separate; border-spacing: 0; border: var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.keys th, .keys td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 2px solid var(--chalk-2); }
.keys tr:last-child th, .keys tr:last-child td { border-bottom: 0; }
.keys thead th { background: var(--ink); color: var(--chalk); font: 900 .9rem/1.2 var(--head); text-transform: uppercase; letter-spacing: .06em; }
.keys thead th:nth-child(2) { background: var(--jersey-dark); }
.keys thead th:nth-child(3) { background: #1f5d8c; }
.keys tbody th { font-weight: 700; width: 34%; }

/* FAQ */
.faq__item { padding: 4px 0 6px; border-top: 2px dashed var(--chalk-2); }
.faq__item:first-of-type { border-top: 0; }
.faq__q { margin-bottom: .2em; }
.faq__a { margin-top: .2em; }

/* ---------- comments ---------- */
.stands { max-width: 780px; margin: 30px auto 40px; padding: 0 16px; color: var(--chalk); }
.stands > h2 { margin: 0 0 14px; font: 900 1.6rem/1.2 var(--head); color: var(--chalk); text-shadow: 0 2px 0 var(--ink); }
.chalk { position: relative; padding: 18px; background: var(--turf-dark); border: 3px solid var(--ink); border-radius: var(--r-md); box-shadow: 0 6px 0 rgba(0, 0, 0, .25); }
.chalk__to { margin: 0 0 8px; font-weight: 700; }
.chalk:not([data-gf-replying]) .chalk__to { display: none; }
.chalk__cancel { font: inherit; font-size: .85rem; color: var(--chalk); background: none; border: 2px solid var(--chalk); border-radius: 10px; padding: 3px 9px; cursor: pointer; }
.chalk__field { display: block; margin-bottom: 12px; }
.chalk__field span { display: block; margin-bottom: 4px; font-weight: 700; }
.chalk__field em { font-weight: 400; opacity: .8; }
.chalk input, .chalk textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--chalk); border: 3px solid var(--ink); border-radius: 12px; padding: 10px 12px;
}
.chalk textarea { resize: vertical; min-height: 92px; }
.chalk__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.chalk__msg { font-weight: 700; }
.board--send { background: var(--jersey); color: #fff; transform: rotate(-1.2deg); }
.board--send:hover { background: var(--jersey-dark); color: #fff; }

.threads { list-style: none; margin: 18px 0 0; padding: 0; }
.threads[data-gf-empty]::before, .threads[data-gf-off]::before {
  content: attr(data-invite); display: block; padding: 14px 16px; color: var(--ink); background: var(--chalk);
  border: 3px dashed var(--ink); border-radius: var(--r-md); font-weight: 600; transform: rotate(-.8deg);
}
.threads[data-gf-off]::before { content: "Comments are closed."; }
.note { margin: 0 0 14px; padding: 14px 16px; color: var(--ink); background: var(--chalk); border: 3px solid var(--ink); border-radius: var(--r-md); box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.note:nth-child(even) { transform: rotate(.5deg); }
.note:nth-child(odd) { transform: rotate(-.4deg); }
.note[data-gf-owner] { background: #fff4e8; border-color: var(--jersey-dark); box-shadow: 0 4px 0 var(--jersey-dark); }
.note__meta { margin: 0 0 4px; font-size: .9rem; color: var(--ink-soft); }
.note__meta b { color: var(--ink); }
.note__owner { padding: 1px 7px; border-radius: 7px; background: var(--jersey); color: #fff; font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.note__text { margin: 0 0 6px; white-space: pre-line; overflow-wrap: anywhere; }
.note__reply { font: 700 .85rem/1 var(--body); color: var(--jersey-dark); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; }
.note__replies { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; border-left: 4px solid var(--chalk-2); }
.note__replies .note { box-shadow: none; transform: none; margin-bottom: 8px; }
.note__replies .chalk { margin: 8px 0; }

/* ---------- pages ---------- */
.sheet--page .signboard, .sheet--legal .signboard { margin-bottom: 18px; font-size: clamp(1.5rem, 4.4vw, 2.2rem); }
.sheet__kicker { margin: 0 0 10px; font: 800 .8rem/1 var(--head); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.sheet__updated { color: var(--ink-soft); font-size: .95rem; }
.sheet__intro { font-size: 1.15rem; font-weight: 600; }
.sheet__back { margin-top: 2.2em; }
.board--link { background: var(--jersey); color: #fff; }
.board--link:hover { background: var(--jersey-dark); color: #fff; }

/* ---------- footer ---------- */
.foot { margin-top: 40px; background: var(--ink); color: var(--chalk); border-top: 6px solid var(--jersey); }
.foot__in { max-width: 1100px; margin: 0 auto; padding: 26px 16px 34px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.foot__brand { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 900 1.2rem/1 var(--head); transform: rotate(-1.5deg); }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.foot__links a { color: var(--chalk); font-weight: 700; }
.foot__links a:hover { color: var(--jersey); }
.foot__credit { margin: 0; font-size: .9rem; opacity: .8; }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .topbar { position: static; }
  .topbar__in { padding: 8px 12px; gap: 8px; justify-content: center; }
  .brand { font-size: 1.1rem; }
  .nav { justify-content: center; gap: 6px; }
  .nav__link { padding: 8px 9px; font-size: .78rem; }
  .pitch { padding: 14px 0 4px; }
  .stage { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .bench { padding: 0 10px; gap: 10px 8px; }
  .board { padding: 10px 11px; letter-spacing: .03em; font-size: .85rem; }
  .kickoff { gap: 10px; padding: 11px 18px 11px 11px; font-size: 1rem; border-radius: 18px; }
  .kickoff__ball { width: 28px; height: 28px; }
  .lede { padding: 0 16px; }
  .sheet { margin: 22px 10px; border-radius: 22px; }
  .rig { transform: scale(.6); margin: -40px 0 -36px; }
  .stage__msg span { display: none; }
  .keys th, .keys td { padding: 10px 8px; }
  .keys tbody th { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
