:root {
    --gr-text: #172028;
    --gr-muted: #64707b;
    --gr-line: rgba(52, 66, 78, 0.16);
    --gr-panel: rgba(237, 241, 244, 0.82);
    --gr-panel-strong: rgba(248, 250, 252, 0.92);
    --gr-accent: #4f6f65;
    --gr-accent-soft: rgba(79, 111, 101, 0.16);
    --gr-shadow: 0 22px 60px rgba(27, 36, 43, 0.16);
}

body {
    background: #cfd5da;
}

#v3d-container {
    background:
        radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.96) 0%, rgba(235, 239, 242, 0.9) 31%, rgba(196, 204, 211, 0.92) 72%, rgba(166, 177, 185, 0.96) 100%),
        linear-gradient(135deg, #e8ecef 0%, #b8c1c8 100%);
}

#v3d-container::before,
#v3d-container::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#v3d-container::before {
    opacity: 0.25;
    background-image:
        linear-gradient(rgba(72, 87, 98, 0.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(72, 87, 98, 0.11) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 74%);
    -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 74%);
}

#v3d-container::after {
    background:
        linear-gradient(118deg, transparent 0 63%, rgba(255, 255, 255, 0.17) 63.2% 63.6%, transparent 63.8%),
        radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.72), transparent 21%);
}

#v3d-container canvas {
    position: relative;
    z-index: 1;
}

#installAnimationPanel {
    display: none !important;
}

.gr-configurator,
.gr-configurator * {
    box-sizing: border-box;
}

.gr-configurator {
    position: absolute;
    inset: 0;
    z-index: 30;
    pointer-events: none;
    color: var(--gr-text);
    font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.gr-brand {
    position: absolute;
    top: 28px;
    left: 32px;
    width: 340px;
    padding-left: 16px;
    border-left: 3px solid var(--gr-accent);
}

.gr-brand__eyebrow {
    margin-bottom: 6px;
    color: var(--gr-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.24em;
}

.gr-brand h1 {
    margin: 0;
    font-size: clamp(23px, 2vw, 34px);
    font-weight: 850;
    letter-spacing: 0.04em;
}

.gr-brand p {
    margin: 8px 0 0;
    color: var(--gr-muted);
    font-size: 13px;
    letter-spacing: 0.08em;
}

.gr-current-spec {
    display: inline-flex;
    margin-top: 10px;
    padding: 5px 9px;
    border: 1px solid rgba(79, 111, 101, 0.22);
    border-radius: 999px;
    background: rgba(244, 248, 247, 0.66);
    color: #38564c;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gr-panel {
    position: absolute;
    top: 168px;
    left: 30px;
    width: min(342px, calc(100vw - 150px));
    max-height: calc(100vh - 198px);
    overflow: auto;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    background: linear-gradient(145deg, var(--gr-panel-strong), var(--gr-panel));
    box-shadow: var(--gr-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    pointer-events: auto;
    scrollbar-width: thin;
}

.gr-panel[hidden] {
    display: none;
}

.gr-panel__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.gr-panel__heading h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 850;
}

.gr-panel__heading p {
    margin: 4px 0 0;
    color: var(--gr-muted);
    font-size: 11px;
    line-height: 1.55;
}

.gr-status-dot {
    width: 9px;
    height: 9px;
    margin-top: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #56a581;
    box-shadow: 0 0 0 5px rgba(86, 165, 129, 0.12), 0 0 14px rgba(86, 165, 129, 0.55);
}

.gr-section-title {
    margin: 18px 0 9px;
    color: #52606b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

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

.gr-part-card,
.gr-clamp-card,
.gr-color-card,
.gr-action,
.gr-nav-button {
    border: 0;
    font: inherit;
}

.gr-part-card,
.gr-clamp-card {
    position: relative;
    min-height: 126px;
    padding: 9px;
    border: 1px solid rgba(80, 96, 108, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.56);
    color: var(--gr-text);
    text-align: left;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.gr-part-card:hover,
.gr-clamp-card:not(:disabled):hover {
    transform: translateY(-2px);
    border-color: rgba(79, 111, 101, 0.46);
    box-shadow: 0 12px 24px rgba(39, 54, 62, 0.12);
}

.gr-part-card.is-active,
.gr-clamp-card.is-active {
    border-color: rgba(79, 111, 101, 0.72);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(214, 226, 221, 0.82));
    box-shadow: inset 0 0 0 1px rgba(79, 111, 101, 0.14), 0 10px 22px rgba(51, 77, 68, 0.11);
}

.gr-part-card__thumb,
.gr-clamp-card__thumb {
    display: grid;
    width: 100%;
    height: 72px;
    margin-bottom: 8px;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.94), rgba(204, 213, 219, 0.7)),
        repeating-linear-gradient(90deg, transparent 0 14px, rgba(67, 82, 93, 0.06) 14px 15px);
}

.gr-part-card__thumb svg,
.gr-clamp-card__thumb svg {
    width: 88%;
    height: 88%;
    color: #3f5059;
}

.gr-part-card strong,
.gr-clamp-card strong {
    display: block;
    font-size: 13px;
    line-height: 1.25;
}

.gr-part-card small,
.gr-clamp-card small {
    display: block;
    margin-top: 3px;
    color: var(--gr-muted);
    font-size: 10px;
}

.gr-card-state {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #aeb7bd;
    box-shadow: 0 0 0 4px rgba(174, 183, 189, 0.14);
}

.gr-part-card.is-active .gr-card-state {
    background: #58a982;
    box-shadow: 0 0 0 4px rgba(88, 169, 130, 0.16), 0 0 12px rgba(88, 169, 130, 0.55);
}

.gr-clamp-card:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.gr-detail-options {
    margin-top: 12px;
    padding: 11px;
    border: 1px solid rgba(79, 111, 101, 0.18);
    border-radius: 13px;
    background: rgba(244, 248, 247, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.gr-detail-options[hidden] {
    display: none;
}

.gr-detail-options__title {
    margin-bottom: 8px;
    color: #52606b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

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

.gr-option-button {
    display: inline-flex;
    min-height: 37px;
    padding: 0 10px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(75, 91, 102, 0.17);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    color: #34414a;
    font: inherit;
    font-size: 11px;
    font-weight: 780;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.gr-option-button:hover,
.gr-option-button.is-active {
    border-color: rgba(79, 111, 101, 0.68);
    background: rgba(231, 239, 236, 0.94);
}

.gr-option-button.is-active {
    box-shadow: inset 0 0 0 1px rgba(79, 111, 101, 0.12);
}

.gr-option-swatch {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border: 1px solid rgba(34, 46, 51, 0.18);
    border-radius: 50%;
    background: var(--option-color);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.gr-inline-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.gr-inline-actions--single .gr-action {
    width: 100%;
}

.gr-action {
    min-height: 38px;
    padding: 0 14px;
    flex: 1;
    border: 1px solid rgba(75, 91, 102, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.64);
    color: #34414a;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    transition: all 160ms ease;
}

.gr-action:hover {
    border-color: rgba(79, 111, 101, 0.56);
    background: rgba(255, 255, 255, 0.92);
}

.gr-action:disabled {
    opacity: 0.72;
    cursor: wait;
}

.gr-action--primary {
    border-color: transparent;
    background: linear-gradient(135deg, #617c73, #334d45);
    color: #fff;
    box-shadow: 0 10px 20px rgba(45, 72, 63, 0.2);
}

.gr-color-grid {
    display: grid;
    gap: 10px;
}

.gr-color-card {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    min-height: 58px;
    padding: 9px 12px;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(80, 96, 108, 0.14);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--gr-text);
    text-align: left;
    cursor: pointer;
}

.gr-color-card.is-active {
    border-color: rgba(79, 111, 101, 0.72);
    box-shadow: inset 0 0 0 1px rgba(79, 111, 101, 0.13);
}

.gr-color-swatch {
    width: 34px;
    height: 34px;
    border: 2px solid rgba(255, 255, 255, 0.84);
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: 0 3px 10px rgba(31, 42, 49, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.gr-color-card strong {
    font-size: 13px;
}

.gr-color-card small {
    color: var(--gr-muted);
    font-size: 10px;
}

.gr-color-check {
    color: var(--gr-accent);
    font-size: 17px;
    opacity: 0;
}

.gr-color-card.is-active .gr-color-check {
    opacity: 1;
}

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

.gr-size-card {
    position: relative;
    min-height: 124px;
    padding: 9px;
    border: 1px solid rgba(80, 96, 108, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.56);
    color: var(--gr-text);
    text-align: left;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.gr-size-card:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 111, 101, 0.46);
    box-shadow: 0 12px 24px rgba(39, 54, 62, 0.12);
}

.gr-size-card.is-active {
    border-color: rgba(79, 111, 101, 0.72);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(214, 226, 221, 0.84));
    box-shadow: inset 0 0 0 1px rgba(79, 111, 101, 0.14), 0 10px 22px rgba(51, 77, 68, 0.11);
}

.gr-size-card__thumb {
    display: grid;
    height: 70px;
    margin-bottom: 7px;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.94), rgba(204, 213, 219, 0.7)),
        repeating-linear-gradient(90deg, transparent 0 14px, rgba(67, 82, 93, 0.06) 14px 15px);
}

.gr-size-card__thumb svg {
    width: 94%;
    height: 94%;
    color: #3f5059;
}

.gr-size-card strong,
.gr-size-card small {
    display: block;
}

.gr-size-card strong {
    font-size: 13px;
}

.gr-size-card small {
    margin-top: 2px;
    color: var(--gr-muted);
    font-size: 10px;
}

.gr-size-check {
    position: absolute;
    right: 10px;
    bottom: 10px;
    color: var(--gr-accent);
    font-size: 15px;
    opacity: 0;
}

.gr-size-card.is-active .gr-size-check {
    opacity: 1;
}

.gr-empty {
    display: grid;
    min-height: 240px;
    padding: 24px;
    place-items: center;
    border: 1px dashed rgba(75, 91, 102, 0.28);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.34);
    text-align: center;
}

.gr-empty__icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 18px;
    background: rgba(79, 111, 101, 0.11);
    color: var(--gr-accent);
    font-size: 28px;
}

.gr-empty strong {
    display: block;
    font-size: 15px;
}

.gr-empty p {
    max-width: 220px;
    margin: 7px auto 0;
    color: var(--gr-muted);
    font-size: 11px;
    line-height: 1.65;
}

.gr-range-wrap {
    padding: 14px;
    border: 1px solid rgba(80, 96, 108, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
}

.gr-range-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 11px;
    font-size: 11px;
    font-weight: 750;
}

.gr-range-value {
    color: var(--gr-accent);
}

.gr-range {
    width: 100%;
    height: 8px;
    margin: 4px 0;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 999px;
    outline: none;
    background: linear-gradient(90deg, var(--gr-accent) 0 var(--progress), rgba(82, 97, 108, 0.16) var(--progress) 100%);
    cursor: pointer;
}

.gr-range::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    appearance: none;
    -webkit-appearance: none;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--gr-accent);
    box-shadow: 0 5px 14px rgba(36, 57, 50, 0.32);
}

.gr-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--gr-accent);
    box-shadow: 0 5px 14px rgba(36, 57, 50, 0.32);
}

.gr-range-caption {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--gr-muted);
    font-size: 10px;
}

.gr-nav {
    position: absolute;
    top: 50%;
    right: 24px;
    display: grid;
    gap: 9px;
    transform: translateY(-50%);
    pointer-events: auto;
}

.gr-nav::before {
    content: "";
    position: absolute;
    top: 34px;
    bottom: 34px;
    left: 29px;
    z-index: -1;
    border-left: 1px dashed rgba(61, 76, 87, 0.22);
}

.gr-nav-button {
    display: grid;
    grid-template-columns: 58px 90px;
    min-height: 58px;
    padding: 0;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: #42505a;
    cursor: pointer;
    transition: all 170ms ease;
}

.gr-nav-button__icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 14px;
    background: rgba(235, 239, 242, 0.77);
    box-shadow: 0 10px 24px rgba(38, 49, 57, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 24px;
}

.gr-nav-button__label {
    padding-left: 12px;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
}

.gr-nav-button:hover .gr-nav-button__icon,
.gr-nav-button.is-active .gr-nav-button__icon {
    border-color: rgba(79, 111, 101, 0.58);
    background: rgba(248, 251, 250, 0.94);
    color: var(--gr-accent);
    transform: translateX(-2px);
}

.gr-nav-button.is-active .gr-nav-button__label {
    color: #22352f;
}

.gr-toast {
    position: absolute;
    bottom: 24px;
    left: 50%;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(28, 38, 43, 0.78);
    color: #fff;
    box-shadow: 0 12px 30px rgba(20, 28, 32, 0.25);
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
    font-size: 12px;
}

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

@media (max-width: 980px) {
    .gr-brand {
        top: 18px;
        left: 18px;
    }

    .gr-panel {
        top: 132px;
        left: 16px;
        width: 300px;
        max-height: calc(100vh - 154px);
    }

    .gr-nav {
        right: 12px;
    }

    .gr-nav-button {
        grid-template-columns: 52px;
    }

    .gr-nav-button__icon {
        width: 52px;
        height: 52px;
    }

    .gr-nav-button__label {
        display: none;
    }

    .gr-nav::before {
        left: 26px;
    }
}

@media (max-width: 680px) {
    .gr-brand {
        width: calc(100% - 92px);
    }

    .gr-brand__eyebrow,
    .gr-brand p {
        display: none;
    }

    .gr-brand h1 {
        font-size: 20px;
    }

    .gr-current-spec {
        margin-top: 7px;
        padding: 4px 7px;
        font-size: 9px;
    }

    .gr-panel {
        top: auto;
        right: 8px;
        bottom: 8px;
        left: 8px;
        width: auto;
        max-height: 26dvh;
        padding: 10px;
        border-radius: 14px;
        box-shadow: 0 16px 38px rgba(27, 36, 43, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    .gr-nav {
        top: 104px;
        right: 8px;
        grid-template-columns: repeat(5, 40px);
        gap: 7px;
        transform: none;
    }

    .gr-nav::before {
        display: none;
    }

    .gr-nav-button,
    .gr-nav-button__icon {
        width: 40px;
        min-height: 40px;
        height: 40px;
    }

    .gr-nav-button__icon {
        border-radius: 12px;
        font-size: 17px;
    }

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

    .gr-panel__heading {
        margin-bottom: 8px;
    }

    .gr-panel__heading h2 {
        font-size: 15px;
    }

    .gr-panel__heading p {
        display: none;
    }

    .gr-status-dot {
        width: 7px;
        height: 7px;
        margin-top: 5px;
        box-shadow: 0 0 0 4px rgba(86, 165, 129, 0.12);
    }

    .gr-part-card,
    .gr-clamp-card {
        min-height: 82px;
        padding: 6px;
        border-radius: 11px;
    }

    .gr-part-card__thumb,
    .gr-clamp-card__thumb {
        height: 40px;
        margin-bottom: 5px;
        border-radius: 8px;
    }

    .gr-part-card strong,
    .gr-clamp-card strong {
        font-size: 10px;
    }

    .gr-part-card small,
    .gr-clamp-card small {
        font-size: 8px;
    }

    .gr-card-state {
        top: 10px;
        right: 10px;
        width: 6px;
        height: 6px;
    }

    .gr-size-card {
        min-height: 80px;
        padding: 6px;
        border-radius: 11px;
    }

    .gr-size-card__thumb {
        height: 40px;
        margin-bottom: 5px;
        border-radius: 8px;
    }

    .gr-size-card strong {
        font-size: 10px;
    }

    .gr-color-grid {
        gap: 7px;
    }

    .gr-color-card {
        grid-template-columns: 30px 1fr auto;
        min-height: 46px;
        padding: 7px 9px;
        gap: 8px;
    }

    .gr-color-swatch {
        width: 27px;
        height: 27px;
    }

    .gr-inline-actions {
        margin-top: 8px;
        gap: 6px;
    }

    .gr-action {
        min-height: 31px;
        padding: 0 8px;
        font-size: 9px;
    }

    .gr-section-title {
        margin: 11px 0 6px;
        font-size: 9px;
    }

    .gr-detail-options {
        margin-top: 9px;
        padding: 9px;
    }

    .gr-detail-options__title {
        margin-bottom: 6px;
    }

    .gr-option-button {
        min-height: 33px;
    }

    .gr-panel--explode {
        top: auto;
        right: 8px;
        bottom: 8px;
        left: 8px;
        width: auto;
        max-height: 24dvh;
        padding: 11px 12px;
        border-radius: 15px;
    }

    .gr-panel--explode .gr-panel__heading {
        margin-bottom: 8px;
    }

    .gr-panel--explode .gr-panel__heading h2 {
        font-size: 16px;
    }

    .gr-panel--explode .gr-panel__heading p {
        display: none;
    }

    .gr-panel--explode .gr-range-wrap {
        padding: 9px 10px;
        border-radius: 11px;
    }

    .gr-panel--explode .gr-range-labels {
        margin-bottom: 7px;
    }

    .gr-panel--explode .gr-range-caption {
        margin-top: 5px;
        font-size: 9px;
    }

    .gr-panel--explode .gr-section-title {
        margin: 9px 0 6px;
        font-size: 9px;
    }

    .gr-panel--explode .gr-inline-actions {
        margin-top: 0;
        gap: 7px;
    }

    .gr-panel--explode .gr-action {
        min-height: 32px;
        padding: 0 9px;
        border-radius: 9px;
        font-size: 11px;
    }

    .gr-panel--explode .gr-range::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }

    .gr-panel--explode .gr-range::-moz-range-thumb {
        width: 14px;
        height: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gr-configurator * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
