:root {
    color-scheme: dark;
    --page-background: #181818;
    --text: #e0e0e0;
    --heading: #ffffff;
    --muted: #888888;
    --link: #9a9a9a;
    --border: #343434;
}
html {
    min-height: 100%;
    touch-action: manipulation;
}
body,
body * {
    touch-action: manipulation;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background-color: var(--page-background);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    padding-bottom: 72px;
    box-sizing: border-box;
    overflow-x: hidden;
}
a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s ease;
}
.sidebar {
    position: sticky; top: 0; width: 240px; flex-shrink: 0;
    height: calc(100vh - 72px); overflow-y: auto; box-sizing: border-box;
    padding: calc(20px + var(--toolbar-height, 28.8px) + 16px) 12px 24px; border-right: 1px solid var(--border);
    background: var(--page-background);
}
.sidebar-title { position: absolute; top: 20px; left: 20px; margin: 0; color: var(--heading); font-size: 1.2rem; font-weight: 500; line-height: 1.5; }
.workspace { flex: 1; min-width: 0; padding: 20px 24px; }
.about-page {
    display: none;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 64px 20px 20px;
    box-sizing: border-box;
    flex: 1;
}
body.about-active .sidebar,
body.about-active .workspace {
    display: none;
}
body.about-active .about-page {
    display: block;
}
.about-page h1 {
    margin: 0 0 24px;
    color: var(--heading);
    font-size: 2rem;
}
.about-page h2 {
    margin: 40px 0 16px;
    color: var(--heading);
    font-size: 2rem;
}
.about-page p {
    line-height: 1.7;
}
.about-page a {
    color: var(--link);
}
.utility-nav {
    display: flex;
    align-items: center;
    margin: 0 0 8px -11px;
}
.icon-button {
    display: inline-flex;
    position: relative;
    width: 40px;
    height: 40px;
    padding: 11px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.about-page .icon-button {
    color: var(--text);
}
.icon-button:hover {
    background: none;
    color: var(--heading);
    text-decoration: none;
}
.icon-button::after {
    content: '';
    position: absolute;
    right: 14px;
    bottom: 10px;
    left: 14px;
    height: 1px;
    background-color: currentColor;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.icon-button:hover::after {
    opacity: 0.6;
}
.icon-button:focus-visible {
    outline: 2px solid var(--heading);
    outline-offset: 2px;
}
.icon-button svg {
    display: block;
    width: 100%;
    height: 100%;
}
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; padding: 0 8px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; flex: 1; min-width: 0; overflow: hidden; font-size: 1.2rem; line-height: 1.5; white-space: nowrap; }
.breadcrumbs button { min-width: 0; overflow: hidden; border: 0; padding: 0; background: none; color: var(--link); font: inherit; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.crumb-current { min-width: 0; overflow: hidden; color: var(--heading); text-overflow: ellipsis; white-space: nowrap; }
.crumb-sep { flex-shrink: 0; color: var(--muted); }
.crumb-parent { display: none; flex-shrink: 0; color: var(--muted); }
.breadcrumbs.compact button { flex-shrink: 0; font-size: 0; }
.breadcrumbs.compact button::after { content: '...'; font-size: 1.2rem; line-height: 1.5; }
.breadcrumbs.minimal button, .breadcrumbs.minimal .crumb-sep { display: none; }
.breadcrumbs.minimal .crumb-parent { display: inline; }
.breadcrumbs.bare button, .breadcrumbs.bare .crumb-sep, .breadcrumbs.bare .crumb-parent { display: none; }
.folder-name, .content-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 36px; box-sizing: border-box; padding: 7px 8px; border: 0; background: none; color: var(--text); text-align: left; font: inherit; font-size: .9rem; line-height: 22px; cursor: pointer; }
.folder-label { overflow-wrap: anywhere; }
.folder-name.active { color: var(--heading); font-weight: 500; }

.content-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.folder-name:hover .folder-label, .content-row:hover .row-label, .breadcrumbs button:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-label { min-width: 0; overflow-wrap: anywhere; }
.file-row, .folder-row, .folder-name { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; }
.file-row:hover { text-decoration: none; }
.folder-icon { display: block; width: 14px; height: 16px; color: var(--muted); }
.file-icon { display: block; width: 12px; height: 16px; color: var(--muted); }
.empty-state { padding: 16px 12px; color: var(--muted); }
button:focus-visible, .content-row:focus-visible { outline: 2px solid var(--heading); outline-offset: 2px; }
@media (max-width: 1366px) {
    .sidebar { display: none; }
}
.site-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding: 20px 24px 24px;
    background-color: var(--page-background);
    font-size: 0.85rem;
    color: var(--muted);
    box-sizing: border-box;
    flex-shrink: 0;
}
.footer-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-content a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-content a:hover {
    color: var(--heading);
    text-decoration: underline;
}
a:hover {
    color: var(--heading);
    text-decoration: underline;
}
@media (max-width: 760px) {
    body {
        flex-direction: column;
        padding-bottom: 0;
    }
    .workspace {
        width: 100%;
        padding: 16px;
        box-sizing: border-box;
    }
    .folder-name,
    .content-row {
        min-height: 44px;
        font-size: 1rem;
    }
    .site-footer {
        position: static;
        width: 100%;
        margin-top: auto;
    }
}
@media (max-width: 640px) {
    .about-page {
        padding: 32px 20px 20px;
    }
    .site-footer {
        padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
        font-size: 1rem;
        text-align: center;
    }
    .footer-content {
        justify-content: center;
        gap: 8px 20px;
    }
    .footer-content a {
        padding: 8px 0;
        line-height: 24px;
    }
}
.copy-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--link);
    font: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}
.copy-button:hover {
    color: var(--heading);
    text-decoration: underline;
}
.copy-button:focus-visible {
    outline: 2px solid var(--heading);
    outline-offset: 3px;
}
.copy-status {
    margin-left: 8px;
    color: var(--muted);
    font-size: 0.85em;
}
@media (hover: none), (pointer: coarse) {
    a:hover,
    a:active,
    .footer-content a:hover,
    .copy-button:hover,
    .copy-button:active,
    .folder-name:hover .folder-label,
    .folder-name:active .folder-label,
    .content-row:hover .row-label,
    .content-row:active .row-label,
    .breadcrumbs button:hover,
    .breadcrumbs button:active {
        text-decoration: none;
    }
    .icon-button:hover::after,
    .icon-button:active::after {
        opacity: 0;
    }
}
