@font-face {
  font-family: "PT Sans";
  src: url("pt-sans.woff") format("woff");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #131b17;
  --paper: #f7f5ed;
  --muted: #bbcabd;
  --green: #caef8f;
  --red: #ff786e;
  --border: #415346;
  font: 17px/1.4 "PT Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--paper); }
h1, h2, p { margin: 0; }
a { color: inherit; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.site-header, main { width: min(870px, calc(100% - 28px)); margin-inline: auto; }
.site-header {
  min-height: 59px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.site-header a { text-decoration: none; font-size: .83rem; }
.site-header img { display: block; object-fit: contain; }
h1 {
  margin: 22px 0 7px;
  font-size: clamp(2.25rem, 7.5vw, 4.65rem);
  line-height: .97;
  letter-spacing: -.055em;
}
h1 span { color: var(--red); }
.instruction { margin-bottom: 17px; color: var(--muted); }
.match-bar {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 12px;
  background: #202e24;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  font-size: .87rem;
}
.match-bar strong { color: var(--green); margin-inline: 3px; white-space: nowrap; }
.pitch {
  height: clamp(250px, 47svh, 425px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--border);
  background: repeating-linear-gradient(90deg, #244d35 0 12.5%, #20452f 12.5% 25%);
}
.field {
  position: absolute;
  inset: 12px;
  border: 2px solid #a1c5a45e;
  pointer-events: none;
}
.field::before, .field::after, .penalty-area, .penalty-area::after { content: ""; position: absolute; }
.field::before { inset: 0 auto 0 50%; border-left: 2px solid #a1c5a45e; }
.field::after {
  top: 50%;
  left: 50%;
  width: min(23%, 133px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid #a1c5a45e;
  border-radius: 50%;
}
.penalty-area {
  top: 22%;
  bottom: 22%;
  width: 10%;
  border: 2px solid #a1c5a45e;
  border-left: 0;
}
.penalty-area::after {
  inset: 26% auto 26% 0;
  width: 45%;
  border: 2px solid #a1c5a45e;
  border-left: 0;
}
.penalty-area.left { left: 0; }
.penalty-area.right { right: 0; transform: scaleX(-1); }
button { cursor: pointer; font: inherit; touch-action: manipulation; }
.coach {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 6px;
}
.coach-figure {
  display: block;
  width: clamp(84px, 25vw, 112px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px #09170c99);
}
.coach[data-corner] { transform: none; }
.coach.face-left .coach-figure { transform: scaleX(-1); }
.coach[data-corner^="top"] { top: 12px; }
.coach[data-corner^="bottom"] { top: auto; bottom: 12px; }
.coach[data-corner$="left"] { left: 12px; }
.coach[data-corner$="right"] { left: auto; right: 12px; }
.fire { display: grid; place-items: center; min-height: 44px; padding-inline: 14px; border-radius: 4px; background: var(--red); color: #231413; font-weight: bold; }
.result {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 18px;
  background: #101d15ed;
  text-align: center;
}
.result h2 { font-size: clamp(1.7rem, 6vw, 2.7rem); line-height: 1.05; }
.result button { margin-top: 8px; min-height: 46px; padding: 8px 18px; color: #152013; background: var(--green); border: 0; border-radius: 6px; font-weight: bold; }
.comment {
  min-height: 105px;
  display: grid;
  align-content: center;
  padding: 10px 13px;
  background: #202e24;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 9px 9px;
}
#speaker { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green); font-weight: bold; }
#line { font-size: clamp(1.05rem, 3vw, 1.28rem); line-height: 1.24; }
footer { padding: 13px 0 20px; color: var(--muted); font-size: .79rem; }
footer div { display: flex; flex-wrap: wrap; gap: 4px 15px; }
