.bonushunt-body {
  min-height: 100vh;
  overflow-x: hidden;
  color: #f2f5f8;
  background: #050d16;
}

.hunt-page {
  min-height: 100vh;
  padding-top: 32px;
  background: #050d16;
}

.hunt-shell {
  width: min(1224px, calc(100% - 64px));
  margin: 0 auto;
}

.hunt-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Compact page introduction */
.hunt-page-header {
  min-height: 108px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 4px 0 24px;
  border-bottom: 1px solid #263543;
}

.hunt-page-logo {
  width: 78px;
  height: 78px;
  display: block;
  flex: 0 0 auto;
  border: 1px solid #263b4e;
  border-radius: 15px;
  background: #101a25;
  object-fit: cover;
}

.hunt-page-header h1,
.hunt-detail-header h1,
.hunt-not-found h1 {
  margin: 0;
  color: #f5f7fa;
  font-size: clamp(27px, 3vw, 32px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.hunt-page-header p,
.hunt-detail-header p {
  margin: 7px 0 0;
  color: #8f9aa6;
  font-size: 14px;
  line-height: 1.5;
}

.hunt-page-status {
  min-height: 42px;
  display: flex;
  align-items: center;
  margin: 16px 0 0;
  padding: 10px 13px;
  border: 1px solid #273d50;
  border-radius: 7px;
  background: #0b1824;
  color: #8da0b1;
  font-size: 11px;
  font-weight: 700;
}

.hunt-page-status:empty { display: none; }
.hunt-page-status.is-error { border-color: #66353d; background: #241319; color: #ff8c93; }
.hunt-page-status.is-stale { border-color: #62522b; background: #211b0f; color: #dfc16d; }

/* Bonus-hunt history */
.hunt-list-panel {
  margin-top: 18px;
}

.hunt-list-toolbar,
.hunt-stat-toolbar,
.hunt-slots-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hunt-list-toolbar {
  min-height: 20px;
  margin-bottom: 7px;
}

.hunt-updated {
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
  color: #687989;
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.hunt-table-frame,
.hunt-slot-table-frame {
  overflow: hidden;
  border: 1px solid #2a3742;
  border-radius: 11px;
  background: #0a131c;
}

.hunt-table-frame {
  max-height: min(72vh, 760px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #bd9131 #111b24;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.hunt-table-frame:focus-visible {
  outline: 2px solid #d2a33b;
  outline-offset: 3px;
}

.hunt-table-frame::-webkit-scrollbar { width: 8px; height: 8px; }
.hunt-table-frame::-webkit-scrollbar-track { background: #111b24; }
.hunt-table-frame::-webkit-scrollbar-thumb {
  border: 2px solid #111b24;
  border-radius: 999px;
  background: #bd9131;
}

.hunt-history-table,
.hunt-slot-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.hunt-history-table {
  border-collapse: separate;
  border-spacing: 0;
}

.hunt-history-table th,
.hunt-history-table td,
.hunt-slot-table th,
.hunt-slot-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #2a343d;
  text-align: left;
}

.hunt-history-table th,
.hunt-slot-table th {
  height: 48px;
  background: #17212b;
  color: #9099a3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .01em;
}

.hunt-history-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: inset 0 -1px #37434d, 0 5px 12px rgba(0, 0, 0, .28);
}

.hunt-history-table th:first-child { width: 82px; }
.hunt-history-table th:nth-child(3) { width: 128px; }
.hunt-history-table th:nth-child(4) { width: 110px; }
.hunt-history-table th:nth-child(5) { width: 100px; }
.hunt-history-table th:nth-child(6) { width: 135px; }
.hunt-history-table th:nth-child(7),
.hunt-history-table th:nth-child(8) { width: 88px; }
.hunt-history-table th:last-child { width: 145px; }

.hunt-history-table tbody tr,
.hunt-slot-table tbody tr {
  background: #0a131c;
  transition: background-color .16s ease;
}

.hunt-history-table tbody tr:last-child td,
.hunt-slot-table tbody tr:last-child td { border-bottom: 0; }
.hunt-history-table tbody tr:hover { background: #0e1c28; }
.hunt-history-table tbody tr:focus-visible { outline: 2px solid #64bdf7; outline-offset: -3px; }

.hunt-history-table tbody tr.is-live-hunt {
  background: #0c1c24;
  box-shadow: inset 3px 0 #48d795;
}

.hunt-history-table tbody tr.is-live-hunt:hover { background: #10252d; }
.hunt-history-table tbody tr.is-live-hunt .hunt-row-link { color: #58dda0; }

.hunt-history-table td {
  height: 71px;
  color: #dce2e7;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hunt-row-link {
  color: #68bdf5;
  font-size: 14px;
  font-weight: 800;
}

.hunt-row-link:hover { color: #a9dafa; }
.hunt-row-title {
  overflow: hidden;
  color: #eef2f5 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hunt-bonus-count { display: grid; gap: 3px; }
.hunt-bonus-count strong { color: #eef2f5; font-size: 14px; }
.hunt-bonus-count small { color: #758391; font-size: 9px; font-weight: 600; }

.hunt-status-pill {
  width: max-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid #34414c;
  border-radius: 7px;
  background: #20272d;
  color: #aeb6bd;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .01em;
}

.hunt-status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.hunt-status-pill.is-live { border-color: #2f624c; background: #11281f; color: #55dda0; }
.hunt-status-pill.is-completed { color: #aeb6bd; }
.hunt-status-pill.is-completed::before { background: #ff5d64; }
.hunt-status-pill.is-draft { border-color: #5a4f30; background: #241f12; color: #d6b65e; }

.hunt-value-positive { color: #55dfa1 !important; }
.hunt-value-negative { color: #ff626a !important; }
.hunt-value-neutral { color: #b7c0c8 !important; }

.hunt-empty-state {
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 34px;
  color: #758494;
  text-align: center;
}

.hunt-empty-state[hidden] { display: none; }
.hunt-empty-state > span { color: #63b8ef; font-size: 31px; }
.hunt-empty-state h3 { margin: 0; color: #e0e5ea; font-size: 17px; }
.hunt-empty-state p { max-width: 420px; margin: 0; font-size: 11px; line-height: 1.55; }

/* Individual hunt */
.hunt-detail-shell {
  padding-top: 0;
}

.hunt-breadcrumbs {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
  color: #687583;
  font-size: 11px;
  font-weight: 700;
}

.hunt-breadcrumbs a { color: #9ba4ad; }
.hunt-breadcrumbs a:hover { color: #68bdf5; }
.hunt-breadcrumbs > span:last-child {
  min-width: 0;
  overflow: hidden;
  color: #d1d7dc;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hunt-home-crumb {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.hunt-home-crumb img {
  width: 15px;
  height: 15px;
  display: block;
  object-fit: contain;
  filter: grayscale(1) brightness(1.3);
  opacity: .8;
}

.hunt-live-sync[hidden],
#huntDetailContent[hidden] { display: none; }

.hunt-detail-header {
  padding: 0 2px 24px;
  border-bottom: 1px solid #2a3742;
}

.hunt-detail-topline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  margin-bottom: 19px;
}

.hunt-meta-chip,
.hunt-live-sync,
.hunt-progress-chip {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 0;
  border-radius: 7px;
  background: #20272d;
  color: #a8b0b7;
  font-size: 10px;
  font-weight: 600;
}

.hunt-meta-chip {
  font-variant-numeric: tabular-nums;
}

.hunt-live-sync {
  background: #11281f;
  color: #55dda0;
  font-weight: 700;
}

.hunt-live-sync i {
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 50%;
  background: currentColor;
  animation: huntLivePulse 1.8s ease-in-out infinite;
}

.hunt-detail-heading h1 {
  max-width: 820px;
  overflow-wrap: anywhere;
}

.hunt-detail-header p {
  max-width: 680px;
}

.hunt-stat-panel {
  margin-top: 19px;
}

.hunt-stat-toolbar {
  min-height: 19px;
  margin-bottom: 7px;
}

.hunt-stat-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  border-top: 1px solid #2a3742;
  border-bottom: 1px solid #2a3742;
}

.hunt-stat-grid article {
  min-width: 0;
  min-height: 91px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 15px 13px;
  border-right: 1px solid #2a3742;
}

.hunt-stat-grid article:last-child { border-right: 0; }
.hunt-stat-grid span {
  color: #8c959e;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
}

.hunt-stat-grid strong {
  min-width: 0;
  overflow: hidden;
  color: #f1f4f7;
  font-size: clamp(14px, 1.15vw, 18px);
  line-height: 1.2;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hunt-stat-grid article.hunt-value-positive strong { color: #55dfa1; }
.hunt-stat-grid article.hunt-value-negative strong { color: #ff626a; }
.hunt-stat-grid article.hunt-value-neutral strong { color: #b7c0c8; }

.hunt-slots-panel {
  margin-top: 25px;
}

.hunt-slots-toolbar {
  min-height: 38px;
  margin-bottom: 10px;
}

.hunt-slots-toolbar h2 {
  margin: 0;
  color: #eef2f5;
  font-size: 18px;
  letter-spacing: -.02em;
}

.hunt-progress-chip {
  min-height: 27px;
  background: #172530;
  color: #75bde9;
}

.hunt-slot-table th:first-child { width: 72px; }
.hunt-slot-table th:nth-child(3),
.hunt-slot-table th:nth-child(4),
.hunt-slot-table th:nth-child(5) {
  width: 150px;
  text-align: right;
}

.hunt-slot-table td {
  height: 78px;
  color: #e0e5e9;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hunt-slot-table td:first-child {
  color: #9ca7b1;
  font-size: 13px;
}

.hunt-slot-table td:nth-child(n + 3) { text-align: right; }
.hunt-slot-table tr.is-unopened td { color: #788592; }

.hunt-slot-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hunt-slot-thumbnail {
  width: 44px;
  height: 48px;
  display: block;
  flex: 0 0 auto;
  border: 1px solid #32404b;
  border-radius: 7px;
  background: #111d28;
  object-fit: cover;
}

.hunt-slot-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.hunt-slot-copy strong,
.hunt-slot-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hunt-slot-copy strong { color: #eef2f5; font-size: 13px; }
.hunt-slot-copy small { color: #89939c; font-size: 11px; font-weight: 500; }
.hunt-slot-x { color: #8bc9ef !important; font-weight: 800 !important; }

.hunt-unopened-badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 6px;
  background: #20272d;
  color: #8f999f;
  font-size: 9px;
  font-weight: 700;
}

.hunt-not-found {
  min-height: 430px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 42px 24px;
  border-top: 1px solid #2a3742;
  border-bottom: 1px solid #2a3742;
  text-align: center;
}

.hunt-not-found[hidden] { display: none; }
.hunt-not-found > span { color: #67baf0; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.hunt-not-found h1 { margin-block: 10px; font-size: clamp(30px, 5vw, 48px); }
.hunt-not-found p { max-width: 480px; margin: 0; color: #84919d; line-height: 1.6; }
.hunt-not-found a {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 10px 18px;
  border: 1px solid #4e9ed1;
  border-radius: 7px;
  background: #172a39;
  color: #8ed0f8;
  font-size: 11px;
  font-weight: 800;
}

@keyframes huntLivePulse {
  0%, 100% { opacity: .65; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

@media (max-width: 1240px) {
  .hunt-history-table {
    width: 1000px;
    min-width: 1000px;
    table-layout: fixed;
  }

  .hunt-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hunt-stat-grid article { border-bottom: 1px solid #2a3742; }
  .hunt-stat-grid article:nth-child(3n) { border-right: 0; }
  .hunt-stat-grid article:nth-last-child(-n + 3) { border-bottom: 0; }
}

@media (max-width: 820px) {
  .hunt-shell { width: calc(100% - 32px); }

  .hunt-slot-table,
  .hunt-slot-table tbody { display: block; }
  .hunt-slot-table thead { display: none; }
  .hunt-slot-table tbody {
    display: grid;
    gap: 9px;
    padding: 9px;
  }

  .hunt-slot-table tbody tr {
    min-width: 0;
    display: grid;
    grid-template-columns: 40px repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "position slot slot slot"
      "bet bet win x";
    overflow: hidden;
    border: 1px solid #2a3742;
    border-radius: 8px;
    background: #0b151f;
  }

  .hunt-slot-table td {
    width: auto !important;
    height: auto;
    min-width: 0;
    padding: 11px;
    border: 0;
    text-align: left !important;
  }

  .hunt-slot-table td:first-child { grid-area: position; display: grid; place-items: center; padding-inline: 8px 0; }
  .hunt-slot-table td:nth-child(2) { grid-area: slot; }
  .hunt-slot-table td:nth-child(3) { grid-area: bet; }
  .hunt-slot-table td:nth-child(4) { grid-area: win; }
  .hunt-slot-table td:nth-child(5) { grid-area: x; }
  .hunt-slot-table td:nth-child(n + 3) {
    display: grid;
    gap: 6px;
    border-top: 1px solid #26333e;
  }

  .hunt-slot-table td:nth-child(n + 3)::before {
    content: attr(data-label);
    color: #788592;
    font-size: 9px;
    font-weight: 600;
  }
}

@media (max-width: 640px) {
  .hunt-page { padding-top: 18px; }
  .hunt-shell { width: calc(100% - 20px); }

  .hunt-page-header {
    min-height: 86px;
    gap: 15px;
    padding: 0 2px 17px;
  }

  .hunt-page-logo { width: 58px; height: 58px; border-radius: 12px; }
  .hunt-page-header h1 { font-size: 25px; }
  .hunt-page-header p { margin-top: 4px; font-size: 12px; }
  .hunt-list-panel { margin-top: 14px; }
  .hunt-list-toolbar { margin-bottom: 6px; }
  .hunt-table-frame {
    max-height: min(66dvh, 620px);
    border-color: #303c46;
    border-radius: 14px;
    background: #08121b;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .36);
  }
  .hunt-history-table th {
    height: 58px;
    padding: 16px;
    background: #1a242d;
    color: #a0a9b1;
    font-size: 11px;
    letter-spacing: .025em;
  }
  .hunt-history-table td {
    height: 78px;
    padding: 17px 16px;
    border-bottom-color: #313a42;
    background: #09131c;
    color: #f0f3f5;
    font-size: 13px;
  }
  .hunt-history-table tbody tr:hover td { background: #0d1b26; }
  .hunt-history-table tbody tr.is-live-hunt td { background: #0b1c21; }
  .hunt-history-table tbody tr.is-live-hunt:hover td { background: #10252b; }
  .hunt-row-link { font-size: 15px; }

  .hunt-breadcrumbs { min-height: 34px; margin-bottom: 13px; padding-inline: 2px; }
  .hunt-detail-header { padding: 0 2px 20px; }
  .hunt-detail-topline { justify-content: flex-start; margin-bottom: 18px; }
  .hunt-detail-header h1 { font-size: 28px; }
  .hunt-detail-header p { font-size: 12px; }
  .hunt-meta-chip,
  .hunt-live-sync { font-size: 9px; }

  .hunt-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hunt-stat-grid article,
  .hunt-stat-grid article:nth-child(3n) {
    min-height: 82px;
    border-right: 1px solid #2a3742;
    border-bottom: 1px solid #2a3742;
  }
  .hunt-stat-grid article:nth-child(2n) { border-right: 0; }
  .hunt-stat-grid article:nth-last-child(-n + 3) { border-bottom: 1px solid #2a3742; }
  .hunt-stat-grid article:last-child { grid-column: span 2; border-right: 0; border-bottom: 0; }
  .hunt-stat-grid strong { font-size: 15px; }

  .hunt-slots-panel { margin-top: 20px; }
  .hunt-slots-toolbar { align-items: flex-end; }
  .hunt-slot-table tbody { padding: 7px; }
}

@media (max-width: 420px) {
  .hunt-stat-grid article { min-height: 78px; padding: 12px 10px; }
  .hunt-stat-grid span { font-size: 8px; }
  .hunt-stat-grid strong { font-size: 14px; }

  .hunt-slots-toolbar h2 { font-size: 17px; }
  .hunt-progress-chip { font-size: 9px; }
  .hunt-slot-table tbody tr { grid-template-columns: 34px repeat(3, minmax(0, 1fr)); }
  .hunt-slot-table td { padding: 10px 7px; font-size: 11px; }
  .hunt-slot-thumbnail { width: 40px; height: 44px; }
  .hunt-slot-copy strong { font-size: 12px; }
  .hunt-slot-copy small { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .hunt-history-table tbody tr { transition: none; }
  .hunt-live-sync i { animation: none; }
}
