
.Alltitle {
    display: flex;
    justify-content: center;
    pointer-events: auto
}

.title {
    padding: 0 30px;
    cursor: pointer
}

.title p {
    font-size: 16px
}

.icon {
    position: absolute;
    right: 0;
    display: flex;
    gap: 10px;
    pointer-events: auto
}

.iconimg {
    height: 26px;
    width: auto
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px
}

.hamburger-menu span {
    width: 24px;
    height: 3px;
    background: #33465a;
    border-radius: 2px;
    transition: .25s ease
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px)
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-4px, -4px)
}

#main-content {
    height: calc(100vh - 150px);
    display: flex;
    overflow: hidden
}

#three-container {
    flex: 1;
    background: #fff;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: inset -8px 0 16px #00000014
}

canvas {
    display: block
}

#collision-warning {
    display: none;
    z-index: 50;
    background: #fff2f2f2;
    border: 1px solid #f0b3b3;
    color: #b30000;
    border-radius: 10px;
    font-size: 14px;
    padding: 10px 14px;
    text-align: center
}

#control-panel {
    width: 480px;
    min-width: 360px;
    height: 100%;
    background: var(--panel);
    /*border-left: 1px solid #dbe3ee;*/
    box-shadow: -5px 0 10px #0000000d;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 2
}

.panel-section {
    margin-bottom: 24px
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px
}

.section-title-with-subtitle {
    display: flex;
    align-items: baseline;
    gap: 8px
}

.section-subtitle {
    order: 2;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted)
}

.price-section {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line)
}

.price-label {
    color: var(--muted);
    font-size: 14px
}

.price-value {
    margin-top: 6px;
    font-size: 30px;
    font-weight: 700
}

.board-shape-select, #control-panel input[type=number], #control-panel select {
    width: 100%;
    border: 1px solid #d6dfeb;
    border-radius: 8px;
    min-height: 36px;
    padding: 10px 14px;
    background: #fff;
    font-size: 15px
}

.slider-container {
    display: block;
    margin-bottom: 10px
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px
}

.slider-value {
    font-weight: 700
}

.custom-slider {
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 4px;
    background: #e4e9f0
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary)
}

.quick-input-row {
    display: grid;
    grid-template-columns:34px 1fr 34px;
    gap: 8px;
    margin-bottom: 12px
}

.quick-input-row button {
    border: 1px solid #d6dfeb;
    border-radius: 8px;
    background: #f7f9fc
}

.compact-row {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 10px
}

.compact-field {
    font-size: 12px;
    color: var(--muted);
    display: grid;
    gap: 6px
}

.color-grid {
    display: grid;
    grid-template-columns:repeat(auto-fit, 36px);
    justify-content: start;
    gap: 10px
}

.leg-grid {
    grid-template-columns:repeat(auto-fit, 36px);
    max-width: none;
    justify-content: start
}

.color-btn, .leg-color-btn {
    width: 40px;
    height: 40px;
    aspect-ratio: 1;
    border: 2px solid #d9e1ec;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    background-size: cover;
    background-position: center
}

.color-btn.active, .leg-color-btn.active {
    border-color: var(--primary);
    border-width: 3px
}

.color-elegant-walnut {
    background-image: url(https://phanes.com.tw/wp-content/uploads/2026/02/胡桃木.jpg)
}

.color-european-walnut {
    background-image: url(https://phanes.com.tw/wp-content/uploads/2026/02/原橡木.jpg)
}

.color-snow-white-teak {
    background-image: url(https://phanes.com.tw/wp-content/uploads/2026/02/白柚木.jpg)
}

.color-nordic-white-oak {
    background-image: url(https://phanes.com.tw/wp-content/uploads/2026/02/林肯胡桃.jpg)
}

.color-tobacco-oak {
    background-image: url(https://phanes.com.tw/wp-content/uploads/2026/02/鄉村胡桃.jpg)
}

.color-carbon {
    background-image: url(https://phanes.com.tw/wp-content/uploads/2026/02/北歐雪衫.jpg)
}

.color-black {
    background: #000
}

.color-white {
    background: #fff
}

.leg-color-black {
    background: #2c2c2c
}

.leg-color-gray {
    background: #9e9e9e
}

.leg-color-white {
    background: #fff
}

.accessory-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 12px
}

.accessory-btn {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafbfd;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px
}

.accessory-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center
}

.accessory-image img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.accessory-label {
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    line-height: 1.25
}

.accessory-select {
    width: 100%;
    border: 1px solid #d6dfeb;
    border-radius: 6px;
    min-height: 34px;
    padding: 6px 8px
}

.socket-position-group, .open-trunk-position-group, .cup-holder-position-group, .computer-hanging-position-group {
    width: 100%;
    display: flex;
    justify-content: center;
    /*gap: 6px;*/
    flex-wrap:wrap;
}

.pegboard-position-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.pegboard-position-row {
    display: flex;
    gap: 6px
}

.socket-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 12px;
    background: #f3f6fa
}

.socket-checkbox {
    margin: 0;
    accent-color: var(--primary)
}

.socket-checkbox-text {
    -webkit-user-select: none;
    user-select: none
}

.action-buttons {
    display: grid;
    gap: 8px
}

.action-buttons button {
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #f7f9fc;
    min-height: 38px;
    cursor: pointer
}

#footer {
    width: 100%;
    height: 50px;
    background: #455f79;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px
}

.disabled-label {
    opacity: .55;
    pointer-events: none
}

#loading-screen, #ar-loading-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999
}

#loading-screen {
    background: #fff
}

#ar-loading-overlay {
    background: #ffffffeb;
    display: none
}

.spinner, .ar-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #d4d9df;
    border-top-color: #1f2d3d;
    border-radius: 50%;
    animation: spin 1s linear infinite
}

.spinner {
    margin-bottom: 16px
}

.ar-spinner {
    margin: 0 auto 16px
}

.loading-text, .ar-loading-message {
    font-size: 20px;
    color: #2f3f50
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@media (max-width: 980px) {
    #header {
        height: 70px;
        padding: 0 18px;
        justify-content: center
    }

    .logo {
        height: 52px
    }

    .hamburger-menu {
        display: flex;
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 45
    }

    .menu-content {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100vw;
        height: 100dvh;
        background: #fff;
        z-index: 40;
        flex-direction: column;
        gap: 24px;
        padding-top: 90px;
        transform: none;
        pointer-events: auto
    }

    .menu-content.active {
        display: flex
    }

    .menu-top-logo {
        display: flex;
        width: 100%;
        justify-content: center;
        pointer-events: auto
    }

    .menu-top-logo-img {
        height: 56px;
        width: auto
    }

    .Alltitle {
        width: 100%;
        flex: 1;
        flex-direction: column;
        justify-content: center
    }

    .title {
        width: 100%;
        text-align: center;
        padding: 14px;
        border-bottom: 1px solid #edf1f6
    }

    .iconimg {
        height: 36px
    }

    .icon {
        position: static;
        right: auto;
        width: 100%;
        justify-content: center;
        gap: 14px;
        margin-top: auto;
        padding-bottom: 24px
    }

    #main-content {
        height: calc(100vh - 110px);
        flex-direction: column
    }

    #three-container {
        height: 42%
    }

    #control-panel {
        width: 100%;
        min-width: 0;
        height: 58%;
        padding: 14px
    }

    .accessory-grid {
        grid-template-columns:1fr 1fr;
        gap: 8px
    }

    .color-btn, .leg-color-btn {
        width: 44px;
        height: 44px
    }

    .color-grid, .leg-grid {
        grid-template-columns:repeat(auto-fit, 44px)
    }

    #footer {
        height: 40px;
        font-size: 11px
    }
}
