[hidden] { display: none !important; }

.empty-state {
  margin: 0 0 22px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

/* Keep compact SVG logos optically centred: the Bing and Baidu marks have
   more internal whitespace than the Google/GitHub files. */
.engine-chip { overflow: visible; }
.engine-chip img {
  display: block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  object-fit: contain;
}

/* More groups should stay reachable instead of squeezing the header labels. */
@media (max-width: 1180px) {
  .topnav {
    justify-content: flex-start;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav > a { flex: 0 0 auto; }
}

/* Compact three-column information cards, based on the captured reference. */
.insight-section { width: min(1320px, calc(100% - 32px)); margin: 34px auto 28px; }
.insight-heading { display: none; }
.info-grid { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 10px; }
.info-card { flex: 1 1 300px; min-width: 300px; width: calc(33.333% - 7px); height: 440px; margin: 0; padding: 15px 20px 5px; overflow: hidden; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 0 20px -5px rgb(158 158 158 / 20%); }
.info-card-header { display: flex; align-items: center; justify-content: space-between; height: 36px; margin: 0; }
.info-card-header > div { display: flex; align-items: center; min-width: 0; }
.info-card-header h3 { display: inline-block; margin: 0 0 8px; color: #333; font-size: 16px; font-weight: 400; line-height: 1.2; }
.info-card-header > span, .info-card-header > div + span { margin: 0 2rem 0 0; color: #555; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.info-card-logo { width: 17px; height: 17px; margin: 0 5px 8px 0; object-fit: contain; }
.info-list { height: 360px; margin: 0; padding: 5px; overflow: auto; overflow-x: hidden; list-style: none; }
.info-list::-webkit-scrollbar { width: 5px; }
.info-list::-webkit-scrollbar-thumb { border-radius: 4px; background: #82828280; }
.info-list li { display: flex; align-items: flex-start; min-height: 1.8rem; margin: 0; padding: 0; color: #333; font-size: 14px; line-height: 1.8rem; }
.info-rank { display: table; min-width: 1.2rem; height: 1.2rem; margin: .3rem 12px 0 0; padding: 0 3px; border-radius: 4px; background: #dbdbdb; color: #333; font-size: 14px; line-height: 1.2rem; text-align: center; }
.info-rank--1 { background: #fe2d46; color: #fff; }.info-rank--2 { background: #f60; color: #fff; }.info-rank--3 { background: #faa90e; color: #fff; }
.info-year { flex: 0 0 auto; margin-right: 15px; font-weight: 700; white-space: nowrap; }
.info-item-title { min-width: 0; flex: 1; overflow: hidden; color: #333; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
a.info-item-title:hover { color: #f3434e; }
.info-item-meta { flex: 0 0 auto; margin: 0 5px 0 8px; color: #939393; white-space: nowrap; }
.info-tag { display: table; min-width: 1.2rem; height: 1.2rem; margin-top: .3rem; padding: 1px; border-radius: 4px; background: #ff9406; color: #fff; font-size: 12px; line-height: 1.1rem; text-align: center; }
.info-tag:empty { background: transparent; }.info-tag--hot { background: #ff3852; }.info-tag--new { background: #ff9406; }
.info-card-footer { height: 39px; margin-top: 10px; padding: 10px 0 0; border-top: 1px solid #ddd; text-align: right; }
.info-card-meta, .info-loading, .info-error { color: #838383; font-size: 14px; }
.calendar-list { height: 360px; margin: 0; padding: 5px; overflow: auto; overflow-x: hidden; }
.calendar-list > div { display: flex; align-items: flex-start; min-height: 1.8rem; color: #333; font-size: 14px; line-height: 1.8rem; }
.calendar-list dt { flex: 0 0 auto; margin-right: 15px; font-weight: 700; white-space: nowrap; }.calendar-list dd { margin: 0; }.calendar-list dd[data-tone="good"] { color: green; }.calendar-list dd[data-tone="bad"] { color: red; }

/* The template toggles this class on <html>. Keep the data cards and hero in
   the same night palette instead of leaving a bright white island below. */
html.night-mode .hero::after {
  background: linear-gradient(180deg, rgb(3 10 15 / 58%) 0%, rgb(3 10 15 / 28%) 42%, rgb(3 10 15 / 70%) 100%);
}
html.night-mode .hero-art { filter: brightness(.48) saturate(.72) contrast(1.05); }
html.night-mode .info-card {
  border: 1px solid #314451;
  background: #1d2a34;
  box-shadow: 0 0 20px -5px rgb(0 0 0 / 42%);
}
html.night-mode .info-card-header h3,
html.night-mode .info-list li,
html.night-mode .info-item-title,
html.night-mode .calendar-list > div { color: #edf3f6; }
html.night-mode .info-card-header > span,
html.night-mode .info-card-header > div + span,
html.night-mode .info-item-meta,
html.night-mode .info-card-meta,
html.night-mode .info-loading,
html.night-mode .info-error,
html.night-mode .calendar-list dd { color: #aebdc6; }
html.night-mode .info-card-footer { border-top-color: #354956; }
html.night-mode .info-rank { background: #3b4953; color: #e6eef2; }
html.night-mode .info-list::-webkit-scrollbar { background: #17222b; }
html.night-mode .info-list::-webkit-scrollbar-thumb,
html.night-mode .calendar-list::-webkit-scrollbar-thumb { background: #607582; }
html.night-mode a.info-item-title:hover { color: #9dc2ff; }

.qq-category-card { scroll-margin-top: 18px; }
.qq-section-head { display: flex; align-items: center; gap: 14px; margin: 0 0 19px; }
.qq-section-head .nya-title { flex: 1 1 auto; margin: 0; }
.qq-section-head .tool-icon { color: var(--accent); }
.qq-submit-open { flex: 0 0 auto; min-height: 0; padding: 8px 13px; border-color: var(--line); color: var(--accent); font-size: 13px; line-height: 1.2; }
.qq-submit-open:hover, .qq-submit-open:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent-deep); }
.qq-submit-button { border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: 700 14px inherit; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.qq-submit-button:hover { background: var(--accent-deep); transform: translateY(-1px); }
.qq-filter-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 15px 0 0; border-top: 1px solid var(--line); }
.qq-search-field { display: flex; flex: 1 1 228px; align-items: center; gap: 8px; min-width: 0; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); }
.qq-search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent); }
.qq-search-field svg { flex: 0 0 auto; width: 16px; height: 16px; }.qq-search-field input { width: 100%; min-width: 0; height: 38px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.qq-search-field input::placeholder { color: var(--muted); }.qq-category-filters { display: flex; flex: 0 1 auto; flex-wrap: wrap; gap: 6px; }
.qq-filter-button { min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font: 600 12px inherit; cursor: pointer; transition: border-color .16s ease, background .16s ease, color .16s ease; }
.qq-filter-button:hover, .qq-filter-button:focus-visible { border-color: var(--accent); color: var(--accent); }.qq-filter-button.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent-deep); }
.qq-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.qq-group-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 15px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: none; }
.qq-image-button { display: grid; width: 112px; height: 140px; padding: 5px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: zoom-in; }
.qq-image-button img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; }
.qq-image-button span { z-index: 1; grid-area: 1 / 1; align-self: end; padding: 4px; background: rgb(20 39 46 / 68%); color: #fff; font-size: 11px; opacity: 0; transition: opacity .18s ease; }
.qq-image-button:hover span, .qq-image-button:focus-visible span { opacity: 1; }
.qq-group-copy { min-width: 0; }
.qq-category { display: inline-block; padding: 3px 7px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 11%, transparent); color: var(--accent-deep); font-size: 11px; font-weight: 700; }
.qq-group-copy h3 { margin: 7px 0 4px; overflow: hidden; color: var(--ink); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.qq-number { margin: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.qq-description { display: -webkit-box; margin: 7px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.qq-empty { display: flex; min-height: 74px; align-items: center; justify-content: center; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.qq-empty strong { color: var(--ink); font-size: 14px; }.qq-empty span { font-size: 13px; }
.qq-load-more-wrap { display: flex; justify-content: center; }.qq-load-more { min-height: 36px; margin: 18px 0 2px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--accent); font: 600 13px inherit; cursor: pointer; transition: border-color .16s ease, background .16s ease, color .16s ease; }
.qq-load-more:hover, .qq-load-more:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent-deep); }
.qq-filter-empty { display: grid; min-height: 92px; margin: 0; place-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.qq-dialog { width: min(540px, calc(100% - 28px)); max-height: min(780px, calc(100vh - 28px)); padding: 0; overflow: auto; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 22px 68px rgb(15 40 50 / 34%); color: #263841; }
.qq-dialog::backdrop { background: rgb(13 31 40 / 60%); backdrop-filter: blur(2px); }
.qq-dialog form { display: grid; gap: 13px; padding: 28px; }
.qq-dialog h2 { margin: 0; font-size: 21px; }.qq-dialog-intro { margin: -5px 0 4px; color: #74848a; font-size: 13px; line-height: 1.55; }
.qq-dialog label { display: grid; gap: 6px; color: #40555d; font-size: 13px; font-weight: 700; }
.qq-dialog input, .qq-dialog select, .qq-dialog textarea { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #cddbdd; border-radius: 9px; outline: 0; background: #fff; color: #263841; font: 14px inherit; transition: border-color .16s ease, box-shadow .16s ease; }
.qq-dialog textarea { resize: vertical; }.qq-dialog input:focus, .qq-dialog select:focus, .qq-dialog textarea:focus { border-color: #2d8e8a; box-shadow: 0 0 0 3px rgb(45 142 138 / 14%); }
.qq-dialog small { color: #7b8c92; font-size: 11px; font-weight: 500; }.qq-submit-button { padding: 12px; }.qq-dialog-close { position: absolute; top: 9px; right: 11px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #546970; font-size: 24px; line-height: 1; cursor: pointer; }
.qq-dialog-close:hover { background: #edf4f4; }.qq-form-hint, .qq-form-message { min-height: 18px; margin: -5px 0 0; color: #6d7f86; font-size: 12px; }.qq-form-hint.is-duplicate, .qq-form-message.is-error { color: #c4474d; }.qq-form-hint.is-ok, .qq-form-message.is-ok { color: #217a5a; }.qq-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.qq-preview-dialog[open] { display: grid; gap: 15px; justify-items: center; padding: 27px; }.qq-preview-dialog img { width: min(390px, calc(100vw - 84px)); max-height: min(680px, calc(100vh - 130px)); height: auto; object-fit: contain; border: 1px solid #dbe5e7; border-radius: 12px; image-rendering: auto; }
html.night-mode .qq-group-card, html.night-mode .qq-image-button, html.night-mode .qq-dialog { border-color: #344956; background: #21313b; }
html.night-mode .qq-dialog { color: #edf4f5; }
html.night-mode .qq-dialog-intro, html.night-mode .qq-form-hint, html.night-mode .qq-form-message { color: #a8bac1; }
html.night-mode .qq-category { background: #284c4c; color: #96d9d4; }
html.night-mode .qq-dialog input, html.night-mode .qq-dialog select, html.night-mode .qq-dialog textarea { border-color: #405562; background: #16242d; color: #edf4f5; }
html.night-mode .qq-dialog label, html.night-mode .qq-dialog-close { color: #dce8eb; } html.night-mode .qq-dialog-close:hover { background: #2d404b; }

@media (max-width: 768px) { .insight-section { width: calc(100% - 20px); margin-top: 22px; }.info-grid { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 8px; }.info-card { flex: 0 0 calc(100% - 10px); min-width: calc(100% - 10px); height: 430px; }.info-list, .calendar-list { height: 350px; } }
@media (max-width: 760px) { .qq-filter-bar { align-items: stretch; flex-direction: column; }.qq-search-field { flex: 0 0 auto; min-height: 40px; }.qq-category-filters { flex: 1 1 auto; } }
@media (max-width: 620px) { .qq-section-head { align-items: flex-start; flex-direction: column; gap: 12px; }.qq-submit-open { width: 100%; }.qq-group-grid { grid-template-columns: 1fr; }.qq-group-card { grid-template-columns: 96px minmax(0, 1fr); }.qq-image-button { width: 96px; height: 120px; }.qq-empty { flex-direction: column; gap: 3px; }.qq-dialog form { padding: 24px 19px 20px; } }
