:root {
    --bg: #17191d;
    --text: #f2f2f2;
    --hint: #8a8f98;
    --card: #23262c;
    --line: #333842;
    --accent: #e0a526;
    --accent-text: #17191d;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    padding: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 12px;
    min-height: 36px;
}

header h1 {
    font-size: 20px;
    margin: 0;
}

h2 {
    font-size: 16px;
    margin: 0 0 8px;
}

h3 {
    font-size: 15px;
    margin: 16px 0 8px;
}

img {
    max-width: 100%;
    border-radius: 8px;
}

.caption {
    font-size: 13px;
    color: var(--hint);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.chip,
.back {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
}

.chip.active {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}

.back {
    padding: 4px 12px;
}

.maps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.map-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    text-align: left;
    cursor: pointer;
}

.map-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 0;
    background: #000;
}

.map-art {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #3a2a00, #8a6100);
}

.map-art svg {
    width: 40%;
    height: auto;
    aspect-ratio: 1 / 1;
    fill: #ffd54a;
}

.map-name {
    font-size: 15px;
    font-weight: 600;
    padding: 8px 10px 0;
}

.map-count {
    font-size: 12px;
    color: var(--hint);
    padding: 2px 10px 10px;
}

.radar-wrap {
    position: relative;
    touch-action: none;
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.radar {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}

.spot {
    position: absolute;
    transform: translate(-50%, -50%) scale(calc(1 / var(--zoom, 1)));
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #111;
    color: #111;
    font-size: 11px;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    background: #d0d0d0;
}

.radar-stage {
    position: relative;
    transform-origin: 0 0;
}

.zoom-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.zoom-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.spot.T {
    background: #e07b39;
}

.spot.CT {
    background: #8fb8e8;
}

.spot.active {
    outline: 2px solid #fff;
}

.spot-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 10px;
}

.fav-btn {
    background: none;
    border: none;
    color: var(--hint);
    font-size: 22px;
    line-height: 1;
    padding: 4px;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
}

.fav-btn.on {
    color: var(--accent);
}

.fav-btn.big {
    font-size: 28px;
}

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

.detail-head h2 {
    flex: 1;
}

.types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--card);
    color: var(--hint);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 2px;
    font-size: 12px;
    cursor: pointer;
}

.type svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.type.active {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}

.card {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--card);
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.thumb-wrap {
    position: relative;
    width: 120px;
    height: 68px;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
    flex-shrink: 0;
}

.thumb {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 200%;
    height: auto;
    max-width: none;
}

.card-body {
    min-width: 0;
}

.card-body h2 {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #353a43;
}

.badge.side-T {
    background: #7a4b1f;
}

.badge.side-CT {
    background: #1f4f7a;
}

.meta {
    color: var(--hint);
    font-size: 13px;
    margin: 0 0 12px;
}

.info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.info p {
    margin: 2px 0 0;
    font-size: 14px;
}

.empty {
    color: var(--hint);
    text-align: center;
    padding: 24px 0;
}

.player {
    width: 100%;
    border-radius: 8px;
    background: #000;
    margin-bottom: 12px;
}

.console {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--card);
    border-radius: 8px;
    padding: 8px 10px;
}

.console code {
    font-size: 12px;
    word-break: break-all;
    flex: 1;
}

.source {
    font-size: 12px;
    color: var(--hint);
}

.source a {
    color: var(--accent);
}

ol {
    padding-left: 20px;
    line-height: 1.5;
}
