.recommendation-rank {
    position: absolute; z-index: 3; inset: 12px auto auto 12px;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.8rem; min-height: 2.5rem; padding: .45rem .7rem;
    border: 1px solid #d7bc91; border-radius: 10px;
    color: #79502c; background: #fff9eaf2; box-shadow: 0 3px 9px #4e39231a;
    font: 750 1rem/1.2 var(--font-body); font-variant-numeric: tabular-nums;
}
.recommendation-rank[data-provisional="true"] { border-style: dashed; }
[data-algorithm="TOPSIS"] .recommendation-rank,
[data-aggregation="TOPSIS"] .recommendation-rank { color: #286d82; background: #effbfcf2; border-color: #90bdc8; }
.recommendation-detail-rank {
    display: inline-flex; align-items: center; gap: .5rem; width: fit-content;
    padding: .65rem 1rem; margin: .7rem 0 1rem;
    color: #60472f; background: #f4ead5; border: 1px solid #d9c29a;
    border-radius: 12px; font-weight: 750; font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}
.algorithm-pending-results { padding: 2rem; border: 1px dashed #a6b9b1; border-radius: 14px; background: #f0f5ed; line-height: 1.7; }

/* das ganze spielbild steht klar über dem titel und allen angaben */
:is(.solo-result-list, .algorithm-result-cards, .lobby-result-grid) { grid-auto-rows: 1fr; }
:is(.solo-result-list, .algorithm-result-cards, .lobby-result-grid) > .solo-result-card { align-self: stretch; height: 100%; }
.solo-result-card-header { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding: 0; }
.solo-result-card-header > .solo-result-art,
.lobby-ranking-columns[data-comparing] .lobby-game-card .solo-result-card-header > .solo-result-art { position: relative; inset: auto; width: 100%; height: auto; min-height: 0; max-height: none; aspect-ratio: 460 / 215; border: 0; border-bottom: 1px solid #e1d4be; border-radius: 0; }
.solo-result-card-header .solo-result-image { object-fit: contain; object-position: center; }
.solo-result-card-header .solo-result-fallback { place-items: center; padding: 0; font-size: 60px; }
.solo-result-card-header > h3, .algorithm-result-cards .solo-result-card-header > h3 { width: 100%; margin: 0; padding: 11px 12px 6px; font: 650 18px/1.25 var(--font-display); color: #4e3825; overflow-wrap: anywhere; }
.solo-result-card-header .recommendation-rank { inset: 7px auto auto 8px; min-width: 1.6rem; min-height: 1.5rem; padding: 3px 6px; font-size: 13px; border-radius: 6px; }
:is(.solo-result-list, .algorithm-result-cards, .lobby-result-grid) > .solo-result-card:not(.solo-mode-card):not(.solo-game-group) > .solo-result-copy {
    display: flex; flex-direction: column; align-items: flex-start;
    width: 100%; margin: 0; min-block-size: 0; gap: 5px; flex: 1; padding: 6px 12px 11px;
}
:is(.solo-result-list, .algorithm-result-cards, .lobby-result-grid) > .solo-result-card > .solo-result-copy > h3,
.solo-game-group-heading > h3 {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin: 0; line-height: 1.35; max-height: 2.7em; min-block-size: 2.7em;
}
:is(.solo-result-list, .algorithm-result-cards, .lobby-result-grid) > .solo-result-card > .solo-result-copy > .solo-game-metadata {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    height: auto; min-block-size: 0; flex-shrink: 0; margin: 0;
    align-content: start; align-items: center; gap: 4px 6px;
}
:is(.solo-result-list, .algorithm-result-cards, .lobby-result-grid) > .solo-result-card > .solo-result-copy > .solo-result-actions {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%; margin-top: auto; min-block-size: 2rem; gap: 2px 7px;
}
.solo-result-card-header + .solo-result-copy .solo-game-facts { display: contents; }
.solo-result-card-header + .solo-result-copy .solo-game-price { grid-column: 1 / -1; grid-row: 2; gap: 2px 5px; }
.solo-result-card-header + .solo-result-copy .solo-game-price-amount { font-size: 15px; line-height: 1.35; }
.solo-result-card-header + .solo-result-copy :is(.solo-game-rating, .solo-game-wishlist, .solo-game-price-note, .solo-game-discount, .solo-game-playtime) { font-size: 13px; line-height: 1.35; }
.solo-result-card-header + .solo-result-copy :is(.solo-game-rating, .solo-game-wishlist) { grid-column: 1 / -1; min-height: 0; margin: 0; }
.solo-result-card-header + .solo-result-copy .solo-game-playtime { grid-column: 1; grid-row: 1; }
.solo-result-card-header + .solo-result-copy .solo-result-points { grid-column: 2; grid-row: 1; justify-self: end; padding: 3px 5px; font-size: 15px; line-height: 1.25; }
.solo-result-card-header + .solo-result-copy .solo-result-status { padding: 1px 6px; }
.solo-result-card-header + .solo-result-copy .solo-result-actions :is(button, a) { min-width: 0; min-height: 32px; padding: 3px 0; font-size: 13px !important; line-height: 1.2; }
.solo-result-card-header + .solo-result-copy .solo-result-details { gap: 2px; }
.solo-result-card-header + .solo-result-copy .solo-result-details::after { font-size: 13px; }
.solo-result-card-header + .solo-game-group-heading { width: 100%; margin: 0; padding: 6px 12px 11px; }
.solo-game-group > .solo-mode-list { background: #fffbf2; }
:is(.solo-result-list, .algorithm-result-cards, .lobby-result-grid) > .solo-result-card > .solo-result-copy > .solo-result-overview { margin: 0; }
:is(.solo-result-list, .algorithm-result-cards, .lobby-result-grid) > .solo-result-card > .solo-result-copy > .solo-result-status { margin: 0; }
.solo-result-copy .solo-result-overview .solo-result-status { margin: 0; }
.lobby-formula-ring[data-algorithm] { background: none; border: 0; box-shadow: none; transform: none; }
.lobby-formula-ring[data-algorithm]::before, .lobby-formula-ring[data-algorithm]::after { display: none; }
.lobby-formula-ring[data-algorithm] span { transform: none; }
.lobby-formula-ring[data-algorithm] > span { position: static; }
.lobby-formula-ring[data-algorithm] .algorithm-logo { width: 66px; height: 66px; color: #df7336; }
.lobby-formula-ring[data-algorithm="TOPSIS"] .algorithm-logo { color: #247baf; }
.algorithm-detail-tabs > button, .lobby-algorithm-tabs > button { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; }

@media (max-width: 480px) {
    .recommendation-detail-rank { font-size: .95rem; }
}

/* auswahl und ergebnisse nutzen schon vor der suche denselben rahmen */
.site-shell:has(.solo-layout:not([hidden])),
.site-shell:has(.lobby-screen:not([hidden])) {
    width: min(1680px, calc(100% - 48px)); max-width: none;
}
.solo-layout, .lobby-screen { width: 100%; }
.solo-layout > .pref-workspace,
.solo-layout > [data-solo-algorithm-picker] { width: 100%; min-width: 0; max-width: none; }
:is(.solo-layout, .lobby-screen) .algorithm-picker { width: 100%; min-width: 0; box-sizing: border-box; }
/* Die Ergebnislisten bleiben etwa so breit wie im Algorithmusvergleich. */
.solo-layout > .solo-results,
.lobby-screen .lobby-results { width: min(1280px, 100%); margin-inline: auto; }
.solo-results:has(.algorithm-result-columns) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding-top: 14px; margin-top: 14px; }
.solo-results:has(.algorithm-result-columns)[hidden] { display: none; }
.solo-results:has(.algorithm-result-columns) > * { grid-column: 1 / -1; }
.solo-results:has(.algorithm-result-columns) > .solo-results-heading { grid-column: 1; grid-row: 1; gap: 12px; }
.solo-results:has(.algorithm-result-columns) > .solo-results-toolbar { grid-column: 2; grid-row: 1; gap: 10px; }
.solo-results:has(.algorithm-result-columns) .solo-results-heading h2 { margin: 0; font-size: 26px; }
.solo-results:has(.algorithm-result-columns) .solo-kicker { margin: 0 0 4px; }
.solo-results:has(.algorithm-result-columns) > .solo-result-context { grid-column: 1; grid-row: 2; max-width: none; margin: 0; font-size: 13px; line-height: 1.4; }
.solo-results:has(.algorithm-result-columns) > .solo-search-duration { grid-column: 2; grid-row: 2; justify-self: end; align-self: center; margin: 0; }
.solo-results:has(.algorithm-result-columns) :is(.solo-view-switch button, .solo-filter select) { min-height: 36px; padding-block: 6px; font-size: 13px; }
.solo-results:has(.algorithm-result-columns) .solo-filter { gap: 3px; font-size: 12px; }
.solo-results:has(.algorithm-result-columns) > .solo-result-summary { margin: 0; min-height: 0; }
.solo-results:has(.algorithm-result-columns) > .solo-result-summary:empty { display: none; }
.solo-results:has(.algorithm-result-columns) > .solo-provisional { margin: 0; padding-block: 7px; }
.lobby-results:has(.lobby-ranking-columns[data-comparing="true"]) .lobby-results-heading { margin-bottom: 10px; }
.lobby-results:has(.lobby-ranking-columns[data-comparing="true"]) .lobby-results-heading h2 { font-size: 26px; }
.lobby-results:has(.lobby-ranking-columns[data-comparing="true"]) .lobby-results-heading p { margin-block: 4px; }
.lobby-results:has(.lobby-ranking-columns[data-comparing="true"]) .lobby-results-clock { padding: 8px 12px; gap: 3px; }
.lobby-results:has(.lobby-ranking-columns[data-comparing="true"]) .lobby-results-formula { padding-block: 7px; }
.lobby-results:has(.lobby-ranking-columns[data-comparing="true"]) .lobby-results-toolbar { margin-block: 8px; }
.solo-result-list.algorithm-result-columns,
.lobby-ranking-columns, .lobby-ranking-columns[data-comparing="true"] { grid-template-columns: minmax(0, 1fr); gap: 0; grid-auto-rows: auto; overflow: hidden; border: 1px solid #d8c4a4; border-radius: 18px; background: #faf4e8; }
.algorithm-result-column, .lobby-ranking-column, .lobby-ranking-columns[data-comparing="true"] .lobby-ranking-column { padding: 14px; border: 0; border-radius: 0; background: transparent; }
.algorithm-result-column[data-algorithm="TOPSIS"], .lobby-ranking-columns .lobby-ranking-column[data-aggregation="TOPSIS"] { background: #f0f6f3; }
.algorithm-result-column + .algorithm-result-column,
.lobby-ranking-columns .lobby-ranking-column + .lobby-ranking-column,
.lobby-ranking-columns[data-comparing="true"] .lobby-ranking-column + .lobby-ranking-column { border-top: 2px solid #adc4bc; }
.solo-result-list:not(.algorithm-result-columns),
.algorithm-result-columns[data-columns] .algorithm-result-cards,
.lobby-ranking-columns .lobby-result-grid,
.lobby-ranking-columns[data-comparing] .lobby-result-grid { grid-template-columns: repeat(var(--result-columns, 4), minmax(0, 1fr)); }
.algorithm-result-columns .algorithm-result-cards, .lobby-ranking-columns[data-comparing] .lobby-result-grid { gap: 12px; }
.algorithm-result-cards > .solo-result-card h3 { font-size: 18px; }
[data-layout-mode="single"] .solo-result-card-header > h3 { font-size: 20px; }
[data-layout-mode="single"] .solo-result-card-header + .solo-result-copy :is(.solo-game-rating, .solo-game-wishlist, .solo-game-price-note, .solo-game-discount, .solo-game-playtime) { font-size: 14px; }
.algorithm-result-cards > .solo-result-card > .solo-result-art,
.lobby-ranking-columns[data-comparing="true"] .lobby-game-card > .solo-result-art { aspect-ratio: 460 / 215; max-height: none; }
.algorithm-result-cards .solo-result-copy { padding: 20px 22px 16px; }
.algorithm-result-cards .solo-result-points { font-size: 1.25rem; }
.algorithm-result-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #ddc8a8; }
.solo-result-pagination { grid-column: 1 / -1; }
.algorithm-page-label { color: #795e40; font-size: .9rem; font-variant-numeric: tabular-nums; text-align: center; }
.solo-page-button { padding: .7rem 1rem; border: 1px solid #c8ad86; border-radius: 10px; background: #fffaf0; color: #805335; font: inherit; font-weight: 650; cursor: pointer; }
.solo-page-button:hover:not(:disabled) { background: #f5e8d0; }
.solo-page-button:disabled { opacity: .5; cursor: default; }
.algorithm-result-pagination[data-algorithm="TOPSIS"] .solo-page-button { color: #337387; border-color: #9bbfc8; background: #f0f7f6; }
.algorithm-result-heading { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 2px 10px; }
.algorithm-result-heading .algorithm-picker-icon { width: 42px; height: 42px; }
.algorithm-result-heading h3, .lobby-ranking-heading h3 { font-size: 21px; }
.algorithm-result-heading p { font-size: 13px; }
.algorithm-result-counts { margin: 8px 0; gap: 5px 8px; }
.algorithm-result-counts > span { padding: 3px 7px; font-size: 12px; }
.lobby-ranking-heading { gap: 10px; margin-bottom: 10px; }
.algorithm-result-heading .solo-page-button, .lobby-ranking-heading .solo-page-button { padding: 8px 10px; font-size: 13px; }
.algorithm-result-heading .algorithm-page-label, .lobby-ranking-heading .algorithm-page-label { font-size: 13px; }
.algorithm-result-heading > .algorithm-result-pagination { grid-column: 4; grid-row: 1 / 3; justify-self: end; }
.algorithm-result-heading > .algorithm-run-times { grid-column: 3; grid-row: 1 / 3; }
.algorithm-result-pagination[data-placement="oben"] { border: 0; margin: 0; padding: 0; gap: .65rem; }
.algorithm-result-pagination[data-placement="oben"] .algorithm-page-label { max-width: 14rem; }
.lobby-ranking-heading > [data-lobby-results-top-pages], .lobby-ranking-heading > div:last-child:has(.algorithm-result-pagination) { margin-left: auto; }
@media (min-width: 1200px) {
    .algorithm-result-column > .algorithm-result-pagination[data-placement="unten"],
    .lobby-ranking-column > .lobby-results-pages,
    .lobby-ranking-column > .algorithm-result-pagination[data-placement="unten"] { display: none; }
}
@media (max-width: 1199px) {
    .solo-result-list:not(.algorithm-result-columns),
    .algorithm-result-columns[data-columns] .algorithm-result-cards,
    .lobby-ranking-columns .lobby-result-grid,
    .lobby-ranking-columns[data-comparing] .lobby-result-grid { grid-template-columns: repeat(var(--result-columns, 2), minmax(0, 1fr)); }
    .algorithm-result-heading > .algorithm-result-pagination { grid-column: 1 / -1; grid-row: auto; justify-self: stretch; margin-top: .75rem; }
    .lobby-ranking-heading { flex-wrap: wrap; }
}
@media (max-width: 999px) {
    .solo-results:has(.algorithm-result-columns) { grid-template-columns: minmax(0, 1fr); }
    .solo-results:has(.algorithm-result-columns) > :is(.solo-results-heading, .solo-results-toolbar, .solo-result-context, .solo-search-duration) { grid-column: 1; grid-row: auto; justify-self: stretch; }
}
@media (max-width: 680px) {
    .solo-result-list:not(.algorithm-result-columns),
    .algorithm-result-columns[data-columns] .algorithm-result-cards,
    .lobby-ranking-columns .lobby-result-grid,
    .lobby-ranking-columns[data-comparing] .lobby-result-grid { grid-template-columns: repeat(var(--result-columns, 1), minmax(0, 1fr)); }
    .algorithm-result-pagination { justify-content: center; }
    .algorithm-page-label { order: -1; width: 100%; }
}

/* das ganze titelbild bleibt sichtbar, auch neben langen beschreibungen */
.rec-detail-hero .solo-result-art {
    align-self: center; height: auto; min-height: 0; aspect-ratio: 460 / 215;
    background: radial-gradient(ellipse at center, #eee6d4, #ded4bf);
}
.rec-detail-hero .solo-result-image { object-fit: contain; object-position: center; }

.algorithm-run-times { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.algorithm-run-times[hidden] { display: none; }
.algorithm-runtime { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; margin: 0; padding: 5px 8px; border: 1px solid #dec6a6; border-radius: 8px; color: #795231; background: #fff7e9; font-variant-numeric: tabular-nums; }
.algorithm-runtime[data-algorithm="TOPSIS"] { color: #326b7f; border-color: #a9c9d3; background: #edf6f5; }
.algorithm-runtime strong { font-size: 1rem; }
.algorithm-runtime span { font-size: .8rem; }
.algorithm-result-heading .algorithm-runtime { flex-direction: column; align-items: flex-start; }
.lobby-ranking-heading > .algorithm-run-times { margin-left: auto; }
.solo-results-heading > .algorithm-run-times { margin-left: auto; }
@media (max-width: 760px) {
    .site-shell:has(.solo-layout:not([hidden])),
    .site-shell:has(.lobby-screen:not([hidden])) { width: calc(100% - 28px); }
    .solo-result-list.algorithm-result-columns { grid-template-columns: minmax(0, 1fr); }
    .algorithm-result-column { padding: 14px; }
    .algorithm-result-cards .solo-result-copy { padding: 18px 16px 14px; }
}
@media (max-width: 680px) {
    .algorithm-result-heading { grid-template-columns: auto minmax(0, 1fr); }
    .algorithm-result-heading > .algorithm-picker-icon { grid-column: 1; grid-row: 1 / 3; }
    .algorithm-result-heading > h3 { grid-column: 2; grid-row: 1; }
    .algorithm-result-heading > p { grid-column: 2; grid-row: 2; }
    .algorithm-result-heading > .algorithm-run-times { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
    .algorithm-result-heading > .algorithm-result-pagination { grid-column: 1 / -1; grid-row: 4; margin-top: 8px; }
    .algorithm-result-heading .algorithm-runtime { flex-direction: row; align-items: baseline; }
}
