html, body, header, img, span, div, aside, main, button {
    box-sizing: border-box;
}

@font-face {
    font-family: "Asphaltic Grain";
        src: url("https://cyn-crucified.neocities.org/Fonts/ASPHALTICGRAINCONDENSEDPERSONAL.woff2") format("woff2"),
            url("https://cyn-crucified.neocities.org/Fonts/ASPHALTICGRAINCONDENSEDPERSONAL.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

h1, h2 {
    font-weight: normal;
}

h1 {
    font-family: "Asphaltic Grain", sans-serif;
    font-size: 36px;
}

body {
    margin: 0;
    background: #ffffff;
    color: #111111;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
}

body.dark-mode {
    background: #000000;
    color: #ffffff;
}

.site-header {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    min-height: 78px;
    padding: 10px;
    border-bottom: 3px solid #000000;
    background: #000000;
    color: #ffffff;
}

.site-logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.site-logo-button {
    display: block;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}

.site-logo-button:hover,
.site-logo-button:active {
    border: none;
    background: transparent;
    box-shadow: none;
}

.site-logo-button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.site-title {
    color: #ffffff;
    font-family: "Asphaltic Grain", sans-serif;
    font-size: 46px;
    line-height: 1;
    font-weight: normal;
}

.page-layout {
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    min-height: calc(100vh - 78px);
    margin: 0;
    border-right: 1px solid #111111;
    border-left: 1px solid #111111;
    background: #ffffff;
}

.button-sidebar {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    border-right: 1px solid #111111;
    background: #e6e6e6;
}

.floating-buttons {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    width: 152px;
    gap: 8px;
    margin-top: 24px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
}

.floating-buttons button {
    width: 72px;
    height: 72px;
    padding: 2px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.floating-buttons button:hover {
    border-color: #111111;
    background: #eeeeee;
}

.floating-buttons button:active {
    background: #eeeeee;
}

.floating-buttons img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.floating-buttons button:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

#chattable {
    position: fixed;
    z-index: 1000;
    right: 20px;
    bottom: 20px;
    display: block;
    width: min(360px, calc(100vw - 40px));
    height: min(500px, calc(100vh - 40px));
    border: 0;
}

#chattable.is-hidden {
    display: none;
}

.floating-panel {
    position: fixed;
    z-index: 1000;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    width: min(320px, calc(100vw - 32px));
    border: 2px solid #111111;
    background: #ffffff;
    box-shadow: none;
}

.floating-panel.is-minimized .floating-panel-content {
    display: none;
}

.floating-panel-header {
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 12px;
    border-bottom: 2px solid #111111;
    background: #000000;
    color: #ffffff;
    user-select: none;
}

.floating-panel-toggle {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #ffffff;
    background: #000000;
    color: #ffffff;
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.floating-panel-toggle:hover,
.floating-panel-toggle:focus-visible {
    background: #333333;
}

.floating-panel-content {
    min-height: 160px;
    background: #ffffff;
}

.page-main {
    grid-column: 2;
    min-width: 0;
    padding: 28px 32px;
    background: #ffffff;
}

.page-main h1 {
    margin: 0 0 18px;
    padding: 0 0 10px;
    border-bottom: 1px solid #111111;
    color: #000000;
}

.page-main p {
    margin: 0;
    line-height: 1.6;
}

.site-test-button {
    margin-top: 20px;
    padding: 10px 14px;
    border: 1px solid #111111;
    background: #eeeeee;
    color: #111111;
    font: inherit;
    cursor: pointer;
}

.site-test-button:hover,
.site-test-button:active {
    background: #dddddd;
}

.site-test-button:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 3px;
}

body.dark-mode .page-layout {
    border-right-color: #ffffff;
    border-left-color: #ffffff;
    background: #111111;
}

body.dark-mode .button-sidebar {
    border-right-color: #ffffff;
    background: #252525;
}

body.dark-mode .floating-buttons button:hover,
body.dark-mode .floating-buttons button:active {
    border-color: #ffffff;
    background: #333333;
}

body.dark-mode .floating-buttons button:focus-visible {
    outline-color: #ffffff;
}

body.dark-mode .floating-panel {
    border-color: #ffffff;
    background: #111111;
    box-shadow: none;
}

body.dark-mode .floating-panel-header {
    border-bottom-color: #ffffff;
    background: #000000;
}

body.dark-mode .floating-panel-content {
    background: #111111;
}

body.dark-mode .page-main {
    background: #111111;
}

body.dark-mode .page-main h1 {
    border-bottom-color: #ffffff;
    color: #ffffff;
}

body.dark-mode .site-test-button {
    border-color: #ffffff;
    background: #252525;
    color: #ffffff;
}

body.dark-mode .site-test-button:hover,
body.dark-mode .site-test-button:active {
    background: #333333;
}

body.dark-mode .site-test-button:focus-visible {
    outline-color: #ffffff;
}

@media (max-width: 340px) {
    .floating-buttons {
        width: 108px;
        gap: 4px;
    }

    .floating-buttons button {
        width: 52px;
        height: 52px;
        padding: 1px;
    }

}

@media (max-width: 480px) {
    .page-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
    }

    .button-sidebar {
        grid-column: 1;
        grid-row: 1;
        min-height: 168px;
        padding: 12px;
        align-items: center;
        border-right: 0;
        border-bottom: 1px solid #111111;
    }

    .floating-buttons {
        max-height: none;
    }

    .page-main {
        grid-row: 2;
        padding: 24px 20px;
    }

    #chattable {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        height: min(500px, calc(100vh - 24px));
    }

    .floating-panel {
        right: 12px;
        bottom: 12px;
        width: min(320px, calc(100vw - 24px));
    }
}

@media (max-width: 480px) {
    body.dark-mode .button-sidebar {
        border-right: 0;
        border-bottom-color: #ffffff;
    }
}