.hw-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
}

.hw-nav .current {
    color: #764ba2;
    font-weight: 700;
}

.part-block {
    margin-bottom: 2.5rem;
}

.part-block > h2 {
    color: #667eea;
    font-size: 1.7rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    margin-bottom: 1.25rem;
    color: #555;
}

.meta-row span strong {
    color: #333;
}

.req-box {
    background: #fff8e6;
    border: 1px solid #f3d27a;
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    margin: 1rem 0 1.4rem;
}

.req-box h3 {
    color: #8a6d1b;
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.req-box ul {
    margin: 0.4rem 0 0 1.2rem;
}

.req-box li {
    margin: 0.25rem 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.9rem;
    margin: 1rem 0 1.4rem;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    border: 1px solid #e9ecef;
}

.stat-card .label {
    color: #666;
    font-size: 0.9rem;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4c51bf;
    line-height: 1.3;
}

.class-stat-title {
    color: #667eea;
    font-size: 1.15rem;
    margin: 0.2rem 0 0.7rem;
}

.class-stat-wrap {
    max-width: 640px;
    margin-bottom: 1.5rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
    margin-bottom: 0.9rem;
}

.toolbar input[type="search"] {
    flex: 1 1 220px;
    min-width: 200px;
    padding: 0.55rem 0.8rem;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 0.95rem;
}

.toolbar button {
    border: 1px solid #d0d5dd;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.toolbar button.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #7eb6e0;
}

table.hw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

table.hw-table th,
table.hw-table td {
    padding: 0.55rem 0.7rem;
    border: 1px solid #7eb6e0;
    text-align: left;
    white-space: nowrap;
}

table.hw-table th {
    background: #003d5c;
    color: #fff;
    font-weight: 600;
}

table.hw-table tbody tr:nth-child(odd) td {
    background: #d9edf7;
}

table.hw-table tbody tr:nth-child(even) td {
    background: #ffffff;
}

table.hw-table tr.missing-row {
    color: #4a5568;
}

.mark-ok {
    color: #276749;
    font-weight: 700;
}

.mark-no {
    color: #c53030;
    font-weight: 700;
}

.note {
    color: #666;
    font-size: 0.95rem;
    margin: 0.6rem 0 1rem;
}

.platform-list {
    margin: 0.4rem 0 0.8rem 1.2rem;
}

.platform-list li {
    margin: 0.35rem 0;
}

.field textarea.hw-note {
    font-family: inherit;
    min-height: 160px;
    line-height: 1.7;
}

.field-hint {
    color: #5a6775;
    font-size: 0.88rem;
    margin: 0.35rem 0 0;
}

.file-pick {
    display: block;
    margin-top: 0.35rem;
}

.shot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 0.75rem;
}

.shot-card {
    width: 140px;
}

.shot-card img {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: zoom-in;
    display: block;
}

.shot-remove,
.shot-close {
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
}

.shot-remove {
    display: block;
    margin-top: 0.3rem;
    padding: 0.15rem 0.4rem;
    border: none;
    color: #c53030;
    font-size: 0.8rem;
}

.shot-warn {
    margin: 0.25rem 0 0;
    color: #c53030;
    font-size: 0.75rem;
    line-height: 1.4;
}

.shot-dialog {
    border: none;
    border-radius: 12px;
    padding: 0.8rem;
    max-width: 92vw;
}

.shot-dialog::backdrop {
    background: rgba(0, 0, 0, 0.72);
}

.shot-dialog img {
    display: block;
    max-width: 88vw;
    max-height: 80vh;
    margin: 0.4rem auto 0;
}

.shot-close {
    padding: 0.25rem 0.8rem;
}

.exercise-item pre {
    margin: 0.4rem 0 1rem;
    padding: 0.75rem 1rem;
    background: #f7f8fa;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.55;
}

.exercise-item pre code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #1a202c;
}

@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
