* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6f8;
    color: #222;
    line-height: 1.6;
}

header {
    background: #005596;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

header p {
    margin-top: 0.25rem;
}

main,
.breadcrumb,
.building-nav {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.building-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1rem 0;
}

.building-nav a {
    display: inline-block;
    padding: 0.55rem 0.9rem;
    background: white;
    border: 1px solid #c8cdd2;
    border-radius: 999px;
    color: #005596;
    text-decoration: none;
    font-weight: 600;
}

.building-nav a:hover,
.building-nav a:focus-visible {
    background: #eaf4fa;
    border-color: #005596;
}

.building-list {
    padding: 1rem;
}

.building-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 1rem;
}

.building-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 1rem;
    padding-bottom: 0.5rem;

    border-bottom: 3px solid #005596;
}

.building-header h2 {
    margin: 0;
    color: #222;
    font-size: 1.5rem;
}

.room-grid,
.card-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.room-card {
    display: block;
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.room-card:hover,
.room-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.room-card h2,
.room-card h3 {
    margin-bottom: 0.25rem;
    color: #005596;
}

.room-card p {
    margin: 0;
    color: #555;
}

main:not(.building-list) {
    padding: 1rem;
}

.guide {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.guide h2 {
    margin-top: 1.5rem;
}

.guide h2:first-child {
    margin-top: 0;
}

.back-button {
    display: inline-block;
    background: #005596;
    color: white;
    padding: 0.8rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
}

.back-button:hover,
.back-button:focus-visible {
    background: #003d6d;
}

details {
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    font-weight: bold;
    list-style: none;
    user-select: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "+";
    float: right;
    font-size: 1.3rem;
}

details[open] summary::after {
    content: "–";
}

details > *:not(summary) {
    padding: 0 1.25rem 1.25rem;
}

.breadcrumb {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0 1rem;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #005596;
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
    text-decoration: underline;
}

.breadcrumb span {
    color: #666;
    margin: 0 0.3rem;
}

.guide-image {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto;
    margin: 1rem auto;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.guide-image + ol,
.guide-image + ul,
.guide-image + p {
    margin-top: 1rem;
}

a:focus-visible,
summary:focus-visible {
    outline: 3px solid #f4b400;
    outline-offset: 3px;
}

.back-to-top {
    text-decoration: none;
    color: #777;
    font-size: 0.9rem;
    font-weight: 600;

    transition: color .2s, opacity .2s;
}

.back-to-top:hover {
    color: #005596;
    opacity: 1;
    text-decoration: underline;
}

@media (min-width: 700px) {
    .room-grid,
    .card-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    header {
        padding: 2rem 1.5rem;
    }
}