:root {
  --nf12-gold: #A87830;
  --nf12-navy: #1E008A;
  --nf12-white: #FFFFFF;
}

.nf12-local-page {
  margin: 0;
  min-height: 100vh;
  background: #f4f2ef;
  padding: 24px;
  box-sizing: border-box;
}

.nf12-round-summary {
  --nf12-ink: #14121c;
  --nf12-muted: #696579;
  --nf12-line: rgba(30, 0, 138, 0.16);
  --nf12-soft: #f8f6f2;
  --nf12-panel: #ffffff;
  color: var(--nf12-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.nf12-round-summary * {
  box-sizing: border-box;
}

.nf12-dashboard {
  background: var(--nf12-white);
  border: 1px solid var(--nf12-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(20, 18, 28, 0.08);
}

.nf12-hero {
  background: linear-gradient(135deg, var(--nf12-navy), #2e1596 58%, var(--nf12-gold));
  color: var(--nf12-white);
  padding: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.nf12-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0.84;
}

.nf12-title {
  display: block;
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  font-family: inherit;
  font-style: normal;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--nf12-white);
}

.nf12-subtitle {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.nf12-select-wrap {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.nf12-selects {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nf12-param-label {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.nf12-param-label__key {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.nf12-param-label__value {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: var(--nf12-white);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
  min-height: 46px;
  display: flex;
  align-items: center;
}

.nf12-select-wrap label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.nf12-select-wrap select {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
  color: var(--nf12-white);
  border-radius: 8px;
  padding: 10px 34px 10px 12px;
  font: inherit;
  font-weight: 700;
}

.nf12-select-wrap option {
  color: var(--nf12-ink);
}

.nf12-content {
  padding: 24px;
  display: grid;
  gap: 24px;
}

.nf12-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.nf12-kpi {
  border: 1px solid var(--nf12-line);
  border-radius: 8px;
  padding: 14px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--nf12-panel);
}

.nf12-kpi__label {
  color: var(--nf12-muted);
  font-size: 12px;
  font-weight: 700;
}

.nf12-kpi__value {
  color: var(--nf12-navy);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.nf12-kpi__sep {
  color: var(--nf12-muted);
  margin: 0 2px;
}

.nf12-kpi__note {
  color: var(--nf12-muted);
  font-size: 12px;
}

.nf12-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 20px;
}

.nf12-section {
  display: grid;
  gap: 12px;
}

.nf12-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.nf12-section-title {
  display: block;
  margin: 0;
  font-size: 18px;
  font-family: inherit;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
  color: var(--nf12-ink);
}

.nf12-section-note {
  color: var(--nf12-muted);
  font-size: 12px;
}

.nf12-chart {
  border: 1px solid var(--nf12-line);
  border-radius: 8px;
  padding: 18px 14px 12px;
  height: 300px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  background: linear-gradient(180deg, #fff, var(--nf12-soft));
}

.nf12-bar-button {
  border: 0;
  background: transparent;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 8px;
  padding: 0;
  cursor: pointer;
  color: var(--nf12-ink);
  font: inherit;
}

.nf12-bar {
  width: 100%;
  height: var(--nf12-bar-height);
  min-height: 8px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--nf12-gold), #c99a59);
  align-self: end;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.42);
  transform-origin: bottom;
  animation: nf12-bar-grow 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--nf12-bar-delay);
  transition: transform 160ms ease, background 160ms ease;
}

.nf12-bar-button:hover .nf12-bar,
.nf12-bar-button:focus-visible .nf12-bar,
.nf12-bar-button.is-active .nf12-bar {
  background: linear-gradient(180deg, var(--nf12-navy), #4a32bd);
  transform: scaleY(1) translateY(-3px);
}

@keyframes nf12-bar-grow {
  from {
    transform: scaleY(0);
  }

  to {
    transform: scaleY(1);
  }
}

.nf12-bar-value {
  font-weight: 800;
  color: var(--nf12-navy);
  line-height: 1;
}

.nf12-bar-label {
  color: var(--nf12-muted);
  font-size: 11px;
  line-height: 1.2;
  min-height: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
}

.nf12-match-panel {
  border: 1px solid var(--nf12-line);
  border-radius: 8px;
  padding: 16px;
  min-height: 258px;
  background: var(--nf12-panel);
}

.nf12-match-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.nf12-match-list {
  display: grid;
  gap: 12px;
}

.nf12-match {
  border-bottom: 1px solid rgba(30, 0, 138, 0.11);
  padding-bottom: 12px;
}

.nf12-match:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.nf12-match-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.nf12-match-score span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.nf12-match-score span:first-child {
  text-align: right;
}

.nf12-match-score span:last-child {
  text-align: left;
}

.nf12-score {
  color: var(--nf12-navy);
  white-space: nowrap;
  text-align: center;
}

.nf12-match-meta,
.nf12-goal-meta {
  color: var(--nf12-muted);
  font-size: 12px;
}

.nf12-goal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.nf12-tag {
  border: 1px solid rgba(168, 120, 48, 0.28);
  border-radius: 999px;
  padding: 3px 8px;
  color: #4a3214;
  background: #fbf2e7;
  font-size: 12px;
  font-weight: 700;
}

.nf12-lists {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.nf12-table-wrap {
  border: 1px solid var(--nf12-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--nf12-panel);
}

.nf12-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.nf12-table th,
.nf12-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(30, 0, 138, 0.1);
  text-align: left;
  vertical-align: top;
}

.nf12-table th {
  background: #f5f2fb;
  color: var(--nf12-navy);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.nf12-table tr:last-child td {
  border-bottom: 0;
}

.nf12-table .num {
  text-align: right;
  white-space: nowrap;
}

.nf12-scorer-list {
  border: 1px solid var(--nf12-line);
  border-radius: 8px;
  background: var(--nf12-panel);
  overflow: hidden;
}

.nf12-scorer-item {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(30, 0, 138, 0.1);
}

.nf12-scorer-item:last-child {
  border-bottom: 0;
}

.nf12-scorer-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.nf12-scorer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.nf12-scorer-name {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--nf12-ink);
}

.nf12-scorer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.nf12-scorer-badge {
  border-radius: 999px;
  color: var(--nf12-white);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.nf12-scorer-badge.is-multi {
  background: #c92828;
}

.nf12-scorer-badge.is-sub {
  background: var(--nf12-gold);
}

.nf12-scorer-badge.is-first {
  background: #168447;
}

.nf12-scorer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.nf12-scorer-meta {
  color: var(--nf12-muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.nf12-scorer-goals {
  color: var(--nf12-gold);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.nf12-scorer-goal-number {
  font-size: 28px;
}

.nf12-scorer-goal-unit {
  font-size: 13px;
}

.nf12-mini-list {
  border: 1px solid var(--nf12-line);
  border-radius: 8px;
  background: var(--nf12-panel);
  overflow: hidden;
}

.nf12-mini-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(30, 0, 138, 0.1);
}

.nf12-mini-item:last-child {
  border-bottom: 0;
}

.nf12-mini-name {
  font-weight: 800;
}

.nf12-mini-sub {
  color: var(--nf12-muted);
  font-size: 12px;
}

.nf12-mini-count {
  color: var(--nf12-gold);
  font-weight: 900;
  white-space: nowrap;
}

.nf12-empty,
.nf12-error {
  border: 1px dashed rgba(30, 0, 138, 0.24);
  border-radius: 8px;
  padding: 18px;
  color: var(--nf12-muted);
  background: var(--nf12-soft);
}

.nf12-error {
  border-color: rgba(168, 48, 48, 0.35);
  color: #8a1e1e;
}

@media (max-width: 900px) {
  .nf12-local-page {
    padding: 12px;
  }

  .nf12-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .nf12-selects {
    justify-content: flex-start;
    width: 100%;
  }

  .nf12-content {
    padding: 16px;
  }

  .nf12-kpis,
  .nf12-main-grid,
  .nf12-lists {
    grid-template-columns: 1fr;
  }

  .nf12-kpis {
    gap: 10px;
  }

  .nf12-chart {
    height: 260px;
    gap: 6px;
    padding-inline: 10px;
  }
}

@media (max-width: 560px) {
  .nf12-selects {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nf12-select-wrap {
    min-width: 0;
    width: 100%;
  }

  .nf12-param-label {
    min-width: 0;
    width: 100%;
  }

  .nf12-select-wrap select {
    width: 100%;
  }

  .nf12-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nf12-kpi {
    min-height: 92px;
  }

  .nf12-kpi__value {
    font-size: 24px;
  }

  .nf12-chart {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    height: 230px;
    padding: 14px 8px 10px;
  }

  .nf12-bar-button {
    gap: 6px;
  }

  .nf12-bar-value {
    font-size: 12px;
  }

  .nf12-bar-label {
    font-size: 10px;
    min-height: 24px;
    word-break: keep-all;
  }

  .nf12-table,
  .nf12-table thead,
  .nf12-table tbody,
  .nf12-table tr,
  .nf12-table th,
  .nf12-table td {
    display: block;
  }

  .nf12-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .nf12-table tr {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(30, 0, 138, 0.1);
  }

  .nf12-table tr:last-child {
    border-bottom: 0;
  }

  .nf12-table td {
    display: grid;
    grid-template-columns: 5.5em minmax(0, 1fr);
    gap: 10px;
    padding: 4px 0;
    border-bottom: 0;
  }

  .nf12-table td::before {
    content: attr(data-label);
    color: var(--nf12-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .nf12-table .num {
    text-align: left;
  }

  .nf12-scorer-item {
    padding: 12px;
  }

  .nf12-scorer-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .nf12-scorer-name {
    font-size: 16px;
  }

  .nf12-scorer-badges {
    max-width: 100%;
  }

  .nf12-scorer-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .nf12-scorer-goal-number {
    font-size: 25px;
  }

  .nf12-match-score {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
}
