#penalty-panel .penalty-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(280px, .85fr);
  width: min(100%, 1100px);
  margin-inline: auto;
  color: var(--rail-ink);
}
#penalty-panel [hidden] { display: none !important; }
.penalty-picker {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 430px;
  padding: clamp(18px, 5vw, 44px);
  background: radial-gradient(ellipse at 50% 0%, #245747, #102d27 65%, #0b231e);
  color: #f3fdf8;
}
.penalty-picker > * { width: min(100%, 480px); margin: 0 auto; }
.penalty-picker-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
}
.penalty-picker-header .penalty-eyebrow { grid-column: 1 / -1; color: #b9dfd0; }
.penalty-picker-header h1 { margin: 3px 0 0; font-size: clamp(30px, 6vw, 45px); line-height: 1; }
.penalty-picker-step {
  padding: 5px 10px;
  border: 1px solid #c1ffdb57;
  border-radius: 99px;
  color: #cbecdf;
  font-size: 13px;
  font-weight: 700;
}
#penalty-picker-title { font-size: clamp(19px, 4vw, 24px); line-height: 1.25; }
#penalty-picked-country { color: #c8ecdf; }
.penalty-flags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.penalty-flag {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 89px;
  padding: 9px 4px;
  border: 1px solid #a0e7c555;
  border-radius: 12px;
  background: #122e27;
  color: #f3fdf8;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.penalty-flag:hover { border-color: #a0e7c5; background: #1b4438; }
.penalty-flag svg {
  display: block;
  width: min(100%, 66px);
  aspect-ratio: 5 / 3;
  border-radius: 5px;
  box-shadow: 0 2px 8px #001b1380;
}
#penalty-panel #penalty-picker-back { width: min(100%, 480px); }
.penalty-arena {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(16px, 3vw, 36px);
  background: radial-gradient(ellipse at 50% 0%, #236859 0%, #123e35 58%, #0a2923 100%);
  color: #f3fdf8;
}
.penalty-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(100%, 520px);
  padding: 12px 14px;
  border: 1px solid #d1ffe238;
  border-radius: 14px;
  background: #102820;
  text-align: center;
}
.penalty-board > div { display: grid; gap: 3px; min-width: 0; }
.penalty-board span { color: #bcdfd3; font-size: 12px; line-height: 1.3; }
.penalty-board strong { overflow-wrap: anywhere; font-size: 15px; line-height: 1.25; }
.penalty-score strong { font-size: clamp(22px, 4vw, 34px); font-variant-numeric: tabular-nums; }
.penalty-pitch { width: min(100%, 550px); display: block; }
#penalty-keeper, #penalty-ball { transform-box: fill-box; transform-origin: center; }
.penalty-kicks { display: flex; gap: 9px; margin: 0; padding: 0; list-style: none; }
.penalty-kicks li {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d1ffe252;
  border-radius: 50%;
  color: #cae6da;
  background: #102b25;
  font-size: 14px;
  font-weight: 800;
}
.penalty-kicks [data-kick="goal"] { color: #0c3020; background: #9df3bf; border-color: #9df3bf; }
.penalty-kicks [data-kick="save"] { color: #fff5f0; background: #8c3d39; border-color: #e79483; }
.penalty-result { min-height: 2.8em; margin: 10px 0 0; text-align: center; font-size: 15px; font-weight: 750; }
.penalty-aim {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 360px);
  margin: 2px 0 10px;
}
.penalty-aim button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-height: 46px;
  padding: 6px 3px;
  border: 1px solid #9df3bf80;
  border-radius: 10px;
  background: #153d31;
  color: #f3fdf8;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.penalty-aim button:is(:hover, [data-aiming]) { background: #9df3bf; color: #102820; }
.penalty-aim button[aria-disabled="true"] { cursor: default; }
.penalty-aim button[aria-disabled="true"]:not([data-aiming]) { opacity: .6; }
.penalty-controls {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: clamp(16px, 3vw, 28px);
  background: var(--rail-bg);
}
.penalty-heading { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.penalty-eyebrow { color: var(--rail-muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.penalty-heading h1 { margin: 3px 0 0; font-size: 28px; line-height: 1.1; color: var(--rail-ink); }
.penalty-mode { padding: 5px 8px; border: 1px solid var(--rail-line); border-radius: 99px; color: var(--rail-ink); font-size: 11px; text-align: center; }
#penalty-form, .penalty-rematch { display: grid; gap: 10px; }
#penalty-form label { display: grid; gap: 4px; min-width: 0; color: var(--rail-muted); font-size: 13px; font-weight: 650; }
#penalty-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid var(--rail-line);
  border-radius: 10px;
  background: var(--rail-well);
  color: var(--rail-ink);
  font: inherit;
  font-size: 16px;
  color-scheme: dark;
}
html[data-theme="light"] #penalty-form input { color-scheme: light; }
.penalty-amount { position: relative; }
#penalty-form .penalty-amount input { padding-inline-end: 65px; }
#penalty-currency { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.penalty-quote { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; align-items: center; color: var(--rail-muted); font-size: 13px; }
.penalty-quote strong { color: var(--rail-ink); overflow-wrap: anywhere; }
#penalty-panel :is(.penalty-primary,.penalty-secondary) {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
#penalty-panel .penalty-primary { background: var(--mini-primary); color: var(--mini-on-primary); }
#penalty-panel .penalty-secondary { background: var(--mini-secondary); border-color: var(--mini-line); color: var(--mini-on-secondary); }
#penalty-panel :is(button,select,input):disabled { opacity: .55; cursor: default; }
#penalty-panel :is(button,select,input):focus-visible { outline: 2px solid #79bfff; outline-offset: 2px; }
.penalty-note { margin: 0; color: var(--rail-muted); font-size: 13px; line-height: 1.4; }
.penalty-note:empty { display: none; }
#penalty-status[data-error] { color: #ffb8ab; }
html[data-theme="light"] #penalty-status[data-error] { color: #8e2929; }
@media (max-width: 740px) {
  #penalty-panel .penalty-layout { grid-template-columns: minmax(0, 1fr); }
  .penalty-arena { padding: 12px 14px 6px; }
  .penalty-board { gap: 6px; padding: 8px 10px; }
  .penalty-board strong { font-size: 13px; }
  .penalty-score strong { font-size: 23px; }
  .penalty-pitch { max-height: 205px; }
  .penalty-result { min-height: 2.5em; font-size: 14px; }
}
