.kfc123-aff {
  --kfc123-red: #d71920;
  --kfc123-red-dark: #9f1117;
  --kfc123-ink: #201a1b;
  --kfc123-muted: #766b6d;
  --kfc123-line: #eadfe0;
  --kfc123-surface: #fffafa;
  box-sizing: border-box;
  width: min(1120px, calc(100% - 32px));
  margin: 48px auto;
  padding: clamp(22px, 4vw, 40px);
  color: var(--kfc123-ink);
  background:
    radial-gradient(circle at 100% 0, rgba(215, 25, 32, 0.09), transparent 34%),
    var(--kfc123-surface);
  border: 1px solid var(--kfc123-line);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(52, 18, 20, 0.12);
  font-family: "Noto Sans Thai", "Tahoma", sans-serif;
}

.kfc123-aff *,
.kfc123-aff *::before,
.kfc123-aff *::after {
  box-sizing: inherit;
}

.kfc123-aff__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.kfc123-aff__eyebrow {
  margin: 0 0 6px;
  color: var(--kfc123-red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.kfc123-aff h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.2;
}

.kfc123-aff__updated {
  margin: 8px 0 0;
  color: var(--kfc123-muted);
  font-size: 14px;
}

.kfc123-aff__search {
  display: grid;
  gap: 7px;
  min-width: min(100%, 280px);
  color: var(--kfc123-muted);
  font-size: 13px;
  font-weight: 700;
}

.kfc123-aff__search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--kfc123-ink);
  background: #fff;
  border: 1px solid var(--kfc123-line);
  border-radius: 12px;
  outline: none;
  font: inherit;
  font-weight: 500;
}

.kfc123-aff__search input:focus {
  border-color: var(--kfc123-red);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.12);
}

.kfc123-aff__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--kfc123-line);
  border-radius: 16px;
  background: #fff;
}

.kfc123-aff__table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.kfc123-aff__table th,
.kfc123-aff__table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--kfc123-line);
  text-align: right;
  white-space: nowrap;
}

.kfc123-aff__table th {
  color: #fff;
  background: linear-gradient(135deg, var(--kfc123-red), var(--kfc123-red-dark));
  font-size: 13px;
  font-weight: 800;
}

.kfc123-aff__table th:nth-child(1),
.kfc123-aff__table td:nth-child(1) {
  width: 80px;
  text-align: center;
}

.kfc123-aff__table th:nth-child(2),
.kfc123-aff__table td:nth-child(2) {
  text-align: left;
}

.kfc123-aff__table tbody tr:last-child td {
  border-bottom: 0;
}

.kfc123-aff__table tbody tr:hover {
  background: #fff5f5;
}

.kfc123-aff__table td:last-child {
  color: var(--kfc123-red-dark);
  font-weight: 800;
}

.kfc123-aff__state {
  padding: 18px 8px 0;
  color: var(--kfc123-muted);
  text-align: center;
}

.kfc123-aff__state[hidden] {
  display: none;
}

.kfc123-aff__state--error {
  color: var(--kfc123-red-dark);
}

@media (max-width: 720px) {
  .kfc123-aff {
    width: min(100% - 20px, 1120px);
    margin-block: 28px;
    padding: 20px 14px;
    border-radius: 18px;
  }

  .kfc123-aff__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .kfc123-aff__search {
    width: 100%;
  }
}
