.pos-page .subtitle {
    color: var(--ink);
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}

.pos-lead {
    color: var(--ink-muted);
}

.pos-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pos-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    width: min(100%, 420px);
    border: 2px solid var(--surface-3);
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0;
}

.pos-sq {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-sq img {
    width: 82%;
    height: 82%;
    object-fit: contain;
}

.pos-sq-light { background: var(--chess-light); }
.pos-sq-dark { background: var(--chess-dark); }

.pos-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.pos-meta {
    display: grid;
    gap: 16px;
}

@media (min-width: 800px) {
    .pos-meta {
        grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
        align-items: start;
    }
}

.pos-eval-strip {
    height: 10px;
    background: var(--surface-2);
    border-radius: 999px;
    position: relative;
    margin: 8px 0 4px;
}

.pos-eval-tick {
    position: absolute;
    top: -4px;
    width: 4px;
    height: 18px;
    background: var(--brand-coral);
    border-radius: 2px;
}

.pos-lane {
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
}

.pos-similar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    list-style: none;
    padding: 0;
}

.pos-similar a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.pos-rank {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.pos-rank span {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.pos-rank img,
.pos-row-rank img {
    width: 82%;
    height: 82%;
    object-fit: contain;
}

.pos-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 24px;
}

.pos-filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.pos-filters input,
.pos-filters select {
    font: inherit;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 8px;
}

.pos-charts {
    display: grid;
    gap: 20px;
}

.pos-chart {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    overflow-x: auto;
}

.pos-chart h2 {
    font-size: 1.1rem;
    margin: 0 0 8px;
}

.pos-chart svg {
    max-width: 100%;
    height: auto;
}

.pos-chart [data-filter] {
    cursor: pointer;
}

.pos-sheet {
    margin-top: 24px;
    height: 560px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    position: relative;
}

#pos-sheet-spacer {
    position: relative;
    width: 100%;
}

#pos-sheet-window {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
}

.pos-row {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 10px;
    align-items: center;
    height: 44px;
    padding: 0 10px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.pos-row:hover,
.pos-row:focus,
.pos-row.is-hit {
    background: var(--surface-2);
}

.pos-row-rank {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    width: min(100%, 220px);
}

.pos-group {
    height: 32px;
    padding: 6px 10px;
    font-weight: 600;
    line-height: 20px;
    background: var(--surface-2);
    box-sizing: border-box;
}

.pos-preview {
    position: fixed;
    z-index: 20;
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.pos-preview[hidden] {
    display: none;
}

.pos-preview-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    width: 168px;
    border: 1px solid var(--surface-3);
    border-radius: 4px;
    overflow: hidden;
}

.pos-preview-board span {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-preview-board img {
    width: 88%;
    height: 88%;
}

.pos-lanes {
    width: min(100%, 320px);
    height: auto;
    margin: 8px 0;
}

.pos-tray {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.pos-all ol {
    columns: 6;
    font-size: 0.9rem;
}

.pos-note {
    color: var(--ink-muted);
    font-size: 0.92rem;
}
