.gd-designer {
    --gd-bg: #FAFBFC;
    --gd-surface: #FFFFFF;
    --gd-surface-muted: #F4F7FA;
    --gd-ink: #2D3748;
    --gd-text: #4A5568;
    --gd-muted: #64748B;
    --gd-border: #E2E8F0;
    --gd-border-strong: #CBD5E1;
    --gd-accent: #5F7590;
    --gd-accent-hover: #4D6178;
    --gd-accent-soft: #EEF2F7;
    --gd-stage: #EEF1F5;
    --gd-danger: #C0392B;
    --gd-success: #1E874B;
    --gd-warning: #9A5B00;
    --gd-warning-soft: #FFF6E5;
    --gd-shadow: 0 8px 32px rgba(45, 55, 72, 0.08);
    --gd-radius: 12px;
    --gd-radius-sm: 8px;
    --gd-focus: 0 0 0 3px rgba(95, 117, 144, 0.28);
    --gd-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    width: 100%;
    box-sizing: border-box;
    color: var(--gd-text);
    font-family: var(--gd-font);
    font-size: 15px;
    line-height: 1.45;
    background: var(--gd-bg);
    border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius);
    box-shadow: var(--gd-shadow);
    overflow: hidden;
    position: relative;
}

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

.gd-designer [hidden] {
    display: none !important;
}

.gd-designer button,
.gd-designer input,
.gd-designer select,
.gd-designer textarea {
    font: inherit;
    color: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.gd-designer button {
    cursor: pointer;
}

.gd-designer button:focus-visible,
.gd-designer input:focus-visible,
.gd-designer textarea:focus-visible {
    outline: none;
    box-shadow: var(--gd-focus);
}

.gd-shell {
    display: grid;
    grid-template-columns: 74px minmax(240px, 280px) minmax(0, 1fr) minmax(290px, 340px);
    min-height: 680px;
}

/* ---------------- Left Rail & Drawer ---------------- */

.gd-rail {
    background: #1E293B;
    color: rgba(255, 255, 255, 0.72);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 8px;
}

.gd-rail-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 4px;
    border: 0;
    border-radius: var(--gd-radius-sm);
    background: transparent;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background .18s, color .18s;
}

.gd-rail-tab svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gd-rail-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.gd-rail-tab.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.gd-drawer {
    background: var(--gd-surface);
    border-right: 1px solid var(--gd-border);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
    max-height: 760px;
}

.gd-drawer-pane {
    padding: 16px;
}

.gd-drawer-head {
    margin-bottom: 14px;
}

.gd-drawer-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gd-ink);
    line-height: 1.25;
}

.gd-drawer-sub {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: var(--gd-muted);
}

.gd-drawer-note {
    margin: 12px 0 0;
    font-size: 0.83rem;
    line-height: 1.45;
    color: var(--gd-muted);
}

.gd-upload-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 14px;
    border: 1.5px dashed var(--gd-border-strong);
    border-radius: var(--gd-radius);
    background: var(--gd-surface-muted);
    color: var(--gd-ink);
    text-align: center;
    transition: border-color .18s, background .18s;
}

.gd-upload-box:hover {
    border-color: var(--gd-accent);
    background: var(--gd-accent-soft);
}

.gd-upload-box svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: var(--gd-accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gd-upload-box strong {
    font-size: 0.92rem;
}

.gd-upload-box span {
    font-size: 0.8rem;
    color: var(--gd-muted);
}

.gd-add-text-btn {
    width: 100%;
}

/* ---------------- Stage ---------------- */

.gd-stage {
    background: var(--gd-stage);
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px 20px 14px;
    position: relative;
}

.gd-stage-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.gd-stage-heading {
    min-width: 0;
}

.gd-glass-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.25;
    color: var(--gd-ink);
    font-weight: 700;
}

.gd-area-size {
    display: block;
    font-size: 0.82rem;
    color: var(--gd-muted);
}

.gd-stage-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gd-icon-button {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--gd-border);
    border-radius: 999px;
    background: var(--gd-surface);
    color: var(--gd-ink);
    padding: 0;
    transition: background .2s, opacity .2s;
}

.gd-icon-button:hover:not(:disabled) {
    background: var(--gd-accent-soft);
}

.gd-icon-button:disabled {
    opacity: .4;
    cursor: default;
}

.gd-icon-button svg,
.gd-add-button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gd-preview-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.gd-preview-frame {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    user-select: none;
    -webkit-user-select: none;
}

.gd-glass-image {
    display: block;
    max-width: 100%;
    max-height: 640px;
    width: auto;
    height: auto;
    margin: 0 auto;
    pointer-events: none;
}

.gd-area {
    position: absolute;
    touch-action: none;
}

.gd-area-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.gd-area-outline {
    position: absolute;
    inset: 0;
    border: 1.5px dashed rgba(255, 255, 255, 0.85);
    outline: 1px dashed rgba(45, 55, 72, 0.35);
    border-radius: 4px;
    pointer-events: none;
    opacity: .9;
    transition: opacity .2s;
}

.gd-designer[data-step="review"] .gd-area-outline {
    opacity: 0;
}

.gd-area::before,
.gd-area::after {
    content: "";
    position: absolute;
    background: #E11D74;
    opacity: 0;
    pointer-events: none;
    z-index: 30;
}

.gd-area::before {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.gd-area::after {
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
}

.gd-area.snap-x::before,
.gd-area.snap-y::after {
    opacity: .8;
}

.gd-area-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
}

.gd-layer-stack {
    position: absolute;
    inset: 0;
}

.gd-layer {
    position: absolute;
    touch-action: none;
    cursor: grab;
    border-radius: 2px;
    outline: 1px solid transparent;
    transition: outline-color .15s;
}

.gd-layer:hover {
    outline-color: rgba(255, 255, 255, 0.7);
}

.gd-designer.is-interacting .gd-layer {
    cursor: grabbing;
}

.gd-layer.is-selected {
    outline: 1.5px solid var(--gd-accent);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.gd-designer[data-step="review"] .gd-layer {
    pointer-events: none;
    outline: none;
}

.gd-handle {
    position: absolute;
    display: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 1.5px solid var(--gd-accent);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    touch-action: none;
}

.gd-handle::after {
    content: "";
    position: absolute;
    inset: -10px;
}

.gd-layer.is-selected .gd-handle,
.gd-layer.is-selected .gd-handle-stem {
    display: block;
}

.gd-handle-scale[data-corner="nw"] { left: -7px; top: -7px; cursor: nwse-resize; }
.gd-handle-scale[data-corner="ne"] { right: -7px; top: -7px; cursor: nesw-resize; }
.gd-handle-scale[data-corner="sw"] { left: -7px; bottom: -7px; cursor: nesw-resize; }
.gd-handle-scale[data-corner="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }

.gd-handle-stem {
    display: none;
    position: absolute;
    left: 50%;
    top: -26px;
    width: 1.5px;
    height: 26px;
    background: var(--gd-accent);
    transform: translateX(-50%);
    pointer-events: none;
}

.gd-handle-rotate {
    width: 24px;
    height: 24px;
    left: 50%;
    top: -38px;
    margin-left: -12px;
    font-size: 14px;
    line-height: 21px;
    text-align: center;
    color: var(--gd-accent);
    cursor: grab;
}

.gd-drop-overlay {
    display: none;
    position: absolute;
    inset: 0;
    place-items: center;
    background: rgba(95, 117, 144, 0.55);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    border: 2px dashed #fff;
    border-radius: var(--gd-radius-sm);
    pointer-events: none;
    z-index: 40;
}

.gd-designer.is-dragover .gd-drop-overlay {
    display: grid;
}

.gd-stage-hint {
    margin: 10px 0 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gd-muted);
}

.gd-designer[data-step="review"] .gd-stage-hint {
    visibility: hidden;
}

.gd-stage-status {
    position: absolute;
    left: 50%;
    bottom: 44px;
    transform: translate(-50%, 8px);
    max-width: calc(100% - 32px);
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--gd-ink);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 50;
    text-align: center;
}

.gd-stage-status.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.gd-stage-status.is-error {
    background: var(--gd-danger);
}

.gd-stage-status.is-success {
    background: var(--gd-success);
}

/* ---------------- Right Panel ---------------- */

.gd-panel {
    display: flex;
    flex-direction: column;
    background: var(--gd-surface);
    border-left: 1px solid var(--gd-border);
    min-width: 0;
    max-height: 760px;
}

.gd-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--gd-border);
}

.gd-panel-sub {
    font-size: 0.8rem;
    color: var(--gd-muted);
}

.gd-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 18px;
}

.gd-panel-body .gd-review-warnings {
    margin-top: 12px;
}

/* Glass selection */

.gd-category-field {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gd-border);
}

.gd-category-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gd-ink);
}

.gd-category-select {
    width: 100%;
    padding: 9px 34px 9px 12px;
    border: 1px solid var(--gd-border-strong);
    border-radius: var(--gd-radius);
    background-color: var(--gd-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gd-ink);
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

.gd-category-select:hover {
    border-color: var(--gd-accent);
}

.gd-category-select:focus-visible {
    outline: none;
    border-color: var(--gd-accent);
    box-shadow: var(--gd-focus);
}

.gd-glass-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gd-glass-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1.5px solid var(--gd-border);
    border-radius: var(--gd-radius);
    background: var(--gd-surface);
    text-align: left;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.gd-glass-card:hover {
    border-color: var(--gd-border-strong);
    background: var(--gd-surface-muted);
}

.gd-glass-card.is-active {
    border-color: var(--gd-accent);
    background: var(--gd-surface);
    box-shadow: 0 0 0 3px var(--gd-accent-soft);
}

.gd-glass-thumb {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: var(--gd-radius-sm);
    background: var(--gd-surface-muted);
    overflow: hidden;
}

.gd-glass-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gd-glass-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.gd-glass-name {
    font-weight: 600;
    color: var(--gd-ink);
    font-size: 0.88rem;
    line-height: 1.25;
}

.gd-glass-card-price {
    font-size: 0.82rem;
    color: var(--gd-muted);
}

/* Design step */

.gd-add-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.gd-add-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border: 1.5px dashed var(--gd-border-strong);
    border-radius: var(--gd-radius);
    background: var(--gd-surface);
    color: var(--gd-ink);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    transition: border-color .2s, background .2s;
}

.gd-add-button svg {
    width: 22px;
    height: 22px;
}

.gd-add-button:hover,
.gd-add-button.is-active {
    border-color: var(--gd-accent);
    border-style: solid;
    background: var(--gd-accent-soft);
}

.gd-symbol-picker {
    margin: -4px 0 14px;
    padding: 10px;
    border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius);
    background: var(--gd-surface-muted);
}

.gd-symbol-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}

.gd-symbol-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius-sm);
    background: var(--gd-surface);
    font-size: 0.72rem;
    line-height: 1.15;
    color: var(--gd-muted);
}

.gd-symbol-card:hover {
    border-color: var(--gd-accent);
}

.gd-symbol-card img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.gd-symbol-card span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gd-elements {
    display: grid;
    gap: 8px;
}

.gd-elements-empty {
    margin: 4px 0 0;
    padding: 18px 14px;
    text-align: center;
    border-radius: var(--gd-radius);
    background: var(--gd-surface-muted);
    color: var(--gd-muted);
    font-size: 0.9rem;
}

.gd-element {
    border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius);
    background: var(--gd-surface);
    overflow: hidden;
}

.gd-element.is-selected {
    border-color: var(--gd-accent);
    box-shadow: 0 0 0 3px var(--gd-accent-soft);
}

.gd-element-head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    text-align: left;
}

.gd-element-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: var(--gd-radius-sm);
    background: #334155;
    overflow: hidden;
}

.gd-element-icon.is-text {
    color: #fff;
    font-weight: 700;
    font-family: Georgia, serif;
    font-size: 1rem;
}

.gd-element-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.gd-element-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.gd-element-kind {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gd-muted);
}

.gd-element-label {
    color: var(--gd-ink);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gd-element-alert {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gd-warning-soft);
    color: var(--gd-warning);
    font-weight: 800;
    font-size: 0.8rem;
    display: grid;
    place-items: center;
}

.gd-element-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--gd-muted);
    border-bottom: 2px solid var(--gd-muted);
    transform: rotate(45deg);
    margin: 0 4px 4px;
    transition: transform .2s;
}

.gd-element.is-selected .gd-element-chevron {
    transform: rotate(-135deg);
    margin-bottom: 0;
}

.gd-element-body {
    padding: 4px 12px 12px;
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--gd-border);
    padding-top: 12px;
}

.gd-field {
    display: grid;
    gap: 5px;
    margin: 0;
}

.gd-field-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gd-ink);
}

.gd-field-label output {
    font-weight: 500;
    color: var(--gd-muted);
    font-variant-numeric: tabular-nums;
}

.gd-field-hint {
    font-size: 0.75rem;
    color: var(--gd-muted);
}

.gd-designer textarea {
    width: 100%;
    min-height: 64px;
    padding: 9px 11px;
    border: 1px solid var(--gd-border-strong);
    border-radius: var(--gd-radius-sm);
    background: var(--gd-surface);
    color: var(--gd-ink);
    font-size: 1rem;
    line-height: 1.35;
    resize: vertical;
}

.gd-designer input[type="range"] {
    width: 100%;
    margin: 4px 0;
    accent-color: var(--gd-accent);
    background: transparent;
    padding: 0;
    border: 0;
}

.gd-range-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gd-mini-button {
    flex: 0 0 auto;
    padding: 3px 9px;
    border: 1px solid var(--gd-border);
    border-radius: 999px;
    background: var(--gd-surface);
    font-size: 0.78rem;
    font-weight: 600;
}

.gd-font-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 2px;
}

.gd-font-option {
    padding: 8px 10px;
    border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius-sm);
    background: var(--gd-surface);
    font-size: 1.05rem;
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gd-ink);
}

.gd-font-option.is-active {
    border-color: var(--gd-accent);
    background: var(--gd-accent-soft);
    box-shadow: inset 0 0 0 1px var(--gd-accent);
}

.gd-segmented {
    display: flex;
    padding: 3px;
    border-radius: var(--gd-radius-sm);
    background: var(--gd-surface-muted);
    border: 1px solid var(--gd-border);
}

.gd-segmented button {
    flex: 1;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gd-muted);
    line-height: 1.2;
}

.gd-segmented button.is-active {
    background: var(--gd-surface);
    color: var(--gd-ink);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.gd-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--gd-ink);
    cursor: pointer;
    margin: 0;
}

.gd-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--gd-accent);
}

.gd-raster-detail {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: var(--gd-radius-sm);
    background: var(--gd-surface-muted);
}

.gd-raster-canvas {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    image-rendering: pixelated;
}

.gd-raster-detail p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--gd-muted);
}

.gd-raster-detail strong {
    color: var(--gd-ink);
}

.gd-warnings {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}

.gd-warnings:empty {
    display: none;
}

.gd-warnings li {
    margin: 0;
    padding: 7px 10px 7px 30px;
    border-radius: var(--gd-radius-sm);
    background: var(--gd-warning-soft);
    color: var(--gd-warning);
    font-size: 0.82rem;
    line-height: 1.35;
    position: relative;
}

.gd-warnings li::before {
    content: "!";
    position: absolute;
    left: 10px;
    top: 7px;
    font-weight: 800;
}

.gd-element-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding-top: 2px;
}

.gd-link-button {
    border: 0;
    background: none;
    padding: 2px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gd-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gd-link-button:hover {
    color: var(--gd-accent-hover);
}

.gd-link-button.is-danger {
    color: var(--gd-danger);
}

/* Review step */

.gd-review-intro {
    margin: 0 0 12px;
    font-size: 0.9rem;
}

.gd-summary-list {
    margin: 0 0 12px;
    border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius);
    overflow: hidden;
}

.gd-summary-list > div {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 12px;
    border-top: 1px solid var(--gd-border);
}

.gd-summary-list > div:first-child {
    border-top: 0;
}

.gd-summary-list dt {
    font-size: 0.82rem;
    color: var(--gd-muted);
    font-weight: 600;
}

.gd-summary-list dd {
    margin: 0;
    color: var(--gd-ink);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.gd-summary-list small {
    display: block;
    font-weight: 400;
    color: var(--gd-muted);
    font-size: 0.8rem;
}

.gd-review-warnings {
    margin-bottom: 12px;
}

.gd-confirm {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: var(--gd-radius);
    background: var(--gd-surface-muted);
    font-size: 0.88rem;
    color: var(--gd-ink);
    cursor: pointer;
    margin: 0 0 12px;
}

.gd-confirm input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--gd-accent);
}

.gd-cart-form {
    margin: 0;
}

.gd-cart-form .gd-add-to-cart {
    width: 100%;
}

.gd-cart-hint {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--gd-muted);
}

/* Footer / Summary */

.gd-panel-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
    border-top: 1px solid var(--gd-border);
    background: var(--gd-surface);
}

.gd-summary-head {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gd-ink);
}

.gd-price-box {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius-sm);
    background: var(--gd-surface-muted);
    line-height: 1.2;
}

.gd-price-box span {
    font-size: 0.82rem;
    color: var(--gd-muted);
    font-weight: 600;
}

.gd-price-box strong {
    font-size: 1.25rem;
    color: var(--gd-ink);
    font-variant-numeric: tabular-nums;
}

.gd-panel-footer .gd-confirm {
    margin-bottom: 10px;
    font-size: 0.82rem;
}

.gd-primary-button,
.gd-secondary-button {
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.2;
    transition: background .2s, opacity .2s;
}

.gd-primary-button {
    border: 0;
    background: var(--gd-ink);
    color: #fff !important;
}

.gd-primary-button:hover:not(:disabled) {
    background: #1A202C;
}

.gd-primary-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.gd-secondary-button {
    border: 1px solid var(--gd-border-strong);
    background: var(--gd-surface);
    color: var(--gd-ink);
}

.gd-cart-form.is-busy .gd-add-to-cart {
    cursor: progress;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1120px) {
    .gd-shell {
        grid-template-columns: 68px minmax(220px, 250px) minmax(0, 1fr);
    }

    .gd-panel {
        grid-column: 1 / -1;
        border-left: 0;
        border-top: 1px solid var(--gd-border);
        max-height: none;
    }

    .gd-panel-body {
        max-height: 360px;
    }
}

@media (max-width: 820px) {
    .gd-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .gd-rail {
        flex-direction: row;
        justify-content: space-around;
        padding: 6px;
        order: 2;
    }

    .gd-rail-tab {
        flex: 1;
        padding: 8px 4px;
    }

    .gd-drawer {
        order: 3;
        border-right: 0;
        border-bottom: 1px solid var(--gd-border);
        max-height: none;
    }

    .gd-stage {
        order: 1;
        padding: 12px 12px 10px;
    }

    .gd-glass-image {
        max-height: 54vh;
    }

    .gd-panel {
        order: 4;
        border-left: 0;
        border-top: 1px solid var(--gd-border);
        max-height: none;
    }

    .gd-panel-body {
        max-height: none;
        overflow: visible;
    }

    .gd-panel-footer {
        position: sticky;
        bottom: 0;
        z-index: 60;
        box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.06);
    }

    .gd-stage-status {
        position: fixed;
        bottom: 110px;
    }
}

@media (max-width: 560px) {
    .gd-designer {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        font-size: 14px;
    }

    .gd-stage-top {
        align-items: flex-start;
    }

    .gd-drawer-pane {
        padding: 12px;
    }

    .gd-panel-footer {
        padding: 10px 12px;
    }

    .gd-primary-button,
    .gd-secondary-button {
        padding: 10px 14px;
    }

    .gd-stage-hint {
        font-size: 0.75rem;
    }
}
