.main {
    grid-template-columns: 400px 1fr;
}

/* 基准色输入框：右侧取色板可点击调出 */
.input-wrap .suffix.color-pick-wrap {
    pointer-events: auto;
    right: 8px;
}

#baseHex {
    padding-right: 48px;
    cursor: text;
}

.color-pick {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    vertical-align: middle;
    transition: box-shadow 0.2s;
}

.color-pick:hover {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.color-pick::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-pick::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* 生成 / 随机按钮美化 */
.actions-row {
    display: flex;
    gap: 10px;
    margin-top: 2px;
}

.actions-row .btn {
    width: auto;
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.actions-row .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.28);
}

.actions-row .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6d429a 100%);
    box-shadow: 0 5px 14px rgba(102, 126, 234, 0.34);
}

.actions-row .btn-secondary {
    background: #ffffff;
    color: #4b5563;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.actions-row .btn-secondary:hover {
    background: #f9fafb;
    border-color: #a5b4fc;
    color: #4338ca;
}

/* 相反色取色标签 */
.method-inverse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}

.method-inverse .inv-swatch {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid currentColor;
    box-sizing: border-box;
    flex: none;
}

.method-inverse:hover {
    box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.15);
}

.method-inverse:active {
    transform: scale(0.95);
}

input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
}

input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
}

.scheme-desc {
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.7;
    color: #4b5563;
    background: #fff;
}

.swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 14px;
    background: #fff;
}

.swatch {
    display: flex;
    flex-direction: column;
    min-height: 168px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.swatch:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.swatch-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    font-size: 12px;
    opacity: 0.85;
}

.swatch-ratio {
    font-variant-numeric: tabular-nums;
}

.swatch-foot {
    margin-top: auto;
    padding: 10px;
}

.swatch-hex {
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.swatch-rgb {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.swatch-hsl {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 1px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
    .main {
        grid-template-columns: 1fr;
    }
}