.cq-shell {
    --cq-green: #165849;
    --cq-pale: #eaf6ec;
    max-width: 1180px;
    padding-block: 18px 62px;
    color: #202f35;
}
.cq-shell [hidden] { display: none !important; }
.cq-shell a:focus-visible, .cq-shell button:focus-visible, .cq-shell summary:focus-visible {
    outline: 3px solid #235fba;
    outline-offset: 3px;
}
.cq-crumbs, .cq-tabs, .cq-toolbar, .cq-station-nav, .cq-filters, .cq-game-head, .cq-run-link {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
}
.cq-crumbs { color: #536260; font-size: .92rem; margin: 0 0 26px; }
.cq-crumbs a, .cq-link, .cq-run-link a { color: var(--cq-green); font-weight: 700; }
.cq-my { margin-left: auto; }
.cq-shell h1, .cq-shell h2, .cq-shell h3 { color: #19392e; line-height: 1.13; text-wrap: balance; }
.cq-shell h1 { font-size: clamp(2.3rem, 5.6vw, 4.6rem); letter-spacing: -.055em; margin: 0 0 14px; }
.cq-shell h2 { font-size: clamp(1.4rem, 2.1vw, 2rem); margin: 0 0 15px; letter-spacing: -.035em; }
.cq-shell p, .cq-shell li { line-height: 1.55; }
.cq-shell[data-cq-screen="library"] { padding-top: clamp(20px, 3vw, 40px); }
.cq-library-head {
    position: relative; isolation: isolate; overflow: clip;
    display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
    align-items: center; gap: clamp(20px, 3vw, 42px);
    padding: clamp(27px, 3.7vw, 52px); border-radius: 26px;
    background: radial-gradient(ellipse at top right, #385f60, transparent 65%), #173e3d;
}
.cq-library-head::before, .cq-library-head::after {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    width: 88%; height: 83%; border: 1px solid #b2cfb63b; border-radius: 50%;
    transform: rotate(-27deg);
}
.cq-library-head::before { right: -14%; top: -25%; box-shadow: 0 0 0 18px #173e3d, 0 0 0 19px #b2cfb623; }
.cq-library-head::after { left: -53%; bottom: -70%; box-shadow: 0 0 0 16px #173e3d, 0 0 0 17px #b2cfb623; }
.cq-brand { display: flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 750; color: #26624e; margin: 0 0 18px; }
.cq-hero-copy .cq-brand { color: #ffe3ac; gap: 10px; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; }
.cq-hero-copy h1 { font-size: clamp(3.5rem, 6.3vw, 5.6rem); line-height: .98; color: #fffaf0; }
.cq-hero-copy h1 em { display: block; margin-top: .1em; color: #ffd99c; font: italic .77em/1.04 Georgia, serif; letter-spacing: -.045em; }
.cq-hero-copy > p:not(.cq-brand) { max-width: 36ch; margin: 21px 0 0; color: #e1ede4; font-size: 1.04rem; }
.cq-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 25px; }
.cq-library-head .button--primary { color: #203633; background: #ffda94; border-color: #ffda94; box-shadow: none; }
.cq-library-head .button--ghost { color: #fff9eb; background: #173e3d; border-color: #83a199; }
.cq-library-head a:focus-visible { outline-color: #ffdc98; outline-offset: 4px; }
.cq-feature {
    position: relative; min-width: 0; padding: 5px; border-radius: 9px;
    background: #fff8e8; color: #203d38; text-decoration: none;
    transform: rotate(1deg); box-shadow: 0 14px 32px #041b204a;
}
.cq-scene { position: relative; z-index: 1; pointer-events: none; container-type: inline-size; }
.cq-scene img { display: block; width: 100%; height: auto; border-radius: 5px 5px 0 0; }
/* The projection stays inside the painted screen as the illustration scales. */
.cq-scene-screen {
    position: absolute; inset: 7% 26% 61.5% 24.5%; display: flex; flex-direction: column;
    justify-content: center; text-align: left; color: #fff9e7; line-height: 1.15;
}
.cq-screen-round { display: flex; align-items: center; gap: .6em; color: #a6ebd9; font: 700 2.1cqw/1.2 Consolas, monospace; text-transform: uppercase; letter-spacing: .09em; }
.cq-screen-round::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: currentColor; }
.cq-screen-classic > strong, .cq-scene-screen h2 { display: block; margin: .22em 0 .35em; color: #fff9e7; font-size: 3.8cqw; line-height: 1.05; letter-spacing: -.035em; }
.cq-screen-classic progress { display: block; width: 100%; height: 1.45cqw; border: 0; border-radius: 1em; overflow: hidden; accent-color: #91e8cc; }
.cq-screen-classic progress::-webkit-progress-bar { background: #454e78; }
.cq-screen-classic progress::-webkit-progress-value { background: #91e8cc; transition: width .65s; }
.cq-screen-score { display: flex; align-items: baseline; justify-content: space-between; gap: .5em; margin-top: .6em; color: #e0e8fc; font-size: 2.1cqw; }
.cq-screen-score b { white-space: nowrap; color: #fff9e7; font-size: 2.7cqw; font-variant-numeric: tabular-nums; }
.cq-scene-screen [data-lanes] { gap: .45cqw; }
.cq-scene-screen .cq-lane { grid-template-columns: 1.3em 5em 1fr 2em; gap: .28em; font-size: 2.65cqw; line-height: 1.1; }
.cq-scene-screen .cq-track { margin: 0; height: .57em; }
.cq-scene-screen .cq-track span::after { width: .82em; height: .82em; right: -.4em; top: -.13em; border-width: 1px; }
.cq-scene-screen[data-mode="rally"] .cq-track { border-right: .24em dotted #fff; }
.cq-scene-screen .cq-stamps { height: auto; gap: .24em; flex-wrap: nowrap; }
.cq-scene-screen .cq-stamps i { width: 1.22em; height: 1.12em; border-radius: .2em; }
.cq-scene-controls { position: absolute; bottom: 9px; right: 9px; display: flex; gap: 2px; padding: 2px; pointer-events: auto; background: #122e34ed; border-radius: 24px; }
.cq-scene-controls .icon-button { width: 40px; height: 40px; border-radius: 50%; color: white; font: 700 16px/1 Arial, sans-serif; }
.cq-scene-controls .icon-button:hover { background: #416459; }
.cq-scene-controls .icon-button:focus-visible { outline-color: #ffdc98; outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) {
    .cq-screen-classic progress::-webkit-progress-value { transition: none; }
}
@container (max-width: 440px) {
    .cq-screen-round, .cq-screen-score { font-size: 3cqw; }
    .cq-screen-score b { font-size: 3.4cqw; }
    .cq-scene-screen .cq-lane { font-size: 2.95cqw; }
}
.cq-feature-caption { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 10px 14px 8px; color: inherit; text-decoration: none; }
.cq-feature-caption::after { content: ""; position: absolute; inset: 0; border-radius: 9px; }
.cq-feature-caption > svg { box-sizing: content-box; padding: 7px; border: 1px solid #c4cabb; border-radius: 50%; }
.cq-feature-caption small, .cq-feature-caption strong { display: block; }
.cq-feature-caption small { color: #4c6558; font-size: .76rem; font-weight: 650; }
.cq-feature-caption strong { font-size: 1.16rem; }
.cq-feature-caption:hover strong, .cq-card:hover h3 a { text-decoration: underline; text-underline-offset: .15em; }
.cq-library-compact, .cq-catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 22px; flex-wrap: wrap; }
.cq-library-compact .cq-brand { margin-bottom: 5px; }
.cq-library-compact h1 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.2rem); }
.cq-catalog { margin-top: clamp(28px, 4vw, 48px); }
.cq-catalog-head h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: clamp(1.65rem, 2.8vw, 2.4rem); }
.cq-catalog-head h2 span { padding: 4px 9px; border-radius: 20px; color: #2e5b4b; background: #e5efe6; font-size: .95rem; letter-spacing: normal; }
.cq-tabs { gap: 2px; padding: 3px; border: 1px solid #d9e3d9; border-radius: 12px; background: #f1f5f0; }
.cq-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border-radius: 9px; color: #49594f; text-decoration: none; font-size: .93rem; font-weight: 650; }
.cq-tabs a[aria-current] { background: #fff; color: var(--cq-green); box-shadow: 0 1px 4px #132b222b; }
.cq-filters { align-items: flex-end; gap: 14px; padding: 16px 0 22px; }
.cq-filters .field { flex: 1 1 180px; max-width: 330px; }
.cq-filters .button--soft { background: #e9f2e8; color: #1b513d; }
.cq-reset { align-self: flex-end; padding: 12px 0; color: var(--cq-green); text-decoration: underline; }
.cq-topic-entry { display: inline-flex; align-items: center; gap: 7px; padding-block: 12px; color: var(--cq-green); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.cq-library-groups { display: flex; flex-wrap: wrap; gap: 5px 8px; margin: 0 0 20px; }
.cq-library-groups a { padding: 8px 14px; border: 1px solid #ceddd1; border-radius: 20px; color: #2c5743; text-decoration: none; font-size: .91rem; }
.cq-library-groups a[aria-current] { color: #fff; background: #245b47; border-color: #245b47; }
.cq-library-groups a:hover { text-decoration: underline; }
.cq-card-date { margin: -3px 0 8px; color: #52645a; font-size: .84rem; }
.cq-anniversary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; padding: 15px 20px; margin-bottom: 20px; background: #f1f6ee; border-radius: 14px; color: #254e3c; }
.cq-anniversary div { flex: 1 1 280px; }
.cq-anniversary time, .cq-anniversary strong { display: block; }
.cq-anniversary time { font-size: .85rem; }
.cq-anniversary a { max-width: 48ch; color: #245b47; text-decoration: underline; text-underline-offset: 3px; }
.cq-anniversary-sources { max-width: 48ch; }
.cq-anniversary-sources summary { cursor: pointer; margin-top: 5px; font-size: .9rem; }
.cq-anniversary-sources ul { margin: 6px 0 0; padding-left: 20px; }
.cq-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cq-card, .cq-panel, .cq-run-link {
    border: 1px solid #d9e2d8; border-radius: 20px; background: #fff;
}
.cq-card { position: relative; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 3px 12px #203a2a08; }
.cq-card:focus-within { outline: 3px solid #235fba; outline-offset: 3px; }
.cq-card-image { display: block; width: 100%; height: auto; aspect-ratio: 1.95; object-fit: cover; background: var(--cq-pale); }
.cq-card-body { padding: clamp(17px, 2vw, 25px); display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.cq-card-topic { margin: 0 0 6px; color: #3a6550; font-weight: 700; font-size: .83rem; }
.cq-card-body h3 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -.03em; }
.cq-card-body h3 a { color: inherit; text-decoration: none; }
.cq-card-body h3 a::after { position: absolute; content: ''; inset: 0; border-radius: 20px; }
.cq-card-body h3 a:focus-visible { outline: none; }
.cq-card-goal { margin: 10px 0 18px; color: #4e5c55; font-size: .96rem; }
.cq-card-foot { width: 100%; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-top: 1px solid #e0e8df; padding-top: 12px; margin-top: auto; color: #405c4e; font-size: .85rem; font-weight: 650; }
.cq-card-foot span { display: inline-flex; align-items: center; gap: 5px; }
.cq-card-price { margin-left: auto; color: #235843; background: #edf4e7; border-radius: 20px; padding: 3px 9px; }
.cq-empty { grid-column: 1/-1; padding: 22px; background: #f2f6f1; border-radius: 16px; }
.cq-empty a { color: var(--cq-green); text-decoration: underline; }
.cq-meta { font-size: .91rem; font-weight: 750; color: #416953; margin: 0 0 10px; }
.cq-kit-head {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
    padding: 10px; margin-bottom: 22px; border-radius: 26px;
    background: radial-gradient(ellipse at top left, #316752, transparent 60%), #153e34; color: #fff9e9;
}
.cq-kit-copy { align-self: center; padding: clamp(18px, 3vw, 40px); }
.cq-kit-topic { display: block; margin-bottom: 13px; color: #ffdf88; font-size: .89rem; font-weight: 750; }
.cq-kit-head h1 { color: #fffbf1; line-height: 1.02; font-size: clamp(2.3rem, 4.4vw, 4.1rem); overflow-wrap: break-word; }
.cq-kit-copy p { margin: 0; color: #e2eee4; max-width: 45ch; font-size: 1.04rem; }
.cq-kit-facts { display: flex; flex-wrap: wrap; gap: 7px 16px; margin: 18px 0 22px; color: #e3efde; font-size: .88rem; }
.cq-kit-facts span { display: inline-flex; align-items: center; gap: 6px; }
.cq-kit-head .button { gap: 10px; box-shadow: none; }
.cq-kit-actions, .cq-kit-actions > span { display: flex; align-items: center; gap: 8px; }
.cq-kit-actions { flex-wrap: wrap; gap: 12px 18px; }
.cq-kit-actions > span { color: #ffe2a0; font-size: .94rem; font-weight: 700; }
.cq-kit-gallery { position: relative; isolation: isolate; min-height: 320px; overflow: hidden; border-radius: 18px; background: #234438; }
.cq-kit-gallery figure { position: absolute; inset: 0; margin: 0; display: grid; align-items: end; }
.cq-kit-gallery figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cq-kit-gallery figcaption {
    position: relative; padding: 55px 112px 18px 20px;
    background: linear-gradient(transparent, #11271bd9 65%, #11271bf2); color: white;
}
.cq-kit-gallery small, .cq-kit-gallery strong { display: block; }
.cq-kit-gallery small { font-size: .8rem; color: #f6e4ad; font-weight: 700; }
.cq-kit-gallery strong { font-size: clamp(1.03rem, 1.6vw, 1.35rem); line-height: 1.2; }
.cq-gallery-controls { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 5px; }
.cq-gallery-controls .icon-button {
    width: 42px; height: 42px; border: 1px solid #ffffff80; border-radius: 50%; background: #16382fd9; color: white;
}
.cq-gallery-controls .icon-button:hover { background: #2d5945; }
.cq-gallery-controls [data-step="-1"] svg { transform: rotate(180deg); }
.cq-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cq-panel, .cq-run-link { padding: clamp(18px, 3vw, 30px); margin-bottom: 16px; }
.cq-panel > :last-child { margin-bottom: 0; }
.cq-panel ol { padding-left: 24px; }
.cq-panel li { margin-bottom: 6px; }
.cq-panel summary { color: var(--cq-green); font-weight: 750; cursor: pointer; padding: 4px; }
.cq-lines { white-space: pre-line; overflow-wrap: anywhere; }
.cq-kit-overview {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start; gap: clamp(24px, 4vw, 56px); margin-block: clamp(26px, 3.5vw, 48px) 24px;
}
.cq-kit-overview h2 { margin-bottom: 18px; }
.cq-itinerary { padding: clamp(0px, 1vw, 14px) 0 0; }
.cq-itinerary > p { margin: 0 0 24px; color: #45584e; line-height: 1.68; }
.cq-timeline, .cq-station-grid { margin: 0; padding: 0; list-style: none; }
.cq-timeline li { display: grid; position: relative; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; }
.cq-timeline li + li { padding-top: 16px; }
.cq-timeline li:not(:last-child)::after {
    content: ""; position: absolute; left: 31px; top: 20px; bottom: -22px; border-left: 2px dotted #bbcebb;
}
.cq-timeline b {
    position: relative; z-index: 1; border-radius: 9px; padding: 4px 0; background: #e9f1e6;
    color: #24583f; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums;
}
.cq-timeline span::first-letter { text-transform: uppercase; }
.cq-stations {
    border: 1px solid #d4e1d4; border-radius: 22px; padding: clamp(18px, 2.3vw, 30px);
    background-color: #f0f5ec; background-image: radial-gradient(#a8b9a34a .8px, transparent .9px); background-size: 9px 9px;
}
.cq-station-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cq-station-grid li { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid #d7e2d3; background: #fffef8; }
.cq-station-grid img { display: block; width: 100%; height: auto; aspect-ratio: 2.45; object-fit: cover; }
.cq-station-number {
    position: absolute; top: 8px; left: 8px; border-radius: 6px; padding: 3px 7px;
    background: #fffae9; color: #294d3b; font: 700 .8rem/1.25 ui-monospace, monospace;
}
.cq-station-grid strong { display: block; padding: 9px 12px 12px; color: #234335; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.cq-sample { margin-top: 16px; border-top: 1px solid #ccd9c8; }
.cq-sample summary { display: flex; align-items: center; gap: 9px; padding: 14px 2px 0; cursor: pointer; color: var(--cq-green); font-weight: 750; }
.cq-sample summary::-webkit-details-marker { display: none; }
.cq-sample summary svg:last-child { margin-left: auto; }
.cq-sample[open] summary svg:last-child { transform: rotate(180deg); }
.cq-sample ul { padding-left: 20px; }
.cq-supplies { display: flex; gap: 16px; align-items: flex-start; padding: clamp(18px, 2.4vw, 32px); border: 1px solid #ebdfc6; background: #fcf6e8; border-radius: 18px; margin-bottom: 24px; }
.cq-supplies > svg { flex: none; color: #805d2d; margin-top: 2px; }
.cq-supplies h2 { font-size: 1.4rem; margin: 0; }
.cq-supplies p { margin: 8px 0 0; }
.cq-supplies a { display: inline-block; margin-top: 12px; }
@media (max-width: 780px) {
    .cq-kit-overview { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .cq-station-grid { gap: 8px; }
    .cq-station-grid img { aspect-ratio: 1.7; }
    .cq-station-grid strong { font-size: .94rem; padding: 8px; }
}
.cq-prepare .field, .cq-panel form .field, [data-join] .field { margin-bottom: 12px; }
.cq-prepare > .field, [data-join] .field { max-width: 350px; }
.cq-shell textarea.field__input { padding-block: 10px; resize: vertical; }
.cq-shell fieldset { min-width: 0; border: 1px solid #dbe4db; border-radius: 13px; margin: 12px 0; padding: 14px; }
.cq-shell legend { font-weight: 700; padding: 0 6px; }
#prepare { scroll-margin-top: 96px; }
.cq-prepare .cq-mode-picker { border: 0; border-radius: 0; margin: 0 0 24px; padding: 0; }
.cq-mode-picker legend { padding: 0; margin-bottom: 10px; }
.cq-mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cq-mode-picker [data-format="rally"] { --ink: #89541c; --wash: #fff4d9; }
.cq-mode-picker [data-format="quiz"] { --ink: #664891; --wash: #f4effb; }
.cq-mode-picker [data-format="hunt"] { --ink: #22654f; --wash: #eaf5eb; }
.cq-mode-picker [data-format="classic"] { --ink: #345f85; --wash: #ecf4fa; }
.cq-mode-card {
    position: relative; display: grid; align-content: start; padding: 14px 16px;
    border: 1px solid #d8e1db; border-radius: 15px; color: #263c32; background: white; cursor: pointer;
    transition: background-color .18s, border-color .18s;
}
.cq-mode-card input { position: absolute; top: 14px; right: 14px; width: 17px; height: 17px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.cq-mode-card img { display: block; margin-bottom: 8px; }
.cq-mode-card strong { font-size: 1.05rem; line-height: 1.2; }
.cq-mode-card span { font-size: .88rem; color: #526157; margin-top: 4px; line-height: 1.3; }
.cq-mode-card:hover, .cq-mode-card:has(:checked) { border-color: var(--ink); }
.cq-mode-card:has(:checked) { background: var(--wash); box-shadow: inset 0 0 0 1px var(--ink); }
.cq-mode-card:has(:focus-visible) { outline: 3px solid #235fba; outline-offset: 3px; }
.cq-mode-detail {
    display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center;
    gap: clamp(14px, 2.5vw, 32px); margin-top: 12px; padding: clamp(14px, 2vw, 22px);
    border-left: 4px solid var(--ink); border-radius: 4px 16px 16px 4px; background: var(--wash);
}
.cq-mode-help { line-height: 1.55; }
.cq-mode-help:empty { display: none; }
.cq-mode-preview { position: relative; min-width: 0; margin: 0; }
.cq-mode-preview img { display: block; width: 100%; height: auto; border-radius: 10px; }
.cq-mode-preview figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: .85rem; color: var(--ink); }
.cq-mode-preview a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: inherit; cursor: zoom-in; }
.cq-mode-preview a::after { content: ''; position: absolute; inset: 0; border-radius: 10px; }
.cq-preview-dialog { width: min(1200px, calc(100% - 16px)); }
.cq-preview-dialog header { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 8px 20px; }
.cq-preview-dialog .site-dialog__close { position: static; }
.cq-preview-image { display: flex; min-height: 0; }
.cq-preview-image img { display: block; width: 100%; height: auto; min-height: 0; object-fit: contain; }
html:has(.cq-preview-dialog[open]) { overflow: hidden; }
@media (max-width: 700px) {
    .cq-mode-detail { grid-template-columns: 1fr; }
    .cq-mode-preview { grid-row: 1; }
}
@media (prefers-reduced-motion: no-preference) {
    .cq-kit-gallery figure:not([hidden]), .cq-mode-preview:not([hidden]), .cq-mode-help > span { animation: cq-reveal .24s ease-out; }
    @keyframes cq-reveal { from { opacity: .35; } to { opacity: 1; } }
}
.cq-note, .cq-connection { color: #4c6058; }
.cq-game-head, .cq-run-link { justify-content: space-between; }
.cq-game-head h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
.cq-game-head .cq-clock { display: grid; text-align: right; }
.cq-clock strong { color: var(--cq-green); font-size: clamp(1.4rem, 2.6vw, 2.7rem); font-variant-numeric: tabular-nums; }
.cq-connection { font-size: .9rem; margin: 8px 0; }
.cq-offline, .cq-feedback:not(:empty) { padding: 10px 15px; border-radius: 8px; background: #fff2d6; color: #573914; }
.cq-toolbar, .cq-station-nav { margin: 14px 0 20px; }
.cq-station-nav a[aria-current] { box-shadow: inset 0 0 0 2px var(--cq-green); }
.cq-table-wrap { overflow-x: auto; }
.cq-quick { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; margin: 0 0 12px; cursor: pointer; }
.cq-matrix { width: 100%; border-collapse: collapse; }
.cq-matrix th, .cq-matrix td { text-align: left; padding: 10px 7px; border-bottom: 1px solid #e2e9e3; font-size: .94rem; }
.cq-matrix th { color: #3a5246; }
.cq-matrix button { border: 1px solid #c5d0c9; background: #f4f7f4; border-radius: 9px; padding: 9px; font: inherit; color: inherit; cursor: pointer; min-height: 42px; }
.cq-matrix button[aria-pressed="true"] { outline: 2px solid var(--cq-green); }
.cq-matrix [data-status="approved"] { background: #dcf2da; color: #20522a; }
.cq-matrix [data-status="retry"], .cq-matrix [data-status="pending"] { background: #fff0c1; color: #684800; }
.cq-matrix [data-status="opened"] { background: #e4effa; }
.cq-review { margin-top: 18px; padding: 16px; border-left: 4px solid var(--cq-green); background: #f3f8f2; }
.cq-review h3, .cq-run-link h2 { margin: 0 0 4px; }
.cq-station-art { display: block; width: min(100%, 360px); height: auto; max-height: 230px; object-fit: contain; margin: 12px 0; border-radius: 14px; }
[data-options] label { display: flex; gap: 10px; align-items: baseline; padding: 10px; line-height: 1.4; cursor: pointer; }
.cq-projection > header, .cq-projection > footer { display: none; }
.cq-projection .cq-shell { padding-top: 6vh; }
.cq-project-stage { margin: 6vh 0; padding: clamp(24px, 4vw, 60px); border-radius: 25px; background: var(--cq-pale); }
.cq-project-stage h2 { font-size: clamp(2rem, 4vw, 4rem); }
.cq-project-stage > p { font-size: clamp(1.25rem, 2.1vw, 2.15rem); }
.cq-board { margin: 20px 0; padding: clamp(16px,3vw,36px); border-radius: 22px; background: #19364c; color: #fff; }
.cq-board h2 { color: #fff; margin-bottom: .65em; }
[data-lanes] { display: flex; flex-direction: column; gap: 8px; }
.cq-lane { display: grid; grid-template-columns: 2em minmax(5em, 21%) 1fr 3em; align-items: center; gap: .7em; font-variant-numeric: tabular-nums; }
.cq-lane strong { overflow-wrap: anywhere; }
.cq-lane b { text-align: right; color: var(--lane-color); }
.cq-rank { text-align: center; border-radius: 50%; font-weight: 700; background: #304c60; }
.cq-track { height: 14px; margin-inline: 6px; border-radius: 9px; background: repeating-linear-gradient(90deg,#385467 0 calc(11.11% - 2px),#708495 calc(11.11% - 2px) 11.11%); }
.cq-track span { position: relative; display: block; width: var(--distance); height: 100%; border-radius: inherit; background: var(--lane-color); transition: width .7s cubic-bezier(.24,.75,.21,1); }
.cq-track span::after { content: ''; position: absolute; right: -6px; top: -3px; width: 16px; height: 16px; border: 2px solid white; border-radius: 50%; background: var(--lane-color); }
.cq-projection { --wall:#103c49; --glow:#166a6a; background: radial-gradient(ellipse at 96% 0%,var(--glow),transparent 50%),var(--wall); color: #fff; min-height: 100vh; }
.cq-projection:has([data-mode="quiz"]) { --wall:#272652; --glow:#69429b; }
.cq-projection:has([data-mode="hunt"]) { --wall:#0e443d; --glow:#347852; }
.cq-projection .cq-shell { color: #fff; width: min(94%,1480px); padding-block: clamp(18px,3vh,45px); }
.cq-projection .cq-game-head { border-bottom: 1px solid #ffffff42; gap: 10px; padding-bottom: 12px; }
.cq-projection .cq-game-head h1 { color:#fff; font-size:clamp(1.6rem,3vw,3.3rem); margin-bottom:0; }
.cq-projection .cq-clock strong,.cq-projection .cq-meta { color:#ffe095; }
.cq-projection .cq-connection { color:#d1e4e2; font-size:.8rem; }
.cq-projection .cq-connection:not(.cq-offline) { display:none; }
.cq-projection .cq-project-stage { color:#153f40; background: #fff9e9; border-left: 9px solid #ffbf43; margin:1.1rem 0; padding:clamp(18px,2vw,36px); box-shadow:0 12px 30px #051e3026; }
.cq-projection .cq-project-stage h2 { color:#123e40; font-size:clamp(1.6rem,2.5vw,3.1rem); }
.cq-projection .cq-project-stage p { color:#203d43; font-size:clamp(1.12rem,1.7vw,2.15rem); line-height:1.32; white-space:pre-line; margin:.45em 0; }
.cq-projection .cq-project-stage p:empty { display:none; }
.cq-wall-art { float:right; width:clamp(110px,18vw,260px); max-height:180px; object-fit:cover; margin:0 0 .8em 1em; border-radius:14px; }
.cq-project-stage::after { content:''; display:table; clear:both; }
.cq-wall-options { clear:both; }
.cq-projection .cq-clock { background:#071f3270; border-radius:16px; padding:10px 18px; }
.cq-projection .cq-clock span { color:#fff; }
.cq-projection [data-mode=rally] .cq-track { border-right:6px dotted #fff; }
.cq-track.cq-stamps { display:flex; gap:3px; height:auto; background:none; margin:0; flex-wrap:wrap; }
.cq-stamps i { display:grid; place-items:center; width:1.35em; height:1.35em; border-radius:5px; font-size:.85em; font-style:normal; font-weight:700; background:#374d5d; }
.cq-stamps i[data-status=opened],.cq-stamps i[data-status=retry] { background:#fff0b4; color:#4b411f; }
.cq-stamps i[data-status=pending] { background:#b5dbff; color:#1b3549; }
.cq-stamps i[data-status=approved] { background:#98efba; color:#153b2e; }
@media (max-width:640px) { .cq-wall-art { width:25%; max-height:100px; } }
.cq-projection .cq-board { background:#0a2538c9; font-size:clamp(1rem,1.5vw,1.75rem); }
.cq-projection .cq-join-wall { display:flex; gap:16px; align-items:center; margin-top:1rem; }
.cq-join-wall [data-vk-qr] { width:clamp(100px,11vw,160px); background:white; border-radius:12px; padding:4px; }
.cq-join-wall svg { width:100%; display:block; }
.cq-join-wall p { font-size:1.2rem; font-weight:bold; }
.cq-projection .cq-full { min-height:42px; color:#243b43; }
.cq-projection .cq-wall-layout { display:grid; gap:14px; align-items:start; margin-top:16px; }
.cq-projection .cq-wall-layout > section { margin:0; }
.cq-wall-options li.is-correct { background:#c7f3d0; border:2px solid #237349; font-weight:700; }
.cq-projection .cq-board [data-lanes] { max-height:65vh; overflow:auto; padding:4px; }
[data-personal-score] { font-weight:700; color:#165849; }
@media (min-width:1000px) {
    .cq-projection [data-mode]:not([data-mode=classic]) .cq-wall-layout { grid-template-columns:minmax(0,1.7fr) minmax(320px,1fr); }
    .cq-projection .cq-wall-layout .cq-lane { grid-template-columns:1.5em minmax(5em,32%) 1fr 2em; gap:.35em; }
}
.cq-wall-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:8px; list-style:upper-alpha inside; padding:0; }
.cq-wall-options li { border:1px solid #d2b978; background:#ffebbb; padding:.5em .7em; border-radius:.6em; font-size:clamp(1rem,1.45vw,1.6rem); }
.cq-answer-options { display:grid; gap:8px; border:0; padding:0; margin:1rem 0; }
.cq-answer-options label,.cq-boost { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid #b6ccbd; border-radius:12px; cursor:pointer; }
.cq-answer-options label:has(:checked) { background:#e1f4e6; border-color:#237458; }
.cq-boost { background:#fff2c7; margin-bottom:12px; }
.cq-grade { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:12px; border-top:1px solid #dfebe3; padding-top:10px; }
.cq-grade p { margin:0; flex:1 1 40%; overflow-wrap:anywhere; }
[data-camera] { display:block; width:min(100%,420px); margin:12px 0; border-radius:18px; }
@media (prefers-reduced-motion:reduce) { .cq-track span { transition:none; } }
.cq-class-progress { display: grid; gap: 5px; }
.cq-class-progress progress { width: 100%; height: 16px; accent-color: var(--cq-green); }
.cq-run-link { margin-top: 12px; }
@media (max-width: 850px) {
    .cq-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cq-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
    .cq-library-head { grid-template-columns: 1fr; gap: 22px; padding: clamp(16px, 4vw, 30px); }
    .cq-feature { transform: none; }
    .cq-hero-copy h1 { font-size: clamp(2.65rem, 8vw, 3.8rem); }
    .cq-hero-copy h1 em { display: inline; }
    .cq-hero-copy > p:not(.cq-brand) { max-width: 52ch; margin-top: 14px; }
    .cq-hero-actions { margin-top: 16px; }
}
@media (max-width: 640px) {
    .cq-feature-caption { padding: 7px 10px; }
    .cq-hero-copy .cq-brand { margin-bottom: 12px; }
    .cq-hero-actions .button { min-height: 44px; padding-inline: 12px; gap: 6px; font-size: .9rem; }
    .cq-catalog-head, .cq-tabs { align-items: flex-start; }
    .cq-filters { gap: 10px; }
    .cq-cards, .cq-kit-head, .cq-names { grid-template-columns: 1fr; }
    .cq-kit-head { gap: 3px; }
    .cq-kit-gallery { min-height: 0; aspect-ratio: 1.55; }
    .cq-mode-card { padding: 12px; }
    .cq-mode-card strong { font-size: .98rem; }
    .cq-filters .field { max-width: none; }
    .cq-matrix { min-width: 570px; }
    .cq-toolbar .button { min-height: 44px; }
}
@media print {
    .page-class-quest > :not(main), .cq-shell > :not(.cq-game-head, .cq-panel), .cq-panel:not(:has(.cq-matrix)), .cq-panel > :not(h2, .cq-table-wrap), .cq-clock { display: none !important; }
    .cq-shell, .cq-panel { width: 100%; max-width: none; padding: 0; margin: 0; border: 0; }
    .cq-table-wrap { overflow: visible; }
    .cq-matrix { min-width: 0; }
}
