.aq3d {
    --aq-bg: #eef2ef;
    --aq-panel: #f7f4e9;
    --aq-line: #5e7080;
    --aq-rule: #cad5d1;
    --aq-text: #171a1b;
    --aq-muted: #5e7080;
    --aq-blue: #cf3e45;
    --aq-blue-dark: #a92f35;
    --aq-green: #738b67;
    --aq-sand: #bd8b3c;
    --aq-highlight: #ffffff;
    --aq-soft: #eef2ef;
    position: relative;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-rows: minmax(0, 1fr) 100px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: min(860px, calc(100vh - 24px));
    min-height: 680px;
    overflow: hidden;
    border: 1px solid var(--aq-line);
    border-radius: 8px;
    background: var(--aq-bg);
    color: var(--aq-text);
    box-shadow:
        inset 1px 1px 0 var(--aq-highlight),
        inset -1px -1px 0 var(--aq-line),
        0 0 0 1px var(--aq-rule);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aq3d *,
.aq3d *::before,
.aq3d *::after {
    box-sizing: border-box;
}

.aq3d__viewport {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    background: linear-gradient(180deg, #eef2ef 0%, #fbfcfa 58%, #f7f4e9 100%);
}

.aq3d__viewport canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.aq3d__loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--aq-muted);
    font-size: 14px;
}


.aq3d__placement-notice {
    position: absolute;
    left: 50%;
    top: 18px;
    z-index: 3;
    max-width: min(420px, calc(100% - 36px));
    padding: 9px 12px;
    border: 1px solid #bd8b3c;
    border-radius: 6px;
    background: rgba(247, 244, 233, 0.96);
    color: #171a1b;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #bd8b3c;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity 150ms ease, transform 150ms ease;
}

.aq3d__placement-notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.aq3d__used {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: grid;
    gap: 6px;
    max-width: 720px;
    padding: 8px;
    border: 1px solid var(--aq-line);
    border-radius: 8px;
    background: rgba(247, 244, 233, 0.94);
    box-shadow: inset 1px 1px 0 var(--aq-highlight), inset -1px -1px 0 var(--aq-rule);
    color: var(--aq-text);
    pointer-events: auto;
}

.aq3d__used-title {
    color: var(--aq-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.aq3d__used-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 64px;
    overflow: auto;
}

.aq3d__used-item {
    min-height: 28px;
    max-width: 160px;
    padding: 0 9px;
    border: 1px solid var(--aq-line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--aq-text);
    box-shadow: inset 1px 1px 0 var(--aq-highlight), inset -1px -1px 0 var(--aq-rule);
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aq3d__used-item.is-active {
    border-color: var(--aq-blue);
    background: #f7f4e9;
    box-shadow: inset 3px 0 0 var(--aq-blue);
}

.aq3d__mobile-dock-nav,
.aq3d__mobile-quick-add {
    display: none;
}

.aq3d__material-drag-ghost {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 68px;
    height: 56px;
    padding: 3px;
    border: 2px solid var(--aq-blue, #cf3e45);
    border-radius: 6px;
    background: rgba(247, 244, 233, 0.94);
    box-shadow: 0 5px 12px rgba(23, 26, 27, 0.28);
    pointer-events: none;
}

.aq3d__material-drag-ghost img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.aq3d__panel {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    align-content: start;
    gap: 7px;
    min-height: 0;
    padding: 9px;
    overflow: hidden;
    border-left: 1px solid var(--aq-line);
    background: var(--aq-panel);
    box-shadow: inset 1px 0 0 var(--aq-highlight);
}

.aq3d__group {
    display: grid;
    gap: 5px;
}

.aq3d__group--tank {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 8px;
}

.aq3d__group--selection {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 8px;
}

.aq3d__group--tank > .aq3d__label,
.aq3d__group--tank > .aq3d__actions,
.aq3d__group--tank > .aq3d__presetgrid,
.aq3d__group--tank > .aq3d__check,
.aq3d__group--tank > .aq3d__color-field,
.aq3d__group--selection > .aq3d__color-field,
.aq3d__group--selection > .aq3d__actions,
.aq3d__group--selection > .aq3d__selected-preview {
    grid-column: 1 / -1;
}

.aq3d__group--selection > .aq3d__field--wide {
    grid-column: span 2;
}

.aq3d__materials {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 6px 10px;
    overflow: hidden;
    border-top: 1px solid var(--aq-line);
    background: var(--aq-panel);
    box-shadow: inset 0 1px 0 var(--aq-highlight);
}

.aq3d__snapshot-button {
    min-width: 118px;
    white-space: nowrap;
}

.aq3d__goby-warning {
    position: absolute;
    z-index: 7;
    top: 50px;
    left: 50%;
    width: min(520px, calc(100% - 36px));
    transform: translateX(-50%);
    padding: 9px 12px;
    border: 1px solid #9d312d;
    border-left: 6px solid #b73b36;
    border-radius: 3px;
    background: rgba(247, 244, 233, 0.97);
    box-shadow: 2px 2px 0 rgba(51, 59, 61, 0.24);
    color: #53201e;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    text-align: left;
}

.aq3d__label,
.aq3d__field span {
    color: var(--aq-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.aq3d__presetgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.aq3d__palette {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    overflow: hidden;
}

.aq3d__palette-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.aq3d__palette-tab {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
}

.aq3d__lighting button {
    min-height: 30px;
    padding: 3px 4px;
    line-height: 1.25;
}

.aq3d__lighting {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aq3d__label--sub {
    margin-top: 4px;
}

.aq3d__backscreen button {
    min-height: 30px;
    padding: 3px 4px;
}

.aq3d__palette-tab.is-active {
    border-color: var(--aq-blue-dark);
    background: var(--aq-blue);
    color: #ffffff;
    box-shadow: inset 1px 1px 0 var(--aq-blue-dark);
}

.aq3d__palette-section {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.aq3d__palette-title {
    color: var(--aq-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.aq3d__palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
    gap: 6px;
}

.aq3d__material {
    position: relative;
    display: grid;
    grid-template-rows: 38px auto;
    gap: 2px;
    min-height: 62px;
    padding: 4px;
}


.aq3d__material:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.aq3d__material.is-active {
    border-width: 2px;
    border-color: var(--aq-blue);
    padding: 4px;
    background: #f7f4e9;
    box-shadow: 0 0 0 1px var(--aq-blue-dark);
}

.aq3d__material.is-active::after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--aq-blue);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(23, 26, 27, 0.28);
}

.aq3d__material.is-active span {
    color: var(--aq-blue-dark);
}

.aq3d__selected-preview {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 5px 7px;
    border: 1px solid var(--aq-line);
    border-left: 4px solid var(--aq-blue);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: inset 1px 1px 0 var(--aq-highlight), inset -1px -1px 0 var(--aq-rule);
}

.aq3d__selected-preview.is-empty {
    grid-template-columns: 1fr;
}

.aq3d__selected-preview img {
    display: block;
    width: 80px;
    height: 50px;
    border: 1px solid var(--aq-rule);
    border-radius: 4px;
    background: var(--aq-soft);
    object-fit: contain;
}

.aq3d__selected-preview img[hidden] {
    display: none;
}

.aq3d__selected-preview-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.aq3d__selected-preview-copy span {
    color: var(--aq-muted);
    font-size: 11px;
    font-weight: 700;
}

.aq3d__selected-preview-copy strong {
    color: var(--aq-blue-dark);
    font-size: 17px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.aq3d__ui-toggle {
    position: absolute;
    z-index: 8;
    top: 10px;
    right: 10px;
    min-width: 86px;
    min-height: 30px;
    padding: 0 12px;
    background: var(--aq-panel);
}

.aq3d__mobile-controls {
    display: none;
}

.aq3d.is-ui-hidden {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.aq3d.is-ui-hidden .aq3d__viewport {
    grid-column: 1;
    grid-row: 1;
}

.aq3d.is-ui-hidden .aq3d__panel,
.aq3d.is-ui-hidden .aq3d__materials,
.aq3d.is-ui-hidden .aq3d__used {
    display: none;
}

.aq3d.is-ui-hidden .aq3d__ui-toggle {
    right: 10px;
}

.aq3d__material img {
    display: block;
    width: 100%;
    height: 38px;
    border-radius: 4px;
    background: #eef2ef;
    object-fit: contain;
}

.aq3d__material span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.aq3d button {
    min-height: 34px;
    border: 1px solid var(--aq-line);
    border-radius: 6px;
    background: #eef2ef;
    color: var(--aq-text);
    box-shadow: inset 1px 1px 0 var(--aq-highlight), inset -1px -1px 0 var(--aq-rule);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.aq3d button:hover,
.aq3d button:focus-visible {
    border-color: var(--aq-blue);
    outline: 1px solid var(--aq-blue-dark);
    outline-offset: 1px;
}

.aq3d__presetgrid button.is-active,
.aq3d__lighting button.is-active {
    border-color: var(--aq-blue-dark);
    background: var(--aq-blue);
    color: #ffffff;
    box-shadow: inset 1px 1px 0 var(--aq-blue-dark);
}

.aq3d__field {
    display: grid;
    gap: 2px;
}

.aq3d__panel button {
    min-height: 28px;
    font-size: 12px;
}

.aq3d__field output {
    color: var(--aq-text);
    font-variant-numeric: tabular-nums;
}

.aq3d input[type="range"] {
    width: 100%;
    accent-color: var(--aq-blue);
}

.aq3d__check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--aq-text);
    font-size: 13px;
    font-weight: 700;
}

.aq3d__check input {
    width: 18px;
    height: 18px;
    accent-color: var(--aq-blue);
}

.aq3d__color-field {
    grid-template-columns: 1fr minmax(120px, 1.4fr);
    align-items: center;
}

.aq3d__color-field span {
    line-height: 1;
}

.aq3d select {
    width: 100%;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--aq-line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--aq-text);
    box-shadow: inset 1px 1px 0 var(--aq-rule), inset -1px -1px 0 var(--aq-highlight);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.aq3d__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.aq3d__actions--single {
    grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
    .aq3d {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .aq3d__viewport {
        position: sticky;
        z-index: 5;
        top: 0;
        grid-column: 1;
        grid-row: auto;
        height: clamp(320px, 52vh, 500px);
        min-height: 320px;
        overflow: hidden;
        border-bottom: 1px solid var(--aq-line);
    }

    .aq3d__panel {
        grid-column: 1;
        grid-row: auto;
        max-width: 100%;
        border-left: 0;
        border-top: 1px solid var(--aq-line);
        overflow: visible;
    }

    .aq3d__ui-toggle {
        right: 10px;
        min-width: 96px;
        min-height: 44px;
    }

    .aq3d__materials {
        grid-column: 1;
        grid-row: auto;
        grid-template-columns: 1fr;
        max-width: 100%;
        overflow: visible;
    }

    .aq3d__snapshot-button {
        width: 100%;
    }

    .aq3d__palette {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .aq3d__palette-section {
        grid-template-columns: 1fr;
    }

    .aq3d__label,
    .aq3d__field span {
        font-size: 14px;
    }

    .aq3d button,
    .aq3d__panel button,
    .aq3d__palette-tab,
    .aq3d__lighting button,
    .aq3d__used-item {
        min-height: 44px;
        font-size: 14px;
    }

    .aq3d select {
        height: 44px;
        min-width: 0;
        font-size: 14px;
    }

    .aq3d input[type="range"] {
        min-height: 34px;
    }

    .aq3d__check {
        min-height: 44px;
        font-size: 14px;
    }

    .aq3d__check input {
        width: 22px;
        height: 22px;
    }

    .aq3d__used {
        left: 7px;
        right: 7px;
        bottom: 7px;
        padding: 6px;
    }

    .aq3d__used-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .aq3d__used-item {
        flex: 0 0 auto;
    }

    .aq3d__palette-tab {
        padding: 4px 8px;
    }

    .aq3d__material {
        grid-template-rows: 48px auto;
        min-height: 78px;
    }

    .aq3d__material img {
        height: 48px;
    }

    .aq3d__material span,
    .aq3d__palette-title,
    .aq3d__used-title,
    .aq3d__selected-preview-copy span {
        font-size: 13px;
    }

    .aq3d.is-ui-hidden {
        height: min(76vh, 720px);
        min-height: 440px;
        overflow: hidden;
    }

    .aq3d.is-ui-hidden .aq3d__viewport {
        position: relative;
        top: auto;
        height: 100%;
        min-height: 0;
    }
}

@media (max-width: 600px) {
    .aq3d {
        overflow-x: clip;
    }

    .aq3d__viewport {
        height: clamp(280px, 42vh, 350px);
        min-height: 280px;
    }

    .aq3d__viewport canvas {
        touch-action: none;
    }

    .aq3d.is-material-drop-ready .aq3d__viewport {
        box-shadow: inset 0 0 0 4px var(--aq-blue);
    }

    .aq3d__used {
        gap: 4px;
        padding: 5px;
    }

    .aq3d__used-title {
        display: none;
    }

    .aq3d__mobile-dock-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .aq3d__mobile-dock-nav button {
        min-height: 30px;
        padding: 3px 7px;
        font-size: 12px;
    }

    .aq3d__mobile-dock-nav button.is-active {
        border-color: var(--aq-blue-dark);
        background: var(--aq-blue);
        color: #ffffff;
        box-shadow: inset 1px 1px 0 var(--aq-blue-dark);
    }

    .aq3d__mobile-quick-add {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 5px;
        min-width: 0;
    }

    .aq3d__mobile-quick-add select {
        width: 92px;
        height: 54px;
        padding: 0 5px;
        font-size: 12px;
        font-weight: 700;
    }

    .aq3d__mobile-quick-list {
        display: flex;
        gap: 5px;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    .aq3d__quick-material {
        display: grid;
        flex: 0 0 68px;
        grid-template-rows: 34px 15px;
        min-width: 68px;
        min-height: 54px;
        padding: 2px 3px;
        border: 1px solid var(--aq-line);
        border-radius: 6px;
        background: #ffffff;
        color: var(--aq-text);
        touch-action: pan-x;
    }

    .aq3d__quick-material.is-active {
        border: 2px solid var(--aq-blue);
        padding: 1px 2px;
        background: #f7f4e9;
    }

    .aq3d__quick-material img {
        width: 100%;
        height: 34px;
        object-fit: contain;
    }

    .aq3d__quick-material span {
        overflow: hidden;
        font-size: 10px;
        font-weight: 700;
        line-height: 15px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .aq3d__used.is-mobile-add .aq3d__used-list,
    .aq3d__used.is-mobile-used .aq3d__mobile-quick-add {
        display: none;
    }

    .aq3d__used.is-mobile-used .aq3d__used-list {
        display: flex;
        min-height: 44px;
        align-items: center;
    }

    .aq3d__mobile-controls {
        position: sticky;
        z-index: 6;
        top: clamp(280px, 42vh, 350px);
        display: grid;
        grid-column: 1;
        gap: 6px;
        padding: 7px;
        border-top: 1px solid var(--aq-line);
        border-bottom: 1px solid var(--aq-line);
        background: var(--aq-panel);
        box-shadow: 0 2px 5px rgba(34, 48, 46, 0.18);
    }

    .aq3d__mobile-modes,
    .aq3d__mobile-nudge,
    .aq3d__mobile-views,
    .aq3d__mobile-edit-guide {
        display: grid;
        gap: 6px;
    }

    .aq3d__mobile-modes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aq3d__mobile-nudge {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .aq3d__mobile-views {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .aq3d__mobile-controls [hidden] {
        display: none;
    }

    .aq3d__mobile-modes button.is-active {
        border-color: var(--aq-blue-dark);
        background: var(--aq-blue);
        color: #ffffff;
        box-shadow: inset 1px 1px 0 var(--aq-blue-dark);
    }

    .aq3d__mobile-nudge button {
        display: grid;
        grid-template-rows: auto auto;
        place-items: center;
        gap: 2px;
        min-height: 52px;
        padding: 4px 2px;
        font-size: 20px;
        line-height: 1;
        touch-action: none;
        user-select: none;
    }

    .aq3d__mobile-nudge button.is-holding {
        border-color: var(--aq-blue-dark);
        background: var(--aq-blue);
        color: #ffffff;
        box-shadow: inset 1px 1px 0 var(--aq-blue-dark);
    }

    .aq3d__mobile-nudge button small {
        font-size: 11px;
        font-weight: 700;
        line-height: 1.1;
    }

    .aq3d__mobile-edit-guide {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        padding: 6px 8px;
        border: 1px solid var(--aq-line);
        border-radius: 6px;
        background: #ffffff;
        color: var(--aq-muted);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.35;
    }

    .aq3d__mobile-edit-guide button {
        min-height: 36px;
        padding: 4px 10px;
        white-space: nowrap;
        background: var(--aq-blue);
        color: #ffffff;
    }

    .aq3d__group--selection.is-guided {
        animation: aq3d-guide-pulse 1.4s ease;
    }

    @keyframes aq3d-guide-pulse {
        0%, 100% {
            box-shadow: none;
        }

        20%, 70% {
            box-shadow: inset 0 0 0 3px var(--aq-blue);
        }
    }

    .aq3d__panel,
    .aq3d__materials {
        padding: 8px;
    }

    .aq3d__group--tank,
    .aq3d__group--selection {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 10px;
        row-gap: 8px;
    }

    .aq3d__group--selection > .aq3d__field--wide {
        grid-column: 1 / -1;
    }

    .aq3d__palette-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .aq3d__palette-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .aq3d__selected-preview {
        grid-template-columns: 92px minmax(0, 1fr);
        min-height: 76px;
    }

    .aq3d__selected-preview img {
        width: 92px;
        height: 58px;
    }

    .aq3d__ui-toggle {
        top: 8px;
        right: 8px;
    }

    .aq3d.is-ui-hidden {
        height: min(72vh, 620px);
        min-height: 360px;
    }

    .aq3d.is-ui-hidden .aq3d__mobile-controls {
        display: none;
    }
}

/* Classic desktop application chrome, circa 2004. */
.aq3d {
    border-width: 2px;
    border-radius: 0;
    box-shadow:
        inset 1px 1px 0 var(--aq-highlight),
        inset -1px -1px 0 var(--aq-line),
        2px 2px 0 rgba(23, 26, 27, 0.24);
    font-family: Tahoma, "MS UI Gothic", "Meiryo UI", sans-serif;
    letter-spacing: 0;
}

.aq3d__viewport {
    border: 2px solid var(--aq-line);
    border-color: var(--aq-line) var(--aq-highlight) var(--aq-highlight) var(--aq-line);
}

.aq3d__panel,
.aq3d__materials,
.aq3d__mobile-controls {
    box-shadow:
        inset 1px 1px 0 var(--aq-highlight),
        inset -1px -1px 0 var(--aq-rule);
}

.aq3d__group + .aq3d__group {
    margin-top: 1px;
    padding-top: 7px;
    border-top: 1px solid var(--aq-rule);
    box-shadow: inset 0 1px 0 var(--aq-highlight);
}

.aq3d__label {
    display: flex;
    min-height: 21px;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid var(--aq-line);
    border-color: var(--aq-highlight) var(--aq-line) var(--aq-line) var(--aq-highlight);
    border-radius: 0;
    background: var(--aq-soft);
    box-shadow: inset 1px 1px 0 var(--aq-highlight);
    color: var(--aq-text);
    text-shadow: 1px 1px 0 var(--aq-highlight);
}

.aq3d button,
.aq3d__used-item,
.aq3d__quick-material {
    border-width: 2px;
    border-color: var(--aq-highlight) var(--aq-line) var(--aq-line) var(--aq-highlight);
    border-radius: 1px;
    box-shadow: none;
    text-shadow: 1px 1px 0 var(--aq-highlight);
}

.aq3d button:active,
.aq3d button.is-holding,
.aq3d__presetgrid button.is-active,
.aq3d__lighting button.is-active,
.aq3d__palette-tab.is-active,
.aq3d__mobile-modes button.is-active,
.aq3d__mobile-dock-nav button.is-active {
    border-color: var(--aq-blue-dark) var(--aq-highlight) var(--aq-highlight) var(--aq-blue-dark);
    box-shadow: inset 1px 1px 0 var(--aq-blue-dark);
    text-shadow: none;
}

.aq3d button:hover {
    border-color: var(--aq-blue) var(--aq-blue-dark) var(--aq-blue-dark) var(--aq-blue);
}

.aq3d button:focus-visible {
    outline: 1px dotted var(--aq-text);
    outline-offset: -5px;
}

.aq3d [data-action="show-detail-controls"] {
    text-shadow: none;
}

.aq3d select {
    border-width: 2px;
    border-color: var(--aq-line) var(--aq-highlight) var(--aq-highlight) var(--aq-line);
    border-radius: 0;
    box-shadow: inset 1px 1px 0 var(--aq-rule);
}

.aq3d__used,
.aq3d__placement-notice,
.aq3d__selected-preview,
.aq3d__mobile-edit-guide,
.aq3d__material-drag-ghost {
    border-width: 2px;
    border-color: var(--aq-line) var(--aq-highlight) var(--aq-highlight) var(--aq-line);
    border-radius: 0;
    box-shadow: inset 1px 1px 0 var(--aq-rule);
}

.aq3d__used-item.is-active,
.aq3d__quick-material.is-active {
    border-color: var(--aq-blue-dark) var(--aq-blue) var(--aq-blue) var(--aq-blue-dark);
    box-shadow: inset 2px 0 0 var(--aq-blue);
}

.aq3d__material {
    border-radius: 1px;
}

.aq3d__material.is-active {
    border-color: var(--aq-blue-dark) var(--aq-blue) var(--aq-blue) var(--aq-blue-dark);
    box-shadow: inset 1px 1px 0 var(--aq-blue-dark);
}

.aq3d__material.is-active::after {
    width: 18px;
    height: 18px;
    border-width: 1px;
    border-radius: 0;
    box-shadow: 1px 1px 0 var(--aq-blue-dark);
    font-size: 12px;
}

.aq3d__material img,
.aq3d__selected-preview img {
    border: 1px solid var(--aq-line);
    border-color: var(--aq-line) var(--aq-highlight) var(--aq-highlight) var(--aq-line);
    border-radius: 0;
    box-shadow: inset 1px 1px 0 var(--aq-rule);
}

.aq3d__goby-warning {
    border-radius: 0;
    box-shadow: 2px 2px 0 rgba(51, 59, 61, 0.24);
}

.aq3d input[type="range"] {
    height: 20px;
    appearance: none;
    background: transparent;
}

.aq3d input[type="range"]::-webkit-slider-runnable-track {
    height: 5px;
    border: 1px solid var(--aq-line);
    border-color: var(--aq-line) var(--aq-highlight) var(--aq-highlight) var(--aq-line);
    border-radius: 0;
    background: var(--aq-rule);
    box-shadow: inset 1px 1px 0 var(--aq-line);
}

.aq3d input[type="range"]::-webkit-slider-thumb {
    width: 15px;
    height: 19px;
    margin-top: -8px;
    appearance: none;
    border: 2px solid var(--aq-line);
    border-color: var(--aq-highlight) var(--aq-line) var(--aq-line) var(--aq-highlight);
    border-radius: 0;
    background: var(--aq-blue);
    box-shadow: inset 1px 1px 0 var(--aq-highlight);
}

.aq3d input[type="range"]::-moz-range-track {
    height: 3px;
    border: 1px solid var(--aq-line);
    border-radius: 0;
    background: var(--aq-rule);
}

.aq3d input[type="range"]::-moz-range-thumb {
    width: 13px;
    height: 17px;
    border: 2px solid var(--aq-line);
    border-radius: 0;
    background: var(--aq-blue);
}

.aq3d input[type="checkbox"] {
    border-radius: 0;
}

.aq3d ::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

.aq3d ::-webkit-scrollbar-track {
    border: 1px solid var(--aq-line);
    background: var(--aq-panel);
}

.aq3d ::-webkit-scrollbar-thumb {
    border: 2px solid var(--aq-panel);
    border-color: var(--aq-highlight) var(--aq-line) var(--aq-line) var(--aq-highlight);
    border-radius: 0;
    background: var(--aq-soft);
}

@media (min-width: 1101px) {
    .aq3d__palette-grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(60px, 1fr);
        overflow-x: auto;
        overflow-y: hidden;
    }
}
