.query-page {
  --ink: var(--yy-ink,#162640);
  --muted: var(--yy-muted,#53647d);
  --blue: var(--yy-blue,#2759ab);
  --rim: var(--yy-line,#cbd8eb);
  --panel: var(--yy-paper,#fafcff);
  --shadow: 0 12px 36px -22px #46569955, 0 1px 2px #4f679716, inset 0 1px #fff;
  max-width: 1256px; margin: 0 auto;
  padding: 32px clamp(16px,3.8vw,48px) 80px; color: var(--ink); line-height: 1.5;
}
.query-page *, .query-page *::before, .query-page *::after { box-sizing: border-box; }
.query-page h1, .query-page h2, .query-page h3, .query-page p { margin: 0; }
.query-page button, .query-page select, .query-page input { font: inherit; }
.query-page button { cursor: pointer; }
.query-page button:disabled { cursor: default; }
.query-page :focus-visible { outline: 3px solid #346bca; outline-offset: 3px; }
.query-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 22px; }
.query-heading h1 { font-size: clamp(2.1rem,4vw,3.25rem); letter-spacing: -.055em; line-height: 1.16; }
.query-heading p { margin-top: 8px; color: var(--muted); }
.query-update { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 50%; }
.query-update span, .detail-source, .meta, .sub, .config-note { color: var(--muted); line-height: 1.55; font-size: .875rem; }
.query-update button { border: 1px solid #bdcbe0; background: #f3f7ff; box-shadow: inset 0 1px 1px #fff, 0 3px 8px #415e8620; color: #2d527f; border-radius: 40px; padding: 7px 15px; min-height: 36px; font-size: .9rem; font-weight: 650; }
.query-update button:hover { background: #fff; }
#modes { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; width: max-content; max-width: 100%; padding: 4px; margin-bottom: 18px; border-radius: 24px; border: 1px solid #b9c6da; background: #e6eef8; box-shadow: inset 0 1px 1px #fff, 0 3px 10px #47638e13; }
#modes button { padding: 8px 16px; min-height: 39px; border: 1px solid transparent; background: transparent; color: #465c7b; border-radius: 40px; font-size: .94rem; font-weight: 620; }
#modes button:hover { background: #f2f6ff; }
#modes button[aria-pressed=true] { color: #244c92; background: linear-gradient(160deg,#fff,#f3f6ff); border-color: #bdcce196; box-shadow: inset 0 1px #fff, 0 2px 6px #3f649532; }
.query-layout { display: grid; grid-template-columns: minmax(255px,.48fr) minmax(0,1fr); align-items: start; gap: 18px; }
.results, .details { min-width: 0; background: var(--panel); border-radius: 24px; border: 1px solid var(--rim); box-shadow: var(--shadow); }
.results { overflow: hidden; }
.panel-title { display: flex; align-items: center; justify-content: space-between; padding: 17px 17px 7px; }
.panel-title h2 { font-size: 1.08rem; letter-spacing: -.03em; }
#result-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .83rem; }
.filters { display: flex; align-items: center; gap: 6px; padding: 5px 14px 12px; border-bottom: 1px solid #d9e3ef; }
.filters label { min-width: 0; display: block; }
.filters label > span { position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; }
.filters .search { flex: 1; position: relative; }
.search::before, .search::after { content: ""; position: absolute; pointer-events: none; z-index: 1; }
.search::before { left: 11px; top: 13px; width: 11px; height: 11px; border: 1.8px solid #667d9a; border-radius: 50%; }
.search::after { left: 20px; top: 23px; height: 1.8px; width: 5px; background: #667d9a; border-radius: 2px; transform-origin: left center; transform: rotate(45deg); }
.filters input, .filters select, .detail-section details input { width: 100%; height: 40px; border: 1px solid #c1cee0; border-radius: 11px; padding: 5px 9px; background-color: #f8faff; color: var(--ink); }
.filters input { padding-left: 31px; }
.filters input::placeholder { font-size: .875rem; color: #536781; }
.filters select { appearance: none; padding-right: 23px; font-size: .88rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%23536a8d' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; }
.filters [hidden] { display: none; }
#results { padding: 5px 6px; }
.list-row { display: flex; width: 100%; align-items: center; gap: 8px; text-align: left; border: 1px solid transparent; border-bottom-color: #e7edf4; border-radius: 0; background: transparent; color: var(--ink); min-height: 46px; padding: 5px 9px; }
.list-row:hover { background: #f0f5fc; border-radius: 10px; }
.list-row[aria-pressed=true] { background: linear-gradient(105deg,#e1edfe,#eef2ff); border: 1px solid #b8cdee; border-radius: 11px; }
.list-row .rank { min-width: 25px; font-size: .79rem; color: #536b8b; font-weight: 650; font-variant-numeric: tabular-nums; }
.list-art { display: block; width: 35px; height: 32px; object-fit: contain; flex: none; }
.list-row strong { font-size: .92rem; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.list-row .suffix { margin-left: auto; font-size: .79rem; color: #53657e; text-align: right; }
.ranking-list .list-row { min-height: 34px; gap: 7px; padding-block: 2px; }
.ranking-list .list-art { width: 29px; height: 27px; }
.ranking-list .rank { min-width: 23px; }
.empty { padding: 20px; color: var(--muted); }
#pages { display: flex; justify-content: center; align-items: center; gap: 11px; padding: 10px 8px 13px; font-size: .86rem; color: var(--muted); }
#pages:empty { display: none; }
#pages button, .rel button, .config-tabs button { border: 1px solid #cad7e9; color: #365882; background: #f4f7fc; border-radius: 20px; padding: 6px 11px; font-size: .89rem; }
#pages button:disabled { opacity: .5; }
#pages button:enabled:hover, .rel button:hover, .config-tabs button:hover { background: #e9f1ff; }
.details { overflow: hidden; }
.detail-head { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 144px; padding: 22px clamp(16px,2.4vw,32px);
  background: radial-gradient(ellipse at 6% 0%,#d9d5f9 0%,transparent 60%), radial-gradient(ellipse at 98% 0%,#f2ddc0 0%,transparent 55%), linear-gradient(125deg,#e4edfa,#eef4fc 62%,#dcdee9);
  border-bottom: 1px solid #cfd9e6; }
.detail-head:has(.art-stage) { min-height: 172px; }
.detail-head::after { position: absolute; content: ""; z-index: -1; width: 235px; height: 235px; top: -143px; right: -88px; border: 1px solid #ffffff86; border-radius: 50%; box-shadow: 0 0 0 26px #ffffff23, 0 0 0 27px #ffffff60, 0 0 0 64px #ffffff17; }
.identity { position: relative; z-index: 1; min-width: 0; }
.identity h2 { margin: 4px 0; font-size: clamp(1.75rem,3vw,2.55rem); line-height: 1.18; letter-spacing: -.047em; overflow-wrap: anywhere; }
.identity .sub { color: #475976; }
.identity > .sub:first-child { font-weight: 650; }
.art-stage { position: relative; isolation: isolate; align-self: stretch; flex: 0 0 36%; min-height: 106px; }
.art, .art-watermark { position: absolute; width: 92%; height: 128%; right: 0; top: -14%; object-fit: contain; pointer-events: none; }
.art { filter: drop-shadow(0 5px 5px #4b477731); }
.art-watermark { z-index: -1; right: 32%; transform: scale(1.43); opacity: .10; filter: grayscale(.65); }
.type-badges, .rel, .config-tabs, .numbers { display: flex; flex-wrap: wrap; gap: 6px; }
.type-badges { margin-top: 9px; }
.type-badges:empty { display: none; }
.type-badges span, .metric { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e8ecf8; border-radius: 50px; padding: 3px 8px; background: #ffffffe6; color: #384c69; font-size: .82rem; font-weight: 640; }
.type-badges img { width: 17px; height: 17px; margin-left: -3px; }
.detail-section { padding: 18px clamp(16px,2.4vw,32px) 20px; border-bottom: 1px solid #dfe7f0; }
.detail-section:last-child { border: 0; }
.detail-section h3 { margin-bottom: 13px; font-size: 1.06rem; letter-spacing: -.025em; }
.detail-section p, .text-effect { white-space: pre-line; line-height: 1.72; overflow-wrap: anywhere; }
.detail-section summary { width: fit-content; cursor: pointer; color: #30588e; font-size: .94rem; }
.detail-section details .rel, .detail-section details input { margin-top: 10px; }
.config-tabs { margin-bottom: 12px; gap: 5px; }
.config-tabs button[aria-pressed=true] { background: #2b579e; color: #fff; border-color: #244d90; }
.usage-row { display: grid; grid-template-columns: 23px minmax(0,1fr) minmax(32px,36%) 62px; gap: 7px; align-items: center; padding: 7px 0; font-size: .94rem; border-bottom: 1px solid #dce5ef; }
.usage-row .small-rank { font-size: .83rem; color: #637793; font-variant-numeric: tabular-nums; }
.usage-row .bar { height: 6px; border-radius: 20px; background: #e4ebf6; overflow: hidden; }
.usage-row .bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#4178bd,#6d99cc); }
.usage-row .value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.usage-row .unmeasured { grid-column: 2/-1; }
.entry-button { justify-self: start; padding: 3px 0; border: 0; background: transparent; color: #2e5791; text-align: left; text-underline-offset: 3px; text-decoration: underline #bdcfe7; }
.entry-button:hover { color: #143e83; }
.stat { flex: 1 1 54px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 7px; border-radius: 11px; background: #edf3fa; border: 1px solid #dfe7f1; color: #495e7a; font-size: .84rem; }
.stat strong { font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.detail-source a { color: #2c5692; text-underline-offset: 3px; }
.detail-source, .detail-section .meta { margin-top: 10px; }
.speed-table { border-collapse: collapse; width: 100%; margin: 11px 0 5px; font-size: .91rem; text-align: center; font-variant-numeric: tabular-nums; }
.speed-table th, .speed-table td { padding: 7px 3px; border-bottom: 1px solid #d9e2ef; }
.speed-table th { background: #edf3f9; color: #3a5173; }
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  #modes, .query-update button { background-color: #ebf0f9b8; backdrop-filter: blur(18px) saturate(145%); -webkit-backdrop-filter: blur(18px) saturate(145%); }
}
@media (max-width: 740px) {
  .query-page { padding-top: 21px; }
  .query-heading { flex-direction: column; align-items: flex-start; gap: 11px; margin-bottom: 15px; }
  .query-update { max-width: 100%; flex-direction: row; align-items: center; gap: 9px; }
  .query-update button { flex: none; }
  .query-update span { font-size: .82rem; }
  #modes { width: 100%; gap: 3px; border-radius: 19px; margin-bottom: 13px; }
  #modes button { font-size: .89rem; padding: 6px 13px; }
  .query-layout { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .results, .details { border-radius: 19px; }
  .panel-title { padding: 11px 14px 3px; }
  .filters { padding: 5px 11px 8px; }
  .filters select { font-size: 1rem; }
  #results { max-height: 140px; overflow-y: auto; overscroll-behavior-y: contain; }
  .list-row { min-height: 42px; }
  .ranking-list .list-row { min-height: 36px; }
  #pages { padding: 5px 7px 7px; }
  .detail-head { min-height: 112px; padding-block: 14px; }
  .detail-head:has(.art-stage) { min-height: 145px; }
  .usage-row { grid-template-columns: 19px minmax(0,1fr) minmax(22px,23%) 54px; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (forced-colors: active) {
  #modes, .query-update button { background: #eaf0f9; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .results, .details { background: #fff; border-color: #a5b8d2; }
  .detail-head { background: #eaf0f8; }
  .detail-head::after, .art-watermark { display: none; }
}
