.avg-context {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    margin: 0.8rem 0 0;
}

.avg-table {
    max-width: 320px;
    margin: 0.9rem auto 0;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.avg-row {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 0.45rem 0.9rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.avg-row:nth-child(odd) {
    background: #f8fafc;
}

.avg-row.avg-total {
    background: #fef3c7;
    border-top: 2px solid #fcd34d;
    color: #92400e;
}

.avg-row.avg-total .avg-label {
    color: #92400e;
}

.avg-total-line {
    max-width: 320px;
    margin: 0.5rem auto 0;
    padding: 0.35rem 0.6rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 10px;
}

.avg-label {
    color: #64748b;
}

.avg-value.missing {
    color: #dc2626;
}

.avg-chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    height: 170px;
    max-width: 360px;
    margin: 1rem auto 0;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid #cbd5e1;
}

.avg-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    height: 100%;
}

.avg-bar-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.25rem;
}

.avg-bar {
    width: 100%;
    max-width: 52px;
    background: #38bdf8;
    border-radius: 8px 8px 0 0;
}

.avg-bar.missing {
    height: 55px;
    background: #f1f5f9;
    border: 2px dashed #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #dc2626;
    border-radius: 8px;
}

.avg-bar-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.35rem;
}

.avg-prompt {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin: 0.9rem 0 0.4rem;
}

.avg-options {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0.8rem 0;
}

.avg-option {
    min-width: 88px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.avg-option:hover {
    transform: scale(1.05);
    border-color: #94a3b8;
}

.avg-option:disabled {
    opacity: 0.7;
}

.avg-input {
    width: 7ch;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    padding: 0.3rem;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    margin: 1rem auto 0.6rem;
    display: block;
}

.avg-input:focus {
    border-color: #16a34a;
    outline: none;
}

.avg-input:disabled {
    opacity: 0.7;
}
