.hunt {
  padding-top: 40px;
}

.hunt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
}

.hunt-head h1 {
  margin: 0;
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.hunt-head p {
  margin: 12px 0 0;
  max-width: 52ch;
  color: #cfcadb;
}

.hunt-tools {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hunt-tools .btn i {
  font-size: 17px;
}

.hunt-confirm {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  width: max-content;
  max-width: 320px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--plum);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  font-size: 14px;
}

.hunt-confirm[hidden] {
  display: none;
}

.hunt-confirm button {
  padding: 6px 12px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--plum-2);
  font-weight: 700;
  font-size: 13px;
}

.hunt-confirm button[data-reset="yes"] {
  background: #e5484d;
  color: #fff;
}

.hunt-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(0, 1.6fr);
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--plum);
  overflow: hidden;
}

.hunt-stats > div {
  padding: 14px 16px;
  min-width: 0;
  border-left: 1px solid var(--line);
}

.hunt-stats > div:first-child {
  border-left: 0;
}

.hunt-stats span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.hunt-stats strong {
  display: block;
  margin-top: 2px;
  font-stretch: 100%;
  font-weight: 800;
  font-size: clamp(17px, 1.55vw, 22px);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hunt-stats strong.is-long {
  font-size: clamp(15px, 1.25vw, 19px);
}

.hunt-stats strong.is-xlong {
  font-size: clamp(13px, 1.05vw, 16px);
}

.hunt-stats .is-up {
  color: var(--volt);
}

.hunt-stats .is-down {
  color: #ff6b6b;
}

.hunt-best strong {
  font-size: 18px;
  line-height: 1.5;
}

.hunt-settings,
.hunt-add {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.hunt-settings {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
}

.hunt-add {
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--plum);
}

.hunt-settings label span,
.hunt-add label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

.hunt input,
.hunt select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.hunt input:focus,
.hunt select:focus {
  outline: none;
  border-color: var(--volt);
}

.hunt input::placeholder {
  color: #6f6982;
}

.hunt-add .btn {
  height: 44px;
}

.hunt-slot {
  position: relative;
}

.hunt-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--plum);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

.hunt-suggest[hidden] {
  display: none;
}

.hunt-suggest li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-s);
  cursor: pointer;
}

.hunt-suggest li[aria-selected="true"],
.hunt-suggest li:hover {
  background: var(--plum-2);
}

.hunt-suggest img {
  width: 27px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--plum-2);
}

.hunt-suggest strong,
.h-slot strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.hunt-suggest small,
.h-slot small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.hunt-table-wrap {
  position: relative;
  margin-top: 20px;
  overflow-x: auto;
}

.hunt-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.hunt-table th {
  padding: 0 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.hunt-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.hunt-table tr.is-current td {
  background: rgba(214, 255, 58, 0.06);
}

.hunt-table tr.is-current .h-num {
  color: var(--volt);
  box-shadow: inset 3px 0 0 var(--volt);
}

.h-num {
  width: 40px;
  font-weight: 700;
  color: var(--muted);
}

.h-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.h-slot img,
.h-noimg {
  flex-shrink: 0;
  width: 30px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--plum-2);
}

.h-money {
  width: 120px;
}

.hunt .h-money input {
  height: 38px;
  text-align: right;
}

.h-x {
  width: 90px;
  text-align: right;
  font-stretch: 112%;
  font-weight: 800;
}

.h-x.is-big {
  color: var(--volt);
}

.h-act {
  width: 140px;
  text-align: right;
  white-space: nowrap;
}

.h-act button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--muted);
  font-size: 17px;
}

.h-act button:hover {
  background: var(--plum-2);
  color: var(--text);
}

.h-play {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 4px;
  border-radius: var(--radius-s);
  background: var(--violet);
  color: #fff;
  font-size: 15px;
  vertical-align: middle;
}

.h-play:hover {
  background: #8d47ff;
  color: #fff;
}

.h-act button[data-act="del"]:hover {
  color: #ff6b6b;
}

.hunt-empty {
  margin: 0;
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
}

.hunt-empty[hidden] {
  display: none;
}

.hunt-obs {
  margin-top: 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  color: #cfcadb;
}

.hunt-obs summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.hunt-obs ol {
  margin: 14px 0 8px;
  padding-left: 20px;
  line-height: 1.6;
}

.hunt-obs li + li {
  margin-top: 6px;
}

.hunt-obs code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--plum-2);
  font-size: 13px;
  word-break: break-all;
}

.hunt-obs p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hunt-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hunt-stats > div {
    border-top: 1px solid var(--line);
  }

  .hunt-stats > div:nth-child(-n + 3) {
    border-top: 0;
  }

  .hunt-stats > div:nth-child(3n + 1) {
    border-left: 0;
  }

  .hunt-best {
    grid-column: span 3;
  }
}

@media (max-width: 700px) {
  .hunt {
    padding-top: 28px;
  }

  .hunt-head h1 {
    font-stretch: 110%;
    font-size: clamp(30px, 9.4vw, 48px);
  }

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

  .hunt-stats > div:nth-child(n) {
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
  }

  .hunt-stats > div:nth-child(2n + 1) {
    border-left: 0;
  }

  .hunt-stats > div:nth-child(-n + 2) {
    border-top: 0;
  }

  .hunt-best {
    grid-column: span 2;
  }

  .hunt-stats strong {
    font-size: 19px;
  }

  .hunt-settings {
    grid-template-columns: 1fr 1fr;
  }

  .hunt-settings label:first-child {
    grid-column: span 2;
  }

  .hunt-add {
    grid-template-columns: 1fr 1fr;
  }

  .hunt-slot,
  .hunt-add .btn {
    grid-column: span 2;
  }
}
