* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --app-width: 100%;
    --app-height: 100%;
}

html,
body {
    width: var(--app-width, 100vw);
    height: var(--app-height, 100vh);
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    font-family: sans-serif;
    padding: 16px;
}

#kaiku-root {
    display: flex;
    flex: 1;
    height: var(--app-height);
    min-height: 0;
    overflow: hidden;
}

.top {
    display: flex;
    flex: 1;
    min-height: 0;
}

.game-list-panel,
.detail-panel {
    min-width: 0;
    min-height: 0;
}

.game-list-panel {
    display: flex;
    flex: 0 0 60%;
    flex-direction: column;
}

.top-mobile .game-list-panel {
    flex-basis: 100%;
}

.top-mobile {
    position: relative;
}

body.mobile {
    padding: 0;
}

body.mobile #kaiku-root {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--app-width);
    height: var(--app-height);
    border-bottom: 1px solid #bbb;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0006;
}

.detail-overlay .detail-panel {
    flex: 1;
    min-height: 0;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    box-shadow: 0 0 32px rgb(0 0 0 / 35%);
    margin-top: 30px;
    margin-bottom: 80px;
}

.detail-panel {
    flex: 1 1 auto;
}

.listing-scroll,
.detail-panel {
    overflow: auto;
}

.listing-scroll {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

.listing-capsule {
    display: block;
    width: 153px;
    height: 57px;
    object-fit: cover;
    -webkit-user-drag: none;
}

.listing-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.listing-capsule-column {
    width: 169px;
}

.listing-title-column {
    width: auto;
}

.listing-review-column {
    width: 100px;
}

.listing-link-column {
    width: 50px;
}

.listing-row {
    height: 65px;
    color: #222;
    user-select: none;
}

.listing-scroll:focus,
.listing-row:focus {
    outline: none;
}

.listing-row td {
    padding: 4px;
}

.listing-spacer td {
    padding: 0;
}

.listing-row.listing-row-unreleased {
    background-color: #f0f0f0;
    color: #444;
}

.listing-row.listing-row-selected {
    background-color: #dbeafe;
    color: #111;
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
}

.listing-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.listing-review,
.listing-link {
    white-space: nowrap;
}

.filter-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.filter-results {
    color: #222;
}

.filter-input {
    font-size: 16px;
    padding: 4px;
}

.listing-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.listing-icon img {
    display: block;
    width: 28px;
    height: 28px;
    -webkit-user-drag: none;
}

.detail-section {
    padding: 8px;
    overflow-wrap: anywhere;
}

.detail-title {
    font-weight: normal;
}

.detail-revenue {
    margin-bottom: 4px;
    font-size: 14px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.detail-tag {
    padding: 2px 6px;
    border-radius: 4px;
    background: #eee;
    font-size: 13px;
}

.detail-review {
    padding: 8px;
    font-size: 14px;
}

.review-positive {
    border-left: #2b2 solid 4px;
}

.review-negative {
    border-left: #c22 solid 4px;
}

.detail-split {
    display: flex;
    flex-direction: row;
}

.detail-mobile-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.detail-mobile-header .detail-capsule {
    display: block;
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
    height: auto;
}

.detail-mobile-links {
    display: flex;
    flex-shrink: 0;
    gap: 4px;
    margin-left: auto;
}

.detail-mobile-links .listing-icon {
    width: 60px;
    height: 60px;
}

.detail-mobile-links .listing-icon img {
    width: 40px;
    height: 40px;
}

.detail-infos {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-info {
    font-size: 17.5px;
    border-left: #bbb solid 3px;
    padding-left: 8px;
}

.detail-reviews {
    display: flex;
    flex-direction: column;
    gap: 8px
}
