.hidden { display: none !important; }
:root[dir="rtl"] :is(.icon-chevron-left, .icon-chevron-right) { transform: scaleX(-1); }
.main { overflow: hidden; padding: var(--padding-medium); }

.header { height: var(--height); }
.logo-mark { background-image: url("favicon.png"); }
.logo .highlight { color: var(--brand); }
.header-tools { height: 100%; }

.toolbar { flex: none; display: flex; flex-wrap: wrap; gap: var(--gap-small); }
.toolbar select { width: calc(var(--height) * 5); max-width: 100%; }
.selected { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-small); }
.chip { height: calc(var(--unit) * 10); padding: 0 var(--padding-small); gap: var(--gap-extra-small); font-size: var(--font-size-small); background: var(--bg-1); }
.chip > .icon { width: var(--icon-size-extra-small); height: var(--icon-size-extra-small); }
.hint { flex: none; color: var(--fg-1); font-size: var(--font-size-small); }

.results-area { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: var(--gap-medium); }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--unit) * 70), 1fr)); gap: var(--gap-medium); }
.game {
  display: flex; flex-direction: column; align-items: stretch; gap: var(--gap-small);
  height: auto; padding: 0 0 var(--padding-medium); text-align: start; text-transform: none; font-weight: 400; overflow: hidden;
}
.game-cover { --ratio: 315 / 250; width: 100%; border-radius: 0; background: var(--bg-1) center / cover no-repeat; }
.game-body { min-width: 0; display: flex; flex-direction: column; gap: var(--gap-extra-small); padding: 0 var(--padding-medium); }
.game-title { font-size: var(--font-size-medium); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-text { color: var(--fg-1); font-size: var(--font-size-small); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(var(--font-size-small) * 2.6); }
.game-maker { color: var(--fg-1); font-size: var(--font-size-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-small); }
.game-price { display: flex; align-items: center; gap: var(--gap-small); }
.game-original { color: var(--fg-1); font-size: var(--font-size-small); text-decoration: line-through; }
.game-final { font-weight: 700; white-space: nowrap; }
.game-skeleton { height: calc(var(--unit) * 80); }
.platforms { display: inline-flex; align-items: center; gap: var(--gap-small); color: var(--fg-1); }
.platforms > .icon { width: var(--icon-size-small); height: var(--icon-size-small); }
.more-button { flex: none; align-self: center; width: calc(var(--height) * 6); }
.loading-line { display: flex; align-items: center; gap: var(--gap-small); color: var(--fg-1); }

.filters { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap-small); padding: 0 var(--padding-medium); }
.filter-group-body { display: flex; flex-direction: column; gap: var(--gap-small); padding-top: var(--gap-small); }
.filter-list { display: flex; flex-direction: column; }
.filter-label { display: flex; align-items: center; gap: var(--gap-small); height: var(--height); cursor: pointer; }
.filter-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.game-detail { display: flex; flex-direction: column; gap: var(--gap-medium); padding: var(--padding-medium); }
.shared-sheet[data-side="end"]:has(.game-detail) { width: min(calc(var(--unit) * 210), calc(var(--vw) * 100 - 2.4rem)); }
.media-item { display: flex; align-items: center; justify-content: center; background: var(--black) center / contain no-repeat; }
.player { position: relative; width: 100%; background: var(--black); border: var(--border-width) solid var(--border); }
.player-frame { display: block; width: 100%; height: 100%; border: 0; }
.player-bar { display: flex; flex-wrap: wrap; gap: var(--gap-small); padding: var(--padding-small); background: var(--bg-1); }
.detail-lead { color: var(--fg-1); }
.detail-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-medium); flex-wrap: wrap; }
.detail-actions { display: flex; flex-wrap: wrap; gap: var(--gap-small); }
.detail-price { display: flex; flex-direction: column; }
.detail-section { display: flex; flex-direction: column; gap: var(--gap-small); }
.detail-title { font-size: var(--font-size-large); font-weight: 700; }
.detail-text { white-space: pre-line; overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; gap: var(--gap-small); }
.info-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--gap-small) var(--gap-medium); }
.info-name { color: var(--fg-1); font-size: var(--font-size-small); }
.info-value { min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.files { display: flex; flex-direction: column; gap: var(--gap-extra-small); }
.file { display: flex; align-items: center; gap: var(--gap-medium); padding: var(--padding-small) var(--padding-medium); border: var(--border-width) solid var(--border); }
.file-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--fg-1); font-size: var(--font-size-small); }

@media (max-width: 35rem) {
  .toolbar > kit-search { flex: 1 1 100%; }
  .toolbar select { flex: 1; }
  .results { grid-template-columns: repeat(auto-fill, minmax(calc(var(--unit) * 52), 1fr)); gap: var(--gap-small); }
  .info-list { grid-template-columns: 1fr; }
}
