.ui {
    font-size: 1rem;
    border: 2px solid var(--theme-main-border);
    line-height: 1rem;
    text-align: center;
    border-radius: 1rem;
    user-select: none;
}
.ui foreignObject {
    position: relative;
}
.ui foreignObject > * {
    position: absolute;
    inset: 0;
}
.ui header {
    font-weight: bold;
    font-size: 80%;
    background-color: #fff2;
    border-radius: 0.5rem 0.5rem 0 0;
}
.ui footer {
    font-size: 70%;
    background-color: #fff2;
    border-radius: 0 0 0.5rem 0.5rem;
}
.ui .helper {
    fill: #8881;
}
.ui [unit] {
    font-style: italic;
}
.ui [unit]::after {
    content: " " attr(unit);
}
.ui .separator {
    stroke: #888;
}
.ui .background {
    stroke: none;
    fill: #4444;
}
.ui .outline {
    stroke: #888;
    fill: none;
}
.ui .slider-shape {
    stroke: #666;
    fill: #0008;
}
.ui .selected .outline {
    stroke: var(--theme-link-color);
}
.ui .selected .background {
    fill: var(--theme-link-background);
    fill-opacity: 0.5;
}
.ui .param,
.ui .handle {
    cursor: pointer;
}
.ui .handle {
    fill: transparent;
}
.ui li:hover {
    background-color: var(--theme-link-background);
}
.ui li[selected] {
    font-weight: bold;
    background-color: var(--theme-link-background);
}
.ui .editor {
    display: grid;
    grid-template-columns: 1fr 4fr 1fr;
    gap: 1rem;
    padding: 0.5rem;
    background-color: #8882;
}
.ui .frame {
    display: grid;
    grid-template-rows: min-content auto;
    border: 1px solid #888;
    border-radius: 1rem;
}
.ui .frame > :last-child {
    background-color: #fff3;
    border-radius: 0 0 1rem 1rem;
    font-size: 80%;
    overflow: hidden auto;
    text-align: left;
}
.ui p {
    padding-left: 0.75rem;
}
.ui ul {
    display: grid;
    list-style: none;
    margin: 0;
    padding: 0.25rem 0 0.25rem 0;
}
.ui li {
    margin: 0;
    padding: 0 0 0 0.75rem;
}
.ui a, .ui li {
    cursor: pointer;
}
.ui .tabs label {
    padding-bottom: 0.25rem;
}
.ui .settings {
    display: grid;
    grid-template-columns: min-content auto;
    grid-template-rows: repeat(3, min-content);
    gap: 0.25rem;
    padding: 0.25rem;
}
.ui .settings a {
    border: 1px solid #888; border-radius: 0.5rem;
    margin-left: 0.5rem;
}
.ui .hidden {
    visibility: hidden;
}
.ui .transparent {
    color: transparent;
}

.ui .ignore {
    pointer-events: none;
}

.ui .disabled {
    pointer-events: none;
}

.ui .disabled,
.ui .disabled + label {
    opacity: 0.5;
}

.ui [type="meter"] {
    stroke: #fff5;
}

.ui .maps [type="meter"] {
    stroke-width: 40;
}

.ui .edit [type="meter"] {
    stroke-width: 10;
}

.ui .clipped {
    transform: scale(1,3);
    --unit: 1;
}
.ui .clipped.show {
    transform: scale(1,1);
    --unit: 3;
}

.ui .clipped [type="modamt"] {
    stroke: #08f8;
    stroke-width: 8;
}

.ui .clipped [type="handle"] {
    stroke: #fff;
    stroke-width: calc(6 * var(--unit));
}

.ui .edit [type="handle"] {
    stroke: #fff;
    stroke-width: 6;
}

.ui .clipped .graph.shape {
    fill: #08f8;
}

.ui .clipped .graph.line {
    stroke: #0ff;
    stroke-width: calc(1.5 * var(--unit));
    fill: none;
}

.ui .clipped .clipping.normal {
    stroke: #024;
    fill: #08f1;
}
.ui .clipped .clipping.min,
.ui .clipped .clipping.max {
    fill: #f002;
}

/* svg.ui {
    border: 2px solid var(--theme-main-border);
    border-radius: 8px;
    background-color: #8881;
    user-select: none;
}

svg.ui header {
    text-align: center;
    font-weight: bold;
}

svg.ui footer {
    text-align: center;
    font-style: italic;
}

svg.ui ul {
    width: 100%;
    height: 100%;
    font-size: 90%;
    margin: 0;
    background-color: #0003;
    border-radius: 0.5em;
}

svg.ui .tabs label {
    border-width: 1px;
    padding-bottom: 0.25em;
}

svg.ui li {
    display: grid;
    padding: 0;
    margin: 0;
    line-height: 125%;
}

svg.ui a {
    cursor: pointer;
    padding: 0 0.25em;
}

svg.ui a:hover {
    background-color: var(--theme-link-background);
}

svg.ui a.current {
    font-weight: bold;
    background-color: var(--theme-link-background);
}

svg.ui foreignObject {
    font-size: 40%;
}

svg.ui foreignObject > * {
    line-height: 100%;
    padding: 0.25em;
}

svg.ui foreignObject.header {
    border-radius: 1em 1em 0 0;
}

svg.ui foreignObject.header > header {
    background-color: var(--theme-heading-background);
}

svg.ui foreignObject.footer {
    border-radius: 0 0 1em 1em;
}

svg.ui foreignObject.footer > footer {
    background-color: var(--theme-heading-background);
}

svg.ui .ignore {
    pointer-events: none;
} */
