#qinglong-home {
  --qinglong-accent: #0a5cda;
  --qinglong-ink: #2e2011;
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: #f5eee3;
  color: var(--qinglong-ink);
}

#qinglong-home [hidden] { display: none !important; }
#qinglong-home.qinglong-switching,
#qinglong-nav-slot,
.qinglong-plugin { overflow-anchor: none; }
#qinglong-nav-slot { width: 100%; }
#qinglong-nav {
  box-sizing: border-box;
  width: 100%;
  padding: 5px 6px;
  background: #fff;
  border-bottom: 1px solid #e3ddeb;
}

#qinglong-nav[data-fixed] {
  position: fixed;
  top: 0;
  z-index: 1002;
  box-shadow: 0 3px 10px #2b21432b;
}

#qinglong-nav .lottery-widget[data-navigation="regions"] {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#qinglong-nav .lottery-widget .lw-lotteries { gap: 5px; border: 0; }

#qinglong-nav .lottery-widget[data-navigation="regions"] > .lw-draw {
  margin-top: 6px;
  padding: 8px 0 5px;
  border: 1px solid #e1e4e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 5px #26334708;
}
#qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button {
  position: relative;
  min-height: 47px;
  padding: 4px 9px;
  gap: 6px;
  border: 1px solid #c7b58e;
  border-radius: 7px;
  background: #f9f3e5;
  box-shadow: inset 0 0 0 1px #fff9eb;
  color: #185448;
  font-size: clamp(16px, 2.5vw, 24px);
  line-height: 1.2;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

#qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button::before,
#qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button::after {
  content: '';
  position: absolute;
  inset: auto;
  top: 50%;
  width: 5px;
  height: 5px;
  translate: 0 -50%;
  border: 1px solid #b89c63;
  border-radius: 50%;
  background: #ddcca7;
  pointer-events: none;
}

#qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button::before { left: 4px; }
#qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button::after { right: 4px; }
#qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button[data-lottery="hk6"] { color: #7b312a; }
#qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button[aria-pressed="true"] {
  color: #fff5d5;
  background: #1d160e;
  box-shadow: inset 0 0 0 1px #e1cda1;
}

#qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button:hover:not([aria-pressed="true"]) {
  background: #f1e7d0;
}

#qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button:focus-visible {
  outline: 2px solid var(--qinglong-accent);
  outline-offset: 1px;
}

#qinglong-nav .lottery-widget .lw-number-list { grid-template-columns: repeat(6, minmax(0, 1fr)) auto minmax(0, 1fr); }
#qinglong-nav .qinglong-draw-plus {
  align-self: start;
  margin: 5px 0 0;
  font-size: clamp(13px, 4vw, 20px);
  font-weight: 700;
  color: #716b78;
}

#qinglong-nav .qinglong-shortcuts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding-top: 4px;
}

#qinglong-nav .qinglong-shortcuts a {
  padding: 3px 1px;
  color: #fff;
  background: var(--qinglong-accent);
  border-radius: 12px;
  font-size: clamp(11px, 3vw, 15px);
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.qinglong-column {
  min-width: 0;
  background: #fff;
  margin: 0 0 6px;
}

.qinglong-column-heading {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 9px;
  margin: 0;
  padding: 8px 5px;
  background: var(--qinglong-accent);
  color: #fff;
  font-size: clamp(15px, 4vw, 21px);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.qinglong-column-heading small {
  font-family: Arial, sans-serif;
  font-size: .9em;
  font-weight: 500;
  white-space: nowrap;
}

.qinglong-column-body { font-size: 16px; line-height: 24px; font-variant-numeric: tabular-nums; }
.qinglong-column-body table { max-width: 100%; }
.qinglong-column-body p, .qinglong-column-body td { max-width: 100%; overflow-wrap: anywhere; }
.qinglong-column-body img { max-width: 100%; height: auto; }
.qinglong-column-body .qinglong-rule-end,
.qinglong-column-body tr.qinglong-rule-end > td { border-bottom: 1px solid #d6cfe5 !important; }
.qinglong-column-body .qinglong-pending {
  margin: 0;
  padding: 8px 5px;
  color: #5c526a;
  text-align: center;
}

.qinglong-plugin { min-width: 0; max-width: 100%; overflow: hidden; }
.qinglong-widget-frame { display: block; width: 100%; height: 250px; border: 0; }
.qinglong-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.qinglong-papers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; }
.qinglong-papers a { display: grid; min-width: 0; overflow: hidden; border: 1px solid #ded7ed; border-radius: 6px; color: #1d160e; text-decoration: none; }
.qinglong-papers a:focus-visible { outline: 2px solid var(--qinglong-accent); }
.qinglong-papers img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: fill; background: #f4f2f8; }
.qinglong-papers span { padding: 3px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(12px, 3.2vw, 16px); }
#qinglong-paper-viewer { max-width: min(90vw, 760px); max-height: 90dvh; margin: auto; padding: 8px; border: 1px solid #d6cfe5; border-radius: 8px; }
#qinglong-paper-viewer::backdrop { background: rgb(25 19 34 / 75%); }
#qinglong-paper-viewer img { display: block; width: auto; height: auto; max-width: 100%; max-height: 76dvh; margin: auto; }
.qinglong-paper-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.qinglong-plan { width: 100%; border-collapse: collapse; table-layout: fixed; }
.qinglong-plan th, .qinglong-plan td { text-align: center; padding: 4px; border: 1px solid #ded7ed; }
.qinglong-plan th { background: #f2eef8; }
.qinglong-plan th:first-child, .qinglong-plan th:last-child { width: 22%; }
.qinglong-edition { padding: 6px 4px; border-bottom: 1px solid #ded7ed; text-align: center; }
.qinglong-plan, .qinglong-edition { font-size: clamp(12px, 3.2vw, 16px); }
.qinglong-selection-line { display: inline-block; color: #9e2719; font-weight: 700; white-space: nowrap; }
.qinglong-selection-line + .qinglong-selection-line { display: block; }
.qinglong-edition {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 2px 6px;
  padding-block: 8px;
  font-size: clamp(14px, 3.8vw, 16px);
  line-height: 24px;
}
.qinglong-edition :is(strong, .qinglong-edition-result) { white-space: nowrap; }
.qinglong-edition .qinglong-selection-line { max-width: 100%; white-space: normal; }
.qinglong-edition .qinglong-selection-line > :is(span, mark) { display: inline-block; white-space: nowrap; }
.qinglong-edition--grouped .qinglong-selection-line { flex-basis: 100%; }
.qinglong-edition .qinglong-number-group {
  display: grid;
  grid-template-columns: max-content minmax(0, max-content);
  justify-content: center;
  align-items: baseline;
  column-gap: .45em;
  text-align: start;
}
.qinglong-edition .qinglong-number-group > .qinglong-number-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0 .85em;
  min-width: 0;
}
.qinglong-number-chunk {
  display: flex;
  gap: .85em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 374px) {
  #qinglong-column-10 :is(.qinglong-number-values, .qinglong-number-chunk) { column-gap: .38em; }
  #qinglong-column-10 .qinglong-number-values { flex-wrap: nowrap; }
}
.qinglong-column-body mark { background: #fff05e; color: inherit; }

.qinglong-kill-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; font-size: clamp(13px, 3.4vw, 16px); }
.qinglong-kill-table :is(th, td) { padding: 7px 2px; border: 1px solid #dfd3bf; white-space: nowrap; }
.qinglong-kill-table thead th { color: #251f17; }
.qinglong-kill-table thead th:nth-child(1) { width: 16%; background: #d7ecc1; }
.qinglong-kill-table thead th:nth-child(2) { width: 28%; background: #abd0ed; }
.qinglong-kill-table thead th:nth-child(3) { width: 18%; background: #fbcfcb; }
.qinglong-kill-table thead th:nth-child(4) { width: 16%; background: #e4d9ef; }
.qinglong-kill-table thead th:nth-child(5) { background: #ffe88c; }
.qinglong-kill-table tbody th { font-weight: 400; }

.qinglong-eight-image { display: block; width: 100%; }
.qinglong-eight-section { padding: 8px; border-top: 1px solid #e5dded; }
.qinglong-eight-section h3 { margin: 0 0 4px; font-size: 1em; }
.qinglong-eight-section p { margin: 4px 0 0; }
.qinglong-eight-poem span { display: block; }
.qinglong-eight-summary { margin: 0; }
.qinglong-eight-summary > div { display: flex; align-items: baseline; gap: 4px; padding: 6px 8px; border-top: 1px solid #e5dded; }
.qinglong-eight-summary dt { flex: 0 0 auto; font-weight: 700; }
.qinglong-eight-summary dd { margin: 0; }
.qinglong-eight-numbers { font-size: clamp(11px, 2.8vw, 16px); font-variant-numeric: tabular-nums; }
.qinglong-eight-numbers > span { display: inline-block; white-space: nowrap; }
.qinglong-eight-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px 0; }
.qinglong-eight-nav button { min-height: 42px; border: 1px solid #d6cfe5; border-radius: 5px; background: #f5eee3; color: #1d160e; font: inherit; cursor: pointer; }
.qinglong-eight-nav button:disabled { color: #777; background: #f5f4f7; cursor: default; }


#qinglong-home { max-width: 100%; }
#qinglong-nav .lottery-widget .lw-draw-body { padding-inline: clamp(5px, 1vw, 10px); }
#qinglong-nav .lottery-widget .lw-lottery-button[aria-pressed="true"] {
  border-color: #bca064;
  color: #f9e1a5;
  box-shadow: inset 0 0 0 1px #ad9157;
}
.qinglong-column-heading { background: #f3e4c9; color: #352412; }
.qinglong-column-body { min-width: 0; }
.qinglong-column-body table { width: 100%; }
.qinglong-column-body :is(p,td,span) { overflow-wrap: anywhere; }
.qinglong-source-paper img { display: block; width: 100%; height: auto; }
.qinglong-column-body mark { background-color: #fff05e; }
@media (max-width: 540px) {
  #qinglong-nav { padding-inline: 4px; }
  #qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button {
    min-height: 38px;
    gap: 3px;
    padding: 3px 4px;
    font-size: clamp(13px, 4.1vw, 18px);
  }
  #qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-badge { width: 19px; height: 19px; }
  #qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button::before,
  #qinglong-nav .lottery-widget[data-navigation="regions"] .lw-lottery-button::after { display: none; }
  #qinglong-nav .qinglong-shortcuts a { font-size: clamp(10px, 2.9vw, 15px); }
}

.qinglong-number-edition { text-align: center; padding-block: 6px; font-variant-numeric: tabular-nums; }
.qinglong-number-line { display: flex; justify-content: center; gap: clamp(2px, 1.25vw, 12px); color: #981c14; }
.qinglong-number-line > span { white-space: nowrap; }
.qinglong-twelve { font-size: clamp(13px, 3.55vw, 18px); }
.qinglong-twelve > span { min-width: 2ch; }
.qinglong-column-body .qinglong-comparison { border-bottom: 0 !important; }
.qinglong-rules { border-bottom: 1px solid #dbccae; }
.qinglong-plan th { background: #f9f0dd; }
.qinglong-plan :is(th,td) { border-color: #deca9d; }
.qinglong-plan:first-child { margin-top: 0; }
.qinglong-plan .qinglong-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 9px; color: #981c14; font-weight: 700; }

.qinglong-expert-board { list-style: none; padding: 0; margin: 0; }
.qinglong-expert-board li { margin: 0; border-bottom: 1px solid #e5dded; }
.qinglong-expert-board li:nth-child(even) { background: #faf7f0; }
.qinglong-expert-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) 53px minmax(56px, 23%);
  align-items: center;
  gap: 5px;
  min-height: 39px;
  padding: 4px 8px;
  color: var(--qinglong-ink);
  font-size: clamp(12px, 3.3vw, 16px);
  text-decoration: none;
  white-space: nowrap;
}
a.qinglong-expert-row:hover { background: #efeaf7; }
.qinglong-expert-issue { color: #685e77; font-variant-numeric: tabular-nums; }
.qinglong-expert-title, .qinglong-expert-author { overflow: hidden; text-overflow: ellipsis; }
.qinglong-expert-author { text-align: right; }
.qinglong-expert-title { color: #473319; }
.qinglong-expert-status { color: #2b6240; font-size: 11px; }
.qinglong-expert-status:not(:empty)::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-inline-end: 4px; border-radius: 50%; background: #31965a; vertical-align: 2px; }
.qinglong-expert-page { margin: 0; background: #f5eee3; }
.qinglong-expert-banner { display: block; width: 100%; height: auto; }
.qinglong-expert-page .qinglong-column { padding: 8px clamp(5px, 1.8vw, 12px) 18px; background: inherit; }
.qinglong-expert-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 10px;
  border: 1px solid #ddd3eb;
  border-radius: 5px;
  background: #faf7ff;
  color: #473319;
  font-size: 14px;
}
.qinglong-expert-return { padding-block: 8px; color: inherit; font-weight: 700; text-decoration: none; }
.qinglong-expert-return:hover { text-decoration: underline; }
.qinglong-expert-card { overflow: hidden; border: 1px solid #ddd3eb; border-radius: 5px; background: #fff; }
.qinglong-expert-heading {
  margin: 0;
  padding: 11px 4px;
  background: #eae2f6;
  color: #473319;
  font-size: clamp(14px, 4vw, 21px);
  line-height: 1.35;
  text-align: center;
}
.qinglong-expert-edition {
  padding: 10px 6px;
  border-top: 1px solid #e5dded;
  font-size: clamp(14px, 3.7vw, 17px);
  text-align: center;
}
.qinglong-expert-edition-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 5px; }
.qinglong-expert-edition-line > strong, .qinglong-expert-outcome, .qinglong-expert-picks > * { white-space: nowrap; }
.qinglong-expert-outcome b, .qinglong-expert-results b, .qinglong-expert-picks, .qinglong-expert-options { color: #75284b; }
.qinglong-expert-picks, .qinglong-expert-options { font-weight: 700; }
.qinglong-expert-options { display: grid; gap: 5px; justify-content: center; margin-top: 6px; }
.qinglong-expert-option-row { display: flex; justify-content: center; gap: 8px; align-items: start; }
.qinglong-expert-option-labelled { justify-content: start; text-align: left; }
.qinglong-expert-group { min-width: 2.5em; color: #473319; white-space: nowrap; }
.qinglong-expert-group[data-wave="红波"] { color: #a63438; }
.qinglong-expert-group[data-wave="蓝波"] { color: #245795; }
.qinglong-expert-group[data-wave="绿波"] { color: #22623e; }
.qinglong-expert-option-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 7px; }
.qinglong-expert-option-line > * { white-space: nowrap; }
.qinglong-expert-codes {
  display: grid;
  grid-template-columns: repeat(var(--code-columns), 2ch);
  column-gap: clamp(4px, 1.4vw, 9px);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.qinglong-expert-archive h2 {
  margin: 0;
  padding: 7px 6px;
  border-top: 1px solid #ddd3eb;
  background: #f0e9f8;
  color: #473319;
  font-size: 14px;
  text-align: center;
}
.qinglong-expert-rules { padding: 9px 8px; border-top: 1px solid #ddd3eb; background: #faf7ff; color: #514167; font-size: 14px; text-align: center; }
.qinglong-expert-rules p { margin: 0; }
.qinglong-expert-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; width: fit-content; margin: 0 auto 4px; }
.qinglong-expert-legend dt { display: inline; font-weight: 700; }
.qinglong-expert-legend dd { display: inline; margin: 0; }
.qinglong-expert-results { width: min(100%, 360px); margin: 7px auto 0; border-collapse: collapse; }
.qinglong-expert-results :is(th, td) { padding: 3px 6px; border: 1px solid #e5dded; }
.qinglong-expert-results th { background: #faf7ff; }

@media (max-width: 480px) {
  .qinglong-expert-codes { grid-template-columns: repeat(var(--code-columns-small), 2ch); }
}

@media (max-width: 360px) {
  .qinglong-expert-edition-line:has(.qinglong-expert-picks) { column-gap: 3px; font-size: 13px; }
}


.qinglong-brothers-edition { padding: 7px; border-block-end: 1px solid #deca9d; }
.qinglong-brothers-edition > strong { display: block; text-align: center; }
.qinglong-brothers-edition > p { margin: 0 0 3px; }
.qinglong-one-number, .qinglong-draw-line { background: #fbefd6; color: #4a3319; }
.qinglong-draw-line { margin-top: 4px; padding: 4px; text-align: center; font-size: clamp(12px, 3.6vw, 16px); }

.qinglong-kill-edition { padding: 5px 6px; text-align: center; border-bottom: 1px solid #eddbc0; }
.qinglong-kill-edition dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 4px 0 0; }
.qinglong-kill-edition dl > div { border: 1px solid #e9d6b0; }
.qinglong-kill-edition dt { background: #fbefd6; font-weight: 700; }
.qinglong-kill-edition dd { margin: 0; color: #981c14; }
@media (max-width: 360px) {
  .qinglong-kill-edition :is(dt, dd) { font-size: 13px; }
}

.qinglong-kill-edition dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qinglong-kill-edition dd small { margin-inline-start: .35em; font-size: .8em; }
@media (min-width: 640px) { .qinglong-kill-edition[data-qinglong-kill-period] dl { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); } }
