/* Preserve the existing layout while correcting form and content regressions. */
#navigation a,
#navigation a:active,
#navigation a:visited {
    padding-left: 50px;
}
#main a,
#main a:active,
#main a:visited {
    padding-left: 0;
}
#navi li.active {
    margin-bottom: 10px;
}
#main a:hover,
#main a:active {
    color: #fff;
}
.contact-form {
    margin-top: 12px;
    width: 330px;
    max-width: 100%;
}
.contact-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
}
.contact-form label {
    float: none;
    padding: 0;
}
.contact-row label {
    flex: 0 0 70px;
}
.contact-row input {
    box-sizing: border-box;
    width: 220px;
    min-width: 0;
    max-width: calc(100% - 75px);
    margin-bottom: 0;
}
.contact-message {
    margin-top: 14px;
}
.contact-message label {
    width: auto;
    margin-bottom: 5px;
}
.contact-message textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    resize: vertical;
}
.contact-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.reference-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 129px));
    gap: 2px;
    max-width: 100%;
    margin-top: 20px;
}
.reference-grid img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid #666;
}
/* Single images remain visible even when animation cannot start. */
#headimg img:first-child {
    opacity: 1;
}
