html {
    font-size: 16pt;
}

body {
    font-family: 'Open Sans', 'Helvetica Neue', helvetica, trebuchet, sans-serif;
    padding: 24px;
    overflow-x: hidden;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
}

dt {
    font-weight: 600;
}

dd {
    margin-bottom: 0.75rem;
}

label {
    display: inline-block;
    margin-right: 1rem;
    font-size: 0.8rem;
}

button {
    font-family: inherit;
    font-size: 0.8rem;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #bbb;
    background: transparent;
    color: inherit;
}

button:hover {
    border-color: #555;
}

button.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

#canvas-wrapper {
    position: relative;
}

#preview-canvas {
    display: block;
    cursor: default;
    max-width: 100%;
    height: auto;
}

.guide-ctrl {
    position: absolute;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 3px 6px;
    font-size: 11px;
    font-family: 'Open Sans', sans-serif;
    border-radius: 4px;
    user-select: none;
    line-height: 1.7;
    pointer-events: auto;
    transform: translate(-50%, -100%);
}

.guide-ctrl label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    white-space: nowrap;
    margin: 0;
}

.guide-ctrl input[type=checkbox] {
    cursor: pointer;
    margin: 0;
}

#result-overlay {
    position: fixed;
    inset: 0;
    background: #111;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

#result-overlay .nav {
    flex: 0 0 auto;
    padding: 12px 16px;
    color: #fff;
    font-family: sans-serif;
    font-size: 14px;
}

#result-overlay .nav a { color: #fff; }

:root {
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    a {
        color: #7ab4f5;
    }

    button {
        border-color: #555;
    }

    button:hover {
        border-color: #aaa;
    }

    button.active {
        background: #ddd;
        color: #111;
        border-color: #ddd;
    }
}
