body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
}

a:visited {
    color: LinkText;
}

header {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #ddd;
}

header h1 {
    margin: 0;
}

.layout {
    display: flex;
    min-height: calc(100vh - 3rem);
}

.sidebar {
    width: 180px;
    flex-shrink: 0;
    border-right: 1px solid #ddd;
    padding: 0;
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar li {
    padding: 0;
}

.sidebar a,
.sidebar strong {
    display: block;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
}

.sidebar li:not(:has(strong)):hover {
    background: #eee;
}

.sidebar li:has(strong) {
    background: #ddd;
}

main {
    flex: 1;
    padding: 1rem;
}

main > :first-child {
    margin-top: 0;
}

nav.nav-mobile {
    display: none;
}

.fb-mobile {
    display: none;
}

@media (max-width: 900px) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar {
        display: none;
    }

    nav.nav-mobile {
        display: block;
    }
}

@media (max-width: 600px) {
    header {
        border-bottom: none;
        padding: 0.5rem;
    }

    header h1 {
        font-size: 1.3rem;
    }

    main {
        padding: 0.5rem;
    }

    .fb-desktop {
        display: none;
    }

    .fb-mobile {
        display: block;
    }

    .fb-card {
        margin-bottom: 1rem;
        border-collapse: separate;
        border-spacing: 0;
        border: 2px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
        table-layout: fixed;
    }

    .fb-card thead th {
        text-align: left;
    }

    .fb-card td {
        border-bottom: none;
    }

    .fb-card td:first-child {
        font-weight: 600;
        white-space: nowrap;
        width: 6rem;
    }

    .fb-card .fb-comment {
        width: 100%;
        box-sizing: border-box;
    }
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
}

th {
    background: #ddd;
    font-weight: 600;
    text-align: left;
    padding: 0.5rem;
}

td {
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fb-status {
    text-align: right;
}

select,
button,
input {
    font-size: inherit;
}
