
:root {
    --win-gray: #c0c0c0;
    --win-light: #ffffff;
    --win-highlight: #dfdfdf;
    --win-shadow: #808080;
    --win-dark: #404040;
    --win-blue: #000080;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--win-gray);
    color: #000;
    font-family: "MS Sans Serif", Tahoma, Arial, sans-serif;
    font-size: 12px;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.project-viewer {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 4px;
    background: var(--win-gray);
}

.viewer-gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px;
    background: var(--win-gray);
}

.viewer-image-area {
    position: relative;
    height: clamp(260px, 52vh, 600px);
    overflow: hidden;
    background: #fff;
    border: 2px solid;
    border-color: var(--win-shadow) var(--win-light) var(--win-light) var(--win-shadow);
    box-shadow: inset 1px 1px var(--win-dark);
}

.viewer-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 16px;
    background: #fff;
}

.viewer-slide[hidden] {
    display: none !important;
}

.viewer-slide img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.viewer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 8px 12px;
    background: var(--win-gray);
    border-bottom: 1px solid var(--win-shadow);
}

.viewer-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 2px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    border-radius: 0;
    box-shadow: inset 1px 1px var(--win-highlight);
    background: var(--win-gray);
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 11px;
    line-height: 1;
}

.viewer-controls button:active:not(:disabled) {
    border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
    box-shadow: inset 1px 1px var(--win-shadow);
    padding-top: 2px;
    padding-left: 2px;
}

.viewer-controls button:focus-visible {
    outline: 1px dotted #000;
    outline-offset: -5px;
}

.viewer-controls button:disabled {
    color: var(--win-shadow);
    text-shadow: 1px 1px var(--win-light);
    cursor: default;
}

.viewer-counter {
    min-width: 82px;
    padding: 5px 9px;
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-shadow) var(--win-light) var(--win-light) var(--win-shadow);
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
}

.viewer-information {
    flex: 1;
    min-width: 0;
    margin: 8px 4px 4px;
    padding: 16px 18px 22px;
    background: #fff;
    border: 2px solid;
    border-color: var(--win-shadow) var(--win-light) var(--win-light) var(--win-shadow);
    box-shadow: inset 1px 1px var(--win-dark);
}

.project-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #c0c0c0;
}

.project-heading h1 {
    margin: 0;
    color: #000;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 17px;
    font-weight: bold;
    line-height: 1.3;
}

.project-year {
    flex-shrink: 0;
    padding: 3px 7px;
    background: #efefef;
    border: 1px solid #c0c0c0;
    color: #404040;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
}

.project-description {
    max-width: 680px;
    color: #000;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.project-description p {
    margin: 0 0 12px;
}

.project-description h2,
.project-description h3 {
    margin: 18px 0 8px;
    font-family: inherit;
    font-size: 13px;
}

.project-description a {
    color: var(--win-blue);
    text-decoration: underline;
}

.project-description a:hover {
    color: #0000ee;
}

.project-description img {
    display: none;
}

.viewer-footer {
    display: none;
}

@media (max-width: 700px) {
    .project-viewer {
        padding: 2px;
    }

    .viewer-gallery {
        padding: 3px;
    }

    .viewer-image-area {
        height: 43dvh;
        min-height: 220px;
    }

    .viewer-slide {
        padding: 8px;
    }

    .viewer-controls {
        min-height: 52px;
        gap: 16px;
        padding: 9px 6px;
    }

    .viewer-controls button {
        width: 42px;
        height: 34px;
    }

    .viewer-information {
        margin: 6px 3px 3px;
        padding: 14px 12px 20px;
    }

    .project-heading {
        flex-direction: column;
        gap: 7px;
        align-items: flex-start;
    }

    .project-heading h1 {
        font-size: 16px;
    }

    .project-description {
        font-size: 12px;
        line-height: 1.7;
    }
}
