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

html,
body {
    height: 100%;
    background: #fff;
    color: #000;
    font-family: Impact, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding: 6px 18px;
    border-bottom: 3px solid #000;
    flex: 0 0 auto;
    white-space: nowrap;
    background: #ffffff;
}
header h1 {
    font-weight: 400;
    font-size: 30px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #000;
    line-height: 1;
}
#clock {
    color: #df2b1c;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    min-width: 22ch;
}
.transport {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

button,
select {
    background: #fff;
    color: #000;
    border: 2px solid #000;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 3px;
}
button:hover:not(:disabled),
select:hover {
    background: #000;
    color: #fff;
}
button:disabled {
    opacity: 0.35;
    cursor: default;
}
button.on {
    background: #df2b1c;
    border-color: #df2b1c;
    color: #fff;
}
button.on:hover {
    background: #fff;
    color: #df2b1c;
}

#audio-error {
    flex: 0 0 auto;
    background: #fdeceb;
    color: #7a1710;
    border-bottom: 1px solid #df2b1c;
    padding: 4px 14px;
    font-size: 12px;
    cursor: pointer;
    white-space: pre-wrap;
}

#timeline {
    flex: 0 0 84px;
    width: 100%;
    height: 84px;
    display: block;
    border-bottom: 3px solid black;
    cursor: crosshair;
    touch-action: none;
    background: #fff;
}

main {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(320px, 55fr) minmax(320px, 45fr);
    min-height: 0;
}

#board {
    position: relative;
    min-width: 0;
    overflow-y: auto;
    overflow-x: auto;
    background: #ffffff;
}
#tiles {
    display: block;
    width: 100%;
    overflow: visible;
}

.card {
    transition:
        transform 450ms ease,
        opacity 200ms ease;
    animation: card-in 0.18s ease-out;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
}
.card.faded {
    opacity: 0.4;
}
.card.leaving {
    opacity: 0;
}
.card-body,
.card-point {
    fill: var(--card-cat);
}
.card-label {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 2px 10px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.05;
    white-space: normal;
    word-break: break-word;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
@keyframes card-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#panel {
    border-left: 3px solid #000;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    background: #ffffff;
}
#tab-code {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

#code-toolbar {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    border-bottom: 3px solid black;
}
#audio,
#open-strudel {
    font-size: 18px;
    padding: 3px 8px;
}

#strudel-mount {
    --background: white;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: white;
    font: monospace;
}
#strudel-mount strudel-editor {
    display: none;
}
#strudel-mount > div {
    height: 100%;
}
#strudel-mount .cm-editor {
    height: 100%;
}
#strudel-mount .cm-scroller {
    font-family: monospace !important;
}
#strudel-mount .cm-cursor {
    display: none;
}
