.page-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.level-container,
.meta-container {
    min-width: 0;
}

/* ————— Level ————— */

.level-title {
    margin: 0 0 4px;
    font-size: 2.2em;
    overflow-wrap: anywhere;
}

.level-byline {
    margin: 0;
    color: var(--text);
    font-size: 0.85em;
    font-weight: 500;
}

.level-authors {
    font-weight: 500;
}

.video-embed {
    margin: 15px 5%;
}

.video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000000;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 34px 20px;
    border: 1px dashed var(--border);
    background: var(--accent-soft);
    text-align: center;
}

.video-placeholder__title {
    color: var(--text-strong);
    font-size: 0.95rem;
    font-weight: 600;
}

.video-placeholder__note {
    max-width: 62ch;
    color: var(--text-dim);
    font-size: 0.78rem;
    line-height: 1.6;
}

.level-info {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 0 10px;
    margin-top: 5px;
}

.level-info span {
    margin: 5px 10px;
    color: var(--text);
    font-size: 0.85em;
}

.level-info b {
    color: var(--text-strong);
    font-weight: 600;
}

/* ————— Records ————— */

.records-panel h2 {
    margin-bottom: 0;
}

.records-panel .underlined h3 {
    margin-top: 4px;
    color: var(--text);
    font-weight: 500;
}

.records-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.records-table th {
    padding: 10px;
    background: var(--table-head);
    color: #ffffff;
    font-size: 0.85em;
    font-weight: 600;
    text-align: left;
}

.records-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85em;
    text-align: left;
}

.records-table tbody tr:nth-child(odd) {
    background: var(--table-odd);
}

.records-table tbody tr:nth-child(even) {
    background: var(--table-even);
}

.records-table .link {
    color: var(--link);
}

.record-progress {
    color: var(--text-strong);
    font-weight: 600;
}

/* ————— Sidebar ————— */

.side-panel {
    padding: 20px;
}

.side-panel h2 {
    margin-top: 0;
}

.level-select {
    max-height: 360px;
    margin: 0 -10px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}

.level-select__row {
    width: 100%;
    display: flex;
    gap: 8px;
    padding: 7px 10px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-family: var(--font);
    text-align: left;
    cursor: pointer;
}

.level-select__row:hover {
    background: var(--nav-hover);
}

.level-select__row.active {
    background: var(--accent-soft);
    color: var(--text-strong);
}

.level-select__row.error {
    color: var(--error-text);
}

.level-select__rank {
    flex-shrink: 0;
    width: 2.2em;
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.5;
}

.level-select__row.active .level-select__rank {
    color: var(--accent);
}

.level-select__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.level-select__name {
    overflow: hidden;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.level-select__author {
    overflow: hidden;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-style: italic;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.staff-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    text-align: left;
}

.staff-list li:last-child {
    border-bottom: 0;
}

.staff-list small {
    color: var(--text-dim);
    font-size: 0.7rem;
    white-space: nowrap;
}

.rule-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text);
    font-size: 0.75rem;
    line-height: 1.55;
    text-align: left;
}

.rule-list li {
    position: relative;
    padding-left: 12px;
}

.rule-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--text-dim);
}

.side-note {
    margin-bottom: 12px;
    font-size: 0.8rem;
}

.side-panel .btn {
    width: 100%;
}

.submit-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.submit-note {
    margin: 10px 0 0;
    font-size: 0.72rem;
    color: var(--text-dim);
}

@media (max-width: 1000px) {
    .page-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .level-select {
        max-height: 240px;
    }
}

@media (max-width: 600px) {
    .panel {
        padding: 15px;
    }

    .level-title {
        font-size: 1.7em;
    }

    .video-embed {
        margin: 12px 0;
    }

    .records-table th,
    .records-table td {
        padding: 7px 8px;
        font-size: 0.78rem;
    }
}
